/* =============================================================================
   app.css – marketing planner (v5, "frames" redesign). No colour values here:
   everything is a token from tokens.css. Square corners except buttons (8px).
   One micro-palette – Moss and Pistachio – used as whole blocks on white.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--leading-tight); font-variant-numeric: tabular-nums; text-align: left; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--moss); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-size: 0.9em; background: var(--surface-muted); padding: 0 var(--space-xs); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
::selection { background: var(--pistachio); color: var(--moss); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--space-md); top: -100px; background: var(--moss); color: var(--howden-white); padding: var(--space-sm) var(--space-md); z-index: var(--z-toast); }
.skip-link:focus { top: var(--space-sm); }

/* --- type ------------------------------------------------------------------------------------------ */
.display { font-family: var(--font-display); font-weight: var(--fw-regular); line-height: var(--lh-display); color: var(--moss); letter-spacing: -0.01em; }
.hero    { font-family: var(--font-display); font-weight: var(--fw-regular); font-size: var(--fs-stat); line-height: 0.85; color: var(--moss); }
.title   { font-family: var(--font-display); font-weight: var(--fw-regular); font-size: var(--fs-page); line-height: 1; color: var(--moss); }
.heading { font-family: var(--font-display); font-weight: var(--fw-regular); font-size: var(--fs-h3); line-height: 1; color: var(--moss); }
.h2      { font-family: var(--font-display); font-weight: var(--fw-regular); font-size: var(--fs-h2); line-height: 1; color: var(--moss); }
.h4      { font-family: var(--font-display); font-weight: var(--fw-regular); font-size: var(--fs-h4); line-height: 1; color: var(--moss); }
.label   { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--moss); }
.meta    { font-size: var(--fs-small); font-weight: var(--fw-regular); color: var(--ink-muted); line-height: 1.3; }
.eyebrow { font-size: var(--fs-small); color: var(--moss); }
.prose   { line-height: var(--lh-body); max-width: var(--measure); white-space: pre-line; }
.boot    { padding: var(--space-lg); }
strong, b { font-weight: var(--fw-semibold); }
.spacer  { flex: 1; }
.nowrap  { white-space: nowrap; }
.clip    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-word { font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); white-space: nowrap; }
.badge-status { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-sm); border-radius: var(--radius-sm); font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--howden-white); white-space: nowrap; }
.badge-status.positive { background: var(--status-positive); }
.badge-status.negative { background: var(--status-negative); }
.badge-status.neutral  { background: var(--status-neutral); color: var(--ink); }

/* --- shell: Moss sidebar + white main ----------------------------------------------------------- */
#app:has(> .sidebar) { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: var(--space-lg) var(--space-md) 20px; background: var(--field-bg); color: var(--field-text); }
.sidebar .brand { display: block; margin: 0 var(--space-sm); text-decoration: none; }
.sidebar .brand .logo { display: block; height: 28px; width: auto; margin-left: -0.5rem; }
.sidebar .wordmark { display: block; margin: var(--space-lg) var(--space-sm) 0; font-family: var(--font-display); font-size: 30px; line-height: 1.05; color: var(--field-text); }
.side-rule { margin: var(--space-lg) var(--space-sm) 18px; border-top: 1px solid var(--field-line); }
.side-label { margin: 0 var(--space-sm) 12px; font-size: var(--fs-caption); color: var(--field-accent); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 13px var(--space-md); color: var(--field-text); font-size: 15px; text-decoration: none; transition: background-color var(--duration) var(--ease), padding-left var(--duration) var(--ease); }
.nav a:hover { background: var(--field-hover); padding-left: 22px; color: var(--field-text); }
.nav a[aria-current="page"] { background: var(--field-accent); color: var(--field-accent-text); font-weight: var(--fw-semibold); }
.nav a[aria-current="page"]:hover { padding-left: var(--space-md); }
.nav a .icon { display: none; }
.nav-count { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--field-accent); }
.nav a[aria-current="page"] .nav-count { color: var(--field-accent-text); }
.sidebar-foot { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.streak { margin: 0 var(--space-sm); padding: 12px 14px; background: var(--field-well); display: flex; flex-direction: column; gap: var(--space-sm); }
.streak-num { display: flex; align-items: baseline; gap: var(--space-sm); }
.streak-num .display { font-size: 34px; color: var(--field-accent); }
.streak-num span:last-child { font-size: var(--fs-caption); font-weight: var(--fw-semibold); line-height: 1.3; }
.streak-msg { font-size: var(--fs-caption); line-height: 1.4; color: var(--field-text-soft); }
.streak-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.streak-days i { height: 6px; background: var(--field-track); }
.streak-days i.on { background: var(--field-accent); }
.side-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin: 0 var(--space-sm); padding: 0; border: 0; background: none; color: var(--field-text); font-size: var(--fs-small); text-align: left; cursor: pointer; }
.side-item:hover { color: var(--field-accent); }
.side-item .icon { display: none; }
.side-item .badge { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--field-accent); }
.side-help { border-top: 1px solid var(--field-line); padding-top: 18px; margin: 0 var(--space-sm); }
.side-help .side-item { margin: 0; }
.account-item { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); margin: 0 var(--space-sm); border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: var(--field-text); }
.account-item:hover .account-name > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.account-btn { display: none; }
.account-name { display: flex; flex-direction: column; gap: var(--space-xs); line-height: 1.2; }
.account-name > span:first-child { font-size: var(--fs-body); font-weight: var(--fw-semibold); }
.account-name .meta { font-size: var(--fs-caption); color: var(--field-accent); }
.fixture-note { display: none; }

