/* Moja Ruka. Colours, fonts and sizes come from tokens.css; this file only arranges them.
   Direction "Crvena i žuta" (design/direction.md, design/system.md), restyled in M16
   (Harun, 2026-11-28): a red top on every screen with the logo, the wallpaper of topic icons
   behind the content, white panels on it, the logo's yellow only for the main button.
   Actions are cards "Logo na granici": the topic gives the pattern, the organization the
   colour and the logo on the edge. Prototypes: design/prototypes/ (ekrani.html,
   kartice-final.html, animacije.html). */

/* --- Base --------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  /* A column whose <main> grows, so the footer sits at the bottom of short pages too. */
  display: flex;
  flex-direction: column;
  background: var(--wallpaper) 0 0 / 200px 200px, var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-text);
  font-size: var(--font-size-body);
  line-height: var(--leading-text);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--size-h2);
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--size-h3);
}

h3,
h4 {
  font-size: var(--size-lead);
}

p {
  margin: 0;
}

p,
li,
dd {
  max-width: 65ch;
}

a {
  color: var(--color-brand);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* `hidden` always hides, also on elements whose class sets a display. */
[hidden] {
  display: none !important;
}

.pre-line {
  white-space: pre-line;
}

.hint {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--size-small);
}

.muted {
  color: var(--color-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The bot trap on "Prijavi problem": off screen, so people never see or fill it. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Icons from static/icons/sprite.svg: stroke drawings in the colour of the text. */
.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -4px;
}


/* --- Older pages ----------------------------------------------------------------
   Styles of pages not yet moved to the new components (admin, charts, certificate, year,
   organization directory...). Same tokens; the new components below win where both apply.
   Remove a rule here when the last page that uses it is redone. */

/* The install banner, right under the header (shown by app.js). Yellow-light with an ink
   rule: noticeable, but quieter than the board. */
.install-banner:not([hidden]) {
  display: block;
  border-bottom: var(--border);
  background: var(--color-brand-soft);
}

.install-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
}

.install-icon {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
}

.install-text {
  flex: 1 1 16rem;
}

.install-text p {
  margin: 0;
}

.share-icon {
  vertical-align: -0.2em;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-2) var(--space-4) var(--space-7);
}

/* Fills the height between the bars, so the footer sits at the bottom (body is a column). */
.app-main {
  flex: 1 0 auto;
}

.site-footer {
  border-top: var(--border);
  background: var(--color-surface);
  color: var(--color-muted);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  align-items: center;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  color: var(--color-ink);
}

/* --- Messages, badges, chips ------------------------------------------------------ */

.alert {
  max-width: var(--reading-width);
  padding: var(--space-3) var(--space-4);
  border-left: 6px solid var(--color-ink);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.alert-error {
  border-left-color: var(--color-error);
  background: var(--color-error-soft);
}

.alert-success {
  border-left-color: var(--color-brand);
  background: var(--color-brand-soft);
}

.alert-info {
  border-left-color: var(--color-accent);
  background: var(--color-brand-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--color-muted);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--size-small);
  font-weight: 700;
}

.badge-verified,
.badge-offer-approved {
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.badge-pending,
.badge-offer-pending {
  border-color: var(--color-ink);
  background: var(--color-brand-soft);
}

.badge-rejected,
.badge-offer-rejected {
  border-color: var(--color-error);
  background: var(--color-error-soft);
}

.badge-offer-expired {
  color: var(--color-muted);
}

/* Topic links: square tags that are also tap targets. */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.filter a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  padding: 0 var(--space-4);
  border: 2px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 700;
  text-decoration: none;
}

.filter a:hover {
  border-color: var(--color-ink);
}

.filter a[aria-current="page"] {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: var(--color-surface);
}

/* --- Sheets, lists, details ------------------------------------------------------- */

.sheet {
  margin: var(--space-4) 0;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.sheet > :first-child {
  margin-top: 0;
}

.sheet > :last-child {
  margin-bottom: 0;
}

/* `card-list` is a sheet of rows separated by hairlines. */
.card-list {
  margin: var(--space-4) 0;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  list-style: none;
}

.card-list .card {
  max-width: none;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-line);
}

.card-list .card:first-child {
  border-top: 0;
}

.card-list .card h2,
.card-list .card h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--size-lead);
}

.card-list .card p {
  margin: var(--space-1) 0;
}

.details {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: var(--space-2) var(--space-5);
  margin: var(--space-4) 0;
}

.details dt {
  color: var(--color-muted);
  font-weight: 700;
}

.details dd {
  margin: 0;
}

@media (max-width: 560px) {
  .details {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .details dt {
    margin-top: var(--space-3);
  }
}

.pager,
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
}

.empty {
  max-width: var(--reading-width);
  padding: var(--space-5);
  border: 2px dashed var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.empty p {
  margin: 0 0 var(--space-3);
}

.empty p:last-child {
  margin-bottom: 0;
}

/* --- Spots: one cell per volunteer needed ------------------------------------------- */

.spots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-2) 0 0;
}

.spot-cells {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}

.spot {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--color-muted);
  border-radius: 1px;
}

.spot-taken {
  border-color: var(--color-brand);
  background: var(--color-brand);
}

/* The last cell of the minimum: a short upright line after it, like a mark on a ruler. */
.spot-minimum {
  position: relative;
  margin-right: 0.6rem;
}

.spot-minimum::after {
  position: absolute;
  top: -5px;
  right: calc(-0.3rem - 3px);
  bottom: -5px;
  width: 2px;
  background: var(--color-ink);
  content: "";
}

/* On the board the cells are ink, like the board's lettering. */
.board .spot {
  border-color: var(--color-ink);
}

.board .spot-taken {
  background: var(--color-ink);
}

.spots progress {
  flex: 0 1 9rem;
  height: 0.75rem;
  border: 2px solid var(--color-ink);
  border-radius: 1px;
  background: var(--color-surface);
  appearance: none;
}

.spots progress::-webkit-progress-bar {
  background: var(--color-surface);
}

.spots progress::-webkit-progress-value {
  background: var(--color-brand);
}

.spots progress::-moz-progress-bar {
  background: var(--color-brand);
}

.spots-full {
  font-weight: 700;
}

/* --- The week strip ------------------------------------------------------------- */

.week-section {
  margin-top: var(--space-6);
}

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(4.75rem, 1fr));
  margin: var(--space-4) 0;
  padding: 0;
  overflow-x: auto;
  border: 2px solid var(--color-ink);
  border-radius: var(--radius);
  background: var(--color-surface);
  list-style: none;
  scrollbar-width: thin;
}

.week li {
  max-width: none;
  border-left: 1px solid var(--color-line);
}

.week li:first-child {
  border-left: 0;
}

.week a {
  display: grid;
  justify-items: start;
  gap: 0.15rem;
  height: 100%;
  min-height: var(--tap-target);
  padding: var(--space-3);
  color: var(--color-ink);
  text-decoration: none;
}

.week a:hover {
  background: var(--color-brand-soft);
}

.week a:focus-visible {
  outline-offset: -3px;
}

.week-weekday {
  font-weight: 700;
}

.week-day {
  font-family: var(--font-heading);
  font-size: var(--size-h2);
  
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.week-count {
  color: var(--color-muted);
  font-size: var(--size-small);
  white-space: nowrap;
}

.week-today a {
  background: var(--color-brand-soft);
}

.week-empty .week-day {
  color: var(--color-muted);
}

/* The chosen day: blue with white text, also when it has no offers. */
.week a[aria-current] {
  background: var(--color-brand);
  color: var(--color-surface);
}

.week a[aria-current] .week-day,
.week a[aria-current] .week-count {
  color: var(--color-surface);
}

/* --- Offers: rows under day headings ---------------------------------------------- */

.day {
  margin: var(--space-5) 0 0;
}

.day-heading {
  margin: 0;
  padding-bottom: var(--space-2);
  border-bottom: var(--border);
  font-size: var(--size-lead);
}

.offer-list {
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
}

.day .offer-list {
  margin-top: 0;
}

.offer {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-3);
  max-width: none;
  overflow-wrap: anywhere;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-line);
}

.offer-time {
  margin: 0;
  line-height: 1.1;
}

.offer-time > span[aria-hidden] {
  display: grid;
  justify-items: start;
  gap: var(--space-1);
}

.offer-day {
  font-size: var(--size-small);
  font-weight: 700;
}

.offer-day-soon {
  padding: 0 0.35rem;
  border-radius: var(--radius);
  background: var(--color-accent);
}

.offer-clock {
  font-family: var(--font-heading);
  font-size: var(--size-h3);
  
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.offer h2,
.offer h3,
.offer h4 {
  margin: 0;
  font-size: var(--size-lead);
}

.offer h2 a,
.offer h3 a,
.offer h4 a {
  color: var(--color-ink);
  text-decoration: none;
}

.offer h2 a:hover,
.offer h3 a:hover,
.offer h4 a:hover {
  color: var(--color-brand);
  text-decoration: underline;
}

.offer-org,
.offer-facts {
  margin: var(--space-1) 0 0;
}

.offer-facts {
  color: var(--color-muted);
}

.offer .actions {
  margin-top: var(--space-3);
}

.details dd,
.pre-line {
  overflow-wrap: anywhere;
}

@media (min-width: 760px) {
  .offer {
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: var(--space-5);
  }

  .offer-clock {
    font-size: var(--size-h2);
  }
}

/* The offer page: a sign on top (same as a board row), the story on the left, the
   decision on the right. */
.offer-sign {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-accent);
  overflow-wrap: anywhere;
}

