/* Crown Jobs: Fume's design system in Crown's colours.
   From Fume: token roles, warm grounds, pills that act and soft rectangles that hold, surface and
   space in place of lines, flat fills, 44 px touch targets, filled Lucide icons.
   From Crown: the logo, Crown Teal where Fume uses Brown and Ink for actions, DM Sans, and
   DM Serif Display for the one title on each page. No Fume logo, Focus frame or wording. */
:root {
  --crown-teal: #115a68;
  --crown-teal-deep: #0d4753;
  --crown-teal-fg: #fcf6eb;
  --crown-teal-wash: rgb(17 90 104 / .1);
  --crown-gold: #b7862a;
  --crown-gold-wash: rgb(183 134 42 / .14);
  /* Light mode is a warm paper, not bright white, with cards a shade lighter so they stand out
     without lines, and grey text dark enough for older eyes (Kristian 11/11: easier on the eyes). */
  --ui-ground: #f3eee6;
  --ui-surface: #fdfbf7;
  --ui-surface-hover: #ebe4da;
  --ui-surface-sunken: #e9e2d8;
  --ui-field: #fffefb;
  --ui-text: #1b1410;
  --ui-text-secondary: #342c27;
  --ui-text-tertiary: #4f4640;
  --ui-hairline: #d3cabf;
  --ui-hairline-strong: #b3a99d;
  --ui-point-warn: #f59e56;
  --ui-danger: #ba4a52;
  --ui-glass-solid: rgb(27 20 16 / .94);
  --ui-glass-fg: #fcf6eb;
  --ui-depth-raised: 0 1px 2px rgb(27 20 16 / .06), 0 2px 8px -2px rgb(27 20 16 / .08);
  --ui-depth-sheet: 0 1px 3px rgb(27 20 16 / .06), 0 16px 40px -16px rgb(27 20 16 / .18);
  --ui-radius-action: 999px;
  --ui-radius-field: 12px;
  --ui-radius-item: 10px;
  --ui-radius-card: 16px;
  --ui-radius-float: 22px;
  --ui-space-xs: 4px;
  --ui-space-sm: 8px;
  --ui-space-md: 12px;
  --ui-space-lg: 16px;
  --ui-space-xl: 24px;
  --ui-space-2xl: 32px;
  --ui-type-micro: 12px;
  --ui-type-label: 14px;
  --ui-type-control: 16px;
  --ui-type-body: 18px;
  --ui-type-body-large: 20px;
  --ui-type-title: 26px;
  --ui-type-title-large: 36px;
  --ui-type-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --ui-type-display-family: 'DM Serif Display', Georgia, serif;
  --ui-weight-body: 450;
  --ui-inset-tight: 12px;
  --ui-inset-float: 16px;
  --ui-inset-panel: 24px;
  /* Status colours, so components never write a hex (Fume tokens-only-color). */
  --ui-ok: #2f7d55;
  --ui-warn-text: #9a4a07;
  --ui-info: #0369a1;
  --ui-violet: #6d28d9;
  --ui-orange: #c2410c;
  --ui-on-accent: #fffdf9;
  --ui-size-hit: 48px;
  --ui-motion-fast: 160ms;
  --ui-motion-slow: 480ms;
  --ui-motion-ease: cubic-bezier(.2, 0, 0, 1);
  color-scheme: light;
}
/* Text size: Normal, Large, Larger. Scot and Joan start on Large; anyone can switch with the Aa button
   (Kristian 11/11: bigger font for older readers). Every size in the app comes from these tokens. */
:root[data-size="large"] {
  --ui-type-micro: 14px; --ui-type-label: 16px; --ui-type-control: 18px; --ui-type-body: 20px;
  --ui-type-body-large: 23px; --ui-type-title: 30px; --ui-type-title-large: 40px;
}
:root[data-size="larger"] {
  --ui-type-micro: 16px; --ui-type-label: 18px; --ui-type-control: 20px; --ui-type-body: 23px;
  --ui-type-body-large: 26px; --ui-type-title: 34px; --ui-type-title-large: 44px; --ui-size-hit: 52px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --crown-teal: #7cc0cc; --crown-teal-deep: #94ccd6; --crown-teal-fg: #1b1410; --crown-teal-wash: rgb(124 192 204 / .14); --crown-gold: #e2b55c; --crown-gold-wash: rgb(226 181 92 / .16);
    --ui-ground: #1b1410; --ui-surface: #2c2520; --ui-surface-hover: #463e39; --ui-surface-sunken: #463e39;
    --ui-weight-body: 400; --ui-ok: #6fcf9e; --ui-warn-text: #f0b37a; --ui-info: #7cc4ec; --ui-violet: #b9a3f2; --ui-orange: #f29a6b; --ui-on-accent: #1b1410; --ui-field: #1b1410; --ui-text: #fcf6eb; --ui-text-secondary: #dcd6d0; --ui-text-tertiary: #a49d97;
    --ui-hairline: #463e39; --ui-hairline-strong: #615953; --ui-danger: #e08087; --ui-glass-solid: #2c2520;
    --ui-depth-raised: 0 1px 2px rgb(0 0 0 / .3); --ui-depth-sheet: 0 16px 40px -16px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --crown-teal: #7cc0cc; --crown-teal-deep: #94ccd6; --crown-teal-fg: #1b1410; --crown-teal-wash: rgb(124 192 204 / .14); --crown-gold: #e2b55c; --crown-gold-wash: rgb(226 181 92 / .16);
  --ui-ground: #1b1410; --ui-surface: #2c2520; --ui-surface-hover: #463e39; --ui-surface-sunken: #463e39;
  --ui-weight-body: 400; --ui-ok: #6fcf9e; --ui-warn-text: #f0b37a; --ui-info: #7cc4ec; --ui-violet: #b9a3f2; --ui-orange: #f29a6b; --ui-on-accent: #1b1410; --ui-field: #1b1410; --ui-text: #fcf6eb; --ui-text-secondary: #dcd6d0; --ui-text-tertiary: #a49d97;
  --ui-hairline: #463e39; --ui-hairline-strong: #615953; --ui-danger: #e08087; --ui-glass-solid: #2c2520;
  --ui-depth-raised: 0 1px 2px rgb(0 0 0 / .3); --ui-depth-sheet: 0 16px 40px -16px rgb(0 0 0 / .7);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ui-ground); color: var(--ui-text);
  font: var(--ui-weight-body) var(--ui-type-body)/1.55 var(--ui-type-family);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--crown-teal); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font: 400 var(--ui-type-title-large)/1.15 var(--ui-type-display-family); }
h2 { font-size: var(--ui-type-body-large); }
b { font-weight: 500; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 var(--ui-space-lg); }
.muted { color: var(--ui-text-secondary); }
.faint { color: var(--ui-text-tertiary); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---- header ------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--ui-ground); }
.top .wrap { display: flex; align-items: center; gap: var(--ui-space-md); height: 64px; }
.brand { display: flex; align-items: center; gap: var(--ui-space-sm); font-weight: 500; font-size: var(--ui-type-body-large); min-height: var(--ui-size-hit); }
.mark { width: 34px; height: 30px; flex: none; background: var(--crown-teal);
  -webkit-mask: url(crown-mark.webp) center / contain no-repeat; mask: url(crown-mark.webp) center / contain no-repeat; }
.spacer { flex: 1; }
.topnav { display: none; gap: var(--ui-space-xs); margin-left: var(--ui-space-md); }
.topnav a { padding: var(--ui-space-sm) var(--ui-space-lg); border-radius: var(--ui-radius-action); font-size: var(--ui-type-control); font-weight: 500; color: var(--ui-text-secondary); }
.topnav a.on { background: var(--crown-teal-wash); color: var(--crown-teal); }
.icon-btn {
  width: var(--ui-size-hit); height: var(--ui-size-hit); border-radius: 50%; border: 0; display: grid; place-items: center;
  background: transparent; color: var(--ui-text-secondary); cursor: pointer;
}
.icon-btn:active { background: var(--ui-surface-sunken); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .aa { font-weight: 600; font-size: var(--ui-type-label); line-height: 1; letter-spacing: -.02em; }
.icon-btn .aa b { font-size: var(--ui-type-body); font-weight: 600; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--crown-teal); color: var(--crown-teal-fg); font-weight: 500; font-size: var(--ui-type-control); flex: none;
}
.avatar.sm { width: 28px; height: 28px; font-size: var(--ui-type-label); }
.avatar.lg { width: 56px; height: 56px; font-size: var(--ui-type-title); }

.viewer { position: relative; }
.viewer summary { list-style: none; cursor: pointer; min-width: var(--ui-size-hit); min-height: var(--ui-size-hit); display: grid; place-items: center; }
.viewer summary::-webkit-details-marker { display: none; }
.viewer .menu {
  position: absolute; right: 0; top: 52px; width: 260px; padding: var(--ui-space-sm) 0; border-radius: var(--ui-radius-float);
  background: var(--ui-glass-solid); color: var(--ui-glass-fg); box-shadow: var(--ui-depth-sheet); overflow: hidden;
}
.viewer .menu .lbl { font-size: var(--ui-type-label); opacity: .7; padding: var(--ui-space-xs) var(--ui-space-lg); }
.viewer .menu a { display: flex; align-items: center; gap: var(--ui-space-md); padding: var(--ui-space-sm) var(--ui-space-lg); min-height: var(--ui-size-hit); }
.viewer .menu a:active, .viewer .menu a.on { background: rgb(252 246 235 / .12); }
.viewer .menu small { display: block; opacity: .7; font-size: var(--ui-type-label); }

.sample-bar { background: var(--ui-surface-sunken); font-size: var(--ui-type-control); text-align: center; padding: var(--ui-space-sm) var(--ui-space-lg); }
.sample-bar b { color: var(--ui-text); }

/* ---- bottom tabs (phone) ------------------------------------------------ */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: var(--ui-space-xs) var(--ui-space-sm) calc(var(--ui-space-sm) + env(safe-area-inset-bottom));
  background: var(--ui-ground); box-shadow: 0 -8px 24px -16px rgb(27 20 16 / .25);
}
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--ui-space-sm) 0 var(--ui-space-xs);
  font-size: var(--ui-type-label); font-weight: 500; color: var(--ui-text-tertiary); }
.tabs a svg { width: 22px; height: 22px; }
.tabs a.on { color: var(--crown-teal); }

/* ---- page bits ---------------------------------------------------------- */
.hero { padding: var(--ui-space-lg) 0 var(--ui-space-xs); }
.hero .date { font-size: var(--ui-type-label); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ui-text-tertiary); margin-bottom: var(--ui-space-xs); }
.hero p { margin: var(--ui-space-sm) 0 0; color: var(--ui-text-secondary); }
.section { margin-top: var(--ui-space-2xl); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 var(--ui-space-xs) var(--ui-space-md); }
.section-head a { color: var(--crown-teal); font-size: var(--ui-type-control); font-weight: 500; }
.count { display: inline-grid; place-items: center; min-width: 1.75em; min-height: 1.75em; padding: 0 var(--ui-space-sm); line-height: 1.2; margin-left: var(--ui-space-sm);
  border-radius: var(--ui-radius-action); background: var(--ui-surface-sunken); color: var(--ui-text-secondary); font-size: var(--ui-type-label); font-weight: 500; vertical-align: 2px; font-variant-numeric: tabular-nums; }
