/* GENERATED by tools/build_tokens.py from assets/tokens/tokens.json. Do not edit. */
/* Hill Design System V6. Layers: primitive (--color-*, carried names) > semantic (--ground, --text ...) > component (--button-* ...). */
/* Surfaces replace the semantic set whole, so nothing leaks from an outer surface into an inner one. */

:root {
  --color-purple: #533AFD;
  --color-lime: #C6FF33;
  --color-ink: #232323;
  --color-paper: #FFFFFF;
  --color-paper-dim: #F0F3FD;
  --color-line: #E0E4EE;
  --color-muted: #5B5F6B;
  --color-muted-invert: #A9ABB1;
  --color-purple-line: #665EFD;
  --color-purple-light: #B9B9F9;
  --color-ink-line: #3C3C3C;
  --color-success: #15BE53;
  --color-success-text: #108C3D;
  --color-warning: #9B6829;
  --color-error: #EA2261;
  --font-display: "Libre Franklin", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Libre Franklin", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-mono: SourceCodePro, "SFMono-Regular", Consolas, monospace;
  --t-display: clamp(38px, 5.4vw, 62px);
  --t-h1: clamp(30px, 3.6vw, 44px);
  --t-h2: clamp(23px, 2.4vw, 30px);
  --t-h3: 20px;
  --t-body: 16px;
  --t-small: 14px;
  --t-caption: 12.5px;
  --t-label: 11.5px;
  --t-ref: 12.5px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 96px;
  --sp-9: 128px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --grid-12: repeat(12, minmax(0, 1fr));
  --logo-ratio-horizontal: 2.7374;
  --logo-ratio-vertical: 0.3653;
  --logo-ratio-icon: 1.0261;
  --logo-clearspace-ratio: 0.18;
  --logo-hero-width: 300px;
  --logo-nav-width: 176px;
  --logo-nav-mobile-width: 152px;
  --logo-footer-width: 180px;
  --logo-primary-width: 300px;
  --logo-social-width: 280px;
  --logo-social-wide-width: 300px;
  --logo-signage-width: 324px;
  --logo-hoarding-width: 820px;
  --logo-banner-width: 256px;
  --logo-flag-width: 210px;
  --logo-vehicle-width: 200px;
  --logo-support-width: 68px;
  --logo-card-width: 32mm;
  --track-display: -0.028em;
  --track-heading: -0.018em;
  --track-caps: 0.09em;
  --logo-deck-cover-width: 360px;
  --logo-deck-slide-width: 200px;
  --logo-site-board-width: 520px;
  --logo-hat-width: 60mm;
  --logo-vest-width: 110mm;
  --weight-read: 400;
  --weight-emphasise: 500;
  --weight-announce: 600;
  --leading-body: 1.6;
  --measure: 68ch;
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --shadow-overlay: 0 8px 28px rgba(35, 35, 35, 0.16);
  --plate-bg: rgba(35, 35, 35, 0.92);
  --plate-radius-ratio: 0.031;
  --plate-logo-share-still: 0.23;
  --plate-logo-share-film: 0.13;
  --plate-logo-share-film-tall: 0.20;
  --plate-logo-min-width: 140px;
  --scrim-bg: rgba(35, 35, 35, 0.35);
  --grade-contrast: 1.05;
  --grade-saturation: 1.08;
  --photo-grade: contrast(var(--grade-contrast)) saturate(var(--grade-saturation));
  --section-y: var(--sp-8);
  --section-y-phone: var(--sp-7);
  --section-stack: var(--sp-6);
  --section-stack-phone: var(--sp-5);
  --block-gap: var(--sp-4);
  --block-gap-phone: var(--sp-3);
  --cell-pad: var(--sp-5);
  --cell-pad-phone: var(--sp-3);
  --numbers-bg: var(--color-ink);
  --numbers-fg: var(--color-paper);
  --numbers-figure: var(--color-lime);
  --numbers-rule: var(--color-ink-line);
  --numbers-cell-pad-y: var(--sp-4);
  --numbers-cell-pad-x: var(--sp-5);
  --fab-ring: inset 0 0 0 2px var(--color-ink);
  --shadow-primary: var(--shadow-overlay);
  --shadow-dark: var(--shadow-overlay);
  --button-height: 48px;
  --button-min-target: 44px;
  --button-pad-x: var(--sp-4);
  --button-font-weight: var(--weight-announce);
  --button-keyline-width: 2px;
  --button-keyline-inset: 4px;
  --button-radius: var(--radius);
  --link-underline-width: 1px;
  --link-underline-hover-width: 2px;
  --field-height: 48px;
  --field-edge-width: 1px;
  --field-edge-focus-width: 2px;
  --field-edge-error-width: 2px;
  --field-radius: var(--radius);
  --table-head-rule-width: 2px;
  --table-row-rule-width: 1px;
  --table-cell-pad-y: 2.5mm;
  --table-cell-pad-x: 2mm;
  --chip-edge-width: 1px;
  --chip-radius: var(--radius-sm);
  --nav-mark-width: 2px;
  --nav-min-target: 44px;
  --card-edge-width: 1px;
  --card-radius: var(--radius-lg);
  --slot-edge-width: 1px;
  --slot-edge-style: dashed;
  --doc-tick-w: 22mm;
  --doc-tick-h: 1.2mm;
}

