/* DPR UI: one visual system for the department's portals (journalist portal, creator portal, monitoring portal).
   Hindi first, English beside it. Phone first, desk screens next. No build step: this file, icons.svg and fonts/ are copied as they are.
   Rules for using it are in DESIGN.md. Sections: 1 tokens · 2 base · 3 layout · 4 shells · 5 buttons · 6 forms · 7 content blocks ·
   8 status and feedback · 9 data (tables, lists, numbers, charts) · 10 overlays · 11 flows (steps, timeline, summary) · 12 helpers · 13 print */

/* ───────────── 1. tokens ───────────── */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: fallback;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("fonts/noto-sans-devanagari-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: fallback;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

:root {
  color-scheme: light;
  /* type */
  --font: "Inter", "Noto Sans Devanagari", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Nirmala UI", "Kohinoor Devanagari", sans-serif;
  --fs-xs: .8125rem;  --fs-sm: .875rem;  --fs-md: 1rem;  --fs-lg: 1.125rem;  --fs-xl: 1.375rem;  --fs-2xl: 1.75rem;  --fs-3xl: 2.25rem;  --fs-4xl: 3rem;
  --lh-tight: 1.35;  --lh-snug: 1.45;  --lh-body: 1.6;
  /* neutral: a cool grey with a little blue in it */
  --n0: #fff;  --n25: #fafbfc;  --n50: #f4f6f8;  --n100: #eaedf1;  --n200: #dde1e7;  --n300: #c5cbd5;  --n400: #98a1b0;
  --n500: #5f6979;  --n600: #4e5766;  --n700: #39414e;  --n800: #262d38;  --n900: #161b24;
  /* blue: everything that can be pressed, and "in progress" */
  --b50: #eff4ff;  --b100: #dbe6ff;  --b200: #bfd1ff;  --b300: #93b0fb;  --b400: #6088f3;  --b500: #3d66e6;  --b600: #2449d0;  --b700: #1c3aa9;  --b800: #182f84;  --b900: #142563;
  /* meaning colours: never the only signal, always with words and a mark */
  --g50: #e8f6ee;  --g100: #cfecdb;  --g500: #23915f;  --g600: #18794e;  --g700: #11633f;
  --y50: #fff6db;  --y100: #ffe9ad;  --y500: #d49b00;  --y600: #8f5f00;  --y700: #7a5200;
  --r50: #fdeceb;  --r100: #fad3d0;  --r500: #de3b2e;  --r600: #c5281c;  --r700: #a11f15;
  --v50: #f1edff;  --v100: #e0d8ff;  --v600: #5b3fc4;  --v700: #4a31a8;
  --navy: #14235a;                       /* the department band */
  /* roles */
  --canvas: var(--n50);  --surface: var(--n0);  --ink: var(--n900);  --text: var(--n800);  --muted: var(--n500);
  --line: var(--n200);  --line-soft: var(--n100);  --field-line: #7f8897;  --ctl-line: #8891a0;  --placeholder: #6a7483;
  --accent: var(--b600);  --accent-hover: var(--b700);  --accent-press: var(--b800);  --accent-soft: var(--b50);
  --focus: 0 0 0 3px var(--n0), 0 0 0 6px var(--b500);
  /* shape */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 20px;  --r-full: 999px;
  --shadow-1: 0 1px 2px rgb(22 27 36 / .05);
  --shadow-2: 0 4px 14px rgb(22 27 36 / .08), 0 1px 3px rgb(22 27 36 / .06);
  --shadow-3: 0 18px 48px rgb(22 27 36 / .18), 0 4px 12px rgb(22 27 36 / .08);
  /* space: 4-point scale */
  --s1: 4px;  --s2: 8px;  --s3: 12px;  --s4: 16px;  --s5: 20px;  --s6: 24px;  --s8: 32px;  --s10: 40px;  --s12: 48px;  --s16: 64px;
  --gutter: 16px;
  --side-w: 256px;  --topbar-h: 60px;  --tabbar-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ───────────── 2. base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: var(--lh-body); color: var(--text); background: var(--canvas);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "calt", "cv05", "cv08"; }
h1, h2, h3, h4, h5, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: var(--lh-tight); text-wrap: balance; }
h1 { font-size: var(--fs-2xl); }  h2 { font-size: var(--fs-xl); }  h3 { font-size: var(--fs-lg); }  h4 { font-size: var(--fs-md); }
p { text-wrap: pretty; }
a { color: var(--b700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--b800); text-decoration-thickness: 2px; }
img, svg, video { max-width: 100%; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: var(--b200); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
.icon { width: 20px; height: 20px; flex: none; stroke-width: 2; vertical-align: -0.2em; }
.icon-sm { width: 16px; height: 16px; }  .icon-lg { width: 24px; height: 24px; }  .icon-xl { width: 32px; height: 32px; stroke-width: 1.75; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ───────────── 3. layout ───────────── */
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack-2 { gap: var(--s2); }  .stack-3 { gap: var(--s3); }  .stack-5 { gap: var(--s5); }  .stack-6 { gap: var(--s6); }  .stack-8 { gap: var(--s8); }
.row { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.row-wrap { flex-wrap: wrap; }  .row-between { justify-content: space-between; }  .row-end { justify-content: flex-end; }  .row-top { align-items: flex-start; }
.grow { flex: 1 1 0; min-width: 0; }
.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }   /* main column + a narrower side column */
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }  .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }  .grid-2.keep, .grid-3.keep { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ───────────── 4. shells ───────────── */
/* 4a. public pages (journalists, creators, anyone checking a pass): one narrow column, the department band on top */
.gov-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.gov-bar-in { max-width: 1040px; margin: 0 auto; padding: 10px max(var(--gutter), env(safe-area-inset-right, 0px)) 10px max(var(--gutter), env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: var(--s3); min-height: 60px; }
.gov-mark { width: 40px; height: 40px; flex: none; border-radius: var(--r-md); background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); }
img.gov-mark { background: none; border-radius: 0; object-fit: contain; }
.gov-name { min-width: 0; line-height: 1.3; }
.gov-name b { display: block; color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }
.gov-name span { display: block; color: var(--muted); font-size: var(--fs-sm); }
.gov-bar .lang { margin-left: auto; }
/* A long English department name beside the switch took four lines on a phone: keep the name, drop the second line there. */
@media (max-width: 480px) { :lang(en) .gov-name span, [data-lang="en"] .gov-name span { display: none; }  .gov-name b { text-wrap: balance; } }
.page { max-width: 1040px; margin: 0 auto; padding: var(--s6) max(var(--gutter), env(safe-area-inset-right, 0px)) var(--s12) max(var(--gutter), env(safe-area-inset-left, 0px)); }
.page-narrow { max-width: 560px; margin-inline: auto; }
.page-read { max-width: 680px; margin-inline: auto; }
.gov-foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: var(--fs-sm); }
.gov-foot-in { max-width: 1040px; margin: 0 auto; padding: var(--s5) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(var(--s6) + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: center; }
.gov-foot a { color: var(--n700); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: calc(-1 * var(--s2)) 0 var(--s2) -4px; padding: 0 8px 0 4px; color: var(--n700); font-weight: 500; text-decoration: none; border-radius: var(--r-md); background: none; border: 0; }
.back:hover { color: var(--ink); background: var(--n100); }
.public { background: var(--surface); }            /* body class for public pages: white ground, less boxing */

/* 4b. consoles (officers, desk staff, administrators): side menu on wide screens, bottom bar on phones */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); z-index: 30; }
.brand { display: flex; align-items: center; gap: var(--s3); padding: 14px var(--s4); min-height: var(--topbar-h); text-decoration: none; color: inherit; }
.brand-name { min-width: 0; line-height: 1.25; }
.brand-name b { display: block; color: var(--ink); font-size: var(--fs-sm); font-weight: 700; }
.brand-name span { display: block; color: var(--muted); font-size: var(--fs-xs); }
.nav { flex: 1; overflow-y: auto; padding: var(--s2) var(--s3) var(--s4); display: flex; flex-direction: column; gap: 2px; }
.nav-group { padding: var(--s4) var(--s3) 6px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: var(--s3); min-height: 40px; padding: 8px var(--s3); border-radius: var(--r-md); color: var(--n700); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; line-height: 1.3; background: none; border: 0; width: 100%; text-align: start; }
.nav-item .icon { color: var(--n500); }
.nav-item:hover { background: var(--n50); color: var(--ink); }
.nav-item.is-active, .nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--b800); font-weight: 600; }
.nav-item.is-active .icon, .nav-item[aria-current="page"] .icon { color: var(--b600); }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-full); background: var(--n100); color: var(--n700); font-size: var(--fs-xs); font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-count.is-hot { background: var(--r600); color: #fff; }
.side-foot { border-top: 1px solid var(--line); padding: var(--s3); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s3); min-height: var(--topbar-h); padding: 0 var(--s6); background: rgb(255 255 255 / .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar-brand { display: none; align-items: center; gap: var(--s3); min-width: 0; color: inherit; text-decoration: none; }
.topbar-brand b { color: var(--ink); font-size: var(--fs-sm); font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-brand .gov-mark { width: 34px; height: 34px; font-size: var(--fs-xs); border-radius: 8px; }
.topbar-search { flex: 1 1 auto; max-width: 440px; }
.topbar-search .input { min-height: 40px; padding-block: 6px; background: var(--n50); border-color: transparent; }
.topbar-search .input:hover { border-color: var(--n300); }
.topbar-search .input:focus { background: var(--surface); border-color: var(--b600); }
.icon-btn.topbar-search-btn { display: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.content { padding: var(--s6); max-width: 1320px; width: 100%; margin: 0 auto; flex: 1; }
.content-narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 64ch; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .btn:not(.btn-sm):not(.btn-lg) { min-height: 48px; }  .chip:not(.chip-sm) { min-height: 44px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s var(--ease); box-shadow: var(--shadow-3); }
  .side.is-open { transform: none; }
  .topbar-brand { display: flex; }
  .topbar .topbar-search { display: none; }
  .icon-btn.topbar-search-btn { display: inline-grid; }
  .topbar { padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px)); }
  .content { padding: var(--s5) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(var(--tabbar-h) + var(--s8) + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); }
  .page-head h1 { font-size: var(--fs-xl); }
  .tabbar { position: fixed; inset: auto 0 0 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tabbar-h); padding: 6px 2px; background: none; border: 0; color: var(--n600); font-size: var(--fs-xs); font-weight: 500; line-height: 1.35; text-decoration: none; }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar .is-active, .tabbar [aria-current="page"] { color: var(--b700); font-weight: 600; }
  .tabbar .dot { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-full); background: var(--r600); color: #fff; font-size: .6875rem; font-weight: 700; display: grid; place-items: center; }
}
.scrim { position: fixed; inset: 0; background: rgb(22 27 36 / .45); z-index: 28; }