.card { background: var(--ui-surface); border-radius: var(--ui-radius-card); }
.card.pad { padding: var(--ui-space-lg); }
.empty { padding: var(--ui-space-xl) var(--ui-space-lg); color: var(--ui-text-secondary); text-align: center; }
.grid2 { display: grid; gap: 0 var(--ui-space-xl); }

/* ---- weekly targets ---------------------------------------------------- */
.target-grid { display: grid; gap: var(--ui-space-md); }
.score { padding: var(--ui-space-xl); }
.score-top { display: flex; align-items: center; justify-content: space-between; gap: var(--ui-space-md); }
.score .who { display: flex; align-items: center; gap: var(--ui-space-sm); font-weight: 500; font-size: var(--ui-type-body-large); }
.verdict { display: inline-flex; align-items: center; gap: var(--ui-space-xs); min-height: 1.75em; padding: var(--ui-space-xs) var(--ui-space-md); line-height: 1.25; border-radius: var(--ui-radius-action);
  background: var(--ui-surface-sunken); font-size: var(--ui-type-control); font-weight: 500; white-space: nowrap; }
.verdict.hit { background: var(--crown-teal); color: var(--crown-teal-fg); }
.verdict svg { width: 14px; height: 14px; }
.score .when { margin-top: var(--ui-space-md); font-size: var(--ui-type-control); color: var(--ui-text-tertiary); }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ui-space-lg); margin-top: var(--ui-space-sm); }
.nums.one { grid-template-columns: 1fr; }
.nums b { display: block; font-size: var(--ui-type-title-large); font-weight: 500; line-height: 1.15; }
.nums span { display: block; font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.nums em { display: block; font-style: normal; font-size: var(--ui-type-control); font-weight: 500; }
.wk-chart { position: relative; display: grid; grid-template-columns: repeat(9, 1fr); align-items: stretch; gap: 2px; height: 96px; margin-top: var(--ui-space-xl); }
.wk { position: relative; display: flex; align-items: flex-end; height: 100%; cursor: default; outline-offset: 0; }
.wk-bar { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--crown-teal); opacity: .45; }
.wk.hit .wk-bar { opacity: 1; }
.wk.current .wk-bar { background: var(--ui-text-tertiary); opacity: .35; }
.wk-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--ui-text); z-index: 1; pointer-events: none; }
.wk-line i { position: absolute; left: 0; bottom: 2px; font-style: normal; font-size: var(--ui-type-label); color: var(--ui-text-secondary); background: var(--ui-surface); padding: 0 var(--ui-space-xs) 0 0; }
.wk .tip { display: none; position: absolute; bottom: calc(100% + 4px); z-index: 3; width: 120px; padding: var(--ui-space-sm) var(--ui-space-md); border-radius: var(--ui-radius-field);
  background: var(--ui-glass-solid); color: var(--ui-glass-fg); font-size: var(--ui-type-label); line-height: 1.35; pointer-events: none; }
.wk:nth-child(-n+6) .tip { left: 0; }
.wk:nth-child(n+7) .tip { right: 0; }
.wk:focus .tip { display: block; }
.wk-axis { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; margin-top: var(--ui-space-xs); font-size: var(--ui-type-label); color: var(--ui-text-tertiary); white-space: nowrap; }
.wk-axis span { min-width: 0; }
.score-foot { margin: var(--ui-space-md) 0 0; font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.score-foot b { color: var(--ui-text); }
.score-now { margin: var(--ui-space-sm) 0 0; font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.score-now b { color: var(--ui-text); }
.wk-table { margin-top: var(--ui-space-sm); font-size: var(--ui-type-control); }
.wk-table summary { cursor: pointer; color: var(--crown-teal); font-weight: 500; min-height: var(--ui-size-hit); display: flex; align-items: center; }
.wk-table table { width: 100%; border-collapse: collapse; }
.wk-table th { text-align: left; font-weight: 500; font-size: var(--ui-type-label); color: var(--ui-text-tertiary); padding: var(--ui-space-xs) 0; }
.wk-table td { padding: var(--ui-space-xs) 0; }

/* ---- job cards ---------------------------------------------------------- */
.job { display: flex; align-items: center; gap: var(--ui-space-md); padding: var(--ui-space-md) var(--ui-space-lg); border-radius: var(--ui-radius-card); }
.job:active { background: var(--ui-surface-hover); }
.job .body { flex: 1; min-width: 0; }
.job .name { font-weight: 500; line-height: 1.3; }
.job .meta { color: var(--ui-text-secondary); font-size: var(--ui-type-control); margin-top: 2px; }
.job .chev { color: var(--ui-text-tertiary); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--ui-space-xs); margin-top: var(--ui-space-sm); }
.chip { display: inline-flex; align-items: center; gap: var(--ui-space-xs); min-height: 1.75em; max-width: 100%; font-size: var(--ui-type-label); font-weight: 500;
  padding: 2px var(--ui-space-md); line-height: 1.25; border-radius: var(--ui-radius-action); background: var(--ui-surface-sunken); color: var(--ui-text-secondary); }
.chip::before { flex: none; }
.chip.danger::before, .chip.warn::before, .chip.ask::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.chip.danger::before { background: var(--ui-danger); }
.chip.warn::before { background: var(--ui-point-warn); }
.chip.ask::before { background: var(--crown-teal); }
.chip.accent { background: var(--crown-teal-wash); color: var(--crown-teal); }
.chip.gold { background: var(--crown-teal); color: var(--crown-teal-fg); }

/* progress ring */
.ring { position: relative; flex: none; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .track { stroke: var(--ui-surface-sunken); }
.ring .arc { stroke: var(--crown-teal); stroke-linecap: round; transition: stroke-dashoffset var(--ui-motion-slow) var(--ui-motion-ease); }
.ring .pct { position: absolute; font-size: var(--ui-type-label); font-weight: 500; font-variant-numeric: tabular-nums; }
.ring.big .pct { font-size: var(--ui-type-body-large); }
.ring .pct svg { transform: none; width: 20px; height: 20px; color: var(--crown-teal); }

/* board tabs: a segmented control */
.seg { display: flex; gap: 0; overflow-x: auto; padding: 3px; margin: var(--ui-space-md) 0 var(--ui-space-lg); border-radius: var(--ui-radius-action); background: var(--ui-surface-sunken); scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--ui-space-xs) var(--ui-space-md); min-height: calc(var(--ui-size-hit) - 6px); line-height: 1.25; border-radius: var(--ui-radius-action); font-weight: 500; font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.seg a.on { background: var(--ui-field); color: var(--ui-text); box-shadow: var(--ui-depth-raised); }
.seg a .n { color: var(--ui-text-tertiary); margin-left: var(--ui-space-xs); font-variant-numeric: tabular-nums; }

/* ---- job page ----------------------------------------------------------- */
.back { display: inline-flex; align-items: center; gap: var(--ui-space-xs); color: var(--crown-teal); font-weight: 500; font-size: var(--ui-type-control); min-height: var(--ui-size-hit); }
.job-hero { display: flex; gap: var(--ui-space-lg); align-items: center; padding: var(--ui-space-sm) 0; }
.job-hero h1 { font-size: var(--ui-type-title); }
.summary { font-size: var(--ui-type-body-large); line-height: 1.5; padding: var(--ui-space-xl); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ui-space-sm); margin: 0; }
.facts div { background: var(--ui-surface); border-radius: var(--ui-radius-card); padding: var(--ui-space-md) var(--ui-space-lg); }
.facts div.wide { grid-column: 1 / -1; }
.facts dt { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.facts dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.facts dd a { color: var(--crown-teal); }

.step { display: flex; gap: var(--ui-space-md); align-items: center; padding: var(--ui-space-md) var(--ui-space-lg); }
.check { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2px solid var(--ui-hairline-strong); color: transparent; }
.check svg { width: 16px; height: 16px; }
.step.done .check { background: var(--crown-teal); border-color: var(--crown-teal); color: var(--crown-teal-fg); }
.step.done.pop .check { animation: pop var(--ui-motion-slow) var(--ui-motion-ease); }
.step.next .check { border-color: var(--crown-teal); }
.step .label { font-weight: 500; }
.step.done .label { color: var(--ui-text-secondary); }
.step .src { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); word-break: break-word; }
.step form { margin-left: auto; flex: none; }
@keyframes pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }

/* Button. The ONE definition (Kristian 12/2, "clean it up to my standard"): Fume's button in Crown's colours.
   Always a pill, label centred. Kinds: .btn (filled, one per area), .btn.ghost (every other action),
   .btn.link (quiet: undo, remove, cancel), .danger-text for a delete. Sizes: full, and .small for toolbars and rows.
   The hit area is never under 44 px. Words wrap inside the pill at any text size. No inline styles on a button. */
.btn {
  --bg: var(--crown-teal); --bg-hover: var(--crown-teal-deep); --fg: var(--crown-teal-fg); --edge: transparent;
  appearance: none; position: relative; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--ui-space-sm);
  flex: none; max-width: 100%; min-height: var(--ui-size-hit); padding: var(--ui-space-sm) 20px; border: 0; border-radius: var(--ui-radius-action);
  background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px var(--edge);
  font: inherit; font-size: var(--ui-type-control); font-weight: 500; line-height: 1.25; text-align: center; text-decoration: none; white-space: normal;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; list-style: none;
  transition: background-color var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);
}
.btn::-webkit-details-marker { display: none; }
.btn.ghost { --bg: var(--ui-field); --bg-hover: var(--ui-surface-hover); --fg: var(--ui-text); --edge: var(--ui-hairline); }
.btn.link { --bg: transparent; --bg-hover: var(--ui-surface-hover); --fg: var(--ui-text-secondary); }
.btn.small, .btn.link { min-height: calc(var(--ui-size-hit) - 8px); padding: var(--ui-space-xs) var(--ui-space-lg); }
.btn.link { padding-inline: var(--ui-space-md); }
.btn.small::after, .btn.link::after { content: ""; position: absolute; inset: -2px 0; border-radius: inherit; }
.btn.danger-text { --fg: var(--ui-danger); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.is-off { --bg: var(--ui-surface-sunken); --bg-hover: var(--ui-surface-sunken); --fg: var(--ui-text-tertiary); --edge: transparent; cursor: default; transform: none; }

.notice { display: flex; gap: var(--ui-space-md); align-items: flex-start; padding: var(--ui-space-md) var(--ui-space-lg); font-size: var(--ui-type-control); border-radius: var(--ui-radius-card); }
a.notice:active { background: var(--ui-surface-hover); }
.notice .dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 8px; flex: none; background: var(--ui-text-tertiary); }
.notice.danger .dot { background: var(--ui-danger); }
.notice.warn .dot { background: var(--ui-point-warn); }
.notice.info .dot, .notice.ask .dot { background: var(--crown-teal); }

.ask-card { padding: var(--ui-space-lg); margin-bottom: var(--ui-space-md); }
.ask-card .who { display: flex; align-items: center; gap: var(--ui-space-sm); font-weight: 500; font-size: var(--ui-type-control); }
.ask-card .q { font-size: var(--ui-type-body-large); margin: var(--ui-space-sm) 0 var(--ui-space-md); }
.ask-card textarea { width: 100%; min-height: 72px; font: inherit; padding: var(--ui-space-md); border-radius: var(--ui-radius-field);
  border: 1px solid var(--ui-hairline); background: var(--ui-field); color: var(--ui-text); resize: vertical; }
.ask-card .row { display: flex; gap: var(--ui-space-md); align-items: center; justify-content: space-between; margin-top: var(--ui-space-md); }
.ask-card .note { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }

