/* 21OS Portal. Tokens, type and controls follow the Sales Portal design system
   (../21PG-Sales-Portal/design.md); keep values in step with it rather than inventing new ones. */
:root {
  color-scheme: light;
  --night: #030d1d;
  --deep-navy: #031b39;
  --field-navy: #0b2d63;
  --brand-navy: #0b2d63;
  --core-navy: #1b2f5e;
  --step-border: #0b4a8f;
  --logo-blue: #7dacd5;
  --muted: #9fb2ce;
  --ice: #f0f4fa;
  --mist: #d6e0ee;
  --slate: #4c4f5b;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --canvas: #ecf1f7;
  --near-black: #1f2430;
  --line-strong: rgba(125, 172, 213, .62);
  --brand-fill: #0b2d63;
  --on-brand: #ffffff;
  --success: #28745a;
  --warning: #9a5b08;
  --danger: #a53a2c;
  --success-soft: #e9f6ef;
  --success-ink: #145d3d;
  --warning-soft: #fff4dc;
  --warning-ink: #714500;
  --danger-soft: #fff0ed;
  --danger-ink: #8b2f20;
  --backdrop: rgba(7, 24, 57, .68);
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 16px 38px rgba(3, 13, 29, .18);
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1rem, 3vw, 2.5rem);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-soft: #030d1d;
  --canvas: #030d1d;
  --surface: #0a1f3c;
  --ice: #112b50;
  --mist: #25436f;
  --line-strong: #4a77ab;
  --near-black: #e6edf7;
  --slate: #9fb2ce;
  --field-navy: #dce6f5;
  --success: #5cc49a;
  --warning: #e3a94b;
  --danger: #f08a7a;
  --brand-fill: #7dacd5;
  --on-brand: #0b2d63;
  --success-soft: #0f2e22;
  --success-ink: #8fdcb8;
  --warning-soft: #33260a;
  --warning-ink: #f2c879;
  --danger-soft: #3a1714;
  --danger-ink: #ffb4a8;
  --backdrop: rgba(0, 0, 0, .72);
  --shadow: 0 16px 38px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--near-black); background: var(--canvas); font: 400 1rem/1.5 var(--font-body); font-synthesis: none; }