/* top utility bar */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: var(--space-lg); padding: 0 var(--page-x); border-bottom: 1px solid var(--line-soft); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.crumb { font-size: var(--fs-small); color: var(--moss); }
.crumb b { font-weight: var(--fw-regular); }
.search { margin-left: auto; display: flex; align-items: center; gap: 10px; width: 260px; padding: 10px 14px; border: 0; background: var(--surface-muted); color: var(--ink-muted); font-size: var(--fs-small); cursor: pointer; text-align: left; }
.search:hover { background: var(--pistachio-tint); }
.search kbd { margin-left: auto; font-family: inherit; font-size: var(--fs-micro); font-weight: var(--fw-semibold); color: var(--moss); border: 1px solid var(--line-moss); padding: 3px 5px; }
.alerts { position: relative; border: 0; background: none; padding: 0; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); cursor: pointer; }
.alerts .dot { position: absolute; top: -6px; right: -10px; width: 8px; height: 8px; border-radius: 4px; background: var(--moss); }
.avatar { width: 36px; height: 36px; border-radius: 18px; border: 0; background: var(--pistachio); color: var(--moss); font-size: var(--fs-small); font-weight: var(--fw-semibold); cursor: pointer; }
.avatar:hover { background: var(--pistachio-hover); }
.topbar-menus { position: relative; display: flex; align-items: center; gap: 14px; }
.menu { position: absolute; right: 0; top: calc(100% + var(--space-sm)); min-width: 18rem; max-width: 26rem; background: var(--surface); border: 1px solid var(--line); padding: var(--space-sm); z-index: 15; animation: rise var(--duration-slow) var(--ease-out) both; transform-origin: top right; box-shadow: 0 12px 28px var(--moss-shadow); }
.sidebar-foot .menu.menu-up { right: 8px; left: 8px; top: auto; bottom: calc(100% + 8px); min-width: 0; transform-origin: bottom left; }
.menu-head { display: flex; justify-content: space-between; align-items: center; padding: var(--space-xs) var(--space-sm) var(--space-sm); border-bottom: 1px solid var(--line); margin-bottom: var(--space-xs); }
.menu-item { display: flex; width: 100%; text-align: left; gap: var(--space-sm); align-items: center; min-height: var(--control-h); padding: var(--space-sm); border: 0; background: none; text-decoration: none; cursor: pointer; color: var(--ink); }
.menu-item:hover { background: var(--surface-muted); }
.menu-item .icon { color: var(--moss); }
.notif { display: flex; flex-direction: column; gap: var(--space-xs); align-items: flex-start; }
.notif.unread .notif-title { font-weight: var(--fw-semibold); color: var(--moss); }
.notif-list { max-height: 24rem; overflow: auto; }

