/* NostraNova Consulting, shared styles for every page.
   Palette and type follow the brand guide (Drive: Brand Assets_2026Update/nostranova-brand.md).
   Colour pairs used for text were checked against WCAG 2.1 AA (4.5:1 body, 3:1 large and UI). */

:root {
  --ink: #0d2535;
  --ink-body: #34505f;
  --ink-soft: #4a6577;
  --ocean-deep: #0f3d52;
  --ocean: #1a5f7a;
  --ocean-light: #d6eaf8;
  --green-dark: #2d6a4f;
  --green: #52b788;
  --green-light: #74c69d;
  --tint: #f0f7f4;
  --sand: #f7f4ef;
  --white: #ffffff;
  --control: #6b8494;          /* 3.9:1 on white: form and toggle borders */
  --hairline: rgba(26, 95, 122, 0.14);
  --focus: #1565c0;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Jost', system-ui, sans-serif;
  --gutter: 96px;
  --page: #ffffff;
  --surface: #ffffff;
  --heading: #0f3d52;
  --accent-text: #2d6a4f;
  --link: #1a5f7a;
  --footer: #0d2535;
  --band: #0f3d52;
  --btn-dark: #0f3d52;
  --btn-dark-hover: #1a5f7a;
  --bar: #0f3d52;
  --track: #eef1f2;
  --sel-bg: #0f3d52;
  --sel-fg: #ffffff;
  --photo-bg: #e8e2d8;
  --picked: #eef8f1;
  --pill-run-bg: #d8f3dc;
  --pill-soon-bg: #efe7d8;
  --pill-soon-fg: #6b4f1d;
  --badge-bg: #d6eaf8;
  --error: #b3261e;
  --error-bg: #fff8f7;
  --icon: #1a5f7a;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.6; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--link); }
a:hover { color: var(--accent-text); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--heading); margin: 0; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 6px; background: var(--ocean-deep); color: var(--white); font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; color: var(--white); }

.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: 88px; padding-bottom: 88px; }
.bg-sand { background: var(--sand); }
.bg-tint { background: var(--tint); }
.bg-ocean { background: var(--band); color: var(--white); }
.bg-ocean h2, .bg-ocean h3 { color: var(--white); }