:root, .on-paper, .canvas.light, .doc-head .t .ref {
  color-scheme: light;
  --ground: var(--color-paper);
  --ground-alt: var(--color-paper-dim);
  --field-fill: var(--color-paper-dim);
  --text: var(--color-ink);
  --text-muted: var(--color-muted);
  --rule: var(--color-line);
  --rule-strong: var(--color-ink);
  --accent-text: var(--color-purple);
  --accent-text-large: var(--color-purple);
  --mark: var(--color-purple);
  --tick: var(--color-purple);
  --control-edge: var(--color-muted);
  --control-edge-hover: var(--color-ink);
  --focus: var(--color-ink);
  --link: var(--color-purple);
  --link-hover: var(--color-ink);
  --action-bg: var(--color-lime);
  --action-fg: var(--color-ink);
  --action-bg-hover: var(--color-ink);
  --action-fg-hover: var(--color-paper);
  --action-bg-disabled: var(--color-paper-dim);
  --action-fg-disabled: var(--color-muted);
  --action-edge-disabled: var(--color-line);
  --selection-bg: var(--color-lime);
  --selection-fg: var(--color-ink);
  --status-plan: var(--color-purple);
  --status-ok: var(--color-success-text);
  --status-warn: var(--color-warning);
  --status-stop: var(--color-error);
  --hairline: 1px solid var(--rule);
  --rule-structural: 2px solid var(--rule-strong);
  --fg: var(--text);
  --heading: var(--text);
  --body: var(--text-muted);
  --label: var(--text-muted);
  --muted: var(--text-muted);
  --accent: var(--accent-text);
  --accent-hover: var(--link-hover);
  --accent-tint: var(--ground-alt);
  --bg: var(--ground);
  --surface: var(--ground);
  --surface-alt: var(--ground-alt);
  --border: var(--rule);
  --white: var(--color-paper);
  --ruby: var(--color-error);
  --lemon: var(--color-warning);
  --success: var(--color-success);
  --success-text: var(--color-success-text);
  --warn: var(--color-warning);
  --danger: var(--color-error);
  --button-bg: var(--action-bg);
  --button-fg: var(--action-fg);
  --button-bg-hover: var(--action-bg-hover);
  --button-fg-hover: var(--action-fg-hover);
  --button-keyline-active: var(--action-fg-hover);
  --button-bg-disabled: var(--action-bg-disabled);
  --button-fg-disabled: var(--action-fg-disabled);
  --button-edge-disabled: var(--action-edge-disabled);
  --button-focus: var(--focus);
  --button-line-edge: var(--rule-strong);
  --button-line-fg: var(--text);
  --link-fg: var(--link);
  --link-fg-hover: var(--link-hover);
  --link-focus: var(--focus);
  --field-bg: var(--field-fill);
  --field-fg: var(--text);
  --field-placeholder: var(--text-muted);
  --field-edge: var(--control-edge);
  --field-edge-hover: var(--control-edge-hover);
  --field-edge-focus: var(--focus);
  --field-edge-error: var(--status-stop);
  --field-edge-disabled: var(--rule);
  --field-bg-disabled: var(--ground);
  --field-fg-disabled: var(--text-muted);
  --field-label: var(--text-muted);
  --table-head-fg: var(--text-muted);
  --table-head-rule: var(--rule-strong);
  --table-row-rule: var(--rule);
  --table-cell-fg: var(--text);
  --table-row-hover-bg: var(--ground-alt);
  --table-sub-bg: var(--ground-alt);
  --chip-fg: var(--text);
  --chip-bg: var(--ground);
  --chip-edge-plan: var(--status-plan);
  --chip-edge-ok: var(--status-ok);
  --chip-edge-warn: var(--status-warn);
  --chip-edge-stop: var(--status-stop);
  --nav-fg: var(--text);
  --nav-fg-hover: var(--text);
  --nav-fg-current: var(--text);
  --nav-mark: var(--mark);
  --nav-focus: var(--focus);
  --card-fg: var(--text);
  --card-meta: var(--text-muted);
  --card-edge: var(--rule);
  --card-edge-hover: var(--mark);
  --card-focus: var(--focus);
  --slot-bg: var(--ground-alt);
  --slot-fg: var(--text-muted);
  --slot-edge: var(--control-edge);
  --doc-tick: var(--tick);
  --doc-rule: var(--rule);
  --doc-rule-strong: var(--rule-strong);
  --doc-foot-fg: var(--text-muted);
  --doc-label-fg: var(--text-muted);
  --canvas-kicker: var(--accent-text);
  --canvas-kicker-lg: var(--accent-text-large);
}

