/* Section styles for the homepage, Company, Privacy, Work and Insights (decision gap, Who we serve, How it works, Hakken Intelligence, comparison, closing film, Insights index). */
/* ============================== INTERLUDE · PHOTOGRAPH BAND ============================== */
.band { position: relative; display: flex; align-items: flex-end; min-height: 88vh; min-height: 88svh; overflow: hidden; color: var(--ink); background: var(--surface-000); }
.band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; transform: scale(1.04); transition: transform 1.8s var(--ease-layer); }
.band.is-in .band-img { transform: none; }
.band-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(12, 14, 17, .9) 0%, rgba(12, 14, 17, .55) 38%, rgba(12, 14, 17, .08) 70%),
              linear-gradient(90deg, rgba(12, 14, 17, .45) 0%, transparent 55%); }
.band-inner { position: relative; padding-top: 160px; padding-bottom: var(--space-8); }
.band-title { max-width: 19ch; margin: 0 0 var(--space-7); font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 4.4vw, 64px); line-height: 1.08; }
.band-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); max-width: 1040px; }
.band-grid > div { padding-top: var(--space-4); border-top: 1px solid var(--line-strong); }
.band-grid .mono-label { margin: 0 0 var(--space-2); color: var(--accent-text); }
.band-grid p:last-child { margin: 0; font-size: 18px; line-height: 28px; }
.band-cap { margin: var(--space-7) 0 0; }

/* ============================== 04 · LINK TO THE JOURNEY ============================== */
.journey-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-5);
  margin-top: var(--space-8); padding: var(--space-5) var(--space-6);
  color: var(--ink); text-decoration: none; background: var(--surface-100);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  transition: border-color var(--duration-hover) var(--ease-standard), background-color var(--duration-hover) var(--ease-standard);
}
.journey-link:hover { border-color: var(--accent); background: var(--surface-200); }
.journey-dot { width: 12px; height: 12px; border: 2px solid var(--accent); border-radius: var(--radius-full); box-shadow: var(--shadow-node); }
.journey-copy { display: grid; gap: 4px; }
.journey-title { font-family: var(--font-display); font-size: 24px; line-height: 30px; }
.journey-go { font-size: 22px; color: var(--accent-text); transition: transform var(--duration-hover) var(--ease-standard); }
.journey-link:hover .journey-go { transform: translateX(4px); }

/* ============================== 08 · WHO WE SERVE ============================== */
/* Editorial 2 × 2: photograph left, the role's question right. Choosing a card retunes the page to that role. */
.who-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.who-card {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 280px;
  color: var(--ink); text-decoration: none; background: var(--surface-100);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color var(--duration-hover) var(--ease-standard), background-color var(--duration-hover) var(--ease-standard);
}
.who-card:hover { border-color: var(--line-control); background: var(--surface-200); }
.who-card.is-mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.who-media { position: relative; display: block; overflow: hidden; background: var(--surface-200); }
.who-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-layer); }
.who-card:hover .who-media img { transform: scale(1.03); }
.who-cap { position: absolute; left: var(--space-3); bottom: var(--space-2); color: rgba(238, 236, 230, .86); text-shadow: 0 1px 6px rgba(12, 14, 17, .7); }
.who-body-wrap { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6); }
.who-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.who-top .mono-label { margin: 0; }
.who-q { font-family: var(--font-display); font-size: 22px; line-height: 28px; }
.who-body { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.who-card .uc-link { margin-top: auto; }

/* ============================== 12 · CLOSE OVER FILM ============================== */
.close-film { overflow: hidden; padding-top: 200px; padding-bottom: calc(var(--space-6) + 76px); /* +15% of the section below the button */ color: var(--ink); background: var(--surface-000); }
.close-media { position: absolute; inset: 0; background: #101418; }
.close-media video { width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.close-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(12, 14, 17, .92) 0%, rgba(12, 14, 17, .7) 45%, rgba(12, 14, 17, .25) 100%); }
.close-film .container { position: relative; }
.close-film .close-inner { padding: 0; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.close-film .close-inner::before { display: none; }
.close-film .close-title { font-size: clamp(36px, 5vw, 72px); max-width: 16ch; }
.close-film .close-steps li { color: rgba(238, 236, 230, .8); }
.close-film .close-steps li::before { background: #14181d; }
.close-film .close-steps li:last-child::before { background: var(--accent); }
.close-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); margin-top: var(--space-8); }
.film-toggle {
  padding: 6px 10px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); background: rgba(12, 14, 17, .4); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); cursor: pointer;
}
.film-toggle:hover { background: rgba(12, 14, 17, .65); }

.foot-options { color: var(--accent-text); text-decoration: none; }
.foot-options:hover { text-decoration: underline; }