.offer-sign h1 {
  margin: 0 0 var(--space-1);
  font-size: var(--size-h3);
}

.offer-sign p {
  margin: 0;
}

/* Phones: time on top, the title gets the whole width below it. */
.offer-sign .board-time {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  border-bottom: var(--border);
}

@media (min-width: 760px) {
  .offer-sign .board-time {
    display: grid;
    padding: 0 var(--space-4) 0 0;
    border-right: var(--border);
    border-bottom: 0;
  }

  .offer-sign {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-5);
    padding: var(--space-5) var(--space-6);
  }

  .offer-sign h1 {
    font-size: var(--size-h1);
  }

  .offer-sign .board-clock {
    font-size: var(--size-display);
  }
}

.offer-page {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 900px) {
  .offer-page {
    grid-template-columns: 1fr 22rem;
    align-items: start;
  }

  .offer-aside {
    position: sticky;
    top: 5rem;
  }
}

.apply {
  padding: var(--space-5);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.apply h2 {
  margin-top: 0;
}

.apply .form {
  margin-bottom: 0;
}

.apply .button-primary {
  width: 100%;
}

/* --- Landing page below the board ------------------------------------------------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-7) 0 0;
}

.week-section .section-head {
  margin-top: 0;
}

.section-head h2 {
  margin: 0;
}

.section-head a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  font-weight: 700;
}

/* Organizations: a list in two columns, not a wall of cards. */
.organizations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0 var(--space-6);
  margin: var(--space-4) 0;
  padding: 0;
  border-top: var(--border);
  list-style: none;
}

.organization {
  display: flex;
  gap: var(--space-3);
  max-width: none;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-line);
}

.organization h2,
.organization h3 {
  margin: 0;
  font-size: var(--size-lead);
}

.organization p {
  margin: var(--space-1) 0 0;
}

.organization h2 a,
.organization h3 a {
  color: var(--color-ink);
}

.initials {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--color-ink);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-size: var(--size-lead);
  
  font-weight: 900;
}

.initials-large {
  width: 4.5rem;
  height: 4.5rem;
  font-size: var(--size-h2);
}

.invite {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-7) 0 0;
  padding: var(--space-5);
  border-left: 6px solid var(--color-brand);
  background: var(--color-brand-soft);
}

.invite h2,
.invite p {
  margin: 0;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) 0 0;
}

.profile-head h1 {
  margin: 0;
}

.profile-head p {
  margin: var(--space-1) 0 0;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* --- Experience: charts drawn as inline SVG ----------------------------------------- */

.chart {
  margin: var(--space-4) 0 var(--space-5);
}

.chart-svg {
  display: block;
  width: 100%;
  max-width: 30rem;
  height: auto;
  overflow: visible;
}

.chart-bar {
  fill: var(--color-brand);
}

.chart-mark:hover .chart-bar {
  fill: var(--color-brand);
}

.chart-axis {
  stroke: var(--color-line);
  stroke-width: 2;
}

/* SVG text scales with the chart, so the sizes are in chart units: a 600-unit chart on a
   320px phone is 288px wide (1rem gutters), so 28 x 288/600 = 13.4px. The chart stops
   growing at 30rem, so on a desktop the text stays near 22px. */
.chart-label,
.chart-value {
  fill: var(--color-ink);
  font-family: var(--font-text);
  font-size: 28px;
}

.chart-label {
  fill: var(--color-muted);
}

.chart-value {
  font-weight: 700;
}

.chart-table summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  color: var(--color-brand);
  font-weight: 700;
  cursor: pointer;
}

.experience-columns {
  display: grid;
  gap: 0 var(--space-6);
}

@media (min-width: 900px) {
  .experience-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.attendance-comment {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-3);
  border-left: 3px solid var(--color-line);
}

/* --- Applicants: reliability and the attendance form ---------------------------- */

.applicants .card h2 {
  margin-bottom: var(--space-1);
}

.reliability {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border-left: 4px solid var(--color-brand);
  background: var(--color-brand-soft);
}

.reliability p {
  margin: 0;
}

.reliability-comments {
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

.reliability-comments li {
  margin-top: var(--space-2);
}

/* One row per volunteer on wide screens: came or not, hours, comment, save. */
.attendance-form {
  gap: var(--space-3);
  max-width: none;
  margin-bottom: 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line);
}

.attendance-error {
  grid-column: 1 / -1;
}

.attendance-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
}

.attendance-form legend {
  width: 100%;
}

@media (min-width: 900px) {
  .attendance-form {
    grid-template-columns: auto 9rem minmax(0, 1fr) auto;
    align-items: start;
  }

  .attendance-form textarea {
    min-height: var(--tap-target);
  }

  .attendance-form .button {
    margin-top: 1.9rem;
  }
}

.field-checkbox input[type="radio"] {
  accent-color: var(--color-brand);
}

/* --- Superadmin dashboard -------------------------------------------------------- */

.admin {
  display: grid;
  gap: var(--space-5);
}

.admin-nav {
  display: flex;
  gap: var(--space-1) var(--space-4);
  overflow-x: auto;
  border-bottom: var(--border);
  white-space: nowrap;
}

.admin-nav-title {
  display: none;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  color: var(--color-ink);
  font-weight: 700;
  text-decoration: none;
}

.admin-nav a[aria-current="page"] {
  border-bottom: 3px solid var(--color-brand);
}

@media (min-width: 900px) {
  .admin {
    grid-template-columns: 13rem 1fr;
  }

  .admin-nav {
    flex-direction: column;
    align-self: start;
    position: sticky;
    top: 5rem;
    margin-top: var(--space-5);
    border-bottom: 0;
    border-left: var(--border);
  }

  .admin-nav-title {
    display: block;
    margin: 0;
    padding: 0 var(--space-3);
    color: var(--color-muted);
    font-weight: 700;
  }

  .admin-nav a {
    padding: 0 var(--space-3);
  }

  .admin-nav a[aria-current="page"] {
    border-bottom: 0;
    border-left: 3px solid var(--color-brand);
    background: var(--color-brand-soft);
  }
}

.admin-main {
  min-width: 0;
}

/* Numbers in a row of columns, divided like the week strip. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  margin: var(--space-4) 0;
  padding: 0;
  border-top: var(--border);
  list-style: none;
}

.stat {
  max-width: none;
  padding: var(--space-3) var(--space-4) var(--space-4) 0;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-muted);
}

.stat-number {
  display: block;
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-size: var(--size-h1);
  
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.table thead th {
  border-bottom: var(--border);
  font-weight: 700;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.timeline {
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  max-width: none;
  padding: var(--space-2) 0 var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-line);
}

.timeline p {
  margin: 0.1rem 0;
}

.timeline-when {
  color: var(--color-muted);
  font-size: var(--size-small);
}

/* Scrolling strips must contain their absolutely positioned (screen reader) text, or it
   widens the whole page on phones. */
.week,
.site-nav,
.admin-nav,
.table-wrap,
.offer-time {
  position: relative;
}

/* Phones: links that are also in the footer leave the header, so "Prijava" stays visible. */
@media (max-width: 560px) {
  .site-nav .nav-wide,
  .site-nav a.nav-wide {
    display: none;
  }

  .site-nav {
    gap: var(--space-3);
  }

  .site-nav a.nav-button {
    padding: 0 var(--space-3);
  }
}

/* Recognition (M14): quiet, no confetti. The new design will restyle these. */
.city-week {
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-brand-soft);
}

.milestones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-2) 0;
  padding: 0;
  list-style: none;
}

.milestones .milestone {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-ink);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-weight: 700;
}

.thanks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.thanks li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-line);
}

.thanks li p {
  margin: 0;
}

.year-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.year-numbers dt {
  font-size: var(--size-small);
}

.year-numbers dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--size-h1);
  font-weight: 800;
  line-height: 1;
}

.certificate-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
}

.certificate-table th,
.certificate-table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

@media print {
  .site-header,
  .site-footer,
  .tabbar,
  .install-banner,
  .no-print {
    display: none !important;
  }

  body {
    background: var(--color-surface);
  }
}
/* --- Shell: app bar, organizer strip, main, tab bar, footer --------------------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-top);
  color: var(--color-on-top);
  padding-top: env(safe-area-inset-top, 0px);
}

.appbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: var(--page-width);
  min-height: 56px;
  margin: 0 auto;
  padding: 0 max(var(--space-4), env(safe-area-inset-right, 0px)) 0
    max(var(--space-4), env(safe-area-inset-left, 0px));
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  color: var(--color-on-top);
  text-decoration: none;
}

/* "Moja Ruka" (owner, 2026-11-30, example D): the hand, then "moja" on a yellow tag over
   "ruka" (templates/_brand.html). */
.wordmark {
  gap: 4px;
}

.wordmark img {
  display: block;
  width: auto;
}

.wordmark-hand {
  height: 40px;
}