/* --- page frame --------------------------------------------------------------------------------- */
.view { padding: var(--page-top) var(--page-x) 72px; width: 100%; min-width: 0; display: flex; flex-direction: column; gap: var(--space-xl); }   /* full width – grids breathe, prose keeps a measure */
.view-home { padding-top: 0; gap: 0; max-width: none; }
.view-home > .home { margin-top: 0; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-lg); align-items: start; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 14px; }
.page-head .page-sub { font-size: 16px; line-height: 1.4; max-width: 64ch; }
.page-actions { display: flex; gap: var(--space-sm); align-items: center; }
.section-head { display: flex; align-items: baseline; gap: 20px; }
.section-head .heading { color: var(--moss); }
.section-head .meta { color: var(--moss); }
.section-head.ruled { justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.arrow-link { margin-left: auto; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); text-decoration: none; cursor: pointer; border: 0; background: none; padding: 0; white-space: nowrap; }
.arrow-link:hover { text-decoration: underline; }
.section { display: flex; flex-direction: column; gap: 18px; }
.stack { display: flex; flex-direction: column; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
.error-block { display: flex; gap: var(--space-md); align-items: center; padding: var(--space-md); background: var(--surface-muted); }
.empty { padding: var(--space-lg) 0; display: flex; flex-direction: column; gap: var(--space-md); align-items: flex-start; }
.empty p { line-height: var(--lh-body); max-width: var(--measure); }
.loading { padding: var(--space-md) 0; }

/* --- buttons (8px radius, as in the frames) ------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); height: var(--control-h); padding: 0 22px; border: 1px solid transparent; border-radius: var(--radius-btn); background: none; font-weight: var(--fw-semibold); font-size: var(--fs-body); cursor: pointer; white-space: nowrap; text-decoration: none; text-align: left; transition: transform 150ms var(--ease), background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { cursor: default; opacity: 0.6; }
.btn .icon { font-size: 1.25rem; }
.btn-primary { background: var(--moss); color: var(--howden-white); border-color: var(--moss); }
.btn-primary:hover:not(:disabled) { transform: translateX(3px); }
.btn-accent { background: var(--pistachio); color: var(--moss); border-color: var(--pistachio); }
.btn-accent:hover:not(:disabled) { transform: translateX(3px); }
.btn-secondary { background: var(--surface); color: var(--moss); border-color: var(--line-moss); }
.btn-secondary:hover:not(:disabled) { background: var(--moss); color: var(--howden-white); border-color: var(--moss); }
.btn-ghost { background: transparent; color: var(--field-text); border-color: var(--field-accent); }
.btn-ghost:hover:not(:disabled) { transform: translateX(-3px); }
.btn-muted { background: var(--surface-muted); color: var(--moss); border-color: var(--surface-muted); border-radius: var(--radius-none); }
.btn-muted:hover:not(:disabled) { background: var(--pistachio); border-color: var(--pistachio); }
.btn-quiet { height: auto; padding: 0; border-radius: 0; color: var(--moss); font-size: var(--fs-small); }
.btn-quiet:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.btn-small { height: 32px; padding: 0 10px; font-size: var(--fs-caption); }
.btn.icon-only { padding: 0; width: var(--control-h); }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 1.25rem; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-smoothing: antialiased; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20; vertical-align: middle; }

/* --- forms ------------------------------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-md); }
.field > .label { color: var(--moss); }
.field-inline { margin: 0; }
.field .hint { font-size: var(--fs-caption); }
.field .error { display: flex; gap: var(--space-xs); align-items: center; font-size: var(--fs-small); color: var(--status-negative); }
.field.has-error .input { outline: 2px solid var(--status-negative); }
.input { width: 100%; min-height: var(--control-h); padding: 12px; border: 0; background: var(--surface-muted); color: var(--ink); font-size: var(--fs-body); }
.input:focus { outline: 2px solid var(--moss); outline-offset: 0; }
.input::placeholder { color: var(--ink-faint); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--moss) 50%), linear-gradient(135deg, var(--moss) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.textarea { min-height: 6rem; line-height: var(--lh-body); resize: vertical; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-md); }
.fields-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 var(--space-md); }
.check { display: flex; gap: var(--space-sm); align-items: center; min-height: var(--target-min); }
.check input { width: 18px; height: 18px; accent-color: var(--moss); margin: 0; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filters .input { width: auto; min-width: 140px; height: var(--control-h); min-height: 0; padding: 0 36px 0 14px; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); }
.filters .input:hover { background-color: var(--pistachio); }
.segmented { display: flex; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label { display: inline-flex; align-items: center; height: var(--control-h); padding: 0 20px; background: var(--surface-muted); color: var(--moss); font-size: var(--fs-small); font-weight: var(--fw-semibold); cursor: pointer; }
.segmented label:hover { background: var(--pistachio); }
.segmented input:checked + label { background: var(--moss); color: var(--howden-white); }
.segmented input:focus-visible + label { outline: 2px solid var(--moss); outline-offset: 2px; }
.tabs { display: flex; gap: var(--space-sm); flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: var(--space-md); }
.tab { min-width: 110px; height: var(--control-h); padding: 0 var(--space-md); border: 0; background: var(--surface-muted); color: var(--moss); font-size: var(--fs-small); font-weight: var(--fw-semibold); cursor: pointer; text-align: left; }
.tab:hover { background: var(--pistachio); }
.tab[aria-selected="true"] { background: var(--moss); color: var(--howden-white); }
.chip { display: inline-flex; align-items: center; font-size: var(--fs-micro); color: var(--ink-muted); white-space: nowrap; }
.chips { display: inline-flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; }
.chip-toggle { height: 36px; padding: 0 12px; border: 1px solid var(--line-moss); border-radius: var(--radius-btn); background: var(--surface); color: var(--moss); font-size: var(--fs-small); font-weight: var(--fw-semibold); cursor: pointer; }
.chip-toggle[aria-pressed="true"] { background: var(--moss); color: var(--howden-white); border-color: var(--moss); }
.pill, .pill-select { display: inline-flex; align-items: center; gap: var(--space-xs); height: 28px; padding: 0 8px; border: 1px solid var(--line-moss); border-radius: var(--radius-btn); background: var(--surface); color: var(--moss); font-size: var(--fs-micro); font-weight: var(--fw-semibold); white-space: nowrap; }
.pill-select { cursor: pointer; appearance: auto; }
.pill-select:hover { background: var(--pistachio); }
.pill.tone-done, .pill-select.tone-done, .pill.tone-good, .pill-select.tone-good { background: var(--moss); color: var(--howden-white); border-color: var(--moss); }
.pill .icon { display: none; }

/* --- bands and cards --------------------------------------------------------------------------------- */
.band { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.band-pistachio { background: var(--pistachio); }
.band-moss { background: var(--moss); color: var(--howden-white); padding: var(--space-sm) 0; }
.stat { display: flex; flex-direction: column; gap: 10px; padding: 28px 28px 26px; text-decoration: none; color: inherit; border-right: 1px solid var(--line-moss-soft); transition: background-color var(--duration) var(--ease); }
.stat:last-child { border-right: 0; }
a.stat:hover { background: var(--pistachio-hover); }
.stat .stat-num { font-family: var(--font-display); font-size: var(--fs-stat); line-height: 0.85; color: var(--moss); }
.stat .stat-label { font-size: 15px; font-weight: var(--fw-semibold); line-height: 1.3; color: var(--moss); }
.stat .stat-sub { font-size: var(--fs-small); line-height: 1.3; color: var(--moss); }
.band-moss .stat { border-right: 0; padding: 20px 28px; }
.band-moss .stat .stat-num { font-size: 72px; color: var(--pistachio); }
.band-moss .stat .stat-label { color: var(--howden-white); }
.band-inline .stat { flex-direction: row; align-items: center; gap: 20px; padding: 20px 28px; }
.band-inline .stat .stat-num { font-size: 80px; }
.muted-card { background: var(--surface-muted); padding: 20px; display: flex; flex-direction: column; gap: 12px; color: var(--moss); }
.moss-card { background: var(--moss); color: var(--howden-white); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.moss-card .heading { color: var(--pistachio); font-size: var(--fs-h3); line-height: 1.1; }
.moss-card p { line-height: var(--lh-body); }
.progress { height: 6px; background: var(--surface-muted); }
.progress > i { display: block; height: 100%; width: var(--pct, 0%); background: var(--moss); transition: width 0.5s var(--ease-out); }
.moss-card .progress, .home-hero .progress { background: var(--field-track); }
.moss-card .progress > i, .home-hero .progress > i { background: var(--pistachio); }
.progress-label { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--moss); }
.moss-card .progress-label { color: var(--pistachio); }
.segs { display: grid; gap: 3px; }
.segs i { height: 8px; background: var(--surface-muted); }
.segs i.on { background: var(--moss); }
.strip { background: var(--surface-muted); padding: 14px 16px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-md); font-size: var(--fs-small); line-height: 1.5; color: var(--moss); }
.strip b { font-weight: var(--fw-semibold); }
.strip a { text-decoration: none; }
.strip a:hover { text-decoration: underline; }
.slot { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 12px 14px; background: var(--pistachio-tint); color: var(--moss); }
.slot.has-photo { color: var(--howden-white); }
.slot.has-photo .display, .slot.has-photo .label { color: var(--howden-white); }
.slot .display { font-size: 28px; }
.slot .label { font-size: var(--fs-micro); letter-spacing: 0.04em; }
.ground-row .slot { width: 120px; height: 80px; padding: 10px 12px; }
.ground-row .slot .display { font-size: 24px; }

/* tables: a Moss or Pistachio header row, zebra rows */
.table { width: 100%; border-collapse: collapse; }
.table caption { text-align: left; padding: 0 0 var(--space-md); }
.table th { text-align: left; font-size: var(--fs-caption); font-weight: var(--fw-semibold); padding: 14px 16px; background: var(--moss); color: var(--howden-white); white-space: nowrap; }
.table.table-pistachio th { background: var(--pistachio); color: var(--moss); }
.table td { padding: 12px 16px; vertical-align: middle; font-size: var(--fs-small); color: var(--moss); line-height: 1.3; }
.table tbody tr:nth-child(even) td { background: var(--surface-muted); }
.table tbody tr { transition: background-color var(--duration) var(--ease); }
.table tbody tr:hover td { background: var(--pistachio-tint); }
.table td:first-child { font-weight: var(--fw-semibold); }
.table .num { text-align: right; }
.table .clip { max-width: 28rem; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }

/* --- home ------------------------------------------------------------------------------------------- */
.home-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--moss); color: var(--howden-white); padding: 44px var(--page-x) 0; margin: 0 calc(-1 * var(--page-x)); }
.field-bg { position: absolute; inset: 0; z-index: -1; background: var(--moss); }
.field-fallback { position: absolute; inset: 0; background: radial-gradient(60% 75% at 88% 12%, var(--howden-teal), transparent 70%), radial-gradient(60% 70% at 66% 92%, var(--pistachio), transparent 70%), var(--moss); }
.field-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.9s var(--ease); }
.field-canvas.on { opacity: 1; }
.field-bg::after { content: ''; position: absolute; inset: 0; background: var(--field-veil); }
.home-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-xl); align-items: start; }
.hero-text { display: flex; flex-direction: column; gap: var(--space-md); }
.hero-kicker { font-size: var(--fs-body); color: var(--pistachio); font-weight: var(--fw-semibold); animation: rise var(--duration-slow) var(--ease-out) both; }
.hero-title { font-family: var(--font-display); font-weight: var(--fw-regular); font-size: var(--fs-hero); line-height: 1; color: var(--howden-white); letter-spacing: -0.01em; animation: rise var(--duration-slow) var(--ease-out) 60ms both; text-wrap: balance; }
.hero-sub { max-width: 60ch; font-size: var(--fs-body-lg); line-height: var(--lh-body); animation: rise var(--duration-slow) var(--ease-out) 120ms both; }
.hero-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 28px; animation: rise var(--duration-slow) var(--ease-out) 180ms both; }
.hero-actions .btn { min-width: 200px; justify-content: flex-start; padding: 0 22px; }
.hero-today { margin-top: 36px; padding: 18px 0 22px; border-top: 1px solid var(--field-line); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-today b { font-size: var(--fs-body); font-weight: var(--fw-semibold); }
.hero-today span { font-size: var(--fs-body); color: var(--field-text-soft); }
.hero-today .progress { flex: 1; min-width: 160px; }
.home-body { padding: var(--space-xl) var(--page-x) var(--space-3xl); display: flex; flex-direction: column; gap: 56px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: var(--pistachio); }
.stat-card { } /* alias for .stat */
.ground-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; text-decoration: none; color: inherit; transition: transform var(--duration) var(--ease); }
.ground-row:hover { transform: translateX(4px); }
.ground-row .photo-slot { width: 120px; height: 80px; }
.row-title { font-size: 16px; font-weight: var(--fw-semibold); color: var(--moss); line-height: 1.3; }
.row-meta { font-size: var(--fs-small); color: var(--ink-muted); line-height: 1.3; }
.out-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-md); align-items: center; min-height: 80px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; width: 100%; }
.out-box { width: 28px; height: 28px; border: 2px solid var(--moss); display: inline-flex; align-items: center; justify-content: center; font-weight: var(--fw-semibold); color: var(--pistachio); transition: background-color var(--duration) var(--ease); }
.out-row:hover .out-box { background: var(--pistachio); }
.out-row.is-out .out-box { background: var(--moss); border-color: var(--moss); }
.out-row.is-out .row-title { color: var(--ink-faint); text-decoration: line-through; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 120px; gap: var(--space-md); align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.req-row .btn { justify-content: flex-start; padding: 0 16px; }
.next-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-md); }
.rail-card { background: var(--surface-muted); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform 250ms var(--ease), box-shadow 250ms var(--ease); }
.rail-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px var(--moss-shadow); }
.rail-card .slot { height: 104px; }
.rail-card.is-today .slot { background: var(--pistachio); }
.rail-body { padding: var(--space-md); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
.rail-when { grid-column: 1 / -1; font-size: var(--fs-caption); color: var(--moss); }
.date-tile { display: flex; flex-direction: column; gap: var(--space-xs); }
.date-day { font-family: var(--font-display); font-size: 40px; line-height: 0.9; color: var(--moss); }
.date-mon { font-size: var(--fs-caption); color: var(--moss); }
.rail-title { font-size: 15px; font-weight: var(--fw-semibold); color: var(--moss); line-height: 1.25; }
.rail-foot { font-size: var(--fs-caption); color: var(--ink-muted); line-height: 1.3; margin-top: 6px; }
.week-strip-wrap { overflow-x: auto; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 2px; min-width: 840px; }
.day-col { background: var(--surface-muted); padding: 12px 10px; min-height: 150px; display: flex; flex-direction: column; gap: var(--space-sm); text-decoration: none; color: inherit; }
.day-col.day-today { background: var(--pistachio); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; }
.day-name { font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); }
.day-num { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--moss); }
.day-posts { display: flex; flex-direction: column; gap: var(--space-sm); }
.post-chip { display: block; background: var(--surface); padding: 7px 8px; font-size: var(--fs-caption); line-height: 1.3; color: var(--moss); overflow: hidden; text-overflow: ellipsis; }
.post-chip.is-out { background: var(--moss); color: var(--pistachio); font-weight: var(--fw-semibold); }
.day-empty { font-size: var(--fs-caption); color: var(--moss); }
.onboard { border-top: 1px solid var(--line); padding-top: var(--space-lg); display: grid; grid-template-columns: 200px repeat(3, minmax(0, 1fr)); gap: 20px; align-items: center; }
.onboard-head { display: flex; flex-direction: column; gap: 6px; }
.onboard-step { display: flex; gap: 12px; align-items: center; padding: 12px; text-decoration: none; color: var(--moss); font-size: var(--fs-body); font-weight: var(--fw-semibold); transition: background-color var(--duration) var(--ease); }
.onboard-step:hover { background: var(--surface-muted); }
.onboard-step.done { color: var(--ink-faint); text-decoration: line-through; }
.step-num { flex: none; width: 28px; height: 28px; border: 1px solid var(--moss); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); }
.onboard-step.done .step-num { background: var(--moss); color: var(--pistachio); border-color: var(--moss); }

