@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/geist-latin-wght-normal.woff2') format('woff2'); }

/* Colours: light by default; dark when the person chose it, or their computer is dark and they
   chose "match my computer" (no data-theme on <html>). */
:root {
  --sky: #5BC2E6; --violet: #8862AA; --pink-brand: #EF5684;
  /* Round 62 (light mode, whole platform): a light grey workspace so white panels and writing
     surfaces stand out from it; a deeper menu with a visible edge; panel edges one step stronger;
     every field edge at least 3:1 against white and against the workspace. Dark mode unchanged. */
  --bg: #F4F5F7; --surface: #FFFFFF; --surface-2: #EDEFF2; --side: #E6E9EE;
  /* Round 57: the menu's own surface and edge, the menu item cue, and a writing-field edge. */
  --side-line: #AEB6C2; --side-hover: #F4F5F7; --side-active: #FFFFFF; --field-line: #7B8493;
  --line: #CFD4DC; --line-strong: #AEB6C2; --ink: #0B1726; --muted: #56626F;
  --item-line: #7C8695; /* Round 68: a work item's outline, at least 3:1 against the page and the card */
  --accent: #5761AC; --accent-strong: #464F95; --on-accent: #FFFFFF; --accent-soft: #EDEFFA; --hover: #ECEEF2;
  --pink: #BE2C5C; --pink-soft: #FCE8EF; --good: #24704F; --good-soft: #E3F3EA;
  --verdict: #00152B; --on-verdict: #F4F6FA; --focus-ring: rgba(87, 97, 172, 0.22); --shadow: rgba(0, 21, 43, 0.08);
  --warn: #8A5A00; --warn-soft: #FFF2D9; --warn-line: #D99A1B;
  --r: 10px; --r-sm: 8px; --r-lg: 14px;
  --ctl: 38px; --ctl-sm: 32px;
  --elev-1: 0 1px 2px var(--shadow); --elev-2: 0 1px 2px var(--shadow), 0 8px 24px var(--shadow);
  --serif: 'Geist', 'Helvetica Neue', Arial, sans-serif; --sans: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #00152B; --surface: #06203C; --surface-2: #0A2849; --side: #031A33;
    --side-line: #173659; --side-hover: #0D2D52; --side-active: #18295C; --field-line: #56789F;
    --line: #173659; --line-strong: #2A4A73; --ink: #F4F6FA; --muted: #A9B3C2;
    --item-line: #56739A;
    --accent: #A3ABF0; --accent-strong: #C3C8F7; --on-accent: #00152B; --accent-soft: #18295C; --hover: #0D2D52;
    --pink: #FF86A9; --pink-soft: #3B1834; --good: #7EDCB0; --good-soft: #0D3A33;
    --verdict: #0A2849; --on-verdict: #F4F6FA; --focus-ring: rgba(163, 171, 240, 0.3); --shadow: rgba(0, 0, 0, 0.3);
    --warn: #FFD27A; --warn-soft: #3A2D10; --warn-line: #C98F1C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #00152B; --surface: #06203C; --surface-2: #0A2849; --side: #031A33;
  --side-line: #173659; --side-hover: #0D2D52; --side-active: #18295C; --field-line: #56789F;
  --line: #173659; --line-strong: #2A4A73; --ink: #F4F6FA; --muted: #A9B3C2;
  --item-line: #56739A;
  --accent: #A3ABF0; --accent-strong: #C3C8F7; --on-accent: #00152B; --accent-soft: #18295C; --hover: #0D2D52;
  --pink: #FF86A9; --pink-soft: #3B1834; --good: #7EDCB0; --good-soft: #0D3A33;
  --verdict: #0A2849; --on-verdict: #F4F6FA; --focus-ring: rgba(163, 171, 240, 0.3); --shadow: rgba(0, 0, 0, 0.3);
  --warn: #FFD27A; --warn-soft: #3A2D10; --warn-line: #C98F1C;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


.wrap { max-width: 1240px; margin: 0 auto; padding-block: 40px 64px; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 24px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4.4vw, 40px); line-height: 1.1; letter-spacing: -0.035em; text-wrap: balance; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.lede { margin: 0; font-size: 15px; color: var(--muted); max-width: 46ch; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.eyebrow.accent { color: var(--accent); }

.flash { padding: 14px 18px; border-radius: var(--r); font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--sky); }
.flash.err { border-left-color: var(--pink); }

.grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.queue { flex: 1 1 320px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.qhead { margin: 8px 0 0; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.card[aria-current="true"] { border: 2px solid var(--accent); padding: 17px; }
.card.done { opacity: 0.72; }
.card-top { display: flex; justify-content: space-between; gap: 12px; }
.kind { font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.state { font-size: 12px; font-weight: 500; }
.state.waiting { color: var(--ink); }
.state.waiting::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); margin-right: 7px; vertical-align: 1px; animation: pulse 2.4s ease-in-out infinite; }
.state.decided { color: var(--accent); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .state.waiting::before { animation: none; } .card { transition: none; } }
.card-title { font-family: var(--serif); font-size: 17px; font-weight: 550; line-height: 1.35; letter-spacing: -0.01em; }
.card-meta { font-size: 13px; color: var(--muted); }
.empty { padding: 24px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); font-size: 15px; }

.detail { flex: 999 1 600px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; overflow: hidden; }
.bar { width: 4px; flex: none; background: linear-gradient(180deg, var(--sky), #5761AC, var(--pink-brand)); }
.detail-in { flex: 1; min-width: 0; padding: clamp(20px, 4vw, 32px); display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3vw, 30px); line-height: 1.2; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.meta { font-size: 14px; color: var(--muted); }
blockquote { margin: 0; padding: 18px 20px; background: var(--surface-2); border-left: 3px solid var(--pink); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.compare > div { background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; }
.facts { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.facts strong { color: var(--ink); font-weight: 500; }

form.decide { display: flex; flex-direction: column; gap: 16px; margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
textarea, input[type=url], input[type=text] { font: inherit; font-size: 16px; letter-spacing: normal; text-transform: none; color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r); padding: 12px 14px; width: 100%; }
textarea { min-height: 88px; resize: vertical; font-family: var(--sans); font-size: 17px; font-weight: 500; line-height: 1.45; }
textarea:focus, input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.hint { font-size: 13px; color: var(--muted); letter-spacing: normal; text-transform: none; font-weight: 400; }
.needs { padding: 14px 18px; border: 1px dashed var(--pink); border-radius: var(--r); font-size: 15px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { font-family: var(--sans); border-radius: var(--r-sm); padding: 0 16px; min-height: 42px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--hover); border-color: var(--line-strong); color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--on-verdict); border-color: rgba(244, 246, 250, 0.35); min-height: 40px; }
.btn.ghost:hover { background: rgba(244, 246, 250, 0.08); border-color: var(--on-verdict); color: var(--on-verdict); }
details.reject { border-top: 1px solid var(--line); padding-top: 16px; }
details.reject summary { cursor: pointer; font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
details.reject form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.verdict { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px; background: var(--verdict); color: var(--on-verdict); border-radius: var(--r); font-size: 15px; }
.verdict form { margin: 0; }
.small { font-size: 13px; color: var(--muted); }

.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.when { white-space: nowrap; color: var(--muted); }

.center { min-height: 70vh; display: grid; place-items: center; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.panel { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; overflow: hidden; }
.panel .detail-in { gap: 18px; }
.mslogo { width: 18px; height: 18px; margin-right: 12px; flex: none; }
details.reject summary::after { content: '+'; margin-left: 10px; font-size: 16px; letter-spacing: 0; }
details.reject[open] summary::after { content: '−'; }
details.reject summary::-webkit-details-marker { display: none; }
/* On narrow screens the selected change shows above the queue (desk only). */
@media (max-width: 940px) { .grid > .detail { order: -1; } }

/* Rules and setup */
.side { flex: 1 1 320px; }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; }
ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
form.setup, form.rules-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
input[type=file] { font: inherit; font-size: 14px; letter-spacing: normal; text-transform: none; color: var(--ink); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.rules-form .detail { flex: none; }
.rules-form textarea { font-size: 15px; font-weight: 400; min-height: 0; }
.claims { display: flex; flex-direction: column; gap: 12px; }
fieldset.claim { margin: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; min-width: 0; }
fieldset.claim.needs-src { border-color: var(--pink); border-style: dashed; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.savebar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 -8px 24px var(--shadow); }
.savebar .grow { flex: 1 1 260px; }
.wrap > .detail { flex: none; }
.run .detail-in { gap: 18px; }
.meter { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--sky), #5761AC, var(--pink-brand)); }
.meter.live span { width: 40%; animation: sweep 1.6s ease-in-out infinite; }
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .meter.live span { animation: none; width: 100%; opacity: 0.5; } }
ol.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
ol.steps li { display: flex; gap: 12px; align-items: baseline; }
ol.steps li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
ol.steps li:last-child::before { background: var(--pink); }

/* Checks */
ul.results { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
li.result { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
details.answer-toggle summary { cursor: pointer; list-style: none; min-height: 32px; align-items: center; }
details.answer-toggle summary::-webkit-details-marker { display: none; }
details.answer-toggle[open] { display: flex; flex-direction: column; gap: 10px; }
li.result.fail { border-left: 3px solid var(--pink); }
li.result.pass { border-left: 3px solid var(--sky); }
.result-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.result-head strong { font-weight: 550; }
.result-head .small { margin-left: auto; }
.mark { width: 18px; flex: none; font-weight: 600; color: var(--accent); }
li.result.fail .mark { color: var(--pink); }
details.more summary { cursor: pointer; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); min-height: 36px; display: flex; align-items: center; }
details.more[open] { display: flex; flex-direction: column; gap: 10px; }
blockquote.answer { white-space: pre-wrap; border-left-color: var(--accent); }

/* Accounts and team */
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label.bare { display: inline-flex; letter-spacing: normal; text-transform: none; }
select { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r); padding: 10px 12px; min-height: 44px; letter-spacing: normal; text-transform: none; }
input[type=email], input[type=date] { font: inherit; font-size: 16px; letter-spacing: normal; text-transform: none; color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r); padding: 12px 14px; width: 100%; }
.btn.wide { width: 100%; }
.btn.small { padding: 0 14px; min-height: 38px; font-size: 13px; }
.actions.col { flex-direction: column; align-items: stretch; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
form.stackform { display: flex; flex-direction: column; gap: 12px; margin: 0; }
form.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.linkbtn.dark { color: var(--accent); }
.linkbtn.dark:hover { color: var(--accent-strong); }
dl.roles { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
dl.roles div { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
dl.roles dt { font-weight: 550; }
dl.roles dd { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.qr { width: 200px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: #FFFFFF; }
.qr svg { display: block; width: 100%; height: auto; }
code.key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 2px 6px; overflow-wrap: anywhere; }
code.copy { display: inline-block; margin-top: 6px; padding: 8px 10px; }
ol.steps-num { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
form.two { align-items: end; }

/* Trial */
.trialbar { background: var(--surface-2); border-bottom: 1px solid var(--line); padding-block: 10px; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); font-size: 14px; }
.trialbar-in { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; color: var(--muted); }
.trialbar-in strong { color: var(--ink); font-weight: 550; }
.trialbar.ended { background: var(--surface); border-bottom: 2px solid var(--pink); }

/* Plan page */
.plans { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; transition: border-color .15s; }
.plan:hover { border-color: var(--accent); }
.plan.is-current { border: 2px solid var(--accent); padding: 21px; }
.plan .price { margin: 0; font-size: 15px; color: var(--muted); }
.plan .price strong { font-family: var(--serif); font-size: 30px; font-weight: 550; letter-spacing: -0.02em; color: var(--ink); margin-right: 4px; }
.plan .actions { margin-top: auto; }
.plan form { margin: 0; }
.plan ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.btn.current { border-color: var(--accent); color: var(--accent); cursor: default; }
.detail.warn .bar { background: var(--pink-brand); }
.barlink { color: var(--accent); font-weight: 500; margin-left: auto; }
.trialbar-in .barlink { margin-left: auto; }
.select { user-select: all; color: var(--ink); font-weight: 500; }
.wrap.narrow { max-width: 860px; }
.lines { display: flex; flex-direction: column; gap: 6px; }
.lines p { margin: 0; font-size: 15px; }

/* App shell: the left menu and the page beside it */
.app { min-height: 100vh; display: flex; align-items: stretch; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar { flex: 0 0 248px; box-sizing: border-box; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; padding: 16px 12px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; }
.ws { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; transition: background .15s; }
.ws:hover { background: var(--hover); color: var(--ink); }
.ws img { width: 30px; height: 30px; flex: none; }
.ws-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ws-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-sub { font-size: 12px; color: var(--muted); }
.ws-switch { margin: -8px 0 0; padding: 0 4px; }
.ws-switch select { width: 100%; min-height: 38px; padding: 6px 10px; font-size: 13px; }
.menu-wrap { display: flex; flex-direction: column; gap: 22px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-label { padding: 0 12px 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.menu a:hover { background: var(--hover); color: var(--ink); }
.menu a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.menu a svg { flex: none; }
.menu .label { flex-grow: 1; }
.count { min-width: 22px; height: 22px; padding: 0 7px; box-sizing: border-box; border-radius: 11px; background: var(--pink-soft); color: var(--pink); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.me { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.me form { margin: 0; }
.me-name { flex-grow: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.me-name:hover { background: var(--hover); color: var(--ink); }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-text .n { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text .r { font-size: 12px; color: var(--muted); }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.i-sun { display: none; }
.i-moon, .i-sun { line-height: 0; }
:root[data-theme="dark"] .i-sun { display: inline; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: inline; } :root:not([data-theme="light"]) .i-moon { display: none; } }
@media (prefers-reduced-motion: reduce) { .menu a, .ws, .icon-btn, .btn { transition: none; } }
/* Pages without the menu (sign-in and messages) */
.plainbar { background: #00152B; padding-block: 14px; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.plainbar-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.plainbar .logo { display: block; height: 30px; width: auto; }
.plainbar form { margin: 0; }
.linkbtn.light { color: #A9B3C2; }
.linkbtn.light:hover { color: #FFFFFF; }

/* Overview */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; min-width: 0; }
a.stat:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; overflow-wrap: anywhere; }
.stat-note { color: var(--muted); font-size: 13px; }
.pill { padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--hover); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--pink-soft); color: var(--pink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink-brand); flex: none; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.box { flex: 1 1 320px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.box.wide { flex: 3 1 460px; }
.box.narrow { flex: 2 1 320px; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.box-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.box-head a { font-size: 13px; font-weight: 500; text-decoration: none; }
.box-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; color: var(--ink); text-decoration: none; transition: background .15s; }
a.row:hover { background: var(--hover); color: var(--ink); }
.row-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.row-icon.pink { background: var(--pink-soft); color: var(--pink); }
.row-text { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.row-sub { font-size: 13px; color: var(--muted); }
.feed { margin: 0; padding: 4px 20px 12px; list-style: none; }
.feed li { display: flex; gap: 12px; padding: 12px 0; }
.feed li + li { border-top: 1px solid var(--line); }
.feed .dot { margin-top: 7px; background: var(--accent); }
.feed .when { font-size: 12px; color: var(--muted); }
.box-empty { padding: 20px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .stat, .row { transition: none; } a.stat:hover { transform: none; } }

/* Settings */
.settings { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.subnav { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 2px; }
.subnav a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.subnav a:hover { background: var(--hover); color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.settings-body { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.choices { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; min-width: 0; }
.choices legend { padding: 0 0 10px; font-weight: 500; }
.choice { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s; color: var(--ink); font-size: 14px; }
.choice:hover { border-color: var(--accent); }
.choice:has(input:checked) { border: 2px solid var(--accent); padding: 13px; }
.choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice .opt { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.swatch { height: 84px; border-radius: 8px; display: flex; overflow: hidden; }
.swatch span { display: block; }
.stack.tight { gap: 6px; }
.flat { margin: 0; }
.h-sm { font-size: 18px; }
.menu-label.spaced { padding-top: 16px; }
.swatch .sw-side { width: 30%; display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; box-sizing: border-box; }
.swatch .sw-side span { height: 6px; border-radius: 3px; }
.swatch .sw-main { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.swatch .sw-title { height: 8px; width: 60%; border-radius: 4px; }
.swatch .sw-box { height: 24px; border-radius: 5px; }
.swatch .sw-half { width: 50%; display: flex; }
.sw-light { background: #FBFAF7; border: 1px solid #E6E8EC; }
.sw-light .sw-side { background: #FFFFFF; border-right: 1px solid #E6E8EC; }
.sw-light .sw-side span { background: #E6E8EC; }
.sw-light .sw-side .sw-on { background: #5761AC; }
.sw-light .sw-title { background: #0B1726; }
.sw-light .sw-box { background: #FFFFFF; border: 1px solid #E6E8EC; }
.sw-dark { background: #00152B; border: 1px solid #173659; }
.sw-dark .sw-side { background: #031A33; border-right: 1px solid #173659; }
.sw-dark .sw-side span { background: #173659; }
.sw-dark .sw-side .sw-on { background: #A3ABF0; }
.sw-dark .sw-title { background: #F4F6FA; }
.sw-dark .sw-box { background: #06203C; border: 1px solid #173659; }
.sw-system { border: 1px solid var(--line); }
.sw-system .sw-half { border: 0; }
.tablewrap.flush { border: 0; border-radius: 0; }
.feed .dot.bad { background: var(--pink-brand); }
.feed .dot.good { background: var(--good); }
tr.is-on td { background: var(--accent-soft); }
.main-col > .wrap, .main-col > main { width: 100%; box-sizing: border-box; }
.wrap > .box, .wrap > section.box { flex: none; }


/* ---- Modern pass: calmer type, no gradient bars, cards instead of newspaper blocks ---- */
.detail { border-radius: 12px; }
.detail > .bar { display: none; }
.detail.warn { border-color: var(--pink-brand); }
.detail-in { gap: 20px; }
h1 { font-size: clamp(28px, 3.6vw, 34px); letter-spacing: -0.03em; }
h1 em, h2 em { color: inherit; }
h2 { font-size: clamp(20px, 2.2vw, 24px); letter-spacing: -0.02em; }
h3 { font-size: 17px; }
.eyebrow { font-size: 12px; letter-spacing: 0.06em; font-weight: 600; }
.kind { letter-spacing: 0.06em; font-weight: 600; }
th { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; }
details.reject summary, details.more summary { letter-spacing: 0; text-transform: none; font-size: 14px; }
blockquote { border-left: 0; border-radius: var(--r-sm); background: var(--surface-2); }
.verdict { border-radius: var(--r-sm); }
.card { border-radius: 12px; }
.card-title { font-size: 16px; }
.empty { border-radius: 12px; }
.panel-card { border-radius: 12px; }
.compare { border-radius: var(--r-sm); }
.lede { font-size: 15px; }
.head { align-items: flex-end; }
.head > .actions { margin-left: auto; }
.wrap { gap: 22px; padding-block: 32px 56px; }

/* Brand hub */
.hero-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: clamp(20px, 3vw, 28px); display: flex; flex-direction: column; gap: 14px; }
.positioning { margin: 0; font-size: clamp(18px, 2vw, 21px); line-height: 1.45; letter-spacing: -0.01em; font-weight: 500; max-width: 72ch; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.hero-meta a.pill { text-decoration: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab-n { font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: var(--hover); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.tab-panel { display: flex; flex-direction: column; gap: 16px; }
.cards-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rule-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; line-height: 1.5; }
.chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
dl.kv { margin: 0; display: flex; flex-direction: column; gap: 10px; }
dl.kv div { display: flex; flex-direction: column; gap: 2px; }
dl.kv dt { font-size: 12px; color: var(--muted); font-weight: 600; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.pill.mid { background: var(--warn-soft); color: var(--warn); }
td form.inline input[type=date] { width: auto; padding: 6px 8px; font-size: 14px; }

/* Check text */
.check-form { display: flex; flex-direction: column; margin: 0; }
.check-form textarea { border: 0; border-radius: 0; min-height: 320px; font-size: 16px; font-weight: 400; line-height: 1.6; padding: 20px; background: var(--surface); }
.check-form textarea:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.check-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.check-bar .grow { flex: 1 1 auto; }
.inline-label { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.inline-label select { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.marked-wrap { border-top: 1px solid var(--line); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.marked { white-space: pre-wrap; line-height: 1.7; font-size: 15px; overflow-wrap: anywhere; }
mark { background: var(--pink-soft); color: var(--ink); border-radius: 4px; padding: 0 2px; }
mark.sev-medium { background: #FFF2D9; }
mark.sev-low { background: var(--accent-soft); }
:root[data-theme="dark"] mark.sev-medium { background: #3A2D10; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) mark.sev-medium { background: #3A2D10; } }
mark sup { font-size: 10px; font-weight: 700; margin-left: 2px; color: var(--muted); }
.score-box { align-self: flex-start; }
.score-top { display: flex; align-items: center; gap: 18px; padding: 20px; flex-wrap: wrap; }
.empty-score .plain { padding: 0 20px 20px 40px; }
.ring { flex: none; }
.ring-track { stroke: var(--line); }
.ring-value { stroke: var(--accent); }
.ring.good .ring-value { stroke: var(--good); }
.ring.mid .ring-value { stroke: #D99A1E; }
.ring.bad .ring-value { stroke: var(--pink-brand); }
.ring-num { font-size: 34px; font-weight: 600; fill: var(--ink); font-family: var(--sans); letter-spacing: -1px; }
.ring-of { font-size: 11px; fill: var(--muted); font-family: var(--sans); }
.pill.good { background: var(--good-soft); color: var(--good); }
.issues { margin: 0; padding: 0 20px 20px; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.issue { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.issue-head { display: flex; align-items: center; gap: 10px; }
.issue-head .pill { margin-left: auto; }
.issue-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.issue.sev-high .issue-n { background: var(--pink-soft); color: var(--pink); }
.issue-ex { margin: 0; font-size: 14px; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); overflow-wrap: anywhere; }
.issue-fix { margin: 0; font-size: 14px; }
.issue-fix span { font-weight: 600; color: var(--good); }
.score-mini { display: flex; align-items: center; gap: 14px; }
.trend { width: 100%; height: 64px; display: block; }
.trend .bar-good { fill: var(--good); }
.trend .bar-mid { fill: #D99A1E; }
.trend .bar-bad { fill: var(--pink-brand); }
.trend .bar-empty { fill: var(--line); }
.trend-axis { display: flex; justify-content: space-between; font-size: 12px; }
.rows.due { border-top: 1px solid var(--line); }
/* Checks: test results as tiles */
ul.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
li.result, li.result.fail, li.result.pass { border: 1px solid var(--line); border-left-width: 1px; border-radius: 10px; padding: 10px 14px; background: var(--surface); }
li.result.fail { border-color: var(--pink-brand); }
li.result .mark { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--good-soft); color: var(--good); }
li.result.fail .mark { background: var(--pink-soft); color: var(--pink); }
.result-head .small { margin-left: 0; flex-basis: 100%; padding-left: 32px; }
details.answer-toggle[open] { grid-column: 1 / -1; }
li.result:has(details[open]) { grid-column: 1 / -1; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.filters input[type=search] { min-height: 38px; padding: 6px 12px; font-size: 14px; width: 260px; max-width: 100%; border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-family: inherit; }
.filters .grow { flex: 1 1 auto; text-align: right; }
.who-cell { display: inline-flex; align-items: center; gap: 8px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.box-body > .btn, .box-body > form, .box-body > a.btn { align-self: flex-start; }
/* A box inside a box's body (Platform health › Google pilot) sizes to its content: the 320px basis is for boxes side by side, and in a column it set the height, leaving a blank area or cutting content off. */
.box-body > .box, .box-body > details.box { flex: none; }
/* Round 41, at the source: in any vertical stack a box sizes to its content. The 320px basis is
   for boxes side by side; in a column it became a minimum height (an empty block under the
   Competitors research form and the "Add a competitor" box, and elsewhere). */
.stack > .box, .stack > details.box, .stack > section.box, .rec-scope > .box { flex: none; }
td form.inline { flex-wrap: nowrap; }
/* Reports and notifications */
.report-score { flex-direction: row; align-items: center; gap: 14px; }
.ring.idle .ring-num { fill: var(--muted); }
ul.bars { margin: 0; padding: 16px 20px 20px; list-style: none; display: flex; flex-direction: column; gap: 12px; }
ul.bars li { display: grid; grid-template-columns: minmax(120px, 180px) 1fr 40px; align-items: center; gap: 12px; font-size: 14px; }
ul.bars progress { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 5px; background: var(--hover); overflow: hidden; }
ul.bars progress::-webkit-progress-bar { background: var(--hover); border-radius: 5px; }
ul.bars progress::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
ul.bars progress::-moz-progress-bar { background: var(--accent); border-radius: 5px; }
.bar-n { text-align: right; font-weight: 600; }
dl.kv.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
dl.kv.two-col dd { font-size: 20px; font-weight: 600; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 600px) { ul.bars li { grid-template-columns: 1fr 40px; } ul.bars progress { grid-column: 1 / -1; grid-row: 2; } }

/* Client brands (agency mode) */
.row-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field-row > label { min-width: 0; }
.add-brand .actions { flex-wrap: wrap; }
.back { font-size: 13px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.btn.danger { background: var(--pink); border-color: var(--pink); color: var(--surface); }
.btn.danger:hover { background: var(--pink); border-color: var(--pink); color: var(--surface); filter: brightness(1.08); }
.danger-zone { border-color: var(--pink-soft); }
.danger-zone .box-head h2 { color: var(--pink); }
.settings-body > * { flex: none; }
.tablewrap { position: relative; }

/* Approvals: Waiting and Decided */
.queue-col { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.queue-col > .queue { flex: none; }
.decided-tools { display: flex; flex-direction: column; gap: 10px; }
.decided-tools .filters { margin: 0; flex-wrap: nowrap; }
.decided-tools .filters .grow { flex: 1 1 auto; min-width: 0; }
.decided-tools .filters input[type=search] { width: 100%; }
.seg { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.seg-item { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.seg-item:hover { color: var(--ink); background: var(--hover); }
.seg-item[aria-current="true"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.detail-nav { display: flex; justify-content: space-between; gap: 12px; margin-bottom: -8px; }
.wrap > .tabs { margin-top: -4px; }
.state.decided.rejected { color: var(--pink); }
.panel-card.danger-zone h2 { color: var(--pink); }

/* Plan cards: the next step stands out */
.plan { position: relative; }
.plan.is-popular { border: 2px solid var(--accent); padding: 21px; box-shadow: 0 8px 24px -12px color-mix(in srgb, var(--accent) 55%, transparent); }
.plan-badge { position: absolute; top: -12px; left: 20px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 999px; }
.plan-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.plan-actions form { margin: 0; }
.btn.cta { width: 100%; min-height: 46px; font-weight: 600; border-width: 1.5px; border-color: var(--accent); color: var(--accent); }
.btn.cta:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn.cta.primary { color: var(--on-accent); background: var(--accent); }
.btn.cta.primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn.cta.current { border-color: var(--line-strong); color: var(--muted); background: var(--surface-2); cursor: default; }
.plan .linkbtn.dark { padding: 8px 0; }

/* Brand switcher */
.switcher { position: relative; }
.switcher > summary { list-style: none; cursor: pointer; }
.switcher > summary::-webkit-details-marker { display: none; }
.switcher > summary:hover, .switcher[open] > summary { background: var(--hover); }
.ws-mark { flex: none; display: inline-flex; }
.ws-mark img { width: 30px; height: 30px; }
.ws-chev { margin-left: auto; color: var(--muted); display: inline-flex; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: #fff; flex: none; }
.hue-0 { background: #5761AC; } .hue-1 { background: #2F7D6D; } .hue-2 { background: #B4532A; } .hue-3 { background: #8A4FA3; }
.hue-4 { background: #2D6FA8; } .hue-5 { background: #A23B62; } .hue-6 { background: #6B7A2A; } .hue-7 { background: #3F5468; }
.switch-panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; box-sizing: border-box; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 16px 40px -16px rgba(0, 21, 43, 0.45); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.switch-search { font: inherit; font-size: 14px; width: 100%; min-height: 38px; padding: 6px 12px; border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.switch-panel form { margin: 0; }
.switch-list, .switch-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.switch-list { max-height: min(60vh, 420px); overflow-y: auto; }
.switch-label { display: block; padding: 8px 8px 4px; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.switch-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.switch-item:hover, .switch-item:focus-visible { background: var(--hover); }
.switch-item[aria-current="true"] { background: var(--accent-soft); }
.switch-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.switch-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-sub { font-size: 12px; color: var(--muted); }
.switch-here { color: var(--accent); display: inline-flex; }
.switch-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.switch-foot a { color: var(--accent); text-decoration: none; font-weight: 500; }
kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); }
.brand-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.brand-chip .brand-mark { width: 18px; height: 18px; border-radius: 5px; font-size: 9px; }
@media (hover: none) { .switch-foot kbd { display: none; } }
.switch-tip { margin: 0; padding: 4px 8px 2px; color: var(--muted); }

/* Check results in four parts. */
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.part { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.part-name { font-size: 12px; color: var(--muted); }
.part-status { font-size: 14px; font-weight: 600; }
.part.good .part-status { color: var(--good); }
.part.bad { border-color: var(--pink); background: var(--pink-soft); }
.part.bad .part-status { color: var(--pink); }
.part.mid .part-status { color: #8A5A00; }
:root[data-theme="dark"] .part.mid .part-status { color: #FFD27A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .part.mid .part-status { color: #FFD27A; } }
.score-box .parts { padding: 0 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.score-box > .small.flat { padding: 0 20px; }
@media (max-width: 560px) { .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* NOLSEM AI */
.ai-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.ai-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 16px; min-width: 0; }
.ai-convs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-convs a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; min-width: 0; }
.ai-convs a:hover { background: var(--hover); }
.ai-convs a[aria-current="page"] { background: var(--accent-soft); }
.ai-conv-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ai-thread { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ai-msg { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ai-ask { align-self: flex-end; max-width: min(80%, 640px); padding: 12px 16px; border-radius: 14px 14px 4px 14px; background: var(--accent-soft); }
.ai-answer { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ai-answer.ai-failed { border-color: var(--pink); }
.ai-who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ai-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--verdict); color: var(--on-verdict); font-size: 12px; font-weight: 700; }
.ai-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.ai-note { color: var(--good); }
.ai-length { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.ai-length .ai-cost { white-space: normal; }
.ai-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-tools form { margin: 0; }
.ai-detail summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.ai-detail[open] summary { margin-bottom: 10px; }
.ai-records { display: grid; gap: 4px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-2, transparent); }
.ai-records ul { display: grid; gap: 2px; }
.ai-rec-id { font-variant-numeric: tabular-nums; font-weight: 600; }
.issues.compact { padding: 0 0 10px; }
.used { margin: 0; }
.ai-empty { display: flex; flex-direction: column; gap: 10px; padding: 28px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface); }
.ai-empty h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.starters form { margin: 0; display: flex; }
.starter { flex: 1; text-align: left; font: inherit; font-size: 14px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.starter:hover { border-color: var(--accent); }
.ai-composer { display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: 0 6px 24px var(--shadow); }
.ai-composer textarea { border: 0; border-radius: 0; resize: vertical; min-height: 84px; padding: 14px 16px; font: inherit; background: transparent; color: var(--ink); }
.ai-composer textarea:focus { outline: none; }
.ai-composer:focus-within { border-color: var(--accent); }
.ai-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.ai-bar .grow { flex: 1 1 auto; color: var(--muted); }
.ai-where { color: var(--muted); }
@media (max-width: 860px) {
  .ai-layout { grid-template-columns: minmax(0, 1fr); }
  .ai-side { position: static; order: 2; }
  .starters { grid-template-columns: minmax(0, 1fr); }
  .ai-ask { max-width: 92%; }
}

/* Intelligence */
.tab-panel > .box, .tab-panel > details.box { flex: none; }
.tab-panel > .cols > .box { flex-basis: 320px; }
.intel-list { display: flex; flex-direction: column; gap: 12px; }
.intel-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.intel-card.conflict { border-color: var(--pink); }
.intel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.intel-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.intel-kv { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
dl.kv.intel-kv > div { display: contents; }
.intel-kv dt { font-size: 13px; color: var(--muted); }
.intel-kv dd { margin: 0; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.intel-kv ul.plain { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px 6px; }
.intel-kv ul.plain li { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 13px; }
.src-line { color: var(--muted); }
.src-line q { font-style: italic; }
.intel-card .row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.intel-card .row-actions form { margin: 0; }
.inline-edit summary, .add-box > summary { cursor: pointer; font-size: 14px; color: var(--accent); }
.add-box > summary { padding: 14px 20px; font-weight: 500; }
.inline-edit[open] summary { margin-bottom: 10px; }
.intel-form textarea { min-height: 0; }
.choice input[type="text"] { width: 100%; height: auto; min-height: 40px; padding: 8px 12px; accent-color: auto; }
.tabs a.tab-alert .tab-n { background: var(--pink-soft); color: var(--pink); }
@media (max-width: 640px) {
  .intel-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .intel-kv dd { margin-bottom: 8px; }
}

/* Studio: projects and the asset editor */
.box.pad { padding: 20px; }
.side-col { flex: 1 1 300px; min-width: 0; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }
.row-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.row-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.row-link:hover { background: var(--hover); color: var(--ink); }
.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.proj-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; height: 100%; }
.proj-card:hover { border-color: var(--accent); color: var(--ink); }
.proj-name { font-weight: 600; font-size: 16px; }
.studio-wrap { max-width: 1440px; }
.studio-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.studio-bar .small a { color: var(--muted); }
/* Reviewer labels (Nov 22): who owes the decision on the open review, under the title. */
.studio-bar a.studio-owed { color: var(--warn); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.studio-bar a.studio-owed::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.studio-bar a.studio-owed:hover, .studio-bar a.studio-owed:focus-visible { text-decoration: underline; }
.deliv-owed { border-left: 3px solid var(--warn); padding-left: 8px; }
.h-doc { font-size: clamp(24px, 3vw, 30px); }
.studio { display: grid; grid-template-columns: 230px minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.studio[data-hide-tree] { grid-template-columns: minmax(0, 1fr) 330px; }
.studio[data-hide-side] { grid-template-columns: 230px minmax(0, 1fr); }
.studio[data-hide-tree][data-hide-side] { grid-template-columns: minmax(0, 1fr); }
.studio[data-hide-tree] .studio-tree, .studio[data-hide-side] .studio-side { display: none; }
.studio-tree, .studio-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.studio-side { gap: 22px; }
.studio-side > section + section { border-top: 1px solid var(--line); padding-top: 18px; }
.proj-link { font-weight: 600; color: var(--ink); text-decoration: none; }
.tree { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tree a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 14px; }
.tree a:hover { background: var(--hover); color: var(--ink); }
.tree a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 500; }
.studio-doc { min-width: 0; }
textarea.doc-edit { min-height: 460px; font-size: 16px; font-weight: 400; line-height: 1.65; padding: 20px 22px; background: var(--surface); }
.doc-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.65; }
.doc-page { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.doc-preview { max-height: 320px; overflow: auto; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); }
.viewing-note, .stale-note, .conflict-box { padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.conflict-box { border-color: var(--pink); background: var(--pink-soft); }
.rewrite-card { padding: 16px 18px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--accent-soft); }
.diff-del { color: var(--pink); text-decoration: line-through; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-ins { color: var(--good); font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.rewrite-form { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 16px; }
.rewrite-form > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 500; }
.rewrite-form[open] { padding-bottom: 16px; }
.rewrite-form textarea { min-height: 72px; font-size: 15px; font-weight: 400; }
.score-line { display: flex; align-items: center; gap: 12px; }
.score-num { font-size: 36px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.score-num.good { color: var(--good); }
.score-num.bad { color: var(--pink); }
.studio-side .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.studio-side .issues { padding: 0; }
.versions { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.versions li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.studio-bar a.pill { text-decoration: none; }
@media (max-width: 1100px) {
  .studio, .studio[data-hide-tree], .studio[data-hide-side] { grid-template-columns: minmax(0, 1fr); }
  .studio .studio-doc { order: 1; }
  .studio .studio-side { order: 2; display: flex; }
  .studio .studio-tree { order: 3; display: flex; }
  .studio-bar [data-panel] { display: none; }
  textarea.doc-edit { min-height: 55vh; padding: 16px; }
}

/* v3: seven areas, section tabs, Home and Create */
.menu-end { margin-top: auto; }
.section-tabs { border-bottom: 1px solid var(--line); background: var(--surface); padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); overflow-x: auto; }
.section-tabs-in { max-width: 1240px; margin: 0 auto; display: flex; gap: 4px; }
.section-tabs a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.section-tabs a:hover { color: var(--ink); }
.section-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.split { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.split > a { font-size: 13px; font-weight: 500; text-decoration: none; }
.h-xs { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.home .box { flex: 1 1 360px; }
.home > .box { flex: none; }
.home-ask .ask-label { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.home-ask .ask-label .small { display: block; font-weight: 400; letter-spacing: normal; }
.home-ask textarea { min-height: 96px; }
.continue-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.continue-card:hover { border-color: var(--accent); color: var(--ink); }
.row-btn { width: 100%; font: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.setup-steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.setup-steps li { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.setup-steps li.is-done span:last-child { color: var(--muted); }
.home-details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.home-details .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin: 8px 0 12px; }
.home-details dt { font-size: 12px; color: var(--muted); }
.home-details dd { margin: 2px 0 0; color: var(--ink); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.app-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.app-card .split { width: 100%; }
.app-card.is-later { background: var(--surface-2); }
.row-list > li { padding: 0; margin: 0; }
.row-list > li::before { content: none; }
ul.row-list, ul.proj-list, ul.tree, ul.app-grid, ol.setup-steps, ol.versions { padding: 0; margin: 0; list-style: none; }
ul.app-grid, ul.proj-list { display: grid; }

/* Review content and the four-part results */
.vparts { display: flex; flex-direction: column; gap: 12px; }
.vpart { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.vpart-bad { border-color: var(--pink); }
.vpart-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vpart-head .h-xs { margin: 0; color: var(--ink); font-size: 15px; }
.vpart .issues { padding: 0; }
.issue-what { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 14px; }
.issue-what dt { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.issue-what dd { margin: 0; }
.issue-what dd.issue-ex { padding: 8px 10px; border-radius: 6px; background: var(--surface-2); overflow-wrap: anywhere; }
.review-parts { display: flex; flex-direction: column; gap: 12px; padding: 0; list-style: none; }
.review-parts li { display: flex; flex-direction: column; gap: 2px; }
.review-privacy { padding: 0 20px 20px; }
.save-box { border-top: 1px solid var(--line); padding-top: 12px; }
.save-box > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
/* Quality: a compact list of scenarios */
.qlist { display: flex; flex-direction: column; gap: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r); }
.qrow + .qrow { border-top: 1px solid var(--line); }
.qrow summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; cursor: pointer; list-style: none; }
.qrow summary::-webkit-details-marker { display: none; }
.qrow-title { flex: 1 1 auto; font-weight: 500; }
.qrow-body { padding: 0 14px 14px; }
ul.qlist, ul.review-parts { padding: 0; list-style: none; }
.flash[role="note"] { border-left-color: var(--accent); }

/* Onboarding */
.onb { display: flex; flex-direction: column; gap: 22px; }
.onb-steps { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.onb-steps li { display: inline-flex; align-items: center; gap: 6px; }
.onb-steps li.is-now { color: var(--ink); font-weight: 600; }
.onb-list { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
ul.onb-list { padding: 0; }
.onb-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.onb-item.is-accepted { border-color: var(--good); }
.onb-item.is-removed { opacity: 0.6; }
.onb-item textarea { min-height: 0; font-size: 15px; font-weight: 400; padding: 10px 12px; }
.onb-claims { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.onb-progress { padding-left: 18px; }
.onb-finish { position: sticky; bottom: 12px; box-shadow: 0 6px 24px var(--shadow); }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
ul.idea-grid { display: grid; padding: 0; }
.idea-card { width: 100%; height: 100%; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.idea-card:hover { border-color: var(--accent); }
.onb-note { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.review-state { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 10px 12px; border-radius: var(--r-sm); border-left: 3px solid var(--line); background: var(--surface-2); }
.review-state.good { border-left-color: var(--good); }
.review-state.mid { border-left-color: #C98A0B; }
.review-state.bad { border-left-color: var(--pink); }
.review-note { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--ink); white-space: pre-wrap; }
.review-decide { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.review-decide .h-xs { margin: 0; color: var(--ink); font-size: 15px; }
.review-withdraw, .review-more { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.review-more > summary { cursor: pointer; font-size: 14px; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.review-more[open] > summary { margin-bottom: 8px; }
.review-next strong { color: var(--ink); }
ol.review-history, ol.comments { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.review-history li, .comments li { display: flex; flex-direction: column; gap: 2px; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.bad-text { color: var(--pink); }
/* Intelligence: records and detail panel */
.section-panel { margin-top: 0; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 860px) { .overview-grid { grid-template-columns: minmax(0, 1fr); } }
.profile-kv dd, .small-kv dd { margin: 0; }
ul.cat-grid, ul.plain.cat-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 0; }
.cat-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; }
.cat-card:hover { border-color: var(--accent); }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.row-item:last-child { border-bottom: 0; }
.list-tools { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.list-tools .grow { flex: 1 1 220px; min-width: 0; }
.list-tools input[type=search] { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r); padding: 10px 14px; width: 100%; }
.list-tools select { min-height: 44px; }
.section-panel > .box, .section-panel > details.box, .section-panel > .stack > .box, .section-panel .records .box { flex: none; }
/* Records (Round 40): one master-detail pattern for every Intelligence list. The scope is a size
   container, so the layout follows the space the list really has (sidebar, rail, zoom), not the
   window. Wide: a compact list beside the detail, which keeps its place and scrolls on its own.
   Narrow (phones, tablets in portrait, 200% zoom): the open record is its own view, with a way back. */
.rec-scope { container: recs / inline-size; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.records { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.rec-list-col { min-width: 0; }
@container recs (min-width: 760px) {
  .records.has-detail { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); }
  .records.has-detail ul.record-list { gap: 4px; }
  .records.has-detail .record { gap: 8px; padding: 9px 12px; min-height: 44px; }
  .records.has-detail .record .clamp, .records.has-detail .record-meta > .small { display: none; }
  .records.has-detail > .detail-panel { position: sticky; top: var(--sticky-top); max-height: calc(100dvh - var(--sticky-top) - 16px); overflow-y: auto; overscroll-behavior: contain; scroll-margin-top: var(--sticky-top); }
  .records .dp-back { display: none; }
}
@container recs (max-width: 759.98px) {
  .rec-scope.has-detail .rec-wide, .rec-scope.has-detail .rec-list-col { display: none; }
  .records .dp-close { display: none; }
}
@media (max-height: 560px) { .records.has-detail > .detail-panel { position: static; max-height: none; overflow: visible; } .records .detail-panel > .dp-foot { position: static; } }
ul.record-list, ul.plain.record-list { display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; list-style: none; }
.record { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
a.record:hover, .record.is-open { border-color: var(--accent); }
.record .stack { min-width: 0; }
.record-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill-row { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.detail-panel { padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; scroll-margin-top: var(--sticky-top); }
.records .detail-panel { display: flex; flex-direction: column; }
.dp-head { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.dp-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dp-title h2 { font-size: 22px; min-width: 0; }
.detail-panel:focus { outline: none; }
.detail-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dp-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; font-size: 14px; }
.dp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 6px 16px; margin: 0; }
.dp-facts > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dp-facts dt { font-size: 12px; color: var(--muted); }
.dp-facts dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.dp-facts .dp-use { grid-column: 1 / -1; }
.dp-body { display: flex; flex-direction: column; gap: 18px; padding: 16px 18px 18px; min-width: 0; }
.dp-body > section { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dp-lead { margin: 0; font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; max-width: 68ch; }
.dp-fold { border-top: 1px solid var(--line); padding-top: 12px; }
.dp-fold > summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.dp-fold > summary { list-style: none; }
.dp-fold > summary::-webkit-details-marker { display: none; }
.dp-fold > summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 0 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.dp-fold[open] > summary::before { transform: rotate(45deg); }
.dp-fold[open] > summary { margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .dp-fold > summary::before { transition: none; } }
.dp-fold .src-line { overflow-wrap: anywhere; }
.dp-fold .src-line q { display: block; margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line); max-height: 9.5em; overflow: auto; }
.cmp-table { font-size: 13.5px; border-collapse: collapse; min-width: 640px; }
.cmp-table th, .cmp-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.disc-counts { font-size: 13px; border-collapse: collapse; }
.disc-counts th, .disc-counts td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.disc-counts th[scope="row"], .disc-counts thead th:first-child { text-align: left; }
.dp-related { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dp-related li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.dp-foot { position: sticky; bottom: var(--sticky-bottom); z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 var(--r) var(--r); }
.dp-foot form { margin: 0; }
.detail-panel dl.kv.intel-kv { display: flex; flex-direction: column; gap: 12px; }
.detail-panel dl.kv.intel-kv > div { display: flex; flex-direction: column; gap: 4px; }
.detail-panel dl.kv.intel-kv dt { font-size: 13px; font-weight: 600; color: var(--ink-2, var(--muted)); }
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
ol.record-history { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.record-history li { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 2px solid var(--line); }
.kb-preview { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; }
.claim-text { margin: 0; font-size: 17px; line-height: 1.5; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
.inline-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.inline-form input[type=date] { font: inherit; padding: 8px 10px; border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.kind-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.kind-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.kind-card input { margin-top: 3px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.wrap.narrow-wide { max-width: 980px; }
ul.pb-checks { display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; list-style: none; }
.pb-checks li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); border-left: 3px solid var(--line); background: var(--surface-2); }
.pb-checks li.pb-fix { border-left-color: var(--pink); }
.pb-checks li.pb-advice { border-left-color: #C98A0B; }
.src-note { color: var(--muted); }
.intg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.intg-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.privacy-kv dd { margin: 0 0 6px; }
/* Quick switcher: a constrained panel; the list scrolls inside it, never down the sidebar. */
.switch-panel { max-height: min(460px, calc(100vh - 96px)); }
.switch-panel form { overflow-y: auto; min-height: 0; }
.switch-panel .switch-label { display: block; padding: 6px 8px 2px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
/* Portfolio (Clients / Brands) */
.pf-empty { max-width: 640px; }
.pf-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pf-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; }
.pf-tools { flex: 1 1 520px; }
.pf-views { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.pf-views a { padding: 9px 14px; color: var(--muted); text-decoration: none; font-size: 14px; }
.pf-views a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
ul.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.pf-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.pf-card.is-current { border-color: var(--accent); }
.pf-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pf-head strong { overflow-wrap: anywhere; }
.brand-mark.big { width: 40px; height: 40px; font-size: 15px; border-radius: 10px; flex-shrink: 0; }
.brand-mark.has-logo { background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; padding: 2px; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-row { display: flex; align-items: center; gap: 12px; }
.pf-ready { display: flex; flex-direction: column; gap: 4px; }
.pf-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pf-fill { display: block; height: 100%; background: var(--accent); }
.pf-fill.pf-0 { width: 0; } .pf-fill.pf-1 { width: 20%; } .pf-fill.pf-2 { width: 40%; } .pf-fill.pf-3 { width: 60%; } .pf-fill.pf-4 { width: 80%; } .pf-fill.pf-5 { width: 100%; background: var(--good); }
ul.pf-signals { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.pf-signals form { margin: 0; }
.pill-btn { font: inherit; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; border: 0; cursor: pointer; background: var(--surface-2); color: var(--ink); }
.pill-btn.bad { background: var(--pink-soft); color: var(--pink); }
.pill-btn.mid { background: #FFF2D9; color: #8A5A00; }
.pf-name { display: flex; gap: 10px; align-items: center; }
form.inline { display: inline; margin: 0; }
@media (max-width: 640px) {
  .pf-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pf-summary .stat-note { display: none; }
  .pf-card { gap: 8px; padding: 12px; }
  .pf-card > p.small, .pf-card .pf-bar { display: none; }
}
.known-box { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }

/* Campaign Builder */
ul.plain.cmp-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cmp-piece { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.cmp-piece .split { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.cmp-piece .split > .stack { min-width: 0; }
.cmp-notes { margin: 0; padding-left: 18px; color: var(--muted); }
.cmp-summary { font-weight: 600; }
.cmp-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--accent-soft); margin: 0 0 16px; }
.cmp-side { align-self: start; }
.cmp-side > .box { flex: none; }
.cmp-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 4px 0 0; }
.cmp-facts > div { min-width: 0; }
.cmp-facts dt { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cmp-facts dd { margin: 2px 0 0; }

/* One outcome: Passed, Needs review, Blocked */
.outcome { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface); }
.outcome-blocked { border-color: var(--pink); }
.outcome-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.outcome-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
.outcome-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 3px solid var(--line); }
.outcome-list.blocking li { border-left-color: var(--pink); }
.outcome-list.advisory li { border-left-color: #B7791F; }
.outcome-area { font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; color: var(--muted); }
.outcome-areas { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; padding: 0; }
.outcome-areas li { display: flex; gap: 10px; align-items: flex-start; }
.outcome-areas .pill { flex: none; }
/* Campaign overview */
.cmp-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; }
.cmp-steps li { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-top-width: 4px; }
.cmp-steps .step-done { border-top-color: var(--good); }
.cmp-steps .step-now { border-top-color: #B7791F; }
.cmp-steps .step-stop { border-top-color: var(--pink); }
@media (max-width: 640px) { .cmp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cmp-piece.cmp-blocked { border-left: 4px solid var(--pink); }
.cmp-piece.cmp-approved, .cmp-piece.cmp-approved_advisory { border-left: 4px solid var(--good); }
.cmp-piece.cmp-in_review { border-left: 4px solid #B7791F; }
.cmp-todo { display: flex; flex-direction: column; gap: 6px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
.chip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 640px) { .chip-grid { grid-template-columns: 1fr; } }
.chip-check { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: var(--surface); cursor: pointer; }
.chip-check > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chip-check:has(input:checked) { border-color: var(--accent); }
a.pill { text-decoration: none; }
.cmp-main { flex: 1 1 520px; min-width: 0; }
.cmp-side { flex: 0 1 340px; min-width: 0; }
label.chip-check { flex-direction: row; }

/* ==========================================================================================
   Studio workbench (public/editor.js): the document first, one-row toolbar, the document's
   state (saved version or private draft), selection toolbar, side panel tabs, Ask NOLSEM.
   ========================================================================================== */
.studio-wrap { max-width: 1600px; gap: 16px; padding-block: 20px 48px; }
.studio-bar { align-items: center; padding-bottom: 4px; }
.studio-bar .h-doc { font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.02em; }
.studio-bar .actions { gap: 6px; }
@media (min-width: 1101px) {
  .studio { grid-template-columns: 196px minmax(0, 1fr) 368px; gap: 16px; }
  .studio[data-hide-tree] { grid-template-columns: minmax(0, 1fr) 368px; }
  .studio[data-hide-side] { grid-template-columns: 196px minmax(0, 1fr); }
}
.studio-tree { background: transparent; border-color: transparent; padding: 4px 0; gap: 18px; }
.studio-side { padding: 0; gap: 0; border-radius: 14px; box-shadow: 0 1px 2px var(--shadow); overflow: hidden; }
.studio-side > section { padding: 16px; }
.studio-side.tabbed > section + section { border-top: 1px solid var(--line); }
@media (min-width: 1101px) {
  .studio-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; }
}

/* The document column: a page on a quiet canvas */
.doc-form { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px var(--shadow), 0 8px 24px var(--shadow); }
.doc-chrome { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; border-radius: 14px 14px 0 0; background: var(--surface); }
.doc-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); border-radius: 14px 14px 0 0; }
.doc-state { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0; flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--muted); }
.doc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.doc-state[data-state="draft"] .doc-dot { background: var(--warn-line); }
.doc-state[data-state="draft"] [data-dirty] { color: var(--ink); font-weight: 500; }
.doc-auto:empty { display: none; }
.doc-auto::before { content: '·'; margin-right: 8px; }
.doc-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.doc-head .btn { flex: none; white-space: nowrap; }
.doc-toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 1px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; scrollbar-width: thin; }
.doc-form:not(.live) .doc-toolbar { display: none; }
.tb-btn, .tb-select { flex: none; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; height: 34px; min-width: 32px; padding: 0 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); font: 500 14px/1 var(--sans); cursor: pointer; }
.tb-select { min-width: 104px; border-color: var(--field-line); background: var(--surface); padding: 0 6px; }
.tb-btn:hover:not(:disabled) { background: var(--hover); }
/* Round 63: pressed is also told by an accent edge (3:1 or more), not by the fill and text colour alone. */
.tb-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }
.tb-btn:disabled, .tb-select:disabled { opacity: 0.4; cursor: default; }
/* Round 63: a solid 2px accent outline (3:1 or more on every surface), as everywhere else; the soft ring stays as a halo. */
.tb-btn:focus-visible, .tb-select:focus-visible, .bubble-btn:focus-visible, .side-tabs [role="tab"]:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; box-shadow: 0 0 0 4px var(--focus-ring); border-color: var(--accent); }
.tb-bold { font-weight: 700; font-size: 15px; } .tb-ital { font-style: italic; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; }
.tb-text { font-size: 13px; color: var(--muted); }
.tb-sep { flex: none; width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.tb-fill { flex: 1 0 8px; }
.tb-link { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tb-link .text { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; }
.doc-surface { background: var(--surface); border-radius: 0 0 14px 14px; }
.doc-surface .doc-page { min-height: 62vh; max-width: 780px; margin: 0 auto; padding: 40px clamp(18px, 5vw, 64px) 72px; border: 0; border-radius: 0; background: transparent; font-size: 17px; line-height: 1.7; outline: none; overflow-wrap: anywhere; white-space: pre-wrap; }
.doc-surface .doc-page:focus-visible { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.doc-page h1 { font-size: 30px; line-height: 1.2; margin: 0.2em 0 0.55em; letter-spacing: -0.025em; text-wrap: balance; }
.doc-page h2 { font-size: 22px; line-height: 1.3; margin: 1.4em 0 0.45em; letter-spacing: -0.015em; text-wrap: balance; }
.doc-page h3 { font-size: 18px; line-height: 1.35; margin: 1.2em 0 0.3em; }
.doc-page p { margin: 0 0 0.9em; }
.doc-page ul, .doc-page ol { margin: 0 0 0.9em; padding-left: 1.5em; }
.doc-page li > p { margin: 0 0 0.3em; }
.doc-page blockquote { margin: 0 0 0.9em; padding: 2px 0 2px 16px; border-left: 3px solid var(--line-strong); background: transparent; color: var(--muted); font-size: inherit; }
.doc-page a { color: var(--accent-strong); }
.doc-page code { padding: 1px 4px; border-radius: 4px; background: var(--surface-2); font-size: 0.92em; }
.doc-page hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.doc-page ::selection { background: var(--accent-soft); }
.ProseMirror { word-wrap: break-word; white-space: pre-wrap; font-variant-ligatures: none; }
.ProseMirror-hideselection *::selection { background: transparent; }
.ProseMirror-gapcursor { display: none; }
textarea.doc-edit { border: 0; border-radius: 0 0 14px 14px; min-height: 62vh; padding: 24px clamp(18px, 4vw, 40px); background: var(--surface); }
.doc-form:not(.live) textarea.doc-edit { border-radius: 0 0 14px 14px; }
textarea.doc-source { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14.5px; line-height: 1.6; }
textarea.doc-edit:focus { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.doc-where { padding: 0 4px; }

/* Selection toolbar: above the words; on phones docked at the bottom, clear of the text */
.sel-bubble { position: absolute; z-index: 40; display: flex; flex-wrap: nowrap; gap: 2px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 28px var(--shadow), 0 1px 2px var(--shadow); }
.sel-bubble.docked { position: fixed; left: 0; right: 0; bottom: 0; top: auto; border-radius: 14px 14px 0 0; border-width: 1px 0 0; overflow-x: auto; padding: 8px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
body.has-dock { padding-bottom: 72px; }
.bubble-btn { flex: none; min-height: 34px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font: 500 13.5px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.sel-bubble.docked .bubble-btn { min-height: 44px; padding: 0 14px; font-size: 14.5px; }
.bubble-btn:hover { background: var(--hover); }
.bubble-btn.primary { background: var(--accent); color: var(--on-accent); }
.bubble-btn.primary:hover { background: var(--accent-strong); }

/* Outline */
.doc-outline ol { display: flex; flex-direction: column; gap: 1px; padding: 0; margin: 0; list-style: none; }
.doc-outline a { display: block; padding: 6px 10px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.doc-outline a:hover { background: var(--hover); color: var(--ink); }
.doc-outline .ol-h1 { color: var(--ink); font-weight: 500; }
.doc-outline .ol-h2 { padding-left: 20px; } .doc-outline .ol-h3 { padding-left: 30px; }

/* Side panel tabs */
.side-tabs { position: sticky; top: 0; z-index: 3; display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.side-tabs [role="tab"] { flex: 1; min-height: 40px; padding: 0 6px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font: 500 13.5px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.side-tabs [role="tab"]:hover { color: var(--ink); }
.side-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.studio-side.tabbed > .tab-off { display: none; }
.studio-side.tabbed > section + section:not(.tab-off) { border-top: 0; }
.studio-side.tabbed > section:not(.tab-off) ~ section:not(.tab-off) { border-top: 1px solid var(--line); }

/* Ask NOLSEM: the conversation, then the compose box */
.assist { display: flex; flex-direction: column; gap: 12px; }
.assist-empty { margin: 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 10px; line-height: 1.5; }
.assist-label { margin: 0; font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.assist-anchor { display: flex; flex-direction: column; gap: 6px; }
.assist-thread { display: flex; flex-direction: column; gap: 12px; }
.assist-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.assist-turns { display: flex; flex-direction: column; gap: 10px; padding: 0; }
.assist-turn { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.assist-turn:focus { outline: none; }
.assist-turn.you { margin-left: 28px; background: var(--surface-2); border-color: transparent; }
.assist-turn.edit { border-color: var(--line-strong); box-shadow: 0 1px 2px var(--shadow); }
.assist-moved { list-style: none; text-align: center; color: var(--muted); }
.assist-diff { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); white-space: pre-wrap; }
.assist-diff del, .assist-alt del { color: var(--pink); background: var(--pink-soft); text-decoration: line-through; border-radius: 3px; }
.assist-diff ins, .assist-alt ins { color: var(--good); background: var(--good-soft); text-decoration: none; border-radius: 3px; font-weight: 500; }
.assist-evidence { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.ev-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-list { display: flex; flex-direction: column; gap: 8px; padding: 0; }
.ev { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 8px; border-left: 3px solid var(--line-strong); background: var(--surface-2); list-style: none; }
.ev-need { border-left-color: var(--warn-line); }
.ev-ok { border-left-color: var(--good); }
.ev-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-text { font-size: 14px; quotes: '“' '”'; }
.ev-note { color: var(--muted); }
.assist-alts { display: flex; flex-direction: column; gap: 8px; }
.assist-alt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.assist-stale { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.assist-used { color: var(--muted); }
.assist-compose { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 0 2px; background: var(--surface); border-top: 1px solid var(--line); }
.assist-sel { margin: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 13px/1 var(--sans); cursor: pointer; }
.chip:hover:not(:disabled) { background: var(--hover); border-color: var(--line-strong); }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
.compose-box { display: flex; align-items: flex-end; gap: 8px; padding: 6px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--surface); }
.compose-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.compose-box textarea { flex: 1; min-height: 44px; max-height: 200px; padding: 6px 8px; border: 0; border-radius: 0; background: transparent; font-size: 15px; font-weight: 400; line-height: 1.45; box-shadow: none; resize: vertical; }
.compose-box textarea:focus { box-shadow: none; }
.compose-more summary { cursor: pointer; }
.assist-privacy { color: var(--muted); }
.src-list { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; }
.src-note { color: var(--muted); }
.pre-line { white-space: pre-line; }
.draft-note { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--warn-line); border-radius: 12px; background: var(--surface); }
.comment-quote { display: block; margin: 4px 0; padding: 4px 10px; border-left: 3px solid var(--line-strong); color: var(--muted); font-size: 13.5px; cursor: pointer; quotes: none; }
.comment-quote[data-comment-preview] { cursor: default; }
@media (max-width: 1360px) and (min-width: 1101px) {
  .studio { grid-template-columns: 160px minmax(0, 1fr) 328px; gap: 14px; }
  .studio[data-hide-tree] { grid-template-columns: minmax(0, 1fr) 328px; }
  .studio[data-hide-side] { grid-template-columns: 160px minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .studio-side { position: static; }
  .doc-surface .doc-page, textarea.doc-edit { min-height: 50vh; }
  .doc-surface .doc-page { padding: 24px 18px 40px; font-size: 16.5px; }
  .studio-tree { padding: 0; }
}
@media (max-width: 700px) {
  .doc-head { flex-wrap: wrap; gap: 8px; }
  .doc-state { flex-basis: 100%; }
  .assist-turn.you { margin-left: 12px; }
}

/* ==========================================================================================
   Design system (Nov 9, 2026): one set of tokens and component sizes across Home, Create, the
   Apps, Studio, Intelligence, Review, Insights and the agency pages. Colours come only from the
   tokens above, so light, dark and "match my computer" stay consistent.
     Type: page title 26-34, section 18, card title 16, body 15, small 13, label 11.5.
     Controls: 38 px (32 small); 44 px on touch screens. Radius 8 for controls, 12-14 for cards.
     Elevation: cards rest on --elev-1; the document page and floating tools on --elev-2.
   ========================================================================================== */
@media (pointer: coarse) { :root { --ctl: 44px; --ctl-sm: 40px; } }
.wrap { padding-block: 32px 64px; }
h1 { font-size: clamp(26px, 2.8vw, 34px); letter-spacing: -0.03em; }
.lede { max-width: 62ch; line-height: 1.55; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; }
.h-sm { font-size: 18px; letter-spacing: -0.015em; }
.btn { min-height: var(--ctl); border-radius: var(--r-sm); font-size: 14px; }
.btn.small { min-height: var(--ctl-sm); padding: 0 12px; font-size: 13.5px; }
.btn.primary { box-shadow: var(--elev-1); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.5; }
.box, .stat, .panel-card, .detail, .tablewrap, .proj-card, .studio-side { box-shadow: var(--elev-1); }
.box, .stat, .panel-card, .detail, .tablewrap { border-radius: 12px; }
.box-head h2 { font-size: 16px; }
th { letter-spacing: 0.06em; font-size: 11.5px; font-weight: 600; }
textarea { font-size: 16px; font-weight: 400; line-height: 1.5; }
textarea, input[type=url], input[type=text], input[type=email], select { border-radius: var(--r-sm); }
.flash { border-radius: 12px; box-shadow: var(--elev-1); }
.section-tabs a { min-height: 46px; }
.row-link { border-radius: var(--r-sm); }

/* Portfolio and brands (Nov 9, 2026): the way back to all clients, tabs, the next step after adding */
.ws-back { display: flex; align-items: center; gap: 6px; min-height: 32px; margin: -6px 0 4px; padding: 0 8px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; }
.ws-back:hover { background: var(--hover); color: var(--ink); }
.ws-back svg { width: 16px; height: 16px; }
.pf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.pf-tabs a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 12px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.pf-tabs a:hover { color: var(--ink); }
.pf-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.pf-card:target, tr:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.flash.next-step { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; border-left-color: var(--good); }
label.check.consent { align-items: flex-start; font-weight: 400; }
label.check.consent input { margin-top: 3px; flex: none; }

/* NOLSEM platform administration: visibly apart from any customer's settings */
.menu-platform { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: 13.5px; border: 1px dashed var(--line-strong); margin-top: 6px; }
.menu-platform:hover, .menu-platform[aria-current="page"] { color: var(--ink); background: var(--hover); }
.menu-platform .pill { margin-left: auto; font-size: 11px; }
.platform-bar { padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--warn-line); font-size: 13px; font-weight: 500; letter-spacing: 0.01em; }
.subnav-ctx { display: block; padding: 0 10px 6px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Which brand the work is in (several brands only) */
.brand-ctx { border-bottom: 1px solid var(--line); background: var(--surface); }
.brand-ctx-in { display: flex; align-items: center; gap: 10px; min-height: 40px; max-width: 1600px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); font-size: 13.5px; }
.brand-ctx .brand-mark { width: 22px; height: 22px; font-size: 10px; border-radius: 6px; }
.brand-ctx a { margin-left: auto; }

/* ==========================================================================================
   App shell v2 (Nov 10, 2026). One set of destinations, three layouts:
     1280 px and up   full menu on the left (--side-w), content beside it;
     768 to 1279 px   a navigation rail (--rail-w) with icons and short labels, and a top bar
                      that says who the work is for;
     under 768 px     the top bar, and a fixed bottom bar (--bottom-h) with five places; the
                      rest under More.
   Content widths come from three tokens: --w-page (lists, dashboards), --w-read (forms,
   settings, reading) and --w-wide (Studio). The side gutter is --gutter everywhere.
   ========================================================================================== */
:root { --sticky-top: 16px; --sticky-bottom: 0px; --side-w: 232px; --rail-w: 84px; --top-h: 52px; --bottom-h: 60px; --gutter: clamp(16px, 2.4vw, 32px); --w-page: 1200px; --w-read: 880px; --w-wide: 1600px; }
.wrap { max-width: var(--w-page); padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); padding-block: 28px 56px; }
.wrap.narrow { max-width: var(--w-read); }
.studio-wrap { max-width: var(--w-wide); }

.app { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.sidebar { flex: 0 0 var(--side-w); width: var(--side-w); gap: 14px; padding: 14px 10px 14px; border-right: 1px solid var(--line); }
.side-top { display: flex; flex-direction: column; gap: 6px; }
.side-top > .ws, .ws.org { min-height: 48px; padding: 0 8px; }
/* Three identities: the product (NOLSEM, to Home), the organization, and the client in the page. */
.product { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.product:hover { background: var(--hover); color: var(--ink); }
.product-lockup { display: block; height: 25px; width: auto; }
.product-icon { display: none; width: 30px; height: 30px; flex: none; }
.product-icon.always { display: block; }
.org-id { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.org-id .brand-mark { width: 28px; height: 28px; flex: none; border-radius: 7px; font-size: 11px; }
.org-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.org-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Inside a client: Clients / Client / Area, at the top of the page. */
.ctx-crumbs { border-bottom: 1px solid var(--line); background: var(--surface); }
.ctx-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; list-style: none; margin: 0; min-height: 42px; padding-block: 4px; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); font-size: 13.5px; }
.ctx-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.ctx-crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--line-strong); }
.ctx-crumbs a { color: var(--muted); text-decoration: none; border-radius: 6px; padding: 2px 4px; }
.ctx-crumbs a:hover { color: var(--ink); background: var(--hover); }
.ctx-crumbs .ctx-client { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.ctx-crumbs [aria-current="page"] { color: var(--ink); }
.crumb-mark { width: 22px; height: 22px; flex: none; border-radius: 6px; font-size: 10px; }
.switch-open { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--muted); font-size: 13px; background: var(--surface); }
.switch-open:hover { color: var(--ink); }
.switch-open-text { flex: 1; }
.switch-kbd { font: 500 11px/1 var(--sans); padding: 3px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
@media (hover: none) { .switch-kbd { display: none; } }
/* The quick switcher opens as a panel over the page, never as a list down the menu. */
.switch-panel { position: fixed; top: 64px; left: calc(var(--side-w) + 12px); right: auto; width: min(380px, calc(100vw - 24px)); z-index: 70; }
.menu-wrap { gap: 16px; flex: 1 1 auto; }
.menu a { position: relative; min-height: 38px; }
.menu-end { margin-top: auto; }
.menu-platform { margin-top: 4px; }
.me { margin-top: 0; }

.topbar { display: none; }
.bottomnav, .more-sheet { display: none; }
.section-pick { display: none; }

/* Rail: laptops and tablets */
@media (max-width: 1279px) {
  :root { --sticky-top: calc(var(--top-h) + 12px); }
  .sidebar { flex-basis: var(--rail-w); width: var(--rail-w); padding: 10px 6px; gap: 10px; align-items: stretch; }
  .side-top .ws-text, .side-top .org-text, .switcher > summary, .menu-label, .menu-platform .pill, .me-text { display: none; }
  .side-top > .ws, .ws.org { justify-content: center; padding: 0; min-height: 44px; }
  .product { justify-content: center; padding: 0; }
  .product-lockup { display: none; }
  .product-icon { display: block; }
  .org-id { justify-content: center; padding: 6px 0; }
  .ctx-crumbs { display: none; }
  .menu { gap: 2px; }
  .menu a, .menu-platform { flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 6px 2px; font-size: 11px; line-height: 1.15; text-align: center; border: 0; margin: 0; }
  .menu .label { flex-grow: 0; overflow-wrap: anywhere; }
  .menu a .count, .menu-platform .count { position: absolute; top: 4px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
  .me { flex-direction: column; gap: 6px; padding-top: 10px; }
  .topbar-bell { flex: none; }
  .me-name { flex-grow: 0; padding: 2px; }
  .switch-panel { top: calc(var(--top-h) + 8px); left: auto; right: 12px; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: 10px; min-height: var(--top-h); padding-block: 6px; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); padding-top: max(6px, env(safe-area-inset-top, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar-back { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px 0 4px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
  .topbar-back:hover { background: var(--hover); color: var(--ink); }
  .topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; color: var(--ink); text-decoration: none; }
  .topbar-title .brand-mark { width: 28px; height: 28px; flex: none; }
  .topbar-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
  .topbar-text strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-text .small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-me { display: none; }
  .topbar-product { display: none; }
  .topbar-crumbs, .topbar-org { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; font-size: 14px; }
  .topbar-crumbs .sep { color: var(--line-strong); }
  .topbar-up { color: var(--muted); text-decoration: none; white-space: nowrap; padding: 4px; border-radius: 6px; }
  .topbar-up:hover { background: var(--hover); color: var(--ink); }
  .topbar-client { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); text-decoration: none; }
  .topbar-client strong, .topbar-org strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand-ctx { display: none; }
}

/* Phones */
@media (max-width: 767px) {
  :root { --sticky-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px)); }
  :root { --gutter: 16px; }
  .app { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; width: 0; height: 0; padding: 0; border: 0; overflow: visible; background: none; }
  .sidebar > :not(.side-top), .side-top > :not(.switcher) { display: none; }
  .switch-panel { top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 6px); left: 12px; right: 12px; width: auto; max-height: min(70vh, 460px); }
  .topbar-me { display: inline-flex; }
  .topbar-product { display: inline-flex; flex: none; }
  .topbar-product img { width: 28px; height: 28px; }
  .main-col { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; min-height: var(--bottom-h); padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px var(--shadow); }
  .bottomnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; line-height: 1.1; text-align: center; border-radius: var(--r-sm); }
  .bottomnav a span:not(.count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottomnav a[aria-current="page"] { color: var(--accent); }
  .bottomnav a[aria-current="page"] svg { stroke-width: 2.1; }
  .bottomnav .count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
  .is-focus .bottomnav, .kb-open .bottomnav { display: none; }
  .is-focus .main-col, .kb-open .main-col { padding-bottom: 12px; }
  .more-sheet[open] { display: flex; flex-direction: column; gap: 6px; position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 80vh; padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); border: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; background: var(--surface); color: var(--ink); overflow-y: auto; }
  .more-sheet::backdrop { background: rgba(0, 21, 43, 0.45); }
  /* Compact trial status: days left and the next step only. */
  .trialbar { padding-block: 6px; font-size: 13px; }
  .trialbar-in > span { display: none; }
  .trialbar-in { gap: 4px 12px; flex-wrap: nowrap; }
  .trialbar-in strong { white-space: nowrap; }
  .trialbar.ended .trialbar-in { flex-wrap: wrap; }
  /* Section tabs become one compact selector. */
  .section-tabs { display: none; }
  .tabs-pick { display: block; }
  .wrap { padding-block: 18px 32px; gap: 18px; }
  .head { align-items: flex-start; }
}
.more-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px; }
.more-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.more-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.more-list a:hover { background: var(--hover); }
.more-list .count { margin-left: auto; }
.more-foot { display: flex; align-items: center; gap: 8px; padding: 10px 4px 0; margin-top: 6px; border-top: 1px solid var(--line); }
.more-foot .small { flex: 1; }
.more-foot form { margin: 0; }

/* Compact section selector (Settings beside a narrow page; section tabs on phones) */
.section-pick { position: relative; }
.section-pick > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--elev-1); }
.section-pick > summary::-webkit-details-marker { display: none; }
.section-pick-now { flex: 1; font-weight: 600; font-size: 14.5px; }
.section-pick-chev { color: var(--muted); line-height: 0; }
.section-pick-list { position: absolute; z-index: 45; top: calc(100% + 4px); left: 0; right: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); box-shadow: var(--elev-2); max-height: 70vh; overflow-y: auto; }
.section-pick-list a { display: flex; align-items: center; min-height: 42px; padding: 0 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 14.5px; }
.section-pick-list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.section-pick-list .menu-label { padding: 8px 10px 4px; }
.tabs-pick { margin: 12px max(var(--gutter), env(safe-area-inset-left, 0px)) 0 max(var(--gutter), env(safe-area-inset-right, 0px)); }

/* Settings: the content is the focus. A section list beside it only where the page area is
   wide enough (1000 px of content); otherwise one compact selector above it. */
.settings-wrap { max-width: 1120px; container-type: inline-size; container-name: settings; }
.settings { display: block; }
.settings .subnav { display: none; }
.settings .section-pick { display: block; margin-bottom: 18px; }
.settings-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: var(--w-read); }
.subnav-home { font-size: 13px; color: var(--muted) !important; }
@container settings (min-width: 960px) {
  .settings { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 36px; align-items: start; }
  .settings .subnav { display: flex; position: sticky; top: 20px; max-width: none; }
  .settings .section-pick { display: none; }
}
.subnav a { min-height: 36px; font-size: 14px; }
.settings-home .set-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: var(--ink); text-decoration: none; }
.set-row:hover { background: var(--hover); color: var(--ink); }
.set-row > span[aria-hidden] { color: var(--muted); font-size: 18px; }
.settings-home { max-width: 1040px; }

/* Studio on tablets: the document keeps the width; the side panel is a drawer. */
.drawer-close { display: none; }
@media (min-width: 701px) and (max-width: 1279px) {
  .studio, .studio[data-hide-tree], .studio[data-hide-side] { grid-template-columns: minmax(0, 1fr); }
  .studio .studio-tree { display: none; }
  .studio .studio-side, .studio[data-hide-side] .studio-side { display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(440px, 86vw); max-height: none; border-radius: 16px 0 0 16px; overflow-y: auto; overscroll-behavior: contain; transform: translateX(104%); transition: transform .2s ease; box-shadow: -12px 0 32px var(--shadow); padding-top: env(safe-area-inset-top, 0px); }
  .studio[data-side-open] .studio-side { transform: none; }
  .studio-bar [data-panel="tree"] { display: none; }
  .studio-bar [data-panel="side"] { display: inline-flex; }
  .drawer-close { display: inline-flex; align-self: flex-end; margin: 10px 12px 0; }
}
@media (prefers-reduced-motion: reduce) { .studio .studio-side { transition: none; } }

/* Platform admin: its own menu, warm banner, no customer context. */
/* The menu's colour runs the full height of the page, however long it is. */
.app { background: linear-gradient(to right, var(--side) calc(var(--side-w) - 1px), var(--side-line) calc(var(--side-w) - 1px), var(--side-line) var(--side-w), var(--bg) var(--side-w)); }
.sidebar { border-right: 0; }
@media (max-width: 1279px) {
  .app { background: linear-gradient(to right, var(--side) calc(var(--rail-w) - 1px), var(--side-line) calc(var(--rail-w) - 1px), var(--side-line) var(--rail-w), var(--bg) var(--rail-w)); }
}
@media (max-width: 767px) { .app { background: var(--bg); } }

/* People and access: a directory. Rows are disclosure buttons: Manage opens the person's details
   and actions in place. Columns drop by priority as the page narrows (container query), never
   squeezing headings into several lines. */
.summary-line { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.summary-line strong { color: var(--ink); font-weight: 600; }
.people-box { container-type: inline-size; container-name: people; }
.box-body.tight { padding-block: 12px; }
.people-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.people-tools .grow { flex: 1 1 220px; }
.people-tools select { min-height: var(--ctl); padding: 6px 10px; }
.people-tools input[type=search] { min-height: var(--ctl); padding: 6px 12px; }
.people { margin: 0; padding: 0; list-style: none; }
.people > li + li { border-top: 1px solid var(--line); }
.people-head, .person-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(84px, 0.9fr) minmax(96px, 0.9fr) minmax(0, 1.4fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: center; padding: 10px 20px; }
.people-head { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.person-row { cursor: pointer; list-style: none; min-height: 56px; }
.person-row::-webkit-details-marker { display: none; }
.person-row:hover { background: var(--hover); }
.person-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.person details[open] > .person-row { background: var(--accent-soft); }
.person.is-off .who-text strong { color: var(--muted); }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who-text strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-cell { min-width: 0; display: flex; }
.who-role { display: none; }
.c-reach, .c-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-btn { pointer-events: none; }
.person details[open] .manage-btn { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.person-detail { padding: 4px 20px 18px 52px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border-top: 1px solid var(--line); }
dl.person-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; margin: 12px 0 0; }
dl.person-kv dt { font-size: 12px; font-weight: 600; color: var(--muted); }
dl.person-kv dd { margin: 2px 0 0; font-size: 14px; }
.person-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.row-actions.start { justify-content: flex-start; }
.pending-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 20px; }
.pending-row .row-text { flex: 1 1 220px; }
.invite-box > summary, .fold-box > summary { cursor: pointer; list-style: none; }
.invite-box > summary::-webkit-details-marker, .fold-box > summary::-webkit-details-marker { display: none; }
.invite-box:not([open]) > summary, .fold-box:not([open]) > summary { border-bottom: 0; }
.invite-box > summary h2::after, .fold-box > summary h2::after { content: '+'; margin-left: 10px; color: var(--muted); font-weight: 400; }
.invite-box[open] > summary h2::after, .fold-box[open] > summary h2::after { content: '−'; }
.invite-box[open] { border-color: var(--accent); }
@container people (max-width: 760px) {
  .people-head, .person-row { grid-template-columns: minmax(0, 2fr) minmax(84px, 1fr) minmax(96px, 1fr) minmax(0, 1.3fr) auto; }
  .c-last { display: none; }
}
@container people (max-width: 680px) {
  .people-head, .person-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding-inline: 14px; }
  .c-reach, .people-head .c-role { display: none; }
  .person-row .c-role { display: none; }
  .who-role { display: block; color: var(--ink); }
  .person-detail { padding: 4px 14px 16px; }
}
@container people (max-width: 420px) {
  .people-head { display: none; }
  .person-row { grid-template-columns: minmax(0, 1fr) auto; }
  .person-row .c-manage { display: none; }
}
/* Phone portfolio: add or pick a client straight away; the totals shrink to one compact block. */
@media (max-width: 767px) {
  .pf-page .head { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .pf-page .head .eyebrow, .pf-page .pf-manage { display: none; }
  .pf-page .head .actions { margin-left: auto; }
  .pf-page > .head { order: -3; } .pf-page > .pf-tabs { order: -2; } .pf-page > .pf-intent { order: -2; }
  .pf-page { gap: 14px; }
  .pf-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .pf-summary .stat { padding: 8px 10px; gap: 4px; border-radius: 10px; }
  .pf-summary .stat-label { font-size: 11px; line-height: 1.2; }
  .pf-summary .stat-value { font-size: 20px; }
  .pf-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
  .pf-tools .grow { grid-column: 1 / -1; }
  .pf-tools select { width: 100%; }
  .pf-empty .steps-num { display: none; }
}
@media (min-width: 1280px) { .menu-platform .label { white-space: nowrap; } .menu-platform { gap: 8px; } }
.subnav-ctx { padding-left: 12px; }
/* Table headings stay on one line; a table wider than its box scrolls inside the box. */
th { white-space: nowrap; }

/* Compact icon rail (Nov 10, second pass): icons only, 64 px. Each label is still the link's
   text (so screen readers and keyboard users get it) and shows beside the icon as a tooltip on
   hover and keyboard focus. Nothing wraps, nothing scrolls inside the rail. */
@media (min-width: 768px) and (max-width: 1279px) {
  :root { --rail-w: 64px; }
  .sidebar { overflow: visible; padding: 10px 8px; gap: 8px; }
  .menu a, .menu-platform { flex-direction: row; justify-content: center; min-height: 44px; height: 44px; padding: 0; gap: 0; }
  .menu .label, .menu-platform .label, .me-name .tip, .theme-form .tip {
    position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); z-index: 90;
    padding: 5px 9px; border-radius: 6px; background: var(--ink); color: var(--bg); box-shadow: var(--elev-2);
    font-size: 12.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow-wrap: normal;
    opacity: 0; pointer-events: none; transition: opacity .12s;
  }
  .menu a:hover .label, .menu a:focus-visible .label, .menu-platform:hover .label, .menu-platform:focus-visible .label { opacity: 1; }
  .menu a .count, .menu-platform .count { top: 5px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
  .menu-platform { border: 1px dashed var(--line-strong); }
  .menu-wrap { gap: 10px; }
  .me { gap: 4px; padding-top: 8px; }
  .me .icon-btn { width: 40px; height: 40px; }
  .side-top > .ws { min-height: 40px; }
}
@media (min-width: 768px) and (max-width: 1279px) and (prefers-reduced-motion: reduce) { .menu .label { transition: none; } }
@media (min-width: 768px) and (max-width: 1279px) and (max-height: 640px) { .menu a, .menu-platform { height: 38px; min-height: 38px; } .me .icon-btn { width: 34px; height: 34px; } }

/* Insights dashboards and the Report Builder (Nov 10) */
.dash { gap: 18px; }
.dash-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-tabs a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; background: var(--surface); }
.dash-tabs a:hover { color: var(--ink); border-color: var(--line-strong); }
.dash-tabs a[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dash-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; justify-content: space-between; }
.dash-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.dash-filters label, .rf-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dash-filters select, .dash-filters input, .rf-row select, .rf-row input { min-height: var(--ctl); padding: 6px 10px; font-size: 14px; width: auto; }
.save-view { position: relative; }
.save-view > summary { list-style: none; cursor: pointer; }
.save-view > summary::-webkit-details-marker { display: none; }
.save-view[open] > form { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); width: min(340px, calc(100vw - 32px)); padding: 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: var(--elev-2); }
.report-preview .save-view[open] > form { right: auto; left: 0; }
.saved-views { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); text-decoration: none; background: var(--surface); }
.chip-link.is-on { border-color: var(--accent); background: var(--accent-soft); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--elev-1); min-width: 0; }
a.kpi:hover { border-color: var(--accent); color: var(--ink); }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.kpi-note { font-size: 12.5px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.dash-grid > .box { margin: 0; }
.dash-grid > .span-all { grid-column: 1 / -1; }
.dash-sections > p.span-all { margin: 0; }
.arrange > summary { list-style: none; cursor: pointer; }
.arrange > summary::-webkit-details-marker { display: none; }
.arrange-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 6px 16px; }
.arrange-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.arrange-list .check { flex: 1 1 auto; min-width: 0; }
.arrange-pos select { min-height: 32px; padding: 2px 8px; width: auto; }
.recs .rec { display: flex; align-items: center; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }
.recs .rec .row-text { flex: 1 1 260px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--line-strong); }
.rec-high .rec-dot { background: var(--pink-brand); }
.rec-mid .rec-dot { background: var(--warn-line); }
.rec-low .rec-dot { background: var(--accent); }
ul.status-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.status-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
ul.status-list li strong { margin-left: auto; }
.status-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--line-strong); }
.st-approved { background: var(--good); } .st-in_review { background: var(--accent); } .st-changes { background: var(--warn-line); } .st-draft { background: var(--line-strong); } .st-archived { background: var(--line); }
.meter-sm { display: inline-block; width: 72px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.meter-sm .pf-fill { height: 100%; display: block; }
.about-numbers > summary { cursor: pointer; list-style: none; }
.about-numbers > summary::-webkit-details-marker { display: none; }
.about-numbers:not([open]) > summary { border-bottom: 0; }
dl.kv.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 20px; }
.dash-table td, .report-table td { white-space: nowrap; }
.report-table tr.is-total th, .report-table tr.is-total td { font-weight: 600; background: var(--surface-2); }
.report-table th[scope="row"] { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 500; }
.report-layout { display: flex; flex-direction: column; gap: 20px; }
.report-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--elev-1); }
.rf-step { border: 0; margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rf-step legend { padding: 0 0 6px; font-weight: 600; font-size: 15px; }
.rf-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.choice.compact { padding: 10px 12px; gap: 4px; flex: 1 1 200px; }
.rf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.rf-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.rf-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.rf-checks .check { font-weight: 400; font-size: 14px; flex-direction: row; align-items: center; gap: 6px; }
.rf-scroll { max-height: 180px; overflow-y: auto; flex-direction: column; flex-wrap: nowrap; }
.rf-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 767px) {
  .dash-table .opt { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi-value { font-size: 22px; }
  .dash-tabs { gap: 6px; }
  .dash-tabs a { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
  .dash-filters { width: 100%; }
  .dash-filters label { flex: 1 1 140px; }
  .dash-filters select, .dash-filters input { width: 100%; }
}
/* Printable report */
.print-page { background: #fff; color: #0B1726; }
.print-bar { display: flex; gap: 10px; justify-content: flex-end; }
@media print {
  .no-print, .sidebar, .topbar, .bottomnav, .trialbar { display: none !important; }
  body, .print-page { background: #fff !important; color: #000 !important; }
  .box, .tablewrap { box-shadow: none !important; border-color: #ccc !important; }
  .print-report { max-width: none; padding: 0; }
  .report-table td, .report-table th { white-space: normal; }
}
.report-layout > .box, .report-layout > details.box, .dash > .box, .dash > details.box { flex: none; }
.report-meta dl.kv dd { font-size: 14px; }
.report-edit > summary { cursor: pointer; list-style: none; }
.report-edit > summary::-webkit-details-marker { display: none; }
.report-edit:not([open]) > summary { border-bottom: 0; }
.report-edit .report-form { border: 0; box-shadow: none; padding: 0; }
.snap-note { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: 13.5px; }
.snap-note.now { background: var(--accent-soft); border-color: var(--accent); }


/* Review > Impact */
.impact-list { display: grid; gap: 0; }
.impact-item { display: grid; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--line); }
.impact-item:first-child { border-top: 0; }
.impact-item.sev-high { box-shadow: inset 3px 0 0 var(--pink); }
.impact-item.sev-medium { box-shadow: inset 3px 0 0 var(--warn-line); }
.impact-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; justify-content: space-between; }
.impact-head .row-text { min-width: 0; flex: 1 1 240px; }
.impact-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.impact-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line-strong); background: var(--hover); font-size: 14px; overflow-wrap: anywhere; }
.impact-quote mark { background: var(--accent-soft); color: var(--ink); border-radius: 3px; }
.impact-proposal { display: grid; gap: 8px; }
.impact-proposal .ba { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.impact-proposal .ba > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; overflow-wrap: anywhere; }
.impact-proposal .ba p { margin: 4px 0 0; }
.impact-item .keep[open] form { margin-top: 8px; }

/* Platform admin: a header at every width with the way back to NOLSEM. */

/* Branding preview: the organization as the menu shows it, in each appearance (fixed colours,
   so both show whatever appearance the page is in). */
.brand-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.brand-preview { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 14px; border-radius: var(--r); border: 1px solid; }
.brand-preview[data-theme-preview="light"] { background: #FFFFFF; border-color: #E6E8EC; color: #0B1726; }
.brand-preview[data-theme-preview="dark"] { background: #031A33; border-color: #173659; color: #F4F6FA; }
.bp-org { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; padding-left: 10px; border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 22%, transparent); }
.bp-mark { width: 28px; height: 28px; flex: none; border-radius: 7px; font-size: 11px; }
.bp-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-label { font-size: 11.5px; opacity: .7; }
/* Printable reports: the organization's logo, when chosen; the client's mark beside its name. */
.print-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid #E6E8EC; }
.print-brand .pb-org { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #5E6A78; }
.print-brand .pb-org img { height: 36px; width: auto; max-width: 160px; object-fit: contain; }
.print-brand .pb-nolsem { height: 18px; width: auto; }

/* Reports: one layout for the preview, snapshots and printing. */
.rep { display: flex; flex-direction: column; gap: 14px; padding: 0 20px 18px; }
.rep-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.rep-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rep-title h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.rep-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.rep-group { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rep-group + .rep-group { padding-left: 14px; border-left: 1px solid var(--line); }
.rep-kind { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.rep-kind strong { color: var(--ink); }
.rep-kind.snap strong { color: var(--warn); }
.rep-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; font-size: 13.5px; color: var(--muted); }
.rep-meta span + span::before { content: "·"; margin: 0 8px; color: var(--line-strong); }
.rep-meta span:first-child { color: var(--ink); font-weight: 600; }
.rep-summary { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.rep-summary li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.rs-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rs-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.rs-note { font-size: 12px; color: var(--muted); }
.rep-table-wrap { margin: 0 -20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rep-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.report-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.report-table tr.is-total th:first-child { background: var(--surface-2); }
.report-table thead th { vertical-align: bottom; white-space: normal; min-width: 92px; max-width: 150px; line-height: 1.3; }
.report-table thead th:first-child { min-width: 150px; }
.report-table td { font-variant-numeric: tabular-nums; }
.th-l { margin-right: 4px; }
.def-link { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; vertical-align: 1px; }
.def-link:hover, .def-link:focus-visible { color: var(--accent); border-color: var(--accent); }
.rep-empty { padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--surface-2); }
.rep-empty p { margin: 0 0 4px; }
.rep-defs { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rep-defs > summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px; padding: 0 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.rep-defs-in { display: grid; gap: 12px; padding: 4px 14px 14px; }
.rep-defs .defs > div:target, .rep-defs .defs > div.is-hl { background: var(--accent-soft); border-radius: 6px; }
.rep-scope { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
/* Phones: each row becomes a short list, figure by figure; nothing scrolls sideways. */
@media (max-width: 640px) {
  .rep { padding: 0 14px 14px; }
  .rep-head { padding: 14px; }
  .rep-group + .rep-group { padding-left: 0; border-left: 0; }
  .rep-table-wrap { margin: 0; border: 0; overflow: visible; }
  .report-table, .report-table tbody, .report-table tr, .report-table th, .report-table td { display: block; width: 100%; }
  .report-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .report-table tr { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 6px 12px; background: var(--surface); }
  .report-table tr.is-total { background: var(--surface-2); }
  .report-table th[scope="row"] { position: static; padding: 6px 0; font-weight: 600; background: none; border: 0; }
  .report-table td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; border-top: 1px solid var(--line); white-space: normal; }
  .report-table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
}
@media print { .def-link, .rep-actions { display: none !important; } .rep-defs { border: 0; } .rep-defs > summary { padding: 0; } }

/* Intelligence overview */
.intel-id-head { display: flex; align-items: center; gap: 14px; }
.intel-id-head .brand-mark.big { width: 56px; height: 56px; flex: none; border-radius: 12px; font-size: 18px; }
.intel-id-head .stack { flex: 1 1 auto; min-width: 0; }
.intel-id-name { margin: 0; font-size: 22px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.intel-summary { margin: 0; font-size: 15px; line-height: 1.55; max-width: 68ch; }
.intel-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px 20px; }
.intel-facts dd { margin: 0; font-size: 14px; }
.small.block { display: block; }
.ready-meter { display: block; width: 100%; height: 8px; }
.ready-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 6px 14px; margin: 0; padding: 0; }
.ready-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ready-dot { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: 11px; font-weight: 700; }
.ready-list .is-done .ready-dot { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.ready-list .is-missing { color: var(--muted); }
.overview-grid { align-items: start; }
.ov-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ov-side > .box { margin: 0; flex: none; }
/* The printable page: the whole table on the page, never cut at the edge. */
.print-page .rep-table-wrap { overflow: visible; }
.print-page .report-table { width: 100%; table-layout: auto; }
.print-page .report-table th, .print-page .report-table td { min-width: 0; max-width: none; padding: 8px 6px; font-size: 12.5px; white-space: normal; }
.print-page .report-table thead th:first-child { min-width: 0; }
.print-page .report-table th:first-child { position: static; }

/* Uploads: one drop zone everywhere, the choice page, supporting material */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 132px; padding: 20px 16px; border: 2px dashed var(--line); border-radius: 12px; background: var(--surface); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone .dz-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone .dz-text { font-size: 15px; }
.dropzone .dz-text strong { color: var(--accent); }
.dropzone .dz-name:not(:empty) { font-weight: 600; color: var(--ink); word-break: break-all; }
@media (hover: none) { .dropzone .dz-drop { display: none; } }
.up-grid { align-items: flex-start; }
.up-main { flex: 3 1 420px; min-width: 0; }
.up-preview { flex: 2 1 320px; min-width: 0; max-height: 80vh; overflow: auto; }
.up-choices { grid-template-columns: 1fr; }
.up-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.up-notes { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; list-style: disc; }
.up-render { font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.up-render h1 { font-size: 22px; } .up-render h2 { font-size: 18px; } .up-render h3 { font-size: 16px; }
.up-render ul, .up-render ol { padding-left: 22px; }
.up-render blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.up-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; min-width: 0; }
.up-file a { overflow-wrap: anywhere; }
.proj-main { flex: 3 1 420px; min-width: 0; }
.start-box { gap: 10px; }
.start-opt { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); }
.start-opt[open] { border-color: var(--accent); }
.start-opt > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; cursor: pointer; list-style: none; }
.start-opt > summary::-webkit-details-marker { display: none; }
.start-opt > :not(summary) { margin: 0 14px 14px; }
.start-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; }
.start-books { display: flex; flex-direction: column; gap: 2px; }
.review-upload { margin-top: 8px; }
.up-main > .box, .proj-main > .box { flex: none; }
.up-render > * { margin: 0 0 10px; }
.up-render > :is(h1, h2, h3, h4) { margin-top: 18px; line-height: 1.25; }
.up-render > :first-child { margin-top: 0; }
form:has(input[name=do][value=review]:checked) .up-fields, form:has(input[name=do][value=version]:checked) .up-fields { display: none; }
form:has(input[name=do][value=reference]:checked) .up-fields > label:is(:nth-child(1), :nth-child(2)) { display: none; }

/* Report Builder: filters in groups of chips, the filters in use, one action panel at a time */
.rf-filters .rf-optional { font-weight: 400; color: var(--muted); margin-left: 6px; }
.rf-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px 20px; }
.rf-groups-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rf-group { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; }
.rf-group > legend { padding: 0 4px; margin-left: -4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.rf-group .rf-clear { position: absolute; top: -9px; right: 10px; padding: 0 6px; background: var(--surface); font-size: 12.5px; }
.rf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-chips.rf-scroll { max-height: 168px; overflow-y: auto; align-content: flex-start; flex-direction: row; flex-wrap: wrap; }
.rf-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px 4px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink); background: var(--surface); cursor: pointer; }
.rf-chip input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.rf-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.rf-chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.rf-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--hover); }
.rf-active .rf-label { margin: 0; }
.rf-active-list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 200px; min-width: 0; }
.rf-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; font-size: 13px; }
.rf-tag:hover { border-color: var(--accent); }
.report-preview .rep-head { position: relative; }
.rep-act { position: static; }
.rep-act > summary { list-style: none; cursor: pointer; }
.rep-act > summary::-webkit-details-marker { display: none; }
.rep-act[open] > summary { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.rep-act > .rep-panel { position: absolute; z-index: 40; right: 20px; top: calc(100% - 4px); width: min(420px, calc(100% - 40px)); max-height: min(70vh, 560px); overflow: auto; padding: 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: var(--elev-2); display: flex; flex-direction: column; gap: 10px; }
.rep-panel .stackform { display: flex; flex-direction: column; gap: 10px; }
.rep-panel input[type=text], .rep-panel select { width: 100%; }
@media (max-width: 640px) { .rep-act > .rep-panel { left: 12px; right: 12px; width: auto; } .rf-group { padding: 10px; } }
/* Metric definitions: one block per metric, with what, coverage, source and limits */
.def-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 0 24px; }
.def-item { padding: 12px 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; border-radius: 6px; }
.def-h { margin: 0; font-size: 14.5px; font-weight: 650; color: var(--ink); line-height: 1.3; }
.def-what { margin: 0; font-size: 14px; line-height: 1.5; }
.def-meta { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; font-size: 12.5px; color: var(--muted); }
.def-meta div { display: contents; }
.def-meta dt { font-weight: 600; }
.def-meta dd { margin: 0; overflow-wrap: anywhere; }
.def-item:target, .def-item.is-hl { background: var(--accent-soft); }
.def-scope-h { padding-top: 12px; border-top: 1px solid var(--line); }
@media print { .def-list { grid-template-columns: 1fr 1fr; } .def-item { break-inside: avoid; } .rep-panel, .rep-act { display: none !important; } }
.rf-chip { flex-direction: row; }
.rf-chip input[type=checkbox] { min-height: 0; flex: none; }
/* Setup pages */
.setup-title { display: flex; align-items: center; gap: 12px; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.setup-main, .setup-side { min-width: 0; }
.setup-main > .box, .setup-side > .box, .setup-main > details.box { flex: none; }
.next-box { border-color: var(--accent); }
.setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: step; }
.setup-step { counter-increment: step; display: flex; flex-direction: column; gap: 6px; padding: 14px 0 14px 40px; border-top: 1px solid var(--line); position: relative; }
.setup-step:first-child { border-top: 0; }
.setup-step::before { content: counter(step); position: absolute; left: 0; top: 13px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--hover); color: var(--muted); }
.setup-step.is-done::before { content: "✓"; background: var(--good-soft); color: var(--good); }
.setup-step.is-current::before { background: var(--accent); color: var(--on-accent); }
.setup-step .actions { margin-top: 2px; }
.learned { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.learned li { font-size: 12.5px; padding: 2px 10px; border-radius: 999px; background: var(--hover); color: var(--ink); }
.setup-side .learned { flex-direction: column; align-items: flex-start; }
.model-choices { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.model-next { color: var(--accent-strong); }
.model-plan { display: block; color: var(--warn); }
.choice .model-plan { margin-top: 2px; }
.ca-box { border-left: 3px solid var(--warn-line); }
.pf-limit { align-self: center; max-width: 34ch; }
.pf-setup { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.setup-card { border-color: var(--accent); }
.price-box { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 12px 14px; }
@media (max-width: 1023px) { .setup-grid { grid-template-columns: minmax(0, 1fr); } }
/* Setup view switch, milestones, quick profile, the access note */
.mode-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.mode-switch > .small { padding: 0 8px 0 10px; }
.mode-switch .seg { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.mode-switch .seg.is-on { background: var(--accent-soft); color: var(--accent-strong); }
.mode-switch .seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.ms { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ms-dot { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; border: 2px solid var(--line-strong); }
.ms.is-done .ms-dot { background: var(--good); border-color: var(--good); }
.quick-profile { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.quick-profile > summary { cursor: pointer; }
.quick-profile[open] > summary { margin-bottom: 10px; }
.access-note { padding: 8px 10px; border-radius: var(--r-sm); background: var(--hover); }
.setup-list.is-quick .setup-step { padding-block: 10px; }
.gap-box { padding: 14px 16px; border: 1px solid var(--line-strong); border-left: 4px solid var(--warn, #b7791f); border-radius: var(--r); background: var(--surface); }
.gap-note { color: var(--warn-ink, #8a5a00); font-weight: 500; }
ul.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 0; padding: 0; }
.mode-switch .seg { display: inline-flex; align-items: center; justify-content: center; line-height: 1; height: 32px; }
.mode-switch > .small { line-height: 1; }
ul.learned { flex-direction: row; flex-wrap: wrap; padding-left: 0; gap: 6px; align-items: flex-start; }
.setup-side ul.learned { flex-direction: column; }

/* Seats (S2, read-only inventory on People and access; shadow summary in Platform admin) */
.seat-box { margin-bottom: 16px; }
.seat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr)); gap: 10px; }
.seat-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); min-width: 0; }
.seat-tile strong { font-size: 20px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

/* Navigation (Nov 11, second direction): the organization block is identity only; Clients and
   Find a client (Ctrl+K) are how clients are found; one staff-only Platform Administration entry,
   set apart at the bottom of the menu. Inside Platform Administration: the same shell, its own
   section menu, and a breadcrumb back to the Overview at every width. */
.ctx-shield { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.ctx-shield svg { width: 17px; height: 17px; }
.staff-pill { font-size: 11px; }
.menu-platform.is-return { border-style: solid; }
.admin-crumbs { border: 0; background: none; }
.admin-crumbs ol { padding-inline: 0; min-height: 0; font-size: 13px; }
.admin-crumbs li:first-child a { padding-left: 0; }
.admin-jump { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.admin-jump .set-row { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.topbar-platform { flex: 1 1 auto; }
.topbar-platform .short { display: none; }
.topbar-platform .ctx-shield { width: 26px; height: 26px; }
.ctx-back { flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 46vw; }
.ctx-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-back svg { width: 16px; height: 16px; flex: none; }
.platform-id .org-name { white-space: normal; line-height: 1.2; }
.menu-staff { padding-top: 10px; border-top: 1px solid var(--line); }
.menu-staff .menu-platform { margin-top: 0; }
.menu-platform .staff-pill { margin-left: auto; flex: none; }
@media (min-width: 1280px) { .menu-staff .menu-platform .label { white-space: normal; line-height: 1.25; } }
/* The breadcrumb stays at every width in Platform Administration (it is the way to Overview on a
   phone and in the rail, where the section menu is icons or a bottom bar). */
.ctx-crumbs.admin-crumbs { display: block; }
.admin-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; list-style: none; margin: 0; padding: 0; }
.admin-crumbs li:first-child a { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 500; color: var(--accent); }
.admin-crumbs li:first-child a[aria-current="page"] { color: var(--muted); font-weight: 400; }
.admin-crumbs li:first-child a:not([aria-current]) svg { width: 15px; height: 15px; }
/* Find a client: a dialog near the top of the screen, over a dimmed page. */
dialog.finder { padding: 0; border: 0; background: transparent; width: min(440px, calc(100vw - 24px)); max-width: none; margin: 72px auto auto; overflow: visible; }
dialog.finder::backdrop { background: rgba(0, 21, 43, 0.38); }
dialog.finder .switch-panel { position: static; width: auto; left: auto; right: auto; top: auto; max-height: min(520px, calc(100vh - 96px)); }
.finder-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.finder-head h2 { margin: 0; font-size: 15px; }
.finder-scope { color: var(--muted); padding: 0 2px; }
/* The Clients page: the search first and largest, then recent clients. */
.pf-search { display: flex; flex-direction: column; gap: 6px; }
.pf-search-label { font-weight: 600; font-size: 14px; }
.pf-search-row { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--surface); min-width: 0; }
.pf-search-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pf-search-icon { display: inline-flex; color: var(--muted); flex: none; }
.pf-search-row input { flex: 1 1 auto; min-width: 0; min-height: 40px; border: 0; padding: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; box-shadow: none; }
.pf-search-row .btn { flex: none; }
@media (max-width: 479px) { .pf-search-row .switch-kbd { display: none; } }
.pf-recent { display: flex; flex-direction: column; gap: 4px; }
.pf-recent .switch-label { padding: 0; margin: 0; }
.pf-recent .pf-recent-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pf-recent-item { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 260px; padding: 4px 12px 4px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.pf-recent-item:hover, .pf-recent-item:focus-visible { border-color: var(--line-strong); background: var(--hover); }
.pf-recent-item .brand-mark { width: 30px; height: 30px; }
.pf-recent-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pf-recent-item .count { flex: none; }
/* Inside a client the top bar reads Clients / <client> / <area>; the area drops on small phones. */
/* On small phones the client's name gives way (ellipsis) so the section stays readable. */
@media (max-width: 479px) { .topbar-crumbs .topbar-client { flex: 1 1 auto; min-width: 0; } .topbar-area { flex: none; } }
/* With Ask NOLSEM and the bell in the header (Nov 12), the smallest phones keep the client's
   name: the area and the way up to Clients are on the page itself and in the bottom bar. */
@media (max-width: 379px) { .topbar-crumbs .topbar-up, .topbar-crumbs .sep, .topbar-crumbs .topbar-area { display: none; } }
.topbar-area { color: var(--muted); white-space: nowrap; }
@media (max-width: 1279px) {
  .menu-staff { padding-top: 8px; }
}
@media (max-width: 767px) {
  .topbar-platform strong { font-size: 13.5px; }
  .topbar-platform .staff-pill { display: none; }
  .topbar-platform .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar-platform .short { display: inline; }
}
/* Rail tooltips (768 to 1279 px): the rail sits above the top bar and the page, so a label shown
   beside an icon is never behind them; Ask NOLSEM, Find a client and the More sheet still sit
   above the rail. */
@media (min-width: 768px) and (max-width: 1279px) {
  /* The rail scrolls when the window is short (a small laptop, or 150 percent zoom) rather than
     cutting off its last items. Its tooltips are fixed to the window, beside the item they belong
     to (public/desk.js sets --tip-y), so the rail's scrolling never clips them. */
  .sidebar { z-index: 45; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
  .sidebar .menu .label, .sidebar .menu-platform .label { position: fixed; left: calc(var(--rail-w) + 10px); top: var(--tip-y, -200px); max-width: calc(100vw - var(--rail-w) - 24px); }
  .menu-staff { padding-top: 6px; margin-top: -2px; }
  .menu-wrap { gap: 6px; }
  .me { padding-top: 6px; }
  .me .icon-btn { width: 36px; height: 36px; }
}
/* Natural Voice evaluation: the two answers side by side, stacked on narrow screens. */
.nv-cases { list-style: none; margin: 0; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.nv-cases details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.nv-cases summary { padding: 10px 12px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.nv-ask { padding: 0 12px; }
.nv-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; padding: 10px 12px 12px; }
.nv-pair > div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nv-side { display: flex; flex-direction: column; gap: 6px; }
.nv-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
@media (max-width: 400px) {
  .ctx-back .ctx-back-to { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar-platform .ctx-shield { display: none; }
}
.nv-run { flex: none; }
.nv-run .btn { white-space: nowrap; }

/* Ask NOLSEM (A2): one button in the menu and the top bar; a panel beside the page. On wide
   screens the page makes room for it; below that it lies over the page, and on phones it fills
   the screen with its own close button. */
.menu-ask { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; position: relative; }
.menu-ask:hover, .menu-ask[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.menu-ask svg, .topbar-ask svg { flex: none; color: var(--accent); }
.menu-ask .label { flex-grow: 1; }
.menu-ask:focus-visible, .topbar-ask:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar-ask { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; flex: none; }
.topbar-ask[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
.ask-panel { position: fixed; z-index: 85; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); box-sizing: border-box; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: -18px 0 40px -28px rgba(0, 21, 43, 0.5); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.ask-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ask-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.ask-head h2 svg { color: var(--accent); }
.ask-head .icon-btn { font-size: 22px; line-height: 1; }
.ask-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ask-context { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.ask-conv { gap: 8px; flex-wrap: wrap; }
.ask-thread { display: flex; flex-direction: column; gap: 10px; }
.ask-thread .ai-msg { max-width: 100%; }
.ask-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ask-ideas .chip { font-size: 12.5px; }
.ask-composer textarea { min-height: 72px; }
.ask-switched { margin: 0; }
@media (min-width: 1280px) { body.ask-open:not(.ask-over):not(.ask-dock) .main-col { margin-right: 420px; } }
@media (min-width: 768px) and (max-width: 1279px) {
  .menu-ask { justify-content: center; min-height: 44px; height: 44px; padding: 0; gap: 0; }
  .menu-ask .label { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); z-index: 90; padding: 5px 9px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12.5px; white-space: nowrap; opacity: 0; pointer-events: none; }
  .menu-ask:hover .label, .menu-ask:focus-visible .label { opacity: 1; }
}
@media (min-width: 1280px) { .topbar-ask { display: none; } }
@media (max-width: 767px) {
  .ask-panel { width: 100vw; border-left: 0; }
  .topbar-ask .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar-ask { width: 38px; padding: 0; justify-content: center; }
  body.ask-open { overflow: hidden; }
}
.nv-case { padding: 0 12px 12px; }
.nv-case .nv-pair { padding: 0; }
.nv-facts td, .nv-facts th { vertical-align: middle; }
.fx-note { margin: 0 0 4px; }
.nv-col { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nv-choices { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 0; margin: 0; padding: 0; }
.nv-choice { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
.nv-choice input { margin: 0; width: auto; }

/* Charts (Nov 11): server-drawn SVG, colours from the theme, the numbers in a table below. */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 22px; }
.chart { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.chart-title { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.chart-period { font-size: 12.5px; color: var(--muted); }
.chart-takeaway { margin: 0; font-size: 13.5px; color: var(--ink-2, var(--ink)); }
.chart.is-kpi { justify-content: flex-start; }
.chart-kpi { margin: 4px 0 0; display: flex; flex-direction: column; gap: 2px; }
.chart-kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-kpi-label { font-size: 13px; color: var(--muted); }
.chart-svg .chart-line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .chart-line.s0 { stroke: var(--accent); } .chart-svg .chart-line.s1 { stroke: #2F9E8F; }
.chart-svg .chart-dot.s0 { fill: var(--accent); } .chart-svg .chart-dot.s1 { fill: #2F9E8F; }
.chart-svg .chart-label.is-link { fill: var(--accent); text-decoration: underline; }
.chart-svg a:focus-visible rect, .chart-svg a:focus-visible text { outline: 2px solid var(--accent); outline-offset: 2px; }
.spark { display: block; overflow: visible; } .spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linejoin: round; }
.chart-svg { max-width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .chart-bar.s0, .chart-key.s0 { fill: var(--accent); background: var(--accent); }
.chart-svg .chart-bar.s1, .chart-key.s1 { fill: #2F9E8F; background: #2F9E8F; }
.chart-svg .chart-track { fill: var(--surface-2); }
.chart-svg .chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-svg text { fill: var(--muted); font: 13px var(--sans, system-ui), sans-serif; }
.chart-svg .chart-label { fill: var(--ink); }
.chart-svg .chart-value { fill: var(--ink); font-weight: 600; }
.chart-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.chart-key { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chart-note { color: var(--muted); }
.chart-empty { margin: 0; padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); color: var(--muted); font-size: 13.5px; }
.chart-data summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.chart-data table { font-size: 13px; }
.chart-box .box-body { padding: 16px; }
.rep-charts { margin: 6px 0 14px; }
.usage-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chart-svg .chart-bar.s1, :root:not([data-theme="light"]) .chart-key.s1 { fill: #5CC8B8; background: #5CC8B8; } }
:root[data-theme="dark"] .chart-svg .chart-bar.s1, :root[data-theme="dark"] .chart-key.s1 { fill: #5CC8B8; background: #5CC8B8; }
/* Delegated session (src/attribution.js) */
.delegate-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--warn-soft); border-bottom: 1px solid var(--warn-line); font-size: 14px; }
/* Assistant access (Settings › Assistant access) */
.delegate-acts { display: inline-flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.aa-assure { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.aa-assure li { position: relative; padding-left: 28px; }
.aa-assure li::before { content: ""; position: absolute; left: 4px; top: .35em; width: 12px; height: 7px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.aa-steps { display: flex; flex-direction: column; gap: 16px; }
.aa-n { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; vertical-align: 1px; }
.aa-review { margin: 0; display: grid; gap: 12px; }
.aa-review dt { font-weight: 600; }
.aa-review dd { margin: 2px 0 0; color: var(--muted); }
.aa-on { border-left: 3px solid var(--warn); }
.aa-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px 0; }
.aa-table th[scope="row"] { font-weight: 600; }
.aa-actions summary { cursor: pointer; }
.aa-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; min-width: 14rem; }
.rows.plain { list-style: none; margin: 0; padding: 0; }

.aa-table td.nowrap { white-space: nowrap; }
.aa-table th[scope="row"] { font-size: 14px; letter-spacing: normal; text-transform: none; color: var(--ink); }
@media (max-width: 720px) {
  .aa-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .aa-table, .aa-table tbody, .aa-table tr, .aa-table th, .aa-table td { display: block; width: auto; }
  .aa-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .aa-table th[scope="row"], .aa-table td { padding: 2px 0; border: 0; }
  .aa-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  .aa-table td.aa-empty { display: none; }
  .aa-table td.nowrap { white-space: normal; }
}
.rev-def summary { cursor: pointer; font-size: 14px; }
.rev-def dl { margin: 10px 0 0; display: grid; gap: 10px; max-width: 72ch; }
.rev-def dt { font-weight: 600; font-size: 14px; }
.rev-def dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.ca-clients { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; min-width: 0; }
.ca-clients legend { padding: 0 0 6px; }
.ca-scope { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.ca-person:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.aa-journey { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
@media (max-width: 560px) {
  .delegate-bar { flex-wrap: nowrap; gap: 10px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
  .delegate-bar .db-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .delegate-bar .db-label { display: none; }
  .delegate-bar .delegate-acts a { display: none; }
  .delegate-bar .btn.small { white-space: nowrap; }
}
.delegate-bar .db-until { display: none; }
@media (max-width: 560px) { .delegate-bar .db-ends { display: none; } .delegate-bar .db-until { display: inline; } }
.plan.is-target, .plan:target { outline: 3px solid var(--accent); outline-offset: 2px; }
.plan-compare { margin: 0; color: var(--ink); }
.upgrade-box { border-left: 3px solid var(--accent); }
.test-pill { vertical-align: middle; font-size: 12px; }
.plan { scroll-margin-top: 32px; }
.invite-clients { grid-column: 1 / -1; }
.aa-points { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.intg-ai { padding-top: 8px; border-top: 1px solid var(--line); }
.intg-ai .intg-card { max-width: 720px; }
.intg-can { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
/* Contact sales */
.cs-wrap { max-width: 680px; }
.cs-back { display: inline-flex; gap: .4em; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.cs-back:hover, .cs-back:focus-visible { text-decoration: underline; }
.cs-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field-err { color: var(--pink); font-size: 13px; font-weight: 500; }
.field input[aria-invalid="true"] { border-color: var(--pink); }
.cs-more summary { cursor: pointer; font-size: 14px; }
.cs-more .field-row { margin-top: 12px; }
.cs-needs { white-space: pre-wrap; display: block; max-width: 40ch; }
.knows-table th[scope="row"] { font-size: 14px; text-transform: none; letter-spacing: normal; color: var(--ink); white-space: nowrap; }
.knows-table td { font-size: 14px; }
.knows-next { font-size: 14px; }
@media (max-width: 720px) {
  .knows-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .knows-table, .knows-table tbody, .knows-table tr, .knows-table th, .knows-table td { display: block; width: auto; }
  .knows-table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .knows-table th[scope="row"], .knows-table td { padding: 2px 0; border: 0; white-space: normal; }
}

/* Intelligence phase 1-3 (Nov 12): gaps for a request, website changes, record sources. */
.gaps-box { border: 1px solid var(--line); border-left: 4px solid var(--warn-line); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.gaps { display: grid; gap: 10px; }
.gaps li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.gaps li > .stack { min-width: 0; flex: 1 1 260px; }
.intel-card.update { border-left: 4px solid var(--warn-line); }
.intel-src { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 10px; }
.intel-src legend { font-weight: 600; padding: 0 4px; }

.kv-view dd { font-style: italic; }
.kv dd .change { display: block; margin-top: 2px; }
/* A box that opens and closes says so (Nov 12, round 22). A heading styled as a flex row loses the
   browser's triangle, so a closed box looked like a heading with nothing under it: the Google pilot
   panel was the case found. Every box heading that opens has a pointer and a chevron, and a closed
   box has no line under its heading. Team's invite and approver boxes keep their own + and −. */
details.box > summary.box-head { cursor: pointer; list-style: none; }
details.box > summary.box-head::-webkit-details-marker { display: none; }
details.box:not(.invite-box):not(.fold-box) > summary.box-head::after { content: ''; flex: none; width: 8px; height: 8px; margin: 0 4px 4px 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.box:not(.invite-box):not(.fold-box)[open] > summary.box-head::after { transform: rotate(-135deg); margin-bottom: -4px; }
details.box:not([open]) > summary.box-head { border-bottom: 0; }
details.box > summary.box-head:hover h2, details.box > summary.box-head:focus-visible h2 { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { details.box > summary.box-head::after { transition: none; } }
.home-details > summary { list-style: none; justify-content: space-between; }
.home-details > summary::-webkit-details-marker { display: none; }
.home-details > summary::after { content: ''; flex: none; width: 8px; height: 8px; margin: 0 4px 4px 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.home-details[open] > summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
/* Blind comparison (Nov 12): French labels read as the main text, the English beside them small. */
.nv-review-form tbody th { font-size: 14px; font-weight: 500; color: var(--ink); text-transform: none; letter-spacing: 0; }
.nv-review-form .nv-en { font-size: 12px; font-weight: 400; color: var(--muted); }
.nv-review-form legend { font-size: 14px; }
.nv-link-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; justify-content: flex-start; }
.nv-link-form label { display: flex; flex-direction: column; gap: 4px; }
/* Large lists (Nov 12): pager, filter bar, and tables that stack on small screens. */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.pager-links { display: flex; gap: 8px; }
.pager .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.filter-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 0; }
.filter-bar input[type=search] { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; width: min(100%, 260px); }
.filter-bar select { max-width: min(100%, 340px); }
.filter-bar .btn { min-height: 44px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row a, .chip-row span.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--ink); background: var(--surface); }
.chip-row a[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.split-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1280px) { .split-panel.has-detail { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); } }
.split-panel .detail-panel { position: sticky; top: var(--sticky-top); }
.split-panel .detail-panel .box-body > dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.split-panel .detail-panel .box-body > dl > dt { color: var(--muted); font-size: 13px; }
.split-panel .detail-panel .box-body > dl > dd { margin: 0; overflow-wrap: anywhere; }
.cat-pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2, var(--line)); color: var(--ink); white-space: nowrap; }
.cat-pill.security { background: var(--pink-soft); color: var(--pink); }
.cat-pill.admin { background: var(--accent-soft); color: var(--accent); }
.status-card { display: grid; gap: 10px; }
.status-card dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px 18px; margin: 0; }
.status-card dt { font-size: 12px; color: var(--muted); }
.status-card dd { margin: 2px 0 0; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .stack-table td { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 0 10px; align-content: start; border: 0; padding: 4px 12px; overflow-wrap: anywhere; white-space: normal; text-align: left; }
  .stack-table td > * { grid-column: 2; white-space: normal; }
  .stack-table td::before { content: attr(data-label); grid-row: 1 / span 4; color: var(--muted); font-size: 12px; }
  .split-panel .detail-panel { position: static; }
}
/* Security and audit (Nov 12). */
.audit-cats { border: 0; margin: 0; padding: 0; gap: 8px 18px; align-items: center; }
.audit-cats legend { float: left; margin-right: 6px; padding: 0; }
.audit-cats label.check { display: inline-flex; font-size: 14px; }
.audit-left-out { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); }
.inline-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; }
.audit-sec-hidden { color: var(--pink); font-weight: 600; }
.audit-table td { vertical-align: top; white-space: normal; }
.audit-table td[data-label="Action"] { min-width: 160px; }
.audit-table .cat-pill { white-space: normal; border-radius: 6px; }
.split-panel.has-detail .audit-table td { padding-left: 8px; padding-right: 8px; }
.audit-table td[data-label="Outcome"] { min-width: 110px; }
.audit-table tr.is-open td { background: var(--accent-soft); }
.audit-table .when { white-space: nowrap; }
.audit-group summary { cursor: pointer; }
.audit-group ol { margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 700px) { .audit-table .when { white-space: normal; } }
.split-panel > * { min-width: 0; }

.cell-note { display: block; }
.audit-cats { min-width: 0; }
.filter-bar label { max-width: 100%; }
@media (max-width: 700px) {
  .filter-bar label, .filter-bar select, .filter-bar input[type=search] { width: 100%; max-width: 100%; }
  .stack-table td > * { justify-self: start; max-width: 100%; }
}
.gp-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
@media (max-width: 700px) { .gp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gp-stats .stat-value { font-size: 26px; } }
/* Invite person (S4, Nov 12): numbered steps, then a preview. */
.wiz { max-width: 760px; }
.wiz > .wiz-step { flex: none; overflow: visible; border: 1px solid var(--line); margin: 0; min-width: 0; }
.wiz-legend { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; padding: 0 6px; }
.wiz-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; flex: none; }
.wiz-group { padding-top: 4px; }
.wiz-role { align-items: flex-start; gap: 10px; padding: 6px 0; }
.wiz-role input { margin-top: 3px; flex: none; }
.wiz-role .stack { min-width: 0; }
#invite-preview .actions { display: flex; flex-wrap: wrap; gap: 10px; }
#invite-preview .actions form { margin: 0; }
#proj-filter { margin-bottom: 4px; }

/* Notifications (S4, Nov 12): one place, the top right of the header at every width. Wide
   screens get a slim header with only the bell; the menu already names the place. */
@media (min-width: 1280px) {
  .topbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; min-height: 52px; box-sizing: border-box; padding-block: 7px; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); }
  .topbar > :not(.topbar-bell) { display: none; }
}
.topbar-bell { margin-left: auto; }
.topbar-ask + .topbar-bell, .ctx-back + .topbar-bell { margin-left: 0; }
.me-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; }
.me-bell:hover { background: var(--hover); color: var(--ink); }
.me-bell .count { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.notice-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notice-list li:last-child { border-bottom: 0; }
.notice-list .notice-text { min-width: 0; overflow-wrap: anywhere; }
.notice-list .is-new .notice-text { font-weight: 600; }
.notice-list .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.notice-list .small { grid-column: 1 / -1; }
.ca-table .ca-cell { justify-content: center; min-height: 44px; }
.ca-table th[scope="row"] { text-align: left; font-weight: 500; font-size: 14px; letter-spacing: normal; text-transform: none; color: var(--ink); }
.ca-table th[scope="row"] .small { font-weight: 400; color: var(--muted); }
@media (max-width: 700px) { .ca-table th[scope="row"] { display: block; width: 100%; box-sizing: border-box; padding: 8px 12px 4px; border: 0; } }
/* Narrow screens (Nov 12): the header keeps the place's name readable beside the bell; the way
   back from Platform Administration becomes an icon, still named for screen readers. */
@media (max-width: 480px) {
  .topbar.is-platform .ctx-back { width: 38px; height: 38px; padding: 0; justify-content: center; flex: none; }
  .topbar.is-platform .ctx-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Round 30: Content Creator choices and the Create page */
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row .chip-check, .chip-grid .chip-check { padding: 8px 12px; align-items: center; }
.lang-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); margin-bottom: 12px; }
.lang-box ul { margin: 0; }
.task-box textarea { width: 100%; min-height: 96px; font-size: 1.05rem; }
ul.start-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.start-grid > li { margin: 0; padding: 0; }
.start-grid > li::before { content: none; }
.start-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); text-decoration: none; }
.start-card:hover { border-color: var(--accent); background: var(--hover); color: var(--ink); }
.start-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.create-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.create-cols > section { min-width: 0; }
.app-list .row-link { align-items: flex-start; }
.sugg-box { padding: 12px 14px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--accent-soft); }
.private-box { padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r-sm); }
button.linkish { background: none; border: 0; padding: 0; color: var(--link, var(--accent)); text-decoration: underline; cursor: pointer; font: inherit; }
button.row-link.linkish { width: 100%; text-align: left; text-decoration: none; color: var(--ink); padding: 10px 12px; }

/* Round 31: Content Creator folds and pieces */
details.fold > summary { cursor: pointer; padding-block: 6px; }
details.fold > summary .h-sm { display: inline; }
fieldset.piece { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin: 8px 0 0; }
fieldset.piece legend { padding: 0 6px; }
@media (max-width: 600px) {
  .kind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kind-card { padding: 10px; }
  .kind-card .small:not(.gap-note) { display: none; }
}

/* Round 31: Create, the request first and the person's own work */
.create-main { display: grid; gap: 24px; align-items: start; }
.create-main.has-side { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .create-main.has-side { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }
.create-main > * { min-width: 0; }
.chip-ex { font: inherit; font-size: 14px; text-align: left; padding: 8px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip-ex:hover { border-color: var(--accent); background: var(--hover); }
.chip-ex:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.work-row { align-items: flex-start; }
.work-title { font-weight: 600; overflow-wrap: anywhere; }
.work-action { white-space: nowrap; font-size: 14px; color: var(--link, var(--accent)); }
@media (max-width: 480px) { .work-row { flex-direction: column; } .work-action { white-space: normal; } }
.sugg-box .linkbtn { align-self: flex-start; }
/* Create's App tabs stay in reach while a long brief scrolls (Round 31), below the sticky header
   where there is one. Focus is always visible; the active tab scrolls into view where the bar
   is wider than the screen (desk.js). */
.section-tabs a:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 4px; }
@media (min-width: 768px) { .section-tabs[data-area="create"] { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; } }
@media (min-width: 768px) and (max-width: 1279px) { .section-tabs[data-area="create"] { top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); } }
.create-primary > .box, .create-side > *, .task-box { flex: 0 0 auto; }

/* Freelancer client shares (Round 32, proposed plan; shown only on that plan) */
.share-wrap { overflow-x: auto; }
.share-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.share-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.share-table th, .share-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.share-table thead th { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.share-table input.num { width: 7.5em; }
.share-bar { display: block; width: 100%; max-width: 160px; height: 6px; margin-top: 6px; appearance: none; border: 0; border-radius: 3px; background: var(--line); overflow: hidden; }
.share-bar::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
.share-bar::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
.share-bar::-moz-progress-bar { background: var(--accent); border-radius: 3px; }

/* ---- Structured entry (Round 32): fields, sections, lists as rows, states ---------------- */
:root { --field-gap: 18px; --section-gap: 20px; }
/* States for every text control, so forms behave the same across the Apps. */
input[type=text]:hover:not(:focus):not(:disabled), input[type=url]:hover:not(:focus):not(:disabled), input[type=email]:hover:not(:focus):not(:disabled),
input[type=date]:hover:not(:focus):not(:disabled), input[type=number]:hover:not(:focus):not(:disabled), textarea:hover:not(:focus):not(:disabled), select:hover:not(:focus):not(:disabled) { border-color: var(--muted); }
select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-2); color: var(--muted); border-style: dashed; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=number] { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm); padding: 10px 12px; }

.entry-form { display: flex; flex-direction: column; gap: var(--section-gap); min-width: 0; }
.form-section { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 18px 20px 20px; margin: 0; min-width: 0; box-shadow: var(--elev-1); }
.form-section-h { float: left; width: 100%; padding: 0 0 12px; margin: 0 0 16px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); }
.form-section-h + * { clear: both; }
.form-section-intro { margin: -8px 0 14px; font-size: 13.5px; color: var(--muted); }
.form-grid { display: flex; flex-direction: column; gap: var(--field-gap); min-width: 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: var(--field-gap); min-width: 0; }
.form-row > .field { min-width: 0; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.field-tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.field-tag.req { color: var(--accent); }
.field-help { margin: -2px 0 2px; font-size: 13px; line-height: 1.45; color: var(--muted); max-width: 62ch; }
.field > input, .field > select, .field > textarea { width: 100%; }
.field > textarea { min-height: 0; font-size: 16px; font-weight: 400; line-height: 1.5; }
.field > input, .field > select { min-height: 44px; }
.field.is-invalid > input, .field.is-invalid > select, .field.is-invalid > textarea, .field.is-invalid .list-row:first-child input { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
.field-error { margin: 0; font-size: 13px; font-weight: 500; color: var(--pink); display: flex; gap: 6px; align-items: baseline; }
.field-error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--pink); color: var(--surface); font-size: 11px; font-weight: 700; }
.enhanced .nojs-only { display: none; }

/* Lists as rows */
.list-edit { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); padding: 10px; min-width: 0; }
.list-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: row; }
.list-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 36px; gap: 6px; align-items: center; counter-increment: row; }
.list-row.pair { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.4fr) 36px; }
.list-row::before { content: counter(row); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.list-row input { min-height: 40px; padding: 8px 12px; font-size: 15px; border-radius: var(--r-sm); }
.list-remove { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.list-remove:hover { background: var(--pink-soft); color: var(--pink); }
.list-remove:focus-visible, .list-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 28px; flex-wrap: wrap; }
.list-add { border: 1px dashed var(--line-strong); background: var(--surface); color: var(--accent); font: inherit; font-size: 14px; font-weight: 500; border-radius: var(--r-sm); padding: 7px 12px; min-height: 36px; cursor: pointer; }
.list-add:hover { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.list-add:active, .list-remove:active { transform: translateY(1px); }
.list-count { font-size: 12.5px; color: var(--muted); }

.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-actions .small { color: var(--muted); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Forms inside a record card or an Add box: lighter sections so cards don't nest heavily. */
.inline-edit .form-section, .add-box .form-section { box-shadow: none; background: var(--bg); }
.intel-form { gap: 16px; }
/* The rules editor's sections already sit in cards. */
.rules-form .form-grid { gap: var(--field-gap); }

@media (max-width: 560px) {
  .form-section { padding: 14px 14px 16px; }
  .list-row.pair { grid-template-columns: 22px minmax(0, 1fr) 36px; }
  .list-row.pair input + input { grid-column: 2; }
  .list-row.pair .list-remove { grid-row: 1; grid-column: 3; }
  .list-foot { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .list-add:active, .list-remove:active { transform: none; } }
.list-row .list-input { font: inherit; font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm); padding: 8px 12px; width: 100%; min-height: 40px; }
.list-row textarea.list-input { resize: none; overflow: hidden; field-sizing: content; }
.list-row .list-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.list-row .list-input:hover:not(:focus) { border-color: var(--muted); }
.list-row { align-items: start; }
.list-row::before { padding-top: 11px; }
.list-remove { margin-top: 2px; }
.field.is-invalid .list-row:first-child .list-input { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
#client-limits, #client-limits form { min-width: 0; }
@media (max-width: 760px) {
  .share-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .share-table, .share-table tbody, .share-table tr, .share-table th, .share-table td { display: block; width: 100%; }
  .share-table tr { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 10px; }
  .share-table th, .share-table td { border: 0; padding: 4px 0; }
  .share-table th[scope=row] { font-size: 15px; padding-bottom: 8px; }
  .share-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
}
.share-table tbody th { font-size: 15px; font-weight: 600; color: var(--ink); }
.share-table tbody tr:last-child > * { border-bottom: 0; }

/* NOLSEM AI requests on Plan and billing (Round 33) */
.usage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.usage-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.usage-figures > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.usage-num { font-size: 26px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.15; }
.usage-num.usage-date { font-size: 20px; }
.usage-cap { font-size: 13px; color: var(--muted); }
.usage-bar { display: block; width: 100%; height: 8px; appearance: none; border: 0; border-radius: 4px; background: var(--line); overflow: hidden; }
.usage-bar::-webkit-progress-bar { background: var(--line); border-radius: 4px; }
.usage-bar::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
.usage-bar::-moz-progress-bar { background: var(--accent); border-radius: 4px; }
.usage-bar.at-80::-webkit-progress-value, .usage-bar.at-90::-webkit-progress-value { background: var(--warn-line); }
.usage-bar.at-80::-moz-progress-bar, .usage-bar.at-90::-moz-progress-bar { background: var(--warn-line); }
.usage-bar.at-100::-webkit-progress-value { background: var(--pink); }
.usage-bar.at-100::-moz-progress-bar { background: var(--pink); }
.usage-notes { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); }
.hard-check { font-size: 14px; font-weight: 500; white-space: nowrap; }

.share-wrap { max-width: 100%; }

/* ---- Content Creator (Round 34): a writing workspace, not a form ------------------------- */
.cc-form { gap: 16px; }
.cc-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: var(--elev-1); }
.cc-h { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); }
.cc-suggested { flex: none; background: var(--surface-2, var(--surface)); }
.cc-suggested ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.cc-n { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.cc-step > textarea { min-height: 120px; font-size: 16px; line-height: 1.5; }
.fmt-set { margin: 0; }
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr)); gap: 8px; }
.fmt-tile { position: relative; display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 14.5px; line-height: 1.25; transition: border-color .12s, background-color .12s; }
.fmt-tile input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.fmt-tile input:disabled { cursor: not-allowed; }
.fmt-check { width: 18px; height: 18px; flex: none; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--surface); display: grid; place-items: center; }
.fmt-tile:hover:not(.off):not(.full) { border-color: var(--accent); }
.fmt-tile:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.fmt-tile:has(input:checked) .fmt-check { background: var(--accent); border-color: var(--accent); }
.fmt-tile:has(input:checked) .fmt-check::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px); }
.fmt-tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.fmt-tile.off, .fmt-tile.full { cursor: not-allowed; color: var(--muted); background: var(--surface-2); border-style: dashed; }
.lang-set { margin: 4px 0 0; }
.plan-list { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.plan-row details { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.plan-row details[open] { border-color: var(--line-strong); }
.plan-row summary { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; list-style: none; min-height: 44px; }
.plan-row summary::-webkit-details-marker { display: none; }
.plan-row summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.plan-name { font-weight: 600; font-size: 14.5px; }
.plan-sum { font-size: 13.5px; color: var(--muted); min-width: 0; }
.plan-change { font-size: 13px; color: var(--accent); font-weight: 500; }
.plan-row details[open] .plan-change { visibility: hidden; }
.plan-fields { padding: 4px 14px 14px; }
.cc-go { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--elev-2); }
.cc-estimate { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cc-room.short { color: var(--pink); font-weight: 500; }
.cc-action { min-width: 12em; }
.about-processing summary { cursor: pointer; color: var(--muted); }
.about-processing p { margin-top: 6px; }
@media (min-width: 900px) { .cc-go { position: sticky; bottom: 12px; z-index: 5; } }
@media (max-width: 560px) {
  .cc-step, .cc-go { padding: 14px; }
  .plan-row summary { grid-template-columns: minmax(0, 1fr) auto; }
  .plan-row .plan-sum { grid-column: 1 / -1; grid-row: 2; }
  .fmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.plan-list { list-style: none; padding: 0; margin: 0; }
.cc-step > details.fold > summary .h-sm { font-size: 15px; }

/* Integrations (Round 34): compact cards that size to their content, never stretched to match. */
.intg-grid { align-items: start; }
.intg-card { gap: 10px; }
.intg-card > details > summary { cursor: pointer; font-size: 13.5px; color: var(--accent); }
.intg-card > details[open] > summary { margin-bottom: 6px; }
.intg-ai .intg-card { max-width: none; }

/* Repurpose (Round 34): whether the original is ready */
.src-ready.good { color: var(--good); }
.src-ready.bad { border: 1px solid var(--pink); background: var(--pink-soft); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cc-step.src-blocked { border-color: var(--pink); }
fieldset[disabled] .fmt-tile, fieldset[disabled] .chip-check { opacity: .55; cursor: not-allowed; }

/* Studio deliverables (Round 37): the package table and the deliverable box on a piece. */
.pkg-table .block, .deliv-box .block { display: block; }
.pkg-table tr.muted { opacity: .65; }
.pkg-table th[scope=row] { font-weight: 600; min-width: 12rem; }
.pkg-table td ul { min-width: 12rem; }
.deliv-wrap { margin: 0 0 12px; }
.deliv-wrap > summary { cursor: pointer; padding: 6px 0; }
.deliv-box .wrap-actions { flex-wrap: wrap; align-items: flex-start; }
.deliv-box details.more { min-width: 0; }
.deliv-box input[type=date], .deliv-box input[type=url], .deliv-box input[type=text], .deliv-box select { max-width: 100%; }
/* Requests & Approvals report (Round 37) */
.rq-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.rq-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; min-width: 0; }
.rq-filters input, .rq-filters select { max-width: 100%; }
.rq-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.rq-tile { border: 1px solid var(--line, #D5DAE1); border-radius: 10px; padding: 12px; min-width: 0; }
.rq-tile dt { font-size: 13px; color: var(--muted, #5E6A78); }
.rq-tile dd { margin: 4px 0 0; font-size: 20px; font-weight: 600; }
.dash-table .block { display: block; }
.deliv-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.deliv-box .wrap-actions > details > summary, .deliv-box > details.more > summary { display: inline-flex; align-items: center; border: 1px solid var(--line, #D5DAE1); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 14px; list-style: none; }
.deliv-box .wrap-actions > details > summary::-webkit-details-marker { display: none; }
.deliv-box .wrap-actions > details[open] { flex-basis: 100%; }
.deliv-box .wrap-actions > details[open] > form { margin-top: 8px; max-width: 32rem; }
#package { margin-bottom: 16px; }
/* Approval routing (Round 38) */
.rt-table td { vertical-align: top; }
.rt-table select { max-width: 14rem; }
.rt-auth { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.rt-auth input[type=number] { width: 7rem; }
.rt-primaries, .rt-del { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.rt-primaries label, .rt-del label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.tu-reviewer { padding: 8px 12px; border-left: 3px solid var(--line, #D5DAE1); }
.rt-table th[scope=row] { font-weight: 600; font-size: 15px; min-width: 9rem; }
/* Website discovery on Products & Services (Round 39) */
.disc-banner { padding: 12px 16px; border: 1px solid var(--line, #D5DAE1); border-left: 4px solid var(--accent, #5761AC); border-radius: 10px; margin: 8px 0 16px; }
.disc-item .block, .disc-banner .block { display: block; }
.disc-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.disc-review > summary, .disc-last > summary { cursor: pointer; }
/* Proactive Intelligence (Round 39) */
.rec-card { border: 1px solid var(--line, #D5DAE1); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--card, transparent); }
.rec-card h3 { margin: 0; }
.rec-sizes ul { margin: 8px 0 0; padding: 0; }
.rec-size { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line, #D5DAE1); }
.rec-size:first-child { border-top: 0; }
.rec-size-head { padding: 10px 0 0; list-style: none; }
.price-notes ul { margin: 0; padding: 0; list-style: none; }
.price-notes { padding-bottom: 12px; border-bottom: 1px solid var(--line, #D5DAE1); margin-bottom: 4px; }
.rec-size-head + .rec-size { border-top: 0; }
.rec-size .split { width: 100%; }
.rec-size:target { outline: 2px solid var(--accent, #5B5FC7); outline-offset: 4px; border-radius: 6px; }
.rec-compare { margin: 0; display: grid; gap: 4px; }
.rec-compare > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; }
.rec-compare dt { color: var(--muted, #5B6472); }
.rec-compare dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .rec-compare > div { grid-template-columns: 1fr; gap: 0; } }
.rec-acts { flex-wrap: wrap; align-items: flex-start; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg a { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line, #D5DAE1); text-decoration: none; }
.seg a[aria-current="page"] { font-weight: 600; border-color: currentColor; }

/* Round 41: discovery progress, competitor research and comparison. Progress shows real work:
   a filled bar with a percentage only while pages are being analysed; otherwise an indeterminate
   bar (still, with reduced motion) and the current step in words. */
.disc-job { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); background: var(--surface); scroll-margin-top: var(--sticky-top); }
.disc-job.is-done { border-left-color: var(--ok-line, var(--accent)); }
.disc-job.is-failed, .disc-job.is-cancelled { border-left-color: var(--warn-line); }
.dj-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dj-pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.dj-bar { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--accent); overflow: hidden; -webkit-appearance: none; appearance: none; }
.dj-bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.dj-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.dj-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.dj-bar:indeterminate { background-image: linear-gradient(90deg, transparent 0 35%, var(--accent) 35% 65%, transparent 65% 100%); background-size: 200% 100%; animation: dj-slide 1.6s linear infinite; }
.dj-bar:indeterminate::-webkit-progress-bar { background: transparent; }
.dj-bar:indeterminate::-moz-progress-bar { background: transparent; }
@keyframes dj-slide { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .dj-bar::-webkit-progress-value { transition: none; } .dj-bar:indeterminate { animation: none; background-image: none; background-color: var(--accent-soft); } }
.dj-steps { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.dj-steps li::before { content: "○ "; }
.dj-steps li.done { color: var(--ink); }
.dj-steps li.done::before { content: "✓ "; }
.dj-steps li.now { color: var(--ink); font-weight: 600; }
.dj-steps li.now::before { content: "● "; }
.research .checklist { border-collapse: collapse; }
.research .checklist th { text-align: left; font-weight: 400; padding: 3px 12px 3px 0; }
.research q.block { display: block; margin-top: 2px; padding-left: 10px; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; align-items: start; }
.cmp-card { min-width: 0; }
.chips .check, .chips label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.report-doc { max-width: 78ch; }
.report-doc h2 { margin-top: 12px; }


/* Round 41: suggestion and fact lists without bullets, one row each, divided. */
.disc-list, .fact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.disc-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.disc-list > li:first-child { border-top: 0; }
.disc-list > li .block { flex-basis: 100%; overflow-wrap: anywhere; }
.fact-list { gap: 8px; }
.fact-list > li { min-width: 0; overflow-wrap: anywhere; }
.run-table { font-size: 14px; border-collapse: collapse; width: 100%; }
.run-table th, .run-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.run-table td:nth-child(4), .run-table td:nth-child(5), .run-table th:nth-child(4), .run-table th:nth-child(5) { text-align: right; font-variant-numeric: tabular-nums; }

/* Round 41: notification preferences (Settings › Account). One row per group; the locked group
   shows as on and can't be changed. */
.ntf-prefs { margin: 0; padding: 0; border: 0; display: grid; gap: 4px; min-width: 0; }
.ntf-prefs .ntf-row { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.ntf-row:first-of-type { border-top: 0; }
.ntf-row input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.ntf-row input:disabled { cursor: not-allowed; }
.ntf-row:has(input:disabled) { cursor: default; }
.ntf-row:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ntf-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntf-label { font-weight: 500; color: var(--ink); }

/* Round 41: competitor records grouped by status (waiting, approved, rejected, retired). */
.rec-groups { display: grid; gap: 18px; min-width: 0; }
.rec-group { display: grid; gap: 6px; min-width: 0; }
.rec-group-h { font-size: 14px; font-weight: 600; margin: 0; color: var(--ink); }
details.rec-group > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); padding: 4px 0; }
details.rec-group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Round 43: Review what NOLSEM found. A summary row, sections, families of a service with its
   packages and prices, rows with evidence on demand, and a selection bar that stays in reach. */
.rv { padding-bottom: 96px; }
.rv-summary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rv-summary a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
.rv-summary a:hover { border-color: var(--accent); }
.rv-summary a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-n { font-weight: 600; color: var(--accent); }
.rv-sec { scroll-margin-top: 72px; min-width: 0; }
.rv-family { padding: 12px 16px; min-width: 0; }
.rv-fam-h { font-size: 15px; font-weight: 600; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink); }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; min-width: 0; }
.rv-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.rv-list > .rv-row:first-child { border-top: 0; }
.rv-row > input[type="checkbox"] { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--accent); }
.rv-row:has(input:checked) { background: var(--accent-soft); box-shadow: -8px 0 0 var(--accent-soft), 8px 0 0 var(--accent-soft); }
.rv-main { display: grid; gap: 4px; min-width: 0; flex: 1; }
.rv-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.rv-line, .rv-why { overflow-wrap: anywhere; }
.rv-ev summary, .rv-link summary, .rv-more > summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.rv-more > summary { font-size: 14px; font-weight: 500; color: var(--ink); padding: 6px 0; }
.rv-ev ul { margin: 6px 0 0; }
.rv-link form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.rv-link select { min-height: 36px; max-width: 100%; }
.rv-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
@media (max-width: 760px) { .rv-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); } }
.rv-row .row-actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.rv-row .rv-link { align-self: center; }

/* Round 43: AI-2 answer review. */
.ai2-list { gap: 12px; }
.ai2-row { min-width: 0; }
.ai2-answer { padding: 8px 0; overflow-wrap: anywhere; }
.ai2-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.ai2-form select { width: 100%; min-height: 40px; }
.head > .head-link { order: 2; align-self: flex-start; }

/* Round 44: Intelligence navigation. Six primary sections that wrap (never scroll sideways); the
   parts of the open one down the side when there is room, a selector that opens a list when not. */
ul.plain.inav-primary { flex-direction: row; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 4px; list-style: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); width: fit-content; max-width: 100%; box-sizing: border-box; }
.inav-primary > li { min-width: 0; }
.inav-primary a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.inav-primary a:hover { color: var(--ink); background: var(--hover); }
.inav-primary a[aria-current] { color: var(--ink); background: var(--surface); box-shadow: var(--elev-1), inset 0 0 0 1px var(--line); font-weight: 600; }
.inav-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1; background: var(--warn-soft); color: var(--warn); font-variant-numeric: tabular-nums; }
.isec-scope { container-type: inline-size; min-width: 0; }
.isec-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.isec-layout > .section-panel { min-width: 0; }
.isub { min-width: 0; }
.isub-h { margin: 0 0 6px; padding: 0 10px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
ul.plain.isub-list { display: none; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.isub-list a, .isub-menu a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.isub-list a:hover, .isub-menu a:hover { color: var(--ink); background: var(--hover); }
.isub-list a[aria-current="page"], .isub-menu a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); border-left-color: var(--accent); font-weight: 600; }
.isub-pick { position: relative; }
.isub-pick > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; list-style: none; font-size: 14px; }
.isub-pick > summary::-webkit-details-marker { display: none; }
.isub-pick > summary strong { min-width: 0; overflow-wrap: anywhere; }
.isub-pick-l { color: var(--muted); }
.isub-pick-c { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); flex: none; }
.isub-pick[open] .isub-pick-c { transform: rotate(-135deg) translateY(-2px); }
ul.plain.isub-menu { gap: 2px; font-size: 14px; margin: 4px 0 0; padding: 4px; list-style: none; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--elev-2); }
@container (min-width: 760px) {
  .isec-layout.has-parts { grid-template-columns: 12rem minmax(0, 1fr); gap: 24px; align-items: start; }
  .isec-layout.has-parts .isub { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); }
  ul.plain.isub-list { display: flex; }
  .isub-pick { display: none; }
}
@container (max-width: 759.98px) { .isub-h { display: none; } }
/* With a record open and too little room for the list, the record and the parts menu, the parts
   move into the selector so the list and the record stay side by side. */
@container (min-width: 760px) and (max-width: 1099.98px) {
  .isec-layout.has-parts:has(.records.has-detail) { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .isec-layout.has-parts:has(.records.has-detail) .isub { position: static; }
  .isec-layout.has-parts:has(.records.has-detail) ul.plain.isub-list, .isec-layout.has-parts:has(.records.has-detail) .isub-h { display: none; }
  .isec-layout.has-parts:has(.records.has-detail) .isub-pick { display: block; }
}
@media (prefers-reduced-motion: reduce) { .isub-pick-c { transition: none; } }
/* Round 44: relationships worth reviewing (Products & Services). One line that opens. */
.rel-box { min-width: 0; }
.rel-sum { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rel-sum > summary { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; cursor: pointer; list-style: none; }
.rel-sum > summary::-webkit-details-marker { display: none; }
.rel-sum > summary::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.rel-sum[open] > summary::before { transform: rotate(45deg); }
.rel-sum > summary strong { font-size: 15px; }
ol.plain.rel-list { list-style: none; margin: 0; padding: 0 16px 8px; gap: 0; }
.rel-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.rel-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.rel-head h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rel-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 8px 20px; margin: 0; font-size: 14px; }
.rel-dl dt { font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.rel-dl dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.rel-ev summary, .rel-none summary { cursor: pointer; font-size: 14px; color: var(--accent-strong); }
.rel-ev ul { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.rel-none { margin: 0 16px 14px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rel-none[open] { gap: 8px; }
/* Round 44: Products & Services catalog and the one status line per section. */
.rec-status { display: flex; flex-wrap: wrap; gap: 0 6px; color: var(--muted); }
.rec-status strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.cat { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cat-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cat-sec > h2, .cat-sec .split h2 { margin: 0; }
.cat-svc { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.cat-kids { margin: -4px 0 0 16px; padding: 8px 12px; border-left: 2px solid var(--line); }
.cat-kids > summary { cursor: pointer; font-size: 14px; color: var(--accent-strong); min-height: 32px; display: flex; align-items: center; }
ul.plain.cat-kid-list { padding: 4px 0 0; gap: 2px; list-style: none; }
.cat-kid-list a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: 14px; }
.cat-kid-list a:hover, .cat-kid-list a[aria-current] { background: var(--hover); }
.cat-kid-list .small { color: var(--muted); }
.cat-wait { margin: 4px 0 0 18px; color: var(--muted); }
.cat-waiting { padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--surface-2); }
.cat-waiting .split { flex-wrap: wrap; gap: 8px; }
/* Round 44: one discovery summary: the latest run, then where everything found stands now. */
.disc-run { display: block; }
.disc-run.is-recent { padding: 8px 10px; border-radius: var(--r-sm); background: var(--accent-soft); }
.disc-run .link-btn { float: right; margin: -4px 0 0 8px; }
dl.disc-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
dl.disc-stats div { display: flex; flex-direction: column-reverse; }
dl.disc-stats dt { font-size: 12px; color: var(--muted); }
dl.disc-stats dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.link-btn { background: none; border: 0; padding: 4px 2px; min-height: 32px; color: var(--accent-strong); text-decoration: underline; cursor: pointer; font: inherit; }
/* Round 44: the Brand page as a brand workspace. Identity in a wide reading column with contact
   details beside it; voice as one numbered list; names and wording in groups. Long text is
   shortened on screen only (clamp classes), and only once script has measured it. */
.brand-ws { display: flex; flex-direction: column; gap: 16px; min-width: 0; container-type: inline-size; }
.brand-ws > * { flex: none; }
.brand-src { color: var(--muted); }
.brand-id { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.brand-id-main { padding: 20px 24px; min-width: 0; gap: 14px; }
.brand-contact { padding: 20px 24px; background: var(--surface-2); border-top: 1px solid var(--line); min-width: 0; }
dl.brand-ident { display: flex; flex-wrap: wrap; gap: 6px 32px; margin: 0; }
dl.brand-ident dt, dl.brand-kv dt { font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
dl.brand-ident dd, dl.brand-kv dd { margin: 2px 0 0; overflow-wrap: anywhere; }
dl.brand-ident dd.brand-name { font-size: 22px; font-weight: 600; line-height: 1.2; }
dl.brand-kv { display: flex; flex-direction: column; gap: 10px; margin: 0; font-size: 15px; }
.brand-pos-wrap { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.brand-pos { margin: 0; max-width: 70ch; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.clamp-4.is-clamped, .clamp-2.is-clamped .vr-text, .vr-text.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-4.is-clamped { -webkit-line-clamp: 4; line-clamp: 4; }
.vr-text.is-clamped { -webkit-line-clamp: 2; line-clamp: 2; }
ol.voice-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 28px; }
ol.voice-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.vr-text { margin: 0; font-size: 15px; line-height: 1.55; min-width: 0; overflow-wrap: anywhere; }
.words-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 32px; align-items: start; }
.words-col { min-width: 0; }
ul.plain.names-list { list-style: none; padding: 0; margin: 0; gap: 0 28px; font-size: 15px; display: grid; grid-template-columns: minmax(0, 1fr); }
.words-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 32px; align-items: start; }
.names-list li { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.names-list li .small { color: var(--muted); }
.words-fold > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; gap: 10px; list-style: none; }
.words-fold > summary::-webkit-details-marker { display: none; }
.words-fold > summary::before { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.words-fold[open] > summary::before { transform: rotate(45deg); }
.words-fold[open] > summary { margin-bottom: 4px; }
.share-fold { padding: 0; }
.share-fold > summary { padding: 16px 20px; cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: flex-start; }
.share-fold > summary::-webkit-details-marker { display: none; }
.share-fold > summary::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.share-fold[open] > summary::before { transform: rotate(45deg); }
.share-fold > summary h2 { margin: 0; }
.share-body { padding: 0 20px 20px; }
@container (min-width: 720px) {
  .brand-id { grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr); }
  .brand-contact { border-top: 0; border-left: 1px solid var(--line); }
  .words-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  ul.plain.names-list:not(.retired-list) { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
  ol.voice-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* Round 45: the AI-2 20-question review: NOLSEM's record apart from the person's scores. */
.ai2-q .split { flex-wrap: wrap; gap: 6px 12px; }
.ai2-q h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ai2-auto-box { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.ai2-crit { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai2-crit legend { font-size: 13px; font-weight: 600; padding: 0 0 4px; }
.ai2-crit .check { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.ai2-ans > summary { cursor: pointer; }
ol.ai2-list { list-style: none; padding: 0; margin: 0; }
.isolated-banner { position: sticky; top: 0; z-index: 100; padding: 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--warn-soft); color: var(--warn); border-bottom: 2px solid var(--warn-line); font-size: 14px; }

/* Round 48: the recovery test page */
.recovery-facts { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 6px 20px; margin: 12px 0 20px; font-size: 14px; }
.recovery-facts dt { color: var(--muted); }
.recovery-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.recovery-table { overflow-x: auto; margin: 8px 0 16px; }
.recovery-table table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.recovery-table th, .recovery-table td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 520px) { .recovery-facts { grid-template-columns: 1fr; gap: 2px; } .recovery-facts dd { margin-bottom: 8px; } }
/* Round 56: folded sections in Impact items and in What NOLSEM used are at least 24 px tall to tap or click. */
.impact-item details > summary, .used-prices details > summary, section:has(#us-h) details > summary { min-height: 24px; display: list-item; padding-block: 2px; }

/* Round 57: light-mode readability on Home and Create.
   The menu: its own surface (--side) with a visible edge; the open page keeps its label colour and
   weight and adds a bar at its left edge, so it reads without relying on colour alone. */
.sidebar .menu a:hover { background: var(--side-hover); }
.sidebar .menu a[aria-current="page"] { background: var(--side-active); color: var(--accent-strong); font-weight: 600; }
.sidebar .menu a[aria-current="page"]::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
@media (forced-colors: active) { .sidebar .menu a[aria-current="page"]::before { background: Highlight; } }
/* Home, Needs your decision: a hairline between items, and each row ends with its status and the
   action it opens, kept together at the right. */
.decision-list { gap: 0; }
.decision-list > li + li { border-top: 1px solid var(--line); }
.decision-list .row-link { padding: 12px; }
.row-end { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.row-go { color: var(--accent-strong); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.decision-list .row-link:hover .row-go, .decision-list .row-link:focus-visible .row-go { text-decoration: underline; }
@media (max-width: 480px) { .decision-list .row-link { flex-wrap: wrap; } .row-end { width: 100%; justify-content: space-between; } }
/* Create: the brand this is for, above the writing field; the field's edge at 3:1; Continue right
   under it; suggestions quieter than the task. */
.task-brand { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--muted); }
.task-brand strong { color: var(--ink); }
.task-brand .brand-mark { width: 22px; height: 22px; font-size: 10px; border-radius: 6px; }
.task-brand a { margin-left: auto; font-size: 13.5px; }
.task-box textarea { border-color: var(--field-line); }
.task-box textarea:focus { border-color: var(--accent); }
.task-box > .actions { margin-top: -4px; }
.create-side #suggestions .sugg-box { border-color: var(--line); background: transparent; }
.create-side #suggestions > h2 { font-size: 15px; color: var(--muted); }

/* Round 57: skip link, shown when it has keyboard focus. */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface); color: var(--accent-strong); font-weight: 600; text-decoration: underline; box-shadow: var(--elev-2); }
.skip-link:focus { left: max(12px, env(safe-area-inset-left, 0px)); outline: 3px solid var(--accent); outline-offset: 2px; }
main[tabindex="-1"]:focus { outline: none; }

/* Round 59: the welcome (two steps after sign-up) */
.welcome-steps { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; counter-reset: wstep; font-size: 14px; color: var(--muted); }
.welcome-steps li { counter-increment: wstep; }
.welcome-steps li::before { content: counter(wstep) ". "; }
.welcome-steps li[aria-current="step"] { color: var(--ink); font-weight: 600; }
.welcome .choices { grid-template-columns: 1fr; }
.welcome-choice textarea, .welcome-choice input[type="text"] { width: 100%; }
.welcome-detail { display: flex; flex-direction: column; gap: 6px; }

/* Round 59: guided tour */
.tour { position: absolute; z-index: 60; display: grid; gap: 8px; padding: 14px 16px; background: var(--surface); color: var(--ink); border: 2px solid var(--accent); border-radius: 12px; box-shadow: 0 8px 28px rgba(11, 23, 38, .18); max-width: calc(100vw - 32px); }
.tour[hidden] { display: none; }
.tour .h-sm { margin: 0; }
.tour .h-sm:focus, .tour .h-sm:focus-visible { outline: none; }
.tour.tour-docked { position: fixed; left: auto; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 80; }
.tour-count { margin: 0; color: var(--muted); }
.tour-lit { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
@media (forced-colors: active) { .tour { border-color: Highlight; } .tour-lit { outline-color: Highlight; } }

/* Round 60: whose brand the brief is for, at the top of the brief page. */
.writing-for { margin: 0; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; align-self: flex-start; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface, var(--bg)); font-size: 15px; }
.writing-for strong { font-weight: 600; }

/* Round 62: one field edge everywhere (3:1 against white and the workspace), including field types
   that had no shared style. Pages must not set a fainter edge of their own. */
input[type=password], input[type=tel], input[type=search] { border-color: var(--field-line); }
input[type=text]:focus, input[type=email]:focus, input[type=url]:focus, input[type=search]:focus, input[type=password]:focus, input[type=number]:focus, input[type=date]:focus, textarea:focus, select:focus { border-color: var(--accent); }
/* A box that is itself the writing field (Review & improve): the field edge, and the accent while typing. */
.writing-surface { border-color: var(--field-line); }
.writing-surface:focus-within { border-color: var(--accent); }

/* Nov 17, 2026: plain NOLSEM text stands in for the logo until it is ready. Set in the app's
   own typeface and ink, so it follows the light and dark appearances on its own. */
.wordmark { font-family: var(--sans); font-weight: 650; letter-spacing: 0.08em; color: var(--ink); line-height: 1; white-space: nowrap; }
.product-lockup.wordmark { font-size: 19px; height: auto; }
.product-icon.wordmark { width: auto; height: auto; font-size: 10px; letter-spacing: 0.04em; }
.topbar-product .wordmark { font-size: 15px; }
.plainbar .logo.wordmark { height: auto; font-size: 20px; color: #FFFFFF; } /* the bar is navy in both appearances */
.bp-product.wordmark { font-size: 10px; }
.print-brand .pb-nolsem.wordmark { height: auto; font-size: 12px; }
.topbar-product, .product, .plainbar-in > a { text-decoration: none; }

/* Home prototype, Round 66 (/desk/home/next, prototypes only). Neutral page, white work items,
   restrained colour (Cohere North light as the reference); the same hierarchy in dark mode
   through the tokens. Phone first: each item is its own surface; its client sits beside its
   title; the action is inside the item, full width on a phone and at the right from 700 px. */
.hq { display: flex; flex-direction: column; gap: 28px; max-width: var(--w-read); }
.hq-section { display: flex; flex-direction: column; gap: 12px; }
.hq-h { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.hq-count { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 9px; }
.hq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 2px var(--shadow); }
.hq-item.quiet { box-shadow: none; }
.hq-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* The client is the first thing in the title, directly above its words, at every width. */
.hq-title { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hq-client { font-size: 12px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-what { font-size: 14px; line-height: 1.45; color: var(--muted); margin: 0; }
.hq-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.hq-facts div { display: flex; flex-direction: column; gap: 2px; }
.hq-facts dt { font-size: 12px; color: var(--muted); }
.hq-facts dd { margin: 0; font-size: 18px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.hq-act { width: 100%; min-height: 44px; }
.hq-empty { color: var(--muted); margin: 0; }
@media (max-width: 699px) {
  .hq-item:not(.quiet) .hq-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (min-width: 700px) {
  .hq-item { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; }
  .hq-act { width: auto; flex: none; min-width: 168px; }
}
.hq-backline { margin: 0 0 12px; }
.hq-backline .back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
/* Round 67: the confirmation after a decision made from Home, at the decided item's place. */
.hq-done { list-style: none; background: var(--good-soft, var(--surface-2)); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px; font-weight: 600; font-size: 15px; }
.hq-done:focus { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Work items (Round 68, Nov 18; Daryl's Continue card as the reference). One outlined item per
   piece of work, with the client, title, facts and action inside. The outline is visible at rest
   in both themes (--item-line, 3:1 or more), the accent on hover and keyboard focus, and the
   item darkens while pressed on touch. A one-destination item is one link (one keyboard stop). */
.wi-list { gap: 12px; }
.wi { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--item-line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.wi:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--ink); }
.wi:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.wi:active { background: var(--hover); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wi-main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.wi-title { font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.wi-detail { display: flex; flex-direction: column; gap: 6px; }
.wi-why { font-size: 14px; line-height: 1.45; color: var(--muted); }
.wi-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.wi-facts > span { display: flex; flex-direction: column; gap: 2px; }
.wi-k { font-size: 12px; color: var(--muted); }
.wi-v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wi-act { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); width: 100%; }
.wi-act.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wi:hover .wi-act.primary, .wi:focus-visible .wi-act.primary { background: var(--accent-strong); border-color: var(--accent-strong); }
@media (min-width: 700px) {
  .wi { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; }
  .wi-act { width: auto; flex: none; min-width: 176px; }
}
@media (prefers-reduced-motion: reduce) { .wi { transition: none; } }

/* Round 69 (Daryl, Nov 18): NOLSEM AI answers. "Save draft to project" is the main action right
   under the draft; Copy is quieter beside it; a note for the person sits apart from the draft;
   after saving, the answer says where it went and opens it. */
.ai-save-row { align-items: center; margin-top: 4px; }
.ai-save-row .ai-save { min-height: 44px; padding: 0 18px; font-weight: 600; }
.ai-save-row .btn.quiet { background: transparent; border-color: transparent; color: var(--accent); min-height: 44px; }
.ai-save-row .btn.quiet:hover { background: var(--hover); }
.ai-save-row .ai-other { align-self: center; }
@media (max-width: 559px) { .ai-save-row .ai-save, .ai-save-row form.inline { width: 100%; } .ai-save-row form.inline .ai-save { width: 100%; } }
.ai-editorial { border-left: 3px solid var(--line-strong); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.ai-editorial .eyebrow { font-size: 11px; }
.ai-saved { border: 1px solid var(--good); background: var(--good-soft); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-saved .actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Nov 18, 11:33 pm: the destination line sits inside the composer, aligned with the prompt text
   (the textarea's 16 px inset), with room above and below; the same before the first message and
   after a reply, at every width. */
.ai-composer .ai-dest { margin: 0; padding: 14px 16px 0; line-height: 1.45; color: var(--muted); }
.ai-composer .ai-dest strong { color: var(--ink); font-weight: 600; }
.ai-composer .ai-dest ~ textarea { padding-top: 8px; }

/* Review v2 (Rounds 70 to 72, /desk/review/next). A compact list beside the open
   claim where the page is wide enough; one view at a time below 900 px of page. */
.rv { container-type: inline-size; container-name: rv; }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.rv-list-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rv-seg { flex-wrap: wrap; }
.rv-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rv-search .inline-label { flex: 1 1 200px; min-width: 0; }
.rv-search input[type="search"] { width: 100%; min-height: 44px; box-sizing: border-box; }
.rv-search .btn { min-height: 44px; }
.rv-count { color: var(--muted); }
.rv-count:empty { display: none; }
.rv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rv-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--item-line); border-radius: var(--r); color: var(--ink); text-decoration: none; min-height: 44px; box-sizing: border-box; }
.rv-row:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--ink); }
.rv-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rv-row:active { background: var(--hover); }
.rv-row[aria-current="true"] { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); background: var(--hover); }
.rv-title { font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.rv-att { font-size: 13px; line-height: 1.4; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att-nosource .rv-att, .att-differs .rv-att { color: var(--ink); }
.rv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.rv-done { list-style: none; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--good-soft); color: var(--ink); font-size: 14px; line-height: 1.45; }
.rv-done:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.rv-done a { color: var(--ink); font-weight: 600; }
.rv-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.rv-detail-in { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.rv-detail h2 { font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; margin: 0; }
.rv-note { padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 14px; line-height: 1.5; }
.rv-note.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.rv-quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font-size: 15px; line-height: 1.5; }
.rv-src { overflow-wrap: anywhere; font-weight: 500; min-height: 24px; }
.rv-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.rv-more[open] summary { margin-bottom: 8px; }
.rv-effect { margin: 0; font-size: 15px; line-height: 1.5; }
.rv-decide { display: flex; flex-direction: column; gap: 10px; }
.rv-step { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--r); }
.rv-step h3 { margin: 0; font-size: 17px; }

.rv .actions .btn { min-height: 44px; }
.rv-back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 15px; color: var(--ink); }
.rv-by { color: var(--muted); }
@container rv (max-width: 899.98px) {
  .rv[data-view="list"] .rv-detail { display: none; }
  .rv[data-view="detail"] .rv-list-col, .rv[data-view="detail"] .rv-head { display: none; }
  .rv-detail-in { padding: 16px; }
}
@container rv (min-width: 900px) {
  .rv-grid { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .rv-back { display: none; }
  .rv-detail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
}
.rv-list > li, .rv-done { scroll-margin-top: 96px; scroll-margin-bottom: 96px; }
.rv-more summary { list-style: none; gap: 8px; }
.rv-more summary::-webkit-details-marker { display: none; }
.rv-more summary::before { content: "▸"; font-size: 12px; color: var(--muted); transition: transform 0.15s; }
.rv-more[open] summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .rv-more summary::before { transition: none; } }
.rv-search input[type="search"] { background: var(--surface); color: var(--ink); border: 1px solid var(--field-line); border-radius: var(--r-sm); padding: 0 12px; font: inherit; font-size: 15px; }
.rv-search input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
.rv-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.rv-step textarea { min-height: 64px; }
@container rv (min-width: 900px) { .rv-pair { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
/* Round 71: the older claim's choice at the last check. */
.rv-choice { margin: 0; padding: 14px; border: 1px solid var(--warn-line); border-radius: var(--r); background: var(--warn-soft); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rv-choice legend { padding: 0 6px; font-weight: 600; font-size: 15px; color: var(--ink); }
.rv-compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.rv-compare > div { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rv-compare .small { color: var(--muted); }
.rv-words { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.rv-radio { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; min-height: 44px; border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font-weight: 400; }
.rv-radio:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rv-radio input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.rv-radio-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-radio-text strong { font-weight: 600; color: var(--ink); }
/* Side by side when the box itself has room, on the Review list and the Approvals page alike. */
.rv-choice { container-type: inline-size; container-name: rvchoice; }
@container rvchoice (min-width: 460px) { .rv-compare { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.older-said:empty { display: none; }
.older-said { color: var(--ink); }
/* The legend sits inside the box, as the first line (a floated legend is an ordinary item). */
.rv-choice legend { float: left; width: 100%; padding: 0; line-height: 1.4; }
/* Round 73: retiring paused by the recovery switch (NOLSEM_RETIRE=off). */
.rv-radio.paused { cursor: not-allowed; border-style: dashed; }
.rv-radio.paused .rv-radio-text strong { color: var(--muted); }
.rv-radio.paused .hint { color: var(--ink); }

/* Brand Report (Round 74 onwards): what a client would read each month. */
.br { max-width: 880px; }
.br-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.br-head h1 { margin: 0; }
.br-for { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.br-months { display: flex; flex-wrap: wrap; gap: 8px; }
.br-short { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.br-short h2 { margin: 0; }
.br-short p { font-size: 17px; line-height: 1.55; max-width: 68ch; }
.br-sec { display: flex; flex-direction: column; gap: 14px; }
.br-sec > h2, .br-sec-head h2 { margin: 0; }
.br-sec-head { display: flex; align-items: center; gap: 10px; }
.br-count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.br-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .br-items { grid-template-columns: 1fr 1fr; } }
.br-item { min-width: 0; }
.br-item-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.br-kind { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.br-item-title { margin: 0; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.br-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; margin: 0; }
.br-facts div { min-width: 0; }
.br-facts dt { font-size: 12px; color: var(--muted); }
.br-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.br-quote { margin: 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.br-effect { color: var(--muted); }
.br-item .hq-act { margin-top: auto; }
.br-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.br-chart { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; overflow-x: auto; }
.br-problems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.br-problems li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.br-problems .split { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.br-helps { font-size: 15px; }
.br-who { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); margin-right: 4px; }
.br-who.you { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.br-how { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.br-how summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.br-pages { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.br-kv { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; }
.br-about { border-top: 1px solid var(--line); padding-top: 18px; }
.br-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.br-notes strong { color: var(--ink); }
.hq-item.br-item { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; padding: 16px 18px; }
.hq-item.br-item .hq-act { width: 100%; }
/* Brand Report v2 (Rounds 75 and 76): the lead figure, the agency preview, the email as it would be sent. */
.br-lead { border-color: var(--accent); }
.br-lead .stat-value { color: var(--ink); }
.br-of { font-size: 15px; font-weight: 500; color: var(--muted); }
.br-inert { pointer-events: none; }
.br-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; max-width: 70ch; }
.br-error { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); border: 1px solid var(--warn-line); }
.br-who-table { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.br-addr { overflow-wrap: anywhere; }
.br-mail { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.br-mail-head { margin: 0; padding: 12px 16px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.br-mail-head div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; min-width: 0; }
.br-mail-head dt { color: var(--muted); font-size: 13px; }
.br-mail-head dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.br-mail-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 62ch; }
.br-mail-btn { display: inline-block; padding: 10px 20px; border-radius: 999px; background: var(--verdict); color: var(--on-verdict); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.br-mail-foot { border-top: 1px solid var(--line); padding-top: 10px; }
.br-frame { border: 1px dashed var(--line-strong); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 24px; background: var(--bg); min-width: 0; }
@media (max-width: 520px) { .br-frame { padding: 12px; } }
/* Round 77: report data behind one control. The charts compare; the table gives exact values. */
.rep-data { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rep-data > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 48px; padding: 10px 16px; border-radius: var(--r); }
.rep-data > summary::-webkit-details-marker { display: none; }
.rep-data > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: 2px; }
.rep-data[open] > summary::before { transform: rotate(45deg); }
.rep-data > summary:hover { background: var(--hover); }
.rep-data > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd-label { font-weight: 600; color: var(--accent-strong); }
.rd-note { font-size: 13px; color: var(--muted); }
.rep-data[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.rep-data .rep-table-wrap { margin: 0; border: 0; }
.rd-cap { caption-side: top; text-align: left; padding: 12px 16px 4px; font-size: 13px; color: var(--muted); }
.rd-more { padding: 10px 16px 14px; color: var(--muted); border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .rep-data > summary::before { transition: none; } }
.rep-also { margin: -4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 14px; color: var(--ink); }
.ra-label { color: var(--muted); }
.ra-sep { color: var(--muted); }
@media (max-width: 640px) {
  .report-table caption.rd-cap { display: block; width: 100%; padding: 12px 12px 8px; }
  .rep-data .rep-table-wrap { padding: 0 10px; }
  .rep-also { margin-top: 0; }
}
/* Round 77b: the report data table. Columns grouped by what they count, numbers right-aligned
   and the same width, zeros and empty values quieter than real figures, the totals row marked. */
.rt-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.report-table.rt { font-size: 14.5px; }
.report-table.rt th, .report-table.rt td { padding: 11px 16px; }
.report-table.rt .num { text-align: right; }
.report-table.rt td.num { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink); }
.report-table.rt td.is-quiet { color: var(--muted); font-weight: 400; }
.report-table.rt .rt-gs { border-left: 1px solid var(--line); }
.report-table.rt thead th { font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); min-width: 0; max-width: none; white-space: nowrap; padding-top: 8px; padding-bottom: 10px; }
.report-table.rt thead th.rt-label-h { color: var(--muted); }
.report-table.rt .rt-groups th { color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; text-align: left; padding: 12px 16px 6px; border-bottom: 2px solid var(--accent); }
.report-table.rt .rt-groups .rt-corner { border-bottom: 0; padding: 0; background: var(--surface); position: sticky; left: 0; z-index: 1; }
.report-table.rt .th-u { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.report-table.rt .th-l { margin-right: 0; }
.report-table.rt thead .def-link { width: 15px; height: 15px; font-size: 10px; margin-left: 5px; vertical-align: 1px; }
.report-table.rt th[scope="row"] { font-weight: 600; white-space: nowrap; }
.report-table.rt tbody tr:not(.is-total):hover th, .report-table.rt tbody tr:not(.is-total):hover td { background: var(--hover); }
.report-table.rt tr.is-total th, .report-table.rt tr.is-total td { background: var(--accent-soft); color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--accent); }
.report-table.rt tr.is-total td.is-quiet { color: var(--ink); font-weight: 600; }
.report-table.rt tr.is-total th:first-child { box-shadow: inset 3px 0 0 var(--accent); }
/* Sorting (added by desk.js): the heading is a button; the arrow shows the order. */
.rt-sort { all: unset; cursor: pointer; display: inline-flex; align-items: flex-start; gap: 4px; text-align: inherit; border-radius: 4px; padding: 2px 0; min-height: 24px; }
.num .rt-sort { flex-direction: row-reverse; }
.rt-sort > span:first-child { display: block; }
.rt-sort::after { content: ""; width: 7px; height: 7px; margin-top: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0; flex: none; }
.num .rt-sort::after { margin-right: 2px; }
.rt-sort:hover { color: var(--ink); }
.rt-sort:hover::after { opacity: .5; }
.rt-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
th[aria-sort] .rt-sort { color: var(--ink); }
th[aria-sort="descending"] .rt-sort::after { opacity: 1; transform: rotate(45deg); }
th[aria-sort="ascending"] .rt-sort::after { opacity: 1; transform: rotate(-135deg); margin-top: 8px; }
.rt-sort-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 640px) {
  .report-table.rt .rt-gs { border-left: 0; }
  .report-table.rt td.num { justify-content: space-between; text-align: right; }
  .report-table.rt tr.is-total { background: var(--accent-soft); border-color: var(--accent); }
  .report-table.rt tr.is-total th, .report-table.rt tr.is-total td { background: none; border-bottom: 0; }
  .report-table.rt tr.is-total td { border-top: 1px solid var(--line); }
  .report-table.rt tr.is-total th:first-child { box-shadow: none; }
  .report-table.rt tbody tr:not(.is-total):hover th, .report-table.rt tbody tr:not(.is-total):hover td { background: none; }
}
@media print {
  .report-table.rt tr.is-total th, .report-table.rt tr.is-total td { background: #eef0f8 !important; }
  .rt-sort::after { display: none; }
}
/* Round 77b: fit seven or eight columns in the report panel at laptop widths. */
.report-table.rt th, .report-table.rt td { padding: 10px 12px; }
.report-table.rt thead th { white-space: normal; }
.report-table.rt thead th.num { max-width: 116px; min-width: 72px; }
.report-table.rt thead th.rt-label-h { min-width: 132px; }
.report-table.rt .rt-groups th { padding: 12px 12px 6px; }
.report-table.rt tbody tr:last-child th { border-bottom: 0; }
.report-table.rt td.num { white-space: nowrap; }
.report-table.rt td.num:not([data-v=""]) { min-width: 48px; }
@media (max-width: 640px) {
  .rd-sort-hint { display: none; }
  .report-table.rt tr.is-total td::before { font-weight: 400; color: var(--ink); }
}
@media (max-width: 640px) { .report-table.rt .rt-groups { display: none; } }
/* Round 77 rollout: the shared report data table on Dashboards and elsewhere. */
.report-table.rt .rt-sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.report-table.rt td.is-why { font-size: 13px; font-weight: 400; color: var(--muted); white-space: normal; }
.report-table.rt th[scope="row"] a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.report-table.rt th[scope="row"] a:hover { text-decoration-color: currentColor; }
.box-body > .rep-data { margin-top: 14px; }
.box-body > .chart + .rep-data { margin-top: 12px; }
@media (max-width: 640px) { .report-table.rt th[scope="row"] .rt-sub { display: inline; margin-left: 6px; } }
.rep-empty .rep-now { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 8px; font-size: 14px; }

/* Brand Report sending (Round 80): the confirmation, what changed, and each person's delivery. */
.br-confirm-kv { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; }
.br-changed { padding: 14px 16px; border-radius: 12px; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.br-changed h2 { margin: 0; }
.br-changed ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.br-delivery th[scope="row"] { font-weight: 400; letter-spacing: normal; text-transform: none; font-size: 15px; color: var(--ink); }
.br-delivery .br-addr { overflow-wrap: normal; word-break: normal; }
.br-delivery th[scope="row"] .rt-sub { display: block; color: var(--muted); font-size: 13px; }
.br-delivery td { vertical-align: top; }
.br-why { display: block; margin-top: 4px; color: var(--muted); max-width: 46ch; }
.br-delivery tr.is-new { background: var(--good-soft); }
.br-delivery form.inline { margin: 0; }
@media (max-width: 640px) {
  .br-delivery thead { display: none; }
  .br-delivery tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .br-delivery th[scope="row"], .br-delivery td { display: block; padding: 0 12px; border: 0; }
  .br-delivery td.num::before { content: 'Attempts: '; color: var(--muted); }
  .br-delivery .br-addr { overflow-wrap: anywhere; }
}
.br-done { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--good-soft); color: var(--ink); border: 1px solid var(--good); }
.br-done strong { color: var(--ink); }
.br-sendbar { position: sticky; bottom: var(--sticky-bottom, 12px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; box-shadow: var(--elev-2); }
.br-sendbar p { max-width: 60ch; }
.br-sendbtn { min-height: 44px; min-width: 180px; }
.br-delivery .btn.small { min-height: 36px; }
/* NOLSEM AI and Ask NOLSEM (Nov 20): where AI requests are processed, right under the box, in
   regular text, so it's read before anything is sent. */
.ai-composer .ai-notice { margin: 0; font-weight: 400; color: var(--muted); line-height: 1.4; }

/* ==========================================================================================
   Header refinement (prototype, proto/header, Nov 20, 2026). Top right, in this order: Ask
   NOLSEM, Workspace settings, Notifications, the profile menu. Appearance and sign-out live in
   the profile menu with the person's full identity and role; the sidebar keeps navigation only,
   plus Platform Administration at the bottom for staff. Height unchanged (52 px).
   ========================================================================================== */
.topbar-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.tb-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; box-sizing: border-box; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); text-decoration: none; cursor: pointer; }
.tb-icon svg { width: 20px; height: 20px; }
.tb-icon:hover, .profile[open] > .tb-icon { background: var(--hover); color: var(--ink); }
.tb-icon[aria-current="page"] { background: var(--hover); color: var(--ink); }
.tb-icon:focus-visible, .topbar-ask:focus-visible, .pop-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .tb-icon { width: 44px; height: 44px; } .topbar-ask { height: 44px; } .pop-item { min-height: 44px; } }
.topbar .me-bell .count { top: 3px; right: 2px; }
/* Ask NOLSEM: a quiet text button, no fill and no border, so the page's primary action stays the
   strongest thing on screen. The spark keeps the accent. */
.topbar-ask { height: 40px; padding: 0 10px; border-color: transparent; background: none; color: var(--ink-read, var(--ink)); font-weight: var(--w-ui, 500); font-size: var(--t-ui, 14px); }
.topbar-ask:hover { background: var(--hover); color: var(--ink); }
.topbar-ask[aria-expanded="true"] { background: var(--accent-soft); color: var(--ink); }
@media (min-width: 1280px) {
  .topbar > .topbar-tools { display: flex; }
  .topbar-ask { display: inline-flex; }
}
/* The profile menu */
.profile { position: relative; }
.profile > summary { list-style: none; }
.profile > summary::-webkit-details-marker { display: none; }
.tb-profile .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.profile-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; box-sizing: border-box; width: min(300px, calc(100vw - 24px)); padding: 6px; display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--elev-2); }
.profile-id { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); }
.profile-id .avatar { width: 36px; height: 36px; }
.profile-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.35; }
.profile-text strong { color: var(--ink); font-weight: var(--w-ui, 500); overflow-wrap: anywhere; }
.profile-text .small { overflow-wrap: anywhere; }
.pop-group { display: grid; gap: 2px; }
.pop-group + .pop-group { border-top: 1px solid var(--line); padding-top: 4px; }
.profile-pop form { margin: 0; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; box-sizing: border-box; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: var(--t-ui, 14px); font-weight: var(--w-read, 400); text-align: left; text-decoration: none; cursor: pointer; }
.pop-item:hover { background: var(--hover); color: var(--ink); }
.pop-item svg { flex: none; color: var(--muted); }
.pop-item span.i-moon, .pop-item span.i-sun { line-height: 1.2; }
.pop-narrow { display: none; }
/* Narrow screens: the workspace name keeps the room; Workspace settings moves into the profile
   menu, and Ask NOLSEM shows its icon only. */
@media (max-width: 479px) {
  .tb-settings { display: none; }
  .pop-narrow { display: flex; }
  .topbar-tools { gap: 0; }
}
/* The sidebar footer: Platform Administration, for staff only. Nobody else gets a footer. */
.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 767px) { .topbar-ask { width: 40px; } }
@media (max-width: 767px) and (pointer: coarse) { .topbar-ask { width: 44px; } }
/* The header keeps its height (52 px; 53 with its border on wide screens): the 40 px controls,
   and 44 px on touch screens, take the room from the header's own padding. */
@media (min-width: 1280px) { .topbar { padding-block: 6px; } }
@media (max-width: 1279px) { .topbar { padding-block: 5px; } }
@media (pointer: coarse) { .topbar { padding-block: 3px; } }
/* Phones: the client's name is what the header must keep. "Clients /" and the area name give
   way (Clients is in the bottom bar); the name truncates last. */
@media (max-width: 599px) {
  .topbar-crumbs .topbar-up, .topbar-crumbs .sep, .topbar-crumbs .topbar-area { display: none; }
  .topbar-crumbs .topbar-client { flex: 1 1 auto; min-width: 0; }
  .topbar-crumbs, .topbar-org { min-width: 72px; }
}
/* Phones (Daryl, Nov 20): 44 × 44 px tap areas in the header whatever the input, at the same
   header height (52 px): the padding gives the room. */
@media (max-width: 767px) {
  .tb-icon { width: 44px; height: 44px; }
  .topbar-ask { width: 44px; height: 44px; }
  .topbar { padding-block: 3px; }
}
/* Client workspaces (Nov 20): each client's name is its way in, the same as Open workspace. */
.cw-name { all: unset; box-sizing: border-box; cursor: pointer; font-weight: 600; color: var(--ink); font-size: inherit; line-height: 1.3; border-radius: 4px; text-align: left; overflow-wrap: anywhere; }
.cw-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.cw-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cw-card .pf-head .cw-name { font-size: 16px; }
.cw-card { display: flex; flex-direction: column; gap: 10px; }
.cw-card .actions { margin-top: auto; }
/* The client's one status (Nov 20, 5:36 pm): a link to the work it names when this person can act on
   it, plain text otherwise. A dot keeps the urgency colour; Open workspace stays the primary action. */
.cw-status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; line-height: 1.4; }
.cw-status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.cw-status.tone-bad::before { background: var(--pink); }
.cw-status.tone-mid::before { background: var(--warn-line); }
.cw-status.tone-good::before { background: var(--good); }
a.cw-status-link { color: var(--accent-strong); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a.cw-status-link:hover { text-decoration-thickness: 2px; }
a.cw-status-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.cw-status-plain { color: var(--muted); }
.cw-table td .stack.tight { gap: 4px; align-items: flex-start; }
.cw-table th.num, .cw-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .cw-name { min-height: 32px; display: inline-flex; align-items: center; } }
.ctx-crumbs a.ctx-up { color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
/* The way back to the directory: an arrow drawn by CSS, so the link reads "Clients". */
.ctx-crumbs a.ctx-up::before { content: "‹" / ""; font-size: 18px; line-height: 1; color: var(--muted); margin-top: -2px; }
/* The five portfolio metrics on All clients (Nov 20, 4:26 pm): one shallow row on desktop, a
   compact grid on phones, the count and its unit side by side so they read at a glance. */
.pf-summary.cw-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cw-summary .stat.cw-stat { padding: 10px 14px; gap: 4px; border-radius: 10px; }
.cw-summary .stat-label { font-size: 12.5px; line-height: 1.25; }
.cw-stat-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.cw-summary .stat-value { font-size: 22px; }
.cw-summary .stat-note { display: inline; font-size: 12.5px; color: var(--muted); line-height: 1.25; }
@media (max-width: 1099px) { .pf-summary.cw-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .pf-summary.cw-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cw-summary .stat.cw-stat { padding: 8px 10px; }
  .cw-summary .stat-label { font-size: 12px; }
  .cw-summary .stat-value { font-size: 20px; }
  .cw-summary .stat-note { display: inline; font-size: 12px; }
  .cw-summary .cw-stat:last-child { grid-column: 1 / -1; }
}
/* Work across clients tab (Nov 20, 7:00 pm): a compact red number for the clients needing
   attention, inside the tab link; its meaning shows on hover and keyboard focus. */
.pf-tabs:has(.cw-work-tab) { overflow: visible; }
.pf-tabs a.cw-work-tab { position: relative; gap: 7px; }
.cw-tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pink); color: var(--bg); font-size: 12px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.pf-tabs a.cw-work-tab::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 500; white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s; }
.pf-tabs a.cw-work-tab:hover::after, .pf-tabs a.cw-work-tab:focus-visible::after { opacity: 1; visibility: visible; }
.pf-tabs a.cw-work-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* The Need attention card: the long unit on phones, where there's no hover. */
.cw-note-phone { display: none; }
@media (max-width: 599px) {
  .cw-stat-phone .stat-label { display: none; }
  .cw-stat-phone .cw-note-wide { display: none; }
  .cw-stat-phone .cw-note-phone { display: inline; }
}

/* Report table headings (Daryl, Nov 20, 2:21 pm). A heading fits on one or two readable lines:
   each column is at least as wide as the longer line of its heading's best two-line split (th-wN,
   in characters, set by src/desk/report-data.js for headings of three words or more; 0.85ch covers
   the widest letters measured in these headings), plus room for the help mark and the sort arrow.
   Shorter headings keep their natural width.
   The help mark stays with the last word. When the columns don't fit, the table scrolls sideways
   inside its frame (.tablewrap) instead of stacking a word per line. Phones keep their list view,
   and printed pages keep their own sizing. */
.report-table.rt th.num, .report-table.rt td.num { padding-left: 12px; padding-right: 12px; }
.report-table.rt thead tr.rt-cols th.num { white-space: normal; }
.report-table.rt thead tr.rt-cols th[class*="th-w"] { min-width: calc(var(--th-ch, 8) * 0.85ch + 24px + var(--th-tip, 0px) + var(--th-arrow, 0px)); }
.report-table.rt thead tr.rt-cols th.has-tip .rt-sort { align-items: flex-end; min-width: 0; }
.report-table.rt .rt-head { display: inline-flex; align-items: flex-end; max-width: 100%; }
.report-table.rt thead tr.rt-cols th.has-tip { --th-tip: 20px; }
.report-table.rt[data-sort] thead tr.rt-cols th.num { --th-arrow: 12px; }
.report-table.rt .th-l { text-wrap: balance; }
.report-table.rt .th-end { white-space: nowrap; }
.report-table.rt .rt-head > .def-link { flex: none; margin-bottom: 4px; }
.th-w4 { --th-ch: 4; }
.th-w5 { --th-ch: 5; }
.th-w6 { --th-ch: 6; }
.th-w7 { --th-ch: 7; }
.th-w8 { --th-ch: 8; }
.th-w9 { --th-ch: 9; }
.th-w10 { --th-ch: 10; }
.th-w11 { --th-ch: 11; }
.th-w12 { --th-ch: 12; }
.th-w13 { --th-ch: 13; }
.th-w14 { --th-ch: 14; }
.th-w15 { --th-ch: 15; }
.th-w16 { --th-ch: 16; }
.th-w17 { --th-ch: 17; }
.th-w18 { --th-ch: 18; }
.th-w19 { --th-ch: 19; }
.th-w20 { --th-ch: 20; }
.th-w21 { --th-ch: 21; }
.th-w22 { --th-ch: 22; }
.th-w23 { --th-ch: 23; }
.th-w24 { --th-ch: 24; }
.print-page .report-table.rt thead tr.rt-cols th.num { min-width: 0; }
@media print { .report-table.rt thead tr.rt-cols th.num { min-width: 0; } }

/* Where to save it (Nov 20, 8:20 pm). Each label is one line ("Title (optional)"), both labels
   are the same height with the same space beneath, and both boxes are the same height, so the
   title box and the project dropdown line up. Each label wraps its own field, so when the row
   stacks on a phone the label stays directly above its field. */
.save-row { align-items: start; row-gap: 20px; }
.save-field { gap: 6px; }
.save-label { display: block; line-height: 20px; white-space: nowrap; }
.save-label .small { font-weight: 400; line-height: 1; }
.save-row select, .save-row input[type=text] { width: 100%; height: 44px; min-height: 44px; }
.save-row input[type=text] { padding-block: 0; }

/* One quiet link to the details. */
.ai-howlink a, .ask-foot a { color: var(--muted); }
.ai-howlink a:hover, .ask-foot a:hover { color: var(--ink); }

/* NOLSEM Privacy & Terms (public page) */
.legal { display: flex; flex-direction: column; gap: 24px; padding-block: 32px 64px; }
.legal-status { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--ink); font-size: 14px; }
.legal-jump { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.legal-jump a { min-height: 44px; display: inline-flex; align-items: center; }
.legal-part { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 16px; }
.legal-part > h2 { font-size: 24px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.legal-sec { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 16px; }
.legal-sec h3 { font-size: 17px; margin: 0; }
.legal p, .legal-list { margin: 0; max-width: 68ch; font-size: 15.5px; line-height: 1.6; }
.legal-list { padding-left: 20px; display: grid; gap: 6px; }
.legal-contact { font-weight: 500; user-select: all; }
@media (max-width: 599px) { .legal-jump { flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 16px; } }
/* Narrow phones (found in production on Nov 20 at 375 px): the client's name has the room. The
   NOLSEM logo stays, at the rail's compact size, and still opens Home; the client's badge gives
   way, since its name follows. */
@media (max-width: 599px) { .topbar .topbar-product .wordmark { font-size: 11px; letter-spacing: 0.04em; } .topbar .topbar-product { min-height: 44px; align-items: center; } .topbar .topbar-client .crumb-mark, .topbar .topbar-org .crumb-mark { display: none; } }

/* Phones: the list a tap on the header's client name opens shows each name whole, so two clients
   that start the same can be told apart before switching (Nov 20, 10:35 pm). */
@media (max-width: 599px) { .switch-name { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; } .topbar .topbar-client { min-height: 44px; } }
/* The one-click light/dark switch beside the settings gear (Nov 20). A form, so it works without
   script; the icon follows the page's appearance (.i-moon and .i-sun above). */
.tb-theme-form { display: contents; }
.tb-theme .i-moon, .tb-theme .i-sun { line-height: 0; }
/* Phones: with the light/dark switch in the bar, the bar's gaps tighten a little so a client's name
   keeps the room it had (Nov 20). Tap areas stay 44 × 44. */
@media (max-width: 599px) { .topbar { gap: 4px; } .topbar .topbar-product .wordmark { letter-spacing: 0; } }
/* Nov 21: the profile menu no longer has a Light/Dark appearance row, so the header's switch shows
   at every width, the smallest phones included; there the client's name shortens with an ellipsis
   (one tap shows it whole). */
/* Studio, one assistant at a time (Nov 20, 10:35 pm). Each panel says whose it is: This piece, or
   Workspace · name. With room, the workspace conversation takes the piece panel's place beside the
   document (data-ws-dock); without it, it lies over the page, or fills a phone. */
.ask-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ask-scope { color: var(--muted); }
.side-scope { color: var(--muted); padding: 12px 16px 0; }
.studio[data-ws-dock] > .studio-side { display: none !important; }
.studio[data-ws-dock] > .ask-panel { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: auto; width: auto; min-width: 0; max-height: calc(100vh - 24px); align-self: start; padding: 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px var(--shadow); overflow: hidden; }
/* Phone report list (Nov 20, 9:12 pm). A long metric name no longer pushes its value past the card:
   the name and the value share a line when they fit, and the value moves under the name when they
   don't. Both wrap inside the card; nothing is cut off and nothing scrolls sideways. */
@media (max-width: 640px) {
  .report-table td, .report-table.rt td.num { flex-wrap: wrap; align-items: baseline; row-gap: 2px; white-space: normal; overflow-wrap: anywhere; }
  .report-table td::before { flex: 1 1 auto; min-width: 0; max-width: 100%; white-space: normal; text-align: left; }
}
/* Optional-field labels (Nov 20, 9:12 pm): "(optional)" stays on the label's line, right after it.
   On a narrow screen the label may wrap, but its last word keeps "(optional)" beside it
   ("pieces (optional)"). */
label.opt-label { display: block; }
.opt-label .small { font-weight: 400; }
.opt-keep { white-space: nowrap; }
/* Studio on phones and tablets (Daryl's iPhone, Nov 21): nothing makes the page wider than the
   screen. The closed piece drawer waits off to the right, hidden, so Safari doesn't count it as page
   width; it slides in when opened, as before. */
@media (max-width: 1279px) {
  html:has(.studio[data-studio]) { overflow-x: clip; }
}
@media (min-width: 701px) and (max-width: 1279px) {
  .studio:not([data-side-open]) .studio-side { visibility: hidden; }
}
@media (min-width: 701px) and (max-width: 1279px) and (prefers-reduced-motion: no-preference) {
  .studio:not([data-side-open]) .studio-side { transition: transform .2s ease, visibility 0s linear .2s; }
  .studio[data-side-open] .studio-side { transition: transform .2s ease, visibility 0s; }
}
/* Touch screens: the fields on a Studio page and in Ask NOLSEM are at least 16 px, so Safari doesn't
   zoom the page in when one is tapped (a zoomed page is what cut the panel's edges off). */
@media (pointer: coarse) {
  :root:has(.studio[data-studio]) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea), .ask-panel :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { font-size: 16px; }
}
/* + New conversation (Nov 21, 11:17 am). On the NOLSEM AI page: the purple Write button style at
   the right of the page header, lined up with the writing area's right edge; Review answers, where
   shown, sits to its left as a secondary button. In the Ask NOLSEM drawer: the same purple button
   at the upper right of the conversation area, kept in view while the thread scrolls; × stays in
   the drawer's header. A click always shows where to type: the box is brought into view, focused
   and briefly outlined. */
.ask-head .ask-title { flex: 1 1 0; min-width: 0; }
.ask-head .ask-scope { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ai-new { gap: 6px; white-space: nowrap; }
.ai-new > span[aria-hidden] { font-size: 17px; line-height: 1; font-weight: 500; }
.btn.small.ai-new { min-height: 40px; }
.ask-convbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap; margin: -4px 0 0; padding: 8px 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 -12px 0 var(--surface); }
.ask-convbar > .small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-convbar .ask-new { flex: none; }
@media (pointer: coarse), (max-width: 767px) { .btn.small.ai-new, .ai-new { min-height: 44px; padding-inline: 16px; } .ask-head [data-ask-close] { width: 44px; height: 44px; } }
@keyframes ai-flash { from { box-shadow: 0 0 0 4px var(--accent-soft), 0 6px 24px var(--shadow); border-color: var(--accent); } to { box-shadow: 0 6px 24px var(--shadow); } }
.ai-composer.ai-flash { animation: ai-flash 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .ai-composer.ai-flash { animation: none; border-color: var(--accent); } }
/* NOLSEM AI's writing bar on phones (Nov 21, 12:36 pm). A select is as wide as its longest option,
   so a long audience name ("Entrepreneurs, growing businesses and established organizations")
   made "For" 467 px wide in a 343 px box, cut off at the right. Each label and its select may now
   shrink to the bar; a long name shows with an ellipsis and in full in the list. On phones "For"
   takes its own row and its select fills it. On touch screens the box and the pickers are 16 px,
   so Safari doesn't zoom in when one is tapped. */
.ai-bar .inline-label { min-width: 0; max-width: 100%; }
.ai-bar .inline-label select { flex: 0 1 auto; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 767px) {
  .ai-bar .inline-label:has(select[name=audience]) { flex: 1 1 100%; }
  .ai-bar .inline-label select[name=audience] { flex: 1 1 auto; }
}
@media (pointer: coarse) { .ai-composer :is(textarea, select) { font-size: 16px; } }
/* "What needs my attention?" in NOLSEM AI (Nov 21): what is waiting, by category, with counts and
   links to each queue, under the answer. */
.ai-attention { display: grid; gap: 8px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface-2, transparent); border-radius: 0 8px 8px 0; }
.ai-att-list { display: grid; gap: 10px; }
.ai-att-cat { display: grid; gap: 4px; min-width: 0; }
.ai-att-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-weight: 500; }
.ai-att-n { min-width: 24px; padding: 0 7px; border-radius: 999px; background: var(--accent-soft, var(--surface)); color: var(--ink); font-size: 13px; text-align: center; }
.ai-att-cat ul { display: grid; gap: 2px; padding-left: 2px; }
.ai-att-cat li { overflow-wrap: anywhere; }
/* Studio's Check panel, one finding at a time (Nov 21): where to look, why it was flagged and what
   to do next, for someone new to NOLSEM. The finding's words are marked in the document. */
.ck-guide { display: grid; gap: 12px; }
.ck-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ck-step { display: grid; gap: 8px; }
.ck-progress { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.ck-step.blocking .ck-progress { color: var(--pink); }
.ck-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ck-step.blocking .ck-card { border-left: 3px solid var(--pink); }
.ck-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ck-quote { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ck-quote mark, .doc-page .ck-mark { background: var(--mark-bg, #fff1b8); color: inherit; border-radius: 3px; box-shadow: 0 0 0 2px var(--mark-bg, #fff1b8); }
.ck-why { font-size: 15px; line-height: 1.5; }
.ck-pane { display: grid; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.ck-recheck { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: transparent; padding: 0; }
.ck-facts { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.45; }
.ck-facts li { overflow-wrap: anywhere; }
.ck-facts li > span:first-child { display: inline-block; min-width: 52px; margin-right: 6px; color: var(--muted); }
.ck-compare { display: grid; gap: 8px; }
.ck-compare .diff-del, .ck-compare .diff-ins { padding: 6px 8px; border-radius: 6px; }
.ck-result { margin: 0; font-size: 14px; }
.ck-result:empty { display: none; }
.ck-result.good { color: var(--good); font-weight: 500; }
.ck-result.bad { color: var(--pink); font-weight: 500; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ck-nav [hidden] + .btn { margin-left: auto; }
.ck-guide:not(.live) .ck-nav, .ck-guide:not(.live) .ck-show { display: none; }
.ck-all > summary { cursor: pointer; font-weight: 500; }
.ck-all[open] > summary { margin-bottom: 8px; }
:root[data-theme="dark"] { --mark-bg: #5a4a10; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mark-bg: #5a4a10; } }
/* ==========================================================================================
   Typography v2 (proto/typography, Nov 19, 2026; for Daryl's decision, not released).
   One job per kind of text, set once here and used by the shared components:
     reading   drafts, AI replies, claim wording, table values: regular, the calmest ink
     ui        navigation, buttons, controls: medium
     heading   page and section headings, a decision that needs attention: semibold
     meta      timestamps, supporting notes: smaller and quieter, still at least 4.5:1
   Hierarchy comes from size, alignment and space first; weight last.
   The font is one token: Inter (chosen by Daryl Nov 21, 2026, after comparing Source Sans 3, Inter
   and IBM Plex Sans on Home, Studio and Insights), at its own size.
   ========================================================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-wght-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
:root {
  --t-read: 16px; --t-body: 15px; --t-ui: 14px; --t-meta: 13px; --t-label: 12.5px;
  --t-h1: clamp(26px, 2.6vw, 32px); --t-h2: 19px; --t-h3: 16px;
  --lh-read: 1.65; --lh-body: 1.5; --lh-head: 1.25;
  --w-read: 400; --w-ui: 500; --w-head: 600;
  --measure: 38em; /* about 70 characters; in em, not ch, so both typefaces get the same column */
  /* Light: crisp. Reading text near-black; supporting text a mid grey that stays above 6:1. */
  --ink-read: #1A2534; --muted: #4F5A67;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ink-read: #D5DCE6; --muted: #A9B3C2; } }
:root[data-theme="dark"] { --ink-read: #D5DCE6; --muted: #A9B3C2; }
/* Nov 21, 2026 (Daryl): Inter is NOLSEM's core font (it was Source Sans 3 from Nov 20), at its own
   size: the app's sizes, weights and spacing are unchanged, as in the comparison he chose from.
   Report figures line up because report tables ask for tabular figures (Inter's default figures
   are proportional). The wordmark keeps its current Geist lettering until the logo work. */
:root { --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; --serif: var(--sans); }
.wordmark { font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif; }

body { font-size: var(--t-body); line-height: var(--lh-body); color: var(--ink-read); font-weight: var(--w-read); }
/* Dark backgrounds make light text look heavier; grey-scale smoothing keeps paragraphs calm on Macs. */
:root[data-theme="dark"] body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } }

/* Headings: semibold, the brightest ink, size sets the level. */
h1, h2, h3, .h-sm, .box-head h2 { color: var(--ink); font-weight: var(--w-head); line-height: var(--lh-head); }
h1 { font-size: var(--t-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--t-h2); letter-spacing: -0.012em; }
h3, .h-sm, .box-head h2 { font-size: var(--t-h3); letter-spacing: -0.006em; }
.lede { font-size: var(--t-body); color: var(--muted); line-height: var(--lh-body); max-width: 62ch; }
.eyebrow { font-size: 12px; font-weight: var(--w-ui); letter-spacing: 0.06em; color: var(--muted); }
.small, .row-sub { font-size: var(--t-meta); color: var(--muted); }

/* Navigation and controls: medium. The selected place is marked by its background and a bar,
   not by heavier type, so nothing shifts. */
.menu a { font-size: var(--t-ui); font-weight: var(--w-ui); color: var(--muted); }
.menu a:hover { color: var(--ink); }
/* The menu already marks the selected place with its background and a bar (Round 57); the type stays medium. */
.sidebar .menu a[aria-current="page"], .sidebar .menu a[aria-current="page"]:hover { color: var(--ink); font-weight: var(--w-ui); }
.btn, .linkbtn, .rd-label, .box-head a { font-weight: var(--w-ui); font-size: var(--t-ui); }
label, .inline-label, legend { font-weight: var(--w-ui); }
input, textarea, select { font-weight: var(--w-read); }

/* Status labels: they say where a thing stands; they don't compete with it. */
.pill { font-size: 12px; font-weight: var(--w-ui); padding: 1px 8px; }

/* Home: the decision. The claim reads first; its status and the action sit quietly at the end. */
.decision-list .row-link .stack.tight > span:first-child { font-size: 15.5px; font-weight: var(--w-read); color: var(--ink); line-height: 1.45; }
.decision-list .row-link > span:first-child:not(.stack) { font-size: 15.5px; color: var(--ink); }
.decision-list .row-link { padding: 14px 12px; align-items: flex-start; }
.decision-list .row-end { gap: 14px; padding-top: 2px; }
.decision-list .pill { background: none; border: 0; padding: 0 0 0 14px; position: relative; color: var(--muted); font-weight: var(--w-read); font-size: var(--t-meta); }
.decision-list .pill::before { content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--line-strong); }
.decision-list .pill.bad::before { background: var(--pink); }
.decision-list .pill.mid::before { background: var(--warn-line); }
.decision-list .pill.good::before { background: var(--good); }
.row-go { font-size: var(--t-ui); font-weight: var(--w-ui); color: var(--accent-strong); }

/* NOLSEM AI: the answer is the page. Reading size and measure, regular weight, the calm ink;
   the list of conversations and the labels around the answer step back. */
.ai-text { font-size: var(--t-read); line-height: var(--lh-read); max-width: var(--measure); color: var(--ink-read); font-weight: var(--w-read); }
.ai-ask { font-size: var(--t-body); color: var(--ink); }
.ai-who { font-size: var(--t-label); font-weight: var(--w-ui); color: var(--muted); }
.ai-conv-title { font-size: var(--t-ui); font-weight: var(--w-read); color: var(--ink-read); }
.ai-convs a .when { font-size: 12.5px; color: var(--muted); }
.ai-convs a[aria-current="page"] .ai-conv-title { color: var(--ink); font-weight: var(--w-ui); }
.ai-answer .small, .ai-answer .eyebrow { font-size: var(--t-meta); }
.ai-text strong, .ai-text b { font-weight: var(--w-head); color: var(--ink); }
.ai-text em, .ai-text i { font-style: italic; }

/* Reports: key figures large but not heavy; table values regular and aligned; totals stand out
   by background and a rule, with one step of weight. */
.rs-label, .kpi-label { font-size: var(--t-label); font-weight: var(--w-ui); color: var(--muted); }
.rs-value, .kpi-value { font-weight: var(--w-ui); font-size: 28px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.rs-note { font-size: 12.5px; }
.report-table.rt { font-size: var(--t-ui); }
.report-table.rt td.num { font-weight: var(--w-read); color: var(--ink-read); font-variant-numeric: tabular-nums lining-nums; }
.report-table.rt thead th { font-weight: var(--w-ui); font-size: var(--t-label); }
.report-table.rt th[scope="row"] { font-weight: var(--w-ui); color: var(--ink); }
.report-table.rt tr.is-total th, .report-table.rt tr.is-total td { font-weight: var(--w-head); color: var(--ink); }
.rd-cap, .rd-note, .rd-more { font-size: var(--t-meta); }

/* Forms and errors: the label medium, the entry regular, the error in words beside the field. */
.flash.err { font-weight: var(--w-read); }
.field-error, .err-text { font-size: var(--t-meta); font-weight: var(--w-ui); color: var(--pink); }

/* A reading or writing surface can be roomier than a working list or a table. */
.ai-thread, .doc-page, .br-report, .rep-body { --t-read: 16.5px; }


/* ==========================================================================================
   Typography rollout (Nov 20, 2026): the same jobs across every area, through the shared
   components. Labels, table headings, counts, statuses and selected tabs are medium; headings
   and a decision that needs attention stay semibold; values and reading text are regular.
   ========================================================================================== */
/* Labels and supporting headings: medium. */
.ws-name, .count, .kind, th, dl.kv dt, .issue-fix span, .bar-n, .plan-badge, .btn.cta, .part-status, .ai-rec-id,
.proj-link, .home-ask .ask-label, .home-details > summary, .issue-what dt, .save-box > summary, .onb-steps li.is-now,
.dp-fold > summary, .detail-panel dl.kv.intel-kv dt, .cmp-summary, .cmp-facts dt, .outcome-area, .org-name,
.ctx-crumbs .ctx-client, .section-pick-now, dl.person-kv dt, .dash-filters label, .rf-row label, .rf-label, .bp-name,
.rep-meta span:first-child, .def-link, .rep-defs > summary, .dropzone .dz-name:not(:empty), .start-n, .rf-group > legend,
.def-meta dt, .setup-step::before, .seat-tile strong, .pf-search-label, .chart-kpi-value, .chart-svg .chart-value,
.aa-review dt, .aa-table th[scope="row"], .rev-def dt, .cs-back, .intel-src legend, .chip-row a[aria-current="true"],
.audit-sec-hidden, .wiz-legend, .share-table thead th, .field-label, .field-tag, .share-table td[data-label]::before,
.share-table tbody th, .usage-num, .plan-name, .cc-estimate, .pkg-table th[scope=row], .rq-tile dd, .rt-table th[scope=row],
.seg a[aria-current="page"], .dj-pct, .dj-steps li.now, details.rec-group > summary, .rv-n, .inav-primary a[aria-current],
.inav-n, .isub-list a[aria-current="page"], .isub-menu a[aria-current="page"], dl.disc-stats dd, dl.brand-ident dd.brand-name,
.ai2-crit legend, .welcome-steps li[aria-current="step"], .hq-count, .hq-client, .hq-facts dd,
.hq-backline .back, .wi-v, .wi-act, .ai-save-row .ai-save, .rv-done a, .rv-more summary,
.rv-back, .rv-choice legend, .rv-radio-text strong, .br-count, .br-kind, .br-facts dd, .br-who, .br-how summary,
.br-mail-head dd, .report-table th[scope="row"], .stat-value, .score-num, .ring-num { font-weight: var(--w-ui); }
/* A word bolded inside a sentence ("Drafts save to <strong>Spring launch</strong>") is intentional
   emphasis and stays semibold. */
/* Titles of things in a list, and the words being decided: regular, in the brightest ink; size,
   not weight, sets them apart. */
.row-title, .work-title, .wi-title, .proj-name, .rv-title, .rv-words, .notice-text { font-weight: var(--w-read); color: var(--ink); }
.row-title, .work-title, .wi-title, .proj-name { font-size: 15.5px; }
.notice-list .is-new .notice-text { font-weight: var(--w-ui); }
/* Eyebrows: a quiet label, not a shout. */
.eyebrow, .eyebrow.accent { font-size: 12px; font-weight: var(--w-ui); letter-spacing: 0.06em; }
.eyebrow.accent { color: var(--accent-strong); }
.kpi-label, .rs-label, .stat-label { font-weight: var(--w-ui); color: var(--muted); }
th { color: var(--muted); }
/* Writing fields: what someone writes is reading text. */
textarea { font-weight: var(--w-read); font-size: 16px; line-height: 1.55; }

/* Create: the work someone came back to finish leads; suggestions sit quietly beside it. */
.work-row .work-title { font-size: 16px; }
.create-side .h-sm { font-size: 14.5px; color: var(--muted); font-weight: var(--w-ui); }
.create-side #na-h { color: var(--ink); font-size: 16px; font-weight: var(--w-head); }
.sugg-box { border-color: var(--line); background: var(--bg); box-shadow: none; }
.sugg-box strong { font-weight: var(--w-read); font-size: 14.5px; color: var(--ink-read); }
.sugg-box p { color: var(--muted); }
.sugg-box .btn.small { background: none; border-color: transparent; box-shadow: none; color: var(--accent-strong); padding: 0 4px; min-height: 32px; }
.sugg-box .btn.small:hover { text-decoration: underline; background: none; }

/* Review: the claim to decide reads first. The claim is the heading; labels around it are quiet;
   the draft and the source read as text. */
.detail-in > .stack:first-of-type h2, .detail h2 { font-size: clamp(21px, 2.2vw, 25px); font-weight: var(--w-head); line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.detail .meta { font-size: var(--t-meta); color: var(--muted); }
.detail blockquote { font-size: var(--t-read); line-height: var(--lh-read); color: var(--ink-read); max-width: var(--measure); }
.compare > div { font-size: var(--t-body); }
.needs, .verdict { font-size: var(--t-body); }
/* Labels above sections read as quiet sentence-case labels, not uppercase shouts. */
.eyebrow, .eyebrow.accent { text-transform: none; letter-spacing: 0; font-size: 13px; }
/* A field with an error: marked by its edge, with the reason under it in words. */
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink); }
.kind { text-transform: none; letter-spacing: 0; font-size: 12.5px; }

/* ==========================================================================================
   Typography release criterion (Daryl, Nov 20, 2026): headings stay distinct; the names,
   notices and draft titles that repeat down a list read at regular or medium weight, never
   heavier than the heading above them.
   A <strong> that names a thing (a client, a finding, a draft, a choice, a person) is a title,
   not emphasis: medium. Emphasis inside a sentence, a notice's lead-in or an alert stays
   semibold. Row titles stacked over a note, and the draft under Continue, are regular in the
   brightest ink, with room for three lines.
   ========================================================================================== */
strong, b { font-weight: var(--w-ui); }
:where(p, .lede, .flash, [role="alert"], [role="status"], [role="note"], blockquote, .writing-for, .ai-dest, .summary-line) strong,
:where(p, .lede, .flash, [role="alert"], [role="status"], [role="note"], blockquote) b { font-weight: var(--w-head); }
.ai-text strong, .ai-text b { font-weight: var(--w-head); }
.row-item > .stack.tight > strong:first-child, .continue-card .stack.tight > strong,
.record .stack.tight > strong:first-child { font-weight: var(--w-read); color: var(--ink); font-size: 15.5px; line-height: 1.45; }
.continue-card .stack.tight > strong { font-size: 16px; line-height: 1.45; text-wrap: pretty; max-width: 42em; }
.pf-name > strong, .who-text strong, td > strong:first-child, .split > strong:first-child { font-weight: var(--w-ui); color: var(--ink); }
/* Section headings inside a box: a step up in size as well as weight, so they stay distinct from
   the medium names under them. */
.h-sm, .box-head h2 { font-size: 17px; }
.create-side .h-sm { font-size: 14.5px; }
/* Column labels in the people list are labels, like table headers: medium. A figure slot that holds
   words ("No reviews decided") reads as a sentence, not a figure. */
.people-head { font-weight: var(--w-ui); }
dl.kv dd.kv-words { font-size: var(--t-body); font-weight: var(--w-read); color: var(--muted); }
/* A record's name in a paragraph-shaped title row (Intelligence › Discoveries) is a name: medium. */
p.rv-title > strong:first-child { font-weight: var(--w-ui); }
/* A person's account facts (dates, On or Off, tool names) are facts to read, not figures. */
dl.kv.two-col.facts dd { font-size: var(--t-body); font-weight: var(--w-read); color: var(--ink); }

/* Typography criterion (Nov 21 sweep): a client's name on the Client workspaces cards is a name in
   a list, so medium, like other list names; the card's heading level stays with its section. */
.cw-name { font-weight: var(--w-ui); }

/* Typography criterion (Nov 21): report headings are sized by their longest line in characters
   (th-w*). With Source Sans 3 the Geist factor (0.85ch) left "Waiting when generated" three lines;
   1ch keeps two lines with Inter too (its 0, which sets the ch unit, is wider). */
.report-table.rt thead tr.rt-cols th[class*="th-w"] { min-width: calc(var(--th-ch, 8) * 1ch + 24px + var(--th-tip, 0px) + var(--th-arrow, 0px)); }

/* Check panel revision 2 (Nov 21): a title naming the issue, one status, places to move between,
   one compact list of all findings, evidence on the figure's card, reference sources in rows. */
.ck-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ck-counts { color: var(--muted); }
.ck-title { margin: 0; font-size: 17px; line-height: 1.3; text-wrap: balance; }
.ck-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ck-placenav { color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.ck-more { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ck-line { display: grid; gap: 2px; overflow-wrap: anywhere; }
ul.plain.ck-verify { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ck-verify .ok > span { color: var(--good); }
.ck-verify .no > span { color: var(--pink); }
.ck-open-why { color: var(--ink); }
ul.plain.ck-rows { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ck-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; width: 100%; padding: 10px 6px; border-bottom: 1px solid var(--line); min-height: 44px; }
.ck-row:hover { background: var(--hover, var(--surface-2)); }
.ck-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ck-row[aria-current="true"] { background: var(--surface-2); }
.ck-row-t { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.ck-row-name { color: var(--ink); font-weight: 500; }
.ck-row-sec { color: var(--muted); }
.ck-row-meta { display: flex; align-items: center; gap: 8px; }
.ck-passed > summary, .ck-refs > summary { cursor: pointer; }
.ck-passed ul.plain { display: grid; list-style: none; gap: 4px; margin: 6px 0 0; padding: 0; }
.ck-refs { display: grid; gap: 8px; }
.ck-refs > summary { font-weight: 500; }
ul.plain.ref-list { display: grid; list-style: none; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ref-list > li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.ref-link { color: var(--accent-strong); font-weight: var(--w-ui); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.ref-id { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-price input, .ck-price textarea { font-size: 15px; padding: 8px 10px; min-height: 0; font-weight: 400; }
.ck-price textarea[readonly] { background: var(--surface-2); color: var(--ink); }

/* Home decision refinement (Daryl, Nov 21, 8:49 pm, from the font comparison): the decision's title
   a little stronger (medium, still lighter than its semibold heading), the line under it readable,
   and its action (Decide, Review, Open) a clear target in the same place on every row. Long draft
   titles under Continue keep their lighter, regular treatment: nothing outside the list changes. */
.decision-list .row-link .stack.tight > span:first-child, .decision-list .row-link > span:first-child:not(.stack) { font-weight: var(--w-ui); color: var(--ink); }
.decision-list .row-link .stack.tight > .small { font-size: 14px; line-height: 1.5; color: var(--muted); }
.decision-list .row-go { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--accent-strong); font-weight: var(--w-ui); }
.decision-list .row-link:hover .row-go, .decision-list .row-link:focus-visible .row-go { background: var(--accent-soft); text-decoration: none; }
.decision-list .row-end { align-items: center; padding-top: 0; }

/* Repurpose: figures verified against their source in an internal brief (Nov 21). */
.src-verified { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); padding: 12px 14px; }
.src-verified ul.plain { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.ck-carried { color: var(--muted); overflow-wrap: anywhere; }
.outcome-list .needs-approval .outcome-area { color: var(--bad, var(--pink)); }
/* Assistant replies (Nov 21): paragraphs, bold, numbered lists and bullets, the same while the reply
   streams, once it's saved and when it's reopened from Recent; on the NOLSEM AI page and in the
   Ask NOLSEM drawer. Citations stay as written and link to their source record. */
.ai-text.ai-fmt { white-space: normal; display: grid; gap: 0.7em; }
.ai-fmt > p, .ai-fmt > ol, .ai-fmt > ul { margin: 0; }
.ai-fmt ol, .ai-fmt ul { padding-left: 1.6em; display: grid; gap: 0.75em; }
.ai-fmt li > ol, .ai-fmt li > ul { margin-top: 0.35em; gap: 0.25em; }
.ai-fmt ol > li::marker { font-variant-numeric: tabular-nums; color: var(--muted); }
.ai-fmt ul > li::marker { color: var(--muted); }
.ai-fmt .ai-h { margin-top: 0.3em; }
.ai-fmt code { font-size: 0.92em; padding: 0 4px; border-radius: 4px; background: var(--surface-2); }
.ai-cite { font-size: 0.86em; color: var(--muted); white-space: nowrap; }
a.ai-cite { color: var(--accent-strong); text-decoration: none; }
a.ai-cite:hover, a.ai-cite:focus-visible { text-decoration: underline; }