.wordmark-name {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.wordmark-name img {
  height: 19px;
}

/* The tag: the logo's yellow with dark text (well over 4.5:1), slightly turned like a
   sticker. 13 px is the smallest text the app uses. */
.wordmark-moja {
  display: inline-block;
  padding: 1px 6px 2px;
  border-radius: 5px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  transform: rotate(-4deg);
}

.appbar-back,
.appbar-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap-target);
  padding: 0 var(--space-2);
  color: var(--color-on-top);
  font-weight: 600;
  text-decoration: none;
}

.appbar .link-button,
.appbar .icon {
  color: var(--color-on-top);
}

/* On the red top the brand-red focus ring would vanish: the ring is white there. */
.appbar :focus-visible,
.top :focus-visible {
  outline-color: var(--color-on-top);
}

.appbar-back {
  margin-left: calc(-1 * var(--space-2));
}

.appbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.orgbar {
  background: var(--color-brand-soft);
  font-size: 0.875rem;
  font-weight: 600;
}

.orgbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  max-width: var(--page-width);
  min-height: 40px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.orgbar a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap-target);
}

.container {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: var(--space-5) max(var(--space-4), env(safe-area-inset-right, 0px)) var(--space-7)
    max(var(--space-4), env(safe-area-inset-left, 0px));
}

.container-wide {
  max-width: var(--page-width);
}

/* The content of a page: blocks with even gaps. */
.stack-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}

.page-title {
  font-size: var(--size-h2);
}

/* Bottom tab bar on phones, a row of tabs under the app bar on computers. */
.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  background: var(--color-raised);
  box-shadow: var(--shadow-bar);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 56px;
  color: var(--color-muted);
  font-size: var(--size-small);
  font-weight: 600;
  text-decoration: none;
}

.tab .icon {
  width: 24px;
  height: 24px;
}

/* The current tab sits on a soft yellow pill. It comes with the rest of the new page. */
.tab[aria-current="page"] {
  color: var(--color-brand);
}

.tab[aria-current="page"]::before {
  content: "";
  position: absolute;
  inset: 6px 6px;
  z-index: -1;
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
}

.count {
  position: absolute;
  top: 6px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-round);
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-size: 0.8125rem;
  line-height: 18px;
  text-align: center;
}

body.has-tabbar {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

body.has-actionbar {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 900px) {
  .tabbar {
    position: static;
    justify-content: center;
    gap: var(--space-2);
    box-shadow: none;
    border-bottom: var(--border);
    padding-bottom: 0;
  }

  .tab {
    flex: none;
    grid-auto-flow: column;
    gap: var(--space-2);
    padding: 0 var(--space-4);
    font-size: var(--size-body);
  }

  .tab .icon {
    width: 20px;
    height: 20px;
  }

  .count {
    position: static;
  }

  body.has-tabbar {
    padding-bottom: 0;
  }
}

.site-footer {
  border-top: var(--border);
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
}

/* --- Buttons ------------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-target);
  padding: 0 var(--space-4);
  border: var(--border-field);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-ink);
  font: 600 var(--size-body) / 1.2 var(--font-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color var(--motion-press),
    transform var(--motion-press) var(--ease-out),
    box-shadow var(--motion-press);
}

/* Pressed: it gives a little at once, before anything is sent. */
.button:active {
  background: color-mix(in srgb, var(--color-surface) 92%, var(--color-ink));
  transform: scale(0.97);
}

.button .icon {
  color: var(--color-brand);
}

/* The one main action of a screen ("Javi se", "Objavi akciju"). */
.button-primary {
  min-height: var(--tap-primary);
  border-color: transparent;
  background: var(--color-accent);
  box-shadow: inset 0 -3px 0 var(--color-accent-line);
  color: var(--color-on-accent);
  font-weight: 800;
}

.button-primary .icon {
  color: inherit;
}

.button-primary:active {
  background: color-mix(in srgb, var(--color-accent) 88%, var(--color-ink));
  box-shadow: inset 0 -1px 0 var(--color-accent-line);
}

.button-block {
  width: 100%;
}

.button-danger {
  border: 2px solid var(--color-error);
  color: var(--color-error);
}

/* Cutting a picture before it is sent (static/js/crop.js). */
.crop {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
}

.crop-frame {
  width: 280px;
  max-width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: var(--border);
  background: var(--color-paper);
  touch-action: none; /* the finger moves the picture, not the page */
}

.crop-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.crop-frame canvas:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -3px;
}

.crop-round {
  border-radius: var(--radius-round);
}

.crop-square {
  border-radius: var(--radius);
}

.crop input[type="range"] {
  width: 280px;
  max-width: 100%;
  min-height: 44px;
}

/* "Ne želim vidjeti akcije ove organizacije" on an organization's page. */
.hide-org {
  display: grid;
  gap: var(--space-2);
}

/* "Brisanje računa" at the end of Moji podaci: set apart by a line, never the main button. */
.danger-zone {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--border);
}

.button[aria-disabled="true"],
.button:disabled {
  border: var(--border);
  background: var(--color-paper);
  color: var(--color-muted);
  cursor: not-allowed;
}

/* Sending (app.js): "Šaljem…" with the logo's hand waving (owner, 2026-11-28: instead of
   the three rays); the button cannot be pressed twice. */
.button[aria-busy="true"] {
  pointer-events: none;
}

.wave-hand {
  flex: none;
  width: 18px;
  height: 21px;
  background: currentColor;
  -webkit-mask: url("/static/icons/hand-only.svg") center / contain no-repeat;
  mask: url("/static/icons/hand-only.svg") center / contain no-repeat;
  transform-origin: 50% 90%;
  animation: wave var(--motion-loop) ease-in-out infinite;
}

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-brand);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-target);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

/* Sticky bar at the bottom of inner screens: spots in words and the one button. */
.actionbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  background: var(--color-raised);
  box-shadow: var(--shadow-bar);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.actionbar-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3);
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
}

.actionbar-inner > :only-child {
  grid-column: 1 / -1;
}

.actionbar form {
  margin: 0;
}

.need-big {
  display: grid;
  line-height: 1.25;
}

.need-big b {
  font: 700 var(--size-lead) / 1.2 var(--font-heading);
}

.need-big span {
  color: var(--color-muted);
  font-size: var(--size-small);
}

.actionbar .button-primary {
  min-width: 9.5rem;
}

/* --- Forms -------------------------------------------------------------------- */

.form {
  display: grid;
  gap: var(--space-5);
}

.field,
.f {
  display: grid;
  gap: 6px;
}

.field label,
.f .label,
.field legend {
  font-weight: 600;
}

.label-icon {
  margin-right: var(--space-2);
  color: var(--color-brand);
}

.optional-mark {
  color: var(--color-muted);
  font-size: var(--size-small);
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  min-height: var(--tap-target);
  padding: 0 var(--space-3);
  border: var(--border-field);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font: 400 var(--size-body) / 1.4 var(--font-text);
}

input,
select {
  height: 48px;
}

/* Date and time fields: iPhones give them a width of their own that pushes the page wider
   than the screen (owner, 2026-11-26). Keep them inside their column. */
.field,
.f {
  min-width: 0;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  display: block;
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
  line-height: 48px;
}

input::-webkit-date-and-time-value {
  text-align: left;
}

textarea {
  min-height: 120px;
  padding: var(--space-3);
  resize: vertical;
}

textarea.short {
  min-height: 72px;
}

input:focus,
select:focus,
textarea:focus {
  border: 2px solid var(--color-brand);
  outline: none;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

input[disabled],
input[readonly] {
  border: var(--border);
  background: var(--color-paper);
  color: var(--color-muted);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border: 2px solid var(--color-error);
}

.field-error,
.error-text {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--color-error-soft);
  color: var(--color-error);
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-errors {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-error);
  border-radius: var(--radius);
  background: var(--color-error-soft);
  color: var(--color-error);
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9375rem;
}

.form-errors a {
  color: inherit;
  font-weight: 600;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fieldset {
  display: grid;
  gap: var(--space-4);
}

.fieldset > legend {
  margin-bottom: var(--space-4);
  padding: 0;
  font: 700 var(--size-h3) / 1.2 var(--font-heading);
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* Radio and checkbox rows: the whole row is the tap target. */
.field-checkbox,
.checkrow {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: var(--tap-target);
  padding: var(--space-3) var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.field-checkbox input,
.checkrow input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--color-brand);
}

.field-checkbox label,
.checkrow label {
  display: grid;
  gap: 2px;
  font-weight: 600;
}

.checkrow small {
  color: var(--color-muted);
  font-size: var(--size-small);
  font-weight: 400;
}

/* Topic buttons: a radio group that looks like buttons with icons. */
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.topics label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-target);
  padding: 0 var(--space-3);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.topics label .icon {
  width: 18px;
  height: 18px;
  color: var(--color-brand);
}

.topics input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.topics input:checked + label {
  border: 2px solid var(--color-brand);
  background: var(--color-brand-soft);
}