/* ───────────── 5. buttons ───────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 8px 18px; border: 1px solid transparent; border-radius: var(--r-md);
  font-size: var(--fs-md); font-weight: 600; line-height: 1.5; text-decoration: none; white-space: nowrap; background: var(--n100); color: var(--ink); transition: background .12s, border-color .12s, color .12s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--n200); color: var(--ink); }
.btn:focus-visible { border-radius: var(--r-md); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }  .btn-primary:active { background: var(--accent-press); }
.btn-secondary { background: var(--surface); border-color: var(--n300); color: var(--ink); }
.btn-secondary:hover { background: var(--n50); border-color: var(--n400); }
.btn-ghost { background: transparent; color: var(--b700); padding-inline: 12px; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--b800); }
.btn-good { background: var(--g600); color: #fff; }  .btn-good:hover { background: var(--g700); color: #fff; }
.btn-danger { background: var(--r600); color: #fff; }  .btn-danger:hover { background: var(--r700); color: #fff; }
.btn-danger-quiet { background: var(--surface); border-color: var(--r100); color: var(--r700); }  .btn-danger-quiet:hover { background: var(--r50); border-color: var(--r500); color: var(--r700); }
.btn-lg { min-height: 52px; padding: 10px 24px; font-size: 1.0625rem; border-radius: 12px; }
.btn-sm { min-height: 36px; padding: 4px 12px; font-size: var(--fs-sm); border-radius: 8px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--n300); border-top-color: var(--n700); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: var(--r-md); background: none; color: var(--n600); }
.icon-btn:hover { background: var(--n100); color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; color: var(--b700); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link-btn:hover { color: var(--b800); text-decoration-thickness: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }
/* the action row at the end of a form or a screen; add .is-stuck only where the action belongs to the whole screen (a decision, a selection) */
.actionbar { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); }
.actionbar .btn { flex: 1 1 auto; }
.actionbar.is-stuck { position: sticky; bottom: 0; z-index: 15; margin: var(--s6) calc(-1 * var(--gutter)) 0; padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom, 0px)); background: rgb(255 255 255 / .96); border-top: 1px solid var(--line); }
@media (min-width: 721px) { .actionbar .btn { flex: none; min-width: 168px; } }

