/* ICON Gold × Workframe Delivery Portal
   Layout: charcoal programme band with a 12-week meter and section tabs; summary before detail on a cool white ground.
   One deliberate light look; ICON gold is used sparingly as the mark of value. */
:root {
  color-scheme: light;
  --page: #F2F3F4; --surface: #FFFFFF; --surface-2: #F7F8F9; --tint: #FAFAF8;
  --ink: #14191F; --ink-2: #4B5560; --ink-3: #68717C; --line: #E1E4E8; --line-2: #EDEFF1; --field: #D5D9DE;
  --band: #141A21; --band-2: #1A2129; --band-line: #263140; --band-ink: #F4F5F6; --band-ink-2: #A9B2BC; --band-ink-3: #7E8A97;
  --gold: #C6B273; --gold-ink: #6E5826; --gold-soft: #F3ECDA; --gold-wash: #FBF7EC;
  --wf-black: #0C0D12;
  --ok: #2C7553; --ok-bg: #E3F0E8; --risk: #8F5A0C; --risk-bg: #FAEFD9; --risk-line: #E5C998; --off: #A9342D; --off-bg: #F8E2E0;
  --info: #2D5689; --info-bg: #E3EBF5; --mute: #56606C; --mute-bg: #ECEEF0;
  --f-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-ui: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --shadow: 0 1px 2px rgba(20,26,33,.05), 0 10px 30px rgba(20,26,33,.06);
}
* { box-sizing: border-box; }
html, body { background: var(--page); }
body { margin: 0; color: var(--ink); font-family: var(--f-ui); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--band); }
a { color: var(--info); }
a:hover { color: #1E3D63; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1320px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.serif { font-family: var(--f-display); }
.spacer { flex: 1; }

/* ---------- band ---------- */
.band { background: var(--band); color: var(--band-ink); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-block: 16px; border-bottom: 1px solid var(--band-line); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-icon { height: 34px; width: auto; border-radius: 4px; display: block; }
.logo-wf { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; background: var(--wf-black); border-radius: 4px; }
.logo-wf img { height: 20px; width: auto; display: block; }
.brand .x { color: #6E7A88; font-size: 18px; font-weight: 300; }
.brand .rule { width: 1px; height: 22px; background: #2E3A48; margin: 0 4px; }
.brand .po { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8F9BA8; font-weight: 600; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.digest { font-size: 12px; color: #8F9BA8; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 4px; border: 1px solid #2E3A48; border-radius: 999px; background: transparent; cursor: pointer; color: var(--band-ink); }
.userchip:hover { border-color: #3E4D60; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.av.icon { background: var(--gold); color: var(--band-2); }
.av.workframe { background: var(--wf-black); color: #F1F3F2; border: 1px solid #2E3A48; }
.userchip .nm { font-size: 13px; line-height: 1.2; text-align: left; padding-right: 10px; }
.userchip .nm span { display: block; color: #8F9BA8; font-size: 11px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 240px; padding: 6px; z-index: 50; }
.menu button, .menu a { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 6px; font-size: 13.5px; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .lbl { padding: 8px 12px 4px; }
.demo-ribbon { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(198,178,115,.4); border-radius: 999px; padding: 3px 10px; }

.hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding-block: 28px 4px; }
.hero .kick { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.hero h1 { margin-top: 10px; font-family: var(--f-display); font-weight: 500; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.15; letter-spacing: -.01em; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; color: var(--band-ink-2); font-size: 13px; }
.hero .meta b { color: var(--band-ink); font-weight: 500; }
.meter { width: 380px; max-width: 100%; }
.meter-cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 9px; font-size: 13px; color: var(--band-ink-2); }
.meter-cap b { color: #fff; font-weight: 600; }
.meter-row, .meter-lbl { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.meter-row span { height: 24px; border-radius: 2px; background: #233041; }
.meter-row span.past { background: #4A5B70; }
.meter-row span.now { background: var(--gold); }
.meter-lbl { margin-top: 5px; font-family: var(--f-mono); font-size: 10px; color: var(--band-ink-3); text-align: center; }
.tabs { display: flex; gap: 26px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { color: var(--band-ink-2); font-size: 14px; font-weight: 500; padding: 14px 2px 15px; border-bottom: 2px solid transparent; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.tab:hover { color: #fff; }
.tab[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
.tab .badge { background: var(--gold); color: var(--band-2); font-size: 11px; font-weight: 700; border-radius: 9px; padding: 0 7px; line-height: 18px; }

main.wrap { padding-block: 26px 72px; display: flex; flex-direction: column; gap: 22px; }

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.card-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); }
.card-h h2 { font-size: 16px; font-weight: 600; }
.card-h .sub { font-size: 12.5px; color: var(--ink-3); }
.card-b { padding: 6px 22px 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px 3px 9px; white-space: nowrap; line-height: 16px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-bg); } .pill.risk { color: var(--risk); background: var(--risk-bg); } .pill.off { color: var(--off); background: var(--off-bg); }
.pill.info { color: var(--info); background: var(--info-bg); } .pill.gold { color: var(--gold-ink); background: var(--gold-soft); } .pill.mute { color: var(--mute); background: var(--mute-bg); }
.band .pill.ok { color: #7FD3A8; background: rgba(127,211,168,.12); } .band .pill.risk { color: #F0C27A; background: rgba(240,194,122,.12); } .band .pill.off { color: #F29A92; background: rgba(242,154,146,.12); } .band .pill.mute { color: var(--band-ink-2); background: rgba(255,255,255,.06); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; line-height: 18px; white-space: nowrap; }
.tag.p1 { color: var(--gold-ink); border-color: #DCCB9C; }
.tag.stale { color: var(--risk); border-color: var(--risk-line); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 8px; font-weight: 600; font-size: 13px; border: 1px solid var(--field); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink-3); color: var(--ink); }
.btn.dark { background: var(--band-2); border-color: var(--band-2); color: #F6F2E6; }
.btn.dark:hover { background: #26303B; }
.btn.goldbtn { background: var(--gold); border-color: var(--gold); color: var(--band-2); }
.btn.back { color: var(--risk); border-color: var(--risk-line); }
.btn.backsolid { background: var(--risk); border-color: var(--risk); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.input, .select, textarea.input { border: 1px solid var(--field); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 9px 12px; font-size: 14px; min-width: 0; width: 100%; }
.select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 11px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
textarea.input { resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .flabel { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fields .full { grid-column: 1 / -1; }
.empty { color: var(--ink-3); font-size: 13.5px; padding: 12px 0; }

/* ---------- overview ---------- */
.standing { padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.standing p { margin: 6px 0 0; font-family: var(--f-display); font-size: 21px; line-height: 1.45; }
.standing > div { flex: 999 1 520px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kpi { padding: 18px 20px; border-right: 1px solid var(--line-2); display: grid; gap: 4px; align-content: start; min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi.lead { background: var(--tint); }
.kpi .v { font-family: var(--f-display); font-size: 36px; line-height: 1.05; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
.kpi .v small { font-size: 17px; color: var(--ink-3); font-family: var(--f-ui); font-weight: 500; }
.kpi .d { font-size: 12px; color: var(--ink-3); }
.kpi .bar { height: 4px; background: var(--mute-bg); border-radius: 2px; overflow: hidden; margin-top: 4px; position: relative; }
.kpi .bar i { position: absolute; inset: 0 auto 0 0; background: var(--gold); }
.kpi .bar b { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--ink-2); }
.kpi.warn .v { color: var(--risk); } .kpi.alert .v { color: var(--off); }
.split { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.split > .main { flex: 999 1 620px; min-width: 0; }
.split > .side { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.appr { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line-2); }
.appr:last-child { border-bottom: 0; }
.appr.sending { background: #FFFCF6; }
.appr .bd { min-width: 0; display: grid; gap: 8px; align-content: start; }
.appr .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.appr .ttl { font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.4; }
.appr .ttl:hover { color: var(--info); }
.appr .desc { font-size: 13px; color: var(--ink-2); }
.appr .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.thumb { display: block; width: 112px; height: 144px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgba(20,26,33,.06); position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.thumb .ft { position: absolute; left: 6px; bottom: 6px; background: rgba(20,26,33,.78); color: #fff; font: 600 9.5px var(--f-ui); letter-spacing: .04em; border-radius: 3px; padding: 2px 5px; }
.thumb .ph { display: grid; place-items: center; height: 100%; color: var(--ink-3); font-size: 11px; font-weight: 600; background: var(--surface-2); }
.lrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.lrow:first-child { border-top: 0; }
.lrow .id { grid-row: span 2; padding-top: 2px; }
.lrow .t { font-weight: 500; }
.lrow:hover .t { color: var(--info); }
.lrow .m { font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.streams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stream { padding: 22px; display: grid; gap: 12px; align-content: start; }
.stream h3 { font-family: var(--f-display); font-size: 21px; font-weight: 600; }
.stream .hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prog { display: flex; align-items: center; gap: 10px; }
.prog .track { flex: 1; height: 6px; border-radius: 3px; background: var(--mute-bg); display: flex; overflow: hidden; }
.prog .track i { display: block; height: 100%; }
.prog b { font-size: 13px; min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.stream .cts { font-size: 12px; color: var(--ink-3); }
.stream .nx { border-top: 1px solid var(--line-2); padding-top: 12px; display: grid; gap: 2px; font-size: 13px; }
.feed .ev { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; align-items: baseline; }
.feed .ev:last-child { border-bottom: 0; }
.feed .ev .w { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.feed .ev b { font-weight: 600; }

/* ---------- tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 0 22px 16px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.seg button { border: 0; background: none; padding: 8px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line-2); white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--band-2); color: #fff; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--band-2); width: 16px; height: 16px; }
.search { flex: 1 1 220px; max-width: 320px; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr[data-go] { cursor: pointer; }
tbody tr[data-go]:hover td { background: var(--surface-2); }
tr.grp td { background: var(--tint); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.grp-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.grp-h b { font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.grp-h .prog { width: 180px; }
.t-title { font-weight: 500; line-height: 1.4; max-width: 520px; }
.t-note { color: var(--ink-3); font-size: 12.5px; margin-top: 3px; max-width: 520px; }
.mini { display: flex; align-items: center; gap: 8px; min-width: 100px; }
.mini .track { flex: 1; height: 4px; background: var(--mute-bg); border-radius: 2px; overflow: hidden; }
.mini .track i { display: block; height: 100%; background: var(--ink-2); }
.mini span { font-size: 12px; color: var(--ink-2); width: 32px; text-align: right; }
.who-cell { font-size: 12.5px; line-height: 1.45; white-space: nowrap; }
.who-cell span { color: var(--ink-3); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mute); margin-right: 6px; }
.dot.ok, .dot.done { background: var(--ok); } .dot.risk { background: var(--risk); } .dot.off { background: var(--off); }

/* timeline */
.tl { min-width: 900px; position: relative; }
.tl-row { display: grid; grid-template-columns: 300px repeat(12, minmax(0, 1fr)); align-items: center; min-height: 32px; border-bottom: 1px solid var(--line-2); position: relative; }
.tl-row.hd { min-height: 40px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.tl-row.hd div { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.3; }
.tl-row.hd div.cur { color: var(--gold-ink); font-weight: 700; }
.tl-row.gp { background: var(--tint); }
.tl-row.gp .lbl { font-family: var(--f-display); font-weight: 600; font-size: 14.5px; cursor: default; }
.tl-row .lbl { padding: 4px 14px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; cursor: pointer; text-align: left; }
.tl-row .lbl .mono { margin-right: 6px; }
.tl-bar { height: 16px; border-radius: 3px; margin: 0 2px; cursor: pointer; position: relative; z-index: 1; background: var(--mute-bg); border: 1px solid var(--line); overflow: hidden; }
.tl-bar.info { background: var(--info-bg); border-color: #9DB5D6; } .tl-bar.ok { background: var(--ok); border-color: var(--ok); }
.tl-bar.risk { background: var(--risk-bg); border-color: var(--risk); } .tl-bar.off { background: var(--off-bg); border-color: var(--off); } .tl-bar.gold { background: var(--gold-soft); border-color: var(--gold); }
.tl-bar i { position: absolute; inset: 0 auto 0 0; background: var(--info); opacity: .3; }
.tl-grid { position: absolute; inset: 0; display: grid; grid-template-columns: 300px repeat(12, minmax(0, 1fr)); pointer-events: none; }
.tl-grid div + div { border-left: 1px solid var(--line-2); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); z-index: 2; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-3); padding: 0 22px 14px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 14px; height: 8px; border-radius: 2px; display: inline-block; border: 1px solid var(--line); }

/* ---------- task review ---------- */
.crumbs { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.thead { padding: 22px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 28px; align-items: flex-end; }
.thead > div:first-child { flex: 999 1 560px; min-width: 0; display: grid; gap: 10px; }
.thead h1 { font-family: var(--f-display); font-weight: 500; font-size: 30px; line-height: 1.25; }
.thead .facts { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 13px; color: var(--ink-2); }
.thead .facts b { color: var(--ink); font-weight: 500; }
.thead .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.callout { border-radius: 10px; padding: 12px 16px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.callout.risk { background: var(--risk-bg); color: #5C3A06; } .callout.ok { background: var(--ok-bg); color: #1D5038; } .callout.info { background: var(--info-bg); color: #1E3D63; } .callout.gold { background: var(--gold-wash); color: #4E3F1B; border: 1px solid #EADFC2; }
.viewer { overflow: hidden; }
.vbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ftabs { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.ftab { font-size: 13px; padding: 7px 12px; border-radius: 7px; color: var(--ink-2); border: 1px solid transparent; background: transparent; cursor: pointer; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftab[aria-pressed="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 600; }
.vctl { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.stage { background: #E3E6EA; padding: 28px; display: flex; justify-content: center; min-height: 420px; overflow: auto; }
.stage canvas, .stage img { background: #fff; box-shadow: 0 2px 6px rgba(20,26,33,.08), 0 18px 40px rgba(20,26,33,.10); max-width: 100%; height: auto; display: block; }
.stage .msg { align-self: center; text-align: center; color: var(--ink-2); font-size: 14px; display: grid; gap: 10px; justify-items: center; }
.strip { display: flex; gap: 8px; padding: 12px; overflow-x: auto; border-top: 1px solid var(--line); background: var(--surface-2); }
.strip button { flex: none; padding: 0; border: 2px solid transparent; border-radius: 4px; background: #fff; cursor: pointer; line-height: 0; }
.strip button[aria-pressed="true"] { border-color: var(--gold); }
.strip img { width: 76px; height: auto; border-radius: 2px; display: block; }
.vh { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.vh:last-child { border-bottom: 0; }
.vh > b { font-family: var(--f-display); font-size: 20px; font-weight: 600; }
.thread { padding: 16px 20px; display: flex; flex-direction: column; gap: 18px; }
.cm { display: flex; gap: 12px; }
.cm .bd { min-width: 0; display: grid; gap: 4px; flex: 1; }
.cm .hd { font-size: 12.5px; } .cm .hd span { color: var(--ink-3); }
.cm .tx { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm .ln { display: flex; gap: 14px; font-size: 12.5px; flex-wrap: wrap; }
.cm .ln button { border: 0; background: none; padding: 0; color: var(--info); cursor: pointer; font-size: 12.5px; }
.cm.open { background: var(--gold-wash); border-radius: 10px; padding: 12px; margin: 0 -12px; }
.cm.reply { margin-left: 44px; }
.composer { padding: 14px 20px 18px; border-top: 1px solid var(--line-2); display: grid; gap: 10px; }
.drop { border: 1.5px dashed var(--field); border-radius: 10px; padding: 18px; text-align: center; color: var(--ink-2); font-size: 13.5px; background: var(--surface-2); cursor: pointer; }
.drop.over { border-color: var(--gold); background: var(--gold-wash); }
.filelist { display: grid; gap: 6px; }
.filelist div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }

/* ---------- drawer, toast ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8,14,22,.4); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .18s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); z-index: 41; box-shadow: -12px 0 40px rgba(8,14,22,.18); transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer.open { transform: none; }
.dr-h { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.dr-h .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dr-h h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; line-height: 1.3; }
.dr-b { padding: 20px 24px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; flex: 1; min-height: 0; }
.dr-b > * { flex-shrink: 0; }
.dr-f { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; background: var(--surface-2); }
.x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 6px 8px; border-radius: 6px; min-width: 40px; min-height: 40px; }
.x:hover { color: var(--ink); background: var(--surface-2); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--band-2); color: #F6F2E6; padding: 11px 18px; border-radius: 9px; font-size: 13.5px; font-weight: 500; opacity: 0; transition: .2s; z-index: 60; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
pre.note { white-space: pre-wrap; font-family: var(--f-ui); font-size: 13.5px; line-height: 1.65; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 0; }
.skel { padding: 60px 20px; text-align: center; color: var(--ink-3); }
.skel b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 22px; font-weight: 500; margin-bottom: 6px; }

@media (max-width: 1060px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-right: 0; } .kpi:nth-child(n+4) { border-top: 1px solid var(--line-2); }
  .streams { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .brand .rule, .brand .po, .digest { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-right: 1px solid var(--line-2) !important; border-top: 1px solid var(--line-2); }
  .kpi.lead { grid-column: 1 / -1; border-right: 0 !important; border-top: 0; }
  .kpi:nth-child(odd):not(.lead) { border-right: 0 !important; }
  .appr { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 18px 16px; }
  .thumb { width: 72px; height: 94px; }
  .fields { grid-template-columns: 1fr; }
  .stage { padding: 12px; min-height: 260px; }
  .cm.reply { margin-left: 22px; }
  .thead h1 { font-size: 24px; }
  .standing p { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