.topics input:focus-visible + label {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* Optional parts of a form, closed until needed. */
.optional {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.optional > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 52px;
  padding: 0 var(--space-4);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.optional > summary::-webkit-details-marker {
  display: none;
}

.optional[open] > summary {
  border-bottom: var(--border);
}

.optional[open] > summary > .icon {
  transform: rotate(180deg);
}

.optional > summary .lead-icon {
  margin-right: var(--space-3);
  color: var(--color-brand);
}

.optional > .inner {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
}

/* Da / Ne as two big radio buttons. */
.seg2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.seg2 input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg2 label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap-target);
  border: var(--border-field);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-weight: 600;
  cursor: pointer;
}

.seg2 input:checked + label {
  border: 2px solid var(--color-brand);
  background: var(--color-brand-soft);
}

.seg2 input:focus-visible + label {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* --- Messages ----------------------------------------------------------------- */

.alert {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.alert-success,
.alert-info {
  border-color: transparent;
  background: var(--color-brand-soft);
}

.alert-error {
  border: 2px solid var(--color-error);
  background: var(--color-error-soft);
  color: var(--color-error);
  font-weight: 600;
}

.nudge,
.started {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-brand-soft);
}

.notice {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.notice p {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.empty {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.empty p {
  color: var(--color-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 var(--space-2);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: var(--size-small);
  font-weight: 600;
  white-space: nowrap;
}

.verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-muted);
  font-size: var(--size-small);
}

.verified .icon {
  width: 14px;
  height: 14px;
  color: var(--color-brand);
  stroke-width: 3;
}

/* --- Akcije: switch, days, filters, groups -------------------------------------- */

.hello {
  display: grid;
  gap: var(--space-2);
}

.hello h1 {
  font-size: 2.25rem;
  letter-spacing: -0.015em;
}

.hello p {
  color: var(--color-muted);
  font-size: var(--size-lead);
  line-height: 1.45;
}

.next {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-brand-soft);
  color: var(--color-ink);
  text-decoration: none;
}

.next-label {
  grid-column: 1 / -1;
  color: var(--color-muted);
  font-size: var(--size-small);
}

.next-time {
  font: 700 var(--size-lead) / 1.1 var(--font-heading);
  font-variant-numeric: lining-nums tabular-nums;
}

.next-title {
  font-weight: 600;
}

.days {
  display: flex;
  gap: var(--space-2);
  margin: 0 calc(-1 * var(--space-4));
  padding: 0 var(--space-4);
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.days::-webkit-scrollbar {
  display: none;
}

.day-chip {
  flex: none;
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 64px;
  min-height: 56px;
  padding: var(--space-1) var(--space-3);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.day-chip small {
  color: var(--color-muted);
  font-size: var(--size-small);
  font-weight: 400;
}

.day-chip[aria-current="date"] {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.day-chip[aria-current="date"] small {
  color: inherit;
}

.day-chip.is-empty {
  color: var(--color-muted);
}

/* "Sve": all days, set apart from the days (owner, 2026-11-26). */
.day-chip.day-all {
  grid-template-columns: auto auto;
  column-gap: 4px;
  align-items: center;
  border-style: dashed;
  border-color: var(--color-field);
}

.day-chip.day-all .icon {
  width: 18px;
  height: 18px;
}

.day-chip.day-all small {
  grid-column: 1 / -1;
}

.day-chip.day-all[aria-current="date"] {
  border: 2px solid var(--color-ink);
  background: var(--color-ink);
  color: var(--color-paper);
}

.day-chip.day-all[aria-current="date"] small {
  color: var(--color-paper);
}

/* "Za mene", "Uredi teme", "Organizacije ›" (a link to another page, not a tab). */
.mine-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-target);
  padding: 0 var(--space-4);
  border: var(--border-field);
  border-radius: var(--radius-round);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
}

.toggle .icon {
  color: var(--color-brand);
}

.toggle.is-on {
  border: 2px solid var(--color-brand);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.toggle.is-on .icon {
  color: var(--color-on-brand);
}

.toggle-off {
  width: 16px;
  height: 16px;
}

.small-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-target);
  font-size: 0.9375rem;
}

.small-link .icon {
  width: 16px;
  height: 16px;
}

.push-right {
  margin-left: auto;
}

.filters {
  display: grid;
  gap: var(--space-2);
}

.searchbox {
  position: relative;
}

.searchbox .icon {
  position: absolute;
  top: 50%;
  left: var(--space-3);
  color: var(--color-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.searchbox input {
  padding-left: 2.5rem;
}

.chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chiprow select {
  width: auto;
  height: 44px;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-target);
  padding: 0 var(--space-3);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.chip[aria-current="page"],
.chip.on {
  border: 2px solid var(--color-brand);
  background: var(--color-brand-soft);
}

.chip .icon {
  width: 18px;
  height: 18px;
  color: var(--color-brand);
}

.group {
  display: grid;
  gap: var(--space-3);
}

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.group-head h2 {
  font-size: var(--size-h3);
}

.group-head span {
  color: var(--color-muted);
  font-size: var(--size-small);
}

.stack {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cityweek {
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--color-brand-soft);
}

.cityweek strong {
  font-family: var(--font-heading);
  font-size: var(--size-lead);
}

/* --- Organization colours ------------------------------------------------------
   Content, not design tokens: each organization gets one of these until it uploads a logo
   (filter `org_tone` picks one from its id). The full colour is under white text on the
   cards and logo squares: each is 4.5:1 or more with white (tests/test_accessibility.py
   checks every one). */

.org-0 { --org: #c2410c; }
.org-1 { --org: #2f7d4f; }
.org-2 { --org: #5b4a9e; }
.org-3 { --org: #1f6f8b; }
.org-4 { --org: #b4235a; }
.org-5 { --org: #8a5a00; }
.org-6 { --org: #3d5a99; }
.org-7 { --org: #7a3f8f; }

.logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--org, var(--color-brand));
  outline: 3px solid var(--color-surface);
  color: var(--color-on-org);
  font: 700 1.25rem/1 var(--font-text);
}

img.logo,
img.avatar {
  object-fit: cover;
  background: var(--color-surface);
}

img.logo {
  outline: 1px solid var(--color-line);
}

.logo-sm {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  outline: 0;
  font-size: 0.9375rem;
}

.logo-xs {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  outline: 0;
  font-size: 0.8125rem;
}

/* --- The action card "Logo na granici" (M16) ---------------------------------------
   The coloured part: the organization's colour under the main topic's pattern, the time big,
   the topic's icon inside the corner. The logo sits on the edge between colour and text.
   Big cards open a day (layout B); tiles go two to a row. Text on the colour is white on
   the organization colours above (4.5:1 or more each); a full action turns grey. */

.t-humanitarna-pomoc { --pat: var(--pat-dots); }
.t-djeca-i-mladi { --pat: var(--pat-zigzag); }
.t-starije-osobe { --pat: var(--pat-stripes); }
.t-osobe-s-invaliditetom { --pat: var(--pat-checks); }
.t-okolis { --pat: var(--pat-waves); }
.t-zivotinje { --pat: var(--pat-paws); }
.t-obrazovanje { --pat: var(--pat-grid); }
.t-zdravlje { --pat: var(--pat-plus); }
.t-kultura { --pat: var(--pat-rings); }
.t-sport { --pat: var(--pat-chevrons); }
.t-dogadjaji { --pat: var(--pat-confetti); }
.t-ostalo { --pat: var(--pat-specks); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.tiles > li {
  display: flex;
  min-width: 0;
  max-width: none;
}

.tiles > li.is-wide {
  grid-column: 1 / -1;
}

.card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-panel);
  color: var(--color-ink);
  text-decoration: none;
  transition: transform var(--motion-press) var(--ease-out);
}

a.card:active {
  transform: scale(0.98);
}

.card-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100px;
  overflow: hidden;
  padding: var(--space-3) var(--space-3) 28px;
  background: var(--org, var(--color-brand));
  color: var(--color-on-org);
}

/* The topic's pattern fades out before the time and the place, so the white text always
   stands on the plain colour (4.5:1 or more; a pattern line under small text would not). */
.card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pat, none);
  mask-image: linear-gradient(#000 30%, transparent 70%);
  pointer-events: none;
}

.card.is-full .card-art {
  background: var(--color-full-card);
}

.card-topic-icon {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 40px;
  stroke-width: 1.7;
  opacity: 0.55;
}

.card-time {
  position: relative;
  font: 700 1.875rem/1 var(--font-heading);
  font-variant-numeric: lining-nums tabular-nums;
}

.card-where {
  position: relative;
  margin-top: 3px;
  overflow: hidden;
  font-size: var(--size-small);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-label {
  position: absolute;
  top: var(--space-3);
  left: var(--space-4);
  z-index: 1;
  padding: 2px 10px;
  border-radius: var(--radius-round);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--size-small);
  font-weight: 700;
}

.card-orgrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  margin-top: -24px;
  padding: 0 var(--space-3);
}

.logo-edge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-round);
  outline: 0;
  box-shadow: var(--shadow-logo);
  font-size: 0.9375rem;
}

img.logo-edge {
  outline: 0;
  object-fit: contain;
  padding: 5px;
}

.card-org {
  overflow: hidden;
  color: var(--color-ink);
  font-size: var(--size-small);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* "Ti ideš": a round yellow sticker in the row of the logo, inside the card. */
.sticker {
  flex: none;
  display: grid;
  place-content: center;
  justify-items: center;
  width: 54px;
  height: 54px;
  margin-left: auto;
  border-radius: var(--radius-round);
  background: var(--color-accent);
  box-shadow: var(--shadow-logo);
  color: var(--color-on-accent);
  font-size: var(--size-small);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  transform: rotate(-10deg);
}

.sticker .icon {
  width: 18px;
  height: 18px;
  stroke-width: 3;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.card-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.card .topic {
  border-radius: var(--radius-round);
}

.card .topic.is-main {
  border-color: transparent;
  background: color-mix(in srgb, var(--org, var(--color-brand)) 14%, var(--color-surface));
}

.card .topic .icon {
  color: var(--org, var(--color-brand));
}

.card.is-full .topic.is-main {
  background: var(--color-paper);
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  font: 800 var(--size-body) / 1.25 var(--font-text);
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-foot {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.card .need {
  font-size: 0.875rem;
  font-weight: 800;
}

.card-spots {
  display: flex;
  gap: 3px;
}

.card-spots i {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--color-line);
  transition: background-color var(--motion-state) var(--ease-out);
}

.card-spots i.on {
  background: var(--org, var(--color-brand));
}

.card.is-full .card-spots i.on {
  background: var(--color-field);
}

.card-bar {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--color-line);
  appearance: none;
}

.card-bar::-webkit-progress-bar {
  border-radius: 3px;
  background: var(--color-line);
}

.card-bar::-webkit-progress-value {
  border-radius: 3px;
  background: var(--org, var(--color-brand));
}

.card-bar::-moz-progress-bar {
  border-radius: 3px;
  background: var(--org, var(--color-brand));
}

.card.is-mine {
  box-shadow: 0 0 0 3px var(--color-brand);
}

/* The keyboard ring stands apart from the red frame of "Ti ideš". */
.card:focus-visible {
  outline-offset: 5px;
}

/* The big card that opens a day. */
.card-big .card-art {
  min-height: 168px;
  padding: var(--space-4) var(--space-4) 34px;
}

.card-big .card-topic-icon {
  top: 18px;
  right: 18px;
  width: 84px;
  height: 84px;
}

.card-big .card-time {
  font-size: 3.25rem;
}

.card-big .card-where {
  font-size: 0.9375rem;
}

.card-big .card-orgrow {
  gap: var(--space-3);
  padding: 0 var(--space-4);
}

.card-big .logo-edge {
  width: 68px;
  height: 68px;
  font-size: 1.25rem;
}

.card-big .card-org {
  display: -webkit-box;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  line-height: 1.25;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-big .sticker {
  width: 60px;
  height: 60px;
}

.card-big .card-body {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.card-big .card-title {
  font: 700 var(--size-h3) / 1.18 var(--font-heading);
}

.card-big .card-foot {
  grid-template-columns: 1fr auto;
}

.card-big .card-spots,
.card-big .card-bar {
  grid-column: 1 / -1;
}

/* Old pieces some pages still use. */
.topic {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 6px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--size-small);
  font-weight: 600;
  white-space: nowrap;
}

.topic .icon {
  width: 16px;
  height: 16px;
  color: var(--color-brand);
}

.need {
  color: var(--color-ink);
  font-weight: 600;
}

.need.is-few {
  color: var(--color-brand);
}

.need.is-full {
  color: var(--color-muted);
  font-weight: 400;
}

/* Organizer variant: the count instead of the logo. */
.count-big {
  font: 700 1.75rem/1 var(--font-heading);
  font-variant-numeric: lining-nums tabular-nums;
  text-align: right;
}

.count-big small {
  display: block;
  font: 600 var(--size-small) / 1.3 var(--font-text);
}

.count-big.low,
.state.low {
  color: var(--color-brand);
}

.state {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.state.low {
  font-weight: 600;
}

/* --- Action page ---------------------------------------------------------------- */

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-4)) 0;
  padding: var(--space-5) var(--space-4);
  background: color-mix(in srgb, var(--org, var(--color-brand)) 16%, var(--color-surface));
}

.hero-time {
  font: 700 3rem/1 var(--font-heading);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.02em;
}

.hero-time small {
  display: block;
  margin-top: 6px;
  font: 600 var(--size-body) / 1.3 var(--font-text);
  letter-spacing: 0;
}

.title-block {
  display: grid;
  gap: var(--space-3);
}

.title-block h1 {
  font-size: 1.875rem;
}

.byline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-ink);
  text-decoration: none;
}

.byline > span:last-child {
  display: grid;
  line-height: 1.3;
}

.byline b {
  font-weight: 600;
}

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.facts li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: var(--space-3);
  max-width: none;
  padding: var(--space-3) var(--space-4);
}

.facts li + li {
  border-top: var(--border);
}

.facts .icon {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--color-brand);
}

.facts b {
  display: block;
  font-weight: 600;
}

.facts span {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.facts a {
  font-size: 0.9375rem;
  font-weight: 600;
}

.prose {
  display: grid;
  gap: var(--space-3);
}

.prose h2 {
  font-size: var(--size-h3);
}

.prose ul {
  margin: 0;
  padding-left: 1.2em;
}

/* "Mjesto je tvoje" and "Akcija je objavljena": the one moment of joy. */
.done {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-surface);
  border: var(--border);
}

.done-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-round);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.done-check svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.done-check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: draw var(--motion-joy) var(--ease-out) 150ms forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.done h2 {
  font-size: 2.25rem;
}