.on-paper-dim {
  color-scheme: light;
  --ground: var(--color-paper-dim);
  --ground-alt: var(--color-paper);
  --field-fill: var(--color-paper);
  --text: var(--color-ink);
  --text-muted: var(--color-muted);
  --rule: var(--color-line);
  --rule-strong: var(--color-ink);
  --accent-text: var(--color-purple);
  --accent-text-large: var(--color-purple);
  --mark: var(--color-purple);
  --tick: var(--color-purple);
  --control-edge: var(--color-muted);
  --control-edge-hover: var(--color-ink);
  --focus: var(--color-ink);
  --link: var(--color-purple);
  --link-hover: var(--color-ink);
  --action-bg: var(--color-lime);
  --action-fg: var(--color-ink);
  --action-bg-hover: var(--color-ink);
  --action-fg-hover: var(--color-paper);
  --action-bg-disabled: var(--color-paper);
  --action-fg-disabled: var(--color-muted);
  --action-edge-disabled: var(--color-line);
  --selection-bg: var(--color-lime);
  --selection-fg: var(--color-ink);
  --status-plan: var(--color-purple);
  --status-ok: var(--color-success-text);
  --status-warn: var(--color-warning);
  --status-stop: var(--color-error);
  --hairline: 1px solid var(--rule);
  --rule-structural: 2px solid var(--rule-strong);
  --fg: var(--text);
  --heading: var(--text);
  --body: var(--text-muted);
  --label: var(--text-muted);
  --muted: var(--text-muted);
  --accent: var(--accent-text);
  --accent-hover: var(--link-hover);
  --accent-tint: var(--ground-alt);
  --bg: var(--ground);
  --surface: var(--ground);
  --surface-alt: var(--ground-alt);
  --border: var(--rule);
  --white: var(--color-paper);
  --ruby: var(--color-error);
  --lemon: var(--color-warning);
  --success: var(--color-success);
  --success-text: var(--color-success-text);
  --warn: var(--color-warning);
  --danger: var(--color-error);
  --button-bg: var(--action-bg);
  --button-fg: var(--action-fg);
  --button-bg-hover: var(--action-bg-hover);
  --button-fg-hover: var(--action-fg-hover);
  --button-keyline-active: var(--action-fg-hover);
  --button-bg-disabled: var(--action-bg-disabled);
  --button-fg-disabled: var(--action-fg-disabled);
  --button-edge-disabled: var(--action-edge-disabled);
  --button-focus: var(--focus);
  --button-line-edge: var(--rule-strong);
  --button-line-fg: var(--text);
  --link-fg: var(--link);
  --link-fg-hover: var(--link-hover);
  --link-focus: var(--focus);
  --field-bg: var(--field-fill);
  --field-fg: var(--text);
  --field-placeholder: var(--text-muted);
  --field-edge: var(--control-edge);
  --field-edge-hover: var(--control-edge-hover);
  --field-edge-focus: var(--focus);
  --field-edge-error: var(--status-stop);
  --field-edge-disabled: var(--rule);
  --field-bg-disabled: var(--ground);
  --field-fg-disabled: var(--text-muted);
  --field-label: var(--text-muted);
  --table-head-fg: var(--text-muted);
  --table-head-rule: var(--rule-strong);
  --table-row-rule: var(--rule);
  --table-cell-fg: var(--text);
  --table-row-hover-bg: var(--ground-alt);
  --table-sub-bg: var(--ground-alt);
  --chip-fg: var(--text);
  --chip-bg: var(--ground);
  --chip-edge-plan: var(--status-plan);
  --chip-edge-ok: var(--status-ok);
  --chip-edge-warn: var(--status-warn);
  --chip-edge-stop: var(--status-stop);
  --nav-fg: var(--text);
  --nav-fg-hover: var(--text);
  --nav-fg-current: var(--text);
  --nav-mark: var(--mark);
  --nav-focus: var(--focus);
  --card-fg: var(--text);
  --card-meta: var(--text-muted);
  --card-edge: var(--rule);
  --card-edge-hover: var(--mark);
  --card-focus: var(--focus);
  --slot-bg: var(--ground-alt);
  --slot-fg: var(--text-muted);
  --slot-edge: var(--control-edge);
  --doc-tick: var(--tick);
  --doc-rule: var(--rule);
  --doc-rule-strong: var(--rule-strong);
  --doc-foot-fg: var(--text-muted);
  --doc-label-fg: var(--text-muted);
  --canvas-kicker: var(--accent-text);
  --canvas-kicker-lg: var(--accent-text-large);
}

