/* talel-romdhan.dev: the site's own layer over the design kit (system.css and friends).
   Identity: limestone and sea. Instrument Serif for headlines, Schibsted Grotesk for text,
   JetBrains Mono for labels. One warm accent for the things that are live. */

/* ---------------------------------------------------------------- type, self-hosted */
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/instrument-serif-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/instrument-serif-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/schibsted-grotesk-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('fonts/jetbrains-mono-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------------------------------------------------------------- palette: limestone and sea */
:root {
  color-scheme: light;
  --p-bg: #f5f2ea; --p-surface: #ebe6da; --p-ink: #0f1c26; --p-muted: #56626c;
  --p-accent: #1d4e89; --p-accent-ink: #ffffff; --p-action: #1d4e89; --p-action-ink: #ffffff;
  --p-inv-bg: #0b141b; --p-inv-surface: #14212b; --p-inv-ink: #f5f2ea; --p-inv-muted: #94a1a9;
  --p-inv-accent: #8dbbee; --p-inv-accent-ink: #0b141b; --p-inv-action: #f5f2ea; --p-inv-action-ink: #0b141b;
  --warm: #c2602b;
  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.012em;
  --display-tracking-xl: -0.018em;
  --ly-scale: 1.24;
  --t-h2: clamp(34px, 2.1vw + 26px, 58px);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --p-bg: #0b141b; --p-surface: #121e28; --p-ink: #efeae0; --p-muted: #8f9ca5;
  --p-accent: #8dbbee; --p-accent-ink: #0b141b; --p-action: #8dbbee; --p-action-ink: #0b141b;
  --p-inv-bg: #060b10; --p-inv-surface: #101a22; --p-inv-ink: #efeae0; --p-inv-muted: #8f9ca5;
  --p-inv-accent: #8dbbee; --p-inv-accent-ink: #0b141b; --p-inv-action: #efeae0; --p-inv-action-ink: #0b141b;
  --warm: #e3915a;
}

/* ---------------------------------------------------------------- base */
@view-transition { navigation: auto; }
html { scroll-behavior: smooth; scroll-padding-top: 0; }
body { background: var(--bg); transition: background-color .3s ease, color .3s ease; }
::selection { background: color-mix(in oklab, var(--accent) 24%, transparent); }
h1, h2, .t-h1, .t-h2 { font-synthesis: none; }
h1 em, h2 em { font-style: italic; }
h2, .t-h2 { line-height: 1.04; }
.mono, .chapter__label, .rail, .close__label, .kbar__hint, .hero__mcp { font-family: var(--font-mono); }
/* tabular figures widen commas in this face: proportional figures wherever a value is text */
.rows__value, .ui { font-variant-numeric: proportional-nums; font-feature-settings: normal; }
.linklike { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.linklike:hover { text-decoration-color: currentColor; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 0 color-mix(in oklab, var(--warm) 60%, transparent); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--warm) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* ---------------------------------------------------------------- nav */
.nav__logo { font-size: 25px; letter-spacing: -0.01em; }
.nav__logo .mark--initial { font-family: var(--font-text); font-weight: 600; }
.icon-btn { appearance: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--ink); cursor: pointer; transition: background-color .2s ease; }
.icon-btn:hover { background: color-mix(in oklab, var(--ink) 8%, transparent); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .i-moon, :root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }
.kbar__hint { appearance: none; display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--muted); font-size: 12px; cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.kbar__hint:hover { color: var(--ink); border-color: color-mix(in oklab, var(--ink) 40%, transparent); }
.kbar__hint kbd { font: inherit; padding: 2px 6px; border-radius: 6px; background: color-mix(in oklab, var(--ink) 8%, transparent); color: var(--ink); }
.nav__actions { gap: var(--s-3); }
@media (max-width: 1023px) { .kbar__hint { display: none; } }
@media (max-width: 639px) { .nav.is-open .nav__actions .icon-btn { order: 3; align-self: center; } }

/* ---------------------------------------------------------------- hero */
@media (min-width: 1024px) {
  .hero--product .hero__head { grid-template-rows: auto auto; row-gap: var(--s-4); }
  .hero--product .hero__head > :first-child { display: contents; }
  .hero--product .hero__head h1 { grid-column: 1 / span 7; grid-row: 1 / span 2; align-self: end; margin: 0; }
  .hero--product .hero__head .hero__lead { grid-column: 9 / -1; grid-row: 1; align-self: end; margin: 0; max-width: none; }
  .hero--product .hero__head > .hero__actions { grid-column: 9 / -1; grid-row: 2; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero--product .hero__head h1 { grid-column: 1 / span 6; }
  .hero--product .hero__head .hero__lead, .hero--product .hero__head > .hero__actions { grid-column: 7 / -1; }
}
.hero--product h1 { line-height: .96; }
.hero--product h1 em { color: var(--muted); }
.hero__actions { display: grid; gap: var(--s-4); }
.hero__mcp { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.hero__mcp .linklike { color: var(--ink); }
/* four real numbers on one ruled row */
.hero__proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); margin: var(--s-6) 0 0; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.hero__proof > div { display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; }
.hero__proof dd { margin: 0; font: var(--display-weight) clamp(30px, 1.9vw + 10px, 42px)/1 var(--font-display); letter-spacing: -0.01em; }
.hero__proof dt { font-size: var(--t-small); line-height: 1.4; color: var(--muted); }
.hero--product .hero__proof + .hero__stage { margin-top: var(--s-6); }
/* inside the visual: the app window on the lit stage, cut by the stage's foot */
.hero__stage .app.ui { position: absolute; left: 40px; right: 40px; top: 40px; bottom: -48px; margin: 0; }
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); overflow: hidden; }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > [data-ui] { width: 100%; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
.app .ui-win__who { font-family: var(--font-mono); font-size: 12px; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .hero__proof { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-4); }
  .hero__stage .app.ui { left: 24px; right: 24px; top: 24px; }
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 196px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .hero--product h1 { font-size: 46px; }
  .hero__actions { gap: var(--s-3); }
  .hero__proof { margin-top: var(--s-5); padding-top: var(--s-4); gap: var(--s-3) var(--s-4); }
  .hero__proof dd { font-size: 28px; }
  .hero__proof dt { font-size: 13px; }
  .hero--product .hero__stage { aspect-ratio: auto; height: auto; flex: 1 1 auto; min-height: 180px; }
  .hero--product .hero__proof + .hero__stage { margin-top: var(--s-5); }
  .hero__stage .app.ui { left: 16px; right: 16px; top: 16px; }
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}