.done p {
  font-size: var(--size-lead);
  line-height: 1.45;
}

.contact {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.contact-who {
  display: grid;
  line-height: 1.3;
}

.contact-who b {
  font-weight: 600;
}

.contact-who span {
  color: var(--color-muted);
  font-size: var(--size-small);
}

.contact-buttons,
/* Call, Viber, WhatsApp (and Email): icon above a short word, so nothing is squeezed on a
   narrow phone (owner, 2026-11-26). */
.call-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.call-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.call-row .button.call {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 60px;
  padding: var(--space-2) var(--space-1);
  font-size: 0.875rem;
  line-height: 1.1;
  white-space: nowrap;
}

.call-row .button.call .icon {
  width: 22px;
  height: 22px;
  margin: 0;
}

.call-viber .icon {
  color: var(--color-viber);
}

.call-whatsapp .icon {
  color: var(--color-whatsapp);
}

/* Time clash: a bottom sheet (a dialog shown by the server after the first "Javi se"). */
.sheet {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  border: 2px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-raised);
}

.clash {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.clash b {
  font: 700 var(--size-lead) / 1.2 var(--font-heading);
  font-variant-numeric: lining-nums tabular-nums;
}

.clash small {
  grid-column: 2;
  color: var(--color-muted);
  font-size: var(--size-small);
}

/* --- Lists: past spots, menus, people ------------------------------------------- */

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.rows > li {
  max-width: none;
  padding: var(--space-3) var(--space-4);
}

.rows > li + li {
  border-top: var(--border);
}

.past li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--space-3);
}

.past-date {
  font: 700 var(--size-lead) / 1.1 var(--font-heading);
  font-variant-numeric: lining-nums tabular-nums;
}

.past-date small {
  display: block;
  color: var(--color-muted);
  font: 400 var(--size-small) / 1.3 var(--font-text);
}

.past-what {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.past-what b {
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.status .icon {
  width: 16px;
  height: 16px;
}

.status.ok .icon {
  color: var(--color-brand);
  stroke-width: 3;
}

.status.no,
.status.wait {
  color: var(--color-muted);
  font-weight: 400;
}

.menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.menu-list li {
  max-width: none;
}

.menu-list li + li {
  border-top: var(--border);
}

.menu-list a,
.menu-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-4);
  border: 0;
  background: none;
  color: var(--color-ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-list a > span,
.menu-list button > span {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.menu-list .lead-icon {
  width: 22px;
  height: 22px;
  color: var(--color-brand);
}

.menu-list .chev {
  width: 18px;
  height: 18px;
  color: var(--color-muted);
}

.menu-list .quiet,
.menu-list .quiet .lead-icon {
  color: var(--color-muted);
}

.menu-list form {
  margin: 0;
}

/* --- Profile ------------------------------------------------------------------- */

.avatar {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-round);
  background: var(--color-brand-soft);
  color: var(--color-brand);
  font: 700 1.5rem/1 var(--font-heading);
}

.avatar-sm {
  width: 44px;
  height: 44px;
  font-size: 0.9375rem;
}

.p-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.p-head .sub {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.contact-rows li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-2) var(--space-4);
}

.contact-rows .icon {
  color: var(--color-brand);
}

.contact-rows li > div {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.contact-rows small {
  color: var(--color-muted);
  font-size: var(--size-small);
}

.contact-rows b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.totals > div {
  display: grid;
  gap: 2px;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
}

.totals > div + div {
  border-left: var(--border);
}

.totals dd,
.totals b {
  margin: 0;
  font: 700 2rem/1 var(--font-heading);
  font-variant-numeric: lining-nums tabular-nums;
}

.totals dt,
.totals span {
  color: var(--color-muted);
  font-size: var(--size-small);
}

.totals dt {
  order: 2;
}

.since {
  color: var(--color-muted);
  font-size: var(--size-small);
}

.milestone {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-brand-soft);
}

.milestone .badge-round {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  background: var(--color-brand);
  color: var(--color-on-brand);
  font: 700 1rem/1 var(--font-heading);
  font-variant-numeric: lining-nums;
}

.milestone b {
  display: block;
  font-weight: 600;
}

.milestone span {
  font-size: 0.9375rem;
}

.thanks-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.thank {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.thank blockquote,
.thank p {
  margin: 0;
  font-size: var(--size-lead);
  line-height: 1.45;
}

.thank figcaption,
.thank footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-muted);
  font-size: var(--size-small);
}

