/* The citizen app: one phone-width column, large tap targets, works from 320 px */
body.citizen { background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
.app-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.app-title { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; flex: 1; }
.app-title strong { display: block; font-size: 0.98rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-title small { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.app-title > span:last-child { min-width: 0; }
.app-head .lang-btn { min-width: 40px; padding: 4px 6px; }
.app-main { width: 100%; max-width: 480px; margin: 0 auto; padding: 22px 16px 24px; flex: 1; outline: none; }
.app-main .h1 { font-size: 1.55rem; margin-bottom: 8px; }
.app-main .lede { color: var(--ink-2); margin: 0 0 20px; }
.app-main .lede.sm { font-size: 0.95rem; }
.app-main h1:focus { outline: none; }
.app-foot { max-width: 480px; margin: 0 auto; width: 100%; border-top: 1px solid var(--line); }

/* language pick */
.lang-pick { text-align: center; padding-top: 12px; }
.lang-pick .app-glyph { margin: 0 auto 18px; }
.h1.tri { display: grid; gap: 2px; font-size: 1.25rem; margin-bottom: 22px; }
.h1.tri span:first-child { font-size: 1.55rem; }
.h1.tri span:not(:first-child) { color: var(--muted); font-weight: 600; }
.lang-list { display: grid; gap: 12px; text-align: left; }
.lang-choice { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px; min-height: 72px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; cursor: pointer; box-shadow: var(--shadow); }
.lang-choice:hover { border-color: var(--accent); }
.lc-name { font-size: 1.2rem; font-weight: 700; }
.lc-sub { grid-row: 2; color: var(--muted); font-size: 0.85rem; }
.lang-choice .chev { grid-row: 1 / span 2; grid-column: 2; color: var(--accent); }

/* home */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 20px; }
.tile { display: grid; align-content: start; gap: 4px; min-height: 128px; padding: 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.tile:hover { border-color: var(--accent-line); color: var(--ink); }
.tile .tile-ic { width: 28px; height: 28px; color: var(--accent); margin-bottom: 8px; }
.tile-t { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.tile-s { color: var(--muted); font-size: 0.85rem; }
.tile.primary { grid-column: 1 / -1; min-height: 112px; background: var(--accent); color: #fff; border-color: var(--accent); grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.tile.primary .tile-ic { color: #fff; grid-row: 1 / span 2; width: 34px; height: 34px; margin: 0; }
.tile.primary .tile-t { font-size: 1.2rem; }
.tile.primary .tile-s { color: rgba(255, 255, 255, 0.85); }
.tile.primary:hover { background: var(--accent-ink); color: #fff; }

/* wizard */
.wizard { display: block; }
.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.progress span { height: 6px; border-radius: 6px; background: var(--line); }
.progress span.done { background: var(--accent-line); }
.progress span.cur { background: var(--accent); }
.step-of { color: var(--muted); font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.step-body { margin-top: 18px; }
.wizard-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 8px; background: linear-gradient(rgba(248, 250, 252, 0), var(--paper) 28%); }
.wizard-nav .btn { min-height: 52px; }
.counter { color: var(--muted); font-size: 0.85rem; margin: -10px 0 18px; text-align: right; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.switch-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; cursor: pointer; margin-bottom: 14px; position: relative; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 52px; height: 32px; border-radius: 32px; background: var(--line-2); position: relative; flex: none; transition: background-color 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.switch-row input:checked + .switch { background: var(--ok); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch-label { font-weight: 650; font-size: 1.02rem; }

/* files */
.file-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.file-item, .att-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--accent-soft); object-fit: cover; }
.icon-thumb { display: grid; place-items: center; color: var(--accent); }
.icon-thumb .ic { width: 26px; height: 26px; }
.file-meta { display: grid; gap: 2px; min-width: 0; }
.file-name { font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { color: var(--muted); font-size: 0.8rem; display: inline-flex; gap: 4px; align-items: center; }
.file-sub.ok { color: var(--ok); }
.file-sub .ic { width: 14px; height: 14px; }
.file-btn { position: relative; margin-bottom: 12px; min-height: 52px; }
.file-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

/* review */
.review-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.review-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.review-card .edit { font-weight: 600; font-size: 0.9rem; padding: 8px 0 8px 8px; }
.review-card dl { margin: 0; display: grid; gap: 8px; }
.kv { display: grid; gap: 1px; }
.kv dt { color: var(--muted); font-size: 0.8rem; }
.kv dd { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.consent { margin-top: 18px; }
.check { font-size: 0.92rem; color: var(--ink-2); }

/* done */
.done-page { text-align: center; }
.done-ic { width: 64px; height: 64px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.done-ic .ic { width: 36px; height: 36px; }
.done-page > p { color: var(--ink-2); margin: 14px 0; }
.code-card { margin: 18px 0 6px; padding: 20px 16px; background: var(--surface); border: 2px dashed var(--accent-line); border-radius: 16px; display: grid; gap: 10px; justify-items: center; }
.code-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.code { font: 700 clamp(1.7rem, 9vw, 2.3rem)/1.1 var(--mono); letter-spacing: 0.08em; color: var(--ink); user-select: all; }
.info-card { text-align: left; background: var(--accent-soft); border-radius: 14px; padding: 16px; margin: 18px 0; display: grid; gap: 6px; }
.info-card p { color: var(--ink-2); }
.stack { display: grid; gap: 10px; }

/* track */
.track-form { display: grid; gap: 4px; margin-bottom: 20px; }
.track-form .field { margin-bottom: 10px; }
#code { font-family: var(--mono); font-size: 1.25rem; letter-spacing: 0.1em; text-transform: uppercase; }
.status-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; margin-bottom: 22px; box-shadow: var(--shadow); }
.status-now { display: grid; gap: 2px; margin: 8px 0 14px; }
.status-now .muted { font-size: 0.85rem; }
.status-now strong { font-size: 1.2rem; }
.timeline { list-style: none; padding: 0; margin: 4px 0 16px; }
.tl { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.tl.done:not(:last-child)::before { background: var(--accent-line); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); background: var(--surface); color: #fff; }
.tl-dot .ic { width: 16px; height: 16px; }
.tl.done .tl-dot { background: var(--accent); border-color: var(--accent); }
.tl.cur .tl-dot { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 105, 186, 0.15); background: var(--surface); }
.tl.cur .tl-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.tl.skip { opacity: 0.45; }
.tl.skip .tl-t { text-decoration: line-through; }
.tl-t { font-weight: 650; }
.tl.todo .tl-t { color: var(--muted); }
.tl-when { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.tl-d { font-size: 0.85rem; color: var(--muted); }
.kv-inline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.kv-inline dt { color: var(--muted); font-size: 0.8rem; }
.kv-inline dd { margin: 0; font-weight: 600; }
.samples { display: grid; gap: 8px; }

/* office */
.map-card { margin: 0 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sketch { width: 100%; height: auto; }
.map-bg { fill: #eef3f8; }
.grid-line { fill: none; stroke: #dbe4ee; stroke-width: 1; }
.sketch .city circle { fill: var(--muted); }
.sketch .city text { fill: var(--ink-2); font: 600 12px var(--font); }
.sketch .hq circle { fill: var(--accent); }
.sketch .hq .hq-ring { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0.35; }
.sketch .hq text { fill: var(--accent-ink); font: 700 13px var(--font); }
.map-card figcaption { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.map-card figcaption .ic { color: var(--accent); }

/* bottom sheet (free call) */
.sheet { width: min(480px, calc(100vw - 24px)); }
.sheet-in { padding: 24px 20px 20px; display: grid; gap: 12px; text-align: center; }
.sheet-ic { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.big-num { font: 700 1.8rem var(--mono); letter-spacing: 0.04em; }
.sheet-in p { color: var(--ink-2); }

@media (min-width: 720px) {
  .app-main { padding-top: 32px; }
}
@media (max-width: 360px) {
  .app-title small { display: none; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .tile { min-height: 116px; padding: 14px; }
}

/* long app names wrap instead of being cut; on small phones the glyph gives way to the back button */
.app-title strong { white-space: normal; overflow: visible; text-overflow: clip; font-size: 0.95rem; }
.app-head .lang-btn { min-width: 36px; padding: 4px 5px; }
@media (max-width: 420px) { .app-head:has(#app-back:not([hidden])) .app-glyph { display: none; } }
/* home: report (blue) and track (white) full width, then call and office side by side */
.tile.primary, .tile.wide { align-content: center; }
.tile.wide { grid-column: 1 / -1; min-height: 88px; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.tile.wide .tile-ic { grid-row: 1 / span 2; margin: 0; width: 30px; height: 30px; }

/* ---------- 27 Oct 2026: PIK's look (palette.json), the help strip, choices, map, stations, AI marks ---------- */
.app-head { border-bottom: 2px solid #1C79C1; }
.app-glyph { background: var(--accent); color: #fff; }
.help-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding: 7px 12px; background: var(--ink); color: #fff; font-size: 0.82rem; font-weight: 600; border-bottom: 1px solid var(--gold); }
.help-strip a { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; min-height: 28px; }
.help-strip a .ic { width: 16px; height: 16px; color: var(--gold); }
.help-strip a.danger .ic { color: #FCA5A5; }
.help-strip a:hover { text-decoration: underline; color: #fff; }
.eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: var(--gold-text); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--gold); }
.tile.primary { border-color: var(--gold); }
.tile.primary:hover { background: var(--ink); }
.trust { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--ink); font-size: 0.92rem; margin: 0 0 16px; }
.trust .ic { color: var(--accent); flex: none; }
.how-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0 0 16px; display: grid; gap: 10px; }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.how-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 0.92rem; color: var(--ink-2); }
.how-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; color: #fff; background: #0069BA; }
.how-2 .how-dot { background: #9A5B00; } .how-3 .how-dot { background: #4F46E5; } .how-4 .how-dot { background: #0F7C80; } .how-5 .how-dot { background: #475569; }
.proof { font-weight: 600; color: var(--ink); font-size: 0.92rem; padding-top: 8px; border-top: 1px solid var(--line); }
.draft-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--warn-soft); border-radius: 12px; margin-bottom: 14px; font-size: 0.9rem; }
.draft-card span { flex: 1; }
.lang-pick .h1.tri span[lang="sr-Cyrl"] { color: var(--muted); font-weight: 600; }

/* choices: anonymous or named, and speak / write / form */
.choices { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.choice { position: relative; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 14px; cursor: pointer; text-align: left; width: 100%; font: inherit; color: var(--ink); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:hover { border-color: var(--accent); }
.choice.on, .choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 105, 186, 0.14); background: var(--accent-soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.choice-ic { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.choice.on .choice-ic { background: var(--accent); color: #fff; }
.choice-t { font-weight: 700; font-size: 1.02rem; }
.choice-s { color: var(--muted); font-size: 0.86rem; }
.choices.has-error .choice { border-color: var(--bad); }
.how-pick { display: grid; gap: 10px; margin-bottom: 14px; }
.change-how { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 0.9rem; }
.change-how .ic { width: 16px; height: 16px; }
.group-h { margin: 18px 0 10px; color: var(--ink); }
.sec-h { display: flex; align-items: center; gap: 8px; margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink); }
.step-body > .sec-h:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sec-h .ic { color: var(--accent); }
.helps { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 0.9rem; }
.helps-t { font-weight: 650; margin-bottom: 4px; }
.helps ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.quick-dates { display: flex; gap: 8px; margin: -6px 0 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.radio-list.inline { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 8px; }
.officer-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 2px; margin-bottom: 10px; }
.officer-head { display: flex; justify-content: space-between; align-items: center; font-weight: 650; font-size: 0.9rem; color: var(--ink-2); margin-bottom: 6px; min-height: 32px; }

/* recorder */
.recorder { display: grid; justify-items: center; gap: 10px; padding: 18px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin: 10px 0 14px; }
.rec-btn { width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--gold); background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.rec-btn .ic { width: 32px; height: 32px; }
.recorder.live .rec-btn { background: var(--bad); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.35); } 50% { box-shadow: 0 0 0 12px rgba(180, 35, 24, 0); } }
@media (prefers-reduced-motion: reduce) { .recorder.live .rec-btn { animation: none; } }
.rec-status { font-weight: 600; color: var(--ink-2); }
.recorder audio { width: 100%; }
.ai-busy { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--accent-soft); border-radius: 10px; margin-bottom: 14px; font-weight: 600; color: var(--accent-ink); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--accent-line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.note.ok { background: var(--ok-soft); color: #134e33; }
.note.ok .ic { color: var(--ok); }
.ai-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px; border-radius: 20px; background: #EEF0FF; color: #3730A3; font-size: 0.74rem; font-weight: 650; vertical-align: 1px; }
.ai-badge .ic { width: 12px; height: 12px; }
.ai-filled input, .ai-filled select, .ai-filled textarea { border-color: #4F46E5; background: #FAFAFF; }
.kv.ai-filled dd { color: #3730A3; }

/* map and stations */
.map { height: 260px; border-radius: 14px; border: 1px solid var(--line-2); margin: 10px 0 8px; z-index: 0; background: #e8eef4; }
.loc-msg { font-size: 0.88rem; color: var(--warn); min-height: 0; }
.loc-msg:not(:empty) { margin-top: 8px; }
.muni-auto { font-size: 0.88rem; color: var(--ok); font-weight: 600; }
.muni-auto:not(:empty) { margin-bottom: 8px; }
.pin-ic span { display: block; width: 30px; height: 30px; margin: 0 auto; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--bad); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.near { margin: 4px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.near summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-weight: 650; color: var(--accent); }
.near[open] { padding-bottom: 12px; }
.stations { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.stations li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.st-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.st-ic.gold { background: var(--ink); color: var(--gold); }
.st-ic .ic { width: 18px; height: 18px; }
.st-meta { display: grid; gap: 1px; min-width: 0; }
.st-meta strong { font-size: 0.92rem; line-height: 1.3; }
.st-meta small { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.st-meta .st-km { color: var(--accent-ink); font-weight: 650; }
.pik-offices { margin-top: 20px; }
.thanks { font-weight: 650; color: var(--ink); }
.tl.cur.st-screening .tl-dot { border-color: #9A5B00; } .tl.cur.st-screening .tl-dot::after { background: #9A5B00; }
.wizard-nav { z-index: 500; }