/* ============================== SITE-WIDE POLISH ============================== */
/* Nav marks where you are: the section in view on the homepage, the page you are on elsewhere */
.nav-links a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.foot-blurb { max-width: 300px; margin: var(--space-4) 0 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.hero-meta { pointer-events: none; }
.journey-link { margin-top: var(--space-7); }
/* Prototype-only controls stay out of the way unless the site was opened from the options page */
/* Section anchors land just below the top bar (html scroll-padding-top); sections bring their own top spacing */

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1180px) {
  .who-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .band { min-height: 92svh; }
  .band-img { object-position: 64% 50%; }
  .band-grid, .who-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .who-card { grid-template-columns: minmax(0, 1fr); }
  .who-media { aspect-ratio: 16 / 9; }
  .who-body-wrap { padding: var(--space-5); }
  .who-q { font-size: 20px; line-height: 26px; }
  .band-grid p:last-child { font-size: 16px; line-height: 25px; }
  .journey-link { grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-4) var(--space-5); }
  .journey-dot { display: none; }
  .journey-title { font-size: 20px; line-height: 26px; }
  .close-film { padding-top: 140px; padding-bottom: calc(var(--space-6) + 66px); }
  .close-scrim { background: linear-gradient(0deg, rgba(12, 14, 17, .94) 0%, rgba(12, 14, 17, .82) 55%, rgba(12, 14, 17, .62) 100%); }
  .close-foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .band-img, .who-media img { transform: none !important; transition: none; }
}

/* ============================== PLATFORM PAGE · MODULES ============================== */
.mods { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-7); align-items: start; }
.mods-list { display: grid; gap: var(--space-2); }
.mod-tab {
  display: grid; gap: 2px; padding: var(--space-3) var(--space-4); text-align: left; font: inherit; color: var(--ink-muted);
  background: transparent; border: 1px solid var(--line); border-left: 2px solid var(--line-strong); border-radius: 0 var(--radius-md) var(--radius-md) 0; cursor: pointer;
  transition: border-color var(--duration-hover) var(--ease-standard), background-color var(--duration-hover) var(--ease-standard), color var(--duration-hover) var(--ease-standard);
}
.mod-tab:hover { background: var(--surface-100); }
.mod-tab.is-selected { color: var(--ink); border-left-color: var(--accent); background: var(--surface-100); }
.mod-tab.is-selected .mono-label { color: var(--accent-text); }
.mod-name { font-family: var(--font-display); font-size: 20px; line-height: 26px; color: var(--ink); }
.mod-text { display: none; font-size: 14px; line-height: 22px; }
.mod-tab.is-selected .mod-text { display: block; margin-top: 4px; }
.mods-figure { position: sticky; top: 104px; margin: 0; }
.mods-figure .plate-media { aspect-ratio: 16 / 9; }
.mods-figure video { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1024px) {
  .mods { grid-template-columns: minmax(0, 1fr); }
  .mods-figure { position: relative; top: 0; order: -1; }
}

/* ============================== INNER PAGES (Company, Privacy) ============================== */
.page { padding-top: 72px; }
.page-hero { padding: var(--space-9) 0 var(--space-8); }
.page-h1 { max-width: 18ch; margin: var(--space-4) 0 var(--space-5); font-family: var(--font-display); font-weight: 400; font-size: clamp(38px, 5.4vw, 72px); line-height: 1.05; letter-spacing: -0.01em; }
.page-lead { max-width: 720px; margin: 0; font-size: 20px; line-height: 32px; color: var(--ink-muted); }
.page-narrow { max-width: 880px; }
.page-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); align-items: start; }
.page-split .section-head { margin-bottom: 0; }
.page-steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); margin: 0; }
.page-steps li::before { background: var(--surface-000); }
.page-close-lead { margin: 0 0 var(--space-6); }

.beliefs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.beliefs li { display: grid; align-content: start; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line-strong); color: var(--ink-muted); }
.belief-idx { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.14em; color: var(--accent-text); }
.belief-name { font-family: var(--font-display); font-size: 22px; line-height: 28px; color: var(--ink); }

.draft-flag { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3); max-width: 720px; margin: var(--space-6) 0 0; padding: var(--space-4); font-size: 14px; line-height: 22px; color: var(--ink-muted); background: var(--surface-100); border: 1px dashed var(--line-control); border-radius: var(--radius-md); }
.legal { font-size: 17px; line-height: 28px; }
.legal h2 { display: flex; align-items: baseline; gap: var(--space-4); margin: var(--space-8) 0 var(--space-4); font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 34px; scroll-margin-top: 104px; }
.legal h2:first-child { margin-top: 0; }
.legal-idx { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; color: var(--accent-text); }
.legal p, .legal li { color: var(--ink-muted); }
.legal p { margin: 0 0 var(--space-4); }
.legal ul { margin: 0 0 var(--space-4); padding-left: 1.2em; }
.legal li { margin-bottom: var(--space-2); }
.legal li::marker { color: var(--accent-text); }
.legal code { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.storage-table { margin: 0 0 var(--space-5); }
.storage-table div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.storage-table dd { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.storage-now { margin: 0 0 var(--space-5); padding: var(--space-5); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); }
.storage-now .mono-label { margin: 0 0 var(--space-3); }
.storage-now ul { margin: 0 0 var(--space-4); padding: 0; list-style: none; font-size: 14px; }
.storage-now li { display: flex; gap: var(--space-3); padding: 4px 0; }
.storage-now li span { color: var(--ink-muted); word-break: break-all; }
.legal-date { margin-top: var(--space-6) !important; }

@media (max-width: 1024px) {
  .page-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .beliefs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .page-hero { padding: var(--space-8) 0 var(--space-6); }
  .page-lead { font-size: 17px; line-height: 27px; }
  .beliefs { grid-template-columns: minmax(0, 1fr); }
  .storage-table div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .legal h2 { font-size: 24px; line-height: 30px; }
}

/* ============================== USE CASES · THE CHOOSER ============================== */
/* Each card: the question opens the use-case page, Select marks the visitor's decision, the demo link pre-fills the form */
.uc-card { position: relative; gap: var(--space-3); }
.uc-top { flex-direction: row; justify-content: space-between; align-items: center; }
.uc-ico { width: 28px; height: 28px; }
.uc-card.is-selected .uc-ico { color: var(--ink); }
.uc-card .uc-tag { align-self: flex-start; }
.uc-q { color: inherit; text-decoration: none; }
.uc-q:hover { color: var(--accent-text); }
.uc-select {
  display: flex; align-items: center; gap: var(--space-3); margin-top: auto; padding: 10px 0 0;
  font: inherit; color: inherit; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); cursor: pointer;
}
.uc-select .uc-select-text { transition: color var(--duration-hover) var(--ease-standard); }
.uc-select:hover .uc-select-text { color: var(--ink); }
.uc-card.is-selected .uc-select-text { color: var(--accent-text); }
.uc-actions { display: flex; flex-direction: column; gap: var(--space-1); }
.uc-demo { font-size: 13px; line-height: 20px; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; }
.uc-demo:hover { color: var(--ink); }
.usecases .fd-role { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }

