/* GlatAI Social console — design system (D19). Accent comes from ACCENT_COLOR (inline :root var). */
@font-face { font-family: Inter; src: url(/static/fonts/Inter-Variable.ttf) format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Almarai; src: url(/static/fonts/Almarai-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Almarai; src: url(/static/fonts/Almarai-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Almarai; src: url(/static/fonts/Almarai-ExtraBold.ttf); font-weight: 800; font-display: swap; }

:root {
  --accent: #0F766E; --accent-ink: #fff; --btn-primary: #0F766E;
  --pf-instagram: #E4405F; --pf-facebook: #0866FF; --pf-tiktok: #000000; --pf-x: #000000; --pf-snapchat: #FFFC00;
  --pf-youtube: #FF0000;  /* D69: YouTube's red (its brand guidelines: the logo is never recoloured) */
  --pf-whatsapp: #128C7E;  /* D69: WhatsApp's teal reads about 4:1 on the light and the dark background: no dark value */
  --pf-linkedin: #0A66C2;  /* D69 V25: LinkedIn's blue (its mark identifies the channel) */
  --bg: #F5F6F8; --panel: #FFFFFF; --panel-2: #F9FAFB; --line: #E6E8EC; --line-2: #EEF0F3;
  --ink: #111827; --ink-2: #374151; --muted: #5F6673; --faint: #636A76;  /* faint ≥ 4.5:1 on --bg and --line-2 (a11y 12 Oct) */
  --ok: #047857; --ok-bg: #ECFDF5; --warn: #B45309; --warn-bg: #FFFBEB; --bad: #B91C1C; --bad-bg: #FEF2F2;
  --info: #1D4ED8; --info-bg: #EFF6FF; --violet: #6D28D9; --violet-bg: #F5F3FF;
  --bar-warn: #F59E0B; --bar-info: #60A5FA; --story: #BE185D; --story-bg: #FDF2F8; --offer: #7C2D12; --offer-bg: #FFEDD5;
  --clash: #EA580C; --del: #991B1B; --del-bg: #FEE2E2; --ins: #166534; --ins-bg: #DCFCE7; --st-draft: #A3A3A3; --st-live: #059669;
  --on-status: #fff;  /* text on a solid --ok/--bad fill */
  --radius: 14px; --radius-s: 9px; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-l: 0 10px 30px -12px rgba(16,24,40,.25); --side: 252px;
  --font: Inter, Almarai, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --pf-tiktok: #FFFFFF; --pf-x: #FFFFFF; --btn-primary: #14A08F;
    --accent: #15A398; --accent-ink: #0B0F14;  /* D69 V13: links and summaries ≥ 4.5:1 on the dark surfaces (the page's inline style gives the company's own) */
    --bg: #0B0F14; --panel: #121821; --panel-2: #0F141B; --line: #1F2833; --line-2: #19212B;
    --ink: #E6EAF0; --ink-2: #C3CBD5; --muted: #8A96A6; --faint: #808B9A;
    --ok: #34D399; --warn: #F59E0B; --bad: #F87171; --info: #60A5FA; --violet: #A78BFA; --on-status: #0B0F14;  /* status text ≥ 4.5:1 on its dark tint */
    --ok-bg: #0B2A22; --warn-bg: #2A2110; --bad-bg: #2C1414; --info-bg: #0F1E36; --violet-bg: #1D1633;
    --bar-warn: #D97706; --bar-info: #3B82F6; --story: #F9A8D4; --story-bg: #3B1026; --offer: #FDBA74; --offer-bg: #3B1F0E;
    --clash: #FB923C; --del: #FCA5A5; --del-bg: #3B1212; --ins: #86EFAC; --ins-bg: #0F2E1A; --st-draft: #6B7280; --st-live: #34D399;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-l: 0 10px 30px -12px rgba(0,0,0,.7);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { scroll-padding-top: 72px; }  /* D69 V21: an anchor (#problems, #replies) lands below the 56 px sticky top bar (the body scrolls on phones) */
body { margin: 0; font: 14.5px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 16px; font-weight: 650; margin: 0 0 12px; letter-spacing: -.01em; }
h3, h2.sec-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }  /* sec-label: a page's section, an h2 that looks like the small heading (D69 V23) */
.icon { flex: none; vertical-align: -3px; }
.ar, :lang(ar), [dir=rtl] { font-family: Almarai, var(--font); }  /* Inter has no Arabic: it falls back per glyph */

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-inline-end: 1px solid var(--line);
        padding: 18px 12px 24px; display: flex; flex-direction: column; gap: 4px; }
.brandmark { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brandmark .mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800;
                   background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7C3AED)); box-shadow: var(--shadow-l); }
.brandmark .name { font-weight: 700; font-size: 15px; line-height: 1.15; } .brandmark .co { font-size: 12px; color: var(--muted); }
.brandmark img { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; background: #fff; }
.navlabel { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--panel-2); text-decoration: none; color: var(--ink); }
.nav a.on { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.nav .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent); }  /* a near-white brand colour still shows */
.nav .sub { margin: 2px 0 6px 19px; padding-inline-start: 10px; border-inline-start: 1px solid var(--line); }
.nav .sub a { padding: 5px 10px; font-size: 13.5px; }
.nav .count { margin-inline-start: auto; font-size: 11.5px; font-weight: 600; padding: 0 7px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); }
.side .foot { margin-top: auto; padding: 14px 8px 0; font-size: 12px; color: var(--faint); }
.mainwrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 28px;
          background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; flex: 1; min-width: 0; }
.crumbs a { color: var(--muted); } .crumbs .icon { color: var(--faint); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px;
          background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--accent); }
.usermenu { display: flex; align-items: center; gap: 10px; } .usermenu .who { text-align: end; line-height: 1.2; font-size: 12.5px; }
.usermenu .who b { display: block; font-size: 13px; color: var(--ink); }
.bell { position: relative; color: var(--muted); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; }
.bell:hover { background: var(--panel); } .bell .pip { position: absolute; top: 6px; inset-inline-end: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--bg); }
.bell .pip.count { width: auto; height: auto; min-width: 16px; padding: 0 4px; top: 2px; inset-inline-end: 2px; border-radius: 99px; font-size: 10px; font-weight: 700; line-height: 14px; color: var(--on-status); text-align: center; }
.at-you { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 99px; background: var(--info-bg); color: var(--info); font-size: 11px; font-weight: 600; line-height: 18px; }
main { padding: 26px 28px 70px; max-width: 1320px; width: 100%; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.pagehead p { margin: 4px 0 0; color: var(--muted); }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { position: fixed; z-index: 20; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-l); }
  body.nav-open .side { transform: none; } .menu-toggle { display: grid; } main { padding: 18px 16px 60px; } .topbar { padding: 10px 16px; }
  .usermenu .who { display: none; }
}

/* ---- surfaces ---- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card { margin-top: 16px; } .card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gauto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); } }  /* never wider than the screen (P0-4) */
.stack-l > * + * { margin-top: 16px; } .stack-l > *, .split > *, .grid > * { min-width: 0; }

/* KPI tiles */
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; } .kpi .l { color: var(--muted); font-size: 13px; }
.t-warn .ico { background: var(--warn-bg); color: var(--warn); } .t-ok .ico { background: var(--ok-bg); color: var(--ok); }
.t-info .ico { background: var(--info-bg); color: var(--info); } .t-bad .ico { background: var(--bad-bg); color: var(--bad); }
.t-violet .ico { background: var(--violet-bg); color: var(--violet); }

/* brand cards */
.brandcard { position: relative; overflow: hidden; }
.brandcard .stripe { position: absolute; inset: 0 0 auto 0; height: 4px; }
.brandcard .top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.brandcard .logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; }
.brandcard h2 { margin: 0; font-size: 16px; } .brandcard .mode { font-size: 12.5px; color: var(--muted); }
.progress { height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; display: flex; }
.progress span { display: block; height: 100%; } .p-ok { background: var(--ok); } .p-warn { background: var(--bar-warn); } .p-info { background: var(--bar-info); } .p-bad { background: var(--bad); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 5px; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-s); border: 1px solid var(--line);
       background: var(--panel); color: var(--ink-2); font: 500 13.5px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
       transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--panel-2); text-decoration: none; border-color: color-mix(in srgb, var(--ink) 18%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--btn-primary); border-color: var(--btn-primary); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn.primary:hover { background: color-mix(in srgb, var(--btn-primary) 88%, #000); }
.b-you { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent); }  /* a step that waits for you: not a post status */
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--on-status); } .btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: var(--on-status); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--panel-2); }
.btn.s { padding: 5px 10px; font-size: 12.5px; } .btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; display: inline-flex; gap: 6px; align-items: center; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 12px 0 5px; }
input, select, textarea { width: 100%; font: 14px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line);
                          border-radius: var(--radius-s); padding: 9px 11px; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea { font-family: Almarai, var(--font); line-height: 1.7; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=checkbox] { width: auto; accent-color: var(--accent); } input[type=number] { width: 84px; }
input[readonly], textarea[readonly] { background: var(--panel-2); color: var(--ink-2); }
.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; } .inline label { margin: 0; }
.formrow { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; } .formrow > div { flex: 1; min-width: 140px; }
.help { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
/* D69 V02: a legal notice under a card's title (the PDPL, the regulators): always visible, never only in a hint */
.legal-line { display: flex; align-items: flex-start; gap: 6px; margin: -4px 0 12px; font-size: 13px; color: var(--ink-2); }
.legal-line .icon { flex: none; margin-top: 3px; color: var(--warn); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sticky-actions { position: sticky; top: 64px; z-index: 3; }

/* badges & states */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
         background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.b-ok, .badge.approved, .badge.done, .badge.published, .badge.scheduled, .badge.produced { background: var(--ok-bg); color: var(--ok); }
.b-warn, .badge.pending_approval, .badge.queued, .badge.draft, .badge.planned, .badge.partial { background: var(--warn-bg); color: var(--warn); }
.b-bad, .badge.rejected, .badge.failed, .badge.needs_human, .badge.prohibited, .badge.missing { background: var(--bad-bg); color: var(--bad); }
.b-info, .badge.running, .badge.compliance_review { background: var(--info-bg); color: var(--info); }
.badge.f-post { background: var(--info-bg); color: var(--info); } .badge.f-reel { background: var(--violet-bg); color: var(--violet); }
.badge.f-story { background: var(--story-bg); color: var(--story); } .badge.skipped, .badge.cancelled { background: var(--line-2); color: var(--faint); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .nowrap { white-space: nowrap; } .error { color: var(--bad); }
.alert { display: flex; gap: 10px; padding: 11px 13px; border-radius: 11px; font-size: 13.5px; margin-bottom: 12px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); } .alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.info { background: var(--info-bg); color: var(--info); } .alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert pre { color: var(--ink-2); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); } .empty .icon { color: var(--faint); margin-bottom: 8px; }

/* tables */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: start; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
            padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; } .table tr.click:hover td { background: var(--panel-2); cursor: pointer; }
.table tr.dim td { opacity: .5; }
.thumb { width: 52px; height: 65px; object-fit: cover; border-radius: 8px; display: block; box-shadow: var(--shadow); background: var(--line-2); }
.thumb.ph { display: grid; place-items: center; color: var(--faint); }
.cell-title { font-weight: 600; color: var(--ink); max-width: 520px; } .cell-sub { color: var(--muted); font-size: 12.5px; max-width: 520px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
@media (max-width: 1100px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 14px 16px; border-inline-end: 1px solid var(--line-2); }
.step:last-child { border-inline-end: 0; }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px;
           background: var(--line-2); color: var(--muted); margin-bottom: 8px; }