.privacy-note {
  color: var(--color-muted);
  font-size: var(--size-small);
}

/* --- Organizer ----------------------------------------------------------------- */

.org-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.org-head h1 {
  font-size: 1.75rem;
}

.act-head {
  display: grid;
  gap: var(--space-1);
}

.act-head h1 {
  font-size: 1.625rem;
}

.act-head p {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* "Ko dolazi": the big number. */
.count-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: var(--space-3);
  row-gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.count-num {
  font: 700 4rem/0.9 var(--font-heading);
  font-variant-numeric: lining-nums tabular-nums;
}

.count-words {
  display: grid;
  padding-bottom: 4px;
  line-height: 1.15;
}

.count-words b {
  font: 700 1.5rem/1.1 var(--font-heading);
}

.count-bar {
  grid-column: 1 / -1;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: var(--radius-round);
  background: color-mix(in srgb, var(--color-on-brand) 25%, transparent);
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
}

.count-bar::-webkit-progress-bar {
  background: color-mix(in srgb, var(--color-on-brand) 25%, transparent);
}

.count-bar::-webkit-progress-value {
  border-radius: var(--radius-round);
  background: var(--color-accent);
}

.count-bar::-moz-progress-bar {
  border-radius: var(--radius-round);
  background: var(--color-accent);
}

.count-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-weight: 600;
}

.person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.person > span:last-child {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.person a {
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
}

.person small {
  color: var(--color-muted);
  font-size: var(--size-small);
}

.person .first {
  color: var(--color-brand);
  font-weight: 600;
}

/* Each volunteer is a card of their own, with a tinted head (owner, 2026-11-26). */
.rows.people-list {
  display: grid;
  gap: var(--space-3);
  border: 0;
  background: none;
}

.people-list > li {
  display: grid;
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-4);
  border: var(--border);
  border-left: 4px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.people-list > li + li {
  border-top: var(--border);
}

.people-list .person {
  margin: 0 calc(-1 * var(--space-4));
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border);
  background: var(--color-paper);
}

.person small .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

/* "Označi sve odjednom": another colour than the volunteers' cards. */
.optional.bulk {
  border: 2px solid var(--color-accent-line);
  background: var(--color-accent-soft);
}

.optional.bulk[open] > summary {
  border-bottom-color: var(--color-accent-line);
}

.optional.bulk .lead-icon {
  color: var(--color-ink);
}

.vol-note {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--color-paper);
  font-size: 0.9375rem;
}

.att-line {
  display: grid;
  grid-template-columns: 1fr 9.5rem;
  align-items: end;
  gap: var(--space-2);
}

.att-line input[type="number"] {
  text-align: center;
}

/* --- Auth ---------------------------------------------------------------------- */

.auth {
  display: grid;
  gap: var(--space-4);
}

.ctx {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--org, var(--color-brand)) 16%, var(--color-surface));
}

.ctx .logo {
  grid-row: span 2;
}

.ctx b {
  font-weight: 600;
}

.or {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-muted);
  font-size: var(--size-small);
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-line);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }

  .done-check path {
    stroke-dashoffset: 0;
  }
}

.gmark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-field);
  border-radius: var(--radius-round);
  font: 700 0.8125rem/1 var(--font-text);
}

/* Pages without their own layout (settings, organization pages, admin): even spacing
   between the blocks of the page, a bigger gap before each section heading. */
.container > * + * {
  margin-top: var(--space-4);
}

.container > h2,
.container > section > h2 {
  margin-top: var(--space-6);
}

.container > section > * + * {
  margin-top: var(--space-3);
}

/* --- Owner's round of 2026-11-26 ------------------------------------------------ */

.totals .icon {
  width: 18px;
  height: 18px;
  margin-bottom: 2px;
  color: var(--color-brand);
}

/* "Pouzdanost" on a volunteer's profile, for organizers: a card that stands out. */
.reliability {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 2px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-brand-soft);
}

.reliability h2 {
  font-size: var(--size-lead);
}

.reliability p {
  margin: 0;
}

.reliability-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.reliability-score {
  font: 700 2.25rem/1 var(--font-heading);
  color: var(--color-brand);
  font-variant-numeric: lining-nums tabular-nums;
}

.reliability-score small {
  font-size: 1.125rem;
}

.reliability.low {
  border-color: var(--color-error);
  background: var(--color-error-soft);
}

.reliability.low .reliability-icon {
  background: var(--color-error);
}

.reliability.low .reliability-score {
  color: var(--color-error);
}

/* Tap your own picture: a small menu (Pregledaj / Promijeni profilnu). */
.avatar-menu {
  position: relative;
  flex: none;
}

.avatar-menu {
  display: block;
  border-radius: var(--radius-round);
  color: inherit;
}

.avatar-menu:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-surface);
  border-radius: var(--radius-round);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.avatar-edit .icon {
  width: 15px;
  height: 15px;
}

.popover {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 14rem;
  margin: 0;
  padding: var(--space-1) 0;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-raised);
  box-shadow: 0 8px 24px rgb(28 20 20 / 0.16);
  list-style: none;
}

.popover a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap-target);
  padding: 0 var(--space-4);
  color: var(--color-ink);
  text-decoration: none;
}

.popover a:hover {
  background: var(--color-paper);
}

.popover .icon {
  color: var(--color-brand);
}

.avatar-large {
  width: min(100%, 20rem);
  height: auto;
  aspect-ratio: 1;
  font-size: 5rem;
}

.locked-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin: 0;
  padding: 0 var(--space-3);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-paper);
  color: var(--color-muted);
  overflow-wrap: anywhere;
}

input[type="file"] {
  width: 100%;
  min-height: var(--tap-target);
  padding: var(--space-2);
  border: 1px dashed var(--color-field);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font: 400 var(--size-body) / 1.4 var(--font-text);
}

input[type="file"]::file-selector-button {
  min-height: 36px;
  margin-right: var(--space-3);
  padding: 0 var(--space-3);
  border: var(--border-field);
  border-radius: var(--radius);
  background: var(--color-paper);
  color: var(--color-ink);
  font: 600 0.9375rem / 1 var(--font-text);
}

.picture-view {
  display: grid;
  place-items: center;
}

.org-about .group-head a,
.owner-edit a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9375rem;
}

.org-about .optional + .optional {
  margin-top: var(--space-2);
}

.owner-edit {
  margin-top: var(--space-3);
}

.optional > summary > span {
  display: inline-flex;
  align-items: center;
}

/* "Moje teme": three columns of toggles, icon above the word, a check when on. */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.topic-grid label {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--space-2);
  min-height: 96px;
  padding: var(--space-3) var(--space-2);
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.topic-grid label .icon {
  width: 26px;
  height: 26px;
}

/* A chosen topic: a thicker red frame, a soft red background and red words (owner,
   2026-11-28: no check mark in the corner). */
.topic-grid input:checked + label {
  color: var(--color-brand);
}

/* "Izgled": three cards, the choice previewed on the page at once. */
.theme-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.theme-choices input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-choices label {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-2);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
  text-align: center;
  cursor: pointer;
}

.theme-choices label .icon {
  width: 28px;
  height: 28px;
  margin-bottom: var(--space-1);
  color: var(--color-brand);
}

.theme-choices small {
  color: var(--color-muted);
  font-size: var(--size-small);
  line-height: 1.3;
}

.theme-choices input:checked + label {
  border: 2px solid var(--color-brand);
  background: var(--color-brand-soft);
}

.theme-choices input:focus-visible + label {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* "Obavijesti": the device and Telegram cards stand out; the switches below. */
.channel-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 2px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-brand-soft);
}

.channel-telegram {
  border-color: var(--color-telegram);
  background: var(--color-surface);
}

.channel-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.channel-head h2 {
  font-size: var(--size-lead);
}

.channel-head p {
  margin: 2px 0 0;
  color: var(--color-muted);
}

.channel-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.channel-telegram .channel-mark {
  background: none;
  color: var(--color-telegram);
}

.channel-telegram .channel-mark .icon {
  width: 44px;
  height: 44px;
}

.button-telegram {
  border-color: var(--color-telegram-strong);
  background: var(--color-telegram-strong);
  color: var(--color-on-org);
}

.button-telegram .icon {
  color: var(--color-on-org);
}

.button-telegram:hover {
  filter: brightness(1.08);
}

.brand-telegram {
  color: var(--color-telegram);
}

.hint-details > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-target);
  color: var(--color-muted);
  cursor: pointer;
}

.device-rows li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
}

.device-rows form {
  margin-left: auto;
}

.switch-rows {
  margin: 0;
}

.switch-rows > li {
  position: relative;
  padding: 0;
}

.switch-rows > li + li {
  border-top: var(--border);
}