/* ============================== V2 · WHY (THE DECISION GAP) ============================== */
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); max-width: 1040px; margin: 0 0 var(--space-7); }
.why-grid > div { padding-top: var(--space-4); border-top: 1px solid var(--line-strong); }
.why-grid .mono-label { margin: 0 0 var(--space-2); color: var(--accent-text); }
.why-grid p:last-child { margin: 0; font-size: 17px; line-height: 27px; }

/* Fig · the decision gap, drawn in the design system (large labels, built as it enters) */
.gapfig-wrap { background: var(--surface-100); }
[data-theme="paper"] .gapfig-wrap { background: var(--surface-000); }
.gapfig { display: block; width: 100%; height: 100%; font-family: var(--font-mono); }
.gf-grid line { stroke: var(--line); stroke-width: 1; }
.gf-months text { font-size: 18px; font-weight: 500; letter-spacing: .1em; fill: var(--ink-muted); text-anchor: middle; }
.gf-head, .gf-commit-label, .gf-foot { font-size: 20px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; fill: var(--ink-muted); }
.gf-rows text { font-family: var(--font-sans); font-size: 24px; fill: var(--ink); }
.gf-bar { fill: var(--surface-200); stroke: var(--line-strong); stroke-width: 1; }
.gf-end { fill: var(--surface-000); stroke: var(--data-amber); stroke-width: 3; }
.gf-end.is-before { fill: var(--accent); stroke: var(--accent); }
.gf-commit line { stroke: var(--data-amber); stroke-width: 3; stroke-dasharray: 10 8; }
.gf-commit circle { fill: var(--data-amber); }
.gf-commit-label, .gf-foot { fill: var(--data-amber); }
.js .gf-bar { transform: scaleX(0); transform-origin: left; transform-box: fill-box; transition: transform 900ms var(--ease-layer) calc(var(--i, 0) * 110ms + 240ms); }
.js .gf-end { opacity: 0; transition: opacity 320ms var(--ease-standard) calc(var(--i, 0) * 110ms + 1000ms); }
.js .gf-commit { opacity: 0; transition: opacity 500ms var(--ease-standard) 1500ms; }
.js .gf-foot { opacity: 0; transition: opacity 500ms var(--ease-standard) 1900ms; }
.js .figure.is-in .gf-bar { transform: scaleX(1); }
.js .figure.is-in .gf-end, .js .figure.is-in .gf-commit, .js .figure.is-in .gf-foot { opacity: 1; }

/* ============================== V2 · HOW IT WORKS ============================== */
.how-head { max-width: none; }
.how-pillars {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5);
  max-width: 1040px; margin: var(--space-6) 0 0; padding: 0; list-style: none;
}
.how-pillars li { display: grid; gap: 4px; padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.how-pillar-name { font-family: var(--font-display); font-size: 20px; line-height: 26px; color: var(--ink); }

/* The scenario comparison, compact enough to sit on the 16:9 stage */
.ss-layer-compare .compare { height: 100%; margin: 0; padding: 18px 22px; border: 0; border-radius: 0; background: transparent; }
.ss-layer-compare .compare-head { margin-bottom: var(--space-4); }
.ss-layer-compare .compare-body { grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: var(--space-5); }
.ss-layer-compare .cmp-tab { padding: 10px 12px; gap: 4px; }
.ss-layer-compare .cmp-tab-name { font-size: 17px; line-height: 22px; }
.ss-layer-compare .cmp-rows { gap: 10px; }
.ss-layer-compare .cmp-row { grid-template-columns: minmax(0, 180px) 36px minmax(0, 1fr) 28px; gap: 10px; }
.ss-layer-compare .cmp-name { font-size: 13px; }
.ss-layer-compare .cmp-foot { margin-top: var(--space-4); padding-top: var(--space-4); gap: var(--space-5); }
.ss-layer-compare .cmp-score-num { font-size: 44px; line-height: 48px; }
.ss-layer-compare .cmp-formula { display: none; }
.ss-layer-compare .cmp-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); font-size: 13px; line-height: 20px; }
.ss-mobile-compare .compare { margin: 0; }