.files .group { padding: var(--ui-space-md) var(--ui-space-lg) var(--ui-space-xs); font-size: var(--ui-type-label); font-weight: 500; color: var(--ui-text-tertiary); }
.file { display: flex; align-items: center; gap: var(--ui-space-md); padding: var(--ui-space-sm) var(--ui-space-lg); border-radius: var(--ui-radius-card); }
a.file:active { background: var(--ui-surface-hover); }
.file .ext { width: 2.5em; min-height: 2.5em; border-radius: var(--ui-radius-item); display: grid; place-items: center; font-size: var(--ui-type-micro); font-weight: 500; flex: none;
  background: var(--ui-surface-sunken); color: var(--ui-text-secondary); }
.file .fname { font-weight: 500; font-size: var(--ui-type-control); word-break: break-word; }
.file > span:last-child { min-width: 0; }
.file .fmeta { overflow-wrap: anywhere; }
.file .fmeta { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }

.tl { position: relative; padding: var(--ui-space-md) var(--ui-space-lg); }
.tl::before { content: ""; position: absolute; left: 27px; top: 24px; bottom: 24px; width: 2px; background: var(--ui-surface-sunken); }
.tl-item { position: relative; display: flex; gap: var(--ui-space-md); padding: var(--ui-space-sm) 0; }
.tl-item .pin { width: 24px; height: 24px; flex: none; z-index: 1; display: grid; place-items: center; }
.tl-item .pin i { width: 10px; height: 10px; border-radius: 50%; background: var(--ui-hairline-strong); box-shadow: 0 0 0 4px var(--ui-surface); }
.tl-item.stage .pin i, .tl-item.confirm .pin i, .tl-item.tracker .pin i, .tl-item.answer .pin i { background: var(--crown-teal); }
.tl-item.due .pin i { background: var(--ui-danger); }
.tl-item.future { opacity: .65; }
.tl-item .when { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.tl-item .what { font-size: var(--ui-type-control); }

/* timeline for Scot (won jobs) */
.scot-line { display: flex; gap: 0; padding: var(--ui-space-lg) var(--ui-space-sm); overflow-x: auto; scrollbar-width: none; }
.scot-line .st { flex: 1 1 0; min-width: 64px; text-align: center; position: relative; font-size: var(--ui-type-label); line-height: 1.25; font-weight: 500; color: var(--ui-text-secondary); padding: 0 2px; }
.scot-line .st::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--ui-hairline-strong); }
.scot-line .st:first-child::before { display: none; }
.scot-line .st.done::before { background: var(--crown-teal); }
.scot-line .st .check { margin: 0 auto var(--ui-space-sm); position: relative; z-index: 1; background: var(--ui-surface); }
.scot-line .st.done .check { background: var(--crown-teal); border-color: var(--crown-teal); color: var(--crown-teal-fg); }

/* GC scorecard */
.gc-row { display: grid; grid-template-columns: 1fr auto; gap: var(--ui-space-xs) var(--ui-space-md); padding: var(--ui-space-lg); align-items: center; }
.gc-row .gname { font-weight: 500; }
.gc-row .stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--ui-space-sm); }
.stat { background: var(--ui-ground); border-radius: var(--ui-radius-field); padding: var(--ui-space-sm) var(--ui-space-md); }
.stat b { display: block; font-size: var(--ui-type-body-large); font-variant-numeric: tabular-nums; }
.stat span { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.winbar { width: 64px; height: 6px; border-radius: var(--ui-radius-action); background: var(--ui-surface-sunken); overflow: hidden; }
.winbar i { display: block; height: 100%; background: var(--crown-teal); border-radius: var(--ui-radius-action); }
.target { padding: var(--ui-space-lg); display: flex; gap: var(--ui-space-md); align-items: center; }
.target .rank { width: 36px; height: 36px; border-radius: 50%; background: var(--crown-teal-wash); color: var(--crown-teal); display: grid; place-items: center; font-weight: 500; flex: none; }

/* team */
.person { padding: var(--ui-space-lg); }
.person-top { display: flex; gap: var(--ui-space-md); align-items: center; }
.person .role { color: var(--ui-text-secondary); font-size: var(--ui-type-control); }
.person .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ui-space-sm); margin-top: var(--ui-space-md); }
.conn { display: flex; align-items: center; gap: var(--ui-space-md); padding: var(--ui-space-md) var(--ui-space-lg); }
.conn .led { width: 6px; height: 6px; border-radius: 50%; background: var(--ui-hairline-strong); flex: none; }
.conn .led.on { background: var(--crown-teal); }

/* typed in: quick forms and material orders */
.quick { padding: var(--ui-space-lg); margin-bottom: var(--ui-space-md); }
.quick h2 { margin: 0 0 var(--ui-space-lg); }
.quick .bad { margin: 0 0 var(--ui-space-md); color: var(--ui-danger); font-weight: 500; font-size: var(--ui-type-control); }
.quick .fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ui-space-md); }
.quick label { display: block; font-size: var(--ui-type-control); font-weight: 500; color: var(--ui-text-secondary); min-width: 0; }
.quick label.wide { grid-column: 1 / -1; }
.quick input, .quick select { display: block; width: 100%; min-height: var(--ui-size-hit); margin-top: var(--ui-space-xs); font: inherit; font-size: var(--ui-type-body); font-weight: 400;
  padding: var(--ui-space-sm) var(--ui-space-md); border-radius: var(--ui-radius-field); border: 1px solid var(--ui-hairline); background: var(--ui-field); color: var(--ui-text); }
.quick input::placeholder { color: var(--ui-text-tertiary); }
.quick .row { display: flex; gap: var(--ui-space-md); align-items: center; justify-content: space-between; margin-top: var(--ui-space-lg); }
.quick .note { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.order { display: flex; gap: var(--ui-space-md); align-items: center; justify-content: space-between; padding: var(--ui-space-md) var(--ui-space-lg); }
.order .src { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.order.total { background: var(--crown-teal-wash); border-radius: var(--ui-radius-card); }

.aside { margin: var(--ui-space-md) var(--ui-space-xs) 0; font-size: var(--ui-type-control); color: var(--ui-text-tertiary); }
.aside.center { text-align: center; margin-top: var(--ui-space-2xl); }
.aside a { color: var(--crown-teal); font-weight: 500; }
.chip.done { background: var(--crown-teal-wash); color: var(--crown-teal); }
.chip svg { width: 12px; height: 12px; }
.vet { padding: var(--ui-space-lg); }
.vet p { margin: var(--ui-space-md) 0 0; font-size: var(--ui-type-control); color: var(--ui-text-secondary); overflow-wrap: anywhere; }
.gc-send { padding: var(--ui-space-sm) var(--ui-space-lg) var(--ui-space-lg); overflow-x: auto; }
.gc-send table { width: 100%; border-collapse: collapse; font-size: var(--ui-type-control); }
.gc-send th { text-align: left; font-weight: 500; font-size: var(--ui-type-label); color: var(--ui-text-tertiary); padding: var(--ui-space-sm) var(--ui-space-sm) var(--ui-space-sm) 0; }
.gc-send td { padding: var(--ui-space-sm) var(--ui-space-sm) var(--ui-space-sm) 0; vertical-align: top; }
.gc-send td b { font-weight: 500; }
.gc-send small { display: block; font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.gc-send .tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--crown-teal); color: var(--crown-teal-fg); }
.gc-send .tick svg { width: 13px; height: 13px; }
.gc-send .none { display: block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ui-hairline-strong); }
.gc-send .note { margin: var(--ui-space-md) 0 0; font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.foot { text-align: center; color: var(--ui-text-tertiary); font-size: var(--ui-type-label); padding: var(--ui-space-2xl) 0 var(--ui-space-md); }
.foot form { display: inline; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(12px);
  background: var(--ui-glass-solid); color: var(--ui-glass-fg); padding: var(--ui-space-md) var(--ui-space-lg); border-radius: var(--ui-radius-action); font-size: var(--ui-type-control); font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease); z-index: 40; white-space: nowrap; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (hover: hover) {
  .wk:hover .tip { display: block; }
  .topnav a:not(.on):hover { background: var(--ui-surface); }
  .icon-btn:hover { background: var(--ui-surface); }
  .job:hover, a.notice:hover, a.file:hover { background: var(--ui-surface-hover); }
  .btn:hover { background: var(--bg-hover); }
  .viewer .menu a:hover { background: rgb(252 246 235 / .12); }
  .seg a:not(.on):hover { color: var(--ui-text); }
}
@media (min-width: 900px) {
  body { padding-bottom: var(--ui-space-2xl); }
  .tabs { display: none; }
  .topnav { display: flex; }
  .grid2, .target-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  h1 { font-size: max(40px, var(--ui-type-title-large)); }
}
/* Big text needs a wider screen for the top menu: below that, the bottom tabs, as on a phone. */
@media (min-width: 900px) and (max-width: 1299px) {
  :root[data-size="large"] body, :root[data-size="larger"] body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  :root[data-size="large"] .tabs, :root[data-size="larger"] .tabs { display: grid; }
  :root[data-size="large"] .topnav, :root[data-size="larger"] .topnav { display: none; }
}
@media (min-width: 1300px) and (max-width: 1479px) {
  :root[data-size="larger"] body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  :root[data-size="larger"] .tabs { display: grid; }
  :root[data-size="larger"] .topnav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }

.ahead-weeks { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ui-space-sm); margin-top: var(--ui-space-md); }
.ahead-week { padding: var(--ui-space-md); display: grid; gap: 2px; }
.ahead-week b { font-weight: 500; }
.ahead-week small { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.gc-send small.why { color: var(--ui-text-secondary); }
.quick textarea { display: block; width: 100%; margin-top: var(--ui-space-xs); font: inherit; font-size: var(--ui-type-body); font-weight: 400; padding: var(--ui-space-md);
  border: 0; border-radius: var(--ui-radius-field); background: var(--ui-field); color: var(--ui-text); box-shadow: inset 0 0 0 1px var(--ui-hairline); box-sizing: border-box; resize: vertical; }
.note-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ui-space-md); padding: var(--ui-space-md) var(--ui-space-lg); white-space: pre-line; }
.note-row small { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.search-row { display: flex; gap: var(--ui-space-sm); align-items: center; }
.search-row input { flex: 1; margin-top: 0; }
a.icon-btn { display: inline-grid; place-items: center; }
.gc-target { flex: 1; min-width: 0; }
.gc-draft { margin-top: var(--ui-space-sm); }
.gc-draft summary { cursor: pointer; color: var(--crown-teal); font-weight: 500; font-size: var(--ui-type-control); }
.gc-draft .quick { padding: var(--ui-space-md) 0 0; margin: 0; }
.gc-draft .quick label { margin-bottom: var(--ui-space-md); }
.vet-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--ui-space-sm); padding: var(--ui-space-md) var(--ui-space-lg); }
.vet-pics img { width: 100%; display: block; border-radius: var(--ui-radius-field); box-shadow: inset 0 0 0 1px var(--ui-hairline); }
.pad-row { display: flex; justify-content: space-between; align-items: center; gap: var(--ui-space-md); padding: var(--ui-space-md) var(--ui-space-lg); font-size: var(--ui-type-control); }
.goal { padding: var(--ui-space-md) var(--ui-space-lg); display: grid; gap: var(--ui-space-xs); }
.goal-head { display: flex; justify-content: space-between; gap: var(--ui-space-md); align-items: center; }
.goal-head b { font-weight: 500; }
.goal-bar { position: relative; height: 8px; border-radius: 4px; background: var(--ui-field); overflow: visible; box-shadow: inset 0 0 0 1px var(--ui-hairline); }
.goal-bar i { display: block; height: 100%; border-radius: 4px; background: var(--crown-teal); }
.goal-bar u { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ui-text-tertiary); text-decoration: none; }
.goal-line { font-size: var(--ui-type-control); }
.goal-reward b { font-weight: 500; }
.goal-tools { display: flex; gap: var(--ui-space-sm); align-items: center; }
.goal-tools .inline { display: flex; gap: var(--ui-space-xs); align-items: center; }
.goal-tools input { width: 120px; font: inherit; padding: 4px 8px; border: 0; border-radius: var(--ui-radius-field); background: var(--ui-field); color: var(--ui-text); box-shadow: inset 0 0 0 1px var(--ui-hairline); }
.search-row select { font: inherit; min-height: 36px; border-radius: var(--ui-radius-field); background: var(--ui-field); color: var(--ui-text); border: 0; box-shadow: inset 0 0 0 1px var(--ui-hairline); padding: 0 8px; }
@media (max-width: 640px) { .ahead-weeks { grid-template-columns: 1fr; } .pad-row { flex-direction: column; align-items: flex-start; } }
.fact { flex: 1; min-width: 0; }
.fact-tools { display: flex; flex-wrap: wrap; gap: var(--ui-space-xs); align-items: center; margin-top: var(--ui-space-xs); }
.fact-tools input, .fact-tools select { font: inherit; font-size: var(--ui-type-control); padding: 4px 8px; border: 0; border-radius: var(--ui-radius-field); background: var(--ui-field); color: var(--ui-text); box-shadow: inset 0 0 0 1px var(--ui-hairline); max-width: 170px; }
.late { color: var(--ui-danger); }
.tabs { grid-template-columns: repeat(5, 1fr); }
.brand { white-space: nowrap; }
@media (max-width: 640px) { .note-row { flex-wrap: wrap; } .fact-tools input { max-width: 100%; flex: 1 1 120px; } .gc-send table { min-width: 0; } }

