:root {
  --paper: #ffffff;
  --paper-2: #f3f4f6;
  --ink: #15171a;          /* 17.96:1 on white */
  --muted: #545a62;        /* 6.96:1 */
  --rule: #e4e6ea;
  --accent: #0a58ca;       /* 6.44:1, links and the one primary action only */
  --accent-soft: #0a58ca;
  --serif: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16181c; --paper-2: #1f2228; --ink: #e9ebee; --muted: #9ba3ad;
    --rule: #2c3038; --accent: #7fb0ff; --accent-soft: #7fb0ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16181c; --paper-2: #1f2228; --ink: #e9ebee; --muted: #9ba3ad;
  --rule: #2c3038; --accent: #7fb0ff; --accent-soft: #7fb0ff; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); font-size: 15px; }

/* header and footer */
.site-header { border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--paper); z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.wordmark { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--ink); }
.site-footer { border-top: 1px solid var(--ink); margin-top: 120px; padding: 40px 0 56px; color: var(--muted); font-size: 15px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

/* buttons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 3px; font-size: 15px; font-weight: 500;
  background: var(--ink); color: var(--paper); text-decoration: none; border: 1px solid var(--ink);
}
.btn:hover { opacity: .88; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { border-color: var(--ink); opacity: 1; }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: end; padding-top: 72px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(48px, 7vw, 84px); font-weight: 500; letter-spacing: -0.02em; }
.tagline { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; margin: 20px 0 28px; max-width: 22em; }
.focus { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--muted); font-size: 15px; }
.focus li:not(:last-child)::after { content: "/"; margin: 0 12px; color: var(--rule); }
.contact { display: flex; gap: 10px; margin: 0; }
.hero-photo { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }

/* headline numbers */
.highlights {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.highlights div { padding: 22px 20px 24px 0; }
.highlights div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.highlights dt, .metrics dt { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 42px); line-height: 1.05; letter-spacing: -0.02em; }
.highlights dd, .metrics dd { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* sections */
.section { padding-top: 88px; }
.section > h2, .section-head h2 { font-size: 34px; }
.section > h2 { margin-bottom: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head a { font-size: 15px; white-space: nowrap; }
.lede { font-size: 19px; color: var(--muted); max-width: 40em; margin: 0; }

/* case study list */
.cases { border-top: 1px solid var(--ink); }
.case {
  display: grid; grid-template-columns: 220px 1fr 168px; gap: 32px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none;
}
.case-metric .num { display: block; font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.case-metric .lbl { display: block; color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.35; }
.case h3 { font-size: 24px; line-height: 1.25; }
.case p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.case-thumb { width: 168px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--rule); border-radius: 2px; }
.case:hover h3 { color: var(--accent); }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile { color: var(--ink); text-decoration: none; }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper-2); }
.tile-title { display: block; margin-top: 10px; font-weight: 500; }
.tile-sub { display: block; color: var(--muted); font-size: 14px; }
.tile:hover .tile-title { color: var(--accent); }

/* about */
.about .prose { max-width: 44em; }

/* prose */
.prose { max-width: 680px; }
.prose > * + * { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 30px; margin: 2em 0 .6em; }
.prose h3 { font-size: 22px; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.prose blockquote {
  margin: 1.6em 0; padding: 0 0 0 20px; border-left: 3px solid var(--accent-soft);
  font-family: var(--serif); font-size: 23px; line-height: 1.4;
}
.prose blockquote p { margin: 0 0 .3em; }
.prose img { border: 1px solid var(--rule); border-radius: 2px; margin: 1.6em 0; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--paper-2); padding: 1px 5px; border-radius: 2px; white-space: pre-wrap; }
.prose pre { background: var(--paper-2); padding: 16px 18px; border-radius: 2px; overflow-x: auto; font-size: 13px; line-height: 1.55; max-height: 520px; }
.prose pre code { background: none; padding: 0; white-space: pre; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 1.4em 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; }
.prose details { border: 1px solid var(--rule); border-radius: 2px; padding: 0 16px; margin: 0 0 10px; }
.prose details > summary { cursor: pointer; padding: 12px 0; font-weight: 500; }
.prose details[open] { padding-bottom: 12px; }

/* case study page */
.case-head { padding-top: 56px; }
.crumb { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.crumb a { color: var(--muted); }
.case-head h1 { font-size: clamp(36px, 5vw, 56px); max-width: 18em; }
.role { max-width: 44em; color: var(--muted); margin: 20px 0 32px; }
.role strong { color: var(--ink); font-weight: 600; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.metrics div { padding: 20px 20px 22px 0; }
.metrics div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.case-cover { margin: 48px auto; }
.case-cover img { border: 1px solid var(--rule); border-radius: 2px; max-height: 620px; width: 100%; object-fit: cover; object-position: top; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--ink); margin-top: 72px; padding-top: 24px; }
.pager a { color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 20px; line-height: 1.3; }
.pager a span { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pager .next { text-align: right; }
.pager a:hover { color: var(--accent); }

/* listing pages */
.page-head { padding-top: 56px; }
.page-head h1 { font-size: clamp(44px, 6vw, 68px); margin-bottom: 14px; }
.page-head + .wrap .section:first-child { padding-top: 56px; }

/* video */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; align-items: start; }
.video-grid p { margin: 0; }
.embed { position: relative; width: 100%; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-wide { aspect-ratio: 16 / 9; }
.embed-tall { aspect-ratio: 9 / 16; max-width: 340px; }
.embed-ig { height: 0; padding-bottom: calc(177.78% + 110px); max-width: 340px; }
.embed-link { display: flex; align-items: center; justify-content: center; aspect-ratio: 9 / 16; max-width: 340px; border: 1px solid var(--rule); border-radius: 2px; text-decoration: none; padding: 16px; text-align: center; }

/* design gallery */
.gallery { columns: 3 260px; column-gap: 16px; }
.gallery .shot { display: block; break-inside: avoid; margin-bottom: 16px; }
.gallery img { width: 100%; border: 1px solid var(--rule); border-radius: 2px; }
.gallery-print { columns: 1; max-width: 680px; }

/* writing */
.writing h2 { font-size: 28px; }
.writing h2:first-child { margin-top: 1em; }

/* responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 220px; gap: 32px; padding-top: 48px; }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .highlights div:nth-child(3) { padding-left: 0; border-left: 0; }
  .highlights div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .case { grid-template-columns: 180px 1fr; }
  .case-thumb { display: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .wordmark { font-size: 18px; }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: 14px; }
  .header-inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 40px; }
  .hero-photo { order: -1; width: 160px; }
  .case { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
  .case-metric { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .case-metric .num { font-size: 30px; }
  .case-metric .lbl { margin-top: 0; }
  .case h3 { font-size: 21px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .section { padding-top: 64px; }
  .section > h2, .section-head h2 { font-size: 28px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .prose blockquote { font-size: 20px; }
}

/* ---------- v2 additions ---------- */
html { scroll-padding-top: 84px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 3px; }
.skip:focus { left: 16px; }
.site-header { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.header-inner { gap: 20px; }
.site-header nav { margin-left: auto; }
.theme-toggle { flex: none; width: 34px; height: 34px; border: 1px solid var(--rule); background: transparent; border-radius: 3px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme-toggle span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.theme-toggle:hover { border-color: var(--ink); }
.footer-big { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); color: var(--ink); line-height: 1.2; margin: 0 0 8px !important; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); }

/* filters: plain text tabs */
.filters { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0 0 18px; }
.filters button { background: none; border: 0; padding: 6px 0; font: 500 15px var(--sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent-soft); }
.count { font-variant-numeric: tabular-nums; }
.section-lede { margin: -8px 0 28px; }
.case[hidden], .article[hidden] { display: none; }

/* apps */
.app-feature { margin-bottom: 8px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; color: var(--ink); text-decoration: none; padding-bottom: 40px; border-bottom: 1px solid var(--rule); }
.app-feature img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--rule); border-radius: 2px; }
.app-feature h3 { font-size: 34px; }
.app-feature p { color: var(--muted); margin: 10px 0 20px; }
.app-feature .more { display: inline-block; margin-top: 20px; color: var(--accent); font-weight: 500; font-size: 15px; }
.app-feature:hover h3 { color: var(--accent); }
.metrics-compact { grid-template-columns: repeat(3, 1fr); }
.metrics-compact div { padding: 14px 12px 14px 0; }
.metrics-compact div + div { padding-left: 12px; }
.metrics-compact dt { font-size: 26px; }
.metrics-compact dd { font-size: 13px; }
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.app { display: block; color: var(--ink); text-decoration: none; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.app h3 { font-size: 22px; }
.app p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.app .app-stack { font-size: 13px; margin-top: 10px; }
.app:hover h3 { color: var(--accent); }
.app-links { margin-top: 24px; }

/* experience */
.xp { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.xp li { display: grid; grid-template-columns: 1.1fr 1.6fr auto; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.xp-org { font-family: var(--serif); font-size: 21px; }
.xp-role { color: var(--muted); }
.xp-when { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* writing */
.mini-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.mini-list li { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.mini-list a { color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 20px; line-height: 1.3; }
.mini-list a:hover { color: var(--accent); }
.mini-list span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.writing-wrap { padding-top: 40px; }
.writing-wrap .section-head { margin-bottom: 8px; }
.articles { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.article { display: grid; grid-template-columns: 1fr 220px; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.article a { color: var(--ink); text-decoration: none; }
.a-title { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.a-note { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.article a:hover .a-title { color: var(--accent); }
.a-meta { color: var(--muted); font-size: 14px; text-align: right; }

/* case study layout with contents list */
.case-body.has-toc { display: grid; grid-template-columns: 200px minmax(0, 680px); gap: 64px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; max-height: calc(100vh - 120px); overflow-y: auto; }
.toc p { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--rule); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc li a:hover { color: var(--ink); }
.toc li a[aria-current] { color: var(--ink); border-left-color: var(--accent-soft); }
.crumb .dot { margin: 0 4px; }
.prose img.zoomable { cursor: zoom-in; }

/* listing pages jump nav */
.jump { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 15px; }
.jump a { color: var(--muted); text-decoration: none; }
.jump a:hover { color: var(--ink); text-decoration: underline; }

/* YouTube facade */
.yt { display: block; padding: 0; border: 0; cursor: pointer; width: 100%; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; transform: translate(-50%, -50%); background: rgba(20, 20, 18, .82); border-radius: 8px; transition: background .15s; }
.yt .play::after { content: ""; position: absolute; left: 26px; top: 13px; border-left: 16px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.yt:hover .play { background: #c4302b; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(10, 10, 8, .9); }
.lightbox img { max-width: 88vw; max-height: 86vh; object-fit: contain; cursor: zoom-out; }
.lightbox button { position: fixed; background: var(--paper); color: var(--ink); border: 0; border-radius: 3px; padding: 8px 14px; font: 500 14px var(--sans); cursor: pointer; }
.lb-close { top: 16px; right: 16px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 18px !important; padding: 10px 14px !important; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

@media (max-width: 1060px) {
  .case-body.has-toc { display: block; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .site-header nav { gap: 16px; }
  .apps { grid-template-columns: 1fr; }
  .app-feature { grid-template-columns: 1fr; gap: 20px; }
  .xp li { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .xp-role { grid-column: 1 / -1; grid-row: 2; }
  .article { grid-template-columns: 1fr; gap: 4px; }
  .a-meta { text-align: left; }
}
@media (max-width: 640px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; }
  .site-header nav { grid-column: 1 / -1; margin-left: 0; }
  .theme-toggle { grid-row: 1; grid-column: 2; }
  html { scroll-padding-top: 110px; }
  .mini-list li { flex-direction: column; gap: 2px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .footer-links { gap: 16px; }
}
.embed-video { display: block; width: 100%; max-width: 340px; border-radius: 2px; background: #000; margin: 1.6em 0; }
.app-nocover { display: grid; place-items: center; aspect-ratio: 16 / 10; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper-2); font-family: var(--serif); font-size: 34px; color: var(--muted); }
.bars { margin: 1.8em 0; padding: 20px 0 6px; border-top: 1px solid var(--ink); }
.bar-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; gap: 14px; align-items: center; margin-bottom: 12px; font-size: 14px; }
.bar-label { color: var(--ink); line-height: 1.3; }
.bar-track { height: 14px; background: var(--paper-2); border-radius: 1px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent-soft); }
.bar-val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 4.5em; text-align: right; }
.bars figcaption { color: var(--muted); font-size: 13px; margin-top: 10px; }
span.case-thumb { display: block; width: 168px; aspect-ratio: 16 / 10; }
@media (max-width: 640px) { .bar-row { grid-template-columns: 1fr auto; } .bar-label { grid-column: 1 / -1; } }
.prose .slides { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 1.6em 0; }
.prose .slides p { display: contents; }
.prose .slides img { margin: 0; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 640px) { .prose .slides { grid-template-columns: repeat(3, 1fr); } }
.tiles-5 { grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 900px) { .tiles-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .tiles-5 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- v3 navigation ---------- */
.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; color: var(--muted); font: 500 14px var(--sans); cursor: pointer; }
.search-btn:hover { border-color: var(--ink); color: var(--ink); }
.search-ico { width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.search-ico::after { content: ""; position: absolute; width: 5px; height: 1.5px; background: currentColor; right: -4px; bottom: -2px; transform: rotate(45deg); }
kbd { font: 500 11px var(--sans); color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 1px 5px; background: var(--paper-2); }
.menu-btn { display: none; height: 34px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: var(--paper); font: 500 14px var(--sans); cursor: pointer; }
.site-header nav a { position: relative; padding: 4px 0; }
.site-header nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--accent-soft); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--ink); }

/* finder */
.finder { border: 0; padding: 0; background: transparent; width: min(640px, calc(100vw - 32px)); margin-top: 12vh; }
.finder::backdrop { background: rgba(10, 10, 8, .55); }
.finder-box { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 20px 50px rgba(0, 0, 0, .18); overflow: hidden; }
.finder input { width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: 18px 20px; font: 400 18px var(--sans); background: var(--paper); color: var(--ink); outline: none; }
.finder-results { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.finder-results a { display: grid; grid-template-columns: 92px 1fr; gap: 2px 12px; padding: 10px 12px; border-radius: 3px; color: var(--ink); text-decoration: none; }
.finder-results li[aria-selected="true"] a, .finder-results a:hover { background: var(--paper-2); }
.f-kind { grid-row: span 2; font-size: 12px; color: var(--muted); padding-top: 3px; }
.f-title { font-weight: 500; line-height: 1.3; }
.f-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-empty { padding: 16px 12px; color: var(--muted); }
.finder-hint { margin: 0; padding: 10px 16px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.finder-hint kbd { margin-right: 2px; }

/* list search */
.list-search { width: 100%; max-width: 420px; padding: 10px 12px; margin: 0 0 14px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); color: var(--ink); font: 400 15px var(--sans); }
.list-search:focus { border-color: var(--ink); outline: none; }

/* homepage duo */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.duo-card { color: var(--ink); text-decoration: none; }
.collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; aspect-ratio: 16 / 10; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; background: var(--paper-2); }
.collage img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.duo-card:hover .tile-title { color: var(--accent); }
.duo-card .tile-title { font-family: var(--serif); font-size: 24px; margin-top: 12px; font-weight: 500; }

/* related */
.related { margin-top: 72px; }
.related h2 { font-size: 26px; margin-bottom: 16px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid var(--ink); padding-top: 20px; }
.rel { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.rel-num { font-family: var(--serif); font-size: 30px; line-height: 1; }
.rel-title { font-weight: 500; line-height: 1.35; }
.rel-sub { color: var(--muted); font-size: 14px; }
.rel:hover .rel-title { color: var(--accent); }
.related + .pager { margin-top: 48px; }

/* about page */
.about-head { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: end; }
.about-head .contact { margin-top: 24px; }
.about-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 2px; }

/* reading progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent-soft); transform-origin: left; transform: scaleX(0); z-index: 30; pointer-events: none; }

@media (max-width: 900px) {
  .search-btn kbd, .search-label { display: none; }
  .rel-grid { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .header-inner { display: flex !important; flex-direction: row !important; align-items: center !important; height: 56px !important; padding-top: 0 !important; padding-bottom: 0 !important; }
  .menu-btn { display: inline-block; }
  .site-header nav { display: none; }
  body.menu-open .site-header nav {
    display: flex; flex-direction: column; gap: 0; position: fixed; inset: 56px 0 0 0; background: var(--paper);
    padding: 12px 16px; z-index: 40; overflow-y: auto; margin: 0;
  }
  body.menu-open .site-header nav a { font-family: var(--serif); font-size: 30px; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--rule); }
  body.menu-open .site-header nav a[aria-current]::after { display: none; }
  body.menu-open .site-header nav a[aria-current] { color: var(--accent); }
  body.menu-open { overflow: hidden; }
  html { scroll-padding-top: 72px; }
  .about-head { grid-template-columns: 1fr; }
  .about-photo { width: 160px; order: -1; }
}
body.menu-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* ---------- v4: researched direction (white, ink, one blue, one grotesk) ---------- */
:root { --chart: #3d434b; }
:root[data-theme="dark"] { --chart: #c3c9d1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart: #c3c9d1; } }
body { font-size: 17px; line-height: 1.6; font-feature-settings: "tnum" 0; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; }
.hero h1 { font-weight: 700; letter-spacing: -0.035em; font-size: clamp(44px, 6.4vw, 76px); }
.tagline { font-family: var(--sans); font-weight: 400; font-size: clamp(20px, 2.2vw, 25px); line-height: 1.4; color: var(--ink); margin: 18px 0 30px; max-width: 26em; }
.highlights dt, .metrics dt, .case-metric .num, .rel-num, .metrics-compact dt { font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.highlights dt, .metrics dt { font-size: clamp(28px, 3vw, 38px); }
.case-metric .num { font-size: 34px; }
.case h3, .a-title, .mini-list a, .xp-org, .pager a, .duo-card .tile-title, .app h3, .app-feature h3 { font-weight: 600; letter-spacing: -0.015em; }
.case h3 { font-size: 21px; }
.a-title { font-size: 19px; }
.btn { background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 2px; font-weight: 600; }
:root[data-theme="dark"] .btn { color: #0d1117; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #0d1117; } }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.text-link { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
.text-link:hover { text-decoration-color: var(--ink); }
.contact { align-items: center; gap: 22px; }
.bar-fill { background: var(--chart); }
.filters button[aria-pressed="true"] { border-bottom-color: var(--ink); }
.toc li a[aria-current] { border-left-color: var(--ink); }
.site-header nav a[aria-current]::after { background: var(--ink); }
.prose blockquote { font-family: var(--sans); font-size: 21px; font-weight: 500; border-left: 2px solid var(--ink); letter-spacing: -0.01em; }
.footer-big { font-weight: 650; letter-spacing: -0.02em; }
.case-thumb, .tile img, .app img, .app-feature img, .collage, .case-cover img, .prose img, .gallery img { border-radius: 2px; }
.finder-box { box-shadow: none; border-color: var(--ink); }
.case:hover h3, .rel:hover .rel-title, .tile:hover .tile-title, .duo-card:hover .tile-title, .app:hover h3, .app-feature:hover h3, .mini-list a:hover, .article a:hover .a-title, .pager a:hover { color: var(--accent); }
.header-email { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; padding: 0 4px; }
.header-email:hover { color: var(--accent); }
.home-contact { border-top: 1px solid var(--ink); margin-top: 88px; padding-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.home-contact h2 { font-size: 28px; margin: 0 0 12px; }
.home-contact p { margin: 0 0 14px; color: var(--muted); }
.progress { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: none !important; }
  .header-inner { display: grid !important; grid-template-columns: 1fr auto; height: auto !important; padding-top: 10px !important; padding-bottom: 10px !important; row-gap: 6px; }
  .site-header nav { display: flex !important; grid-column: 1 / -1; position: static !important; gap: 20px; margin: 0; }
  .header-email { display: none; }
  html { scroll-padding-top: 100px; }
  .home-contact { grid-template-columns: 1fr; }
}
.hero { align-items: center; }
.site-footer { margin-top: 96px; padding: 28px 0 40px; }
.footer-inner { align-items: center; }
.footer-id { margin: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.footer-id span { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .header-tools { grid-row: 1; grid-column: 2; } }
.case-gap { height: 48px; }
main .case-head, main .page-head { padding-top: 48px; } @media (max-width: 640px) { main .case-head, main .page-head { padding-top: 32px; } }
.shorts-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 20px; }
.shorts-grid .embed-tall { max-width: none; }
.video-grid + p, .shorts-grid + p { margin-top: 18px; }
.yt.embed-tall img { object-fit: cover; }
@media (max-width: 760px) {
  .site-header nav { overflow-x: auto; scrollbar-width: none; gap: 18px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 24px; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .header-email { display: inline !important; font-size: 14px; }
}
.shorts-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.video-grid.two { grid-template-columns: repeat(2, 1fr); }
.contact { flex-wrap: wrap; row-gap: 12px; }
.contact .btn, .contact .text-link { white-space: nowrap; }
@media (max-width: 640px) { .video-grid.two { grid-template-columns: 1fr; } .shorts-grid { grid-template-columns: repeat(3, 1fr); } }