::selection { color: var(--on-brand); background: var(--brand-fill); }
a { color: var(--field-navy); text-underline-offset: .18em; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--field-navy); font-family: var(--font-display); font-weight: 800; letter-spacing: .01em; text-transform: uppercase; line-height: 1; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
:focus-visible { outline: 2px solid var(--field-navy); outline-offset: 2px; }
.theme-switching, .theme-switching * { transition: none !important; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile-label { font-family: var(--font-display); font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.count { font-family: var(--font-display); font-style: italic; font-weight: 800; font-variant-numeric: tabular-nums; line-height: .9; }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }

/* Buttons (design.md → Buttons). */
.primary-action, .secondary-action, .quiet-action { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: var(--radius); text-decoration: none; cursor: pointer; white-space: nowrap; }
.primary-action, .secondary-action { min-height: 44px; padding: .7rem 1rem; font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.primary-action { border: 1px solid var(--brand-fill); color: var(--on-brand); background: var(--brand-fill); }
.primary-action:hover { background: color-mix(in srgb, var(--brand-fill), black 18%); }
.secondary-action { border: 1px solid var(--field-navy); color: var(--field-navy); background: var(--surface); }
.secondary-action:hover { background: var(--ice); }
.quiet-action { min-height: 38px; padding: .45rem .7rem; border: 1px solid var(--mist); color: var(--field-navy); background: var(--surface); font-size: .82rem; font-weight: 700; }
.quiet-action:hover { border-color: var(--field-navy); background: var(--ice); }
.quiet-action.danger { color: var(--danger-ink); border-color: color-mix(in srgb, var(--danger), transparent 60%); }
.quiet-action.danger:hover { background: var(--danger-soft); }
button:disabled, .primary-action[aria-disabled="true"] { cursor: not-allowed; border-color: var(--mist); color: var(--slate); background: var(--ice); }
button:not(:disabled):active, a.primary-action:active { transform: translateY(1px); }

/* Fields. */
input:not([type="checkbox"], [type="radio"], [type="file"]), select, .app-select, textarea { width: 100%; min-height: 44px; padding: .6rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--near-black); background: var(--surface); font-size: 1rem; }
textarea { min-height: 76px; resize: vertical; line-height: 1.45; field-sizing: content; }
select, .app-select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237dacd5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 18px; }
/* In-app dropdown (app.js enhances every select; same spec as the Sales Portal's Select). */
.app-select { display: flex; align-items: center; text-align: left; cursor: pointer; user-select: none; }
.app-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-select.placeholder .app-select-value { color: var(--slate); }
.app-select[aria-expanded="true"] { border-color: var(--logo-blue); }
.app-select-list { position: fixed; z-index: 100; display: grid; align-content: start; margin: 0; padding: .3rem; overflow-y: auto; overscroll-behavior: contain; list-style: none; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.app-select-option { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 44px; padding: .5rem .65rem; border-radius: var(--radius); color: var(--near-black); font-family: var(--font-body); font-size: .95rem; line-height: 1.35; cursor: pointer; }
.app-select-option > span { min-width: 0; overflow-wrap: break-word; }
.app-select-option.active { color: var(--field-navy); background: var(--ice); }
.app-select-option[aria-selected="true"] { color: var(--field-navy); font-weight: 700; }
.app-select-option[aria-selected="true"]::after { content: ""; flex: none; width: 16px; height: 16px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (forced-colors: active) { .app-select-option.active { outline: 2px solid Highlight; } .app-select-option[aria-selected="true"]::after { background: CanvasText; } }
input::placeholder, textarea::placeholder { color: var(--slate); opacity: .8; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--brand-fill); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field { display: grid; gap: .4rem; }
.field > label, .field > .label { color: var(--field-navy); font-weight: 700; font-size: .92rem; }
.field .hint, .uploader .hint { color: var(--slate); font-size: .84rem; }

/* Notices. */
.notice { padding: .75rem 1rem; border-radius: var(--radius); font-size: .92rem; }
.notice.error { color: var(--danger-ink); background: var(--danger-soft); }
.notice.success { color: var(--success-ink); background: var(--success-soft); }
.notice.warning { color: var(--warning-ink); background: var(--warning-soft); }
.env-banner { padding: .4rem var(--gutter); color: var(--warning-ink); background: var(--warning-soft); font-size: .82rem; font-weight: 700; text-align: center; }

/* Top bar (Sales Portal .topbar). */
.topbar { position: sticky; top: 0; z-index: 50; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 var(--gutter); border-bottom: 4px solid var(--logo-blue); background: var(--surface); }
.brand { min-width: 0; display: flex; align-items: center; gap: .75rem; color: var(--field-navy); text-decoration: none; }
.brand img { width: 42px; height: 42px; flex: none; border-radius: var(--radius); object-fit: cover; }
.brand em { padding-left: 1rem; border-left: 1px solid var(--mist); font-family: var(--font-display); font-size: 1rem; font-style: normal; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: .25rem; margin-right: auto; margin-left: 1.5rem; }
.main-nav a { white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .8rem; border-radius: var(--radius); color: var(--field-navy); font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.main-nav a:hover { background: var(--ice); }
.main-nav a[aria-current="page"] { color: var(--on-brand); background: var(--brand-fill); }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.theme-switch { min-height: 40px; display: inline-flex; align-items: center; padding: 0 .3rem; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.theme-switch-track { display: inline-grid; grid-template-columns: 28px 28px; gap: 2px; padding: 2px; border-radius: 5px; background: var(--ice); }
.theme-switch-track > span { display: grid; place-items: center; height: 26px; border-radius: 4px; color: var(--slate); }
.theme-switch-track > span.on { color: var(--on-brand); background: var(--brand-fill); }
.theme-switch .icon { width: 15px; height: 15px; }
.viewer { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .3rem .4rem .3rem .35rem; border: 1px solid var(--mist); border-radius: var(--radius); }
.viewer-avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--brand-navy); background: var(--logo-blue); font-family: var(--font-display); font-size: .95rem; font-weight: 800; letter-spacing: .04em; }
.viewer-name { display: grid; min-width: 0; line-height: 1.2; }
.viewer-name strong { color: var(--field-navy); font-family: var(--font-display); font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.viewer-name span { color: var(--slate); font-size: .75rem; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius); color: var(--field-navy); background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--ice); }

/* Page frame. */
.page { width: min(1240px, 100%); margin: 0 auto; padding: 1.75rem var(--gutter) 6rem; }
.page.narrow { width: min(820px, 100%); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 2.5rem; }

/* Sign-in (Sales Portal .auth-shell). */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--brand-fill); }
:root[data-theme="dark"] .auth-shell { background: var(--night); }
.auth-panel { width: min(440px, 100%); display: grid; justify-items: center; gap: 18px; padding: 34px; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.auth-logo { width: 104px; height: 104px; border-radius: var(--radius); object-fit: cover; }
.auth-panel h1 { font-size: 2.1rem; }
.auth-panel p { color: var(--slate); line-height: 1.55; }
.signin-button { width: 100%; }
.auth-footnote { color: var(--slate); font-size: .8rem; }
.page-head .sub { color: var(--slate); font-size: .95rem; }
.head-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; }
.head-actions .pickers .app-select { height: 100%; }
.pickers { display: flex; flex-wrap: wrap; gap: .5rem; }
.pickers select, .pickers .app-select { width: auto; min-width: 190px; min-height: 44px; font-family: var(--font-display); font-size: .95rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--field-navy); }
.pickers select.visually-hidden { width: 1px; min-width: 0; }
.auth-choices { display: grid; gap: .5rem; width: 100%; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 60; padding: .6rem 1rem; border-radius: var(--radius); color: var(--on-brand); background: var(--brand-fill); font-weight: 700; }
.skip-link:focus { left: .5rem; }
input, textarea { caret-color: var(--field-navy); }