/* --- events ------------------------------------------------------------------------------------------ */
.confirmed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: var(--space-md); }
.confirmed-card { background: var(--moss); color: var(--howden-white); display: grid; grid-template-columns: 160px minmax(0, 1fr); text-decoration: none; cursor: pointer; border: 0; padding: 0; text-align: left; transition: transform 250ms var(--ease); width: 100%; }
.confirmed-card:hover { transform: translateY(-3px); }
.confirmed-card .slot { min-height: 150px; }
.panel-photo { height: 160px; margin: 0 0 16px; }
.confirmed-body { padding: 22px 24px; display: flex; flex-direction: column; gap: var(--space-sm); }
.confirmed-body .date-day { font-size: 48px; color: var(--pistachio); }
.confirmed-body .row-title { color: var(--howden-white); font-size: 17px; }
.confirmed-body .row-meta { color: var(--field-text-soft); }
.confirmed-top { display: flex; justify-content: space-between; align-items: flex-start; }
.confirmed-top .icon { color: var(--pistachio); }
.keydate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.keydate { background: var(--surface-muted); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.keydate .label { color: var(--moss); }
.keydate span:last-child { font-size: var(--fs-body); color: var(--moss); line-height: 1.3; }
.year-grid-wrap { overflow-x: auto; }
.year-grid { display: grid; grid-template-columns: repeat(12, minmax(80px, 1fr)); border-top: 2px solid var(--moss); min-height: 200px; min-width: 960px; }
.year-month { border-left: 1px solid var(--line-soft); padding: 12px 6px; display: flex; flex-direction: column; gap: 6px; transition: background-color var(--duration) var(--ease); }
.year-month:hover { background: var(--surface-muted); }
.year-month.current { background: var(--pistachio-tint); }
.year-month .label { margin-bottom: 6px; }
.tl-bar { display: block; }
.tl-bar button { width: 100%; border: 0; background: var(--moss); color: var(--howden-white); padding: 6px; font-size: var(--fs-micro); font-weight: var(--fw-semibold); line-height: 1.25; text-align: left; cursor: pointer; transition: transform var(--duration) var(--ease); }
.tl-bar button:hover { transform: translateX(2px); }
.tl-bar.kind-conference button { background: var(--surface); color: var(--moss); outline: 1px solid var(--moss); outline-offset: -1px; }
.tl-bar.kind-awards button, .tl-bar.kind-internal_event button { background: var(--pistachio-tint); color: var(--moss); }
.tl-key { font-size: var(--fs-micro); line-height: 1.25; color: var(--moss); display: flex; gap: 5px; align-items: baseline; }
.tl-key i { flex: none; width: 5px; height: 5px; border-radius: 3px; background: var(--moss); transform: translateY(-1px); }
.tl-key.span { background: var(--pistachio); padding: 6px; font-weight: var(--fw-semibold); display: block; }
.year-legend { display: flex; gap: var(--space-md); margin-left: auto; font-size: var(--fs-caption); color: var(--moss); }
.year-legend span { display: flex; gap: 6px; align-items: center; }
.year-legend i { width: 10px; height: 10px; background: var(--moss); }
.year-legend i.aware { background: var(--pistachio); }
.year-legend i.conf { background: var(--surface); outline: 1px solid var(--moss); }
.year-legend i.key { width: 6px; height: 6px; border-radius: 3px; }
.tbc-head { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-lg); align-items: end; }
.tbc-head > div:first-child { display: flex; flex-direction: column; gap: 10px; }
.tbc-head .progress { height: 8px; background: var(--line-soft); }
.lane-grid { display: flex; flex-direction: column; }
.lane-card, .tbc-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 150px; gap: var(--space-md); padding: 12px 16px; align-items: center; transition: background-color var(--duration) var(--ease); }
.lane-card:nth-child(even) { background: var(--surface-muted); }
.lane-card:hover { background: var(--pistachio-tint); }
.lane-card .lane-name { font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); }
.lane-card .hint { font-size: var(--fs-small); color: var(--moss); }
.lane-card .btn-quiet { font-weight: var(--fw-semibold); justify-self: start; transition: letter-spacing var(--duration) var(--ease); }
.lane-card .btn-quiet:hover { letter-spacing: 0.03em; text-decoration: none; }
.tbc-row.head { background: var(--moss); color: var(--howden-white); padding: 14px 16px; font-size: var(--fs-caption); font-weight: var(--fw-semibold); }
.clash { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--status-negative); font-size: var(--fs-small); }
.clash .icon { font-size: 1rem; }
.ongoing-line { font-size: var(--fs-small); color: var(--moss); }