/* ───────────── 6. forms ───────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { color: var(--ink); font-weight: 600; font-size: var(--fs-md); line-height: 1.4; }
.label .opt { color: var(--muted); font-weight: 400; font-size: var(--fs-sm); margin-inline-start: 6px; }
.hint { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.error { display: flex; gap: 6px; align-items: flex-start; color: var(--r700); font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; }
.error .icon { width: 18px; height: 18px; margin-top: 2px; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-md); font-size: var(--fs-md); line-height: 1.5; color: var(--ink); transition: border-color .12s, box-shadow .12s; appearance: none; -webkit-appearance: none; }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n700); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--b600); box-shadow: 0 0 0 3px var(--b200); }
.textarea { min-height: 112px; resize: vertical; }
.select { padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234e5766' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field.is-error .input, .field.is-error .select, .field.is-error .textarea, .input[aria-invalid="true"] { border-color: var(--r600); box-shadow: inset 0 0 0 1px var(--r600); }
.input-sm, .select-sm { min-height: 40px; padding-block: 6px; font-size: var(--fs-sm); }
.input-w-s { max-width: 9rem; }  .input-w-m { max-width: 16rem; }  .input-w-l { max-width: 26rem; }
.input-otp { max-width: 15rem; font-size: 1.625rem; font-weight: 600; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; padding-inline: 8px; }
.input-group { display: flex; align-items: stretch; }
.input-group .affix { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--field-line); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--n50); color: var(--n700); font-weight: 500; }
.input-group .input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--n500); pointer-events: none; }
.search .input { padding-left: 40px; border-color: var(--n300); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
/* one of several / several of several: whole row is the target */
.choices { display: flex; flex-direction: column; gap: var(--s2); }
.choice { display: flex; align-items: flex-start; gap: var(--s3); min-height: 52px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--ctl-line); border-radius: var(--r-md); cursor: pointer; line-height: 1.45; transition: border-color .12s, background .12s; }
.choice:hover { border-color: var(--n700); }
.choice input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--b600); }
.choice:has(input:checked) { border-color: var(--b600); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--b600); }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice small { display: block; color: var(--muted); font-size: var(--fs-sm); }
.check { display: flex; align-items: flex-start; gap: var(--s3); cursor: pointer; line-height: 1.5; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--b600); }
/* short options side by side (media type, platform, category) */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; background: var(--surface); border: 1px solid var(--ctl-line); border-radius: var(--r-full); color: var(--n800); font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; cursor: pointer; user-select: none; transition: background .12s, border-color .12s; }
.chip:hover { border-color: var(--n700); }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip:has(input:checked), .chip.is-on, .chip[aria-pressed="true"] { background: var(--b600); border-color: var(--b600); color: #fff; }
button.chip { font: inherit; font-size: var(--fs-sm); font-weight: 500; }
.chip:has(input:focus-visible) { box-shadow: var(--focus); }
.chip-sm { min-height: 32px; padding: 3px 12px; }
/* two or three exclusive views of the same thing */
.seg { display: inline-flex; padding: 3px; background: var(--n100); border-radius: var(--r-md); gap: 2px; }
.seg button, .seg a, .seg label { min-height: 34px; padding: 4px 14px; border: 0; border-radius: 8px; background: none; color: var(--n700); font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.seg .is-on, .seg [aria-pressed="true"], .seg [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.lang { display: inline-flex; padding: 3px; background: var(--n100); border-radius: var(--r-full); }
.lang button, .lang a { min-width: 56px; min-height: 34px; padding: 4px 12px; border: 0; border-radius: var(--r-full); background: none; color: var(--n700); font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; text-decoration: none; display: grid; place-items: center; }
.lang .is-on, .lang [aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
@media (max-width: 900px) { .lang button, .lang a { min-height: 40px; } }   /* after the base rule, so it wins on phones */
/* a photo or a document */
.upload { display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s6) var(--s4); background: var(--n25); border: 1.5px dashed var(--n400); border-radius: var(--r-lg); text-align: center; }
.upload .icon-xl { color: var(--b600); }
.upload-title { font-weight: 600; color: var(--ink); }
.upload.is-over { border-color: var(--b600); background: var(--accent-soft); }
.file { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.file-thumb { width: 56px; height: 56px; flex: none; border-radius: var(--r-md); object-fit: cover; background: var(--n100); display: grid; place-items: center; color: var(--n500); }
.file-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--muted); font-size: var(--fs-sm); }
.file.is-done { border-color: var(--g100); background: linear-gradient(0deg, var(--g50), var(--g50)); }
.form { display: flex; flex-direction: column; gap: var(--s6); }
.form-grid { display: grid; gap: var(--s5) var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* ───────────── 7. content blocks ───────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.card-pad { padding: var(--s5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line-soft); min-height: 56px; }
.card-title { font-size: var(--fs-md); font-weight: 600; color: var(--ink); line-height: 1.35; }
.card-body { padding: var(--s5); }
.card-foot { padding: var(--s3) var(--s5); border-top: 1px solid var(--line-soft); color: var(--muted); font-size: var(--fs-sm); }
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.card-link:hover { border-color: var(--n400); box-shadow: var(--shadow-2); color: inherit; }
.eyebrow { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.eyebrow:lang(en) { letter-spacing: .04em; text-transform: uppercase; }
.lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--n700); }
.muted { color: var(--muted); }  .small { font-size: var(--fs-sm); }  .tiny { font-size: var(--fs-xs); }  .strong { font-weight: 600; color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; background: var(--b100); color: var(--b800); display: inline-grid; place-items: center; font-weight: 600; font-size: var(--fs-sm); line-height: 1; overflow: hidden; }
.avatar-sm { width: 32px; height: 32px; font-size: var(--fs-xs); }  .avatar-lg { width: 56px; height: 56px; font-size: var(--fs-lg); }  .avatar-xl { width: 88px; height: 88px; font-size: var(--fs-2xl); }
.avatar-sq { border-radius: var(--r-md); }
.pf { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 6px; color: #fff; font-size: .6875rem; font-weight: 700; line-height: 1; letter-spacing: 0; }
.pf-x { background: #111; }  .pf-fb { background: #1463cc; }  .pf-ig { background: #b8317f; }  .pf-yt { background: #d92315; }  .pf-wa { background: #128c4a; }  .pf-ot { background: var(--n500); }
.kv { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr); gap: 10px var(--s4); }
.kv dt { color: var(--muted); font-size: var(--fs-sm); }
.kv dd { color: var(--ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); min-height: 60px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; min-width: 0; background: none; border-inline: 0; border-top: 0; width: 100%; text-align: start; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover { background: var(--n25); color: inherit; }
.list-item.is-active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--b600); }
.list-title { font-weight: 600; color: var(--ink); line-height: 1.35; }
.list-meta { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.list-end { margin-left: auto; display: flex; align-items: center; gap: var(--s2); flex: none; color: var(--n400); }
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s10) var(--s5); text-align: center; color: var(--muted); }
.empty .icon-xl { color: var(--n400); margin-bottom: var(--s2); }
.empty-title { color: var(--ink); font-weight: 600; font-size: var(--fs-lg); }
.empty p { max-width: 44ch; }
.help { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.help > summary { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); min-height: 48px; font-weight: 600; color: var(--b700); cursor: pointer; list-style: none; }
.help > summary::-webkit-details-marker { display: none; }
.help > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.help[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.help > div { padding: 0 var(--s4) var(--s4); }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s4); }
.prose ul { list-style: disc; padding-left: 1.25rem; }  .prose ol { list-style: decimal; padding-left: 1.4rem; }
.prose li + li { margin-top: 6px; }