.label { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: 0.01em; color: var(--accent-text); margin-bottom: 14px; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 860px; margin-bottom: 40px; }
.section-head .label { margin-bottom: 0; }
h2 { font-size: 48px; font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; }
.lead { font-size: 19px; line-height: 1.65; color: var(--ink-body); }
em.accent { font-weight: 400; color: var(--accent-text); }
.bg-ocean em.accent { color: var(--green-light); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 6px; font-family: var(--sans); font-size: 17px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; border: none; }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--green-dark); color: var(--white); }
.btn-primary:hover { background: #245a42; color: var(--white); }
.btn-dark { background: var(--btn-dark); color: var(--white); }
.btn-dark:hover { background: var(--btn-dark-hover); color: var(--white); }
.btn-light { background: var(--green); color: #0f3d52; }
.btn-light:hover { background: var(--green-light); color: #0f3d52; }
.btn-outline { background: var(--surface); color: var(--heading); border: 1.5px solid var(--control); font-weight: 500; }
.btn-outline:hover { border-color: var(--heading); color: var(--heading); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); background: var(--page); position: relative; z-index: 20; }
.site-header .wrap { height: 96px; display: flex; align-items: center; gap: 56px; }
.logo { display: flex; flex-shrink: 0; }
.logo svg { width: 210px; height: 60px; }
.primary-nav { flex-grow: 1; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 36px; }
.primary-nav a { display: inline-block; padding: 10px 0; color: var(--ink); font-size: 16px; font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; }
.primary-nav a:hover { color: var(--accent-text); }
.primary-nav a[aria-current="page"] { border-bottom-color: var(--accent-text); }
.header-cta { min-height: 48px; padding: 0 24px; font-size: 15px; letter-spacing: 0.02em; }
.primary-nav .nav-cta, .top-declines-title { display: none; }
.top-declines-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.menu-toggle { display: none; width: 48px; height: 48px; border-radius: 8px; border: 1.5px solid var(--control); background: var(--surface); align-items: center; justify-content: center; cursor: pointer; color: var(--heading); }

/* Home hero */
.hero { padding-top: 104px; padding-bottom: 112px; }
.hero h1 { font-size: 66px; font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 28px; }
.hero .intro { font-size: 22px; line-height: 1.6; color: var(--ink-body); max-width: 760px; margin-bottom: 36px; }

/* Data */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.fig { margin: 0; padding: 32px; border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 18px; }
.fig-kicker { font-size: 15px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
.fig h3 { font-size: 24px; font-weight: 500; line-height: 1.3; }
.fig figcaption, .source { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; fill: var(--ink-soft); }
.chart .end { font-family: var(--sans); font-size: 14px; font-weight: 600; }
.chart .note { font-family: var(--sans); font-size: 12px; }
.chart-sm { display: none; }
.map-card { margin-top: 24px; padding: 40px; border-radius: 16px; background: var(--surface); }
.map-card > h3 { font-size: 30px; font-weight: 500; line-height: 1.25; margin-bottom: 28px; }
.map-grid { display: grid; grid-template-columns: 660px minmax(0, 1fr); gap: 48px; align-items: start; }
.tilemap { width: 100%; height: auto; display: block; }
.tilemap .st { font-family: var(--sans); font-size: 14px; font-weight: 600; }
.tilemap .pc { font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; }
.legend { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--ink-body); }
.legend li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 18px; height: 18px; border-radius: 4px; display: inline-block; }
.top-declines { display: none; list-style: none; margin: 0 0 18px; padding: 0; flex-direction: column; gap: 12px; font-size: 15px; }
.top-declines li { display: grid; grid-template-columns: 116px minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.bar-label { font-weight: 600; }
.bar-track { height: 14px; border-radius: 4px; background: var(--track); }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--bar); }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.callouts { display: flex; flex-direction: column; gap: 20px; }
.callout { padding: 26px; border-radius: 16px; background: var(--sand); display: flex; flex-direction: column; gap: 8px; }
.callout.featured { background: var(--tint); border: 2px solid #43a047; }
.callout .k { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.callout.featured .k { color: var(--accent-text); }
.callout .v { font-family: var(--serif); font-weight: 700; font-size: 30px; color: var(--heading); line-height: 1.2; }
.callout p { font-size: 16px; line-height: 1.6; color: var(--ink-body); }
details.data-table summary { cursor: pointer; font-size: 15px; font-weight: 500; color: var(--link); text-decoration: underline; width: fit-content; }
details.data-table[open] summary { margin-bottom: 12px; }
details.data-table .table-scroll { max-height: 360px; overflow: auto; border: 1px solid var(--hairline); border-radius: 8px; }
details.data-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
details.data-table caption { text-align: left; padding: 10px 14px; font-weight: 600; color: var(--ink); }
details.data-table th, details.data-table td { padding: 8px 14px; text-align: left; border-top: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
details.data-table thead th { position: sticky; top: 0; background: var(--tint); }

/* Readiness check */
.check-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; align-items: start; }
.check-list { margin: 0; padding: 0; border: none; display: flex; flex-direction: column; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 14px 22px; border-radius: 12px; border: 1.5px solid var(--control); background: var(--surface); font-size: 18px; line-height: 1.4; cursor: pointer; }
.check-row:has(input:checked) { border-color: var(--accent-text); }
.check-row input[type="checkbox"] { width: 26px; height: 26px; margin: 0; flex-shrink: 0; accent-color: var(--accent-text); cursor: pointer; }
.check-row.other { cursor: default; padding-top: 8px; padding-bottom: 8px; }
.check-row.other label { white-space: nowrap; cursor: pointer; }
.check-row.other input[type="text"] { flex-grow: 1; min-width: 0; height: 44px; padding: 0 4px; border: none; border-bottom: 1.5px solid var(--control); background: transparent; font: inherit; color: var(--ink); }
.score-card { margin-top: 150px; padding: 36px 32px; border-radius: 16px; background: var(--band); color: var(--white); display: flex; flex-direction: column; gap: 16px; }
.score-card .k { font-size: 15px; font-weight: 600; color: var(--green-light); }
.score-card .score { font-family: var(--serif); font-weight: 700; font-size: 72px; line-height: 1; }
.score-card .score .den { font-size: 32px; color: rgba(255, 255, 255, 0.75); }
.score-card p { font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, 0.9); }
.score-card .also { color: var(--green-light); font-size: 16px; }
.score-card ul { margin: 4px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.18); list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: rgba(255, 255, 255, 0.9); }