/* ---- scoreboard (Home) ---------------------------------------------------- */
.score-grid { display: grid; gap: var(--ui-space-lg); }
.board-card { padding: var(--ui-space-xl); transition: box-shadow var(--ui-motion-slow) var(--ui-motion-ease); }
.board-card.gold { box-shadow: 0 0 0 2px var(--crown-gold), var(--ui-depth-raised); }
.streak { display: inline-flex; align-items: center; gap: var(--ui-space-xs); padding: var(--ui-space-xs) var(--ui-space-md); border-radius: var(--ui-radius-action);
  background: var(--crown-gold-wash); color: var(--crown-gold); font-size: var(--ui-type-control); font-weight: 600; }
.streak svg { width: 16px; height: 16px; }
.rings { display: flex; gap: var(--ui-space-xl); align-items: center; margin-top: var(--ui-space-lg); flex-wrap: wrap; }
.big-ring { position: relative; width: 148px; height: 148px; flex: none; }
.dual { transform: rotate(-90deg); display: block; }
.dual .track { stroke: var(--ui-surface-sunken); }
.dual .arc { stroke-linecap: round; transition: stroke-dashoffset 900ms var(--ui-motion-ease); }
.dual .lined { stroke: var(--crown-teal-wash); stroke: color-mix(in srgb, var(--crown-teal) 30%, transparent); }
.dual .ready { stroke: var(--crown-teal); }
.dual.full .ready { stroke: var(--crown-gold); }
.ring-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-mid b { font: 400 44px/1 var(--ui-type-display-family); }
.ring-mid b small { font-size: 22px; color: var(--ui-text-tertiary); }
.ring-mid span { font-size: var(--ui-type-label); text-transform: uppercase; letter-spacing: .08em; color: var(--ui-text-tertiary); margin-top: 4px; }
.ring-side { flex: 1; min-width: 200px; }
.ring-name { font-weight: 600; font-size: var(--ui-type-body-large); }
.ring-side p { margin: 4px 0 0; font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.legend { display: flex; align-items: center; gap: 6px; }
.legend .k { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 6px; }
.legend .k:first-child { margin-left: 0; }
.legend .k.ready { background: var(--crown-teal); }
.board-card.gold .legend .k.ready { background: var(--crown-gold); }
.legend .k.lined { background: color-mix(in srgb, var(--crown-teal) 30%, transparent); }
.mini { display: flex; align-items: center; gap: var(--ui-space-md); margin-top: var(--ui-space-lg); font-size: var(--ui-type-control); }
.mini b { font-size: var(--ui-type-body); }
.pb { color: var(--crown-gold); }
.ahead-list { list-style: none; margin: var(--ui-space-lg) 0 0; padding: 0; border-top: 1px solid var(--ui-hairline); }
.ahead-list li a { display: grid; grid-template-columns: 24px 1fr auto; gap: 2px var(--ui-space-sm); align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--ui-hairline); }
.ahead-list .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ui-hairline-strong); display: grid; place-items: center; }
.ahead-list li.ok .tick { background: var(--crown-teal); border-color: var(--crown-teal); color: var(--crown-teal-fg); }
.board-card.gold .ahead-list li.ok .tick { background: var(--crown-gold); border-color: var(--crown-gold); }
.ahead-list .tick svg { width: 14px; height: 14px; }
.ahead-list .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahead-list li.ok .nm { color: var(--ui-text-secondary); }
.ahead-list .dt { font-size: var(--ui-type-control); color: var(--ui-text-tertiary); }
.ahead-list .nx { grid-column: 2 / 4; font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.board-card .wk-table { margin-top: var(--ui-space-md); }
.board-card .wk-table summary { font-size: var(--ui-type-control); color: var(--ui-text-tertiary); cursor: pointer; }
.board-card .wk-chart { margin-top: var(--ui-space-md); }
.wins { padding: var(--ui-space-sm) var(--ui-space-lg); }
.win { display: grid; grid-template-columns: 32px 1fr auto; gap: var(--ui-space-md); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ui-hairline); }
.win:last-child { border-bottom: 0; }
.win .badge { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--crown-teal-wash); color: var(--crown-teal); }
.win.won .badge, .win.bid .badge { background: var(--crown-gold-wash); color: var(--crown-gold); }
.win .badge svg { width: 16px; height: 16px; }
.win .when { font-size: var(--ui-type-control); color: var(--ui-text-tertiary); }
.rest-head { margin-top: var(--ui-space-xl); }
.rest-head .faint { font-size: var(--ui-type-control); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
@media (min-width: 760px) { .score-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
@media (prefers-reduced-motion: reduce) { .dual .arc { transition: none; } }

/* ---- job page: next step first ------------------------------------------- */
.next-card { padding: var(--ui-space-xl); border-left: 4px solid var(--crown-teal); }
.next-card.all-done { border-left-color: var(--crown-gold); }
.next-label { font-size: var(--ui-type-label); text-transform: uppercase; letter-spacing: .08em; color: var(--ui-text-tertiary); font-weight: 600; }
.next-step { font: 400 var(--ui-type-title)/1.2 var(--ui-type-display-family); margin-top: 4px; }
.next-meta { display: flex; flex-wrap: wrap; gap: var(--ui-space-sm) var(--ui-space-lg); align-items: center; margin-top: var(--ui-space-md); font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.next-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.step-dots { display: flex; gap: 6px; margin-top: var(--ui-space-md); }
.step-dots i { flex: 1; height: 6px; border-radius: 3px; background: var(--ui-surface-sunken); }
.step-dots i.on { background: var(--crown-teal); }
.all-done .step-dots i.on { background: var(--crown-gold); }
.step-dots i.now { background: color-mix(in srgb, var(--crown-teal) 35%, transparent); }
.board-card .score-top { display: flex; align-items: center; justify-content: space-between; gap: var(--ui-space-md); }
.board-card .who { display: flex; align-items: center; gap: var(--ui-space-sm); font-weight: 600; font-size: var(--ui-type-body-large); }
.warn-text { display: block; margin-top: 4px; color: var(--ui-danger); font-size: var(--ui-type-label); }

/* volume dial: next three weeks lined up */
.dial { display: flex; align-items: stretch; gap: var(--ui-space-sm); margin-top: var(--ui-space-md); }
.dial-name { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); text-transform: uppercase; letter-spacing: .06em; align-self: center; min-width: 64px; }
.dial-week { flex: 1; min-width: 0; position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--ui-space-xs);
  padding: var(--ui-space-xs) var(--ui-space-sm); border-radius: var(--ui-radius-item); background: var(--ui-surface-sunken); font-size: var(--ui-type-control); }
.dial-week small { color: var(--ui-text-tertiary); font-size: var(--ui-type-label); }
.dial-week i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--crown-teal); }
.dial-week.full i { background: var(--crown-gold); }

/* Long file names and links wrap instead of pushing a phone screen sideways (agent test 11/6). */
main.wrap { overflow-wrap: anywhere; }
.notice > span, .fact, dd, .tl-item, .file > span, .win > span { min-width: 0; }
/* Log out sits on the dark menu in both themes, so it uses the menu's light text. */
.viewer .menu .btn.link { --fg: var(--ui-glass-fg); --bg-hover: rgb(252 246 235 / .12); }