/* ============================== V2 · PROOF (WORK + THE RECORD) ============================== */
.proof-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-7); align-items: start; }
.proof-grid .work-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.proof-grid .case { padding: 22px 24px; }
.proof-grid .case-title { font-size: 20px; line-height: 26px; }
.proof-grid .case-body { margin-bottom: var(--space-4); font-size: 14px; line-height: 22px; }
.proof-grid .case-metric-v { font-size: 26px; line-height: 30px; }
.proof-record { display: grid; gap: var(--space-4); }
.proof-record .hk-eyebrow { margin: 0; }
.proof-record-title { margin: 0 0 var(--space-2); font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 34px; }
.principles-compact { margin: var(--space-2) 0 0; }
.principles-compact li { padding: var(--space-3) 0; font-size: 14px; line-height: 22px; }
.proof-link { font-size: 14px; }
.record-title { font-size: 24px; line-height: 30px; }

/* ============================== V2 · CLOSE ============================== */
.close-lead { max-width: 560px; margin: calc(-1 * var(--space-4)) 0 var(--space-7); font-size: 18px; line-height: 28px; color: var(--ink-muted); }
.close-film .close-lead { color: rgba(238, 236, 230, .8); }

/* ============================== V2 · PLATFORM ARCHITECTURE FIGURE ============================== */
.archfig-wrap { background: var(--surface-100); }
[data-theme="paper"] .archfig-wrap { background: var(--surface-000); }
.archfig { display: block; width: 100%; height: 100%; }
.af-plane > polygon { fill: var(--surface-200); stroke: var(--line-strong); stroke-width: 1.5; }
.af-p1 > polygon { fill: color-mix(in srgb, var(--accent) 10%, var(--surface-200)); stroke: var(--accent); }
.af-p2 > polygon { fill: var(--surface-100); stroke: var(--line-control); }
.af-cells polygon { fill: var(--surface-100); stroke: var(--line-control); stroke-width: 1.5; }
.af-nodes circle { fill: var(--accent); }
.af-nodes path { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .8; }
.af-apps rect { fill: var(--surface-200); stroke: var(--ink-muted); stroke-width: 1.5; }
.af-decision { fill: var(--decision-lime); }
[data-theme="paper"] .af-decision { stroke: var(--ink); stroke-width: 1.5; }
.af-label line { stroke: var(--line-strong); stroke-width: 1.5; }
.af-name { font-family: var(--font-display); font-size: 30px; fill: var(--ink); }
.af-sub { font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; fill: var(--ink-muted); }
.js .af-plane { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease-layer) calc(var(--i, 0) * 220ms), transform 600ms var(--ease-layer) calc(var(--i, 0) * 220ms); }
.js .af-label { opacity: 0; transition: opacity 500ms var(--ease-standard) calc(var(--i, 0) * 220ms + 500ms); }
.js .figure.is-in .af-plane { opacity: 1; transform: none; }
.js .figure.is-in .af-label { opacity: 1; }
@media (max-width: 720px) {
  .af-name { font-size: 40px; }
  .af-sub { font-size: 20px; }
}

/* ============================== V2 · USE CASES HUB ============================== */

/* ============================== V2 · CHROME ============================== */
/* Figures carry one caption line and one evidence badge; ticks stay on the hero and the pinned stage only */
.figure > .tick, .plate > .tick { display: none; }
.plate-caption > span:first-child { font-weight: 500; color: var(--ink); }
.who-cap { padding: 2px 6px; background: rgba(12, 14, 17, .5); border-radius: var(--radius-xs); text-shadow: none; }