/* --- content ---------------------------------------------------------------------------------------- */
.quick-add { background: var(--pistachio); padding: 24px 28px; display: flex; flex-direction: column; gap: var(--space-md); }
.quick-add-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto minmax(0, 0.8fr) auto; gap: 12px; align-items: end; }
.quick-add .field { margin: 0; }
.quick-add .input { background: var(--surface); }
.quick-add .chips { height: var(--control-h); background: var(--surface); padding: 0 8px; flex-wrap: nowrap; }
.quick-add .chip-toggle { height: 28px; }
.quick-add .warn { display: flex; gap: var(--space-md); align-items: center; font-size: var(--fs-small); color: var(--moss); }
.week-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.week-bar .h2 { margin-right: auto; }
.week-bar .btn-muted { height: var(--control-h); padding: 0 18px; font-size: var(--fs-small); }
.week-bar .week-pick { width: auto; height: var(--control-h); min-height: 0; padding: 0 12px; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); }
.out-line { display: flex; align-items: center; gap: 20px; }
.out-line .status-word { white-space: nowrap; }
.out-line .segs { flex: 1; }
.out-line .meta { color: var(--moss); font-size: var(--fs-caption); white-space: nowrap; }
.week-grid-wrap { overflow-x: auto; }
.week-grid { display: grid; grid-template-columns: repeat(var(--days, 5), minmax(170px, 1fr)); gap: 12px; min-width: 900px; }
.day-column { display: flex; flex-direction: column; min-height: 420px; }
.day-column-head { background: var(--surface-muted); padding: 14px; display: flex; justify-content: space-between; align-items: flex-start; }
.day-column-head .day-name { font-size: var(--fs-small); }
.day-column-head .day-num { font-size: 40px; line-height: 0.9; }
.day-column.day-today .day-column-head { background: var(--moss); }
.day-column.day-today .day-name, .day-column.day-today .day-num { color: var(--howden-white); }
.day-column.day-today .day-num { color: var(--pistachio); }
.day-column.day-today .today-word { font-size: var(--fs-caption); color: var(--pistachio); }
.day-column-body { flex: 1; background: var(--surface-muted); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.day-column.day-today .day-column-body { background: var(--pistachio-tint); }
.post-card { background: var(--surface); padding: 12px; display: flex; flex-direction: column; gap: var(--space-sm); transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px var(--moss-shadow); }
.post-card[draggable] { cursor: grab; }
.post-card.dragging { opacity: 0.35; transform: none; box-shadow: none; }
body.is-dragging .day-column-body { outline: 2px dashed var(--line-moss); outline-offset: -2px; }
.day-column-body.drop-target { outline: 2px dashed var(--moss); background: var(--pistachio-tint); }
.day-column.day-today .day-column-body.drop-target { background: var(--pistachio); }
body.is-dragging .post-card:not(.dragging) { pointer-events: none; }
.post-card.flash { animation: pop var(--duration-slow) var(--ease-out); }
.post-card.is-out { background: var(--moss); color: var(--howden-white); }
.post-card.is-out .post-acc, .post-card.is-out .post-title, .post-card.is-out .post-ch { color: inherit; }
.post-card.is-out .post-acc { color: var(--pistachio); }
.post-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.post-acc { font-size: var(--fs-micro); font-weight: var(--fw-semibold); color: var(--moss); }
.post-title { font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--moss); line-height: 1.3; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.post-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-ch { font-size: var(--fs-micro); color: var(--ink-muted); line-height: 1.3; }
.week-foot { display: flex; justify-content: space-between; font-size: var(--fs-small); color: var(--moss); }
.week-foot span { display: flex; gap: 18px; }
.callout { background: var(--moss); color: var(--howden-white); padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-lg); align-items: center; }
.callout .heading { color: var(--pistachio); }
.callout p { font-size: var(--fs-body); line-height: 1.4; margin-top: var(--space-sm); }
.callout.tidy { background: var(--pistachio); color: var(--moss); font-size: 15px; font-weight: var(--fw-semibold); line-height: 1.4; padding: 20px 28px; }
.assign-all { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--surface-muted); margin-bottom: 12px; }
.assign-all .input { width: 14rem; }
.assign-list li { display: grid; grid-template-columns: 5.5rem 1fr 11rem; gap: 12px; align-items: center; padding: var(--space-sm) 0; border-bottom: 1px solid var(--line); }