/* month goal (Home) */
.month-card { padding: var(--ui-space-xl); display: flex; gap: var(--ui-space-xl); align-items: center; flex-wrap: wrap; }
.month-card.gold { box-shadow: 0 0 0 2px var(--crown-gold), var(--ui-depth-raised); }
.month-ring { position: relative; width: 120px; height: 120px; flex: none; }
.month-ring .ring-mid b { font-size: 36px; }
.month-ring .dual .lined { stroke: color-mix(in srgb, var(--ui-text-tertiary) 35%, transparent); }
.month-side { flex: 1; min-width: 220px; }
.month-side p { margin: 4px 0 0; font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.month-side p.faint { color: var(--ui-text-tertiary); font-size: var(--ui-type-label); margin-top: 6px; }
.bar-line { display: flex; justify-content: space-between; margin-top: var(--ui-space-md); font-size: var(--ui-type-control); }
.bar { height: 8px; border-radius: 4px; background: var(--ui-surface-sunken); overflow: hidden; margin-top: 6px; }
.bar .fill { display: block; height: 100%; width: 0; background: var(--crown-teal); border-radius: 4px; transition: width var(--ui-motion-slow) var(--ui-motion-ease); }

/* ---- shared calendar ------------------------------------------------------ */
.cal-bar { display: flex; flex-wrap: wrap; gap: var(--ui-space-sm) var(--ui-space-lg); align-items: center; }
.cal-head { justify-content: space-between; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; padding: 0; overflow: hidden; background: var(--ui-hairline); }
.cal-dow { background: var(--ui-surface); padding: var(--ui-space-xs) var(--ui-space-sm); overflow: hidden; text-overflow: ellipsis; font-size: var(--ui-type-label); color: var(--ui-text-tertiary); text-transform: uppercase; letter-spacing: .06em; }
.cal-day { background: var(--ui-surface); min-height: 96px; padding: var(--ui-space-xs); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.out { background: var(--ui-ground); }
.cal-day.out .cal-num { color: var(--ui-text-tertiary); }
.cal-day.today .cal-num { color: var(--crown-teal-fg); background: var(--crown-teal); border-radius: var(--ui-radius-action); min-width: 1.7em; padding: 0 var(--ui-space-xs); align-self: flex-start; text-align: center; }
.cal-num { font-size: var(--ui-type-control); font-weight: 600; }
.dow-inline { display: none; }
.cal-chip { display: block; font-size: var(--ui-type-label); line-height: 1.3; padding: 2px var(--ui-space-sm); border-radius: var(--ui-radius-item); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--crown-teal-wash); color: var(--ui-text); border-left: 3px solid var(--crown-teal); }
.cal-chip small { color: var(--ui-text-tertiary); }
.cal-chip.k-install { border-left-color: var(--crown-teal); }
.cal-chip.k-residential { border-left-color: var(--crown-gold); background: var(--crown-gold-wash); }
.cal-chip.k-service-call { border-left-color: var(--ui-orange); background: color-mix(in srgb, var(--ui-orange) 10%, transparent); }
.cal-chip.k-site-walk, .cal-chip.k-meeting { border-left-color: var(--ui-violet); background: color-mix(in srgb, var(--ui-violet) 10%, transparent); }
.cal-chip.k-delivery { border-left-color: var(--ui-info); background: color-mix(in srgb, var(--ui-info) 10%, transparent); }
.cal-chip.k-out { border-left-color: var(--ui-text-tertiary); background: var(--ui-surface-sunken); }
.cal-chip.k-bid-due, .cal-chip.k-deadline { border-left-color: var(--ui-danger); background: transparent; color: var(--ui-text-secondary); }
.cal-key { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-key .cal-chip { display: inline-block; }
.cal-form small { display: block; color: var(--ui-text-tertiary); font-size: var(--ui-type-label); }
.danger-text { color: var(--ui-danger); }
/* On a phone the month is a list of the days that have something on them. */
@media (max-width: 640px) {
  .cal-grid { grid-template-columns: 1fr; background: transparent; gap: 0; }
  .cal-dow, .cal-day.empty, .cal-day.out { display: none; }
  .cal-day { min-height: 0; border-bottom: 1px solid var(--ui-hairline); padding: var(--ui-space-sm) var(--ui-space-md); }
  .dow-inline { display: inline; }
  .cal-chip { white-space: normal; font-size: var(--ui-type-control); padding: var(--ui-space-xs) var(--ui-space-sm); }
}

/* tracker table (the Notion view) */
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ui-space-md); }
.tracker-wrap { padding: 0; overflow-x: auto; }
.tracker { width: 100%; border-collapse: collapse; font-size: var(--ui-type-control); }
.tracker th { text-align: left; font-size: var(--ui-type-label); text-transform: uppercase; letter-spacing: .05em; color: var(--ui-text-tertiary);
  padding: var(--ui-space-sm) var(--ui-space-md); border-bottom: 1px solid var(--ui-hairline-strong); cursor: pointer; white-space: nowrap; position: sticky; top: 0; background: var(--ui-surface); }
.tracker td { padding: var(--ui-space-sm) var(--ui-space-md); border-bottom: 1px solid var(--ui-hairline); vertical-align: top; }
.tracker td:first-child { font-weight: 500; min-width: 180px; }
.tracker td:last-child { min-width: 220px; font-size: var(--ui-type-label); }
@media (hover: hover) { .tracker tr:hover td { background: var(--ui-surface-hover); } }
.st { display: inline-block; padding: 2px var(--ui-space-sm); border-radius: var(--ui-radius-action); font-size: var(--ui-type-label); font-weight: 600; white-space: nowrap; background: var(--ui-surface-sunken); }
.st-estimating { background: var(--crown-teal-wash); color: var(--crown-teal); }
.st-follow-up-needed { background: color-mix(in srgb, var(--ui-point-warn) 20%, transparent); color: var(--ui-warn-text); }
.st-submitted { background: color-mix(in srgb, var(--ui-info) 12%, transparent); color: var(--ui-info); }
.st-active { background: var(--crown-gold-wash); color: var(--crown-gold); }
.st-lost-declined, .st-on-hold-blocked { background: color-mix(in srgb, var(--ui-danger) 12%, transparent); color: var(--ui-danger); }
.st-no-answer, .st-archived, .st-completed { background: var(--ui-surface-sunken); color: var(--ui-text-tertiary); }

/* ---- easy to read, and alive (Kristian 11/6) --------------------------------- */
body { line-height: 1.6; }
.faint, .muted, small { letter-spacing: .005em; }
a.notice, .note-row, .ahead-list li a, .win { min-height: var(--ui-size-hit); }
input, select, textarea { font-size: var(--ui-type-body) !important; min-height: var(--ui-size-hit); }
.ring-mid b { font-size: 48px; }
/* Sections rise in one after another when a page opens, so it feels like it's waking up. */
@media (prefers-reduced-motion: no-preference) {
  /* No fill mode and no delay: if a browser never plays it, the page is simply there. */
  main .section, main .hero { animation: rise 480ms var(--ui-motion-ease); }
  .card { transition: transform var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease); }
  @media (hover: hover) { a.card:hover, .board-card:hover, .month-card:hover { transform: translateY(-2px); box-shadow: var(--ui-depth-sheet); } }
  .live-dot { animation: breathe 2.4s ease-in-out infinite; }
}
@keyframes rise { from { transform: translateY(10px); } to { transform: none; } }
@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
/* "Live" line under the greeting: the helper is on and when the data last changed. */
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ui-ok); display: inline-block; }
.live.off .live-dot { background: var(--ui-text-tertiary); animation: none; }

/* bid result (won / lost / no answer) */
.result-card { padding: var(--ui-space-xl); border-left: 4px solid var(--ui-hairline-strong); }
.result-card summary { cursor: pointer; list-style: none; }
.result-card.r-won { border-left-color: var(--crown-gold); background: var(--crown-gold-wash); }
.result-card.r-won .next-step { color: var(--crown-gold); }
.result-card.r-lost { border-left-color: var(--ui-danger); }
.result-buttons { gap: var(--ui-space-sm); justify-content: flex-start; flex-wrap: wrap; }