.on-purple, .doc-head, .doc-head + .doc-rule, .chip.solid, .canvas.purple {
  color-scheme: light;
  --ground: var(--color-purple);
  --ground-alt: var(--color-purple);
  --field-fill: var(--color-purple);
  --text: var(--color-paper);
  --text-muted: var(--color-paper);
  --rule: var(--color-purple-line);
  --rule-strong: var(--color-paper);
  --accent-text: var(--color-lime);
  --accent-text-large: var(--color-lime);
  --mark: var(--color-lime);
  --tick: var(--color-lime);
  --control-edge: var(--color-paper);
  --control-edge-hover: var(--color-paper);
  --focus: var(--color-paper);
  --link: var(--color-paper);
  --link-hover: var(--color-paper);
  --action-bg: var(--color-lime);
  --action-fg: var(--color-ink);
  --action-bg-hover: var(--color-paper);
  --action-fg-hover: var(--color-ink);
  --action-bg-disabled: var(--color-purple-line);
  --action-fg-disabled: var(--color-paper);
  --action-edge-disabled: var(--color-purple-line);
  --selection-bg: var(--color-lime);
  --selection-fg: var(--color-ink);
  --status-plan: var(--color-paper);
  --status-ok: var(--color-paper);
  --status-warn: var(--color-paper);
  --status-stop: var(--color-paper);
  --hairline: 1px solid var(--rule);
  --rule-structural: 2px solid var(--rule-strong);
  --fg: var(--text);
  --heading: var(--text);
  --body: var(--text-muted);
  --label: var(--text-muted);
  --muted: var(--text-muted);
  --accent: var(--accent-text);
  --accent-hover: var(--link-hover);
  --accent-tint: var(--ground-alt);
  --bg: var(--ground);
  --surface: var(--ground);
  --surface-alt: var(--ground-alt);
  --border: var(--rule);
  --white: var(--color-paper);
  --ruby: var(--color-error);
  --lemon: var(--color-warning);
  --success: var(--color-success);
  --success-text: var(--color-success-text);
  --warn: var(--color-warning);
  --danger: var(--color-error);
  --button-bg: var(--action-bg);
  --button-fg: var(--action-fg);
  --button-bg-hover: var(--action-bg-hover);
  --button-fg-hover: var(--action-fg-hover);
  --button-keyline-active: var(--action-fg-hover);
  --button-bg-disabled: var(--action-bg-disabled);
  --button-fg-disabled: var(--action-fg-disabled);
  --button-edge-disabled: var(--action-edge-disabled);
  --button-focus: var(--focus);
  --button-line-edge: var(--rule-strong);
  --button-line-fg: var(--text);
  --link-fg: var(--link);
  --link-fg-hover: var(--link-hover);
  --link-focus: var(--focus);
  --field-bg: var(--field-fill);
  --field-fg: var(--text);
  --field-placeholder: var(--text-muted);
  --field-edge: var(--control-edge);
  --field-edge-hover: var(--control-edge-hover);
  --field-edge-focus: var(--focus);
  --field-edge-error: var(--status-stop);
  --field-edge-disabled: var(--rule);
  --field-bg-disabled: var(--ground);
  --field-fg-disabled: var(--text-muted);
  --field-label: var(--text-muted);
  --table-head-fg: var(--text-muted);
  --table-head-rule: var(--rule-strong);
  --table-row-rule: var(--rule);
  --table-cell-fg: var(--text);
  --table-row-hover-bg: var(--ground-alt);
  --table-sub-bg: var(--ground-alt);
  --chip-fg: var(--text);
  --chip-bg: var(--ground);
  --chip-edge-plan: var(--status-plan);
  --chip-edge-ok: var(--status-ok);
  --chip-edge-warn: var(--status-warn);
  --chip-edge-stop: var(--status-stop);
  --nav-fg: var(--text);
  --nav-fg-hover: var(--text);
  --nav-fg-current: var(--text);
  --nav-mark: var(--mark);
  --nav-focus: var(--focus);
  --card-fg: var(--text);
  --card-meta: var(--text-muted);
  --card-edge: var(--rule);
  --card-edge-hover: var(--mark);
  --card-focus: var(--focus);
  --slot-bg: var(--ground-alt);
  --slot-fg: var(--text-muted);
  --slot-edge: var(--control-edge);
  --doc-tick: var(--tick);
  --doc-rule: var(--rule);
  --doc-rule-strong: var(--rule-strong);
  --doc-foot-fg: var(--text-muted);
  --doc-label-fg: var(--text-muted);
  --canvas-kicker: var(--accent-text);
  --canvas-kicker-lg: var(--accent-text-large);
}