@media (max-width: 1180px) {
  .proof-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .how-pillars { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .ss-mobile-compare .compare-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .why-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .why-grid p:last-child { font-size: 16px; line-height: 25px; }
  .gf-months text { font-size: 22px; }
  .gf-rows text { font-size: 28px; }
  .gf-head, .gf-commit-label, .gf-foot { font-size: 24px; }
  .uc-actions { gap: var(--space-2); }
}

/* ============================== DECISION GAP · SIX DISCIPLINES ============================== */
/* Each discipline keeps its own consultant, tools and versions; the cards sit apart on a dot field, joined only by dotted lines */
.disc-panel { position: relative; padding: var(--space-8) var(--space-6) var(--space-6); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 16px 16px; }
.disc-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.disc { position: relative; display: grid; gap: 6px; align-content: start; padding: var(--space-4); background: var(--surface-000); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  transform: translateY(var(--dy, 0)); }
.disc:nth-child(odd) { --dy: 12px; } .disc:nth-child(even) { --dy: -12px; }
.disc + .disc::before { content: ""; position: absolute; left: calc(-1 * var(--space-4)); top: 50%; width: var(--space-4); border-top: 1px dashed var(--line-strong); }
.disc-tick { position: absolute; top: -1px; left: var(--space-3); width: 28px; height: 2px; background: var(--c); }
.disc-name { font-family: var(--font-display); font-size: clamp(14px, 1.15vw, 18px); line-height: 1.2; text-transform: uppercase; color: var(--ink); }
.disc-team { font-family: var(--font-mono); font-size: 10px; line-height: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.disc-art { display: block; margin-top: 6px; padding: 6px; background: color-mix(in srgb, var(--ink) 3%, transparent); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.disc-art svg { display: block; width: 100%; height: auto; }
.disc-vers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.disc-vers span { padding: 3px 7px; font-family: var(--font-mono); font-size: 10px; line-height: 14px; letter-spacing: 0.04em; color: var(--ink-muted); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); }
/* mini artwork: each in its discipline's colour */
.da-text text { font-family: var(--font-mono); font-size: 15px; fill: var(--ink-muted); } .da-text .da-hi { fill: var(--c); }
.da-grid line { stroke: var(--line); stroke-width: 1; } .da-box rect { fill: color-mix(in srgb, var(--c) 32%, transparent); stroke: var(--c); stroke-width: 1.2; } /* the card's own colour, like the other cards */
.da-iso .t { fill: var(--surface-300); } .da-iso .l { fill: var(--surface-200); } .da-iso .r { fill: var(--surface-100); } .da-iso path { stroke: var(--ink); stroke-opacity: .55; stroke-width: .8; }
.da-net path { fill: none; stroke: var(--c); stroke-opacity: .7; stroke-width: 1; } .da-node circle { fill: var(--c); }
.da-bar rect { fill: var(--c); fill-opacity: .55; } .da-line { fill: none; stroke: var(--ink); stroke-opacity: .7; stroke-width: 1.2; }
/* entrance: the cards rise one after another, out of step with each other */
.js .disc-fig .disc { opacity: 0; transform: translateY(calc(var(--dy, 0px) + 18px)); transition: opacity var(--duration-layer) var(--ease-layer), transform var(--duration-layer) var(--ease-layer); transition-delay: calc(var(--i) * 110ms + 150ms); }
.js .disc-fig.is-in .disc { opacity: 1; transform: translateY(var(--dy, 0)); }
@media (max-width: 1180px) { .disc-row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-6); } .disc:nth-child(3n + 1)::before { display: none; } }
@media (max-width: 640px) { .disc-panel { padding: var(--space-5) var(--space-4); } .disc { padding: 14px; } .disc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .disc:nth-child(3n + 1)::before { display: block; } .disc:nth-child(odd)::before { display: none; } .disc-name { font-size: 13px; line-height: 18px; } }
@media (prefers-reduced-motion: reduce) { .js .disc-fig .disc { opacity: 1; transform: translateY(var(--dy, 0)); transition: none; } }