/* week plan */
.plan-btn { margin-top: var(--ui-space-md); }
.plan-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ui-space-md); margin-top: var(--ui-space-md); }
.plan-stats .stat { padding: var(--ui-space-lg); display: flex; flex-direction: column; gap: 2px; }
.plan-stats .stat b { font: 400 var(--ui-type-title-large)/1 var(--ui-type-display-family); }
.plan-stats .stat span { font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.plan-stats .stat.bad b { color: var(--ui-danger); }
.plan-stats .stat.warn b { color: var(--ui-warn-text); }
.pill-risk { display: inline-block; padding: 2px var(--ui-space-sm); border-radius: var(--ui-radius-action); background: color-mix(in srgb, var(--ui-danger) 12%, transparent); color: var(--ui-danger); font-size: var(--ui-type-label); font-weight: 600; }
@media (min-width: 760px) { .plan-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media print { .top, .tabbar, .seg, .btn, nav { display: none !important; } body { background: #fff; } .card { box-shadow: none; border: 1px solid #ccc; } }

.sheet-pick { padding: var(--ui-space-lg); margin-bottom: var(--ui-space-md); }
.sheet-pick summary { cursor: pointer; }

/* the field of numbers on a lost bid: ours stands out */
.field-row { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.field-row .fn { padding: 2px var(--ui-space-md); border-radius: var(--ui-radius-action); background: var(--ui-surface-sunken); font-variant-numeric: tabular-nums; font-size: var(--ui-type-control); }
.field-row .fn.ours { background: var(--crown-teal); color: var(--crown-teal-fg); font-weight: 600; }

/* where we went wrong (job page) */
.review-card { padding: var(--ui-space-xl); margin-bottom: var(--ui-space-md); border-left: 4px solid var(--ui-danger); }
.review-card h3 { margin: 0 0 4px; font-size: var(--ui-type-body-large); }
.review-card p { margin: 6px 0; }
.review-flags { margin: var(--ui-space-md) 0; padding-left: 22px; }
.review-flags li { margin: 6px 0; }
.review-bars { display: grid; gap: 8px; margin-top: var(--ui-space-md); }
.rb { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: var(--ui-space-sm); align-items: center; font-size: var(--ui-type-control); }
.rb-bar { height: 10px; border-radius: 5px; background: var(--ui-surface-sunken); overflow: hidden; }
.rb-bar i { display: block; height: 100%; background: var(--ui-danger); opacity: .7; }
.review-line { display: inline-block; margin-top: var(--ui-space-xs); padding: var(--ui-space-xs) var(--ui-space-md); border-radius: var(--ui-radius-item); background: color-mix(in srgb, var(--ui-danger) 8%, transparent); }

/* New work card (Home) */
.new-work { display: grid; gap: var(--ui-space-md); }
.nw { display: block; padding: var(--ui-space-lg); color: inherit; transition: box-shadow var(--ui-motion-fast) var(--ui-motion-ease); }
@media (hover: hover) { .nw:hover { box-shadow: 0 0 0 2px var(--crown-teal), var(--ui-depth-raised); } }
.nw-top { display: flex; align-items: baseline; gap: var(--ui-space-sm); margin-bottom: var(--ui-space-sm); }
.nw-top b { font: 400 var(--ui-type-title-large)/1 var(--ui-type-display-family); color: var(--crown-teal); }
.nw-top span { color: var(--ui-text-secondary); font-size: var(--ui-type-control); }
.nw-line { display: flex; justify-content: space-between; gap: var(--ui-space-md); padding: 6px 0; border-top: 1px solid var(--ui-hairline); font-size: var(--ui-type-control); min-width: 0; }
.nw-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.nw-line small { color: var(--ui-text-tertiary); white-space: nowrap; }
.nw-more { margin-top: var(--ui-space-sm); font-size: var(--ui-type-label); color: var(--crown-teal); font-weight: 600; }
@media (min-width: 760px) { .new-work { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* board picks, plain English */
.key { padding: var(--ui-space-lg); display: grid; gap: var(--ui-space-sm); }
.key-row { display: flex; gap: var(--ui-space-md); align-items: baseline; font-size: var(--ui-type-control); }
.key-row .pill { flex: none; min-width: 72px; text-align: center; }
.pill { display: inline-block; padding: 2px var(--ui-space-md); border-radius: var(--ui-radius-action); font-size: var(--ui-type-label); font-weight: 600; white-space: nowrap; }
.pill-good { background: var(--crown-teal-wash); color: var(--crown-teal); }
.pill-look { background: color-mix(in srgb, var(--ui-point-warn) 20%, transparent); color: var(--ui-warn-text); }
.pill-skip { background: var(--ui-surface-sunken); color: var(--ui-text-tertiary); }
.pick-list { display: grid; gap: var(--ui-space-sm); }
.pick { padding: var(--ui-space-lg); }
.pick summary { cursor: pointer; list-style: none; }
.pick summary::-webkit-details-marker { display: none; }
.pick-head { display: flex; justify-content: space-between; gap: var(--ui-space-md); align-items: baseline; }
.pick-sub { font-size: var(--ui-type-control); color: var(--ui-text-secondary); margin-top: 2px; }
.pick-flag { font-size: var(--ui-type-control); color: var(--ui-warn-text); margin-top: 4px; }
.checks { list-style: none; padding: 0; margin: var(--ui-space-md) 0 0; display: grid; gap: 6px; font-size: var(--ui-type-control); }
.checks .mark { display: inline-block; width: 20px; font-weight: 700; }
.checks .ok .mark { color: var(--crown-teal); }
.checks .warn .mark { color: var(--ui-warn-text); }
.checks .bad .mark { color: var(--ui-danger); }
.skipped summary { cursor: pointer; color: var(--ui-text-tertiary); font-size: var(--ui-type-control); margin-bottom: var(--ui-space-sm); }

/* Home, calm (11/10) */
.hero-calm { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--ui-space-lg); flex-wrap: wrap; }
.hero-calm .live { margin-top: 6px; }
.why-more { margin-top: var(--ui-space-sm); font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.why-more summary { cursor: pointer; }
.why-more p { margin: 6px 0 0; }
.calm-stat { margin-top: var(--ui-space-sm) !important; }
.calm-stat b { color: var(--ui-text); }
.team-lines { margin-top: var(--ui-space-md); padding: 0; }
.team-line { display: flex; align-items: center; gap: var(--ui-space-md); padding: var(--ui-space-md) var(--ui-space-lg); border-bottom: 1px solid var(--ui-hairline); font-size: var(--ui-type-control); }
.team-line:last-child { border-bottom: 0; }
.team-line > span.tnum { flex: 1; color: var(--ui-text-secondary); }
.team-line > .avatar { flex: none; }
.team-line svg { color: var(--ui-text-tertiary); }
.nw-why { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); margin: -2px 0 4px; }
.more-home > summary { cursor: pointer; padding: var(--ui-space-md) 0; color: var(--ui-text-secondary); font-weight: 500; }

.nw { min-width: 0; }
.nw-line span { min-width: 0; }
.nw-line small { overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.new-work { min-width: 0; }
.checks li { display: flex; gap: 8px; align-items: baseline; }
.checks .mark { flex: none; width: 16px; text-align: center; }

/* GC page outreach brief (11/10): five counts in a row, two columns on a phone */
.outreach-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--ui-space-sm); }
@media (max-width: 640px) { .outreach-stats { grid-template-columns: repeat(2, 1fr); } }

.st-pending-award { background: var(--crown-gold-wash); color: var(--crown-gold); }
.result-card.r-pending_award { border-left: 4px solid var(--crown-gold); }

/* ---- Scout ---------------------------------------------------------------- */
.scout-list { display: grid; gap: var(--ui-space-md); }
.scout-row { display: flex; gap: var(--ui-space-lg); align-items: center; padding: var(--ui-space-lg) var(--ui-space-xl); border-left: 6px solid var(--ui-hairline-strong); }
.scout-row.good { border-left-color: var(--crown-gold); background: color-mix(in srgb, var(--crown-gold) 8%, var(--ui-surface)); }
.sr-main { flex: 1; min-width: 0; }
.sr-name { font-weight: 600; font-size: var(--ui-type-body-large); }
.sr-meta { font-size: var(--ui-type-control); color: var(--ui-text-secondary); margin-top: 2px; }
.sr-why { font-size: var(--ui-type-control); color: var(--ui-text-tertiary); margin-top: 2px; }
.sr-due { display: grid; justify-items: end; gap: 2px; text-align: right; }
.sr-due small { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); text-transform: uppercase; letter-spacing: .06em; }
.sr-due b { font-size: var(--ui-type-title); font-weight: 600; }
.sr-badge { display: inline-block; padding: 2px var(--ui-space-md); border-radius: var(--ui-radius-action); background: var(--crown-gold); color: var(--ui-on-accent); font-size: var(--ui-type-label); font-weight: 600; }
.sr-badge.look { background: var(--ui-surface-sunken); color: var(--ui-text-secondary); }
.scout-add { margin-top: var(--ui-space-xl); border: 2px solid var(--crown-teal); }
.owner-pick .radio, .scout-add fieldset .radio { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-size: var(--ui-type-body); }
.scout-add fieldset { border: 0; padding: 0; margin: 0; }
.scout-add legend { font-weight: 600; margin-bottom: 4px; }
.notice.ok .dot { background: var(--ui-ok); }
.scout-rush summary { cursor: pointer; padding: var(--ui-space-md) 0; font-size: var(--ui-type-body); }

/* Scout card, calm (Kristian 11/11: one clear button, little on screen) */
.sc-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--ui-text-secondary); }
.sc-actions { display: flex; flex-wrap: wrap; gap: var(--ui-space-md); margin-top: var(--ui-space-lg); }
.sc-sub { margin-top: var(--ui-space-sm); font-size: var(--ui-type-control); color: var(--ui-text-tertiary); }
.sc-mat { display: flex; justify-content: space-between; gap: var(--ui-space-lg); padding: var(--ui-space-md) var(--ui-space-lg); border-bottom: 1px solid var(--ui-hairline); }
.sc-mat:last-of-type { border-bottom: 0; }
.sc-mat-qty { font-weight: 600; white-space: nowrap; }
.sc-empty { line-height: 1.6; padding: var(--ui-space-md) var(--ui-space-lg); }
.sc-mats .note { padding: var(--ui-space-sm) var(--ui-space-lg) var(--ui-space-md); }
.sc-empty code, .notice code { font-size: var(--ui-type-control); word-break: break-all; }
.owner-pills { display: flex; gap: var(--ui-space-md); margin: var(--ui-space-md) 0; }
.owner-pills .pill { flex: 1; position: relative; }
.owner-pills .pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.owner-pills .pill span { display: block; text-align: center; padding: var(--ui-space-md) var(--ui-space-lg); border-radius: var(--ui-radius-action); box-shadow: inset 0 0 0 1px var(--ui-hairline-strong); font-weight: 600; cursor: pointer; }
.owner-pills .pill input:checked + span { background: var(--crown-teal); color: var(--crown-teal-fg); box-shadow: none; }
.owner-pills .pill input:focus-visible + span { outline: 2px solid var(--crown-teal); outline-offset: 2px; }
.sc-go { width: 100%; justify-content: center; }
.sc-more summary { cursor: pointer; color: var(--ui-text-secondary); margin-top: var(--ui-space-md); }
.sc-aside { display: flex; gap: var(--ui-space-sm); margin-top: var(--ui-space-md); }
.sc-aside input { flex: 1; min-width: 0; }
.sc-aside { flex-wrap: wrap; }
.sc-aside select { flex: 0 1 240px; min-width: 0; }
.sc-passed { margin-top: var(--ui-space-lg); }
.sr-mats { font-size: var(--ui-type-control); color: var(--ui-text); margin-top: 2px; }

/* Scout: Learn more on a GC Crown has never bid for (11/11) */
.sc-learn { margin-left: auto; white-space: nowrap; align-self: center; }
.sc-gc-info { margin: 0 16px 12px; padding: 12px 16px; border-left: 3px solid var(--crown-teal); background: var(--ui-surface-sunken); border-radius: 6px; }
.sc-gc-info p { margin: 0 0 8px; }
.sc-gc-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 8px; }
.sc-gc-info dt { color: var(--ui-text-tertiary); }
.sc-gc-info dd { margin: 0; }
.sc-gc-page { font-size: var(--ui-type-control); }
@media (max-width: 560px) { .sc-gc-info dl { grid-template-columns: 1fr; } .sc-gc-info dd { margin-bottom: 6px; } }

/* Done steps fold away on a bid (Kristian 11/11, Paris Baguette): a check, one line, open for details */
.done-fold > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; cursor: pointer;
  padding: var(--ui-space-md) var(--ui-space-lg); border-radius: var(--ui-radius-card); background: var(--ui-surface); }
.done-fold > summary::-webkit-details-marker { display: none; }
.done-fold[open] > summary { margin-bottom: 12px; }
.done-tick { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--crown-teal); color: var(--crown-teal-fg); flex: none; }
.done-tick svg { width: 14px; height: 14px; }
.fold-hint { margin-left: auto; font-size: var(--ui-type-control); color: var(--ui-text-secondary); text-decoration: underline; text-underline-offset: 3px; }
.done-row > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.job-actions { margin-top: var(--ui-space-md); }

/* Notifications (Kristian 11/11): the mail button with its count, New on unread rows */
.notif-btn { position: relative; }
.notif-btn.on { background: var(--ui-surface-sunken); }
.notif-dot { position: absolute; top: 2px; right: 0; min-width: 1.5em; min-height: 1.5em; padding: 0 var(--ui-space-xs); border-radius: var(--ui-radius-action);
  background: var(--ui-danger); color: var(--ui-on-accent); font-size: var(--ui-type-micro); font-weight: 700; line-height: 1.5; text-align: center; }
.new-tag { display: inline-block; margin-left: var(--ui-space-xs); padding: 0 var(--ui-space-sm); border-radius: var(--ui-radius-action); font-size: var(--ui-type-micro); font-weight: 700;
  background: var(--crown-teal-wash); color: var(--crown-teal); vertical-align: 1px; }
.notice.unread b { font-weight: 700; }

/* ---- Fit (Kristian 11/11, Fume's air and type rules): every word stays inside its box at every text size ---- */
/* Flex and grid children may shrink, so a long word wraps instead of pushing the card wider. */
.card, .notice, .job .body, .ring-side, .month-side, .nw, .pick-head > *, .goal-head > *, .note-row > *, .order > *, .pad-row > *,
.team-line > span, .sr-main, .sc-mat > *, .key-row > span, .rb > *, .conn > span, .gc-row > *, .person-top > *, .score-top > *, .next-meta > span { min-width: 0; }
.pick-head, .goal-head, .order, .score-top, .board-card .score-top, .hero-row, .section-head { flex-wrap: wrap; row-gap: var(--ui-space-xs); }
.section-head { gap: var(--ui-space-sm) var(--ui-space-md); }
/* Tables scroll inside their card on a narrow screen rather than squeezing words through the edge. */
.gc-send, .tracker-wrap, .wk-table { overflow-x: auto; }
.gc-send th, .tracker th { white-space: nowrap; }
/* Stats: numbers and their labels wrap inside their tile. */
.stat, .plan-stats .stat, .nums > div, .ahead-week { min-width: 0; overflow-wrap: anywhere; }
.gc-row .stats { grid-template-columns: repeat(auto-fit, minmax(7.5em, 1fr)); }
.person .nums { grid-template-columns: repeat(auto-fit, minmax(6em, 1fr)); }
.outreach-stats { grid-template-columns: repeat(auto-fit, minmax(7em, 1fr)); }
/* Week axis and dial labels: smaller screens or big text drop to two lines, never overlap. */
.wk-axis { white-space: normal; line-height: 1.2; }
.dial { flex-wrap: wrap; }
.dial-name { min-width: 0; flex-basis: 100%; }
@media (min-width: 640px) { .dial-name { flex-basis: auto; min-width: 4.5em; } }
/* Fields never run past their card. */
.fact-tools input, .fact-tools select, .goal-tools input, .search-row select { max-width: 100%; min-width: 0; }
.quick .fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14em), 1fr)); }
/* Air: text keeps three quarters of a card's corner away from its edge (Fume air). */
.notice, .note-row, .order, .conn, .step, .file, .job, .pad-row, .team-line { padding-left: max(var(--ui-space-lg), calc(var(--ui-radius-card) * .75)); padding-right: max(var(--ui-space-lg), calc(var(--ui-radius-card) * .75)); }
/* A select is as wide as its longest option: it never pushes past its card. */
select, input, textarea { max-width: 100%; }
form.fields { display: grid; gap: var(--ui-space-md); min-width: 0; }
form.fields label { display: block; min-width: 0; }
form.fields select, form.fields input { display: block; width: 100%; margin-top: var(--ui-space-xs); }
/* Scot's job line: each step is wide enough for its words; the line scrolls on a phone. */
.scot-line .st { min-width: 6em; overflow-wrap: normal; white-space: normal; display: block; padding: 0 2px; border-radius: 0; background: none; font-weight: 500; }
/* Top bar: five controls and the menu. The menu shows only where it fits beside them;
   below that the bottom tabs carry it. On a phone the name gives way to the crown. */