.on-ink, .canvas, .photo-overlay, [data-theme='dark'] {
  color-scheme: dark;
  --ground: var(--color-ink);
  --ground-alt: var(--color-ink-line);
  --field-fill: var(--color-ink);
  --text: var(--color-paper);
  --text-muted: var(--color-muted-invert);
  --rule: var(--color-ink-line);
  --rule-strong: var(--color-paper);
  --accent-text: var(--color-lime);
  --accent-text-large: var(--color-lime);
  --mark: var(--color-lime);
  --tick: var(--color-lime);
  --control-edge: var(--color-muted-invert);
  --control-edge-hover: var(--color-paper);
  --focus: var(--color-paper);
  --link: var(--color-paper);
  --link-hover: var(--color-lime);
  --action-bg: var(--color-lime);
  --action-fg: var(--color-ink);
  --action-bg-hover: var(--color-paper);
  --action-fg-hover: var(--color-ink);
  --action-bg-disabled: var(--color-ink-line);
  --action-fg-disabled: var(--color-muted-invert);
  --action-edge-disabled: var(--color-ink-line);
  --selection-bg: var(--color-lime);
  --selection-fg: var(--color-ink);
  --status-plan: var(--color-lime);
  --status-ok: var(--color-success);
  --status-warn: var(--color-warning);
  --status-stop: var(--color-error);
  --hairline: 1px solid var(--rule);
  --rule-structural: 2px solid var(--rule-strong);
  --fg: var(--text);
  --heading: var(--text);
  --body: var(--text-muted);
  --label: var(--text-muted);
  --muted: var(--text-muted);
  --accent: var(--accent-text);
  --accent-hover: var(--link-hover);
  --accent-tint: var(--ground-alt);
  --bg: var(--ground);
  --surface: var(--ground);
  --surface-alt: var(--ground-alt);
  --border: var(--rule);
  --white: var(--color-paper);
  --ruby: var(--color-error);
  --lemon: var(--color-warning);
  --success: var(--color-success);
  --success-text: var(--color-success-text);
  --warn: var(--color-warning);
  --danger: var(--color-error);
  --button-bg: var(--action-bg);
  --button-fg: var(--action-fg);
  --button-bg-hover: var(--action-bg-hover);
  --button-fg-hover: var(--action-fg-hover);
  --button-keyline-active: var(--action-fg-hover);
  --button-bg-disabled: var(--action-bg-disabled);
  --button-fg-disabled: var(--action-fg-disabled);
  --button-edge-disabled: var(--action-edge-disabled);
  --button-focus: var(--focus);
  --button-line-edge: var(--rule-strong);
  --button-line-fg: var(--text);
  --link-fg: var(--link);
  --link-fg-hover: var(--link-hover);
  --link-focus: var(--focus);
  --field-bg: var(--field-fill);
  --field-fg: var(--text);
  --field-placeholder: var(--text-muted);
  --field-edge: var(--control-edge);
  --field-edge-hover: var(--control-edge-hover);
  --field-edge-focus: var(--focus);
  --field-edge-error: var(--status-stop);
  --field-edge-disabled: var(--rule);
  --field-bg-disabled: var(--ground);
  --field-fg-disabled: var(--text-muted);
  --field-label: var(--text-muted);
  --table-head-fg: var(--text-muted);
  --table-head-rule: var(--rule-strong);
  --table-row-rule: var(--rule);
  --table-cell-fg: var(--text);
  --table-row-hover-bg: var(--ground-alt);
  --table-sub-bg: var(--ground-alt);
  --chip-fg: var(--text);
  --chip-bg: var(--ground);
  --chip-edge-plan: var(--status-plan);
  --chip-edge-ok: var(--status-ok);
  --chip-edge-warn: var(--status-warn);
  --chip-edge-stop: var(--status-stop);
  --nav-fg: var(--text);
  --nav-fg-hover: var(--text);
  --nav-fg-current: var(--text);
  --nav-mark: var(--mark);
  --nav-focus: var(--focus);
  --card-fg: var(--text);
  --card-meta: var(--text-muted);
  --card-edge: var(--rule);
  --card-edge-hover: var(--mark);
  --card-focus: var(--focus);
  --slot-bg: var(--ground-alt);
  --slot-fg: var(--text-muted);
  --slot-edge: var(--control-edge);
  --doc-tick: var(--tick);
  --doc-rule: var(--rule);
  --doc-rule-strong: var(--rule-strong);
  --doc-foot-fg: var(--text-muted);
  --doc-label-fg: var(--text-muted);
  --canvas-kicker: var(--accent-text);
  --canvas-kicker-lg: var(--accent-text-large);
}