/* ───────────── 8. status and feedback ───────────── */
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px 2px 9px; border-radius: var(--r-full); background: var(--n100); color: var(--n700); font-size: var(--fs-xs); font-weight: 600; line-height: 1.3; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status.no-dot::before { display: none; }
.status-new { background: var(--b50); color: var(--b700); }
.status-wait { background: var(--y50); color: var(--y700); }
.status-ok { background: var(--g50); color: var(--g700); }
.status-bad { background: var(--r50); color: var(--r700); }
.status-up { background: var(--v50); color: var(--v700); }
.status-off { background: var(--n100); color: var(--n600); }
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 1px 8px; border-radius: var(--r-sm); background: var(--n100); color: var(--n700); font-size: var(--fs-xs); font-weight: 600; line-height: 1.3; white-space: nowrap; }
.tag-blue { background: var(--b50); color: var(--b700); }  .tag-green { background: var(--g50); color: var(--g700); }  .tag-amber { background: var(--y50); color: var(--y700); }  .tag-red { background: var(--r50); color: var(--r700); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-full); background: var(--n100); color: var(--n700); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.notice { display: flex; gap: var(--s3); align-items: flex-start; padding: 14px var(--s4); border: 1px solid var(--b200); border-radius: var(--r-lg); background: var(--b50); color: var(--n800); line-height: 1.5; }
.notice > .icon { color: var(--b600); margin-top: 2px; }
.notice-title { font-weight: 600; color: var(--ink); }
.notice-good { border-color: var(--g100); background: var(--g50); }  .notice-good > .icon { color: var(--g600); }
.notice-warn { border-color: var(--y100); background: var(--y50); }  .notice-warn > .icon { color: var(--y600); }
.notice-bad { border-color: var(--r100); background: var(--r50); }  .notice-bad > .icon { color: var(--r600); }
.notice-plain { border-color: var(--line); background: var(--n25); }  .notice-plain > .icon { color: var(--n500); }
.error-summary { padding: var(--s4) var(--s5); border: 2px solid var(--r600); border-radius: var(--r-lg); background: var(--surface); }
.error-summary h2 { font-size: var(--fs-lg); margin-bottom: var(--s2); }
.error-summary a { color: var(--r700); font-weight: 600; }
.error-summary li + li { margin-top: 4px; }
.banner { display: flex; align-items: center; justify-content: center; gap: var(--s2); padding: 8px var(--gutter); background: var(--y50); color: var(--y700); border-bottom: 1px solid var(--y100); font-size: var(--fs-sm); font-weight: 500; text-align: center; line-height: 1.4; }
.toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--s2); width: min(92vw, 420px); pointer-events: none; }
.has-tabbar .toasts { bottom: calc(var(--tabbar-h) + var(--s4) + env(safe-area-inset-bottom, 0px)); }
.toast { display: flex; align-items: center; gap: var(--s3); padding: 12px var(--s4); border-radius: var(--r-lg); background: var(--n900); color: #fff; font-size: var(--fs-sm); font-weight: 500; line-height: 1.45; box-shadow: var(--shadow-3); pointer-events: auto; animation: rise .22s var(--ease); }
.toast .icon { color: #7ee2a8; }
.toast.is-bad .icon { color: #ffa198; }
.toast .link-btn { color: #fff; margin-left: auto; white-space: nowrap; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.skel { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--n100) 25%, var(--n50) 37%, var(--n100) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; color: transparent; user-select: none; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--n200); border-top-color: var(--b600); animation: spin .7s linear infinite; }

/* ───────────── 9. data ───────────── */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: var(--s2); min-height: 46px; padding: 10px 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--n600); font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active, .tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--b700); border-bottom-color: var(--b600); }
.tab.is-active .count, .tab[aria-selected="true"] .count { background: var(--b100); color: var(--b800); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.toolbar .search { flex: 1 1 260px; max-width: 460px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); line-height: 1.45; }
.table th { padding: 10px var(--s4); text-align: start; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--n25); }
.table th:first-child { border-top-left-radius: var(--r-lg); }  .table th:last-child { border-top-right-radius: var(--r-lg); }
.table td { padding: 12px var(--s4); border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--n800); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--n25); }
.table tbody tr.is-link { cursor: pointer; }
.table .num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table .cell-main { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.table .cell-main > div { min-width: 0; }
.table .cell-main > div > b { display: block; color: var(--ink); font-weight: 600; }
.table .cell-main > div > span { display: block; color: var(--muted); font-size: var(--fs-xs); }
.table tfoot td { font-weight: 700; color: var(--ink); background: var(--n25); border-top: 1px solid var(--line); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--line-soft); color: var(--muted); font-size: var(--fs-sm); }
/* on a phone a table row becomes two short lines: who or what (td.cell-first) with its state at the end (td.cell-end), then the other
   cells in one quiet line. A cell that needs its heading carries it in data-label ("श्रेणी B", "पोस्ट 412"). td.cell-hide is left out. */