/* --- requests --------------------------------------------------------------------------------------- */
.intake-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.request-list { background: var(--surface-muted); display: flex; flex-direction: column; align-self: stretch; }
.request-list .input { background: transparent; border-bottom: 1px solid var(--line); min-height: 0; padding: 16px; font-size: var(--fs-small); color: var(--moss); margin-bottom: 12px; }
.request-list .input::placeholder { color: var(--moss); }
.request-row { display: block; width: 100%; text-align: left; padding: 16px; border: 0; background: none; cursor: pointer; color: var(--moss); transition: background-color var(--duration) var(--ease); }
.request-row:hover { background: var(--pistachio-tint); }
.request-row[aria-current="true"] { background: var(--pistachio); }
.request-row .req-title { display: block; font-size: 15px; font-weight: var(--fw-semibold); line-height: 1.25; }
.request-row .meta { display: block; margin-top: var(--space-sm); color: var(--moss); font-size: var(--fs-caption); }
.request-row .meta:last-child { font-weight: var(--fw-semibold); }
.request-helper { padding: 20px 16px 16px; font-size: var(--fs-small); line-height: 1.5; color: var(--moss); }
.request-panel { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.request-head { display: flex; flex-direction: column; gap: 10px; }
.request-head .heading { font-size: var(--fs-h2); line-height: 1.05; }
.request-head .meta { color: var(--moss); font-size: var(--fs-body); }
.request-head .meta.small { font-size: var(--fs-caption); }
.request-band { background: var(--pistachio); padding: 16px 18px; display: flex; flex-direction: column; gap: var(--space-xs); color: var(--moss); }
.request-band b { font-size: 16px; font-weight: var(--fw-semibold); }
.request-band span { font-size: var(--fs-small); }
.request-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); gap: var(--space-2xl); align-items: start; }
.answers { display: flex; flex-direction: column; gap: 18px; }
.answers dl { display: flex; flex-direction: column; gap: 18px; }
.answers dt { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--moss); }
.answers dd { margin: 5px 0 0; font-size: var(--fs-body); line-height: 1.45; color: var(--moss); white-space: pre-line; overflow-wrap: anywhere; }
.decide { background: var(--moss); color: var(--howden-white); padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.decide .heading { color: var(--pistachio); }
.decide .step-label { font-size: var(--fs-body); font-weight: var(--fw-semibold); }
.decide .input { background: var(--surface); color: var(--moss); font-weight: var(--fw-semibold); font-size: var(--fs-small); }
.decide .field { margin: 0; }
.decide .field > .label { color: var(--howden-white); }
.decide .btn-accent { justify-content: flex-start; padding: 0 18px; }
.decide .btn-accent:disabled { background: var(--field-hover); border-color: transparent; color: var(--field-text-faint); opacity: 1; }
.decide .decide-link { font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--howden-white); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.decide .decide-link:hover { color: var(--pistachio); }
.decide .decide-link.quiet { font-weight: var(--fw-regular); font-size: var(--fs-small); color: var(--field-text-soft); }
.decide .decision-head { font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--pistachio); }
.decide .step { background: var(--field-well); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.decide .step .label { color: var(--howden-white); }
.decide .step .input { font-weight: var(--fw-regular); }
.decide .copy-block { background: var(--field-well); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.decide .copy-block p { font-size: var(--fs-small); line-height: 1.5; white-space: pre-line; }
.size-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
.size-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.size-options label { display: flex; flex-direction: column; gap: var(--space-sm); padding: 12px; background: var(--surface); color: var(--moss); cursor: pointer; transition: transform var(--duration) var(--ease); }
.size-options label:hover { transform: translateY(-3px); }
.size-options label .heading { font-size: 20px; color: var(--moss); }
.size-options label .meta { color: var(--moss); font-size: var(--fs-micro); }
.size-options label .meta.lead { font-weight: var(--fw-semibold); }
.size-options input:checked + label { background: var(--pistachio); outline: 2px solid var(--howden-white); outline-offset: 2px; }
.size-options input:focus-visible + label { outline: 2px solid var(--pistachio); outline-offset: 2px; }
.size-options input:disabled + label { cursor: default; }
.verdict, .size-err { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-small); line-height: 1.45; }
.verdict .icon { display: none; }
.nearby { display: flex; flex-direction: column; gap: 14px; }
.nearby .h4 { color: var(--moss); }
.nearby .meta { color: var(--moss); font-size: var(--fs-caption); }
.nearby ul { display: flex; flex-direction: column; gap: 12px; }
.nearby li { display: flex; flex-direction: column; gap: var(--space-xs); }
.nearby li .when { font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--moss); }
.nearby li .when a { text-decoration: none; margin-left: 10px; }
.nearby li .when a:hover { text-decoration: underline; }
.nearby li .what { font-size: var(--fs-caption); color: var(--moss); }
.actions { display: flex; flex-direction: column; gap: 14px; }
.actions .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.activity { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.log { display: flex; flex-direction: column; gap: 10px; }
.log li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-md); font-size: var(--fs-small); line-height: 1.4; color: var(--moss); }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.comment-form .field { margin: 0; }
.email-flag { display: inline-flex; flex-direction: column; gap: 2px; }