.on-lime, .page tfoot tr.total {
  color-scheme: light;
  --ground: var(--color-lime);
  --ground-alt: var(--color-lime);
  --field-fill: var(--color-lime);
  --text: var(--color-ink);
  --text-muted: var(--color-ink);
  --rule: var(--color-ink);
  --rule-strong: var(--color-ink);
  --accent-text: var(--color-ink);
  --accent-text-large: var(--color-ink);
  --mark: var(--color-ink);
  --tick: var(--color-ink);
  --control-edge: var(--color-ink);
  --control-edge-hover: var(--color-ink);
  --focus: var(--color-ink);
  --link: var(--color-ink);
  --link-hover: var(--color-ink);
  --action-bg: var(--color-ink);
  --action-fg: var(--color-lime);
  --action-bg-hover: var(--color-ink-line);
  --action-fg-hover: var(--color-lime);
  --action-bg-disabled: var(--color-lime);
  --action-fg-disabled: var(--color-muted);
  --action-edge-disabled: var(--color-muted);
  --selection-bg: var(--color-ink);
  --selection-fg: var(--color-lime);
  --status-plan: var(--color-ink);
  --status-ok: var(--color-success-text);
  --status-warn: var(--color-warning);
  --status-stop: var(--color-error);
  --hairline: 1px solid var(--rule);
  --rule-structural: 2px solid var(--rule-strong);
  --fg: var(--text);
  --heading: var(--text);
  --body: var(--text-muted);
  --label: var(--text-muted);
  --muted: var(--text-muted);
  --accent: var(--accent-text);
  --accent-hover: var(--link-hover);
  --accent-tint: var(--ground-alt);
  --bg: var(--ground);
  --surface: var(--ground);
  --surface-alt: var(--ground-alt);
  --border: var(--rule);
  --white: var(--color-paper);
  --ruby: var(--color-error);
  --lemon: var(--color-warning);
  --success: var(--color-success);
  --success-text: var(--color-success-text);
  --warn: var(--color-warning);
  --danger: var(--color-error);
  --button-bg: var(--action-bg);
  --button-fg: var(--action-fg);
  --button-bg-hover: var(--action-bg-hover);
  --button-fg-hover: var(--action-fg-hover);
  --button-keyline-active: var(--action-fg-hover);
  --button-bg-disabled: var(--action-bg-disabled);
  --button-fg-disabled: var(--action-fg-disabled);
  --button-edge-disabled: var(--action-edge-disabled);
  --button-focus: var(--focus);
  --button-line-edge: var(--rule-strong);
  --button-line-fg: var(--text);
  --link-fg: var(--link);
  --link-fg-hover: var(--link-hover);
  --link-focus: var(--focus);
  --field-bg: var(--field-fill);
  --field-fg: var(--text);
  --field-placeholder: var(--text-muted);
  --field-edge: var(--control-edge);
  --field-edge-hover: var(--control-edge-hover);
  --field-edge-focus: var(--focus);
  --field-edge-error: var(--status-stop);
  --field-edge-disabled: var(--rule);
  --field-bg-disabled: var(--ground);
  --field-fg-disabled: var(--text-muted);
  --field-label: var(--text-muted);
  --table-head-fg: var(--text-muted);
  --table-head-rule: var(--rule-strong);
  --table-row-rule: var(--rule);
  --table-cell-fg: var(--text);
  --table-row-hover-bg: var(--ground-alt);
  --table-sub-bg: var(--ground-alt);
  --chip-fg: var(--text);
  --chip-bg: var(--ground);
  --chip-edge-plan: var(--status-plan);
  --chip-edge-ok: var(--status-ok);
  --chip-edge-warn: var(--status-warn);
  --chip-edge-stop: var(--status-stop);
  --nav-fg: var(--text);
  --nav-fg-hover: var(--text);
  --nav-fg-current: var(--text);
  --nav-mark: var(--mark);
  --nav-focus: var(--focus);
  --card-fg: var(--text);
  --card-meta: var(--text-muted);
  --card-edge: var(--rule);
  --card-edge-hover: var(--mark);
  --card-focus: var(--focus);
  --slot-bg: var(--ground-alt);
  --slot-fg: var(--text-muted);
  --slot-edge: var(--control-edge);
  --doc-tick: var(--tick);
  --doc-rule: var(--rule);
  --doc-rule-strong: var(--rule-strong);
  --doc-foot-fg: var(--text-muted);
  --doc-label-fg: var(--text-muted);
  --canvas-kicker: var(--accent-text);
  --canvas-kicker-lg: var(--accent-text-large);
}