.top .wrap { gap: var(--ui-space-xs); }
@media (min-width: 900px) and (max-width: 1119px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .tabs { display: grid; }
  .topnav { display: none; }
}
@media (max-width: 520px) {
  .brand { font-size: 0; gap: 0; }
  .top .wrap { padding: 0 var(--ui-space-sm); }
}
@media (max-width: 380px) { .icon-btn { width: 44px; } }
/* The Notifications tab in the top bar (Kristian 11/11: the icon alone was missed). The icon with its
   count stands in only where the top bar tabs are hidden: phones and the large text sizes. */
.notif-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: 10px; background: var(--ui-danger); color: #fff; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.notif-btn .notif-dot { min-width: 20px; height: 20px; line-height: 20px; font-size: 12px; top: 0; right: -2px; }
@media (min-width: 900px) { .top .icon-btn.notif-btn { display: none; } }
@media (min-width: 900px) and (max-width: 1299px) {
  :root[data-size="large"] .top .icon-btn.notif-btn, :root[data-size="larger"] .top .icon-btn.notif-btn { display: grid; }
}
@media (min-width: 1300px) and (max-width: 1479px) {
  :root[data-size="larger"] .top .icon-btn.notif-btn { display: grid; }
}

.topnav a { white-space: nowrap; display: inline-flex; align-items: center; }

/* Tell Claude why (Kristian 11/11): training notes on drafts and calls */
.teach { padding: 0 var(--ui-space-lg) var(--ui-space-md) calc(var(--ui-space-lg) + 18px); }
details.why { margin-top: 4px; font-size: var(--ui-type-control); }
details.why summary { cursor: pointer; color: var(--crown-teal); font-weight: 600; }
details.why textarea { display: block; width: 100%; margin: 6px 0; font: inherit; padding: 8px; border-radius: 8px;
  border: 1px solid var(--ui-border, rgb(0 0 0 / .15)); background: var(--ui-surface); color: var(--ui-text); }
/* Jobs page: whose jobs (All, Kristian, Joan) sits above the stage tabs, a little narrower. */
.who-seg { max-width: 26em; margin-bottom: 0; }