@media (max-width: 720px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tfoot { display: block; width: 100%; }
  .table-cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-soft); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards tr::before { content: ""; flex-basis: 100%; height: 0; order: 2; }
  .table-cards td { display: block; order: 3; padding: 0; border: 0; background: none !important; color: var(--muted); font-size: var(--fs-sm); text-align: start !important; }
  .table-cards td.cell-first { order: 0; flex: 1 1 0; min-width: 0; color: var(--n800); }
  .table-cards td.cell-end { order: 1; margin-left: auto; }
  .table-cards td.cell-hide { display: none; }
  .table-cards td.cell-first ~ td:not(.cell-end):not(.cell-hide) ~ td:not(.cell-end):not(.cell-hide)::before { content: "· "; }
  .table-cards td[data-label]::after { content: none; }
  .table-cards td[data-label] > .lbl { display: inline; }
  .table-cards.has-avatar td.cell-first + td { margin-left: 44px; }
  .table-cards .tag { min-height: 0; padding: 0; background: none; color: inherit; font-weight: 500; font-size: inherit; }
  .table-cards td .bar { display: none; }
  .table-cards td .row { display: inline; }
}
.table .lbl { display: none; }
.pager { display: flex; align-items: center; gap: var(--s2); }
.bulkbar { position: sticky; bottom: var(--s4); z-index: 12; display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s4); padding: 10px var(--s4); border-radius: var(--r-lg); background: var(--n900); color: #fff; box-shadow: var(--shadow-3); font-size: var(--fs-sm); font-weight: 500; }
.bulkbar .btn { background: #fff; color: var(--ink); }
.bulkbar .btn-ghost { background: none; color: #fff; }
.bulkbar > :first-child { margin-right: auto; }
@media (max-width: 900px) { .bulkbar { bottom: calc(var(--tabbar-h) + var(--s3) + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 720px) { .bulkbar > :first-child { flex-basis: 100%; }  .bulkbar .btn { flex: 1 1 0; min-width: 0; padding-inline: 8px; } }
/* numbers people read first */
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; line-height: 1.4; }
.stat-value { color: var(--ink); font-size: var(--fs-2xl); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-value.is-hero { font-size: clamp(2.75rem, 6vw, 4rem); }
.stat-value small { font-size: .5em; font-weight: 600; color: var(--muted); }
.stat-sub { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; background: var(--n100); color: var(--n700); }
.delta-up { background: var(--g50); color: var(--g700); }  .delta-down { background: var(--r50); color: var(--r700); }
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--s6); background: radial-gradient(120% 150% at 100% 0%, #2a3f96 0%, var(--navy) 58%); color: #fff; }
.hero h2, .hero h3 { color: #fff; }
.hero .bar { background: rgb(255 255 255 / .18); }
.hero .bar > i { background: #fff; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s6); align-items: end; }
.hero-facts { display: flex; gap: var(--s6); }
.hero-facts b { display: block; font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hero-facts span { display: block; color: rgb(255 255 255 / .78); font-size: var(--fs-sm); }
@media (max-width: 720px) { .hero { padding: var(--s5); }  .hero-split { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }  .hero-facts { gap: var(--s5); } }
.hero .stat-label, .hero .stat-sub { color: rgb(255 255 255 / .78); }
.hero .stat-value { color: #fff; }
.hero .btn { background: #fff; color: var(--navy); }
.hero .btn:hover { background: var(--b50); }
/* simple charts drawn with boxes: a share bar, rows of bars, a ring, a row of days */
.bar { height: 8px; border-radius: var(--r-full); background: var(--n100); overflow: hidden; display: flex; gap: 2px; }
.bar > i { display: block; height: 100%; background: var(--b600); border-radius: var(--r-full); min-width: 2px; }
.bar-lg { height: 12px; }
.bars { display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr) max-content; gap: 10px var(--s3); align-items: center; font-size: var(--fs-sm); }
.bars .num { font-weight: 600; color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-sm); color: var(--n700); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.ring { --p: 0; --ring: var(--b600); width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--n100) 0); position: relative; font-weight: 700; color: var(--ink); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring > span { position: relative; }
.days { display: flex; align-items: flex-end; gap: 4px; height: 72px; }
.days i { flex: 1; min-width: 4px; border-radius: 3px 3px 0 0; background: var(--b400); min-height: 2px; }
.days i.is-now { background: var(--b800); }
.c1 { background: var(--b600) !important; }  .c2 { background: #0e9384 !important; }  .c3 { background: #b54708 !important; }  .c4 { background: #7a5af8 !important; }  .c5 { background: #c11574 !important; }  .c0 { background: var(--n300) !important; }

/* ───────────── 10. overlays ───────────── */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: var(--s4); background: rgb(22 27 36 / .5); animation: fade .15s ease; }
.dialog { width: min(100%, 480px); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); padding: var(--s6); animation: rise .2s var(--ease); }
.dialog-wide { width: min(100%, 720px); }
.dialog h2 { font-size: var(--fs-xl); margin-bottom: var(--s2); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3); margin-top: var(--s6); }
.drawer { position: fixed; z-index: 61; inset: 0 0 0 auto; width: min(100vw, 520px); background: var(--surface); box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slide-in .22s var(--ease); }
.drawer-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4) var(--s3) var(--s5); border-bottom: 1px solid var(--line); min-height: var(--topbar-h); }
.drawer-head h2 { font-size: var(--fs-lg); flex: 1; min-width: 0; }
.drawer-body { flex: 1; overflow: auto; padding: var(--s5); }
.drawer-foot { padding: var(--s3) var(--s5) calc(var(--s3) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; gap: var(--s3); justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 720px) {
  .overlay { align-items: end; padding: 0; }
  .dialog { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--s5) var(--gutter) calc(var(--s5) + env(safe-area-inset-bottom, 0px)); animation: sheet-in .24s var(--ease); }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
@keyframes sheet-in { from { transform: translateY(32px); opacity: 0; } }
.menu { position: absolute; z-index: 40; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.menu button, .menu a { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--n800); font-size: var(--fs-sm); font-weight: 500; text-align: start; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--n50); }

/* the browser's own <dialog class="dialog"> opened with showModal(): it keeps the keyboard inside, closes on Escape and dims the page by itself. Preferred over .overlay */
dialog.dialog { border: 0; margin: auto; color: var(--text); }
dialog.dialog::backdrop { background: rgb(22 27 36 / .5); }
.dialog-head { display: flex; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s2); }
.dialog-head h2 { flex: 1; min-width: 0; margin: 0; padding-top: 4px; }
.dialog-head .icon-btn { margin: -4px -8px 0 0; }
.dialog-body { margin-top: var(--s3); }
@media (max-width: 720px) { dialog.dialog { margin: auto 0 0; max-width: none; width: 100%; max-height: calc(100dvh - 24px); } }
.tip { position: fixed; z-index: 90; padding: 4px 8px; border-radius: 6px; background: var(--n900); color: #fff; font-size: var(--fs-xs); font-weight: 500; line-height: 1.4; pointer-events: none; white-space: nowrap; }

/* ───────────── 11. flows ───────────── */
.steps { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s5); }
.steps-text { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.progress { height: 6px; border-radius: var(--r-full); background: var(--n100); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: var(--r-full); background: var(--b600); transition: width .3s var(--ease); }
/* what has happened and what comes next */
.timeline { display: flex; flex-direction: column; }
.tl { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s3); padding-bottom: var(--s5); }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--n200); }
.tl:last-child::before { display: none; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--n300); color: var(--n400); position: relative; z-index: 1; }
.tl-dot .icon { width: 16px; height: 16px; }
.tl-title { font-weight: 600; color: var(--n600); line-height: 1.4; padding-top: 2px; }
.tl-meta { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.tl.is-done .tl-dot { background: var(--g600); border-color: var(--g600); color: #fff; }
.tl.is-done::before { background: var(--g600); }
.tl.is-done .tl-title { color: var(--ink); }
.tl.is-now .tl-dot { border-color: var(--b600); background: var(--b600); color: #fff; box-shadow: 0 0 0 4px var(--b100); }
.tl.is-now .tl-title { color: var(--ink); }
.tl.is-bad .tl-dot { background: var(--r600); border-color: var(--r600); color: #fff; }
.tl.is-warn .tl-dot { background: var(--y500); border-color: var(--y500); color: #fff; box-shadow: 0 0 0 4px var(--y100); }
/* answers before sending: question, answer, change */
.summary { border-top: 1px solid var(--line); }
.summary-row { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto; gap: var(--s2) var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); align-items: start; }
.summary-row dt { color: var(--muted); }
.summary-row dd { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 560px) { .summary-row { grid-template-columns: minmax(0, 1fr) auto; }  .summary-row dt { grid-column: 1 / -1; font-size: var(--fs-sm); margin-bottom: -4px; } }
/* sections of a long job, each with its own state */
.tasks { border-top: 1px solid var(--line); }
.task { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 60px; }
a.task:hover .task-name { text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 720px) { .task { flex-wrap: wrap; row-gap: var(--s2); }  .task-name { flex-basis: 100%; } }
.task-name { flex: 1; min-width: 0; font-weight: 600; color: var(--b700); line-height: 1.4; }
.task-name small { display: block; color: var(--muted); font-weight: 400; font-size: var(--fs-sm); }
/* the page after a job is done */
.done-panel { padding: var(--s8) var(--s5); border-radius: var(--r-xl); background: var(--g600); color: #fff; text-align: center; }
.done-panel h1 { color: #fff; font-size: var(--fs-2xl); }
.done-panel .ref { margin-top: var(--s3); font-size: var(--fs-sm); opacity: .9; }
.done-panel .ref b { display: block; margin-top: 2px; font-size: var(--fs-2xl); letter-spacing: .02em; font-variant-numeric: tabular-nums; opacity: 1; }
.howto { counter-reset: n; display: flex; flex-direction: column; gap: var(--s4); }
.howto > li { counter-increment: n; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.howto > li::before { content: counter(n); width: 32px; height: 32px; border-radius: 50%; background: var(--b50); color: var(--b700); font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.howto b { display: block; color: var(--ink); }
.howto span { color: var(--muted); font-size: var(--fs-sm); }

/* the work queue: a list on the left, the chosen item on the right; on a phone the list first, then the item as its own screen */
.ld { display: grid; grid-template-columns: minmax(300px, 384px) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.ld-list { position: sticky; top: calc(var(--topbar-h) + var(--s4)); max-height: calc(100dvh - var(--topbar-h) - var(--s8)); overflow: auto; }
.ld-detail { min-width: 0; }
@media (max-width: 1100px) { .ld { grid-template-columns: minmax(0, 1fr); }  .ld-list { position: static; max-height: none; }  .ld.is-open .ld-list { display: none; }  .ld:not(.is-open) .ld-detail { display: none; } }
.idbar { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.idbar h2 { font-size: var(--fs-xl); }
.idbar-meta { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
@media (max-width: 720px) { .idbar { align-items: flex-start; gap: var(--s3); }  .idbar .avatar-xl { width: 64px; height: 64px; font-size: var(--fs-xl); }  .idbar h2 { font-size: var(--fs-lg); } }
/* where a decision is taken: stays in view under the item */
.decide { position: sticky; bottom: 0; z-index: 14; display: flex; align-items: center; justify-content: flex-end; gap: var(--s3); padding: var(--s3) var(--s5); background: rgb(255 255 255 / .96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.decide > :first-child { margin-right: auto; }
.decide > :only-child { margin-right: 0; }
@media (max-width: 720px) { .decide { flex-wrap: wrap; padding-inline: var(--s4); gap: var(--s2); padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px)); border-radius: 0; margin-inline: 0; }  .decide .btn { flex: 1 1 0; min-width: 0; }  .decide > :first-child { margin-right: 0; }  .decide .btn-good, .decide .btn-primary { order: -1; flex-basis: 100%; min-height: 48px; } }
@media (max-width: 900px) { .has-detail .tabbar { display: none; }  .has-detail .content { padding-bottom: 0; }  .has-detail .ld-detail { border-radius: var(--r-lg) var(--r-lg) 0 0; }  .has-detail .toasts { bottom: 140px; } }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--s3); }
@media (max-width: 720px) { .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); } }
.thumb { display: block; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--n50); color: inherit; text-decoration: none; }
.thumb:hover { border-color: var(--n400); }
.thumb img, .thumb .ph { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--n100); }
.thumb span { display: block; padding: 6px 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--n700); background: var(--surface); border-top: 1px solid var(--line-soft); }
.media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--n200); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media .pf { position: absolute; left: 8px; top: 8px; }
.media .play { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; background: rgb(22 27 36 / .72); color: #fff; display: grid; place-items: center; }
/* a job in a few named stages (who, what, check and send) */
.stepper { display: flex; gap: var(--s2); counter-reset: st; }
.stepper li { flex: 1; counter-increment: st; display: flex; align-items: center; gap: var(--s2); padding: 10px var(--s3); border-radius: var(--r-md); background: var(--n100); color: var(--n600); font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; min-width: 0; }
.stepper li::before { content: counter(st); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); color: var(--n700); display: grid; place-items: center; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.stepper li.is-now { background: var(--b600); color: #fff; }
.stepper li.is-now::before { color: var(--b700); }
.stepper li.is-done { background: var(--g50); color: var(--g700); }
.stepper li.is-done::before { content: "✓"; background: var(--g600); color: #fff; }
@media (max-width: 720px) { .stepper li:not(.is-now) span { display: none; }  .stepper li:not(.is-now) { flex: none; } }
.bubble { max-width: 320px; padding: 10px 12px 8px; border-radius: 4px 14px 14px 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); font-size: var(--fs-sm); line-height: 1.55; color: var(--n800); overflow-wrap: anywhere; }
.bubble-wrap { padding: var(--s4); border-radius: var(--r-lg); background: #e9efe6; }
.bubble time { display: block; text-align: end; color: var(--muted); font-size: .6875rem; margin-top: 2px; }
.checklist { display: flex; flex-direction: column; }
.checklist .check { padding: 10px 0; border-bottom: 1px solid var(--line-soft); min-height: 44px; align-items: center; }
.checklist .check:last-child { border-bottom: 0; }
.rate { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.rate label { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-height: 64px; border: 1px solid var(--ctl-line); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-xs); font-weight: 600; color: var(--n700); text-align: center; line-height: 1.25; cursor: pointer; }
.rate label b { font-size: var(--fs-lg); color: var(--ink); font-variant-numeric: tabular-nums; }
.rate input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rate label:has(input:checked) { border-color: var(--b600); background: var(--b600); color: #fff; }
.rate label:has(input:checked) b { color: #fff; }

/* several numbers inside one card, divided by hairlines: fewer boxes than a card per number */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpis > * { background: var(--surface); padding: var(--s4) var(--s5); min-width: 0; color: inherit; text-decoration: none; }
.kpis > a:hover { background: var(--n25); }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis, .kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }  .kpis-3 > :last-child { grid-column: 1 / -1; }  .kpis > * { padding: var(--s3) var(--s4); } }
.rank { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--n100); color: var(--n700); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-1 { background: #fde68a; color: #6b4700; }  .rank-2 { background: #e2e6ec; color: #39414e; }  .rank-3 { background: #f6d5bd; color: #7a3a12; }
.stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.stars .icon { width: 16px; height: 16px; color: #b98600; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.filter { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border: 1px solid var(--n300); border-radius: var(--r-full); background: var(--surface); color: var(--n800); font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; white-space: nowrap; }
.filter:hover { border-color: var(--n700); }
.filter.is-on { background: var(--b50); border-color: var(--b300); color: var(--b800); font-weight: 600; }
.filter .icon { width: 16px; height: 16px; }
/* consoles on desk screens are a little denser than public pages; on phones sizes stay at the touch sizes */
@media (min-width: 901px) {
  .app { --fs-md: .9375rem; --fs-lg: 1.0625rem; font-size: var(--fs-md); }
  .app .btn { min-height: 40px; padding: 6px 16px; }
  .app .btn-lg { min-height: 48px; padding: 8px 22px; }
  .app .btn-sm { min-height: 32px; padding: 2px 12px; }
  .app .input, .app .select { min-height: 42px; padding-block: 7px; }
  .app .choice { min-height: 46px; padding-block: 10px; }
}

.thumb .ph { display: grid; place-items: center; color: var(--n400); }
.pad-3 { padding: var(--s3); }
.choices-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .choices-row { grid-template-columns: minmax(0, 1fr); } }
.choice b { color: var(--ink); }
.days-labels { display: flex; gap: 4px; margin-top: 6px; }
.days-labels span { flex: 1; min-width: 0; text-align: center; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; }
.days-labels.is-ends { justify-content: space-between; }
.days-labels.is-ends span { flex: none; overflow: visible; }
.hero .stat-value small { color: rgb(255 255 255 / .78); }
.tone-bad { background: var(--r50); color: var(--r700); }  .tone-warn { background: var(--y50); color: var(--y700); }  .tone-good { background: var(--g50); color: var(--g700); }  .tone-plain { background: var(--n100); color: var(--n700); }

/* a creator, a video or a campaign as a card in a grid */
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.tile .media { border-radius: 0; }
.tile-body { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); flex: 1; }
.tile-foot { display: flex; gap: var(--s2); padding: 0 var(--s4) var(--s4); }
.tile-foot .btn { flex: 1; }
.facts { display: flex; flex-wrap: wrap; gap: 2px var(--s4); color: var(--muted); font-size: var(--fs-sm); }
.facts b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.media .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--n400); background: linear-gradient(135deg, var(--n100), var(--n200)); }
.media .dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 4px; background: rgb(22 27 36 / .8); color: #fff; font-size: .6875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
/* how far a campaign has travelled: sent, seen, accepted, delivered, approved */
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.funnel > div { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--b50); min-width: 0; }
.funnel b { display: block; color: var(--ink); font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.funnel span { display: block; color: var(--n700); font-size: var(--fs-xs); font-weight: 500; line-height: 1.35; }
.funnel > div:nth-child(2) { background: var(--b100); }  .funnel > div:nth-child(3) { background: var(--b200); }
.funnel > div:nth-child(4) { background: var(--b600); }  .funnel > div:nth-child(5) { background: var(--g600); }
.funnel > div:nth-child(n+4) b, .funnel > div:nth-child(n+4) span { color: #fff; }
@media (max-width: 720px) { .funnel { grid-template-columns: minmax(0, 1fr); gap: 4px; }  .funnel > div { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s2) var(--s4); }  .funnel b { font-size: var(--fs-lg); min-width: 2.2em; }  .funnel span { font-size: var(--fs-sm); } }
/* a link pasted in: the platform is recognised and checked before anything else is asked */
.paste { display: flex; gap: var(--s2); }
.paste .input { flex: 1; min-width: 0; }
.found { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--g100); border-radius: var(--r-md); background: var(--g50); min-width: 0; }

.hero-facts b small { font-size: .6em; font-weight: 600; opacity: .75; }
.hero .tag { background: rgb(255 255 255 / .16); color: #fff; }

/* a table of numbers that must stay a table on a phone (compared across columns): it scrolls inside its own labelled region and keeps its first column in view */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { box-shadow: var(--focus); }
.table-scroll .table th:first-child, .table-scroll .table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line-soft); }
.table-scroll .table th:first-child { background: var(--n25); }
/* what just happened, at the top of the page; it stays until closed or until the next page */
.flash { margin-bottom: var(--s5); }
.flash .icon-btn { margin: -8px -8px -8px auto; }

/* ───────────── 12. helpers ───────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center; }  .end { text-align: end; }
.mt-0 { margin-top: 0; }  .mt-2 { margin-top: var(--s2); }  .mt-3 { margin-top: var(--s3); }  .mt-4 { margin-top: var(--s4); }  .mt-5 { margin-top: var(--s5); }  .mt-6 { margin-top: var(--s6); }  .mt-8 { margin-top: var(--s8); }
.mb-2 { margin-bottom: var(--s2); }  .mb-4 { margin-bottom: var(--s4); }  .mb-6 { margin-bottom: var(--s6); }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.hide-phone { }  .only-phone { display: none; }
@media (max-width: 720px) { .hide-phone { display: none !important; }  .only-phone { display: revert; } }
.c-good { color: var(--g700); }  .c-bad { color: var(--r700); }  .c-warn { color: var(--y700); }  .c-accent { color: var(--b700); }

/* ───────────── 13. print ───────────── */
@media print {
  body { background: #fff; }
  .side, .topbar, .tabbar, .actionbar, .toasts, .gov-foot, .no-print { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .card { break-inside: avoid; }
}