/* ============================== WHO WE SERVE · FOUR FULL-SCREEN CHAPTERS ============================== */
.section.who { padding-bottom: 0; background: var(--surface-100); } /* white on Paper, so it reads apart from the decision gap above */
.who-chapters { margin-top: var(--space-7); }
/* reserve the four full-screen chapters before proto.js draws them, so a return to this page lands on the same spot */
.who-chapters:empty { min-height: 400vh; min-height: 400svh; }
.who-ch { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: #eeece6; background: #0c0e11; }
.who-ch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.who-ch-scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12, 14, 17, .9) 0%, rgba(12, 14, 17, .48) 42%, rgba(12, 14, 17, .12) 72%), linear-gradient(90deg, rgba(12, 14, 17, .5) 0%, rgba(12, 14, 17, 0) 55%); }
.who-ch-inner { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: var(--space-8); }
.who-ch-idx { margin: 0 0 var(--space-4); color: rgba(238, 236, 230, .78); }
.who-ch-tag { display: inline-block; margin-left: var(--space-3); padding: 2px 8px; border: 1px solid var(--accent); border-radius: var(--radius-xs); color: var(--accent-text); }
.who-ch-q { max-width: 22ch; margin: 0 0 var(--space-4); font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4vw, 56px); line-height: 1.08; color: #eeece6; }
.who-ch-body { max-width: 560px; margin: 0 0 var(--space-5); font-size: 18px; line-height: 28px; color: rgba(238, 236, 230, .82); }
.who-ch-link { display: inline-flex; gap: 8px; padding-bottom: 2px; font-size: 15px; color: #eeece6; text-decoration: none; border-bottom: 1px solid rgba(238, 236, 230, .45); }
.who-ch-link:hover { border-color: #eeece6; }
.who-ch.is-mine .who-ch-link { color: var(--accent-text); border-color: var(--accent); }
.who-ch-cap { display: block; margin-top: var(--space-5); color: rgba(238, 236, 230, .6); }
@media (max-width: 720px) { .who-ch-inner { padding-bottom: var(--space-6); } .who-ch-body { font-size: 16px; line-height: 25px; } }


/* What changes: the comparison sits below the three pillars */
.pillars .compare { margin-top: var(--space-8); }

/* ============================== HOW IT WORKS · STAGE PHOTOGRAPHS (option B) ============================== */
/* Each stage is a field photograph with an analytical overlay that draws itself when the stage becomes active */
.ss-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ss-mobile-media.ss-photo .plate-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.ss-photo .ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ss-photo .ov-line { fill: none; stroke: #43c6d8; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-layer); }
.ss-photo .ov-dash { stroke-dasharray: .012 .012; stroke-dashoffset: 0; opacity: 0; transition: opacity .8s var(--ease-standard); }
.ss-photo .ov-node { fill: rgba(16, 20, 24, .7); stroke: #43c6d8; stroke-width: 2; opacity: 0; transition: opacity .5s var(--ease-standard); }
.ss-photo .ov-node-filled { fill: #43c6d8; }
.ss-photo .ov-decision { fill: #b9f227; stroke: none; }
.ss-photo .ov-label { fill: #eeece6; font-family: var(--font-mono); font-size: 18px; letter-spacing: .14em; opacity: 0; transition: opacity .6s var(--ease-standard); paint-order: stroke; stroke: rgba(12, 14, 17, .7); stroke-width: 6px; }
.ss-layer.ss-photo.is-active .ov-line, .ss-mobile-media.ss-photo.is-in .ov-line { stroke-dashoffset: 0; transition-delay: 300ms; }
.ss-layer.ss-photo.is-active .ov-dash, .ss-layer.ss-photo.is-active .ov-node, .ss-layer.ss-photo.is-active .ov-label,
.ss-mobile-media.ss-photo.is-in .ov-dash, .ss-mobile-media.ss-photo.is-in .ov-node, .ss-mobile-media.ss-photo.is-in .ov-label { opacity: 1; transition-delay: 1100ms; }
.ss-where { margin: var(--space-2) 0 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
@media (max-width: 720px) { .ss-photo .ov-label { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .ss-photo .ov-line { stroke-dashoffset: 0; transition: none; } .ss-photo .ov-dash, .ss-photo .ov-node, .ss-photo .ov-label { opacity: 1; transition: none; } }

/* ============================== HAKKEN INTELLIGENCE · AI ============================== */
/* Homepage: from thousands generated to one decision made by people */
.ai-funnel { margin: 0 0 var(--space-7); padding: var(--space-6); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.ai-funnel ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin: 0 0 var(--space-5); padding: 0; list-style: none; }
.ai-funnel li { display: grid; gap: var(--space-2); align-content: start; }
.ai-num { font-family: var(--font-display); font-size: clamp(32px, 3.4vw, 48px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ai-bar { position: relative; display: block; height: 6px; background: var(--surface-200); border-radius: var(--radius-full); overflow: hidden; }
.ai-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--accent); border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-layer); }
.ai-funnel.is-in .ai-bar::after { transform: scaleX(1); }
.ai-funnel li:nth-child(2) .ai-bar::after { transition-delay: .15s; } .ai-funnel li:nth-child(3) .ai-bar::after { transition-delay: .3s; } .ai-funnel li:nth-child(4) .ai-bar::after { transition-delay: .45s; }
.ai-what { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.ai-funnel li.is-human .ai-num { color: var(--accent-text); }
.ai-funnel li.is-human .ai-what { color: var(--ink); }
.ai-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); margin: 0; padding: 0; list-style: none; }
.ai-points li { padding-top: var(--space-5); border-top: 1px solid var(--line-strong); }
.ai-idx { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.14em; color: var(--accent-text); }
.ai-name { margin: var(--space-3) 0 var(--space-2); font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 34px; }
.ai-points p { margin: 0; max-width: 340px; font-size: 16px; line-height: 26px; color: var(--ink-muted); }

/* Platform: the four engines inside Hakken Intelligence, and what the AI does and never does */
.ai-caps { margin-top: var(--space-9); }
.ai-caps-head { margin-bottom: var(--space-6); }
.ai-caps-title { margin: var(--space-3) 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; }
.ai-cap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); margin: 0 0 var(--space-6); padding: 0; list-style: none; }
.ai-cap-grid li { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-5); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); }
.ai-cap-name { font-family: var(--font-display); font-size: 22px; line-height: 28px; color: var(--ink); }
.ai-cap-grid p { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.ai-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.ai-rule-col ul { margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.ai-rule-col li { position: relative; padding: 10px 0 10px 24px; border-top: 1px solid var(--line); font-size: 15px; line-height: 23px; }
.ai-rule-col li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent); }
.ai-rule-col.is-never li::before { background: transparent; border: 1.5px solid var(--ink-muted); }
@media (max-width: 1024px) { .ai-cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .ai-funnel { padding: var(--space-5); }
  .ai-funnel ol { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-5); }
  .ai-points, .ai-cap-grid, .ai-rules { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .ai-bar::after { transform: none; transition: none; } }

/* ============================== PROOF BAND (under the hero) ============================== */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Three results: speed, financial value, liveability. Numbers count up once as the band comes into view. */
.proof-band { position: relative; padding: var(--space-8) 0; background: var(--surface-100); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pb-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.pb { position: relative; padding-left: var(--space-5); border-left: 1px solid var(--line-strong); }
.pb::before { content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: var(--radius-full); background: var(--accent); box-shadow: var(--shadow-node); }
.pb-label { margin: 0 0 var(--space-3); color: var(--accent-text); }
.pb-figure { display: grid; gap: 4px; margin: 0 0 var(--space-3); }
.pb-num { font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 3.4vw, 52px); line-height: 1; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-unit { font-family: var(--font-display); font-size: clamp(18px, 1.5vw, 22px); line-height: 1.25; color: var(--ink); }
.pb-copy { max-width: 300px; margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
@media (max-width: 1100px) { .pb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) var(--space-8); } }
@media (max-width: 600px) {
  .pb-list { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .proof-band { padding: var(--space-7) 0; }
}

/* ============================== CLIENTS · TRUSTED BY ============================== */
/* One colour for every logo: the files are black ink on transparency, lightened in Carbon */
.clients { padding: var(--space-7) 0; border-bottom: 1px solid var(--line); }
.clients-label { margin: 0 0 var(--space-5); color: var(--ink-muted); font-weight: 500; text-align: center; }
.cl-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-6) var(--space-7); margin: 0; padding: 0; list-style: none; }
.cl-item { display: flex; align-items: center; }
.cl-logo { display: block; width: auto; max-width: 180px; object-fit: contain; opacity: .62; filter: invert(1); transition: opacity var(--duration-hover) var(--ease-standard); }
[data-theme="paper"] .cl-logo { filter: none; opacity: .58; }
.cl-item:hover .cl-logo { opacity: .9; }
.cl-word { font-family: var(--font-display); font-size: 16px; line-height: 1.1; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); opacity: .62; white-space: nowrap; }
@media (max-width: 720px) {
  .cl-list { gap: var(--space-5) var(--space-6); }
  .cl-logo { max-width: 120px; max-height: 52px; }
  .cl-word { font-size: 15px; }
}
/* Company: the Dubai AI Seal */
.credential { display: flex; align-items: center; gap: var(--space-5); margin: var(--space-6) 0 0; padding: var(--space-4); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); max-width: 460px; }
.credential img { flex: none; width: 96px; height: auto; border-radius: var(--radius-sm); }
.credential figcaption { display: grid; gap: 4px; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.credential .mono-label { margin: 0; color: var(--accent-text); }
.credential-name { font-family: var(--font-display); font-size: 20px; line-height: 26px; color: var(--ink); }

/* Homepage review: results link to their case studies; the AI funnel credits its case */
.pb-link { display: inline-block; margin-top: var(--space-3); font-size: 14px; line-height: 20px; color: var(--accent-text); text-decoration: none; }
.pb-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ai-funnel .plate-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); }
.ai-case { font-family: var(--font-sans, inherit); font-size: 14px; letter-spacing: normal; text-transform: none; text-decoration: none; }
/* the two case links in the results band line up along the bottom */
.pb { display: flex; flex-direction: column; }
.pb .pb-link { align-self: flex-start; margin-top: auto; padding-top: var(--space-3); }