/* Notifications inbox, reads like Gmail (Kristian 11/12): two plain lines a row, like Gmail on a phone */
.mail { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--ui-space-lg); align-items: start; margin-top: var(--ui-space-md); }
.mail-folders { display: grid; gap: 2px; position: sticky; top: 80px; }
.mail-folder { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 0 999px 999px 0; color: var(--ui-text); text-decoration: none; }
.mail-folder:hover { background: var(--ui-surface-sunken); }
.mail-folder.on { background: var(--crown-gold-wash); font-weight: 700; }
.mail-folder b { font-size: var(--ui-type-control); }
.mail-who { margin-top: 10px; color: var(--ui-text-secondary); font-size: var(--ui-type-control); }
.mail-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0 10px 4px; }
.mail-count { margin-left: auto; font-size: var(--ui-type-control); }
.mail-check { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; }
.mail-check input { width: 18px; height: 18px; margin: 0; }
.mail-list { padding: 0; overflow: hidden; }
.mail-row { display: flex; align-items: flex-start; gap: 0; padding: 8px 16px 8px 6px; border-bottom: 1px solid var(--ui-hairline); background: var(--ui-surface); }
.mail-row:last-child { border-bottom: 0; }
.mail-row:not(.unread) { background: var(--ui-surface-sunken); }
.mail-row:hover { box-shadow: inset 4px 0 0 var(--crown-gold); }
.mail-row .mail-check, .mail-star { margin-top: 4px; }
.mail-star { appearance: none; border: 0; background: none; font-size: 21px; line-height: 1; width: 34px; height: 34px; cursor: pointer; color: var(--ui-text-tertiary); flex: none; }
.mail-star.on { color: var(--crown-gold); }
.mail-link { flex: 1; min-width: 0; display: grid; gap: 3px; padding: 6px 0 6px 4px; color: var(--ui-text); text-decoration: none; }
.mail-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.mail-from { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mail-job { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ui-text-secondary); font-size: var(--ui-type-control); }
.mail-time { margin-left: auto; flex: none; font-size: var(--ui-type-control); color: var(--ui-text-secondary); }
.mail-line { color: var(--ui-text-secondary); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mail-row.unread .mail-from, .mail-row.unread .mail-time { font-weight: 700; color: var(--ui-text); }
.mail-row.unread .mail-line { color: var(--ui-text); }
.mail-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: var(--ui-type-label); font-weight: 700; vertical-align: 1px; margin-right: 2px; }
.mail-tag.k-danger { background: #fde4e1; color: #a1281b; }
.mail-tag.k-warn { background: #fff1d6; color: #8a5a00; }
.mail-tag.k-ok { background: #def3e6; color: #1d6b3d; }
.mail-tag.k-info { background: var(--ui-surface-sunken); color: var(--ui-text-secondary); }
.mail-open { padding: 22px 26px; }
.mail-open h1 { font-size: var(--ui-type-title); margin: 0 0 6px; line-height: 1.25; }
.mail-meta { color: var(--ui-text-secondary); margin: 0 0 16px; line-height: 1.5; }
.mail-body { white-space: pre-wrap; line-height: 1.65; font-size: var(--ui-type-body-large); padding: 14px 16px; border-radius: 10px; background: var(--ui-surface-sunken); }
.mail-bar-open { margin-top: 4px; }
.mail-reply textarea { width: 100%; }
@media (max-width: 760px) {
  .mail { grid-template-columns: 1fr; }
  .mail-folders { position: static; display: flex; overflow-x: auto; gap: 6px; }
  .mail-folder { border-radius: 999px; white-space: nowrap; background: var(--ui-surface-sunken); }
  .mail-row { padding-right: 12px; }
  .mail-top { flex-wrap: wrap; row-gap: 0; }
  .mail-job { order: 3; flex-basis: 100%; }
}
.mail-n { font-weight: 400; color: var(--ui-text-secondary); font-size: var(--ui-type-control); }

/* Job costing per job (Kristian 11/13): product lines fold open under each code */
details.lines summary { cursor: pointer; }
details.lines small { display: block; color: var(--ui-text-secondary); }
.flag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; background: var(--crown-gold-wash); color: var(--crown-gold); }
tr.flag-row td { padding-top: 0; border-top: 0; color: var(--ui-text-secondary); }

/* Job address under the name (11/16) */
.job-address { margin-top: 6px; font-size: 14px; }
.job-address summary { cursor: pointer; list-style: none; }
.job-address summary::-webkit-details-marker { display: none; }
.job-address form { margin-top: 6px; gap: 8px; }

/* Upcoming bids on Home, by week (12/1) */
.up-week { margin-bottom: var(--ui-space-md); padding: var(--ui-space-md) var(--ui-space-lg); }
.up-week.late { border-left: 3px solid var(--ui-danger, #c0392b); }
.up-head { display: flex; align-items: baseline; gap: var(--ui-space-sm); }
.up-head .up-count { margin-left: auto; font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.up-list { margin-top: var(--ui-space-sm); }
.clash-mark { color: var(--ui-danger); font-weight: 600; }
/* Bid rows on Home: job, who it goes to, when, status (12/1) */
.bid-row .to, .bid-row .st { grid-column: 2 / 4; font-size: var(--ui-type-label); }
.bid-row .to { color: var(--ui-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bid-row .st { color: var(--ui-text-tertiary); }
.bid-row .st.ok { color: var(--crown-teal); }
.bid-row .st.warn { color: var(--ui-warn-text); font-weight: 600; }
.bid-row .st.danger { color: var(--ui-danger); font-weight: 600; }

/* Jobs = the bid schedule (12/1) */
.hero + .sheet-bar, .aside + .sheet-bar { margin-top: var(--ui-space-md); }
.sheet-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-sm); margin-bottom: var(--ui-space-md); }
.sheet-bar input[type=search] { flex: 1 1 200px; margin: 0; min-height: calc(var(--ui-size-hit) - 8px); padding: 0 var(--ui-space-md); border-radius: var(--ui-radius-action); border: 1px solid var(--ui-hairline); background: var(--ui-field); color: var(--ui-text); font: inherit; }
.sheet td:first-child { min-width: 96px; white-space: nowrap; font-weight: 500; }
.sheet td:last-child { min-width: 0; font-size: inherit; }
.sheet tr.past td { color: var(--ui-text-tertiary); }
.sheet tr.past td a { color: var(--ui-text-secondary); }
.sheet tr.today-line td { background: var(--crown-teal-wash); color: var(--crown-teal); font-weight: 600; font-size: var(--ui-type-label); text-transform: uppercase; letter-spacing: .05em; }
.sheet-st { font-size: var(--ui-type-label); color: var(--ui-text-secondary); }
.sheet-st.ok { color: var(--crown-teal); font-weight: 600; }
.sheet-st.warn { color: var(--ui-warn-text); font-weight: 600; }
.sheet-st.danger { color: var(--ui-danger); font-weight: 600; }
.add-menu { position: relative; }
.add-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(320px, 86vw); padding: var(--ui-space-sm); display: grid; gap: 2px; }
.add-pop a { display: grid; padding: var(--ui-space-sm) var(--ui-space-md); border-radius: var(--ui-radius-action); color: var(--ui-text); text-decoration: none; }
.add-pop a span { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
@media (hover: hover) { .add-pop a:hover { background: var(--ui-surface-hover); } }
/* Jobs page: + Add sits in the toolbar, which stays on screen. On a phone it floats, and the page leaves room under it. */
@media (max-width: 899px) {
  .add-float { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30; }
  .add-float > summary.btn { box-shadow: var(--ui-depth-sheet); min-height: var(--ui-size-hit); }
  .add-float .add-pop { top: auto; bottom: calc(100% + 6px); }
  main:has(.add-float) { padding-bottom: 72px; }
}
@media (min-width: 900px) { .sheet-bar { position: sticky; top: var(--top-h, 64px); z-index: 12; padding: var(--ui-space-sm) 0; background: var(--ui-ground); } }
.bid-row .st { justify-self: start; margin-top: 2px; }
/* Joan's Home: sheet or calendar, download and print (12/1) */
.sheet-tools { display: flex; flex-wrap: wrap; gap: var(--ui-space-sm); align-items: center; }
.jc-month { padding: var(--ui-space-md); margin-bottom: var(--ui-space-md); overflow-x: auto; }
.jc-month h3 { margin: 0 0 var(--ui-space-sm); }
.jc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; min-width: 560px; }
.jc-head { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); font-weight: 500; padding: 4px; text-align: center; }
.jc-cell { min-height: 86px; border: 1px solid var(--ui-hairline); border-radius: 4px; padding: 4px; min-width: 0; }
.jc-cell.blank { background: var(--ui-surface-sunken); }
.jc-cell.today { outline: 2px solid var(--crown-teal); outline-offset: -2px; }
.jc-day { font-size: var(--ui-type-label); color: var(--ui-text-tertiary); }
.jc-bid { display: block; font-size: var(--ui-type-label); line-height: 1.25; margin-top: 3px; padding: 2px 4px; border-radius: 4px;
  background: var(--crown-teal-wash); color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-bid.danger, .jc-bid.clash { background: color-mix(in srgb, var(--ui-danger) 18%, transparent); }
.jc-bid.warn { background: color-mix(in srgb, var(--ui-point-warn) 22%, transparent); }
@media print {
  .sheet-tools, .sheet-bar, #needs, #new-work, .more-home, .hero .btn, #confetti { display: none !important; }
  .tracker, .jc-grid { font-size: 11px; color: #000; }
  .tracker a, .jc-bid { color: #000; }
  @page { size: legal landscape; margin: 0.4in; }
}
/* Jobs and Tracker use the whole screen, like the spreadsheet (Kristian 12/1) */
main.wrap.wide { max-width: none; padding: 0 clamp(16px, 2.5vw, 40px); }
.sheet-wrap { max-height: calc(100vh - 230px); min-height: 320px; overflow: auto; }
.sheet { overflow-wrap: normal; }
.sheet td:nth-child(2) { min-width: 220px; }
.sheet td:nth-child(3) { min-width: 200px; }
.sheet td:nth-child(4), .sheet td:last-child, .sheet td:nth-last-child(2) { white-space: nowrap; }
@media (max-width: 640px) { .sheet-wrap { max-height: none; } }

/* Toolbars: the toggle, the search and the buttons are one height (12/2) */
.sheet-bar .seg, .sheet-tools .seg, .seg.mini { margin: 0; flex: none; }
@media (min-width: 900px) {
  .sheet-bar .seg a, .sheet-tools .seg a, .seg.mini a { min-height: calc(var(--ui-size-hit) - 14px); }
}
.section-head:has(.seg, .btn) { align-items: center; }
.section-head .btn { color: var(--fg); }
.quick .row:has(.btn + .btn):not(.result-buttons) { flex-wrap: wrap; justify-content: flex-end; }
.quick .row:has(.btn + .btn) .note { flex-basis: 100%; }
.sc-actions { gap: var(--ui-space-sm); }

/* Sort, filter and group on the Jobs sheet (sheet_grid.js on Tabulator, 12/2). sg- is this feature's prefix. */
.sg-bar { display: none; flex-wrap: wrap; align-items: center; gap: var(--ui-space-sm) var(--ui-space-md); margin-bottom: var(--ui-space-md); font-size: var(--ui-type-label); }
.sg-ready .sg-bar { display: flex; }
.sg-bar label { display: inline-flex; align-items: center; gap: var(--ui-space-sm); color: var(--ui-text-secondary); }
.sg-bar select { min-height: calc(var(--ui-size-hit) - 8px); max-width: 220px; padding: 0 var(--ui-space-md); border-radius: var(--ui-radius-action); border: 1px solid var(--ui-hairline); background: var(--ui-field); color: var(--ui-text); font: inherit; }
.sg-count { color: var(--ui-text-tertiary); margin-left: auto; }
.sg-bar [hidden] { display: none; }
.sheet-wrap.sg-on { max-height: none; min-height: 0; overflow: hidden; }
.sg-on > table { display: none; }
.sg-wrap .sg-grid.tabulator { background: transparent; border: 0; font-size: var(--ui-type-control); color: var(--ui-text); }
.sg-wrap .sg-grid .tabulator-header, .sg-wrap .sg-grid .tabulator-header .tabulator-col { background: var(--ui-surface-sunken); color: var(--ui-text-tertiary); border-color: var(--ui-hairline); }
.sg-wrap .sg-grid .tabulator-header .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover { background: var(--ui-surface-hover); }
.sg-wrap .sg-grid .tabulator-header .tabulator-col-title { font-size: var(--ui-type-label); text-transform: uppercase; letter-spacing: .05em; }
.sg-wrap .sg-grid .tabulator-header .tabulator-col-content { min-height: 44px; display: flex; align-items: center; }
.sg-wrap .sg-grid .tabulator-header .tabulator-col-title-holder { width: 100%; }
.sg-wrap .sg-grid .tabulator-tableholder, .sg-wrap .sg-grid .tabulator-tableholder .tabulator-table { background: transparent; color: inherit; }
.sg-wrap .sg-grid .tabulator-row, .sg-wrap .sg-grid .tabulator-row.tabulator-row-even { background: transparent; border-bottom: 1px solid var(--ui-hairline); }
.sg-wrap .sg-grid .tabulator-row .tabulator-cell { padding: var(--ui-space-sm) var(--ui-space-md); white-space: normal; border: 0; vertical-align: top; }
.sg-wrap .sg-grid .tabulator-row .tabulator-cell:first-child { font-weight: 500; }
@media (hover: hover) { .sg-wrap .sg-grid .tabulator-row.tabulator-selectable:hover, .sg-wrap .sg-grid .tabulator-row:hover { background: var(--ui-surface-hover); } }
.sg-wrap .sg-grid .tabulator-row.sg-past { color: var(--ui-text-tertiary); }
.sg-wrap .sg-grid .tabulator-row.sg-past a { color: var(--ui-text-secondary); }
.sg-wrap .sg-grid .tabulator-row.tabulator-group { background: var(--ui-surface-sunken); color: var(--ui-text); border-color: var(--ui-hairline); min-height: 40px; padding: var(--ui-space-sm) var(--ui-space-md); }
.sg-wrap .sg-grid .tabulator-row.tabulator-group:hover { background: var(--ui-surface-hover); }
.sg-wrap .sg-grid .tabulator-row.tabulator-group span { color: inherit; margin-left: var(--ui-space-sm); }
.sg-wrap .sg-grid .tabulator-placeholder .tabulator-placeholder-contents, .sg-wrap .sg-grid .tabulator-placeholder { color: var(--ui-text-tertiary); font-size: var(--ui-type-control); }
.sg-wrap .sg-grid .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-bottom-color: var(--ui-hairline-strong); }
.sg-wrap .sg-grid .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=ascending] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-bottom-color: var(--crown-teal); }
.sg-wrap .sg-grid .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=descending] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-top-color: var(--crown-teal); }
/* Tabulator writes each row's height once, so a late font, a bigger text size or a narrower window cut off wrapped names. Rows grow with their text. */
.sg-wrap .sg-grid .tabulator-row:not(.tabulator-group), .sg-wrap .sg-grid .tabulator-row .tabulator-cell { height: auto !important; }
.sg-today { padding: var(--ui-space-sm) var(--ui-space-md); background: var(--crown-teal-wash); color: var(--crown-teal); font-weight: 600; font-size: var(--ui-type-label); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 640px) { .sg-bar label { flex: 1 1 100%; justify-content: space-between; } .sg-bar select { flex: 0 1 65%; } .sg-count { margin-left: 0; } }
@media print { .sg-bar, .sg-grid { display: none !important; } .sg-on > table { display: table !important; } .sheet-wrap.sg-on { overflow: visible; } }

/* The plans on the job page: the main set line, then the other plan files folded. */
.plans { margin-top: var(--ui-space-sm); }
.plans .file a:not(.fname) { color: var(--ui-text-link, inherit); text-decoration: underline; }

/* A row on the Jobs sheet opens the job (12/2): the name reads as a link, the row shows the hand. */
.sheet tr[data-row], .sg-wrap .sg-grid .tabulator-row:not(.tabulator-group) { cursor: pointer; }
.sheet td:nth-child(2) a, .sg-wrap .sg-grid .tabulator-row a { color: var(--crown-teal); text-decoration: underline; text-decoration-color: var(--ui-hairline-strong); text-underline-offset: 3px; }
@media (hover: hover) { .sheet tr[data-row]:hover td:nth-child(2) a, .sg-wrap .sg-grid .tabulator-row:hover a { text-decoration-color: currentColor; } }

/* The job's files as a file explorer (file_explorer.js, 12/2). fx- is this feature's prefix. */
.fx { padding: 0; overflow: hidden; }
.fx-bar { display: none; flex-wrap: wrap; align-items: center; gap: var(--ui-space-sm); padding: var(--ui-space-md) var(--ui-space-lg); border-bottom: 1px solid var(--ui-hairline); }
.fx-on .fx-bar { display: flex; }
.fx-crumbs { flex: 1 1 240px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.fx-crumb, .fx-sort { background: none; border: 0; padding: 6px 4px; font: inherit; color: inherit; cursor: pointer; text-align: left; letter-spacing: inherit; text-transform: inherit; }
.fx-crumb { color: var(--crown-teal); }
.fx-sep { color: var(--ui-text-tertiary); }
.fx-bar input { flex: 0 1 220px; margin: 0; min-height: calc(var(--ui-size-hit) - 8px); padding: 0 var(--ui-space-md); border-radius: var(--ui-radius-action); border: 1px solid var(--ui-hairline); background: var(--ui-field); color: var(--ui-text); font: inherit; }
.fx-scroll { max-height: 520px; overflow: auto; }
.fx-table { width: 100%; border-collapse: collapse; }
.fx-table th { position: sticky; top: 0; z-index: 1; background: var(--ui-surface-sunken); text-align: left; font-size: var(--ui-type-label); font-weight: 500; color: var(--ui-text-tertiary); padding: 4px var(--ui-space-md); white-space: nowrap; }
.fx-table th:first-child { padding-left: calc(var(--ui-space-lg) - 4px); }
.fx-table th[aria-sort=ascending] .fx-sort::after { content: " ▲"; font-size: .7em; }
.fx-table th[aria-sort=descending] .fx-sort::after { content: " ▼"; font-size: .7em; }
.fx-table td { padding: 2px var(--ui-space-md); border-bottom: 1px solid var(--ui-hairline); font-size: var(--ui-type-label); color: var(--ui-text-secondary); white-space: nowrap; }
.fx-table td:first-child { width: 100%; padding-left: var(--ui-space-lg); white-space: normal; }
.fx-table tr:last-child td { border-bottom: 0; }
.fx-open { display: flex; align-items: center; gap: var(--ui-space-md); width: 100%; min-height: 44px; padding: 4px 0; background: none; border: 0; font: inherit; color: var(--ui-text); text-align: left; cursor: pointer; text-decoration: none; }
.fx-open .fname { font-size: var(--ui-type-control); font-weight: 500; overflow-wrap: anywhere; }
.fx-open > span:last-child { min-width: 0; }
.fx-open .ext { flex: none; width: 2.75em; min-height: 2.25em; border-radius: var(--ui-radius-item); display: grid; place-items: center; font-size: var(--ui-type-micro); font-weight: 500; background: var(--ui-surface-sunken); color: var(--ui-text-secondary); }
.fx-open .ext.folder { background: none; position: relative; }
.fx-open .ext.folder::before { content: ""; width: 24px; height: 17px; border-radius: 2px 4px 4px 4px; background: #e0b24c; box-shadow: inset 0 4px 0 #c8962c; }
.fx-was { display: block; color: var(--ui-text-tertiary); overflow-wrap: anywhere; }
.fx-where { display: block; color: var(--ui-text-tertiary); overflow-wrap: anywhere; }
.fx-where[hidden] { display: none; }
.fx-get { margin-left: var(--ui-space-sm); color: var(--crown-teal); }
@media (hover: hover) { .fx-table tbody tr:hover { background: var(--ui-surface-hover); } }
@media (max-width: 640px) { .fx-type, .fx-date { display: none; } .fx-table td, .fx-table th { padding-left: var(--ui-space-sm); padding-right: var(--ui-space-sm); } .fx-bar input { flex: 1 1 100%; } .fx-size { text-align: right; } .fx-get { display: block; padding: 6px 0; } }
#files, #plans { scroll-margin-top: calc(var(--top-h, 64px) + 16px); }