.on-paper, .on-paper-dim, .on-purple, .on-ink, .on-lime { background-color: var(--ground); color: var(--text); }
::selection { background: var(--selection-bg); color: var(--selection-fg); }

@font-face { font-family: "Libre Franklin"; src: url("../ds/hill/fonts/LibreFranklin-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../ds/hill/fonts/LibreFranklin-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../ds/hill/fonts/LibreFranklin-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../ds/hill/fonts/LibreFranklin-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../ds/hill/fonts/LibreFranklin-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../ds/hill/fonts/LibreFranklin-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../ds/hill/fonts/LibreFranklin-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: SourceCodePro; src: url("../ds/hill/fonts/source-code-pro-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: SourceCodePro; src: url("../ds/hill/fonts/source-code-pro-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: SourceCodePro; src: url("../ds/hill/fonts/source-code-pro-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ---- Base, hand written, appended by tools/build_tokens.py -------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
@media print { html { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--mark);
  accent-color: var(--mark);
  scrollbar-color: var(--control-edge) var(--ground);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: var(--track-heading);
  color: var(--text);
  font-feature-settings: "ss01" 1;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.01em; }

p { max-width: var(--measure); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Visible keyboard focus on every interactive element: the surface's text colour. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Type utilities ---------------------------------------------- */
.hill-display {
  font-family: var(--font-display);
  font-size: var(--t-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: var(--track-display);
  color: var(--text);
}
/* Carried from V5 so existing masters keep working. Do not extend to new work:
   a label above a heading is not a Hill pattern from V6 on. */
.hill-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--t-label); font-weight: 600;
  letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--accent-text);
}
.hill-eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }

/* Figures: SourceCodePro with lining tabular figures, so money and quantities align. */
.hill-mono, .num, .hill-tnum, td.num, .bar-value {
  font-family: var(--font-mono);
  font-size: var(--t-ref);
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.01em;
}
table, .data, .kpi, .facts, .stat { font-feature-settings: "ss01" 1, "tnum" 1; font-variant-numeric: tabular-nums; }

/* ---- Layout utilities -------------------------------------------- */
.hill-container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.hill-grid { display: grid; grid-template-columns: var(--grid-12); gap: var(--sp-4); }

/* Section rhythm: layouts read --section-y, --section-stack, --block-gap and --cell-pad, and they switch to
   their -phone value at 767 px (a media query cannot read a variable, so the breakpoint is written here once). */
@media (max-width: 767px) {
  :root {
    --section-y: var(--section-y-phone);
    --section-stack: var(--section-stack-phone);
    --block-gap: var(--block-gap-phone);
    --cell-pad: var(--cell-pad-phone);
  }
}

/* Technical rule: hairline with a coordinate tick. The tick colour follows the surface. */
.hill-rule { position: relative; border-top: var(--hairline); }
.hill-rule::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 3px; background: var(--tick); }

/* Empty photo slot, editable masters only. A finished export never contains one. */
.hill-photo-required {
  display: grid; place-items: center; min-height: 200px;
  background: var(--ground-alt);
  border: 1px dashed var(--control-edge);
  color: var(--text-muted);
  font-family: var(--font-body); font-weight: 600; font-size: var(--t-label);
  letter-spacing: var(--track-caps); text-transform: uppercase; text-align: center;
}

/* Placed photography fills its slot exactly. */
.photo-real { display: block; width: 100%; height: 100%; object-fit: cover; }

/* A template that cannot ship until a real photograph arrives says so on its own face. */
.hill-blocked {
  border: 2px solid var(--status-stop);
  background: var(--ground);
  color: var(--text);
  padding: 12px 16px;
  font-size: var(--t-small);
  line-height: 1.6;
}
.hill-blocked b {
  display: block; font-family: var(--font-body); font-weight: 600; font-size: var(--t-label);
  letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--text);
  margin-bottom: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