.switch-rows input {
  position: absolute;
  top: 50%;
  right: var(--space-4);
  width: 24px;
  height: 24px;
  margin: 0;
  transform: translateY(-50%);
  accent-color: var(--color-brand);
}

.switch-rows label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 60px;
  padding: var(--space-2) calc(var(--space-4) + 36px) var(--space-2) var(--space-4);
  font-weight: 600;
  cursor: pointer;
}

.switch-rows label small {
  display: block;
  color: var(--color-muted);
  font-size: var(--size-small);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.switch-rows .lead-icon {
  color: var(--color-brand);
}

.switch-rows .brand-telegram,
.switch-rows .brand-telegram .icon {
  color: var(--color-telegram);
}

/* Admin pages: room between the parts (owner, 2026-11-26). */
.admin-main > * + * {
  margin-top: var(--space-4);
}

.admin-main > h2,
.admin-main > section + section,
.admin-main > form + h2 {
  margin-top: var(--space-6);
}

.admin-main > h1 + p,
.admin-main > p + p {
  margin-top: var(--space-2);
}

.admin-main .form {
  display: grid;
  gap: var(--space-4);
}

.admin-main .details {
  display: grid;
  gap: var(--space-1) var(--space-4);
}

.admin-main .actions,
.admin-main .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.admin-nav a {
  gap: var(--space-2);
}

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-round);
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-size: var(--size-small);
  font-weight: 700;
  line-height: 1;
}

.admin-box {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.admin-box.restore {
  border: 2px solid var(--color-brand);
  background: var(--color-brand-soft);
}

.steps {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-left: var(--space-5);
}

.notice ul {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding-left: var(--space-5);
}

.notice h2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-lead);
}

/* Icons in "Sve akcije i grafikoni" (owner, 2026-11-26). */
.stat-icon {
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: var(--space-1);
  color: var(--color-brand);
}

.with-icon {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.with-icon .icon {
  color: var(--color-brand);
}

.offer-org .icon,
.offer-facts .icon {
  width: 15px;
  height: 15px;
  margin-right: 4px;
  vertical-align: -2px;
  color: var(--color-muted);
}

/* Charts chosen by the owner (2026-11-27): a line through the year, topic bars with icons,
   a ring for organizations. */
.chart-wide {
  max-width: 40rem;
}

.chart-small {
  font-size: 20px;
}

.chart-grid {
  stroke: var(--color-line);
  stroke-width: 1;
  stroke-dasharray: 4 6;
}

.chart-area {
  fill: color-mix(in srgb, var(--color-brand) 16%, transparent);
}

.chart-line {
  fill: none;
  stroke: var(--color-brand);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-dot {
  fill: var(--color-surface);
  stroke: var(--color-brand);
  stroke-width: 3;
}

.chart-peak {
  fill: var(--color-accent);
  stroke: var(--color-ink);
  stroke-width: 2;
}

.chart-icon {
  fill: none;
  stroke: var(--color-brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-name {
  fill: var(--color-ink);
}

.chart-track {
  fill: var(--color-line);
}

.donut {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
}

.donut-svg {
  width: 8rem;
  height: 8rem;
}

.donut-ground {
  stroke: var(--color-line);
}

/* Its size is in the ring's own units (font-size="8" of 42, about 24px on screen). */
.donut-total {
  fill: var(--color-ink);
  font-family: var(--font-heading);
  font-weight: 700;
}

.donut-legend {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.donut-legend li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9375rem;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.slice-0 { stroke: var(--color-brand); background: var(--color-brand); }
.slice-1 { stroke: var(--color-accent); background: var(--color-accent); }
.slice-2 { stroke: var(--color-ink); background: var(--color-ink); }
.slice-3 { stroke: var(--color-field); background: var(--color-field); }
.slice-4 { stroke: var(--color-muted); background: var(--color-muted); }

.donut figcaption {
  grid-column: 1 / -1;
}

/* "Prekretnice": shelves of round badges. */
.shelf-row {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.shelf-row h2 {
  font-size: var(--size-lead);
}

.shelf-value {
  margin-left: auto;
  color: var(--color-brand);
  font-variant-numeric: lining-nums tabular-nums;
}

.shelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.medal {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  text-align: center;
}

.medal-face {
  display: grid;
  place-items: center;
  width: min(100%, 56px);
  aspect-ratio: 1;
  border-radius: var(--radius-round);
  background: var(--color-brand);
  box-shadow: inset 0 0 0 4px var(--color-surface), 0 0 0 2px var(--color-brand);
  color: var(--color-on-brand);
  font: 700 1.125rem/1 var(--font-heading);
}

.medal-text {
  font-size: var(--size-small);
  line-height: 1.3;
}

.medal-check {
  width: 14px;
  height: 14px;
  margin-right: 2px;
  vertical-align: -2px;
  color: var(--color-brand);
}

.medal.is-next .medal-face {
  background: var(--color-surface);
  box-shadow: inset 0 0 0 4px var(--color-surface), 0 0 0 2px var(--color-brand);
  border: 2px dashed var(--color-brand);
  color: var(--color-brand);
}

.medal.is-next .medal-text {
  color: var(--color-brand);
  font-weight: 600;
}

.medal.is-later .medal-face {
  background: var(--color-paper);
  box-shadow: inset 0 0 0 4px var(--color-surface), 0 0 0 2px var(--color-line);
  color: var(--color-muted);
}

/* P4 on the profile: the next step as dots. */
.next-step {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  text-decoration: none;
}

.next-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.next-step-head .icon {
  color: var(--color-brand);
}

.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dots .dot {
  width: 16px;
  height: 16px;
  border: 2px dashed var(--color-brand);
  border-radius: var(--radius-round);
}

.dots .dot.on {
  border-style: solid;
  background: var(--color-brand);
}

.small-text {
  font-size: var(--size-small);
}

/* The action page (C2): when and where in one card that stands out, then the need. */
.key-facts {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 2px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-brand-soft);
}

.key-facts li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  max-width: none;
  padding: var(--space-4);
}

.key-facts li + li {
  border-top: 1px solid color-mix(in srgb, var(--color-brand) 30%, transparent);
}

.key-facts > li > .icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: var(--radius-round);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.key-facts div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.key-facts small {
  color: var(--color-brand);
  font-size: var(--size-small);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.key-facts b {
  font: 700 1.25rem/1.25 var(--font-heading);
  overflow-wrap: anywhere;
}

.key-facts span {
  color: var(--color-muted);
}

.key-facts .go {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: var(--tap-target);
  font-weight: 700;
}

.key-facts .go .icon {
  width: 16px;
  height: 16px;
  color: var(--color-brand);
}

.need-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.need-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font: 700 1.375rem/1.2 var(--font-heading);
}

.need-line .icon {
  color: var(--color-brand);
}

.need-bar {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: var(--radius-round);
  background: var(--color-line);
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
}

.need-bar::-webkit-progress-bar {
  background: var(--color-line);
}

.need-bar::-webkit-progress-value {
  border-radius: var(--radius-round);
  background: var(--color-brand);
}

.need-bar::-moz-progress-bar {
  border-radius: var(--radius-round);
  background: var(--color-brand);
}

.need-card .muted {
  font-size: 0.9375rem;
}

.topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

.prose .facts {
  margin-top: var(--space-4);
}

/* "Gdje" with Google Maps (owner, 2026-11-27). */
.place-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.place-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.map-field,
.map-panel {
  display: grid;
  gap: var(--space-2);
}

.map-box {
  width: 100%;
  height: 280px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-paper);
}

.map-open .icon {
  color: var(--color-brand);
}

/* Leaflet gives its layers z-index 400 to 1000; `isolation` keeps them inside the map
   box, so the sticky app bar (z-index 20) stays on top while scrolling. */
.mini-map,
.map-box {
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.mini-map {
  display: block;
  width: 100%;
  height: 180px;
  margin-top: var(--space-2);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-paper);
}

/* OpenStreetMap search on the form: Nominatim searches on "Traži" only (no search while
   typing), so the button sits next to the box. */
.map-search {
  display: flex;
  gap: var(--space-2);
}

.map-search input {
  flex: 1;
  min-width: 0;
}

.map-results {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-result {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Our pin on the map: a red drop with a white edge, no image files. */
.map-pin {
  border: 3px solid var(--color-on-brand);
  border-radius: 50% 50% 50% 0;
  background: var(--color-brand);
  box-shadow: var(--shadow-lift);
  transform: rotate(-45deg);
}

.mini-map .leaflet-control-attribution,
.map-box .leaflet-control-attribution {
  font-size: 0.8125rem;
}

/* --- M16: the red top, panels on the wallpaper ------------------------------------
   Every top-level screen opens with the red top (its title; on Akcije the days under it on
   a white strip). Content sits on the wallpaper; blocks that hold text are white panels. */

.top {
  position: relative;
  overflow: hidden;
  background: var(--color-top);
  color: var(--color-on-top);
}

.top-inner {
  position: relative;
  z-index: 1;
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: var(--space-3) max(var(--space-4), env(safe-area-inset-right, 0px)) var(--space-5)
    max(var(--space-4), env(safe-area-inset-left, 0px));
}

.top h1 {
  font-size: 2.25rem;
  letter-spacing: -0.015em;
}

/* One word of the title in the logo's yellow ("danas?"): large text, 3:1 on the red. */
.top h1 em {
  color: var(--color-top-accent);
  font-style: normal;
}

.top p {
  max-width: 32ch;
  margin-top: var(--space-1);
}

/* Text links in the top's own lines (not the picture's menu, which is a white popover). */
.top-inner > p a,
.top-inner > h1 a {
  color: var(--color-on-top);
}

.top .popover :focus-visible {
  outline-color: var(--color-brand);
}

.top .avatar-menu:focus-visible {
  outline-color: var(--color-on-top);
}

/* The logo's hand, big and faint, in the corner of the top. */
.top-hand::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -36px;
  width: 170px;
  height: 170px;
  background: url("../icons/hand-white.svg") center / contain no-repeat;
  opacity: 0.14;
  transform: rotate(-12deg);
  pointer-events: none;
}

/* Your next spot, as a white card on the red. */
.top .next {
  margin-top: var(--space-3);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  box-shadow: var(--shadow-lift);
}

.daystrip {
  background: var(--color-surface);
  border-bottom: var(--border);
}

.daystrip .days {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
}

/* "Ja": the picture and the name on the red; the menu of the picture may hang below it. */
.top-profile {
  overflow: visible;
}

.top-profile .p-head h1 {
  font-size: 1.75rem;
}

.top-profile .sub {
  color: inherit;
}

.top-profile .avatar {
  box-shadow: var(--shadow-on-top);
}

/* An organization's top: its colour with a soft pattern, the logo on the edge. */
.org-hero {
  background: var(--color-surface);
  border-bottom: var(--border);
}

.org-hero-art {
  height: 96px;
  background: var(--pat-dots), var(--org, var(--color-brand));
}

.org-hero-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: var(--reading-width);
  margin: -36px auto 0;
  padding: 0 var(--space-4) var(--space-4);
}

.org-hero-row .logo-edge {
  width: 80px;
  height: 80px;
  font-size: 1.5rem;
}

/* The name starts under the colour, beside the part of the logo that hangs below it. */
.org-hero-row > div {
  min-width: 0;
  padding-top: 44px;
}

.org-hero h1 {
  font-size: var(--size-h3);
}

.org-hero p {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* The action page: its card, big, as the top. */
.action-hero {
  background: var(--color-surface);
  border-bottom: var(--border);
}

.action-art {
  min-height: 180px;
  padding: var(--space-5) max(var(--space-4), calc((100% - var(--reading-width)) / 2 + var(--space-4))) 44px;
}

.action-art .card-topic-icon {
  top: 20px;
  right: max(20px, calc((100% - var(--reading-width)) / 2 + 20px));
  width: 104px;
  height: 104px;
}

.action-art .card-time {
  font-size: 3.5rem;
}

.action-art .card-where {
  font-size: var(--size-body);
  white-space: normal;
}

.action-org {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  max-width: var(--reading-width);
  margin: -32px auto 0;
  padding: 0 var(--space-4) var(--space-4);
  color: var(--color-ink);
  text-decoration: none;
}

.action-org .logo-edge {
  width: 76px;
  height: 76px;
  font-size: 1.375rem;
}

.action-org > span {
  display: grid;
  padding-bottom: 4px;
  line-height: 1.3;
}

.action-org .verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-muted);
  font-size: var(--size-small);
}

/* White panels on the wallpaper. */
.panel {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-panel);
}

.rows,
.optional,
.need-card,
.contact,
.done,
.totals,
.empty,
.alert,
.sheet {
  border-radius: var(--radius-card);
}

.rows,
.optional,
.need-card,
.contact,
.done,
.totals {
  border: 0;
  box-shadow: var(--shadow-panel);
}

.key-facts {
  border-radius: var(--radius-card);
}

.prose {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-panel);
}