/* Action colours (Sales Portal, Nov 2026): green moves forward or completes, yellow needs care, grey is neutral. */
:root { --action-go: #1f7a55; --action-go-hover: #17654a; --action-caution: #f2c14e; --action-caution-hover: #e6b134; --action-caution-ink: #1a1300; --action-neutral: #e4e9f0; --action-neutral-hover: #d6dde7; --action-neutral-ink: #1f2430; }
:root[data-theme="dark"] { --action-neutral: #2a3b57; --action-neutral-hover: #344968; --action-neutral-ink: #e6edf7; }
.primary-action { border-color: var(--action-go); color: #fff; background: var(--action-go); }
.primary-action:hover:not(:disabled) { border-color: var(--action-go-hover); background: var(--action-go-hover); }
.action-caution { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .7rem 1rem; border: 1px solid var(--action-caution); border-radius: var(--radius); color: var(--action-caution-ink); background: var(--action-caution); font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.action-caution:hover:not(:disabled) { border-color: var(--action-caution-hover); background: var(--action-caution-hover); }
.secondary-action, .quiet-action { border-color: transparent; color: var(--action-neutral-ink); background: var(--action-neutral); }
.secondary-action:hover:not(:disabled), .quiet-action:hover:not(:disabled) { border-color: transparent; background: var(--action-neutral-hover); }
.quiet-action { min-height: 44px; padding: .6rem .9rem; font-family: var(--font-display); font-size: .92rem; letter-spacing: .08em; text-transform: uppercase; }

/* Field edges (Sales Portal --field-border): fields on a white card are held by their edge alone. */
:root { --field-border: #6f83a3; }
:root[data-theme="dark"] { --field-border: #5583b8; }
input:not([type="checkbox"], [type="radio"], [type="file"]), select, .app-select, textarea { border-color: var(--field-border); }
.app-select[aria-expanded="true"] { border-color: var(--logo-blue); }

/* Chips: a status or priority always shows its word. */
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 .5rem; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--field-navy); font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.chip.danger { border-color: transparent; color: var(--danger-ink); background: var(--danger-soft); }
.chip.warning { border-color: transparent; color: var(--warning-ink); background: var(--warning-soft); }
.chip.unset { border-style: dashed; color: var(--slate); }

/* Forms. */
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.field.short { max-width: 260px; }
.optional { color: var(--slate); font-weight: 400; }
fieldset.plain { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.plain > legend { margin-bottom: .4rem; padding: 0; color: var(--field-navy); font-size: .92rem; font-weight: 700; }
.choice-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.choice-row label { position: relative; }
.choice-row input { position: absolute; inset: 0; opacity: 0; }
.choice-row span { min-width: 76px; min-height: 44px; display: inline-grid; place-items: center; padding: 0 .9rem; border: 1px solid var(--field-border); border-radius: var(--radius); color: var(--field-navy); background: var(--surface); font-weight: 700; cursor: pointer; }
.choice-row label:hover span { background: var(--ice); }
.choice-row input:checked + span { border-color: var(--brand-fill); color: var(--on-brand); background: var(--brand-fill); }
.choice-row input:focus-visible + span { outline: 2px solid var(--field-navy); outline-offset: 2px; }
.card { border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }
.card.empty { display: grid; justify-items: start; gap: .75rem; padding: 2rem 1.5rem; }
.card.empty h1, .card.empty h2 { font-size: 1.75rem; }
.card.empty p { color: var(--slate); }

/* Leadership Review: the open issue and the agenda on the left, the watchlist on the right. */
.page.wide { width: min(1480px, 100%); }
.page.wide { padding-top: 1.25rem; }
.page.wide .page-head { align-items: center; margin-bottom: 1rem; }
.page.wide .page-head > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .9rem; }
.page.wide .page-head .sub { margin-top: 0; }
.head-panel { display: grid; gap: 1rem; max-width: 640px; margin-bottom: 1.25rem; padding: 1.25rem; }
.review { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; gap: 1.5rem; }
.review-main { display: grid; gap: 1.75rem; min-width: 0; }

.issue-now { display: grid; gap: .85rem; padding: 1.25rem 1.5rem 1.5rem; border: 2px solid var(--field-navy); }
.now-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; color: var(--slate); }
.save-state { margin-left: auto; color: var(--success-ink); font-size: .86rem; font-weight: 700; }
.save-state.failed { color: var(--danger-ink); }
textarea.now-title { width: calc(100% + .9rem); min-height: 0; margin: -.25rem -.45rem; padding: .25rem .45rem; border-color: transparent; overflow: hidden; resize: none; field-sizing: content; color: var(--field-navy); background: transparent; font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
textarea.now-title:hover { border-color: var(--mist); }
textarea.now-title:focus { border-color: var(--line-strong); background: var(--surface); }
.now-meta { color: var(--slate); font-size: .92rem; }
.now-meta strong { color: var(--near-black); }
.text-link { display: inline-flex; align-items: center; gap: .25rem; margin-left: .5rem; font-weight: 700; }
.text-link .icon { width: 14px; height: 14px; }
.now-message { margin: 0; padding: .9rem 1rem; border-radius: var(--radius); color: var(--near-black); background: var(--ice); font-size: 1.1rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.now-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: .85rem 1rem; }
.now-fields textarea { min-height: 62px; }
.now-fields .wide { grid-column: 1 / -1; }

.outcomes { display: grid; gap: .9rem; padding-top: .9rem; border-top: 1px solid var(--mist); }
.outcome-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.outcome-buttons [aria-expanded="true"] { border-color: var(--brand-fill); color: var(--on-brand); background: var(--brand-fill); }
.outcome-buttons [aria-expanded="true"]:hover:not(:disabled) { border-color: var(--brand-fill); background: var(--brand-fill); }
.outcome-hint { margin: 0; padding: .6rem .85rem; border-radius: var(--radius); color: var(--warning-ink); background: var(--warning-soft); font-size: .92rem; font-weight: 600; }
.outcome-form { display: grid; gap: 1rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.steps { display: grid; gap: .5rem; }
.steps h3 { margin-top: .25rem; font-size: 1.1rem; }
.step-head, .step-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 170px; gap: .5rem; }
.step-head { color: var(--slate); font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.steps [data-add-step] { justify-self: start; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.section-head h2, .watchlist h2 { font-size: 1.35rem; }
.section-note { color: var(--slate); font-size: .92rem; }
.agenda-list, .decided-list, .watch-list { margin: 0; padding: 0; list-style: none; }
.agenda-list { overflow: hidden; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }
.agenda-list li + li { border-top: 1px solid var(--mist); }
.agenda-row { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; min-height: 58px; padding: .6rem 1rem; color: inherit; text-decoration: none; }
.agenda-row:hover, .agenda-row[aria-current] { background: var(--ice); }
.agenda-row:focus-visible { outline-offset: -2px; }
.agenda-num { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: var(--radius); color: var(--slate); font-size: 1.35rem; }
.agenda-row[aria-current] .agenda-num { color: var(--on-brand); background: var(--brand-fill); }
.agenda-text { display: grid; gap: .1rem; min-width: 0; }
.agenda-text strong { color: var(--field-navy); font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.meta { color: var(--slate); font-size: .86rem; }
.decided-title { margin: 1.25rem 0 .5rem; color: var(--slate); font-size: 1.05rem; }
.decided-list { display: grid; gap: .35rem; }
.decided-row { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); align-items: center; gap: .75rem; padding: .5rem 1rem; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface-soft); }
.decided-row > .icon { justify-self: center; color: var(--success); }
.decided-row strong { color: var(--slate); }
.decided-row .meta { color: var(--near-black); }
.decided-row.just { box-shadow: 0 0 0 2px var(--logo-blue); animation: settle .24s var(--ease); }
@keyframes settle { from { box-shadow: 0 0 0 8px transparent; background: var(--ice); } }

.watchlist { position: sticky; top: calc(68px + 1rem); display: grid; gap: .6rem; max-height: calc(100vh - 68px - 2rem); overflow-y: auto; }
.watch-top { position: sticky; top: 0; z-index: 1; display: grid; gap: .5rem; padding-bottom: .15rem; background: var(--canvas); }
.watch-counts { display: grid; grid-template-columns: repeat(4, auto); overflow: hidden; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }
.watch-counts a { min-height: 58px; display: grid; align-content: space-between; gap: .2rem; padding: .45rem .5rem; color: var(--field-navy); text-decoration: none; }
.watch-counts a + a { border-left: 1px solid var(--mist); }
.watch-counts a:hover { background: var(--ice); }
.watch-counts a:focus-visible { outline-offset: -2px; }
.watch-counts .tile-label { color: var(--slate); font-size: .75rem; letter-spacing: .08em; line-height: 1.15; white-space: nowrap; }
.watch-counts .count { font-size: 1.35rem; }
.watch-group { scroll-margin-top: 7.5rem; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }
.watch-head { display: flex; align-items: center; gap: .6rem; min-height: 48px; padding: .35rem .9rem; color: var(--field-navy); list-style: none; }
summary.watch-head { cursor: pointer; border-radius: var(--radius); }
summary.watch-head::-webkit-details-marker { display: none; }
summary.watch-head:hover { background: var(--ice); }
.watch-head .count { margin-left: auto; font-size: 1.75rem; }
.watch-head .icon { color: var(--slate); }
details[open] > .watch-head .icon { transform: rotate(180deg); }
.watch-group.none .watch-head { color: var(--slate); }
.watch-list { border-top: 1px solid var(--mist); }
.watch-row { display: grid; gap: .15rem; padding: .6rem .9rem; }
.watch-row + .watch-row { border-top: 1px solid var(--mist); }
.watch-row strong { color: var(--near-black); font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.kind { margin-right: .45rem; padding: 0 .35rem; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--field-navy); font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.late { color: var(--danger-ink); font-weight: 700; }
.watch-note { color: var(--near-black); font-size: .86rem; line-height: 1.4; }

/* A control whose form is open takes the selected fill. */
[data-toggle][aria-expanded="true"], [data-toggle][aria-expanded="true"]:hover:not(:disabled) { border-color: var(--brand-fill); color: var(--on-brand); background: var(--brand-fill); }
/* Red removes or gives up (Sales Portal --action-stop). */
:root { --action-stop: #b3372a; --action-stop-hover: #962c21; }
.danger-action { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .7rem 1rem; border: 1px solid var(--action-stop); border-radius: var(--radius); color: #fff; background: var(--action-stop); font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.danger-action:hover:not(:disabled) { border-color: var(--action-stop-hover); background: var(--action-stop-hover); }
a.action-caution { text-decoration: none; }
.chip.success { border-color: transparent; color: var(--success-ink); background: var(--success-soft); }
.back-link { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; margin-bottom: .4rem; color: var(--field-navy); font-family: var(--font-display); font-size: .92rem; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.back-link:hover { text-decoration: underline; }
.none { color: var(--slate); font-size: .92rem; }

/* Tabs: the current one takes the selected fill. */
.tabs { display: flex; gap: .25rem; margin-bottom: 1.5rem; }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 1rem; border-radius: var(--radius); color: var(--field-navy); font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.tabs a:hover { background: var(--ice); }
.tabs a[aria-current="page"] { color: var(--on-brand); background: var(--brand-fill); }
.period-picker { margin-bottom: 1rem; }

/* Work lists: what it is and when on the left, its status on the right. */
.work-group, .item-section { display: grid; gap: .6rem; }
.work-group + .work-group { margin-top: 1.75rem; }
.work-group .section-head, .item-section .section-head { margin-bottom: 0; }
.work-group .section-head { justify-content: flex-start; }
.section-head .count { color: var(--field-navy); font-size: 1.35rem; }
.item-section .section-head { align-items: center; justify-content: flex-start; min-height: 44px; }
.item-section .section-head [data-toggle] { margin-left: auto; }
.work-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }
.work-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .6rem 1.25rem; padding: .75rem 1rem; }
.work-row + .work-row { border-top: 1px solid var(--mist); }
.work-row > .chip { justify-self: start; }
.save-state:empty { display: none; }
.work-text { display: grid; gap: .2rem; min-width: 0; }
.work-title { justify-self: start; color: var(--field-navy); font-size: 1.02rem; font-weight: 700; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.work-title:hover, .watch-link:hover { text-decoration: underline; }
.work-note { color: var(--near-black); font-size: .86rem; line-height: 1.4; }
.watch-link { justify-self: start; color: var(--near-black); font-size: 1.02rem; font-weight: 700; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.status-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; max-width: 380px; }
.status-form select, .status-form .app-select { width: 170px; }
.status-form select.visually-hidden { width: 1px; }
.status-form .save-state { order: -1; margin-left: 0; }
.blocker-field { flex-basis: 100%; display: flex; gap: .5rem; }
.blocker-field input { flex: 1; min-width: 0; }

/* Project and task pages: the item on the left, its dates on the right. */
.item-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; gap: 1.5rem; }
.item-main { display: grid; gap: 1.75rem; min-width: 0; }
.item-card { display: grid; gap: .85rem; padding: 1.25rem 1.5rem 1.5rem; }
.item-title { color: var(--field-navy); font-family: var(--font-body); font-size: 1.75rem; font-weight: 700; letter-spacing: 0; line-height: 1.2; text-transform: none; overflow-wrap: anywhere; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; color: var(--slate); font-size: .92rem; }
.item-meta strong { color: var(--near-black); }
.item-outcome { max-width: 70ch; line-height: 1.5; }
.item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .9rem; border-top: 1px solid var(--mist); }
.item-actions .status-form { justify-content: flex-start; margin-right: auto; }
.item-actions .status-form .save-state { order: 0; }
.inline-form { display: grid; gap: 1rem; }
.inline-form.boxed { padding: 1.25rem; }
.item-side { display: grid; gap: .6rem; padding: 1.25rem; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }
.item-side h2 { font-size: 1.35rem; }
.item-side h2:not(:first-child) { margin-top: .6rem; padding-top: 1.1rem; border-top: 1px solid var(--mist); }
.side-text { color: var(--near-black); font-weight: 700; line-height: 1.35; }
.trail, .history { margin: 0; padding: 0; list-style: none; }
.trail li { display: grid; gap: .2rem; padding: .6rem 0; }
.trail li:first-child { padding-top: 0; }
.trail li + li { border-top: 1px solid var(--mist); }
.trail strong { color: var(--near-black); font-size: .92rem; line-height: 1.4; }
.trail p { font-size: .92rem; line-height: 1.4; }
.history { border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }
.history li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: .2rem 1rem; padding: .6rem 1rem; font-size: .92rem; line-height: 1.4; }
.history li + li { border-top: 1px solid var(--mist); }

/* Issues, Meetings and Manager reuse the work list; these are the few pieces they add. */
.row-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar, .phone-nav::-webkit-scrollbar { display: none; }
.tabs a { flex: none; white-space: nowrap; }
.tabs .count { margin-left: .45rem; font-size: 1.1rem; }
.detail { display: grid; gap: .3rem; }
.detail .tile-label { color: var(--slate); }
.check { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-right: 1.25rem; cursor: pointer; }
fieldset.share > legend { margin-bottom: 0; }
.share-form { display: grid; justify-items: start; gap: .1rem; }
.share-form .quiet-action { margin-top: .5rem; }
a.side-text { text-decoration: none; }
a.side-text:hover { text-decoration: underline; }
.side-quote { padding: .6rem .75rem; border-radius: var(--radius); background: var(--ice); font-size: .92rem; line-height: 1.45; }
.side-note { font-size: .92rem; line-height: 1.45; }
.replies { display: grid; gap: .4rem; }
.replies .tile-label { color: var(--slate); }
.replies ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.replies li { display: grid; gap: .1rem; font-size: .92rem; line-height: 1.45; }
.add-row { display: flex; gap: .5rem; max-width: 520px; margin-bottom: 1rem; }
.add-row input { flex: 1; min-width: 0; }
.notice.spaced { margin-bottom: 1rem; }
.work-list.spaced { margin-bottom: 1.75rem; }
.now-meta .save-state { float: right; }
.add-row select, .add-row .app-select { flex: 1; min-width: 0; }
strong.work-title, span.work-title { text-decoration: none; }
strong.work-title:hover, span.work-title:hover { text-decoration: none; }

/* Top bar, on top of the base: every control is 44px, and the viewer sits behind a hairline, not in a box,
   with the role in tile-label type (Sales Portal top bar). */
.main-nav a, .theme-switch { min-height: 44px; }
.icon-button { width: 44px; height: 44px; }
.viewer { padding: 0 0 0 .9rem; border: 0; border-left: 1px solid var(--mist); border-radius: 0; }
.viewer-name strong { color: var(--near-black); font-family: var(--font-body); font-size: .86rem; letter-spacing: 0; text-transform: none; }
.viewer-name span { font-family: var(--font-display); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* An item's buttons stay together: beside the status control when they fit, on their own line when they do not. */
.item-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.status-form + .item-buttons { margin-left: auto; }
/* The line beside a page title sits on the Secondary step. */
.page-head .sub { font-size: .92rem; }

/* A row's red Remove, the small size like the small grey button, and its confirmation across the row under it. */
.danger-action.compact { padding: .6rem .9rem; font-size: .92rem; }
.row-confirm { grid-column: 1 / -1; padding: .25rem 0 .35rem; }
/* On a phone the row is one column: Remove keeps its own width under the name rather than filling the row. */
@media (max-width: 640px) { .work-row > .danger-action.compact { justify-self: start; } }
@media (max-width: 640px) {
  .help-link { width: 44px; padding: 0; justify-content: center; }
  .practice-badge.in-bar { display: none; }
  .help-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .guide-card { grid-template-columns: minmax(0, 1fr); }
  .practice-list .work-row form, .practice-list .work-row .primary-action, .practice-list .work-row .secondary-action { width: 100%; }
}
.row-confirm p { color: var(--near-black); font-size: .92rem; }

/* Help: the button in the top bar, the Guides and Practice lists, and a guide's page. */
.help-link { min-height: 44px; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .8rem; border-radius: var(--radius); color: var(--field-navy); font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.help-link:hover { background: var(--ice); }
.help-link[aria-current="page"] { color: var(--on-brand); background: var(--brand-fill); }
/* Remove issue: a quiet red link at the foot of the open Issue card, and its confirmation under the card. */
.issue-remove { display: flex; justify-content: flex-end; }
.remove-panel { margin-top: .75rem; }
.help-lead { max-width: 70ch; margin-bottom: 1rem; color: var(--near-black); }
/* The written overview: one white card, body text at reading width, headings spaced as sections. */
.help-how { display: grid; gap: .75rem; padding: 1.25rem; }
.help-how > * { max-width: 70ch; }
.help-how h2:not(:first-child) { margin-top: 1rem; }
.help-how .guide-steps { gap: .6rem; }
.help-how .now-message { margin-top: .5rem; font-size: 1rem; }
.help-how .text-link { margin: 0; }
.practice-row { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.practice-row .agenda-num { flex: 0 0 1.6rem; text-align: center; }
.row-tags { display: inline-flex; flex-wrap: wrap; gap: .4rem; margin-right: .5rem; vertical-align: middle; }
.practice-list .work-row form > button { min-width: 9.5rem; justify-content: center; }
/* Guides are rows of the one white list, like every other list here. */
.guide-list > li + li { border-top: 1px solid var(--mist); }
.guide-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; padding: .75rem; color: inherit; text-decoration: none; }
.guide-card:hover { background: var(--ice); }
.guide-poster { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 3px; background: var(--brand-navy); }
.guide-poster img { width: 100%; height: 100%; display: block; object-fit: cover; }
.guide-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.guide-play .icon { width: 34px; height: 34px; fill: currentColor; }
.guide-text { display: grid; align-content: start; gap: .3rem; min-width: 0; }
.guide-summary { color: var(--near-black); font-size: .92rem; line-height: 1.4; }
.guide-video { width: 100%; display: block; aspect-ratio: 16 / 9; margin-bottom: 1rem; border-radius: var(--radius); background: var(--night); }
p.guide-summary { max-width: 70ch; margin-bottom: 1.5rem; font-size: 1rem; line-height: 1.5; }
.guide-steps { display: grid; gap: .5rem; margin: 0; padding-left: 1.4rem; }
.guide-next { max-width: 100%; margin-top: 1.5rem; white-space: normal; text-align: left; }

/* Practice mode (Sales Portal practice pattern). Hazard yellow means "this is not real" and is used for nothing
   else; it is the same in both themes. The step card is the guidance blue. */
:root { --practice-hazard: #ffc21a; --practice-hazard-ink: #1a1300; --tour-bg: #e2edf9; --tour-edge: var(--brand-navy); --tour-dim: rgba(3, 13, 29, .62); }
:root[data-theme="dark"] { --tour-bg: #14365f; --tour-edge: var(--logo-blue); }
.practice-banner { position: relative; z-index: 1995; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1rem; padding: .6rem var(--gutter); border-bottom: 6px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--practice-hazard-ink) 0 10px, var(--practice-hazard) 10px 20px) 6; color: var(--practice-hazard-ink); background: var(--practice-hazard); font-size: .92rem; font-weight: 700; text-align: center; }
.practice-badge { padding: .2rem .6rem; border-radius: 3px; color: var(--practice-hazard); background: var(--practice-hazard-ink); font-family: var(--font-display); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.practice-banner button { min-height: 44px; padding: .5rem 1rem; border: 2px solid var(--practice-hazard-ink); border-radius: var(--radius); color: var(--practice-hazard); background: var(--practice-hazard-ink); font-family: var(--font-display); font-size: .92rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.practice-banner button:hover { color: var(--practice-hazard-ink); background: transparent; }
.practice-banner button:focus-visible { outline: 3px solid var(--practice-hazard-ink); outline-offset: 2px; }
/* The band scrolls away with the page; the pinned top bar keeps saying it. */
html[data-practice] .topbar { border-bottom-color: var(--practice-hazard); }
.practice-badge.in-bar { margin-right: .25rem; }
/* A manager's full menu leaves no room for it on a laptop; the band and the yellow rule still say it. */
@media (max-width: 1240px) { .practice-badge.in-bar { display: none; } }
.practice-shade { position: fixed; inset: 0; z-index: 1990; pointer-events: none; }
.practice-block { position: fixed; pointer-events: auto; }
.practice-hole { position: fixed; pointer-events: none; border-radius: var(--radius); outline: 3px solid var(--logo-blue); box-shadow: 0 0 0 200vmax var(--tour-dim); }
.practice-shade.look .practice-hole { pointer-events: auto; }
/* The pinned top bar would cover a control scrolled to the very top. */
.practice-target { scroll-margin: 104px 0 24px; }
.practice-shade.gliding .practice-hole { transition: top .3s var(--ease), left .3s var(--ease), width .3s var(--ease), height .3s var(--ease); }
/* The list a lit dropdown opens has to sit over the dimmed page. */
html[data-practice] .app-select-list { z-index: 2001; }
.practice-card { position: fixed; z-index: 2000; width: min(340px, calc(100vw - 24px)); display: grid; gap: .75rem; padding: 1rem; border: 2px solid var(--tour-edge); border-radius: var(--radius); color: var(--near-black); background: var(--tour-bg); box-shadow: 0 14px 40px rgba(3, 13, 29, .28); }
.practice-card.gliding { transition: top .3s var(--ease), left .3s var(--ease); }
.practice-card.docked { left: 12px; bottom: 12px; }
.practice-copy { display: grid; gap: .35rem; padding-right: 3.6rem; }
.practice-after { color: var(--field-navy); font-weight: 700; }
/* The last card has no Exit in its corner to leave room for. */
.practice-card.ended .practice-copy { padding-right: 0; }
.practice-close { position: absolute; top: 4px; right: 4px; min-height: 44px; padding: 0 .6rem; border: 0; border-radius: var(--radius); color: var(--field-navy); background: transparent; font-family: var(--font-display); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.practice-close:hover { background: color-mix(in srgb, var(--tour-edge), transparent 86%); }
.practice-copy.fresh { animation: practice-in .28s var(--ease); }
@keyframes practice-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.practice-card .tile-label { color: var(--near-black); }
.practice-card h2 { color: var(--field-navy); font-family: var(--font-body); font-size: 1.02rem; font-weight: 700; letter-spacing: 0; line-height: 1.3; text-transform: none; }
.practice-words { font-size: .92rem; line-height: 1.5; }
.practice-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.practice-actions .primary-action { order: 3; }
.practice-leave { display: flex; justify-content: flex-end; }
/* The last card's buttons are the card's action row: leaving first, the next run last. */
.practice-ending { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }

/* First visit. Guidance stays blue: the welcome above the page and the pointer under Help share the step card's surface. */
.welcome { width: min(1240px, 100%); margin: 1.25rem auto 0; padding: 0 var(--gutter); }
.welcome-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; padding: 1.1rem 1.25rem; border: 2px solid var(--tour-edge); border-radius: var(--radius); color: var(--near-black); background: var(--tour-bg); }
.welcome-text { flex: 1 1 18rem; display: grid; gap: .3rem; max-width: 60ch; }
.welcome-text h2 { color: var(--field-navy); font-family: var(--font-body); font-size: 1.1rem; font-weight: 700; letter-spacing: 0; line-height: 1.3; text-transform: none; }
.welcome-actions, .welcome-actions form { display: flex; flex-wrap: wrap; gap: .5rem; }
.welcome + .page { padding-top: 1.25rem; }
/* The note about Help for people who were here before it: the welcome panel's box, one line high. */
.welcome-box.help-pointer { padding: .6rem .75rem .6rem 1.25rem; }
.help-pointer p { font-weight: 700; color: var(--field-navy); }
/* Grey buttons have no edge of their own, and on the pale blue their fill disappears: give them the field edge. */
.practice-card .quiet-action, .help-pointer .quiet-action, .welcome-box .quiet-action,
.practice-card .quiet-action:hover:not(:disabled), .help-pointer .quiet-action:hover:not(:disabled), .welcome-box .quiet-action:hover:not(:disabled) { border-color: var(--field-border); }
@media (max-width: 640px) {
  .welcome-box.help-pointer { padding: .85rem 1rem; }
  .welcome-actions, .welcome-actions form { width: 100%; }
  .welcome-actions .primary-action, .welcome-actions .quiet-action { flex: 1 1 auto; }
  /* The step card is as wide as the screen allows, so it sits the same distance from both edges. */
  .practice-card { width: calc(100vw - 24px); }
  .practice-row { align-items: start; }
  .practice-list .work-row form > button { min-width: 0; }
}
.practice-arrow { position: absolute; width: 14px; height: 14px; margin-left: -7px; background: var(--tour-bg); transform: rotate(45deg); }
.practice-arrow.up { top: -9px; border-top: 2px solid var(--tour-edge); border-left: 2px solid var(--tour-edge); }
.practice-arrow.down { bottom: -9px; border-right: 2px solid var(--tour-edge); border-bottom: 2px solid var(--tour-edge); }
.practice-arrow.side { right: -9px; margin: -7px 0 0; border-top: 2px solid var(--tour-edge); border-right: 2px solid var(--tour-edge); }
.practice-card.nudge { animation: practice-nudge .3s var(--ease); }
@keyframes practice-nudge { 30% { transform: translateX(-5px); } 65% { transform: translateX(4px); } }

/* The offer of a project under a due date more than 7 days out. */
.long-task { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-top: .1rem; color: var(--slate); font-size: .92rem; }
.long-task a { color: var(--field-navy); font-weight: 700; }

/* My Work: what leadership shared of the issue behind an item. */
.work-quote { justify-self: start; max-width: 70ch; margin-top: .15rem; padding: .4rem .6rem; border-radius: var(--radius); color: var(--near-black); background: var(--ice); font-size: .86rem; line-height: 1.4; }
.work-quote, .work-note.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.work-note.clamp { max-width: 70ch; }
/* A row that carries them keeps its status control level with the title. */
.work-row:has(.work-quote, .work-note.clamp) { align-items: start; }

/* Under 1100px the watchlist groups start closed. Until the script has closed them, their rows stay out of sight,
   so they never show open first; with no script at all they stay open and usable. */
@media (max-width: 1100px) { .js details.watch-group[data-watch=""] > .watch-list { display: none; } }

/* Six links: the icons, then the wordmark, give way before the navigation wraps. */
@media (max-width: 1500px) { .main-nav:has(> a:nth-child(5)) a .icon { display: none; } .main-nav:has(> a:nth-child(5)) { margin-left: 1rem; } }
@media (min-width: 901px) and (max-width: 1240px) { .main-nav:has(> a:nth-child(5)) a { padding: 0 .55rem; font-size: .92rem; } .topbar:has(.main-nav > a:nth-child(5)) .brand em { display: none; } }

.phone-nav { display: none; }
@media (max-width: 1180px) { .viewer-name { display: none; } }
@media (max-width: 1100px) {
  .review { grid-template-columns: minmax(0, 1fr); }
  .watchlist { position: static; max-height: none; overflow: visible; }
  .watch-top { position: static; padding-bottom: 0; }
  .watch-counts { display: none; }
  /* One column: the dates sit right under the item, above its tasks and history. */
  .item-layout { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .item-main { display: contents; }
  .item-card { order: 1; }
  .item-side { order: 2; }
  .item-section { order: 3; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .phone-nav { display: flex; gap: .25rem; padding: .5rem var(--gutter); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--mist); background: var(--surface); }
  .phone-nav a { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 .75rem; border-radius: var(--radius); color: var(--field-navy); font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
  .phone-nav a[aria-current="page"] { color: var(--on-brand); background: var(--brand-fill); }
  .phone-nav:has(> a:only-child) { display: none; }
}
@media (max-width: 640px) {
  .page { padding-top: 1.25rem; }
  .page-head h1 { font-size: 2rem; }
  .head-actions, .head-actions .pickers, .head-actions .pickers .app-select { width: 100%; }
  .head-actions > a { flex: 1; min-height: 44px; }
  .issue-now { padding: 1rem; }
  textarea.now-title { font-size: 1.35rem; }
  .text-link { margin-left: 0; }
  .work-row { grid-template-columns: minmax(0, 1fr); }
  .row-chips { justify-content: flex-start; }
  .add-row { flex-wrap: wrap; max-width: none; }
  .status-form { justify-content: flex-start; width: 100%; max-width: none; }
  .status-form select, .status-form .app-select { flex: 1; width: auto; }
  .status-form .save-state { order: 0; }
  .item-card { padding: 1rem; }
  .item-title { font-size: 1.35rem; }
  .item-buttons { width: 100%; }
  .item-buttons > a { flex: 1; }
  .item-actions .status-form { flex-basis: 100%; }
  .history li { grid-template-columns: minmax(0, 1fr); }
  .tabs a { flex: 1 0 auto; justify-content: center; }
  .now-message { font-size: 1rem; }
  .now-fields, .form-row { grid-template-columns: minmax(0, 1fr); }
  .choice-row label { flex: 1; }
  .choice-row span { width: 100%; min-width: 0; padding: 0 .4rem; }
  .outcome-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-head { display: none; }
  .step-row { grid-template-columns: minmax(0, 1fr); padding-bottom: .75rem; border-bottom: 1px solid var(--mist); }
  .field.short { max-width: none; }
  .agenda-row { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .agenda-row .chip { grid-column: 2; justify-self: start; }
  .theme-switch-track { grid-template-columns: 28px; }
  .theme-switch-track > span:not(.on) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