/* ---------------------------------------------------------------- section rhythm
   sections take their content's height (Talel's call over the kit's one-screen rule) */
html body main > section.section:not(.hero), html body footer.closing { height: auto; min-height: 0; padding: 120px 0 16px; }
html body main > section.section:not(.hero) > .wrap, html body footer.closing > .wrap { height: auto; }
html body main > section.section.g2 > .wrap { grid-template-rows: auto auto; row-gap: var(--s-5); }
html body main > section.section.ground-surface:not(.hero), html body main > section.section.ground-inverse:not(.hero) { padding-bottom: 120px; margin-top: 104px; }
html body footer.closing .closing__links { margin-top: var(--s-9); }
@media (max-width: 639px) {
  html body main > section.section:not(.hero), html body footer.closing { padding: 88px 0 8px; }
  html body main > section.section.ground-surface:not(.hero), html body main > section.section.ground-inverse:not(.hero) { padding-bottom: 88px; margin-top: 64px; }
}

/* ---------------------------------------------------------------- chapters */
.chapter__label { display: flex; align-items: center; gap: var(--s-3); margin: 0; font-size: 12px; letter-spacing: .01em; color: var(--muted); }
.chapter__num { font-size: 12px; color: var(--ink); padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; }
.chapter .t-lead { margin: 0; align-self: end; }
#work .chapter { margin-bottom: var(--s-7); }
#work .panel { --p-h: 336px; }
@media (min-width: 1024px) and (max-width: 1279px) { #work .panel { --p-h: 320px; } }
@media (max-width: 639px) { #work .panel { --p-h: 170px; } }
.more { display: inline-flex; margin-top: var(--s-2); }

/* ---------------------------------------------------------------- Carte: the dark band, phones that scroll their real menus */
#carte .phones { margin-top: var(--s-8); }
.phones__hint { display: flex; align-items: center; gap: 10px; margin: var(--s-8) 0 calc(-1 * var(--s-5)); font: 12px/1.4 var(--font-mono); color: var(--muted); }
/* a phone: a still first screen, the banner video over it, the storefront's own interface over that,
   then the menu. The reel slides up on hover to scroll the menu. */
.phones__hint .phones__pause { margin-left: auto; color: var(--ink); }
.phone { position: relative; display: block; aspect-ratio: 390 / 844; overflow: hidden; border-radius: 30px; border: 6px solid #1c1f22; background: #1c1f22; box-shadow: 0 0 0 1px rgb(255 255 255 / .16), 0 30px 60px -20px rgb(0 0 0 / .55); container-type: size; }
.phone__reel { display: block; transform: translateY(0); transition: transform 1.1s cubic-bezier(.22, 1, .36, 1); will-change: transform; }
.phone__screen { position: relative; aspect-ratio: 390 / 844; overflow: hidden; }
.phone__poster, .phone__overlay { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.phone__video { position: absolute; display: block; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.phone__video.is-on { opacity: 1; }
.phone__menu { display: block; width: 100%; height: auto; }
.phone__link { position: absolute; inset: 0; z-index: 2; border-radius: 24px; }
.phone__link:focus-visible { outline: 2px solid #8dbbee; outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) {
  .phone:hover .phone__reel, .phone:focus-within .phone__reel { transform: translateY(calc(-100% + 100cqh)); transition: transform 16s linear; }
}
.phone.is-playing .phone__reel { transform: translateY(calc(-100% + 100cqh)); transition: transform 16s linear; }
#carte .carte-notes { margin-top: var(--s-8); row-gap: var(--s-6); }
#carte .carte-notes p { color: color-mix(in oklab, var(--ink) 80%, transparent); max-width: 40ch; }
#carte .more { margin-top: var(--s-7); }
@media (max-width: 1023px) { .phones > .phone { grid-column: span 6; } #carte .carte-notes > div { grid-column: 1 / -1; } }
@media (max-width: 639px) { .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); } .phones > .phone { grid-column: auto; border-width: 4px; border-radius: 22px; } .phone__link { border-radius: 18px; } .phones__hint { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- Sousse: the local time beside the type */
#based .based { align-items: end; }
#based .clock { display: grid; gap: var(--s-4); padding-bottom: var(--s-4); }
.clock__now { display: flex; align-items: baseline; gap: var(--s-3); margin: 0; }
.clock__time { font: var(--display-weight) 72px/1 var(--font-display); letter-spacing: -0.01em; }
.clock__place { display: inline-flex; align-items: center; gap: 8px; font: 12px/1.4 var(--font-mono); color: var(--muted); }
.clock__rows { list-style: none; margin: 0; padding: 0; }
.clock__rows li { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s-4); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.clock__rows li > :last-child { color: var(--muted); min-width: 10ch; text-align: right; }
.clock__t { font-family: var(--font-mono); font-size: 13px; }
.clock__note { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 1023px) { #based .based > * { grid-column: 1 / -1; } #based .clock { margin-top: var(--s-6); max-width: 440px; } }

/* ---------------------------------------------------------------- Zouari School */
@media (min-width: 1024px) { #zouari .frame--split { aspect-ratio: 1 / 1; } }
@media (max-width: 1023px) { #zouari .frame--split { aspect-ratio: 16 / 9; } }
.shot { display: block; width: 980px; max-width: none; height: auto; border-radius: 12px 0 0 0; box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .10); }
.shot.shot--small { width: 300px; border-radius: 10px; }
@media (max-width: 1023px) { .shot { width: 760px; } }
@media (max-width: 639px) {
  .shot { width: 520px; }
  .shot.shot--small { display: none; }
  :is(#carte, #zouari) .rows > li { grid-template-columns: minmax(0, 1fr); }
  :is(#carte, #zouari) .rows__value { grid-column: 1; grid-row: auto; text-align: left; max-width: none; white-space: normal; color: var(--muted); }
}

/* ---------------------------------------------------------------- experience, principles, credentials */
.portrait { aspect-ratio: 4 / 5; }
#experience .rows__name { font-size: 18px; }
#experience .rows > li > p { font-size: 16px; color: var(--muted); }
#experience .rows__value { font-size: 16px; }
.creds { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--s-6) 0 0; padding: 0; list-style: none; }
.creds li { font: 12px/1.3 var(--font-mono); padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); }
.principles { margin-top: var(--s-9); padding-top: var(--s-7); border-top: 1px solid var(--line); row-gap: var(--s-6); }
.principles h3 { font: var(--display-weight) 30px/1.1 var(--font-display); letter-spacing: -0.01em; margin: 0 0 var(--s-2); }
.principles p { margin: 0; max-width: 34ch; color: color-mix(in oklab, var(--ink) 84%, transparent); }
@media (max-width: 1023px) { .principles > div { grid-column: 1 / -1; } }
@media (max-width: 639px) { #experience .portrait { display: none; } }

/* ---------------------------------------------------------------- the close: contact left, hiring questions right */
.close--split h2 { margin: 0 0 var(--s-5); }
.close__email { margin: 0; font: var(--display-weight) clamp(26px, 1.6vw + 12px, 36px)/1.2 var(--font-display); letter-spacing: -0.005em; overflow-wrap: anywhere; }
.close__email a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--line-strong); }
.close__email a:hover { text-decoration-color: currentColor; }
.close__note { margin: 0; color: var(--muted); }
.close--split .btn-row { margin-top: var(--s-4); }
.close__label { margin: 0 0 var(--s-5); font-size: 12px; color: var(--muted); }
@media (max-width: 1023px) { .close--split .grid > * { grid-column: 1 / -1; } .close--split #faq { margin-top: var(--s-8); } }

/* ---------------------------------------------------------------- the rail: chapters as events down the left margin */
.rail { position: fixed; z-index: 9; left: 22px; top: 50%; transform: translateY(-50%); display: none; mix-blend-mode: difference; color: #fff; font-size: 10px; line-height: 1; }
.rail ol { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.rail ol::before { content: ""; position: absolute; left: 3px; top: 12px; bottom: 12px; width: 1px; background: currentColor; opacity: .28; }
.rail a { position: relative; display: flex; align-items: center; gap: 10px; height: 26px; color: inherit; text-decoration: none; opacity: .5; transition: opacity .25s ease; }
.rail a::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; transform: scale(.55); transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.rail a span { opacity: 0; transform: translateX(-4px); transition: opacity .25s ease, transform .25s ease; white-space: nowrap; }
.rail a:hover, .rail a:focus-visible, .rail a[aria-current="true"] { opacity: 1; }
.rail a:hover span, .rail a:focus-visible span, .rail a[aria-current="true"] span { opacity: 1; transform: none; }
.rail a[aria-current="true"]::before { transform: scale(1); }
.rail__pulse { position: fixed; z-index: 9; left: 22px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--warm); display: none; pointer-events: none; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.rail__pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 color-mix(in oklab, var(--warm) 70%, transparent); }
.rail__pulse.is-firing::after { animation: fire .7s ease-out; }
@keyframes fire { from { box-shadow: 0 0 0 0 color-mix(in oklab, var(--warm) 70%, transparent); } to { box-shadow: 0 0 0 12px transparent; } }
@media (min-width: 1280px) { .rail { display: block; } .rail__pulse { display: block; } }

/* ---------------------------------------------------------------- dialogs: connect Claude, and the Ctrl K palette */
dialog.sheet { width: min(100% - 32px, 620px); max-height: min(100dvh - 48px, 760px); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: 0 40px 80px -30px rgb(0 0 0 / .5); overflow: auto; }
dialog.sheet::backdrop { background: rgb(8 14 19 / .5); backdrop-filter: blur(3px); }
.sheet__in { padding: 32px; display: grid; gap: var(--s-5); }
.sheet__head { display: flex; align-items: start; justify-content: space-between; gap: var(--s-4); }
.sheet h2 { font-size: 38px; margin: 0; }
.sheet p { margin: 0; }
.sheet__step { display: grid; gap: 10px; }
.sheet__step h3 { margin: 0; font: 500 16px/1.4 var(--font-text); letter-spacing: 0; }
.copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: color-mix(in oklab, var(--ink) 4%, var(--bg)); }
.copy code { font: 13px/1.5 var(--font-mono); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.copy button { appearance: none; height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: var(--ink); color: var(--bg); font: 500 13px/1 var(--font-text); cursor: pointer; }
.copy button[data-done] { background: var(--action); color: var(--action-ink); }
.sheet__tools { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.sheet__tools li { display: grid; grid-template-columns: 11.5em minmax(0, 1fr); gap: var(--s-4); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sheet__tools code { font: 12.5px/1.6 var(--font-mono); }
.sheet__tools span { color: var(--muted); }
@media (max-width: 639px) { .sheet__in { padding: 24px 20px; } .sheet h2 { font-size: 32px; } .sheet__tools li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

dialog.kbar { width: min(100% - 32px, 560px); margin-top: 14vh; padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: 0 40px 80px -30px rgb(0 0 0 / .5); overflow: hidden; }
dialog.kbar::backdrop { background: rgb(8 14 19 / .45); backdrop-filter: blur(3px); }
.kbar input { display: block; width: 100%; height: 56px; padding: 0 20px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: 17px/1 var(--font-text); outline: none; }
.kbar input::placeholder { color: var(--muted); }
.kbar ul { list-style: none; margin: 0; padding: 8px; max-height: min(52vh, 420px); overflow: auto; }
.kbar li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 10px 12px; border-radius: 10px; font-size: 15px; cursor: pointer; }
.kbar li small { font: 11px/1 var(--font-mono); color: var(--muted); }
.kbar li[aria-selected="true"] { background: color-mix(in oklab, var(--ink) 8%, transparent); }
.kbar__empty { padding: 20px; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- case-study pages */
.case { padding: calc(var(--nav) + 72px) 0 0; }
.case__back { display: inline-flex; align-items: center; gap: 8px; font: 12px/1.4 var(--font-mono); color: var(--muted); text-decoration: none; }
.case__back:hover { color: var(--ink); }
.case__head { display: grid; gap: var(--s-5); margin-top: var(--s-6); }
.case__head h1 { font-size: clamp(46px, 4.6vw + 18px, 96px); line-height: .98; max-width: 14ch; margin: 0; }
.case__lead { font-size: clamp(18px, .5vw + 15px, 22px); line-height: 1.5; max-width: 56ch; margin: 0; }
.case__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); margin: var(--s-7) 0 0; padding: var(--s-5) 0 0; border-top: 1px solid var(--line); }
.case__meta dt { font: 12px/1.4 var(--font-mono); color: var(--muted); margin-bottom: 6px; }
.case__meta dd { margin: 0; font-size: 16px; line-height: 1.45; }
.case__band { margin-top: var(--s-9); padding: var(--s-9) 0; }
.case__band .phones { margin-top: 0; }
.case__band .phones__hint { margin: 0 0 var(--s-5); }
.case__shot { margin-top: var(--s-9); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.case__shot img { display: block; width: 100%; height: auto; }
.case__sec { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter, 24px); padding: var(--s-8) 0; border-top: 1px solid var(--line); }
.case__sec:first-of-type { margin-top: var(--s-9); }
.case__sec > h2 { grid-column: 1 / span 4; font-size: clamp(30px, 1.4vw + 20px, 44px); line-height: 1.05; margin: 0; }
.case__sec > .prose { grid-column: 6 / -1; }
.prose { display: grid; gap: var(--s-4); font-size: 18px; line-height: 1.6; max-width: 64ch; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 1.1em; display: grid; gap: 8px; }
.prose strong { font-weight: 500; }
.prose code { font: .86em/1.4 var(--font-mono); padding: 2px 6px; border-radius: 6px; background: color-mix(in oklab, var(--ink) 7%, transparent); }
.case__fig { position: relative; margin: var(--s-3) 0 0; height: 340px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.case__fig .dg { position: absolute; inset: 0; height: 100%; }
.case__next { margin-top: var(--s-9); padding: var(--s-9) 0 var(--s-9); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-6); }
.case__next a.next { display: grid; gap: 10px; text-decoration: none; color: inherit; }
.case__next a.next span { font: 12px/1.4 var(--font-mono); color: var(--muted); }
.case__next a.next strong { font: var(--display-weight) clamp(34px, 2.6vw + 14px, 60px)/1 var(--font-display); letter-spacing: -0.012em; }
.case__next a.next:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }
.case-foot { padding: var(--s-6) 0 var(--s-7); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); font-size: 14px; color: var(--muted); }
.case-foot a { color: var(--ink); }
@media (max-width: 1023px) {
  .case__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case__sec { display: block; }
  .case__sec > h2 { margin-bottom: var(--s-5); }
}
@media (max-width: 639px) { .case { padding-top: calc(var(--nav) + 40px); } .prose { font-size: 17px; } .case__fig { height: 300px; } .case__band { padding: var(--s-8) 0; } }

/* ---------------------------------------------------------------- less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot, .rail__pulse.is-firing::after { animation: none; }
  .phone__reel, .phone:hover .phone__reel, .phone:focus-within .phone__reel, .phone.is-playing .phone__reel { transition: none; transform: none; }
  .phone__video { transition: none; }
  .rail__pulse { transition: none; }
  @view-transition { navigation: none; }
}

/* the phones' hint: one sentence for a mouse, a play control for touch */
.touch-only { display: none; }
@media (hover: none) { .hover-only { display: none; } .touch-only { display: inline; } }
.links { display: grid; gap: 6px; justify-items: start; }
.wrap > .link, .wrap > .more { align-self: flex-start; }

/* the hero's actions keep the column's full width when the head stacks; the hero grows instead of overflowing */
.hero__actions { width: 100%; }
@media (max-width: 1023px) {
  html body main > section.hero { height: auto; min-height: 100svh; }
  .hero--product .hero__stage { min-height: 380px; }
}
@media (max-width: 639px) {
  .hero__actions .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero__actions .btn-row .btn { width: 100%; padding-inline: 10px; }
  .hero--product .hero__stage { min-height: 300px; }
  .creds li { border-radius: 14px; }
}
@media (max-width: 1023px) { .hero__head > .hero__actions { grid-column: 1 / -1; } }
@media (max-width: 1023px) { .app .ui-win__who { font-size: 11px; letter-spacing: -0.02em; } }

/* the Harvest numbers in the hero open their case study: the whole figure is the link */
.hero__proof > .hero__proof-link { position: relative; }
.hero__proof-link a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.hero__proof-link a::after { content: ""; position: absolute; inset: -8px; border-radius: 10px; }
.hero__proof-link:hover a { color: var(--ink); text-decoration-color: currentColor; }
.hero__proof-link a:focus-visible { outline: none; }
.hero__proof-link:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: 10px; }
.hero__proof-arrow { display: inline-block; margin-left: 4px; text-decoration: none; transition: translate 160ms ease; }
.hero__proof-link:hover .hero__proof-arrow { translate: 3px 0; }

/* captions under diagram icon tiles sit on gradient panels: a soft plate keeps them readable on any blob */
.panel .dg-node:not(.dg-node--core) > .dg-cap { padding: 1px 6px; border-radius: 6px; background: color-mix(in oklab, var(--dg-node) 84%, transparent); }

/* a linked case-study section clears the sticky nav */
.case__sec[id] { scroll-margin-top: 96px; }

/* on a phone the hero's chat header is too narrow for its title and the tool count: the title gives way */
@media (max-width: 479px) {
  .hero .ui-chat .ui-head .ui-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .hero .ui-chat .ui-head .ui-chat__online { flex: none; white-space: nowrap; }
}

/* on phones the CV stays a button beside "Email me", not a text link */
@media (max-width: 639px) {
  html[data-buttons="tonal"] .btn-row > .btn--secondary { background: color-mix(in oklab, var(--ink) 8%, var(--bg)); text-decoration: none; }
}

/* commands in the MCP dialog wrap instead of hiding behind the Copy button */
.copy code { white-space: normal; overflow-wrap: anywhere; }

/* slim scrollbars inside the dialog and the command menu */
dialog, dialog * { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