.step.done .n { background: var(--ok); color: var(--on-status); } .step.now .n { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.step b { display: block; font-size: 13.5px; } .step .s:not(.btn) { color: var(--muted); font-size: 12.5px; margin: 2px 0 10px; }
.step form { margin: 0; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal .dow { padding: 8px 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; padding: 8px; border-inline-end: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.cal .day:nth-child(7n) { border-inline-end: 0; } .cal .day.out { background: var(--panel-2); }
.cal .day .d { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; } .cal .day.today .d { color: var(--accent); }
.chip { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; margin-bottom: 4px; font-size: 12px; color: var(--ink-2);
        background: var(--panel-2); border: 1px solid var(--line-2); text-decoration: none; overflow: hidden; }
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip img { width: 22px; height: 28px; object-fit: cover; border-radius: 4px; flex: none; }
.chip .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chip.dim { opacity: .45; }
.chip .st { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-inline-start: auto; }
@media (max-width: 900px) { .cal, .week { display: none; } }

/* media panel */
.mediabox img, .mediabox video { width: 100%; display: block; border-radius: 12px; background: #000; }
.mediabox .alt { display: flex; gap: 8px; margin-top: 10px; }
.drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.drop input { border: 0; padding: 8px 0; background: transparent; }

/* tabs & toggles */
.tabs { display: inline-flex; padding: 3px; gap: 2px; background: var(--line-2); border-radius: 10px; }
.tabs a { padding: 5px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; } .timeline li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; } .timeline .when { color: var(--faint); width: 128px; flex: none; }

/* jobs */
.job { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line-2);
       font-size: 13px; margin-top: 8px; flex-wrap: wrap; }
.job .spin { animation: spin 1s linear infinite; color: var(--info); } @keyframes spin { to { transform: rotate(360deg); } }
.job .grow { flex: 1; min-width: 160px; }

pre { white-space: pre-wrap; margin: 6px 0; font-size: 13px; }
details > summary { cursor: pointer; } details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; } details.menu > summary::-webkit-details-marker { display: none; }
details.menu[open] > .pop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 10; width: 340px; }
.pop { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-l); padding: 14px; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .hero { background: radial-gradient(1200px 600px at 10% 10%, color-mix(in srgb, var(--accent) 70%, #7C3AED) 0%, var(--accent) 40%, #0B1320 100%);
               color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login .hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.03em; max-width: 520px; }
.login .hero p { opacity: .85; max-width: 460px; font-size: 16px; }
.login .hero .feat { display: grid; gap: 10px; margin-top: 26px; } .login .hero .feat div { display: flex; gap: 10px; align-items: center; opacity: .92; }
.login .form { display: grid; place-items: center; padding: 40px; } .login .box { width: 100%; max-width: 380px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border-radius: 11px; border: 1px solid var(--line);
        background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.gbtn:hover { text-decoration: none; border-color: var(--accent); }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login .hero { padding: 32px; } .login .hero h1 { font-size: 30px; } }

/* knowledge health matrix */
details.area > summary.areahead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer;
  list-style: none; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
details.area > summary.areahead::-webkit-details-marker { display: none; }
details.area > summary.areahead .t { color: var(--ink); }
details.area[open] > summary.areahead { border-bottom: 1px solid var(--line-2); }
.matrix td:first-child { width: 58%; }
details.howto { margin-top: 4px; } details.howto > summary { color: var(--accent); cursor: pointer; width: max-content; }
details.howto > div { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
details.howto p { margin: 0 0 6px; }
.show-s { display: none; }
.compare { overflow-x: auto; }
.compare th:first-child, .compare td:first-child { position: sticky; inset-inline-start: 0; background: var(--panel); z-index: 1; min-width: 260px; }
.compare :is(th, td):first-child:has(.hint-tip.open) { z-index: 5; }  /* an open hint there sits above the sticky cells of the rows after it (D69) */
.compare td.cell { text-align: center; }
@media (max-width: 720px) { .hide-s { display: none; } .show-s { display: block; } .wiz-bar.show-s { display: flex; } .matrix td:first-child { width: auto; } }
/* phones: nothing wider than the screen (UX review P1-1) */
@media (max-width: 720px) { .pv { max-width: 100%; } .card { padding: 14px; } .channels-strip .chips { flex-wrap: wrap; }
  .crumbs > a:first-child, .crumbs > .icon:first-of-type { display: none; } }
.cell-title[dir=auto] { text-align: left; unicode-bidi: plaintext; }  /* Arabic reads right-to-left but sits at the row's edge (UX review P2-7) */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 6px; color: var(--muted); }
.compare .table { table-layout: fixed; min-width: 640px; }
.compare .table th:first-child, .compare .table td:first-child { width: 44%; }
/* cards side by side in a grid line up: the stacking gap applies to cards in a column only */
.grid > .card + .card, .split > .card + .card { margin-top: 0; }

/* status dots (calendar, legend) */
.st-planned { background: var(--line); } .st-draft, .st-compliance_review { background: var(--st-draft); }
.st-pending_approval { background: var(--bar-warn); } .st-needs_human { background: var(--clash); }
.st-approved { background: var(--ok); } .st-scheduled { background: var(--info); } .st-publishing { background: var(--violet); }
.st-published { background: var(--st-live); box-shadow: 0 0 0 2px color-mix(in srgb, var(--st-live) 30%, transparent); }
.st-failed, .st-rejected { background: var(--bad); } .st-cancelled { background: var(--faint); }
/* toast after an action */
.toast { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 14px; border-radius: 12px;
  background: var(--ok-bg); color: var(--ok); font-weight: 600; transition: opacity .6s; }
.toast .btn { margin-inline-start: auto; } .toast.fade { opacity: 0; pointer-events: none; }
/* review queue */
.queuebar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.queuebar .small { flex: 1; text-align: center; }
kbd { font: 600 11px ui-monospace, Menlo, monospace; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--panel-2); }
/* quick-look drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--panel); border-inline-start: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(0,0,0,.12); transform: translateX(105%); transition: transform .2s ease; z-index: 30; overflow-y: auto; }
.drawer.open { transform: none; } .drawer-in { padding: 16px; } .drawer-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
/* platform previews */
.pv { margin: 0 auto; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; color: #111; max-width: 360px; }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; }
.pv-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.pv-plat { margin-inline-start: auto; font-size: 11px; color: #777; }
.pv-media { position: relative; background: #111; aspect-ratio: 4 / 5; display: grid; place-items: center; }
.pv-media img, .pv-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-tall .pv-media { aspect-ratio: 9 / 16; }
.pv-empty { color: #aaa; text-align: center; }
.pv-overlay { position: absolute; left: 12px; right: 52px; bottom: 14px; color: #fff; font-size: 12.5px; line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); white-space: pre-line; }
.pv-bars { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; }
.pv-bars span { flex: 1; height: 2px; background: rgba(255,255,255,.6); border-radius: 2px; }
.pv-actions { padding: 8px 12px 0; font-size: 18px; }
.pv-caption { padding: 6px 12px 12px; font-size: 13px; line-height: 1.45; white-space: pre-line; }
.pv-caption .pv-full { display: none; } .pv-caption.open .pv-full { display: inline; } .pv-caption.open .pv-short { display: none; }
.pv-caption a { color: #888; }
.pv-tiktok { background: #000; color: #fff; border-color: #222; } .pv-tiktok .pv-plat { color: #aaa; }
.pv-tiktok .pv-avatar { background: linear-gradient(135deg, #25F4EE, #FE2C55); }
.pv-meta { text-align: center; margin-top: 8px; } .text-bad { color: var(--bad); font-weight: 600; }
/* publishing calendar */
.drop.over { outline: 2px dashed var(--accent); outline-offset: -3px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.chip.dragging { opacity: .4; } .chip[draggable="true"] { cursor: grab; }
.chip.clash { box-shadow: inset 0 0 0 1.5px var(--clash); }
.chip .tm { font-weight: 700; margin-inline-end: 2px; }
.offer-band { font-size: 10.5px; font-weight: 600; color: var(--offer); background: var(--offer-bg); border-radius: 4px; padding: 1px 6px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); min-width: 860px; }
.wk-h { padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--panel); }
.wk-h.today { color: var(--accent); }
.wk-hr { font-size: 11px; color: var(--faint); padding: 6px 6px 0; border-top: 1px solid var(--line-2); }
.slot { min-height: 40px; padding: 3px; border-top: 1px solid var(--line-2); border-inline-start: 1px solid var(--line-2); }
@media print { .side, .topbar, .actions, form, .help, #drawer, .toast { display: none !important; } .shell { display: block; } .card { break-inside: avoid; box-shadow: none; } }

/* bulk bar */
.bulkbar { position: sticky; bottom: 12px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0;
  padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.bulkbar .inline input { padding: 5px 8px; }
td.sel, th.sel { width: 30px; padding-inline-end: 0; }

.diff del, del { background: var(--del-bg); color: var(--del); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
.diff ins, ins { background: var(--ins-bg); color: var(--ins); text-decoration: none; border-radius: 3px; padding: 0 2px; }

[hidden] { display: none !important; }

:root[data-theme="dark"] {  /* the same values as the dark media block above; tests keep the two in step */
  --pf-tiktok: #FFFFFF; --pf-x: #FFFFFF; --btn-primary: #14A08F;
  --accent: #15A398; --accent-ink: #0B0F14;
  --bg: #0B0F14; --panel: #121821; --panel-2: #0F141B; --line: #1F2833; --line-2: #19212B;
  --ink: #E6EAF0; --ink-2: #C3CBD5; --muted: #8A96A6; --faint: #808B9A;
  --ok: #34D399; --warn: #F59E0B; --bad: #F87171; --info: #60A5FA; --violet: #A78BFA; --on-status: #0B0F14;
  --ok-bg: #0B2A22; --warn-bg: #2A2110; --bad-bg: #2C1414; --info-bg: #0F1E36; --violet-bg: #1D1633;
  --bar-warn: #D97706; --bar-info: #3B82F6; --story: #F9A8D4; --story-bg: #3B1026; --offer: #FDBA74; --offer-bg: #3B1F0E;
  --clash: #FB923C; --del: #FCA5A5; --del-bg: #3B1212; --ins: #86EFAC; --ins-bg: #0F2E1A; --st-draft: #6B7280; --st-live: #34D399;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-l: 0 10px 30px -12px rgba(0,0,0,.7);
}
/* top bar search, brand switcher, command palette */
.topsearch { margin-inline-start: auto; } .topsearch input { width: 220px; padding: 6px 10px; border-radius: 10px; }
.brandswitch { width: auto; padding: 6px 8px; border-radius: 10px; }
.topsearch + .brandswitch, .topsearch ~ .bell { margin-inline-start: 0; }
.palette { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .35); display: grid; place-items: start center; padding-top: 12vh; }
.palette-box { width: min(560px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-l); overflow: hidden; }
.palette-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 16px; font-size: 16px; }
#palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
#palette-list li { padding: 8px 12px; border-radius: 10px; cursor: pointer; } #palette-list li.on, #palette-list li:hover { background: var(--panel-2); color: var(--accent); }
.weekstrip { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }

/* accessibility pass (UI review 8 Oct) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }  /* they have their own ring */
tr[data-href] { cursor: pointer; } tr[data-href]:focus-visible { outline-offset: -2px; background: var(--panel-2); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 9px; background: var(--panel); box-shadow: var(--shadow-l); font-weight: 600; }
.skip:focus { top: 8px; }
main:focus { outline: none; }
.areatabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -6px 0 18px; padding: 0; background: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.areatabs a { border-radius: 0; padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); }
.areatabs a:hover { color: var(--ink); text-decoration: none; }
.areatabs a.on { background: none; box-shadow: none; color: var(--accent); border-bottom-color: var(--accent); }
.toast.bad { background: var(--warn-bg); color: var(--warn); }
#toasts:empty { display: none; }
#livetoasts { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
#livetoasts .toast { margin: 0; box-shadow: var(--shadow-l); }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); box-shadow: var(--shadow-l); width: min(380px, 92vw); padding: 18px; }
dialog::backdrop { background: rgba(15, 23, 42, .35); }
dialog label { display: block; margin-bottom: 10px; }
/* status is never colour alone: held and failed states also differ in shape */
.st-needs_human, .st-failed, .st-rejected { border-radius: 2px !important; }
.st-planned { box-shadow: inset 0 0 0 1.5px var(--muted); background: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* phones (UI review must-item: mobile agenda and approval view) */
.agenda { display: none; }
.ag-day { margin: 0; padding: 12px 14px 6px; font-size: 12px; border-top: 1px solid var(--line-2); }
.ag-day:first-child { border-top: 0; } .ag-day.today { color: var(--accent); }
.ag-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.ag-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; }
.ag-item.moved { background: var(--ok-bg); }
.ag-link { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: flex-start; color: var(--ink); padding: 6px 0; min-height: 44px; }
.ag-link:hover { text-decoration: none; }
.ag-link img, .ag-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line-2); }
.ag-body { min-width: 0; font-size: 13px; } .ag-title { display: block; color: var(--ink-2); margin: 2px 0 4px; overflow-wrap: anywhere; }
.ag-offer { padding: 4px 6px; color: var(--violet); }
.ag-move { flex: none; min-height: 36px; }
@media (max-width: 900px) {
  .agenda { display: block; }
  .crumbs { overflow: hidden; white-space: nowrap; justify-content: flex-end; }  /* keep the last crumbs visible */
  .topbar { gap: 8px; }
}
@media (max-width: 720px) {
  h1 { font-size: 20px; }
  .btn, summary.btn { min-height: 40px; }
  /* list tables become cards */
  .table.stack thead { display: none; }
  .table.stack tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .table.stack td { padding: 0; border: 0; white-space: normal; }
  .table.stack td:not(.sel) { grid-column: 2; }
  .table.stack td.sel { grid-row: 1 / span 4; align-self: start; padding-top: 2px; }
  .sticky-actions.decide .show-s { display: inline-flex; }  /* a phone's short labels in the decision bar */
  .queuebar { flex-wrap: wrap; } .queuebar .small { order: -1; flex-basis: 100%; }
}
/* the decision stays under the thumb on the post page: on a phone and, D69 V17, on a tablet too (from 721 to 900 px the
   page is one column and the decision card sat below the preview, off the first screen) */
@media (max-width: 900px) {
  .sticky-actions.decide { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 15; margin: 0 !important; border-radius: 16px 16px 0 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(0,0,0,.12); }
  .sticky-actions.decide .why { display: none; }
  .sticky-actions.decide > .actions { flex-wrap: nowrap; }
  .sticky-actions.decide .actions .actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; }
  .sticky-actions.decide .actions .actions > * { min-width: 0; }
  .sticky-actions.decide .btn { width: 100%; justify-content: center; padding-inline-start: 8px; padding-inline-end: 8px; }
  .sticky-actions.decide details.menu[open] > .pop { position: fixed; left: 8px; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); top: auto; width: auto; }
  body.has-decide main { padding-bottom: 110px; }
  .sticky-actions.decide a.btn.show-s { display: inline-flex; }  /* the next post, beside the decision */
}
@media (min-width: 721px) and (max-width: 900px) {  /* a tablet's bar has room: one row, the next post narrow */
  .sticky-actions.decide .actions .actions { display: flex; }
  .sticky-actions.decide .actions .actions > * { flex: 1 1 0; }
  .sticky-actions.decide .actions .actions > a.btn.show-s { flex: 0 0 auto; width: auto; }
}

/* what was checked (UX review 8 Oct) */
.checklist { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 9px; }
.checklist li.ok { padding: 2px 8px; }
.checklist li.ok .ck-icon { color: var(--ok); }
.checklist li.soft { background: var(--warn-bg); } .checklist li.soft .ck-icon { color: var(--warn); }
.checklist li.legal { background: var(--warn-bg); outline: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.checklist li.legal .ck-icon { color: var(--warn); }
.checklist li.hard { background: var(--bad-bg); } .checklist li.hard .ck-icon { color: var(--bad); }
.ck-icon { flex: none; margin-top: 2px; }
.checks h3 { margin-top: 14px; }
/* breadcrumbs never collide with the search box (UX-08): search moves to / and Ctrl/Cmd K on mid widths */
.crumbs { overflow: hidden; white-space: nowrap; }
@media (max-width: 1000px) { .topsearch { display: none; } }

.claimpick { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.claimpick label { display: flex; gap: 8px; align-items: flex-start; }

.staging-banner { position: sticky; top: 0; z-index: 90; background: repeating-linear-gradient(45deg, #B45309, #B45309 12px, #92400E 12px, #92400E 24px);
  color: #fff; font-weight: 700; text-align: center; padding: 4px 8px; font-size: 12.5px; letter-spacing: .04em; }

/* live job card (docs/JOBS-UI-SPEC.md) */
.jobcard { position: relative; overflow: hidden; margin-top: 8px; padding: 16px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.jobcard.partial { border-inline-start: 3px solid var(--warn); } .jobcard.failed { border-inline-start: 3px solid var(--bad); }
.jobcard.running::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat; background-size: 50% 100%; animation: jc-sweep 2.4s linear infinite; }
.jc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.jc-orb { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.running .jc-orb { animation: jc-breathe 2.2s ease-in-out infinite; }
.jc-time { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.jc-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 14px 0 12px; padding: 0; font-size: 12.5px; color: var(--muted); }
.jc-steps li { display: flex; align-items: center; gap: 6px; } .jc-steps li + li::before { content: ""; width: 18px; height: 1.5px; background: var(--line); }
.jc-steps i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.jc-steps .done { color: var(--ink-2); } .jc-steps .done i { background: var(--ok); }
.jc-steps .now { color: var(--accent); font-weight: 600; } .jc-steps .now i { background: var(--accent); animation: jc-pulse 1.6s ease-out infinite; }
.jbar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; } .jbar.mini { height: 4px; }
.jbar > span { display: block; height: 100%; border-radius: inherit; transition: width .6s ease; background: var(--accent) linear-gradient(90deg, transparent, color-mix(in srgb, #fff 35%, transparent), transparent) no-repeat; background-size: 200px 100%; animation: jc-sheen 1.8s linear infinite; }
.jbar.ind > span { width: 35%; animation: jc-slide 1.4s ease-in-out infinite; }
.jc-strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 0 4px; }
.jtile { position: relative; flex: none; width: 84px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; scroll-snap-align: start; background: var(--line-2); box-shadow: var(--shadow); }
.jtile.f-reel, .jtile.f-story { width: 64px; aspect-ratio: 9 / 16; } .jtile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jtile.dim { opacity: .55; } .jtile .tag { position: absolute; inset: auto 4px 4px; padding: 1px 5px; border-radius: 6px; font-size: 10.5px; background: rgba(0,0,0,.55); color: #fff; }
.jtile.ph { background: linear-gradient(100deg, var(--line-2) 30%, var(--panel-2) 50%, var(--line-2) 70%); background-size: 300% 100%; animation: jc-shimmer 1.4s linear infinite; }
.jtile.landed { animation: jc-land .5s cubic-bezier(.2,.9,.3,1.3); }
.jchip { display: inline-flex; align-items: center; gap: 5px; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: var(--line-2); color: var(--ink-2); }
.jchip.ok { background: var(--ok-bg); color: var(--ok); } .jchip.info { background: var(--info-bg); color: var(--info); }
.jchip.warn { background: var(--warn-bg); color: var(--warn); } .jchip.bad { background: var(--bad-bg); color: var(--bad); } .jchip.violet { background: var(--violet-bg); color: var(--violet); }
@keyframes jc-sweep { from { background-position: -100% 0; } to { background-position: 200% 0; } }
@keyframes jc-breathe { 50% { transform: scale(1.06); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent); } }
@keyframes jc-pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } to { box-shadow: 0 0 0 8px transparent; } }
@keyframes jc-sheen { from { background-position: -200px 0; } to { background-position: calc(100% + 200px) 0; } }
@keyframes jc-slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@keyframes jc-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes jc-land { from { transform: scale(.85); opacity: 0; } }
/* card details and the compact row's mini bar */
.jc-title { font-size: 14.5px; }
.jc-strip { align-items: flex-start; }  /* tiles keep their 4:5 and 9:16 shapes */
.jc-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; font-size: 13.5px; }
.jc-counters { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.jc-now { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-steps .stop { color: var(--bad); } .jc-steps .stop i { background: var(--bad); }
.jc-items { margin-top: 8px; } .jc-items > summary { color: var(--muted); } .jc-chips { margin-top: 8px; }
a.jchip:hover { text-decoration: none; box-shadow: inset 0 0 0 1px currentColor; } .jchip b { font-weight: 600; }
.jc-fails { margin: 8px 0 0; padding-inline-start: 18px; }
.jobcard .actions { margin-top: 12px; }
.jc-earlier { margin-top: 8px; } .jc-earlier > summary { padding: 4px 0; }
.job .jbar { display: block; margin-top: 6px; }
.toast a.btn + .btn { margin-inline-start: 0; }
@media (max-width: 720px) { .jc-steps li:not(.now) span { display: none; } .jc-time { margin-inline-start: 0; flex-basis: 100%; } .jtile { width: 68px; } .jobcard .actions .btn { flex: 1; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .jbar.ind > span { width: 100%; background: repeating-linear-gradient(45deg, var(--accent) 0 8px, color-mix(in srgb, var(--accent) 70%, var(--panel)) 8px 16px); } }
/* brand setup wizard (docs/KB-WIZARD-SPEC.md §5): cards left, help right, actions in a bar at the bottom */
.wiz { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.wiz-help { position: sticky; top: 76px; } .wiz-help h3 { margin: 16px 0 6px; }
.wiz-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wiz-steps a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.wiz-steps a:hover { text-decoration: none; border-color: var(--accent); }
.wiz-steps .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; background: var(--line-2); color: var(--muted); }
.wiz-steps .done .n { background: var(--ok); color: var(--on-status); } .wiz-steps .waiting .n { background: var(--warn-bg); color: var(--warn); }
.wiz-steps .fix .n { background: var(--bad); color: var(--on-status); border-radius: 6px; } .wiz-steps .started .n { background: var(--info-bg); color: var(--info); }
.wiz-steps .now { border-color: var(--accent); color: var(--accent); }
.wiz-steps .now .n { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.wiz-bar.show-s { display: none; }  /* the month page's bar is a phone control (UX review P1-6) */
.wiz-bar { position: sticky; bottom: 12px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px;
  padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.wiz-bar .grow { flex: 1; }
.example { white-space: pre-wrap; font-size: 13px; border-inline-start: 3px solid var(--info); }
details.howto > div.example { margin-top: 6px; }
.card.err { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
@media (max-width: 1000px) { .wiz { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .wiz-bar.show-s { display: flex; } .wiz-bar.show-s .grow { display: block; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wiz-bar.show-s .btn { flex: 0 0 auto; } }
@media (max-width: 720px) {
  .wiz-steps, .wiz-help { display: none; }  /* phones: "Step 4 of 10", all steps and the help in details */
  .wiz-bar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 16px 16px 0 0; flex-wrap: nowrap;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(0,0,0,.12); }
  .wiz-bar .grow { display: none; } .wiz-bar .btn { flex: 1; justify-content: center; padding-inline: 6px; min-width: 0; }
  main:has(.wiz-bar) { padding-bottom: 120px; }
}
input[type=radio] { width: auto; accent-color: var(--accent); }

/* D32: the structured brief (plan item and the writer's creative) */
.item-brief { margin-top: 4px; } .item-brief .badge { margin-inline-end: 4px; font-size: 11.5px; }
.month-brief { margin-top: 4px; max-width: 900px; }
.creative-brief { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0 0 10px; }
.creative-brief dt { color: var(--muted); font-weight: 600; } .creative-brief dd { margin: 0; }
.table.shots td, .table.shots th { padding: 6px 8px; vertical-align: top; }

/* plan brief (D35/D36) */
.brief-head { align-items: flex-start; } .brief-title { display: flex; gap: 16px; align-items: center; }
.ring { --pct: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 18px;
  background: conic-gradient(var(--ok) calc(var(--pct) * 1%), var(--line-2) 0); }
.ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; }
.ring small { font-size: 11px; font-weight: 500; color: var(--muted); }
.brief-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.brief-rail { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 4px; }
.brief-rail a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.brief-rail a:hover { background: var(--panel-2); } .brief-rail .t { flex: 1; } .brief-rail .c { font-variant-numeric: tabular-nums; }
.brief-rail .n, .brief-group .card-head .n { width: 22px; height: 22px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line);
  display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; margin-inline-end: 4px; }
.brief-main > .card + .card { margin-top: 18px; }
.field { padding: 14px 0; border-top: 1px solid var(--line); } .field:first-of-type { border-top: 0; padding-top: 4px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.field-head label { margin: 0; font-weight: 600; } .field .must { font-size: 11px; color: var(--warn); font-weight: 600; margin-inline-start: 6px; }
.field textarea, .field input:not([type=checkbox]), .field select { width: 100%; }
.because { margin: 8px 0 0; padding-inline-start: 18px; font-size: 13px; color: var(--ink-2); } .because li + li { margin-top: 3px; }
.p-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
/* Hints (_hint.html, docs/UI-RULES.md; D69 audit §7.4): a button whose text opens on tap or click, keyboard focus, or
   hover where the device can hover (shell.js adds .open and lifts [hidden]); one open at a time; never hover-only.
   GlatAI's reasons on the brief use the labelled variant (owner, 13 Oct). */
.hint-tip { position: relative; display: inline-flex; vertical-align: middle; }
.hint-btn { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; cursor: pointer; font: 600 11.5px var(--font); color: var(--info); background: var(--info-bg); border: 1px dashed color-mix(in srgb, var(--info) 45%, transparent); }
.hint-btn::before { content: ""; position: absolute; inset: -13px; }  /* the hit area: 44 x 44 px around the 20 px circle and its border (WCAG 2.5.5) */
.hint-pop { display: none; position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 30; width: min(360px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-l); color: var(--ink); font-size: 13px; font-weight: 400; font-style: normal; line-height: 1.5; text-align: start; text-transform: none; letter-spacing: normal; text-decoration: none; white-space: normal; transform: translateX(var(--hint-dx, 0px)); }
.hint-pop::before { content: ""; position: absolute; inset-inline: 0; bottom: 100%; height: 8px; }  /* the mouse crosses the gap without closing it */
.hint-tip.open > .hint-pop { display: block; }
html:not(.hints-js) .hint-tip:is(:hover, :focus-within) > .hint-pop { display: block; }  /* before shell.js runs ([hidden] ones stay closed) */
/* the icon-only hint: a quiet round button next to a title or a label */
.hint-btn.hint-i { padding: 0; width: 20px; height: 20px; justify-content: center; border-style: solid; vertical-align: middle; margin-inline-start: 6px; }
.hint-btn.hint-i:hover, .hint-btn.hint-i:focus-visible, .hint-btn.hint-i[aria-expanded="true"] { background: var(--info); color: var(--panel); }
.hint-pop p { margin: 0; color: inherit; } .hint-pop p + p { margin-top: 6px; } .hint-pop ul { margin: 6px 0 0; padding-inline-start: 18px; }
.hint-pop.wide { width: min(460px, calc(100vw - 16px)); }
.hint-tip.hint-up > .hint-pop { top: auto; bottom: calc(100% + 6px); max-height: 70vh; overflow: auto; }
.hint-tip.hint-up > .hint-pop::before { bottom: auto; top: 100%; }
.hint-tip.hint-measure > .hint-pop { position: fixed; inset: 0 auto auto 0; visibility: hidden; transform: none; }
.hint-x { display: none; }
/* under 480 px: a bottom sheet with a close button (the hint's own button and Escape close it too) */
@media (max-width: 479.98px) {
  .hint-tip.open > .hint-pop { position: fixed; inset-inline: 8px; top: auto; bottom: 8px; z-index: 1000; width: auto; max-height: 60vh; overflow: auto;
    transform: none; padding-block: 14px; padding-inline: 16px 48px; font-size: 14px; box-shadow: 0 -6px 28px rgba(15, 23, 42, .28); }
  .hint-tip.open > .hint-pop::before { display: none; }
  .hint-tip.open .hint-x { display: grid; place-items: center; position: absolute; top: 0; inset-inline-end: 0; width: 44px; height: 44px; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1;
    background: none; border: 0; padding: 0; border-radius: 10px; }  /* a button (V23), drawn as before */
}
@media (max-width: 479.98px) and (prefers-reduced-motion: no-preference) { .hint-tip.open > .hint-pop { animation: hint-sheet .16s ease-out; } }
@keyframes hint-sheet { from { opacity: 0; translate: 0 12px; } }
.src { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } .chip-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
.chip-opt:has(input:checked) { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.savebar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-top: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-l); }
.proposal-banner { margin-bottom: 18px; border-color: color-mix(in srgb, var(--info) 40%, var(--line)); }
@media (max-width: 900px) { .brief-grid { grid-template-columns: 1fr; } .ring { width: 54px; height: 54px; font-size: 15px; } .ring span { width: 42px; height: 42px; } }

/* the Month flow (docs/UX-REVIEW-2026-10-10.md §2): rail states, the focus card, the rows, the GlatAI mark */
.flow-rail { list-style: none; padding: 0; } .flow-rail li { display: contents; }
.wiz-steps .ai .n { background: transparent; } .wiz-steps .you .n { background: var(--accent); color: var(--accent-ink); }
.wiz-steps .attn .n { background: var(--bad); color: var(--on-status); border-radius: 6px; }
.ai-mark { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7C3AED)); }
.ai-mark.xs { width: 20px; height: 20px; border-radius: 6px; }
.ai .ai-mark, .running .ai-mark, .jobcard.running .ai-mark, .jobcard.queued .ai-mark { animation: jc-breathe 2.2s ease-in-out infinite; }
.stepcard { border-inline-start: 4px solid var(--line); }
.stepcard.you { border-inline-start-color: var(--accent); } .stepcard.ai { border-inline-start-color: var(--violet); }
.stepcard.attn { border-inline-start-color: var(--bad); } .stepcard.done { border-inline-start-color: var(--ok); }
.stepcard .sc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.sc-n { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--line-2); color: var(--muted); flex: none; }
.stepcard.you .sc-n { background: var(--accent); color: var(--accent-ink); } .stepcard.attn .sc-n { background: var(--bad); color: var(--on-status); border-radius: 8px; }
.stepcard .sc-sub { color: var(--muted); font-size: 13px; flex-basis: 100%; }
.stepcard .jobcard { border: 0; padding: 0; background: transparent; box-shadow: none; }
.flow-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.flow-rows li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.flow-rows li.done .sc-n { background: var(--ok); color: var(--on-status); } .flow-rows li.attn .sc-n { background: var(--bad); color: var(--on-status); border-radius: 8px; }
.flow-rows li.you .sc-n { background: var(--accent); color: var(--accent-ink); }
.flow-all > summary { cursor: pointer; }
.setup-line { display: block; } .setup-line > summary { cursor: pointer; list-style: none; } .setup-line > summary::-webkit-details-marker { display: none; }
.flow-progress { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; } .flow-progress .progress { flex: 1; height: 10px; }
.flow-progress .pct { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 42px; text-align: end; }
.flow-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.flow-stats b { color: var(--ink); font-size: 14px; margin-inline-end: 3px; }
.wiz-steps.flow-rail a { padding: 5px 12px 5px 5px; font-size: 13px; } .wiz-steps.flow-rail .n { width: 24px; height: 24px; }
.stepcard { padding: 20px 22px; } .stepcard .sc-head h2 { font-size: 20px; }
.plan-summary { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.flow-rows li .sc-n { color: var(--ink-2); }

/* the direction card (D35): tiles, then panels in a fixed grid, each list in one direction */
.dir-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.dir-tile { background: var(--panel-2); border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.5; }
.dir-tile .k { display: block; font-weight: 700; font-size: 11.5px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.dir-panel { background: var(--panel-2); border-radius: 11px; padding: 11px 13px; min-width: 0; }
.dir-panel.team { grid-row: span 2; background: var(--warn-bg); }
.dir-panel h3 { margin: 0 0 6px; font-size: 13.5px; }
.dir-panel ul { margin: 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.5; text-align: start; } .dir-panel li + li { margin-top: 4px; }
.dir-panel ul.checklist { padding: 0; } .dir-panel ul.checklist li { background: var(--panel); }
.dir-panel dl { margin: 0; font-size: 13px; line-height: 1.5; text-align: start; } .dir-panel dl div + div { margin-top: 5px; }
.dir-panel dt { font-weight: 700; display: inline; } .dir-panel dt::after { content: ": "; } .dir-panel dd { display: inline; margin: 0; }
@media (max-width: 1100px) { .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .dir-grid, .dir-tiles { grid-template-columns: 1fr; } .dir-panel.team { grid-row: auto; } }

/* home: today for you (UX review 10 Oct, home as "what needs me") */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--line-2); font-size: 14px; }
.todo li:first-child { border-top: 0; } .todo li a { font-weight: 600; } .todo li .small { margin-inline-start: auto; }
.todo .t-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--panel-2); color: var(--muted); }
.todo li.bad .t-ico { background: var(--bad-bg); color: var(--bad); } .todo li.you .t-ico { background: var(--warn-bg); color: var(--warn); }
.todo li.info .t-ico { background: var(--info-bg); color: var(--info); }
.brandcard .flow-progress .progress { height: 7px; } .brandcard .pct { min-width: 34px; }
/* month list rows (UX review 10 Oct, #10): one title line, the brief folded, chips as time + title */
.item-brief-fold > summary { cursor: pointer; list-style: none; } .item-brief-fold > summary::-webkit-details-marker { display: none; }
.item-brief-fold > summary::before { content: "▸ "; } .item-brief-fold[open] > summary::before { content: "▾ "; }
.chip.f-reel img { aspect-ratio: 9 / 16; } .chip.f-post img, .chip.f-story img { aspect-ratio: 4 / 5; }
.brief-rail .c-p { color: var(--info); font-weight: 600; margin-inline-start: 2px; }
.brief-view a { padding: 4px 10px; font-size: 12.5px; }
/* one idea, its channels (D40): chips on the month list and the post page */
.table td.cell-content { min-width: 150px; }
.ch-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ch-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 99px; border: 1px solid var(--line); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; line-height: 18px; color: var(--ink-2); background: var(--panel); text-decoration: none; }
a.ch-chip:hover { border-color: var(--accent); color: var(--ink); }
.ch-chip .pf { display: block; }
.pf { vertical-align: -2px; }
.pf-instagram { color: var(--pf-instagram); } .pf-facebook { color: var(--pf-facebook); } .pf-tiktok { color: var(--pf-tiktok); } .pf-x { color: var(--pf-x); }
.pf-snapchat { color: var(--ink); } .ch-chip.pf-snapchat { background: var(--pf-snapchat); border-color: var(--pf-snapchat); }
.pf-whatsapp { color: var(--pf-whatsapp); }
.ch-chip.pf-snapchat::before { background: var(--ink); opacity: .45; }
.pf-youtube { color: var(--pf-youtube); }  /* D69 */
.pf-linkedin { color: var(--pf-linkedin); }  /* D69 V25 */
.ch-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.ch-chip.st-pending_approval::before, .ch-chip.st-needs_human::before { background: var(--bar-warn); }
.ch-chip.st-approved::before, .ch-chip.st-scheduled::before, .ch-chip.st-published::before { background: var(--ok); }
.ch-chip.st-rejected::before, .ch-chip.st-failed::before { background: var(--bad); }
.channels-strip .chip-opt { font-size: 12.5px; } .channels-strip .chip-opt.on { border-color: var(--accent); background: var(--ok-bg); }
.channels-strip .chip-opt .badge { padding: 0 6px; font-size: 11px; }
/* the publishing queue: what happens next in full, under the post (UX review P2-8) */
.next-step { margin-top: 4px; color: var(--muted); } .next-step.b-ok { color: var(--ok); } .next-step.b-warn { color: var(--warn); } .next-step.b-bad { color: var(--bad); } .next-step.b-info { color: var(--info); }
/* per-channel previews (UX review E1) */
.pv-sub { font-size: 12px; color: #777; }
.pv-x .pv-head b { font-weight: 700; } .pv-x .pv-media { aspect-ratio: 16 / 9; border-radius: 14px; margin: 0 12px 8px; overflow: hidden; }
.pv-x .pv-caption.pv-first { padding: 0 12px 8px; font-size: 14px; }
.pv-x-actions { display: flex; justify-content: space-between; padding: 6px 16px 12px; font-size: 14px; color: #777; }
.pv-facebook .pv-avatar { background: var(--pf-facebook); } .pv-facebook .pv-media { aspect-ratio: 1 / 1; }
.pv-facebook .pv-caption.pv-first { padding: 0 12px 8px; font-size: 14px; }
.pv-fb-actions { display: flex; justify-content: space-around; padding: 8px 10px 10px; font-size: 13px; color: #777; border-top: 1px solid #eee; }
.pv-snapchat { background: #111; color: #fff; border-color: #222; } .pv-snapchat .pv-plat { color: #aaa; }
.pv-snapchat .pv-avatar { background: var(--pf-snapchat); color: #000; }
.pv-note { position: absolute; top: 8px; right: 8px; left: auto; font-size: 11px; color: #fff; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 99px; }
.pv-tall .pv-note { top: 40px; }
/* provenance under the post title (E4) */
.prov { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; }
.prov .ai-mark.xs { vertical-align: -2px; } .prov .why { color: var(--ink-2); }
/* Home: what GlatAI did this week (E7) */
.digest .dg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.digest .dg-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); } .digest .dg-row b { color: var(--ink); font-size: 15px; }
/* Home: get started (E11) */
.gs-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gs-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.gs-steps .gs-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.gs-steps li.done .gs-n { background: var(--ok); color: var(--on-status); border-color: var(--ok); } .gs-steps li.done b { color: var(--muted); text-decoration: line-through; }
/* phones: the month list reads status first, and a row can be decided with a swipe (E3) */
@media (max-width: 720px) {
  .table.stack td.cell-status { order: -1; }
  .table.stack tr.swiping { transition: none; } .table.stack tr[data-approve] { touch-action: pan-y; }
  .table.stack tr.swipe-ok { background: var(--ok-bg); } .table.stack tr.swipe-no { background: var(--bad-bg); }
}
/* the post page folds (panel 11 Oct): one card per fold, its content indented like a card body */
details.card.fold { padding: 0; } details.card.fold > summary { padding: 12px 16px; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.card.fold > summary::-webkit-details-marker { display: none; } details.card.fold > summary::before { content: "›"; color: var(--muted); transition: transform .15s; }
details.card.fold[open] > summary::before { transform: rotate(90deg); } details.card.fold > .in-fold { padding: 0 16px 16px; }
details.card.fold > .in-fold > h2:first-child, details.card.fold > .in-fold > .card-head { display: none; }
/* the Market page v2 (PMM + UI/UX design, 11 Oct): a numbered market-intelligence brief */
/* ---- Market brief (D42 v2): the analyst's weekly brief read top to bottom — bottom line, numbers, battlecards,
   customer voice, market & trends, risks, actions, dossier. Tokens only; every new class is mk-. The v1 rules
   .mk-tiles/.mk-tile/.mk-cards/.mk-card/.mk-n/.mk-head can go once this lands (.mk-body/.mk-take are redefined here). ---- */
.mk-sec { margin: 26px 0 0; } .mk-sec:first-of-type { margin-top: 18px; }
.mk-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.mk-no { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--faint); font-variant-numeric: tabular-nums; }
.mk-hsub { font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.mk-eyebrow { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mk-index { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: -6px 0 14px; font-size: 12.5px; }
.mk-index a { color: var(--muted); padding: 3px 8px; border-radius: 99px; } .mk-index a:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.mk-index .mk-ct { display: inline-block; min-width: 17px; padding: 0 5px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 700; text-align: center; line-height: 17px; }
.mk-notice { margin: 0 0 14px; align-items: flex-start; } .mk-notice .icon { flex: none; margin-top: 2px; }
.mk-live { margin: 0 0 14px; } .mk-live .jobcard { margin-top: 0; } .mk-live-note { margin: 8px 2px 0; }

/* 1. bottom line: the AI signature stripe, one sentence in display size, the verdict as three chips */
.mk-brief { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: start; padding: 22px 24px 22px; }
.mk-brief::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--violet))); }
.mk-byline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; } .mk-byline b { color: var(--ink-2); }
.mk-line { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 650; letter-spacing: -.015em; color: var(--ink); max-width: 56ch; }
.mk-facts { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.6; max-width: 70ch; }
.mk-verdicts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.mk-verdict { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.mk-verdict b { font-size: 15px; color: inherit; } .mk-verdict .icon { opacity: .7; }
.mk-verdict.on { font-weight: 600; border-color: transparent; } .mk-verdict.on .icon { opacity: 1; }
.mk-verdict.on.bad { background: var(--bad-bg); color: var(--bad); } .mk-verdict.on.warn { background: var(--warn-bg); color: var(--warn); } .mk-verdict.on.ok { background: var(--ok-bg); color: var(--ok); }
.mk-brief-empty .mk-line { font-size: 20px; }

/* 2. in numbers: KPI tiles — label on top, the value large, the note beneath; the trend is a rotated chevron */
.mk-numbers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.mk-numbers.with-perf { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
.mk-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.mk-kpis + .mk-kpis { margin-top: 10px; } .mk-kpis.counts { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.mk-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 11px; min-width: 0; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 3px; }
.mk-kpi.fig { border-inline-start: 3px solid var(--accent); }
.mk-kpi-l { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mk-kpi-v { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; font-variant-numeric: tabular-nums; line-height: 1.1; }
.mk-kpi-v .n { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); } .mk-kpi-v .u { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.mk-kpi-n { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mk-trend { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; align-self: center; }
.mk-trend.up { background: var(--ok-bg); color: var(--ok); } .mk-trend.up .icon { transform: rotate(-90deg); }
.mk-trend.down { background: var(--bad-bg); color: var(--bad); } .mk-trend.down .icon { transform: rotate(90deg); }
.mk-kpi.count { padding: 10px 12px 9px; gap: 1px; background: var(--panel-2); box-shadow: none; } .mk-kpi.count .mk-kpi-v .n { font-size: 20px; } .mk-kpi.count .mk-kpi-l { font-weight: 500; }
.mk-kpi.count.bad { background: var(--bad-bg); border-color: transparent; } .mk-kpi.count.bad .n, .mk-kpi.count.bad .mk-kpi-l { color: var(--bad); }
.mk-kpi.count.warn { background: var(--warn-bg); border-color: transparent; } .mk-kpi.count.warn .n, .mk-kpi.count.warn .mk-kpi-l { color: var(--warn); }
.mk-nofig { margin: 10px 2px 0; }

/* a duty with findings: headline card, the rest on open; the quiet row for nothing new / no data */
.mk-topic { padding: 0; } .mk-topic > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 14px 16px; }
.mk-topic > summary::-webkit-details-marker { display: none; } .mk-topic > summary:hover { background: var(--panel-2); border-radius: var(--radius); } .mk-topic[open] > summary:hover { border-end-start-radius: 0; border-end-end-radius: 0; }
.mk-topic .mk-eyebrow { grid-column: 1; } .mk-topic .mk-hl { grid-column: 1; font-size: 15px; line-height: 1.35; color: var(--ink); } .mk-topic .mk-tk { grid-column: 1; font-size: 13px; color: var(--muted); line-height: 1.45; }
.mk-open { grid-column: 2; grid-row: 1 / span 3; align-self: start; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--faint); margin-top: 1px; }
.mk-open .icon { transition: transform .15s; } .mk-topic[open] .mk-open .icon { transform: rotate(90deg); } .mk-topic[open] .mk-open-t { display: none; }
.mk-body { padding: 0 16px 14px; font-size: 13.5px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.mk-take { margin: 0 0 6px; font-weight: 600; color: var(--ink-2); } .mk-sum { margin: 0; color: var(--ink-2); }
.mk-points { margin: 8px 0 0; padding-inline-start: 18px; } .mk-points li { margin: 3px 0; } .mk-points li::marker { color: var(--accent); }
.mk-ev { margin-top: 8px; font-size: 12.5px; color: var(--muted); } .mk-ev > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; list-style: none; } .mk-ev > summary::-webkit-details-marker { display: none; }
.mk-ev ul { margin: 4px 0 0; padding-inline-start: 18px; } .mk-ev li { margin: 2px 0; }
.mk-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.mk-topics .mk-topic[open] { grid-column: 1 / -1; }
/* D53: the report's fixed parts by freshness (New this period · Changed · First seen by us · New to us · Background ·
   Not checked · Quiet); tokens only */
.mk-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.mk-part { padding: 12px 14px; }
.mk-part h3 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; font-size: 13.5px; font-weight: 650; }
.mk-part h3 .ar { font-size: 12px; font-weight: 500; color: var(--muted); }
.mk-part ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13px; }
.mk-part li .muted { font-size: 12px; }
.mk-part.empty { border-style: dashed; } .mk-part.empty p { margin: 0; font-size: 12.5px; color: var(--faint); }
.mk-part.new { border-inline-start: 3px solid var(--ok); } .mk-part.changed { border-inline-start: 3px solid var(--info); }
.mk-part.not_checked { border-inline-start: 3px solid var(--warn); }
.in-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; padding: 6px 8px; border-radius: var(--radius-s); background: var(--info-bg); }
.in-inline { display: inline; margin: 0; }
.mk-quiets { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.mk-quiet { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: baseline; padding: 6px 10px; border-radius: 9px; border: 1px dashed var(--line); font-size: 13px; }
.mk-quiet .badge { grid-row: 1 / span 2; align-self: start; } .mk-qt { font-weight: 600; color: var(--muted); } .mk-qs { color: var(--faint); font-size: 12.5px; }
.mk-quiet.no_data .badge { color: var(--faint); } .mk-quiets + .mk-quiets { margin-top: 4px; }
.mk-lead { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; } .mk-disc { margin: 0 0 12px; }

/* 3. battlecard wall */
.mk-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mk-battle { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 14px; }
.mk-battle.new::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--bar-warn); border-radius: var(--radius) var(--radius) 0 0; }
.mk-battle.quiet { border-style: dashed; box-shadow: none; }
.mk-bh { display: flex; align-items: center; gap: 10px; }
.mk-mono { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 15px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.mk-battle.new .mk-mono { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.mk-bn { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; } .mk-bn b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-bh .badge { flex: none; }
.mk-moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mk-moves li { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13.5px; line-height: 1.45; }
.mk-moves time { font-size: 11.5px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .02em; }
.mk-moves .mk-mv { color: var(--ink-2); } .mk-moves li:first-child .mk-mv { color: var(--ink); font-weight: 500; }
.mk-seen { font-size: 11px; font-weight: 600; color: var(--faint); white-space: nowrap; padding: 0 6px; border-radius: 99px; background: var(--line-2); line-height: 18px; }
.mk-none { margin: 0; } .mk-morenotes { margin: -2px 0 0 54px; }
.mk-bf { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); }
.mk-bf a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.mk-empty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--ink-2); } .mk-empty .icon { color: var(--faint); } .mk-empty > div { flex: 1; min-width: 220px; }

/* 4. customer voice */
.mk-voice { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.mk-voice > :only-child { grid-column: 1 / -1; }
.mk-say { position: relative; padding: 18px 20px 16px 24px; border-inline-start: 3px solid var(--accent); }
.mk-say .mk-qmark { position: absolute; top: 4px; inset-inline-end: 16px; font-size: 64px; line-height: 1; font-weight: 800; color: color-mix(in srgb, var(--accent) 14%, transparent); pointer-events: none; font-family: Georgia, "Times New Roman", serif; }
.mk-say .mk-hl { margin: 6px 0 8px; font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; color: var(--ink); text-transform: none; }
.mk-say .mk-ev { margin-top: 10px; } .mk-say .mk-ev li { font-family: Almarai, var(--font); }

/* 6. risks & signals */
.mk-risk { display: grid; gap: 12px; align-items: start; } .mk-risk.with-card { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.mk-quiets + .mk-risk { margin-top: 10px; }
.mk-signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mk-risk.wide .mk-signals { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); align-items: start; }
.mk-signal { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 18px; box-shadow: var(--shadow); display: grid; gap: 3px; }
.mk-signal::before { content: ""; position: absolute; inset: 10px auto 10px 0; width: 3px; border-radius: 99px; background: var(--line); }
.mk-signal.high::before { background: var(--bad); } .mk-signal.medium::before { background: var(--bar-warn); } .mk-signal.low::before { background: var(--bar-info); }
.mk-sg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.mk-sg-t { font-size: 14.5px; line-height: 1.35; } .mk-sg-w { font-size: 13.5px; color: var(--ink-2); }
.mk-sg-act { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; padding: 7px 10px; border-radius: 9px; background: var(--panel-2); font-size: 13px; font-weight: 500; color: var(--ink); }
.mk-sg-act .icon { color: var(--accent); margin-top: 2px; }
.mk-signal.none { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-style: dashed; box-shadow: none; } .mk-signal.none::before { display: none; }

/* 7. actions: the thing to act on */
.mk-actions { margin-top: 26px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--accent) 7%, transparent); }
.mk-actions .card-head h2 { display: flex; align-items: center; gap: 8px; } .mk-actions .card-head h2 .icon { color: var(--accent); }
.mk-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mk-todo li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.mk-todo li.today { background: color-mix(in srgb, var(--bad-bg) 60%, var(--panel-2)); }
.mk-tn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--panel); color: var(--ink-2); border: 1px solid var(--line); }
.mk-todo li.today .mk-tn { background: var(--bad); border-color: var(--bad); color: var(--on-status); } .mk-todo li.this_week .mk-tn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.mk-td b { font-size: 14.5px; line-height: 1.35; } .mk-todo .badge { flex: none; }

/* 8. dossier & archive */
.mk-fold { margin: 0 0 10px; } .mk-fold-p { margin: 0 0 10px; } .mk-known { margin: 0 0 10px; } .mk-known .badge { margin: 2px 2px 2px 0; }
.mk-groups { display: grid; gap: 4px; } .mk-group { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.mk-group > summary { cursor: pointer; } .mk-group .mk-moves { margin: 8px 0 4px; }
.mk-duties { margin: 0; padding-inline-start: 18px; } .mk-duties li { margin: 3px 0; }
.mk-adds { white-space: pre-line; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); max-height: 220px; overflow: auto; }
.mk-archive { margin-top: 12px; } .mk-earlier .when { width: 96px; }

/* ---- 1366 → 375: one column, chips in a row, tiles two per row, cards full width ---- */
@media (max-width: 1100px) { .mk-numbers.with-perf { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .mk-brief { grid-template-columns: 1fr; gap: 14px; padding: 18px 16px 16px; }
  .mk-verdicts { flex-direction: row; flex-wrap: wrap; min-width: 0; } .mk-line { font-size: 19px; }
  .mk-voice, .mk-risk.with-card, .mk-risk.wide .mk-signals { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .mk-index { display: none; }
  .mk-kpis, .mk-kpis.counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-kpi-v .n { font-size: 22px; }
  .mk-topics, .mk-wall { grid-template-columns: 1fr; } .mk-topic > summary { padding: 12px 14px; } .mk-body { padding: 10px 14px 12px; }
  .mk-moves li { grid-template-columns: 42px minmax(0, 1fr); } .mk-moves .mk-seen { grid-column: 2; justify-self: start; }
  .mk-todo li { grid-template-columns: 26px minmax(0, 1fr); } .mk-todo .badge { grid-column: 2; justify-self: start; }
  .mk-quiet { grid-template-columns: 1fr; } .mk-quiet .badge { grid-row: auto; justify-self: start; }
  .mk-say { padding: 16px 14px 14px 18px; } .mk-say .mk-hl { font-size: 16px; } .mk-say .mk-qmark { font-size: 48px; }
  .mk-sec { margin-top: 22px; } .mk-morenotes { margin-left: 50px; }
  .mk-actions .card-head { flex-wrap: wrap; } .mk-actions .card-head h2 { white-space: nowrap; } .mk-actions .mk-owner { display: none; }
  .mk-fold > summary { flex-wrap: wrap; } .mk-fold > summary > .small { flex-basis: 100%; padding-inline-start: 16px; }
}
@media print { .mk-index, .mk-notice, .mk-live, .mk-open { display: none; } .mk-actions { box-shadow: none; } }

/* ---- Marketing intelligence (D45): console/intel.py, templates intel*.html and _intel_*.html. Every class starts
   with in-; colours are tokens only (dark mode follows); logical properties so the Arabic pages (dir=rtl on .in-wrap)
   mirror; the server's SVG charts read --chart-1..6 and --demo-bg, mapped here to the console's tokens. ---- */
.in-wrap { --chart-1: var(--accent); --chart-2: var(--violet); --chart-3: var(--bar-warn); --chart-4: var(--info);
           --chart-5: var(--story); --chart-6: var(--faint); --demo-bg: var(--violet-bg); }
.in-wrap > * + * { margin-top: 16px; }
.in-wrap > .in-subnav, .in-wrap > .in-langnote { margin-top: 10px; }
.in-demo { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin: 0 0 14px; border-radius: 12px; font-size: 14px;
           color: var(--violet); border: 1.5px solid var(--violet);
           background: repeating-linear-gradient(135deg, var(--violet-bg) 0 12px, color-mix(in srgb, var(--violet) 12%, var(--violet-bg)) 12px 24px); }
.badge.in-t-demo { background: var(--violet-bg); color: var(--violet); }
.in-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.in-head-text { min-width: 0; flex: 1 1 420px; }
.in-eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.in-head h1 { overflow-wrap: anywhere; }
.in-lede { margin: 6px 0 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.in-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.in-lang { font-family: Almarai, var(--font); }
.in-langnote { margin: 0; font-size: 12.5px; color: var(--muted); }
[dir=rtl] .in-eyebrow, [dir=rtl] .in-h3, [dir=rtl] .in-scope-dl dt { letter-spacing: 0; text-transform: none; }

/* filter bar: a GET form; folded into a details on phones */
.in-filterbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 12px 14px; background: var(--panel);
                border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.in-filters > summary { list-style: none; } .in-filters > summary::-webkit-details-marker { display: none; }
.in-f { display: flex; flex-direction: column; flex: 1 1 150px; min-width: 140px; max-width: 240px; margin: 0; }
.in-f > label, .in-f-label, .in-f > legend { margin: 0 0 4px; padding: 0; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.in-f select, .in-f input:not([type=checkbox]):not([type=radio]) { padding: 7px 9px; font-size: 13.5px; }
.in-f-date { max-width: 170px; } .in-f-wide { flex-basis: 100%; max-width: none; }
fieldset.in-f { border: 0; padding: 0; min-width: 0; }
.in-f-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.in-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.in-check { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.in-demo-toggle { padding: 6px 10px; border-radius: 9px; background: var(--violet-bg); color: var(--violet); }
.in-multi { position: relative; }
.in-multi > summary { list-style: none; } .in-multi > summary::-webkit-details-marker { display: none; }
.in-select { display: block; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel);
             font-size: 13.5px; color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in-multi[open] > .in-multi-pop { position: absolute; z-index: 12; inset-inline-start: 0; top: calc(100% + 4px); min-width: 240px;
  max-height: 300px; overflow: auto; display: grid; gap: 6px; padding: 10px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-l); }

/* secondary tabs: the area's modules */
.in-subnav { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.in-subnav a { flex: none; white-space: nowrap; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel);
               color: var(--ink-2); font-size: 13px; font-weight: 500; }
.in-subnav a:hover { text-decoration: none; border-color: var(--accent); color: var(--ink); }
.in-subnav a.on { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
                  color: var(--accent); font-weight: 650; }
/* the intelligence area has ten pages: one scrolling row instead of two wrapped lines */
.areatabs[data-many] { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.areatabs[data-many] a { flex: none; white-space: nowrap; padding-inline: 9px; }

/* headings, grids */
.in-h2 { margin: 0 0 12px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.in-h2 a { color: inherit; } .in-h2 a:hover { color: var(--accent); }
.in-h3 { margin: 16px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.in-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.in-grid2 > .card + .card, .in-cards > .card + .card, .in-brands > .card + .card { margin-top: 0; }
.in-stack > * + * { margin-top: 16px; }
.in-detail .card { min-width: 0; }

/* scope bar and coverage */
.in-scopebar { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.in-scope-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; margin: 0; }
.in-scope-dl dt { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.in-scope-dl dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.in-covbox { margin-top: 12px; }
.in-covbox > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink-2); list-style: none; cursor: pointer; }
.in-covbox > summary::-webkit-details-marker { display: none; }
.in-covbox > summary > span:nth-child(2) { color: var(--accent); font-weight: 600; }
.in-covstrip { display: inline-flex; gap: 2px; }
.in-covstrip i { width: 7px; height: 16px; border-radius: 2px; background: var(--line); }
.in-covstrip i.in-t-ok { background: var(--ok); } .in-covstrip i.in-t-info { background: var(--info); }
.in-covstrip i.in-t-warn { background: var(--bar-warn); } .in-covstrip i.in-t-bad { background: var(--bad); }
.in-covstrip i.in-t-demo { background: var(--violet); }
.in-cov { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; }
.in-cov a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; color: var(--ink-2); }
.in-cov a:hover { background: var(--panel-2); text-decoration: none; }
.in-cov-note { display: block; padding-inline-start: 8px; font-size: 11.5px; color: var(--muted); }
.in-issues { margin: 12px 0 0; } .in-issues ul { margin: 4px 0; padding-inline-start: 18px; }
.in-sumlist { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; }

/* KPI tiles: value with unit, change in words, prior, definition one click away */
.in-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.in-kpis-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.in-kpis-s { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.in-kpi { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px;
          background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.card .in-kpi { background: var(--panel-2); border-color: var(--line-2); }
.in-kpi p { margin: 0; }
.in-kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.in-kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.in-kpi.in-nodata .in-kpi-value { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.in-kpi-change { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.in-good { color: var(--ok); } .in-bad { color: var(--bad); } .in-neutral { color: var(--ink-2); }
.in-arrow { display: inline-block; width: 0; height: 0; border-inline-start: 5px solid transparent; border-inline-end: 5px solid transparent; }
.in-arrow.in-up { border-bottom: 7px solid currentColor; } .in-arrow.in-down { border-top: 7px solid currentColor; }
.in-arrow.in-flat { width: 9px; height: 2px; border: 0; background: currentColor; }
.in-kpi-prior { font-size: 12px; color: var(--muted); }
.in-kpi-spark svg { display: block; max-width: 100%; margin-top: 4px; }
.in-kpi-def { margin-top: 4px; font-size: 12px; }
.in-kpi-def > summary { width: max-content; color: var(--accent); font-weight: 500; }
.in-kpi-def p { margin-top: 4px; color: var(--ink-2); }
.in-restricted { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-weight: 600; font-size: 14px; }

/* module panels */
.in-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.in-panel-head .in-h2 { margin: 0; }
.in-panel-title { min-width: 0; }
.in-q { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.in-chip { flex: none; }
.in-meta { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); }
.in-note { margin: 4px 0 10px; font-size: 12.5px; color: var(--ink-2); }
.in-warn-text { color: var(--warn); } .in-bad-text { color: var(--bad); } .in-ok-text { color: var(--ok); } .in-err { color: var(--bad); }
.in-panel-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; justify-content: space-between; margin-top: 14px;
                 padding-top: 12px; border-top: 1px solid var(--line-2); }
.in-sources { flex: 1 1 320px; font-size: 13px; }
.in-sources[open] { flex-basis: 100%; }
.in-sources > summary { width: max-content; max-width: 100%; color: var(--accent); font-weight: 500; }
.in-sources .in-scroll { margin-top: 8px; border: 1px solid var(--line-2); border-radius: 10px; }
.in-error { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.in-error code { overflow-wrap: anywhere; }
.in-needs { padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--panel-2); }
.in-needs p { margin: 0 0 6px; }
.in-needs-title { display: flex; gap: 6px; align-items: center; }
.in-needs-list { margin: 6px 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: 13px; }
.in-needs-actions { margin-top: 10px; }
.in-views { margin: 8px 2px 0; }

/* tables: caption, sortable headers, scroll inside their own box */
.in-table-block { margin: 10px 0; }
.in-scroll { position: relative; max-width: 100%; overflow-x: auto; }  /* positioned: the .sr spans inside stay clipped */
.in-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.in-table caption { caption-side: top; padding: 10px 14px; text-align: start; font-size: 14px; font-weight: 650; color: var(--ink); }
.in-cap-note { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.in-table th { white-space: nowrap; }
.in-table td { vertical-align: top; }
.in-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer;
           font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.in-sort::after { content: "↕"; font-size: 10px; opacity: .45; }
[aria-sort=ascending] .in-sort::after { content: "↑"; opacity: 1; } [aria-sort=descending] .in-sort::after { content: "↓"; opacity: 1; }
.in-num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.in-row-bad td { background: color-mix(in srgb, var(--bad-bg) 70%, transparent); }
.in-row-bad td:first-child { border-inline-start: 3px solid var(--bad); }
.in-row-warn td { background: color-mix(in srgb, var(--warn-bg) 70%, transparent); }
.in-row-ok td { background: color-mix(in srgb, var(--ok-bg) 60%, transparent); }
.in-filter { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 0 10px; border: 1px solid var(--line);
             border-radius: 9px; background: var(--panel); color: var(--muted); font-weight: 400; }
.in-filter input { min-width: 180px; padding: 6px 0; border: 0; background: transparent; box-shadow: none; }
.in-filter-wide { display: flex; max-width: 420px; }
.in-runbox { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.in-runbox form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.in-filter:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }  /* the input inside has no border of its own (QA-A2) */
.in-pad { margin: 0; padding: 8px 14px; }
.in-pager { display: flex; gap: 10px; align-items: center; justify-content: center; }

/* charts: the SVG and the same rows as a table */
.in-chart { margin: 12px 0 0; min-width: 0; }
.in-chart figcaption { margin-bottom: 8px; font-size: 13.5px; }
.in-chart-svg { overflow-x: auto; } .in-chart-svg svg { display: block; height: auto; max-width: 100%; }
.in-astable { margin-top: 8px; font-size: 13px; } .in-astable > summary { width: max-content; color: var(--accent); }

/* text, lists, findings */
.in-text p { margin: 0; white-space: pre-line; }
.in-items { list-style: none; margin: 0; padding: 0; }
.in-item { padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.in-item:last-child { border-bottom: 0; }
.in-item p { margin: 0; }
.in-item-title { font-weight: 600; } .in-item-body { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.in-item-meta { margin-top: 2px; font-size: 12px; color: var(--muted); }
.in-item.in-row-bad { padding-inline-start: 10px; border-inline-start: 3px solid var(--bad); }
.in-items-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 18px; }
.in-findings { list-style: none; margin: 0; padding: 0; }
.in-finding { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.in-finding:last-child { border-bottom: 0; }
.in-finding p { margin: 0; }
.in-finding-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.in-finding-top a { color: var(--ink); } .in-finding-top a:hover { color: var(--accent); }
.in-finding-body { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
.in-finding-act { margin-top: 6px; padding: 6px 10px; border-radius: 9px; font-size: 13.5px; background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.in-finding-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.in-score { font-weight: 700; color: var(--ink); }
.in-parts { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.in-scoreline { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.in-score-big { font-size: 26px; letter-spacing: -.02em; }
.in-finding-page { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 16px; align-items: start; }

/* detail pages */
.in-dl { margin: 0; }
.in-dl > div { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.in-dl > div:last-child { border-bottom: 0; }
.in-dl dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.in-dl dd { margin: 0; overflow-wrap: anywhere; }
.in-excerpt { margin: 0; padding: 10px 14px; white-space: pre-line; font-size: 14px; background: var(--panel-2);
              border-inline-start: 3px solid var(--accent); border-start-end-radius: 10px; border-end-end-radius: 10px; }
.in-files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.in-reviewform { display: grid; gap: 6px; max-width: 520px; } .in-reviewform label { margin: 0; }
.in-propose { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.in-ext { vertical-align: -1px; }

/* forms */
.in-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-top: 12px; }
.in-form .in-f { flex: 1 1 180px; max-width: none; }
.in-form-s { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.in-formbox > summary, .in-rowedit > summary { width: max-content; list-style: none; }
.in-formbox > summary::-webkit-details-marker, .in-rowedit > summary::-webkit-details-marker { display: none; }
.in-rowedit { margin-top: 6px; } .in-rowedit[open] { min-width: 280px; }
.in-evfilter { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 12px 14px; }
.in-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.in-segopt { display: inline-flex; gap: 6px; align-items: center; margin: 0; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; }
.in-segopt:has(input:checked) { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); }
.in-sections { padding: 8px 0; } .in-sections > summary { color: var(--accent); font-size: 13px; }

/* competitor set, templates, portfolio */
.in-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.in-comp-name { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--ink); }
.in-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.in-comp .actions form { margin: 0; }
.in-tpl.in-want { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.in-cols { margin-top: 8px; font-size: 13px; } .in-cols ul { margin: 6px 0 0; padding-inline-start: 18px; }
.in-terms > summary { color: var(--accent); }
.in-brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.in-rules { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.in-dict code { font-size: 11.5px; }
.in-reportbar p { margin: 0 0 8px; }

/* grounded questions */
.in-askform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.in-askform input { flex: 1 1 260px; }
.in-busy { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.in-answer { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); }
.in-answer-insufficient, .in-answer-unavailable { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.in-answer p { margin: 4px 0; } .in-answer-text { white-space: pre-line; }
.in-cites { margin: 4px 0 0; padding-inline-start: 20px; font-size: 13px; }

/* 1366 → 375 */
@media (max-width: 1100px) { .in-kpis-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .in-grid2, .in-finding-page { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .in-f, .in-f-date { flex-basis: calc(50% - 6px); max-width: none; }
  .in-kpi-value { font-size: 19px; }
  .in-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .in-head { align-items: flex-start; }
  .in-panel-head { flex-wrap: wrap; }
  .in-cards { grid-template-columns: 1fr; }
  .in-filter input { min-width: 0; }
}
@media (max-width: 420px) { .in-f { flex-basis: 100%; } .in-kpis-8 { grid-template-columns: 1fr; } }
@media print { .in-filters, .in-subnav, .in-head-actions, .in-ask, .in-rowedit, .in-formbox, .in-reportbar .actions { display: none !important; }
  .in-wrap .card { break-inside: avoid; } .in-scroll { overflow: visible; } }
.in-kpi-split { font-size: 14px; } .in-kpi-break { list-style: none; margin: 2px 0 0; padding: 0; font-size: 12.5px; display: grid; gap: 2px; }
.in-kpi-break li { display: flex; justify-content: space-between; gap: 8px; } .in-kpi-label a { color: inherit; }
.in-kpi-label a:hover { color: var(--accent); } .in-row-info td { background: color-mix(in srgb, var(--info-bg) 60%, transparent); }
.in-unavail { margin-top: 2px; font-size: 12.5px; } .in-unavail > summary { width: max-content; max-width: 100%; color: var(--accent); }
.in-unavail-list { margin: 6px 0 0; padding-inline-start: 18px; columns: 2 220px; color: var(--ink-2); }
.in-f-help { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.in-f-bad input, .in-f-bad select, .in-f-bad textarea { border-color: var(--bad); }
.in-req { color: var(--bad); }
.in-secpick { border: 0; padding: 0; margin: 8px 0 0; } .in-secpick legend { padding: 0; }
.in-chapter > * + * { margin-top: 12px; } .in-chapter-h { margin: 8px 0 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.in-insufficient { border-style: dashed; } .in-datasets { margin-top: 8px; font-size: 13px; } .in-datasets > summary { color: var(--accent); width: max-content; }
.in-sourcelist { margin: 8px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; }
details.card > summary.in-h2 { margin: 0; cursor: pointer; }
.in-f select { min-width: 150px; }
@media (max-width: 720px) { .in-scope-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; } .in-f select { min-width: 0; } }

/* ---- de-clutter pass (owner, 12 Oct: "the suite is crowded"): one filter line, one scope line, compact tiles, short
   ranked lists, area cards, "About this data" folded, tables of eight rows that never widen the page ---- */
.in-wrap, .in-wrap > *, .in-grid2 > *, .in-blocks > *, .in-areas > *, .in-glance > * { min-width: 0; }
.in-fline { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.in-fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.in-fchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 500;
            background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
a.in-fchip:hover { text-decoration: none; border-color: var(--accent); }
.in-fchip-demo { background: var(--violet-bg); color: var(--violet); border-color: color-mix(in srgb, var(--violet) 35%, transparent); }
.in-fchip-warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.in-fline .in-filters { position: static; }
.in-fbtn { padding: 4px 10px; }
.in-filters[open] > .in-fbtn { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border-color: var(--accent); color: var(--accent); }
.in-filters[open] > .in-filterbar { position: absolute; z-index: 25; inset-inline: 0; top: calc(100% + 6px); box-shadow: var(--shadow-l); }
.in-fmeta { font-size: 12.5px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.in-fmeta::before { content: "·"; color: var(--faint); }
.in-cov2 { position: static; }
.in-cov2 > summary { list-style: none; cursor: pointer; } .in-cov2 > summary::-webkit-details-marker { display: none; }
.in-cov2 > summary b { color: var(--ink); }
.in-pop { position: absolute; z-index: 25; inset-inline-start: 0; top: calc(100% + 6px); width: min(560px, 100%); max-height: 60vh; overflow: auto;
          padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-l); }
.in-pop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.in-pop .in-cov { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 6px; }
.in-head h1 { font-size: 22px; } .in-wrap > .in-fline { margin-top: 10px; }
.in-lede .badge { flex: none; }

/* KPI tiles: label, value, change, spark; the rest behind "i" */
.in-kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 4px; }
.in-kpi { padding: 10px 12px; gap: 2px; }
.in-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.in-kpi-top .in-kpi-label { min-width: 0; line-height: 1.3; }
.in-kpi-info { position: static; flex: none; }
.in-kpi-info > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted); font: italic 700 11px/1 Georgia, serif; }
.in-kpi-info > summary::-webkit-details-marker { display: none; }
.in-kpi-info > summary:hover, .in-kpi-info[open] > summary { color: var(--accent); border-color: var(--accent); }
.in-kpi-pop { position: absolute; z-index: 20; inset-inline: 0; top: 34px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-l); color: var(--ink-2); }
.in-kpi-pop p { margin: 0 0 4px; } .in-kpi-pop p:last-child { margin-bottom: 0; }
.in-kpi-value { font-size: 21px; }
.in-kpi-spark svg { margin-top: 2px; height: 24px; }
.in-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.in-foot > summary { width: max-content; max-width: 100%; cursor: pointer; }
.in-kpiband > * + * { margin-top: 0; }

/* two short ranked lists */
.in-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.in-card-head .in-h2 { margin: 0; }
.in-seeall { font-size: 12.5px; white-space: nowrap; }
.in-lines { list-style: none; margin: 0; padding: 0; }
.in-line { padding: 7px 0 7px 10px; padding-inline: 10px 0; border-bottom: 1px solid var(--line-2); border-inline-start: 3px solid transparent; }
.in-line:last-child { border-bottom: 0; }
.in-line p { margin: 0; }
.in-line-t { font-weight: 600; font-size: 13.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-line-t a { color: var(--ink); } .in-line-t a:hover { color: var(--accent); }
.in-line-m { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-line-bad { border-inline-start-color: var(--bad); } .in-line-warn { border-inline-start-color: var(--bar-warn); }
.in-line-ok { border-inline-start-color: var(--ok); } .in-line-info { border-inline-start-color: var(--bar-info); }
.in-more-link { margin: 8px 0 0; font-size: 12.5px; }

/* at a glance */
.in-glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.in-glance > .card + .card { margin-top: 0; }
.in-glance-card { padding: 12px 14px; }
.in-glance-t { margin: 0; font-size: 13.5px; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--ink); }
.in-glance-t a { color: inherit; }
.in-glance-n { margin: 2px 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.in-glance-u { font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.in-glance-l { margin: 0; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-glance-card .in-card-head { margin-bottom: 0; }

/* the compact Ask box */
.in-ask { padding: 12px 14px; }
.in-ask-t { margin: 0; font-size: 13.5px; font-weight: 650; white-space: nowrap; }
.in-ask-t label { margin: 0; display: inline-flex; gap: 6px; align-items: center; font-size: inherit; color: var(--ink); }
.in-askform input { padding: 6px 10px; }
.in-ask-hint { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }

/* section pages: area cards */
.in-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.in-areas > .card + .card { margin-top: 0; }
.in-area { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.in-area-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.in-area-head .in-h2 { margin: 0; font-size: 15px; } .in-area-head .in-h2 a { color: var(--ink); }
.in-area-kpis { margin: 0; display: grid; gap: 4px; }
.in-area-kpis > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px;
                      padding-bottom: 4px; border-bottom: 1px dashed var(--line-2); }
.in-area-kpis dt { color: var(--muted); min-width: 0; } .in-area-kpis dd { margin: 0; font-weight: 650; text-align: end; }
.in-area-ch { display: block; font-size: 11.5px; font-weight: 600; }
.in-area-need, .in-area-find { margin: 0; font-size: 13px; color: var(--ink-2); }
.in-area-find a { color: var(--ink); font-weight: 600; }
.in-area-open { margin: auto 0 0; font-size: 13px; font-weight: 600; }
.in-area .in-needs-actions { margin-top: 0; }

/* module pages */
.in-about { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.in-about > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 9px 14px; cursor: pointer; font-size: 13px; }
.in-about-t { font-weight: 600; color: var(--accent); } .in-about-s { color: var(--muted); font-size: 12.5px; }
.in-about[open] > summary { border-bottom: 1px solid var(--line-2); }
.in-about-body { padding: 10px 14px 12px; } .in-about-body > * + * { margin-top: 8px; }
.in-about .in-scroll { border: 1px solid var(--line-2); border-radius: 10px; }
.in-empty-card { padding: 14px 16px; } .in-empty-card p { margin: 0 0 8px; }
.in-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.in-blk { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.in-blk-table, .in-blk-text { grid-column: 1 / -1; }
.in-blk .in-table-block, .in-blk .in-chart { margin: 0; }
.in-foot-links { margin: 0; }
.in-table td { overflow-wrap: break-word; } .in-table td:not(.in-num) { max-width: 34ch; }  /* long words wrap; columns keep their words whole */
.in-table td:first-child { min-width: 160px; }

/* first eight rows, "Show all N rows" (a CSS toggle: sorting and filtering still see every row) */
.in-table-block { position: relative; }
.in-clip > .in-more-cb:not(:checked) ~ .in-scroll tbody tr:nth-child(n+9) { display: none; }
.in-more { display: inline-block; margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--accent); cursor: pointer; }
.in-more:hover { text-decoration: underline; }
.in-more-cb:focus-visible ~ .in-more { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.in-more-off { display: none; } .in-more-cb:checked ~ .in-more .in-more-on { display: none; }
.in-more-cb:checked ~ .in-more .in-more-off { display: inline; }

/* a line chart's legend as a compact list */
.in-legend { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px;
             font-size: 12px; color: var(--ink-2); }
.in-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.in-legend li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-sw { flex: none; width: 12px; height: 3px; border-radius: 2px; }
.in-sw-1 { background: var(--chart-1); } .in-sw-2 { background: var(--chart-2); } .in-sw-3 { background: var(--chart-3); }
.in-sw-4 { background: var(--chart-4); } .in-sw-5 { background: var(--chart-5); } .in-sw-6 { background: var(--chart-6); }

@media (max-width: 1280px) { .in-kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .in-blocks, .in-glance { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .in-kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .in-legend { grid-template-columns: 1fr; }
  .in-fline { gap: 6px; }
  .in-table td:not(.in-num) { max-width: 24ch; }
}
@media print { .in-fline, .in-kpi-info, .in-more, .in-more-cb { display: none !important; }
  .in-clip > .in-more-cb ~ .in-scroll tbody tr { display: table-row !important; } }
.in-area-ch .in-arrow { margin-inline-end: 3px; vertical-align: 1px; }
.in-cov2 > summary.in-fmeta::before { content: none; }
.in-scroll > .in-table { width: max-content; min-width: 100%; }  /* columns keep their words on one line; a wide table scrolls in its box */
.in-scroll { scrollbar-width: thin; }
/* brand lifecycle (D48): Add brand, the Brand page and its kit */
.nav a.addbrand { color: var(--muted); font-size: 13px; padding-block: 5px; }
.nav a.addbrand .icon { color: var(--faint); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.swatches button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.brandchip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; }
.brandchip .dot { width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.field-err { color: var(--bad); font-size: 12.5px; margin: 6px 0 0; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.kit-tile { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
.kit-tile .kit-img { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; overflow: hidden;
  background: repeating-conic-gradient(var(--panel-2) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; }
.kit-tile .kit-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kit-tile .kit-name { font-weight: 600; font-size: 13px; word-break: break-word; }
.kit-tile .kit-meta { font-size: 12px; color: var(--muted); }
.kit-logo { width: 96px; height: 96px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line);
  background: repeating-conic-gradient(var(--panel-2) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; }
.kit-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.slugpreview { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; color: var(--muted); }
.policy-opt { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 12px 0 0; }
.policy-opt input { margin-top: 3px; flex: none; }
.policy-opt .help { display: block; margin: 2px 0 0; font-weight: 400; }

/* ---- phones reflow instead of clipping (UX journey audit 12 Oct, P0-4; WCAG 1.4.10 at 320 CSS px) ----
   Tables that are not .stack scroll inside their own box with a fade at the far edge; pill filters wrap; long
   words and links break; buttons may wrap their label; cards never grow past their column. */
.card, .pop { min-width: 0; }
code, .card a, .alert, .help, .cell-title, .cell-sub { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .tabs { flex-wrap: wrap; max-width: 100%; } .tabs a { white-space: nowrap; }
  .btn { white-space: normal; text-align: center; max-width: 100%; }
  .badge { white-space: normal; max-width: 100%; }  /* a long badge wraps inside its pill */
  /* a table wider than the phone scrolls inside the box that holds it; the edge that hides columns shows a shadow */
  main :has(> .table:not(.stack)) { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  main .card:has(> .table:not(.stack)), main .card:has(> form > .table:not(.stack)), main .card:has(> div > .table:not(.stack)) {
    overflow-x: auto; background:
      linear-gradient(to right, var(--panel) 40%, transparent) left center / 28px 100% no-repeat local,
      linear-gradient(to left, var(--panel) 40%, transparent) right center / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--ink) 22%, transparent), transparent) left center / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--ink) 22%, transparent), transparent) right center / 12px 100% no-repeat scroll,
      var(--panel); }
  main :not(.card):has(> .table:not(.stack)) {  /* a bare wrapper: the far edge fades instead */
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); }
  [dir=rtl] main :not(.card):has(> .table:not(.stack)) {
    -webkit-mask-image: linear-gradient(to left, black calc(100% - 24px), transparent); mask-image: linear-gradient(to left, black calc(100% - 24px), transparent); }
  main .table:not(.stack) th { white-space: nowrap; }
  .compare, .in-scroll { -webkit-mask-image: none !important; mask-image: none !important; }
  .steps .step { min-width: 0; }
  .pagehead > * { min-width: 0; }
}
/* the month's rows on a phone (WS4 adds .month-rows to the month table): one 88-px row, the thumb on the
   left, status and date, the idea title, the channel chips; the checkbox shows in Select mode (long-press) */
@media (max-width: 720px) {
  .table.stack.month-rows tr { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "thumb status" "thumb title" "thumb chans";
    align-items: center; gap: 2px 12px; min-height: 88px; padding: 10px 14px; }
  .table.stack.month-rows td { grid-column: auto; }
  .table.stack.month-rows td:nth-child(3) { grid-area: thumb; } .table.stack.month-rows .thumb { width: 56px; height: 70px; }
  .table.stack.month-rows td.cell-status { grid-area: status; display: flex; align-items: center; gap: 8px; order: 0; }
  .table.stack.month-rows td.cell-content { grid-area: title; min-width: 0; }
  .table.stack.month-rows td.cell-content .cell-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .table.stack.month-rows td.cell-content .item-brief, .table.stack.month-rows td.cell-content .item-brief-fold { display: none; }
  .table.stack.month-rows td:nth-child(2) { grid-area: chans; font-size: 12px; color: var(--muted); display: flex; gap: 6px; }
  .table.stack.month-rows td:nth-child(2) b { font-weight: 600; color: var(--ink-2); }
  .table.stack.month-rows td:nth-child(5), .table.stack.month-rows td:nth-child(7) { display: none; }
  .table.stack.month-rows:not(.selecting) td.sel { display: none; }
  .table.stack.month-rows.selecting tr { grid-template-columns: 24px 56px minmax(0, 1fr); grid-template-areas: "sel thumb status" "sel thumb title" "sel thumb chans"; }
  .table.stack.month-rows.selecting td.sel { grid-area: sel; grid-row: auto; }
}
/* D54: Intelligence › Today — To check and Next side by side (stacked on phones), sections that move (drag by the
   handle or the arrow buttons), how we know each item, what the analyst did; tokens only */
.td-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin: 4px 0 12px; }
.td-bar .td-foot { margin: 0; }
.td-hint { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.td-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.td-board > * { min-width: 0; grid-column: 1 / -1; }
.td-board > .td-half { grid-column: auto; } .td-board > .td-half.td-solo { grid-column: 1 / -1; }
.td-board > .card + .card, .td-board > .td-sec + .td-sec { margin-top: 0; }
.td-sec.td-dragging { opacity: .55; outline: 2px dashed var(--accent); outline-offset: 2px; }
.td-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.td-head .td-h { margin: 0; flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.td-grip { color: var(--faint); cursor: grab; display: inline-flex; padding: 2px; border-radius: 6px; touch-action: none; }
.td-grip:hover { background: var(--panel-2); color: var(--ink-2); }
.td-move { display: inline-flex; gap: 2px; flex: none; }
.td-move .td-mv { padding: 3px 6px; }
.td-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 8px; font-size: 12.5px; }
.td-sortlink[aria-current] { font-weight: 650; color: var(--ink); text-decoration: underline; }
.td-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.td-list:not(.td-all) > .td-more-item { display: none; }
.td-showall { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.td-item { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 9px 11px; background: var(--panel); min-width: 0; }
.td-item.td-flag, .td-item.td-late { border-inline-start: 3px solid var(--bad); }
.td-item.td-pinned { background: var(--panel-2); border-color: var(--accent); }
.td-item-top { display: flex; align-items: flex-start; gap: 8px; }
.td-item-top .badge { flex: none; margin-top: 1px; }
.td-title { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.td-pin { flex: none; background: none; border: 0; padding: 2px; color: var(--faint); cursor: pointer; border-radius: 6px; line-height: 0; }
.td-pin:hover { color: var(--ink-2); background: var(--panel-2); } .td-pin[aria-pressed="true"] { color: var(--accent); }
.td-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.td-how { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.td-how-l { color: var(--faint); font-weight: 600; }
.td-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.td-form { display: inline; margin: 0; }
.td-why { margin-top: 6px; } .td-why > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--bad); }
.td-why > p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.td-assign { display: inline-block; } .td-assign > summary { list-style: none; } .td-assign > summary::-webkit-details-marker { display: none; }
.td-assign-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); }
.td-assign-form label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); min-width: 0; }
.td-assign-form select, .td-assign-form input { max-width: 100%; }
.td-foot { margin: 10px 0 0; font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.td-run > summary { cursor: pointer; display: grid; gap: 2px; list-style: none; }
.td-run > summary::-webkit-details-marker { display: none; }
.td-run-t { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.td-run-line { font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.td-run-body { margin-top: 10px; border-top: 1px solid var(--line-2); padding-top: 4px; }
.td-run-h { margin: 12px 0 4px; font-size: 12px; }
.td-searches { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 13px; }
.td-searches q { font-weight: 600; overflow-wrap: anywhere; }
.td-q-meta { display: block; font-size: 12px; color: var(--muted); }
.td-pages { margin: 0; padding-inline-start: 18px; font-size: 12.5px; overflow-wrap: anywhere; }
.td-areas { margin: 0 0 8px; } .td-area-sec { margin: 6px 0 4px; font-size: 12px; font-weight: 650; color: var(--muted); }
.td-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.td-chips a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--ink-2); background: var(--panel); }
.td-chips a:hover { border-color: var(--accent); text-decoration: none; }
.td-more-areas { margin-top: 8px; } .td-more-areas > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.in-more-areas { margin-top: 12px; } .in-more-areas > summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.mk-part li .td-how { display: block; margin-top: 2px; font-size: 12px; }
.mk-part .td-head { margin-bottom: 6px; } .mk-part .td-head h3 { margin: 0; flex: 1; min-width: 0; }
@media (max-width: 1000px) { .td-board { grid-template-columns: minmax(0, 1fr); } .td-board > .td-half { grid-column: 1 / -1; } }
@media (max-width: 720px) { .td-bar { flex-direction: column; align-items: flex-start; } .td-item { padding: 8px 9px; }
  .td-item-top { flex-wrap: wrap; } .td-item-top .td-pin { order: 1; margin-inline-start: auto; } .td-item-top .td-title { order: 2; flex-basis: 100%; } }
/* Approval rules (brand page, owner 14 Oct: the table was squeezed into half a column): one row per kind, full width */
.rules { display: flex; flex-direction: column; }
.rule { display: grid; grid-template-columns: minmax(190px, 1.1fr) 92px minmax(260px, 2.4fr); gap: 10px 22px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.rule:first-child { border-top: 0; padding-top: 4px; }
.rule-count { display: flex; flex-direction: column; gap: 2px; margin: 0; } .rule-count select { width: 100%; }
.rule-rights { gap: 8px; } .rule-rights .chip-opt { padding: 4px 11px; font-size: 13px; }
.rule-alone[hidden] { display: none; }
@media (max-width: 760px) { .rule { grid-template-columns: 1fr; gap: 8px; } .rule-count { flex-direction: row; align-items: center; gap: 10px; } .rule-count select { width: auto; } }
/* last guard only: nothing above should need it */
html { overflow-x: clip; }