/* --- projects --------------------------------------------------------------------------------------- */
.project-group { display: flex; flex-direction: column; gap: var(--space-md); }
.project-group .group-head { display: flex; justify-content: space-between; align-items: baseline; }
.project-group .group-head > div { display: flex; flex-direction: column; gap: var(--space-sm); }
.project-group .group-head .meta { color: var(--moss); font-size: var(--fs-caption); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-md); }
.project-card { background: var(--surface-muted); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 200px; color: var(--moss); transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.project-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px var(--moss-shadow); }
.project-card .project-title { font-size: 16px; font-weight: var(--fw-semibold); line-height: 1.3; color: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.project-card .project-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.project-card .project-meta { font-size: var(--fs-caption); line-height: 1.3; }
.project-card .project-src { font-size: var(--fs-micro); }
.project-card .segs { margin-top: auto; grid-template-columns: repeat(3, 1fr); }
.project-card .segs i { height: 5px; background: var(--line-moss-soft); }
.project-card .segs i.on { background: var(--moss); }
.project-card .project-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); }
.project-card .project-foot .btn { height: 30px; padding: 0 10px; font-size: var(--fs-caption); }
.project-card .due { font-size: var(--fs-caption); }
.project-card.is-overdue { background: var(--moss); color: var(--howden-white); }
.project-card.is-overdue .project-src, .project-card.is-overdue .status-word { color: var(--pistachio); }
.project-card.is-overdue .segs i { background: var(--field-track); }
.project-card.is-overdue .segs i.on { background: var(--pistachio); }
.project-card.is-done { background: var(--pistachio); }
.project-card.is-done .done-word { margin-top: auto; font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--moss); }
.project-card .pill-select { font-size: var(--fs-caption); height: 30px; }
.chip-ghost { font-size: var(--fs-micro); color: inherit; text-decoration: none; }
.chip-ghost .icon { display: none; }
.chip-ghost:hover { text-decoration: underline; }

/* --- admin ------------------------------------------------------------------------------------------ */
.admin-filter { margin-bottom: var(--space-lg); max-width: 20rem; }
.add-row { display: flex; gap: 12px; align-items: flex-end; margin-top: var(--space-md); }
.add-row .field { margin: 0; flex: 1 1 16rem; }
.add-row .field .input { max-width: 24rem; }
.inline-edit { display: inline-flex; gap: var(--space-sm); align-items: center; }
.inline-edit .input { width: 18rem; min-height: 36px; padding: 6px 10px; }
.row-actions { display: inline-flex; gap: 12px; white-space: nowrap; }

/* --- side panel --------------------------------------------------------------------------------------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: var(--z-panel); animation: fade-in var(--duration) var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.panel { --panel-width: 40rem; position: fixed; top: 0; right: 0; bottom: 0; width: var(--panel-width); max-width: 100vw; background: var(--surface); z-index: calc(var(--z-panel) + 1); display: flex; flex-direction: column; animation: slide-in var(--duration-slow) var(--ease-out) both; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 32px 16px; }
.panel-header .heading { font-size: var(--fs-h2); line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-body { flex: 1; overflow: auto; padding: 8px 32px 24px; }
.panel-footer { display: flex; gap: 12px; align-items: center; padding: 16px 32px 24px; border-top: 1px solid var(--line); }
.panel-footer .btn-primary { margin-left: auto; }
.panel-dirty { display: flex; gap: 12px; align-items: center; padding: 12px 32px; background: var(--pistachio); color: var(--moss); font-size: var(--fs-small); }
.panel-section { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.panel-section .heading { font-size: var(--fs-h4); }
.linked li { font-size: var(--fs-small); }
.more-details { margin: var(--space-md) 0; border-top: 1px solid var(--line); }
.more-details summary { list-style: none; display: flex; align-items: center; gap: var(--space-xs); min-height: 48px; cursor: pointer; font-weight: var(--fw-semibold); color: var(--moss); }
.more-details summary::-webkit-details-marker { display: none; }
.more-details summary .icon { transition: transform var(--duration) var(--ease); }
.more-details[open] summary .icon { transform: rotate(180deg); }
.more-details summary .meta { font-weight: var(--fw-regular); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-details .more-body { padding-bottom: var(--space-sm); animation: rise var(--duration) var(--ease-out) both; }
.details-row { display: grid; grid-template-columns: 10rem 1fr; gap: var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid var(--line); }

/* --- toasts and dialogs ------------------------------------------------------------------------------- */
#toast-root { position: fixed; right: var(--page-x); top: calc(var(--topbar-h) + 12px); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-sm); }
.toast { display: flex; gap: var(--space-md); align-items: center; min-height: var(--control-h); padding: var(--space-sm) var(--space-md); background: var(--moss); color: var(--howden-white); animation: rise var(--duration-slow) var(--ease-out) both; max-width: 32rem; box-shadow: 0 12px 28px var(--moss-shadow); }
.toast .btn-quiet { color: var(--pistachio); }
.toast :focus-visible { outline-color: var(--pistachio); }
dialog.shortcuts { border: 0; padding: var(--space-xl); max-width: 28rem; background: var(--surface); color: var(--ink); box-shadow: 0 20px 48px var(--moss-shadow); }
dialog.shortcuts::backdrop { background: var(--scrim); }
dialog.shortcuts dl { display: grid; grid-template-columns: 5rem 1fr; gap: var(--space-sm) var(--space-md); margin: var(--space-md) 0; }
kbd { font-family: inherit; border: 1px solid var(--line-moss); padding: 0 var(--space-xs); font-size: var(--fs-small); }

