/* Look: calm and plain (lessons from the Ascend calm/soft looks). One accent colour used only for
   the main action. Verdict colours (green, amber, red) carry meaning and nothing else. No emoji,
   no gradients, no glows. Light and dark. Sizes follow the window (fit-to-screen rules). */
@font-face { font-family: Plex; src: url(/fonts/plex-arabic-400.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Plex; src: url(/fonts/plex-arabic-500.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Plex; src: url(/fonts/plex-arabic-600.woff2) format('woff2'); font-weight: 600 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Plex; src: url(/fonts/plex-latin-400.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Plex; src: url(/fonts/plex-latin-500.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Plex; src: url(/fonts/plex-latin-600.woff2) format('woff2'); font-weight: 600 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root {
  --bg: #f3f4f6; --card: #ffffff; --card2: #f6f7f9; --border: #e3e5e9; --text: #16181d; --muted: #565d6b; --faint: #8b919c;
  --accent: #0f5c4d; --accent-ink: #ffffff; --accent-soft: #e3efec;
  --safe: #15803d; --safe-bg: #e7f5ec; --warn: #b45309; --warn-bg: #fdf1e1; --bad: #b91c1c; --bad-bg: #fbeaea;
  --ring: 0 0 0 3px rgba(15, 92, 77, .22);
  --sh1: 0 0 0 1px rgba(16, 24, 40, .04), 0 1px 2px rgba(16, 24, 40, .06);
  --sh2: 0 0 0 1px rgba(16, 24, 40, .05), 0 8px 24px -10px rgba(16, 24, 40, .18);
  --r: .75rem; --r-lg: 1rem; --ui: 1;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1114; --card: #171a1f; --card2: #1d2127; --border: #2a2f37; --text: #eceef2; --muted: #a9afbb; --faint: #7c8390;
  --accent: #3fb59b; --accent-ink: #06231d; --accent-soft: #15302a;
  --safe: #4ade80; --safe-bg: #12291b; --warn: #fbbf24; --warn-bg: #2d220e; --bad: #f87171; --bad-bg: #2f1414;
  --ring: 0 0 0 3px rgba(63, 181, 155, .3);
  --sh1: 0 0 0 1px rgba(255, 255, 255, .03), 0 1px 2px rgba(0, 0, 0, .4);
  --sh2: 0 0 0 1px rgba(255, 255, 255, .04), 0 10px 28px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: calc(16px * var(--ui)); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.55 Plex, "Segoe UI", Tahoma, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; direction: ltr; unicode-bidi: isolate; word-break: break-all; font-size: .9em; }
[hidden] { display: none !important; }
.i { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em; }
a.tile, a.card { color: inherit; text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- layout ---------- */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1.05rem; text-decoration: none; color: var(--text); }
.brand svg { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.top .spacer { flex: 1; }
.side { display: none; }
.main { flex: 1; padding: 1rem 1rem 6rem; width: 100%; max-width: 46rem; margin: 0 auto; }
.tabbar { position: fixed; inset: auto 0 0 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--border); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); z-index: 6; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .35rem 0; color: var(--muted); text-decoration: none; font-size: .78rem; border-radius: .6rem; }
.tabbar a svg { width: 1.45rem; height: 1.45rem; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* Desktop: the page never scrolls; the main panel scrolls inside itself (fit-to-screen). */
@media (min-width: 901px) {
  html { font-size: calc(clamp(13px, calc(.42vw + .5vh + 3px), 20px) * var(--ui)); }
  html, body { height: 100%; overflow: hidden; }
  .shell { height: 100dvh; display: grid; grid-template-columns: 16rem minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .top { grid-column: 1 / -1; position: static; }
  .side { display: flex; flex-direction: column; gap: .25rem; padding: 1rem .75rem; background: var(--card); border-inline-end: 1px solid var(--border); overflow-y: auto; }
  .side a { display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: .65rem; color: var(--text); text-decoration: none; }
  .side a svg { width: 1.25rem; height: 1.25rem; color: var(--muted); }
  .side a:hover { background: var(--card2); }
  .side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  .side a[aria-current="page"] svg { color: var(--accent); }
  .side .sep { height: 1px; background: var(--border); margin: .5rem .25rem; }
  .side .foot { margin-top: auto; font-size: .8rem; color: var(--faint); padding: .5rem .75rem; }
  .main { overflow-y: auto; max-width: none; padding: 1.5rem 2rem; }
  .main > .page { max-width: 52rem; margin: 0 auto; }
  .main > .page.wide { max-width: 80rem; }
  .tabbar { display: none; }
}

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: 0 1.1rem; border-radius: var(--r); border: 1px solid var(--border); background: var(--card); color: var(--text); font-weight: 500; cursor: pointer; text-decoration: none; transition: background .18s, border-color .18s; }
.btn:hover { background: var(--card2); }
.btn svg { width: 1.2rem; height: 1.2rem; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.big { min-height: 3.4rem; font-size: 1.1rem; padding: 0 1.5rem; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 2.2rem; padding: 0 .75rem; font-size: .9rem; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { width: 2.5rem; height: 2.5rem; display: inline-grid; place-items: center; border-radius: .65rem; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--card2); color: var(--text); }
.icon-btn svg { width: 1.3rem; height: 1.3rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .9rem; color: var(--muted); font-weight: 500; }
.input, textarea.input, select.input { width: 100%; min-height: 2.9rem; padding: .65rem .85rem; border-radius: var(--r); border: 1px solid var(--border); background: var(--card); box-shadow: var(--sh1); }
.input:focus { outline: 0; border-color: var(--accent); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 7.5rem; line-height: 1.6; }
.hint { font-size: .85rem; color: var(--muted); }
.err { color: var(--bad); font-size: .9rem; }
.err:empty { display: none; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.1rem; box-shadow: var(--sh1); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.h1 { font-size: 1.55rem; font-weight: 600; margin: 0; line-height: 1.3; }
.h2 { font-size: 1.15rem; font-weight: 600; margin: 0; }
.lead { color: var(--muted); margin: .25rem 0 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* home: the one big box */
.checkbox { display: flex; flex-direction: column; gap: .75rem; }
.checkbox textarea { min-height: 6.5rem; font-size: 1.05rem; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 901px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1rem; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--card); box-shadow: var(--sh1); cursor: pointer; text-align: start; min-height: 6.5rem; }
.tile:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.tile svg { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.tile b { font-weight: 600; }
.tile span { font-size: .85rem; color: var(--muted); line-height: 1.4; }

/* verdict */
.verdict { border-radius: var(--r-lg); padding: 1.1rem 1.2rem; border: 1px solid; display: flex; gap: .9rem; align-items: flex-start; }
.verdict svg { width: 2.2rem; height: 2.2rem; flex: none; margin-top: .15rem; }
.verdict h2 { margin: 0; font-size: 1.4rem; font-weight: 600; }
.verdict p { margin: .25rem 0 0; }
.verdict.safe { background: var(--safe-bg); border-color: color-mix(in srgb, var(--safe) 35%, transparent); color: var(--safe); }
.verdict.caution { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); }
.verdict.danger { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); }
.verdict p, .verdict .meta { color: var(--text); }
.meter { height: .4rem; border-radius: 1rem; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; margin-top: .6rem; }
.meter i { display: block; height: 100%; background: currentColor; border-radius: 1rem; }
.reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.reasons li { display: flex; gap: .55rem; align-items: flex-start; }
.reasons li svg { width: 1.1rem; height: 1.1rem; flex: none; margin-top: .25rem; color: var(--bad); }
.reasons.good li svg { color: var(--safe); }
.money { display: flex; flex-direction: column; gap: .5rem; }
.money .m { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem .8rem; border-radius: var(--r); background: var(--card2); border: 1px solid var(--border); flex-wrap: wrap; }
.shot { width: 100%; max-height: 16rem; background: var(--card); object-fit: cover; object-position: top; border-radius: var(--r); border: 1px solid var(--border); }
.actions { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 560px) { .actions { grid-template-columns: 1fr 1fr; } }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 1rem; font-size: .8rem; font-weight: 500; background: var(--card2); border: 1px solid var(--border); color: var(--muted); }
.badge.danger { color: var(--bad); background: var(--bad-bg); border-color: transparent; }
.badge.caution { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.badge.safe { color: var(--safe); background: var(--safe-bg); border-color: transparent; }

/* checking progress */
.progress { display: flex; flex-direction: column; gap: .6rem; }
.progress .step { display: flex; align-items: center; gap: .6rem; color: var(--faint); }
.progress .step.on { color: var(--text); }
.progress .step.done { color: var(--muted); }
.progress .dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid currentColor; flex: none; display: grid; place-items: center; }
.progress .step.on .dot { border-color: var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }
.progress .step.done .dot { background: var(--accent); border-color: var(--accent); }
.progress .step.done .dot::after { content: ""; width: .35rem; height: .2rem; border: solid var(--accent-ink); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(.03rem, -.03rem); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .progress .step.on .dot { animation: none; } }

/* sheet (dialog) */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: 32rem; width: calc(100% - 2rem); color: var(--text); }
dialog.sheet::backdrop { background: rgba(10, 12, 16, .45); }
dialog.sheet .card { padding: 1.25rem; box-shadow: var(--sh2); }
.camera { position: relative; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 60vh; }
.camera video { width: 100%; height: 100%; object-fit: cover; }
.camera .frame { position: absolute; inset: 18%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 1rem; }

/* map + stats */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 901px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: .9rem 1rem; }
.kpi b { display: block; font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .88rem; }
.mapwrap { position: relative; padding: .5rem; }
.mapwrap svg { width: 100%; height: auto; display: block; }
.map-land { fill: var(--card2); stroke: var(--faint); stroke-width: .9; stroke-linejoin: round; }
.map-sea { fill: var(--faint); font-size: 12px; font-style: italic; letter-spacing: .02em; }
.map-lead { stroke: var(--faint); stroke-width: .8; fill: none; }
.map-dot { fill: color-mix(in srgb, var(--bad) 70%, transparent); stroke: var(--card); stroke-width: 1.6; }
.map-dot.top { fill: var(--bad); }
.map-label { fill: var(--text); font-size: 13px; font-weight: 500; }
.map-label.top { font-weight: 700; }
.map-num { fill: var(--bad); font-weight: 600; font-variant-numeric: tabular-nums; }
.tr-grid { stroke: var(--border); stroke-width: 1; }
.tr-ax { fill: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.tr-bar { fill: color-mix(in srgb, var(--bad) 55%, transparent); }
.tr-bar.last { fill: var(--bad); }
.trend svg { width: 100%; height: auto; display: block; }
.headline { font-size: 1.05rem; color: var(--muted); margin: .25rem 0 0; }
.headline b { color: var(--text); font-weight: 600; }
.kpi.hot b { color: var(--bad); }
.kpi small { display: block; color: var(--faint); font-size: .78rem; margin-top: .15rem; }
.rank { display: flex; flex-direction: column; gap: .7rem; }
.rank .bar { grid-template-columns: minmax(0, 6.5rem) 1fr 2.6rem 2.6rem; }
.rank .bar em { font-style: normal; color: var(--faint); font-size: .8rem; text-align: end; font-variant-numeric: tabular-nums; }
.bar .track i.bad { background: var(--bad); }
.grid-map { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 901px) { .grid-map { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.card-h .h2 { margin: 0; }
.card-h small { color: var(--faint); font-size: .82rem; }
.bars { display: flex; flex-direction: column; gap: .55rem; }
.bar { display: grid; grid-template-columns: minmax(0, 9rem) 1fr 2.5rem; gap: .6rem; align-items: center; font-size: .92rem; }
.bar .track { height: .55rem; background: var(--card2); border-radius: 1rem; overflow: hidden; border: 1px solid var(--border); }
.bar .track i { display: block; height: 100%; background: var(--accent); border-radius: 1rem; }
.bar b { font-variant-numeric: tabular-nums; font-weight: 500; text-align: end; }
.list { display: flex; flex-direction: column; }
.list > div { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.list > div:last-child { border-bottom: 0; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 901px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid2 .span2 { grid-column: 1 / -1; } }

/* police */
.graph { width: 100%; height: 26rem; border-radius: var(--r); background: var(--card2); border: 1px solid var(--border); display: block; touch-action: none; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-inline-end: .3rem; vertical-align: middle; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.timer.hot { color: var(--bad); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { text-align: start; padding: .55rem .4rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.t th { color: var(--muted); font-weight: 500; font-size: .85rem; }
.tabs { display: inline-flex; background: var(--card2); border: 1px solid var(--border); border-radius: .75rem; padding: .2rem; gap: .2rem; }
.tabs button { border: 0; background: transparent; padding: .4rem .9rem; border-radius: .55rem; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: var(--sh1); font-weight: 500; }
.toast { position: fixed; inset-inline: 1rem; bottom: 5.5rem; margin: 0 auto; max-width: 28rem; background: var(--text); color: var(--bg); padding: .75rem 1rem; border-radius: var(--r); box-shadow: var(--sh2); z-index: 20; text-align: center; }
@media (min-width: 901px) { .toast { bottom: 1.5rem; } }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.demo-note { font-size: .8rem; color: var(--warn); }
.fade-in { animation: fade .26s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

/* ask-before-you-pay choices */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.choice { display: flex; align-items: center; gap: .55rem; padding: .7rem .8rem; border-radius: var(--r); border: 1px solid var(--border); background: var(--card); box-shadow: var(--sh1); cursor: pointer; font-size: .95rem; line-height: 1.35; min-height: 3.2rem; }
.choice input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 500; }
@media (min-width: 901px) { .choices { grid-template-columns: repeat(3, 1fr); } }

/* ---------- police: gang list + one gang in detail ---------- */
.grid-pol { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
@media (min-width: 901px) { .grid-pol { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.gang-list { display: flex; flex-direction: column; gap: .4rem; }
.gang-item { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; text-align: start; width: 100%; padding: .7rem .8rem; border-radius: var(--r); border: 1px solid var(--border); background: var(--card); cursor: pointer; }
.gang-item:hover { background: var(--card2); }
.gang-item[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.gang-item b { font-weight: 600; }
.gang-item .sub { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 901px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts div { background: var(--card2); border: 1px solid var(--border); border-radius: var(--r); padding: .55rem .7rem; }
.facts b { display: block; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: .8rem; }
.acts { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.acts li { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; padding: .6rem .7rem; border-radius: var(--r); background: var(--bad-bg); }
.acts li.n { background: var(--card2); }
.acts li > svg { color: var(--bad); margin-top: .15rem; }
.acts li.n > svg { color: var(--muted); }
.acts b { font-weight: 600; display: block; }
.acts .mono { font-size: .85rem; color: var(--muted); }
.gang-net { overflow-x: auto; }
.gang-svg { width: 100%; height: auto; display: block; }
.gang-svg.narrow .mono-t { font-size: 10px; }
.gang-svg.narrow .ge-k { font-size: 10px; }
.gang-svg .gl { fill: none; stroke: var(--faint); stroke-width: 1.2; opacity: .55; transition: opacity .15s; }
.gang-svg .gl.money { stroke: var(--bad); opacity: .45; }
.gang-svg.focus .gl { opacity: .08; }
.gang-svg.focus .gl.on { opacity: 1; stroke-width: 1.8; }
.gang-svg .gs rect { fill: var(--card); stroke: var(--border); }
.gang-svg .gs circle { fill: var(--bad); }
.gang-svg .ge rect { fill: var(--card2); stroke: var(--border); }
.gang-svg .ge.money rect { fill: var(--bad-bg); stroke: color-mix(in srgb, var(--bad) 35%, transparent); }
.gang-svg text { fill: var(--text); font-size: 12px; }
.gang-svg .ge-k { fill: var(--muted); font-size: 11px; font-weight: 500; }
.gang-svg .ge.money .ge-k { fill: var(--bad); }
.gang-svg .mono-t { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11.5px; }
.gang-svg g { cursor: default; }
.sec-t { font-size: 1rem; font-weight: 600; margin: 0; }
.sec-l { color: var(--muted); font-size: .85rem; margin: .1rem 0 0; }
.list.col > div { flex-direction: column; align-items: flex-start; gap: .1rem; }
.grid-pol > *, .grid2 > *, .grid-map > * { min-width: 0; }
.ell { display: block; word-break: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.list > div > span:first-child { min-width: 0; }
.list.col .mono { word-break: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (max-width: 900px) { .map-label { font-size: 19px; } .map-sea { font-size: 16px; } .tr-ax { font-size: 15px; } }
.acts li > div { min-width: 0; }
html[dir="rtl"] .mono.ell { text-align: right; }

/* ---------- decoy replay ---------- */
.rp-stage { position: relative; }
.rp-stage .shot { max-height: 22rem; transition: opacity .2s; }
.rp-stage .shot.dim { opacity: .25; }
.rp-note { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rp-note svg { width: 3.5rem; height: 3.5rem; color: var(--muted); }
.rp-note.exfil svg { color: var(--bad); }
.rp-note.found svg { color: var(--bad); }
.rp-stage:has(.shot[hidden]) { min-height: 10rem; background: var(--card2); border-radius: var(--r); border: 1px solid var(--border); }
.rp-cap { display: flex; gap: .55rem; align-items: flex-start; margin: 0; font-weight: 500; min-height: 3em; }
.rp-cap svg { margin-top: .2rem; color: var(--muted); }
.rp-cap.exfil, .rp-cap.found { color: var(--bad); }
.rp-cap.exfil svg, .rp-cap.found svg { color: var(--bad); }
.rp-ctl { display: flex; align-items: center; gap: .5rem; }
.rp-dots { flex: 1; display: flex; justify-content: center; gap: .3rem; flex-wrap: wrap; }
.rp-dots button { width: .6rem; height: .6rem; border-radius: 50%; border: 0; padding: 0; background: var(--border); cursor: pointer; }
.rp-dots button.exfil, .rp-dots button.found { background: color-mix(in srgb, var(--bad) 40%, transparent); }
.rp-dots button[aria-current="true"] { background: var(--accent); transform: scale(1.25); }
.rp-dots button.exfil[aria-current="true"], .rp-dots button.found[aria-current="true"] { background: var(--bad); }
/* the arrow icon points right: back points to the reading start, next to the reading end */
html[dir="rtl"] #rpNext svg, html[dir="ltr"] #rpPrev svg { transform: scaleX(-1); }

/* ---------- cloaking: two faces ---------- */
.faces-g { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.faces-g figure { margin: 0; display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.faces-g .shot { height: 15rem; width: 100%; object-fit: cover; object-position: top; border-radius: var(--r); border: 1px solid var(--border); }
.faces-g figure.bad .shot { border: 2px solid var(--bad); }
.faces-g figure:not(.bad) .shot { object-fit: contain; background: var(--card2); }
.faces-g figcaption { display: flex; flex-direction: column; gap: .1rem; font-size: .9rem; }
.faces-g figure.bad figcaption b { color: var(--bad); }
.faces-g figcaption small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faces .card-h h3 { display: flex; gap: .45rem; align-items: center; }
.rp-cap.cloak, .rp-cap.cloak svg { color: var(--bad); }
.rp-dots button.cloak { background: color-mix(in srgb, var(--bad) 40%, transparent); }
.rp-dots button.cloak[aria-current="true"] { background: var(--bad); }

/* ---------- banks ---------- */
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.steps3 li { display: flex; flex-direction: column; gap: .3rem; }
.steps3 .num { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 600; margin-bottom: .2rem; }
@media (max-width: 720px) { .steps3 { grid-template-columns: 1fr; } .steps3 li { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: .6rem; } .steps3 li small { flex-basis: 100%; } }
pre.code { margin: 0; padding: .85rem 1rem; background: var(--card2); border: 1px solid var(--border); border-radius: var(--r); font-family: var(--mono, ui-monospace, monospace); font-size: .8rem; line-height: 1.55; overflow: auto; max-height: 22rem; white-space: pre; text-align: left; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font: inherit; font-size: .85rem; padding: .3rem .75rem; border-radius: 1rem; border: 1px solid var(--border); background: var(--card2); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.tease { gap: .75rem; align-items: center; text-decoration: none; color: inherit; }
.tease span { display: flex; flex-direction: column; }
.tease > svg { color: var(--accent); flex: none; }
.bk-line { display: flex; gap: .5rem; align-items: flex-start; margin: 0; padding: .6rem .75rem; border-radius: var(--r); background: var(--card2); font-size: .9rem; }
.bk-line svg { color: var(--accent); flex: none; margin-top: .15rem; }
.h2.sub { font-size: 1rem; }

/* ---------- predicted gang domains ---------- */
.pred .sec-t { display: flex; gap: .4rem; align-items: center; }
.pred-shape { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.pred-shape code, .pred-list code { font-family: var(--mono, ui-monospace, monospace); font-size: .85rem; background: var(--card2); border: 1px solid var(--border); border-radius: .4rem; padding: .15rem .45rem; }
.pred-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.pred-list code { border-style: dashed; }

/* ---------- early warning (certificate watch) ---------- */
.watch { display: flex; flex-direction: column; }
.watch-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto auto; gap: .75rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--border); }
.watch-row:first-child { border-top: 0; }
.watch-row .w-why { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; min-width: 0; }
.watch-row .w-why code { font-family: var(--mono, ui-monospace, monospace); font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.watch-row .badge svg { width: .9rem; height: .9rem; }
#watchOn { color: var(--muted); }
@media (max-width: 760px) { .watch-row { grid-template-columns: minmax(0, 1fr) auto; } .watch-row .w-why { grid-column: 1 / -1; order: 3; } }

/* ---------- app file (APK) ---------- */
.apk-tile { font: inherit; text-align: start; width: 100%; cursor: pointer; color: inherit; }
.apk-h { display: flex; gap: .7rem; align-items: center; }
.apk-h > svg { width: 2rem; height: 2rem; color: var(--bad); flex: none; }
.apk-h > div { display: flex; flex-direction: column; min-width: 0; }
.perms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.perms li { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--border); }
.perms li:first-child { border-top: 0; }
.perms li code { font-family: var(--mono, ui-monospace, monospace); font-size: .72rem; color: var(--muted); }
.perms li.hi span { color: var(--bad); font-weight: 500; }
.perms li.hi span::before, .perms li.mid span::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--bad); margin-inline-end: .45rem; vertical-align: middle; }
.perms li.mid span::before { background: var(--warn); }
.apk-do ol { margin: 0; padding-inline-start: 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
@media (max-width: 520px) { .perms li { flex-direction: column; align-items: flex-start; gap: .1rem; } }

.rp-cap.apk, .rp-cap.apk svg { color: var(--bad); }
.rp-dots button.apk { background: color-mix(in srgb, var(--bad) 40%, transparent); }
.rp-dots button.apk[aria-current="true"] { background: var(--bad); }

/* ---------- transfer receipt ---------- */
.rcpt .h2 { display: flex; gap: .45rem; align-items: center; }
.rcpt-rule { display: flex; gap: .5rem; align-items: flex-start; margin: 0; padding: .7rem .8rem; border-radius: var(--r); background: var(--warn-bg); color: var(--text); font-weight: 500; }
.rcpt-rule svg { color: var(--warn); flex: none; margin-top: .15rem; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.checks li { display: flex; gap: .55rem; align-items: flex-start; }
.checks li svg { width: 1.1rem; height: 1.1rem; flex: none; margin-top: .2rem; }
.checks li.bad svg { color: var(--bad); } .checks li.warn svg { color: var(--warn); } .checks li.ok svg { color: var(--safe); }
.ela-g { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ela-g figure { margin: 0; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.ela-g img { width: 100%; max-height: 26rem; object-fit: contain; background: #111; border-radius: var(--r); border: 1px solid var(--border); }
.ela-g figcaption { font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- explain ---------- */
.explain .h2 { display: flex; gap: .45rem; align-items: center; }
.ex-a p { margin: 0 0 .6rem; line-height: 1.75; }
.ex-a .ex-q { font-weight: 600; padding-inline-start: .7rem; border-inline-start: 3px solid var(--accent); }
.ex-f { gap: .5rem; } .ex-f .input { flex: 1; min-width: 0; }

/* ---------- language menu and other scripts ---------- */
.lang-sel { position: relative; gap: .35rem; }
.lang-sel select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.lang-sel select:focus-visible { outline: none; }
.lang-sel:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-sel select option { color: var(--text); background: var(--card); }
/* Urdu needs letters the Arabic web font lacks: use the phone's own Urdu font. */
html[lang="ur"] body { font-family: "Noto Naskh Arabic", "Jameel Noori Nastaleeq", system-ui, sans-serif; line-height: 1.8; }
html[lang="ml"] body, html[lang="hi"] body { line-height: 1.7; }

/* ---------- accuracy ---------- */
.acc-link { display: inline-flex; gap: .4rem; align-items: center; color: var(--accent); text-decoration: none; font-weight: 500; }
.acc-k, .kpis.acc-k { grid-template-columns: repeat(3, 1fr); }
.acc-k .kpi { padding: .6rem .4rem; }
.acc-k .kpi b { font-size: 2rem; }
@media (max-width: 560px) { .acc-k .kpi b { font-size: 1.45rem; } .acc-k .kpi span { font-size: .8rem; } .tbl { font-size: .82rem; } .tbl th, .tbl td { padding: .5rem .3rem; } .tbl thead th { white-space: normal; } }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { padding: .55rem .5rem; border-bottom: 1px solid var(--border); text-align: start; white-space: nowrap; }
.tbl thead th { color: var(--muted); font-weight: 500; }
.tbl tbody th { font-weight: 500; white-space: normal; }
.acc-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; }
.acc-list li { padding-block: .5rem; border-top: 1px solid var(--border); }
.acc-list li:first-child { border-top: 0; padding-top: 0; }
.acc-list small { display: block; margin-top: .15rem; }

/* ---------- fake bank code page ---------- */
.otp-c { border-color: var(--bad); }
.otp-g { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 640px) { .otp-g { grid-template-columns: 14rem 1fr; } }
.otp-g .shot { width: 100%; height: 15rem; object-fit: cover; object-position: top; border-radius: var(--r); border: 1px solid var(--border); }
.otp-a { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; padding: .6rem .8rem; border-radius: var(--r); background: var(--card2); }
.otp-a span { color: var(--muted); font-size: .9rem; }
.otp-a b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.otp-a.bad b { color: var(--bad); }
.otp-do { margin: 0; font-weight: 500; }

/* ---------- sender and official facts ---------- */
.from-row { display: flex; flex-direction: column; gap: .35rem; }
.from-row label { display: inline-flex; gap: .4rem; align-items: center; color: var(--muted); font-size: .9rem; }
.from-row[hidden] { display: none; }
.claim-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.claim-l li { display: flex; gap: .6rem; align-items: flex-start; }
.claim-l li > svg { flex: none; margin-top: .15rem; color: var(--muted); }
.claim-l li.bad > svg { color: var(--bad); }
.claim-l li div { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.claim-l small { color: var(--muted); font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* ---------- police search, evidence chain, access log ---------- */
.psearch { display: flex; gap: .6rem; align-items: center; }
.psearch > svg { flex: none; color: var(--muted); }
.psearch .input { flex: 1; min-width: 0; }
.ps-list > div { align-items: center; }
.chain { display: flex; gap: .5rem; align-items: center; margin: 0; font-weight: 500; }
.chain.ok { color: var(--safe); } .chain.bad { color: var(--bad); }
.row.wrap { flex-wrap: wrap; gap: .5rem; }

/* ---------- operations room (big screen) ---------- */
body.ops-on .top, body.ops-on .side, body.ops-on .tabbar, body.ops-on nav { display: none !important; }
.ops { position: fixed; inset: 0; z-index: 50; background: #0b1714; color: #e7f1ed; padding: clamp(.75rem, 1.6vw, 1.75rem); display: flex; flex-direction: column; gap: clamp(.6rem, 1.2vw, 1.2rem); overflow: auto; font-size: clamp(.9rem, 1vw, 1.25rem); }
.ops-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ops-top h1 { margin: 0; font-size: clamp(1.2rem, 2vw, 2.2rem); }
.ops-top .row { gap: .75rem; align-items: center; }
.ops-top .icon-btn { color: inherit; }
.live { display: inline-flex; align-items: center; gap: .4rem; font-size: .85em; color: #f08b8b; }
.live i { width: .6em; height: .6em; border-radius: 50%; background: #e05252; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live i { animation: none; } }
.ops-k { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(.5rem, 1vw, 1rem); }
.ops-k .kpi { background: #12241f; border: 1px solid #1f3a33; border-radius: var(--r); padding: clamp(.6rem, 1vw, 1.1rem); }
.ops-k .kpi b { font-size: clamp(1.6rem, 3vw, 3.4rem); }
.ops-k .kpi span { color: #9fbdb3; }
.ops-k .kpi.hot b { color: #ff8a80; }
.ops-g { display: grid; grid-template-columns: 1.05fr 1.4fr 1fr; gap: clamp(.6rem, 1.2vw, 1.2rem); flex: 1; min-height: 0; }
.ops-c { background: #12241f; border: 1px solid #1f3a33; border-radius: var(--r); padding: clamp(.75rem, 1.2vw, 1.25rem); display: flex; flex-direction: column; gap: .75rem; min-width: 0; min-height: 0; }
.ops-c h2 { margin: 0; font-size: 1.05em; color: #cfe5dc; }
.ops-c small { color: #9fbdb3; }
.ops .mapwrap { flex: 1; min-height: 14rem; }
.ops .gang-net { flex: 1; min-height: 16rem; background: #f4f8f6; border-radius: var(--r); }
.ops-money { display: flex; flex-wrap: wrap; gap: .4rem; }
.ops-feed { display: flex; flex-direction: column; gap: .5rem; }
.ops-feed > div { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem .6rem; background: #0e1d19; border-radius: calc(var(--r) - 4px); }
.ops-feed .muted { color: #9fbdb3; }
.ops .timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.ops .timer.hot { color: #ff8a80; }
@media (max-width: 1000px) { .ops-g { grid-template-columns: 1fr; } .ops-k { grid-template-columns: repeat(2, 1fr); } }

/* ---------- bank call after paying ---------- */
.card2 { background: var(--card2); border: 1px solid var(--border); border-radius: var(--r); padding: .9rem; }
.bank-call h3 { display: flex; gap: .4rem; align-items: center; }
.script { white-space: pre-wrap; margin: 0; font: inherit; font-size: .92rem; line-height: 1.6; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: .75rem; }
.ops .mapwrap { background: #f4f8f6; border-radius: var(--r); padding: .5rem; }
.ops-feed .ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- product screens ---- */
.foot-links { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; font-size: .85rem; }
.foot-links a { color: var(--muted); }
.qr-box { display: flex; justify-content: center; }
.qr-svg { width: min(12rem, 60vw); height: auto; border-radius: .5rem; border: 1px solid var(--border); }
.rec-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .75rem; padding: .75rem; background: var(--card2); border-radius: var(--r); }
.up-bars { display: flex; gap: 3px; align-items: stretch; height: 2rem; }
.up-day { flex: 1; border-radius: 2px; min-width: 3px; }
.plist { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .4rem; }
.flow { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.flow-n { display: flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--r); background: var(--card2); }
.flow-a { width: 1.5rem; height: 2px; background: var(--border); }
.input.small { padding: .3rem .5rem; font-size: .9rem; width: auto; }
@media (max-width: 40rem) { .wide-only { display: none; } }
/* ---- protection tools ---- */
.tool-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 48rem) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tool { align-items: flex-start; gap: .75rem; }
.tool > .i { width: 1.5rem; height: 1.5rem; color: var(--accent); margin-top: .15rem; }
.story { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.story li { display: flex; align-items: center; gap: .6rem; color: var(--faint); }
.story li .dot { width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--border); flex: none; }
.story li.on { color: var(--text); }
.story li.on .dot { background: var(--warn); border-color: var(--warn); }
.story li.at .dot { background: var(--bad); border-color: var(--bad); }
.big-timer { font-size: clamp(3rem, 12vw, 5rem); line-height: 1; letter-spacing: .04em; direction: ltr; }
.safe-word { font-size: 1.8rem; font-weight: 600; text-align: center; padding: .5rem 0; }
.kid-rules { margin: 0; padding-inline-start: 1.4rem; display: grid; gap: .5rem; font-size: 1.05rem; }
.chat-tl > div { padding: .5rem 0; border-bottom: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; }
/* ---- care: contrast, settings, simple mode, listen ---- */
:root[data-contrast="1"] { --bg: #ffffff; --card: #ffffff; --card2: #f2f2f2; --border: #000000; --text: #000000; --muted: #1a1a1a; --faint: #333333;
  --accent: #003d32; --accent-ink: #ffffff; --accent-soft: #d6ebe6; --safe: #0a5a26; --warn: #7a3500; --bad: #9b0000; --ring: 0 0 0 3px #000; }
:root[data-contrast="1"] .card, :root[data-contrast="1"] .btn, :root[data-contrast="1"] .input { border-width: 2px; }
:root[data-contrast="1"] a { text-decoration: underline; }
.seg { display: flex; gap: .4rem; flex-wrap: wrap; }
.seg button { border: 1px solid var(--border); background: var(--card2); border-radius: 2rem; padding: .45rem .9rem; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.switch { gap: .75rem; align-items: flex-start; cursor: pointer; }
.switch input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.listen { margin-top: .6rem; }
.simple-home { display: grid; gap: .75rem; }
.simple-go { font-size: 1.4rem; padding: 1.2rem; justify-content: center; }
.simple-go .i { width: 1.6em; height: 1.6em; }
body.simple .tiles, body.simple .apk-tile, body.simple a.card.row[href="/app/lookup"], body.simple .acc-link { display: none !important; }
body.simple .h1 { font-size: 2rem; }
body.simple .reasons li { font-size: 1.1rem; }
.lesson .lead { font-size: 1.1rem; }
details summary { cursor: pointer; padding: .35rem 0; }
/* ---- intelligence ---- */
.bulletin { white-space: pre-wrap; font: inherit; margin: 0; padding: .75rem; background: var(--card2); border-radius: var(--r); max-height: 16rem; overflow: auto; }
.heat-wrap { overflow-x: auto; }
.heat { display: grid; grid-template-columns: 3.2rem repeat(24, minmax(.9rem, 1fr)); gap: 2px; min-width: 30rem; font-size: .75rem; }
.heat .hc { height: 1.15rem; border-radius: 2px; background: color-mix(in srgb, var(--bad) calc(var(--v) * 100%), var(--card2)); }
.heat .hh { text-align: center; color: var(--faint); }
.heat .hd { color: var(--muted); align-self: center; }
.icon-btn.bell { position: relative; }
.dotn { position: absolute; top: .1rem; inset-inline-end: .1rem; min-width: 1rem; height: 1rem; padding: 0 .2rem; border-radius: 1rem; background: var(--bad); color: #fff; font-size: .65rem; line-height: 1rem; text-align: center; }

/* ---------- community: recovery plan, worker mode, waves ---------- */
.rec-clock { align-items: center; gap: 1rem; flex-wrap: wrap; }
.rec-clock > div { min-width: 11rem; }
.big-clock { display: block; white-space: nowrap; font-size: clamp(1.6rem, 7vw, 2.6rem); letter-spacing: .04em; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.steps .step { border: 1px solid var(--border); border-radius: var(--r); padding: .7rem .8rem; display: grid; gap: .5rem; }
.steps .step.done { opacity: .62; }
.steps .step.done b { text-decoration: line-through; }
.steps .step.late { border-color: var(--bad); }
.worker-rules { margin: 0; padding-inline-start: 2rem; font-size: 1.08em; line-height: 1.7; }
.worker-rules li + li { margin-top: .35rem; }
.wave { align-items: center; gap: .75rem; }

/* ---------- organisations: API docs, how it fits, poster ---------- */
.api-list { display: grid; gap: var(--gap, 1rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.api code { overflow-wrap: anywhere; }
.api pre.script { overflow-x: auto; white-space: pre; font-size: .82em; }
.flow { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; }
.flow .node { flex: 1 1 9rem; display: grid; gap: .25rem; justify-items: center; text-align: center; padding: .75rem; border: 1px solid var(--border); border-radius: var(--r); background: var(--card2); }
.flow .node svg { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.flow .arrow { align-self: center; color: var(--muted); font-size: 1.3rem; }
@media (max-width: 640px) { .flow { flex-direction: column; } .flow .arrow { transform: rotate(90deg); } }
.poster { max-width: 30rem; margin-inline: auto; text-align: center; display: grid; gap: .6rem; padding: 2rem 1.5rem; }
.poster h2 { font-size: clamp(1.8rem, 6vw, 2.4rem); margin: 0; }
.poster .en { color: var(--muted); margin: 0; }
.poster-head { display: flex; justify-content: center; align-items: center; gap: .4rem; font-size: 1.3rem; color: var(--accent); }
.poster-qr svg { width: min(70vw, 16rem); height: auto; }
.poster ol { text-align: start; margin: 0; padding-inline-start: 1.4rem; line-height: 1.7; }
.poster-url { font-size: 1.1rem; margin: 0; }
@media print {
  .no-print, nav, header.top, .side, .tabbar, .foot { display: none !important; }
  html, body { height: auto !important; overflow: visible !important; }
  .shell { display: block !important; height: auto !important; min-height: 0 !important; }
  .main { display: block !important; overflow: visible !important; padding: 0 !important; height: auto !important; }
  body, .poster { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 0 !important; }
  .poster { max-width: none; font-size: 14pt; }
  .poster-qr svg { width: 9cm; }
}