/* Services */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card { padding: 30px 28px; border-radius: 16px; background: var(--sand); display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 24px; font-weight: 500; line-height: 1.25; }
.card p { font-size: 16px; line-height: 1.6; color: var(--ink-body); flex-grow: 1; }
.card .examples { padding-top: 14px; border-top: 1px solid rgba(26, 95, 122, 0.16); font-size: 14px; line-height: 1.55; color: var(--ink-soft); flex-grow: 0; }

/* Proof band */
.proof { padding-top: 72px; padding-bottom: 72px; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.proof h2 { font-size: 40px; margin-bottom: 14px; }
.proof .lead { max-width: 640px; margin-bottom: 24px; }
.stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stats div { padding: 26px 22px; border-radius: 16px; background: var(--surface); display: flex; flex-direction: column-reverse; gap: 6px; }
.stats dt { font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
.stats dd { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 44px; line-height: 1.1; color: var(--heading); }

/* About page */
.about-hero { padding-top: 96px; padding-bottom: 104px; }
.about-hero .inner { max-width: 920px; display: flex; flex-direction: column; gap: 26px; }
.about-hero .label { margin-bottom: 0; }
.about-hero h1 { font-size: 64px; font-weight: 700; line-height: 1.06; letter-spacing: -0.02em; }
.about-hero p { font-size: 21px; line-height: 1.7; color: var(--ink-body); }
.about-hero p em { font-family: var(--serif); }
.commitments { padding-top: 72px; padding-bottom: 72px; }
.commitments h2 { font-size: 44px; margin-bottom: 40px; }
.commit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.commit-list li { padding-top: 24px; border-top: 2px solid var(--green); display: flex; flex-direction: column; gap: 12px; }
.commit-list h3 { font-size: 26px; font-weight: 500; line-height: 1.25; }
.commit-list p { font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, 0.88); }
.ron { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; margin-bottom: 56px; }
.ron figure { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.ron .photo { height: 540px; border-radius: 24px; overflow: hidden; background: var(--photo-bg); }
.ron .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.ron figcaption { display: flex; flex-direction: column; gap: 2px; }
.ron figcaption strong { font-family: var(--serif); font-size: 22px; color: var(--heading); }
.ron figcaption span { font-size: 16px; color: var(--ink-soft); }
.ron .text { display: flex; flex-direction: column; gap: 20px; }
.ron .text .label { margin-bottom: 0; }
.ron .text p { font-size: 20px; line-height: 1.7; color: var(--ink-body); }
.ron .text .btn { align-self: flex-start; margin-top: 6px; min-height: 52px; font-size: 16px; font-weight: 500; }
.engagements h3.sub { font-size: 30px; font-weight: 500; margin-bottom: 10px; }
.engagements .sub-lead { font-size: 18px; line-height: 1.65; color: var(--ink-body); max-width: 820px; margin-bottom: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filters button { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--control); background: var(--surface); color: var(--heading); font-family: var(--sans); font-size: 15px; font-weight: 500; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-fg); }
.showing { font-size: 15px; color: var(--ink-soft); margin-bottom: 24px; }
.work-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.work-card { padding: 30px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(26, 95, 122, 0.12); display: flex; flex-direction: column; gap: 14px; }
.work-card .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.work-card .area { font-size: 14px; font-weight: 600; color: var(--accent-text); }
.badge { font-size: 13px; font-weight: 600; color: var(--heading); background: var(--badge-bg); padding: 3px 10px; border-radius: 999px; }
.work-card h4 { font-size: 23px; font-weight: 500; line-height: 1.28; }
.work-card p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.show-all { display: flex; justify-content: center; margin-top: 32px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 22px; }
.contact-copy .label { margin-bottom: 0; }
.contact-copy h2 { font-size: 52px; line-height: 1.1; }
.contact-copy p { font-size: 19px; line-height: 1.7; color: var(--ink-body); }
.ticks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; font-size: 17px; }
.ticks li { display: flex; gap: 14px; align-items: flex-start; }
.ticks svg { flex-shrink: 0; margin-top: 2px; }
.form-card { padding: 44px; border-radius: 24px; background: var(--surface); box-shadow: 0 12px 48px rgba(13, 37, 53, 0.08); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 500; }
.field .req { color: var(--accent-text); }
.field .optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea { min-height: 52px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--control); background: var(--surface); font-family: var(--sans); font-size: 17px; color: var(--ink); width: 100%; }
.field textarea { padding-top: 14px; padding-bottom: 14px; line-height: 1.5; resize: vertical; min-height: 140px; }
.field [aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }
.field .error { display: none; font-size: 14px; font-weight: 500; color: var(--error); }
.field.has-error .error { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.required-note { grid-column: 1 / -1; font-size: 15px; color: var(--ink-soft); }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.form-actions .btn[disabled] { opacity: 0.7; cursor: progress; }
.form-status { grid-column: 1 / -1; font-size: 15px; font-weight: 500; color: var(--error); }
.form-status:empty { display: none; }
.form-success { text-align: center; padding: 40px 12px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.form-success h3 { font-size: 28px; }
.form-success p { font-size: 17px; color: var(--ink-body); max-width: 420px; }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Plain pages (accessibility statement) */
.prose { max-width: 760px; }
.prose h1 { font-size: 52px; line-height: 1.1; margin-bottom: 28px; }
.prose h2 { font-size: 30px; margin: 40px 0 12px; }
.prose p, .prose li { font-size: 19px; line-height: 1.7; color: var(--ink-body); }
.prose p + p { margin-top: 16px; }

/* Footer */
.site-footer { background: var(--footer); color: rgba(255, 255, 255, 0.8); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; flex-wrap: wrap; }
.site-footer svg { width: 196px; height: 56px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 32px; font-size: 15px; }
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: var(--white); }
.site-footer small { font-size: 14px; }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
  :root { --gutter: 48px; }
  .site-header .wrap { gap: 32px; }
  .primary-nav ul { gap: 24px; }
  .map-grid { grid-template-columns: minmax(0, 1fr); }
  .callouts { flex-direction: row; flex-wrap: wrap; }
  .callout { flex: 1 1 260px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-grid, .check-grid, .contact-grid, .ron { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .score-card { margin-top: 0; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Phone ---------- */
@media (max-width: 860px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .site-header .wrap { height: 72px; gap: 12px; justify-content: space-between; }
  .logo svg { width: 168px; height: 48px; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--surface); border-bottom: 1px solid var(--hairline); box-shadow: 0 16px 32px rgba(13, 37, 53, 0.1); }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .primary-nav a { display: block; padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--hairline); }
  .primary-nav a[aria-current="page"] { border-bottom-color: var(--hairline); color: var(--accent-text); }
  .primary-nav .nav-cta { display: block; margin-top: 16px; }
  .primary-nav .nav-cta a { border: none; text-align: center; padding: 0; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  h2 { font-size: 32px; }
  .hero { padding-top: 48px; padding-bottom: 56px; }
  .hero h1 { font-size: 40px; }
  .hero h1 br { display: none; }
  .hero .intro { font-size: 19px; }
  .btn-row .btn { width: 100%; }
  .grid-2, .grid-4, .work-grid, .commit-list, .stats, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .fig, .map-card { padding: 22px 20px; }
  .chart-lg { display: none; }
  .chart-sm { display: block; }
  .map-card > h3 { font-size: 24px; }
  .tilemap, .legend { display: none; }
  .top-declines { display: flex; }
  .top-declines-title { display: block; }
  .callouts { flex-direction: column; }
  .check-row { font-size: 17px; padding: 12px 16px; }
  .check-row.other { flex-wrap: wrap; }
  .check-row.other input[type="text"] { flex-basis: 100%; }
  .score-card .score { font-size: 56px; }
  .proof h2 { font-size: 30px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .stats div { padding: 16px 12px; }
  .stats dd { font-size: 30px; }
  .stats dt { font-size: 13px; }
  .about-hero { padding-top: 48px; padding-bottom: 56px; }
  .about-hero h1 { font-size: 40px; }
  .about-hero p, .ron .text p { font-size: 18px; }
  .commitments h2 { font-size: 30px; }
  .commit-list { gap: 28px; }
  .ron .photo { height: 440px; }
  .contact-copy h2 { font-size: 34px; }
  .form-card { padding: 24px 18px; }
  .form-actions .btn { width: 100%; }
}

/* ---------- Projects (passion projects index + project pages) ---------- */
.page-hero { padding-top: 88px; padding-bottom: 56px; }
.page-hero .inner { max-width: 860px; display: flex; flex-direction: column; gap: 22px; }
.page-hero .label { margin-bottom: 0; }
.page-hero h1 { font-size: 58px; font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.page-hero p { font-size: 21px; line-height: 1.7; color: var(--ink-body); }
.status-row { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; color: var(--ink-soft); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--badge-bg); color: var(--heading); }
.pill.running { background: var(--pill-run-bg); color: var(--accent-text); }
.pill.soon { background: var(--pill-soon-bg); color: var(--pill-soon-fg); }
.project-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-card { position: relative; border-radius: 20px; background: var(--surface); border: 1px solid rgba(26, 95, 122, 0.12); overflow: hidden; display: flex; flex-direction: column; }
.project-card .cover { height: 260px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.project-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.project-card .body { padding: 28px 30px 30px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.project-card h2 { font-size: 30px; }
.project-card p { font-size: 17px; line-height: 1.6; color: var(--ink-body); flex-grow: 1; }
.project-card a.stretched::after { content: ""; position: absolute; inset: 0; }
.project-card a.stretched { font-weight: 600; text-decoration: none; color: var(--link); }
.project-card:hover { border-color: var(--green); }
.project-card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.back-link { display: inline-block; font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.spec-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.spec-grid figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.spec-grid figure img { border-radius: 16px; width: 100%; height: auto; }
.spec-grid figcaption { font-size: 14px; color: var(--ink-soft); }
.spec-list { margin: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr); border-top: 1px solid var(--hairline); }
.spec-list dt, .spec-list dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--hairline); font-size: 17px; line-height: 1.55; }
.spec-list dt { font-weight: 600; color: var(--heading); padding-right: 16px; }
.spec-list dd { color: var(--ink-body); }
.plain-table { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.plain-table caption { text-align: left; font-weight: 600; padding: 0 0 12px; color: var(--ink); }
.plain-table th, .plain-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--hairline); line-height: 1.5; }
.plain-table thead th { background: var(--tint); font-size: 14px; font-weight: 600; color: var(--heading); border-top: none; }
.plain-table td { color: var(--ink-body); }
.plain-table tr.picked td, .plain-table tr.picked th { background: var(--picked); }
.table-scroll-x { overflow-x: auto; border: 1px solid var(--hairline); border-radius: 12px; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.principles li { padding: 26px 28px; border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.principles h3 { font-size: 22px; font-weight: 500; }
.principles p { font-size: 16px; line-height: 1.6; color: var(--ink-body); }
.lab-project { padding: 40px; border-radius: 20px; background: var(--surface); display: flex; flex-direction: column; gap: 22px; }
.lab-project + .lab-project { margin-top: 24px; }
.lab-project h3 { font-size: 32px; font-weight: 700; }
.lab-project .question { font-family: var(--serif); font-size: 21px; line-height: 1.5; color: var(--heading); border-left: 3px solid var(--green); padding-left: 20px; max-width: 860px; }
.lab-project h4 { font-family: var(--sans); font-size: 17px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.lab-project ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.55; color: var(--ink-body); }
.lab-project .note { font-size: 16px; color: var(--ink-soft); font-style: italic; }
.loop { width: 100%; height: auto; display: block; }
.loop .box { fill: var(--tint); stroke: #43a047; stroke-width: 1.5; }
.loop .box.human { fill: var(--badge-bg); stroke: var(--heading); }
.loop text { font-family: var(--sans); fill: var(--ink); }
.loop .t { font-size: 15px; font-weight: 600; }
.loop .s { font-size: 12px; fill: var(--ink-soft); }
.loop .arrow { stroke: var(--ocean); stroke-width: 1.8; fill: none; }
.loop .back { stroke: var(--ocean); stroke-width: 1.5; fill: none; stroke-dasharray: 5 4; }
.cta-band { padding: 56px; border-radius: 20px; background: var(--band); color: var(--white); display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); font-size: 36px; }
.cta-band p { font-size: 18px; color: rgba(255, 255, 255, 0.88); margin-top: 8px; }
.ron .text .btn-row .btn { align-self: auto; margin-top: 0; }

@media (max-width: 1180px) {
  .spec-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 860px) {
  .page-hero { padding-top: 48px; padding-bottom: 32px; }
  .page-hero h1 { font-size: 40px; }
  .page-hero p { font-size: 18px; }
  .project-grid, .principles { grid-template-columns: minmax(0, 1fr); }
  .project-card .cover { height: 200px; }
  .spec-list { grid-template-columns: minmax(0, 1fr); }
  .spec-list dt { border-bottom: none; padding-bottom: 0; }
  .lab-project { padding: 24px 20px; }
  .lab-project h3 { font-size: 26px; }
  .cta-band { padding: 32px 24px; }
  .cta-band h2 { font-size: 28px; }
}
.project-card .pill { align-self: flex-start; }
.project-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.project-switch a, .project-switch .soon { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--control); background: var(--surface); color: var(--heading); font-size: 15px; font-weight: 500; text-decoration: none; }
.project-switch a:hover { border-color: var(--heading); }
.project-switch a[aria-current="page"] { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-fg); }
.project-switch .soon { color: var(--ink-soft); border-style: dashed; }
.project-switch .soon small { margin-left: 4px; font-size: 13px; }

/* Tabs (Nova Lab models). Without JavaScript every panel shows, stacked. */
.tab-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab-list button { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--control); background: var(--surface); color: var(--heading); font-family: var(--sans); font-size: 15px; font-weight: 500; cursor: pointer; }
.tab-list button[aria-selected="true"] { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-fg); }
.tabs:not(.js) .tab-list { display: none; }
.tab-panel { display: flex; flex-direction: column; gap: 16px; }
.tabs:not(.js) .tab-panel + .tab-panel { margin-top: 40px; }
.tab-heading { font-size: 26px; font-weight: 500; }
.tabs.js .tab-heading { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tab-lead { font-size: 18px; line-height: 1.65; color: var(--ink-body); max-width: 900px; }
.tab-note { font-size: 15px; line-height: 1.6; color: var(--ink-soft); max-width: 900px; }
.tab-subhead { font-family: var(--sans); font-size: 18px; font-weight: 600; color: var(--heading); margin-top: 16px; }
.plan-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.55; color: var(--ink-body); }
.use-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.use-grid li { padding: 22px 24px; border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.use-grid h4 { font-family: var(--sans); font-size: 17px; font-weight: 600; color: var(--heading); }
.use-grid p { font-size: 15px; line-height: 1.55; color: var(--ink-body); }
.use-tag { font-size: 13px; font-weight: 600; color: var(--accent-text); }
@media (max-width: 1180px) { .use-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .use-grid { grid-template-columns: minmax(0, 1fr); } .tab-list button { flex: 1 1 auto; } }


/* ---------- Dark mode ----------
   Follows the device setting by default. The toggle (bottom of every page's markup) stores an explicit
   choice on <html data-theme>, set before first paint by the inline script in <head>. The header uses
   the brand's approved dark-background lockup instead of recolouring the light one. */
.logo .logo-dark { display: none; }
.chart .end { fill: var(--ink); }
.chart .note { fill: var(--ink-soft); }
.card svg, .project-card .cover svg { stroke: var(--icon); }
.ticks svg { stroke: var(--accent-text); }
:root[data-theme="dark"] {
  --page: #0e1a21;
  --surface: #182b35;
  --sand: #122029;
  --tint: #10232b;
  --ink: #e2ebef;
  --ink-body: #c3d1d9;
  --ink-soft: #a3b6c1;
  --heading: #e8f1f5;
  --accent-text: #74c69d;
  --link: #8cc8e6;
  --footer: #08131a;
  --band: #0b2e3e;
  --btn-dark: #1f6f94;
  --btn-dark-hover: #2478a0;
  --bar: #8cc8e6;
  --track: #24363f;
  --sel-bg: #e8f1f5;
  --sel-fg: #0e1a21;
  --photo-bg: #1d2c34;
  --picked: #1b3328;
  --pill-run-bg: #1d3b2c;
  --pill-soon-bg: #3a3020;
  --pill-soon-fg: #e6c98f;
  --badge-bg: #1d3d4f;
  --error: #ff8a80;
  --error-bg: #2a1a1a;
  --control: #6f8896;
  --hairline: rgba(200, 220, 230, 0.14);
  --icon: #8cc8e6;
  color-scheme: dark;
}
:root[data-theme="dark"] .logo .logo-light { display: none; }
:root[data-theme="dark"] .logo .logo-dark { display: block; }
:root[data-theme="dark"] .chart line { stroke: rgba(200, 220, 230, 0.16); }
:root[data-theme="dark"] .chart [stroke="#1565c0"] { stroke: #2f8fe0; }
:root[data-theme="dark"] .chart [fill="#1565c0"] { fill: #2f8fe0; }
:root[data-theme="dark"] .chart circle { stroke: var(--surface); }
:root[data-theme="dark"] .loop .arrow, :root[data-theme="dark"] .loop .back { stroke: var(--link); }
:root[data-theme="dark"] .loop marker path { fill: var(--link); }
:root[data-theme="dark"] .form-card { box-shadow: none; border: 1px solid var(--hairline); }
:root[data-theme="dark"] .work-card, :root[data-theme="dark"] .project-card { border-color: var(--hairline); }
:root[data-theme="dark"] img { filter: brightness(0.92); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --page: #0e1a21;
  --surface: #182b35;
  --sand: #122029;
  --tint: #10232b;
  --ink: #e2ebef;
  --ink-body: #c3d1d9;
  --ink-soft: #a3b6c1;
  --heading: #e8f1f5;
  --accent-text: #74c69d;
  --link: #8cc8e6;
  --footer: #08131a;
  --band: #0b2e3e;
  --btn-dark: #1f6f94;
  --btn-dark-hover: #2478a0;
  --bar: #8cc8e6;
  --track: #24363f;
  --sel-bg: #e8f1f5;
  --sel-fg: #0e1a21;
  --photo-bg: #1d2c34;
  --picked: #1b3328;
  --pill-run-bg: #1d3b2c;
  --pill-soon-bg: #3a3020;
  --pill-soon-fg: #e6c98f;
  --badge-bg: #1d3d4f;
  --error: #ff8a80;
  --error-bg: #2a1a1a;
  --control: #6f8896;
  --hairline: rgba(200, 220, 230, 0.14);
  --icon: #8cc8e6;
  color-scheme: dark;
  }
:root:not([data-theme="light"]) .logo .logo-light { display: none; }
:root:not([data-theme="light"]) .logo .logo-dark { display: block; }
:root:not([data-theme="light"]) .chart line { stroke: rgba(200, 220, 230, 0.16); }
:root:not([data-theme="light"]) .chart [stroke="#1565c0"] { stroke: #2f8fe0; }
:root:not([data-theme="light"]) .chart [fill="#1565c0"] { fill: #2f8fe0; }
:root:not([data-theme="light"]) .chart circle { stroke: var(--surface); }
:root:not([data-theme="light"]) .loop .arrow, :root:not([data-theme="light"]) .loop .back { stroke: var(--link); }
:root:not([data-theme="light"]) .loop marker path { fill: var(--link); }
:root:not([data-theme="light"]) .form-card { box-shadow: none; border: 1px solid var(--hairline); }
:root:not([data-theme="light"]) .work-card, :root:not([data-theme="light"]) .project-card { border-color: var(--hairline); }
:root:not([data-theme="light"]) img { filter: brightness(0.92); }
}

/* Theme switch: small, fixed to the right edge, on every page */
.theme-toggle { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 10px 10px; border: 1px solid var(--hairline); border-right: none; border-radius: 14px 0 0 14px; background: var(--surface); box-shadow: 0 6px 20px rgba(13, 37, 53, 0.12); color: var(--ink-soft); cursor: pointer; font: inherit; }
.theme-toggle .track { position: relative; width: 26px; height: 46px; border-radius: 999px; background: var(--track); border: 1.5px solid var(--control); }
.theme-toggle .knob { position: absolute; left: 2px; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--heading); transition: transform 0.2s ease; }
.theme-toggle[aria-checked="true"] .knob { transform: translateY(21px); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle:hover { color: var(--heading); }
@media (max-width: 860px) {
  .theme-toggle { top: auto; bottom: 16px; transform: none; padding: 8px 6px 8px 8px; }
  .theme-toggle .track { height: 40px; width: 24px; }
  .theme-toggle .knob { width: 17px; height: 17px; }
  .theme-toggle[aria-checked="true"] .knob { transform: translateY(17px); }
}

/* Home hero with the consolidation chart beside the intro */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 56px; align-items: center; }
.hero-grid .hero-text h1 { font-size: 54px; }
.hero-grid .hero-text .intro { font-size: 20px; }
.hero-fig { background: var(--sand); }
.hero-fig .fig-title { font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.3; color: var(--heading); }
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-fig { max-width: 680px; }
}
@media (max-width: 860px) {
  .hero-grid .hero-text h1 { font-size: 40px; }
  .hero-grid .hero-text .intro { font-size: 19px; }
  .hero-fig .fig-title { font-size: 20px; }
}
.plain-table tr.divider-row th { background: var(--tint); font-size: 14px; font-weight: 600; color: var(--accent-text); }

/* Nav icons (decorative; every link keeps its text) and the After Hours link */
.primary-nav a { display: inline-flex; align-items: center; gap: 8px; }
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.75; }
.btn .nav-ico { opacity: 1; }
.primary-nav ul { align-items: center; }
.primary-nav .nav-after { margin-left: 4px; padding-left: 28px; border-left: 1px solid var(--hairline); }
.primary-nav .nav-after a { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 17px; color: var(--accent-text); }
.primary-nav .nav-after a:hover { color: var(--heading); }
@media (max-width: 1180px) {
  .primary-nav .nav-after { padding-left: 20px; }
}
@media (max-width: 860px) {
  .primary-nav a { display: flex; }
  .primary-nav .nav-after { margin-left: 0; padding-left: 0; border-left: none; }
}

/* Header fit: tighten on laptops, collapse to the menu button below 1100px */
@media (max-width: 1360px) {
  .site-header .wrap { gap: 28px; }
  .primary-nav ul { gap: 22px; }
  .primary-nav li:not(.nav-after):not(.nav-cta) .nav-ico { display: none; }
  .primary-nav .nav-after { padding-left: 20px; }
}
@media (max-width: 1100px) {
  .site-header .wrap { height: 80px; gap: 12px; justify-content: space-between; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 80px; background: var(--page); border-bottom: 1px solid var(--hairline); box-shadow: 0 16px 32px rgba(13, 37, 53, 0.1); }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .primary-nav a { display: flex; padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--hairline); }
  .primary-nav li:not(.nav-after):not(.nav-cta) .nav-ico { display: inline-block; }
  .primary-nav a[aria-current="page"] { border-bottom-color: var(--hairline); color: var(--accent-text); }
  .primary-nav .nav-after { margin-left: 0; padding-left: 0; border-left: none; }
  .primary-nav .nav-cta { display: block; margin-top: 16px; }
  .primary-nav .nav-cta a { border: none; justify-content: center; padding: 0; }
}
@media (max-width: 860px) {
  .site-header .wrap { height: 72px; }
  .primary-nav { top: 72px; }
}
.primary-nav .nav-cta a, .primary-nav .nav-cta a:hover { color: var(--white); }

/* You-are-here marker: a thick underline on the current page or section (no layout shift) */
.primary-nav a[aria-current] { color: var(--accent-text); border-bottom-color: transparent; box-shadow: inset 0 -3px 0 var(--accent-text); }
.primary-nav a { transition: color 0.15s ease, box-shadow 0.15s ease; }
@media (max-width: 1100px) {
  .primary-nav a[aria-current] { box-shadow: inset 4px 0 0 var(--accent-text); padding-left: 14px; border-bottom-color: var(--hairline); }
}

/* Sticky header: the menu (and its you-are-here marker) stays visible while scrolling.
   scroll-padding keeps in-page jumps from hiding headings under it. */
.site-header { position: sticky; top: 0; }
html { scroll-padding-top: 112px; }
@media (max-width: 1100px) { html { scroll-padding-top: 96px; } }
@media (max-width: 860px) { html { scroll-padding-top: 88px; } }