/* --- auth and gate ------------------------------------------------------------------------------------ */
.auth { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: var(--space-2xl) var(--page-x); background: var(--moss); }
.auth-card { width: min(30rem, 100%); background: var(--surface); padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-md); }
.auth-card p { line-height: var(--lh-body); }
.auth-card .title { font-size: var(--fs-h2); }
.auth-card .btn { align-self: flex-start; }
.auth-card .logo { height: 2.5rem; width: auto; display: block; margin-bottom: var(--space-md); margin-left: -0.6rem; }
.auth-card .logo-dark { display: none; }

/* --- motion ------------------------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.96); } 60% { transform: scale(1.02); } 100% { transform: none; } }
.rise { animation: rise var(--duration-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--stagger)); }
.view > * { animation: rise var(--duration-slow) var(--ease-out) both; }
.view > *:nth-child(2) { animation-delay: 60ms; }
.view > *:nth-child(3) { animation-delay: 120ms; }
.view > *:nth-child(n+4) { animation-delay: 180ms; }
.leaving { overflow: hidden; opacity: 0; transition: height var(--duration-slow) var(--ease), opacity var(--duration) var(--ease); }
.burst { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.burst i { position: absolute; left: 55%; top: 40%; animation: burst 1.2s cubic-bezier(0.12, 0.8, 0.3, 1) forwards; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* --- responsive ---------------------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  :root { --page-x: 32px; --fs-hero: 56px; --fs-page: 52px; --fs-stat: 72px; }
  .two-col, .cols-2, .request-cols { grid-template-columns: 1fr; }
  .onboard { grid-template-columns: 1fr; }
  .tbc-head { grid-template-columns: 1fr; }
  .hide-1024 { display: none; }
}
@media (max-width: 900px) {
  #app:has(> .sidebar) { grid-template-columns: 1fr; }
  .sidebar { position: sticky; height: auto; flex-direction: row; align-items: center; gap: var(--space-md); padding: 0 var(--space-md); min-height: 56px; overflow: visible; }
  .sidebar .wordmark, .side-rule, .side-label, .streak, .side-help, .account-item { display: none; }
  .sidebar .brand { margin: 0; }
  .nav { flex-direction: row; flex: 1; }
  .nav a { padding: 8px 12px; gap: 6px; }
  .nav a:hover { padding-left: 12px; }
  .sidebar-foot { margin: 0; padding: 0; flex-direction: row; }
  .side-item .badge { margin-left: 4px; }
  .topbar { padding: 0 var(--space-md); gap: var(--space-md); }
  .search { width: auto; }
  .page-head, .home-hero-inner { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: row; padding-top: 0; }
  .quick-add-row, .fields-2, .fields-3, .size-options, .intake-layout, .req-row { grid-template-columns: 1fr; }
  .comment-form { grid-template-columns: 1fr; }
  .title { font-size: 44px; }
  .hero-title { font-size: 48px; }
  .stat .stat-num { font-size: 64px; }
  #toast-root { right: var(--space-md); top: auto; bottom: var(--space-md); }
  .panel { --panel-width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- search palette (Search planner, / or ⌘K) ------------------------------------------------------------ */
dialog.palette { border: 0; padding: 0; width: min(40rem, 92vw); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px var(--moss-shadow); margin-top: 10vh; }
dialog.palette::backdrop { background: var(--scrim); }
.palette-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font-size: 18px; background: var(--surface); outline: none; }
.palette-input:focus { outline: none; }
.palette-list { max-height: 60vh; overflow: auto; padding: 8px; }
.palette-group { padding: 10px 12px 4px; font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--ink-muted); }
.palette-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--moss); }
.palette-item:hover, .palette-item[aria-selected="true"] { background: var(--pistachio-tint); }
.palette-item .row-title { font-size: var(--fs-body); }
.palette-item .row-meta { font-size: var(--fs-caption); }
.palette-empty { padding: 24px 20px; color: var(--ink-muted); font-size: var(--fs-small); }
.palette-foot { display: flex; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: var(--fs-caption); color: var(--ink-muted); }

/* --- Home: the top bar lives on the hero ------------------------------------------------------------------ */
body.on-home .main { position: relative; }
body.on-home .topbar { position: absolute; top: 0; left: 0; right: 0; background: transparent; border-bottom: 0; z-index: 3; }
body.on-home .crumb, body.on-home .crumb b, body.on-home .alerts { color: var(--howden-white); }
body.on-home .alerts .dot { background: var(--pistachio); }
body.on-home .search { background: var(--field-well); color: var(--field-text-soft); }
body.on-home .search:hover { background: var(--field-hover); }
body.on-home .search kbd { color: var(--field-text-soft); border-color: var(--field-line); }
body.on-home .menu { color: var(--ink); }
body.on-home .home-hero { padding-top: calc(var(--topbar-h) + 32px); }
@media (max-width: 900px) { body.on-home .topbar { position: sticky; background: var(--surface); border-bottom: 1px solid var(--line-soft); } body.on-home .crumb, body.on-home .crumb b, body.on-home .alerts { color: var(--moss); } body.on-home .search { background: var(--surface-muted); color: var(--ink-muted); } body.on-home .home-hero { padding-top: 32px; } }