/* Who We Serve as the choice: "This is us" on each chapter, and the "Viewing as" tag (proto.js) */
.who-ch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); }
.who-ch-pick { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; font: inherit; font-size: 15px; font-weight: 500;
  color: #eeece6; background: rgba(12, 14, 17, .35); border: 1px solid rgba(238, 236, 230, .55); border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: border-color .2s, color .2s, background-color .2s; }
.who-ch-pick:hover { border-color: #eeece6; }
.who-ch-pick-check { display: none; width: 14px; height: 8px; margin-top: -3px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.who-ch-pick[aria-pressed="true"] { color: var(--accent-text); border-color: var(--accent); background: rgba(12, 14, 17, .55); }
.who-ch-pick[aria-pressed="true"] .who-ch-pick-check { display: block; }
.who-ch-tag[hidden] { display: none; }
.view-chip { position: fixed; left: 50%; bottom: 20px; z-index: 45; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 16px; transform: translateX(-50%); background: var(--surface-000); border: 1px solid var(--line-strong);
  border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-size: 14px; line-height: 20px; color: var(--ink); }
.view-chip[hidden] { display: none; }
.view-chip-k { color: var(--ink-muted); }
.view-chip-role { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-chip-change { color: var(--accent-text); text-decoration: none; }
.view-chip-change:hover { text-decoration: underline; text-underline-offset: 3px; }
.view-chip-clear { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: var(--ink-muted); background: var(--surface-200); border: 0; border-radius: 50%; }
.view-chip-clear:hover { color: var(--ink); }
@media (max-width: 720px) { .view-chip { bottom: 12px; gap: 8px; padding-left: 12px; font-size: 13px; } .view-chip-k { display: none; } }

/* Decision gap · GIS card: parcels between two roads, one selected */
.da-map rect { fill: color-mix(in srgb, var(--c) 14%, transparent); stroke: color-mix(in srgb, var(--c) 70%, transparent); stroke-width: 1; }
.da-map rect.hi { fill: color-mix(in srgb, var(--c) 45%, transparent); stroke: var(--c); stroke-width: 1.4; }
.da-road { fill: none; stroke: color-mix(in srgb, var(--c) 45%, transparent); stroke-width: 1; stroke-dasharray: 4 4; }

/* Lead paragraphs never end with one word alone on the last line */
.section-lead, .page-lead { text-wrap: pretty; }
/* Headlines balance their lines, so a short last word never sits alone */
.section-title { text-wrap: balance; }

/* "Back to where you were" (case studies and use-case pages; shown by page.js when the visitor came from a link with ?from=) */
.cs-back { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 14px; line-height: 20px; color: rgba(238, 236, 230, .9);
  text-decoration: none; background: rgba(12, 14, 17, .45); border: 1px solid rgba(238, 236, 230, .3); border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: border-color .2s, color .2s; }
.cs-back:hover { color: #eeece6; border-color: rgba(238, 236, 230, .7); }
.cs-back[hidden] { display: none; }
.uc-back { margin-bottom: var(--space-5); }

/* Hakken Intelligence sits on Carbon inside the Paper homepage (data-theme="carbon" on the section) */
.section.ai { color: var(--ink); background: var(--surface-000); border-top-color: transparent; }

/* Privacy: who is responsible, under the introduction */
.legal-who { max-width: 640px; margin: var(--space-5) 0 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.legal-who a { color: var(--accent-text); }

/* Platform: the engine card icons */
.ai-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.ai-icon { display: block; width: 32px; height: 32px; color: var(--accent-text); }

/* Platform: the architecture plate, three planes with their labels in HTML at a legible size, one row per plane */
.category .cat-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.cat-fig { padding: var(--space-4); }
.cat-stack { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); align-items: stretch; }
.cat-stack-media img { display: block; width: 100%; height: auto; aspect-ratio: 857 / 775; }
.cat-layers { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); margin: 0; padding: 4% var(--space-3) 0 var(--space-3); list-style: none; }
.cat-layers li { display: grid; align-content: center; gap: 4px; }
.cat-layers .ai-idx { display: none; }
.cat-layer-name { font-family: var(--font-display); font-size: clamp(18px, 1.5vw, 22px); line-height: 1.2; color: var(--ink); }
.cat-layer-items { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.close-inner > .close-title:first-child { margin-top: 0; }
@media (max-width: 1024px) { .category .cat-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .cat-stack { grid-template-columns: minmax(0, 1fr); }
  .cat-stack-media img { max-width: 420px; margin: 0 auto; }
  .cat-layers { grid-template-rows: none; gap: var(--space-4); padding: var(--space-3) var(--space-2) var(--space-3); }
}

.page-h1:first-child { margin-top: 0; }
.close-title { text-wrap: balance; }   /* no single word left on the last line */

/* ============================== INSIGHTS · the numbered index of Decision Notes ==============================
   Text first: number, topic and reading time, title, summary, arrow. The note's image appears beside the row
   on hover or keyboard focus; on touch screens a small thumbnail sits in the row instead. */
.ni-hero { padding-bottom: var(--space-6); }
.ni-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); align-items: end; }
.ni-hero .page-h1 { margin-bottom: 0; }
.ni-hero .page-lead { max-width: 520px; }
.ni-section { padding-top: 0; border-top: 0; }
.ni-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.ni-row { border-bottom: 1px solid var(--line); }
.ni { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1.25fr) minmax(0, 1fr) 40px; gap: var(--space-6); align-items: center;
  margin: 0 calc(-1 * var(--space-5)); padding: var(--space-7) var(--space-5); color: var(--ink); text-decoration: none;
  border-radius: var(--radius-md); transition: background .25s var(--ease-standard); }
.ni-num { font-family: var(--font-display); font-size: 48px; line-height: 1; color: var(--ink-faint); transition: color .25s var(--ease-standard); }
.ni-main { display: grid; gap: 10px; }
.ni-meta { margin: 0; color: var(--ink-muted); }
.ni-title { font-family: var(--font-display); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.12; text-wrap: balance; }
.ni-dek { font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.ni-arrow { justify-self: end; font-size: 20px; color: var(--accent-text); transition: transform .25s var(--ease-standard); }
.ni-peek { position: absolute; z-index: 2; right: 72px; top: 50%; width: 280px; aspect-ratio: 16 / 10; overflow: hidden; pointer-events: none;
  background: var(--surface-200); border-radius: var(--radius-md); box-shadow: 0 24px 60px rgba(20, 24, 28, .28);
  opacity: 0; transform: translateY(-50%) rotate(-2deg) scale(.94); transition: opacity .3s var(--ease-standard), transform .4s var(--ease-layer, ease); }
.ni-peek img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ni:hover, .ni:focus-visible { background: var(--surface-100); }
.ni:hover .ni-num, .ni:focus-visible .ni-num { color: var(--accent-text); }
.ni:hover .ni-arrow, .ni:focus-visible .ni-arrow { transform: translateX(4px); }
.ni:hover .ni-peek, .ni:focus-visible .ni-peek { opacity: 1; transform: translateY(-50%) rotate(-2deg); }
.ni-dek { transition: opacity .25s var(--ease-standard); }
@media (hover: hover) and (min-width: 901px) { .ni:hover .ni-dek, .ni:focus-visible .ni-dek { opacity: 0; } }   /* the image takes the summary's place */
.ni:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* touch screens: no hover, so a small thumbnail sits in the row */
@media (hover: none) {
  .ni-peek { position: static; width: 112px; opacity: 1; transform: none; box-shadow: none; grid-column: 4; grid-row: 1; justify-self: end; }
  .ni { grid-template-columns: 80px minmax(0, 1.25fr) minmax(0, 1fr) 112px; }
  .ni-arrow { display: none; }
}
@media (max-width: 900px) {
  .ni-hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .ni { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "num main" ". dek"; gap: var(--space-3) var(--space-4); padding: var(--space-6) var(--space-4); margin: 0 calc(-1 * var(--space-4)); }
  .ni-num { grid-area: num; font-size: 34px; align-self: start; }
  .ni-main { grid-area: main; }
  .ni-dek { grid-area: dek; }
  .ni-arrow { display: none; }
  .ni-peek, .ni:hover .ni-peek { display: none; }   /* phones stay text-first: the title gets the full width */
  .ni-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .ni, .ni-num, .ni-arrow, .ni-peek { transition: none; } }