.next-panel {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.next-place {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-2);
}

.next-place .icon {
  color: var(--color-brand);
}

.next-place span {
  display: grid;
}

.next-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* The organizer's card: the count on the colour, the buttons under the title. */
.card-manage .card-art {
  min-height: 140px;
  padding-bottom: var(--space-4);
  text-decoration: none;
}

.card-manage .card-title {
  color: var(--color-ink);
  text-decoration: none;
}

.card-label.is-low {
  color: var(--color-brand);
}

/* Sign in and sign up: the form on one white panel. */
.auth.panel {
  padding: var(--space-5) var(--space-4);
}

.button-google {
  border-color: var(--color-field);
  font-weight: 700;
}

.button-google img {
  width: 20px;
  height: 20px;
}

/* No connection: the hand, grey, and one way out. */
.offline {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  text-align: center;
}

.offline-hand {
  filter: grayscale(1);
  opacity: 0.6;
}

/* Topics on "Nova akcija": five to a row, the last row centred (owner, 2026-11-28). The
   first chosen topic is the main one: filled. Any other chosen topic: only framed.
   ("Moje teme" has its own three-column grid, .topic-grid.) */
.offer-topics {
  justify-content: center;
}

.offer-topics label {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: calc((100% - 4 * var(--space-2)) / 5);
  min-height: 76px;
  padding: var(--space-2) 4px;
  border-radius: var(--radius-control);
  font-size: var(--size-small);
  line-height: 1.15;
  text-align: center;
  hyphens: manual;
}

.offer-topics label .icon {
  width: 24px;
  height: 24px;
}

.offer-topics input:checked + label {
  border: 2px solid var(--color-brand);
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.offer-topics input:checked ~ input:checked + label {
  background: var(--color-surface);
}

/* --- M16: motion ---------------------------------------------------------------------
   Motion only says something: what happened, where a thing came from, that a page is
   coming. The big moments are a spot taken and a milestone. Everything here is off with
   "smanji pokret" (prefers-reduced-motion): the durations come from tokens that turn 0. */

/* One page into the next as a whole (owner, 2026-11-28: no parts moving on their own): the
   old page stays as it is and the new one comes over it in one short fade, so nothing white
   shows through between them (a cross-fade of both would show the page's background, a
   white flash at the top of the phone). Browsers without view transitions open the page. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: none;
}

::view-transition-new(root) {
  animation: page-in var(--motion-page) var(--ease-out) both;
}

@keyframes page-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* "Mjesto je tvoje": a yellow disc pops and the check draws itself (owner, 2026-11-28: no
   ring of rays any more). */
.done-mark {
  justify-self: center;
  width: 128px;
  height: 128px;
  margin: -12px 0 -18px;
}

.done-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.done-mark circle {
  fill: var(--color-accent);
  transform-origin: 46px 46px;
  animation: pop var(--motion-joy) var(--ease-back) both;
}

.done-mark .tick {
  fill: none;
  stroke: var(--color-on-accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 0;
  animation: draw var(--motion-joy) calc(var(--motion-joy) * 0.6) var(--ease-out) both;
}

.done h2 {
  animation: rise var(--motion-joy) calc(var(--motion-joy) * 1.2) var(--ease-out) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 60;
  }
}

.sheet[role="alertdialog"] {
  animation: rise var(--motion-state) var(--ease-out) both;
}

.offline.is-retrying .offline-hand {
  animation: wave var(--motion-loop) ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .splash-disc img,
  .wave-hand,
  .pageload.is-on,
  .offline.is-retrying .offline-hand {
    animation: none;
  }

  .pageload.is-on {
    width: 60%;
  }
}

/* A milestone seen for the first time turns over once (app.js marks it). */
.medal.is-new .medal-face {
  animation: flip var(--motion-celebrate) var(--ease-back) both;
}

@keyframes flip {
  from {
    opacity: 0;
    transform: perspective(400px) rotateY(180deg) scale(0.6);
  }
}

/* "Za mene", "Uredi teme", "Organizacije" on Akcije: three equal tiles (owner, 2026-11-28). */
.mine-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.mine-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 64px;
  padding: var(--space-2) var(--space-1);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.mine-tile .icon {
  width: 22px;
  height: 22px;
  color: var(--color-brand);
}

.mine-tile.is-on {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.mine-tile.is-on .icon {
  color: inherit;
}

/* Call, Viber, WhatsApp: the icon above the word, so nothing spills out of a narrow button
   (owner, 2026-11-28). */
.contact-buttons .button.call {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 60px;
  padding: var(--space-2) var(--space-1);
  font-size: 0.875rem;
  line-height: 1.1;
  white-space: nowrap;
}

.contact-buttons .button.call .icon {
  width: 22px;
  height: 22px;
}

/* "Profilna slika": the choice of a file centred under the picture (owner, 2026-11-28). */
.picture-form {
  justify-items: center;
  text-align: center;
}

.picture-form .field {
  justify-items: center;
  width: 100%;
  min-width: 0;
}

.picture-form label {
  justify-content: center;
}

.picture-form input[type="file"] {
  width: 100%;
  border-radius: var(--radius-control);
}

.picture-form .button {
  width: 100%;
}

/* The team on an organization's profile: the name, the role under it. */
.team-rows li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.team-rows li + li {
  border-top: var(--border);
}

.team-rows .icon {
  color: var(--color-brand);
}

.team-rows div {
  display: grid;
  line-height: 1.3;
}

.team-rows small {
  color: var(--color-muted);
  font-size: var(--size-small);
}

