:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --bg: #F7F7F6;
  --panel: #EFEFED;
  --ink: #111111;
  --muted: #666663;
  --line: #E3E3E0;
  --guide: #D2D2CE;
  --accent: #0F6B4F;
  --on-accent: #FFFFFF;
  --dot: #A3A39E;
  --grid: rgba(17, 17, 17, 0.06);
  --font-display: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 3vw, 40px);
  --rail: 11.5rem;
  --gap: clamp(1.5rem, 3vw, 3rem);
  --main-pr: clamp(1.25rem, 3vw, 2.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A;
    --panel: #141414;
    --ink: #EDEDEB;
    --muted: #9A9A95;
    --line: #1F1F1E;
    --guide: #2A2A28;
    --accent: #86CFAE;
    --on-accent: #0A0A0A;
    --dot: #5C5C58;
    --grid: rgba(237, 237, 235, 0.06);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0A0A0A;
  --panel: #141414;
  --ink: #EDEDEB;
  --muted: #9A9A95;
  --line: #1F1F1E;
  --guide: #2A2A28;
  --accent: #86CFAE;
  --on-accent: #0A0A0A;
  --dot: #5C5C58;
  --grid: rgba(237, 237, 235, 0.06);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 0.75rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; top: 1rem; }

.link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
.link:hover { text-decoration-thickness: 2px; }

.shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.rail { padding-block: 1.5rem 0.5rem; }
.rail__name {
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  color: inherit;
  text-decoration: none;
}
.rail__role { margin-top: 0.1rem; font-size: 0.8125rem; color: var(--muted); }
.rail__meta { margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.55; color: var(--muted); }
.rail__nav { display: none; margin-top: 2rem; }
.rail__nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.2rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
}
.rail__nav a::before {
  content: "";
  position: absolute;
  left: -0.95rem;
  top: 50%;
  margin-top: -2.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s;
}
.rail__nav a:hover { color: var(--ink); }
.rail__nav a[aria-current="true"] { color: var(--ink); }
.rail__nav a[aria-current="true"]::before { background: var(--accent); }
.rail__foot { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-size: 0.8125rem; }
.rail__links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.rail__links a { color: var(--ink); text-underline-offset: 0.22em; text-decoration-color: var(--guide); }
.rail__links a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.theme { display: inline-flex; gap: 0.5rem; align-items: center; color: var(--guide); }
.theme button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.theme button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.main { min-width: 0; padding-bottom: 3rem; }

.hero { padding-top: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.hero__title {
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero__title span { display: block; }

.about { display: grid; gap: 1.75rem; margin-top: clamp(2rem, 5vw, 3.5rem); justify-items: start; }
.about .ruled { margin-top: 0; }
.about__stage { position: relative; padding-top: 3.25rem; }
.about__bubble { position: absolute; top: 0; left: 36%; margin: 0; max-width: 15rem; width: max-content; padding: 0.5rem 0.85rem; background: var(--panel, #fff); color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); border-radius: 14px 14px 14px 4px; font-size: 0.9375rem; line-height: 1.35; opacity: 0; transform: translateY(6px) scale(0.92); transform-origin: 0 100%; pointer-events: none; transition: opacity 0.18s ease, transform 0.28s var(--ease-spring); }
.about__bubble.is-on { opacity: 1; transform: none; }
.about__fig { position: relative; margin: 0; width: clamp(220px, 24vw, 290px); aspect-ratio: 1000 / 1130; cursor: pointer; outline-offset: 6px; -webkit-tap-highlight-color: transparent; transform-origin: 50% 100%; translate: 0 var(--by, 0px); rotate: var(--lean, 0deg); filter: drop-shadow(0 0 1px color-mix(in srgb, var(--ink) 55%, transparent)) drop-shadow(0 0 1px color-mix(in srgb, var(--ink) 35%, transparent)); }
.about__fig img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; user-select: none; -webkit-user-drag: none; }
.about__fig img.is-on { opacity: 1; }
.about__fig.is-morphing img { filter: url(#about-morph); }
@media (prefers-reduced-motion: no-preference) { .about__fig { animation: about-bob 6s ease-in-out infinite; } }
@keyframes about-bob { 0%, 100% { --by: 0px; } 50% { --by: -5px; } }
@property --by { syntax: '<length>'; inherits: false; initial-value: 0px; }
.key { color: inherit; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 100% 2px; padding-bottom: 0.12em; transition: background-size 0.7s var(--ease-out) calc(var(--i, 0) * 90ms), color 0.25s ease; }
.key:hover { color: var(--accent); }
.key-link { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; color: var(--accent); }
.js-anim .ruled:not(.is-lit) .key { background-size: 0 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ruled { margin-top: clamp(2rem, 5vw, 3.5rem); max-width: 34rem; }
.ruled__line { padding-block: 0.75rem; border-top: 1px dashed var(--guide); font-size: 1rem; line-height: 1.5; }
.ruled__line:last-child { border-bottom: 1px dashed var(--guide); }

.flow { margin-top: clamp(2rem, 5vw, 3.5rem); }
.flow__visual { position: relative; height: 190px; display: flex; }
.flow__track {
  position: absolute;
  top: 50%;
  left: calc(100% / 14);
  right: calc(100% / 14);
  height: 2px;
  background: var(--guide);
  transition: left 0.8s var(--ease-in-out), right 0.8s var(--ease-in-out), background 0.6s;
}
.flow__group { position: relative; flex: var(--n) 1 0; transition: flex-grow 0.8s var(--ease-in-out); }
.flow__dot {
  position: absolute;
  left: calc((var(--i) + 0.5) / var(--n) * 100%);
  top: calc(50% + var(--dy));
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
  transform: translate(-50%, -50%);
  transition: left 0.8s var(--ease-in-out), top 0.8s var(--ease-in-out), width 0.6s, height 0.6s, background 0.6s;
}
.flow__old, .flow__new {
  position: absolute;
  top: calc(50% + 42px);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  transition: opacity 0.45s;
}
.flow__old {
  left: calc((var(--i) + 0.5) / var(--n) * 100%);
  width: calc(100% / var(--n) - 8px);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--muted);
}
.flow__new {
  left: 50%;
  width: min(92%, 13rem);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.35;
  opacity: 0;
}
.flow[data-state="after"] .flow__group { flex-grow: 1; }
.flow[data-state="after"] .flow__track { left: calc(100% / 8); right: calc(100% / 8); background: var(--accent); }
.flow[data-state="after"] .flow__dot { left: 50%; top: 50%; width: 16px; height: 16px; background: var(--accent); }
.flow[data-state="after"] .flow__old { opacity: 0; }
.flow[data-state="after"] .flow__new { opacity: 1; transition-delay: 0.45s; }

.flow__controls { display: flex; gap: 1.5rem; margin-top: 0.75rem; }
.flow__controls button {
  font-size: 0.8125rem;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0.25rem 0;
  cursor: pointer;
}
.flow__controls button:hover { color: var(--ink); }
.flow__controls button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.flow__caption { margin-top: 0.65rem; font-size: 0.8125rem; color: var(--muted); max-width: 38rem; }
.flow__lists { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flow[data-state="before"] .flow__list--after { display: none; }
.flow[data-state="after"] .flow__list--before { display: none; }
.flow__list li { position: relative; padding-left: 1.6rem; padding-block: 0.35rem; font-size: 0.9375rem; }
.flow__list li::before { content: ""; position: absolute; left: 0.2rem; top: 0.95rem; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.flow__list--after li::before { background: var(--accent); width: 10px; height: 10px; left: 0.1rem; }

.block { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px dashed var(--guide); }
.block__title { position: relative; font-weight: 500; font-size: 1.0625rem; line-height: 1.2; padding-left: 1.1rem; }

.works { margin-top: 2.5rem; border-top: 1px solid var(--guide); }
.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1rem;
  column-gap: 1.5rem;
  align-items: start;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--guide);
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s;
}
.work__name { font-weight: 500; font-size: 1.125rem; line-height: 1.2; letter-spacing: -0.02em; transition: transform 0.4s var(--ease-out); }
.work__text { margin-top: 0.55rem; max-width: 33rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.work__year {
  margin-top: 0.2rem; padding: 0.25rem 0.8rem; border: 1px solid var(--guide); border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.2; color: var(--ink);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.work__arrow { width: 1rem; height: 1rem; margin-top: 0.4rem; color: var(--ink); opacity: 0; transform: translate(-6px, 6px); transition: opacity 0.25s, transform 0.35s var(--ease-out); }
/* a project that is not published yet: same row, quieter, not a link */
.work--soon { cursor: default; }
.work__soon {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.2rem; padding: 0.25rem 0.8rem 0.25rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--guide)); border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.2; color: var(--ink); white-space: nowrap;
}
.work__soon i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
@media (prefers-reduced-motion: no-preference) { .work__soon i { animation: soon-ping 2.6s ease-out infinite; } }
@keyframes soon-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.work--soon .work__name, .work--soon .work__text, .work--soon .work__kind { opacity: 0.78; }
a.work:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a.work:focus-visible .work__arrow { opacity: 1; transform: none; }
@media (hover: hover) {
  .works:hover .work { opacity: 0.4; }
  .works:hover a.work:hover { opacity: 1; }
  a.work:hover .work__name { transform: translateX(6px); }
  a.work:hover .work__year { background: var(--ink); border-color: var(--ink); color: var(--bg); }
  a.work:hover .work__arrow { opacity: 1; transform: none; }
}
.work-peek {
  position: fixed; left: 0; top: 0; z-index: 60; width: 21rem;
  pointer-events: none; opacity: 0; transform: translate3d(0, 0, 0);
  border-radius: 14px; overflow: hidden; background: var(--panel, var(--bg)); border: 1px solid var(--guide);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent) inset, 0 24px 50px -18px rgb(0 0 0 / 0.45), 0 0 0 5px color-mix(in srgb, var(--bg) 70%, transparent);
  transition: opacity 0.22s;
}
.work-peek.is-on { opacity: 1; }
.pk-bar { display: flex; align-items: center; gap: 0.6rem; height: 1.75rem; padding: 0 0.7rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 4%, var(--bg)); }
.pk-dots { display: flex; gap: 4px; }
.pk-dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.pk-url { flex: 1; text-align: center; font: 0.625rem/1 var(--font-mono); color: var(--muted); margin-right: 2.2rem; }
.pk-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: color-mix(in srgb, var(--ink) 5%, var(--bg)); }
.pk-deck { position: absolute; inset: 0; visibility: hidden; }
.pk-deck.is-on { visibility: visible; }
.pk-slide { position: absolute; inset: 0; opacity: 0; }
.pk-slide.is-on { opacity: 1; }
.pk-slide > img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.pk-slide--phones { display: flex; justify-content: center; align-items: flex-start; gap: 0.7rem; padding: 0.9rem 0 0; }
.pk-slide--phones > img { width: 29%; height: auto; max-height: none; object-fit: contain; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 10px 24px -10px rgb(0 0 0 / 0.4); }
.pk-slide--phones > img:nth-child(2) { transform: translateY(0.9rem); }
@media (hover: none), (max-width: 899px) { .work-peek { display: none; } }
@media (max-width: 640px) {
  .work { grid-template-columns: minmax(0, 1fr) auto; padding: 1.5rem 0; }
  .work__arrow { display: none; }
}


.rows { margin-top: 1.25rem; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.1rem 1.5rem; padding-block: 0.85rem; border-top: 1px dashed var(--guide); }
.row:last-child { border-bottom: 1px dashed var(--guide); }
.row__when { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); padding-top: 0.2rem; }
.row__what { font-size: 0.9375rem; }
.row__what strong { font-weight: 500; }
.row__sub { color: var(--muted); font-size: 0.875rem; }

.contact__title { font-weight: 500; font-size: clamp(1.5rem, 2.8vw, 2.125rem); line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; max-width: 18ch; }

.foot { padding-block: 2rem; border-top: 1px dashed var(--guide); color: var(--muted); font-family: var(--font-mono); font-size: 0.6875rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; }

.cs-hero { padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.cs-back { font-size: 0.8125rem; }
.cs-title { margin-top: 1.5rem; font-weight: 500; font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; max-width: 24ch; }
.cs-lede { margin-top: 1rem; max-width: 36rem; font-size: 1.0625rem; line-height: 1.6; }
.cs-facts { margin-top: 1.75rem; display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1px dashed var(--guide); }
.cs-fact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.1rem 1.5rem; padding-block: 0.7rem; border-top: 1px dashed var(--guide); }
.cs-fact dt { font-size: 0.8125rem; color: var(--muted); padding-top: 0.1rem; }
.cs-fact dd { font-size: 0.9375rem; line-height: 1.5; }
.cs-section { padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px dashed var(--guide); }
.cs-section__label { font-weight: 500; font-size: 1rem; margin-bottom: 1.1rem; }
.cs-body > * + * { margin-top: 1rem; }
.cs-body p, .cs-body ul { max-width: 36rem; }
.cs-body ul { list-style: disc; padding-left: 1.2rem; }
.cs-body li + li { margin-top: 0.45rem; }
.cs-body strong { font-weight: 600; }
.cs-body .flow { margin-top: 1.5rem; }
.cs-decision { margin-top: clamp(2.25rem, 5vw, 3.25rem); }
.cs-body > .cs-decision:first-child { margin-top: 0; }
.cs-decision__title { font-weight: 500; font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.25; letter-spacing: -0.015em; max-width: 28ch; text-wrap: balance; }
.cs-decision > * + * { margin-top: 0.9rem; }
.cs-figure { margin: 1.5rem 0 0; }
.cs-figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.cs-figure figcaption { margin-top: 0.55rem; font-size: 0.8125rem; color: var(--muted); max-width: 36rem; }
.cs-figure--narrow { max-width: 30rem; }
.cs-figure--phone { max-width: 14rem; }
.cs-split { display: grid; gap: 1.75rem; grid-template-columns: minmax(0, 1fr); }
.cs-split .cs-figure { margin-top: 0; max-width: 18rem; }
.cs-todo { border: 1px dashed var(--guide); border-radius: 8px; padding: 2.25rem 1.25rem; color: var(--muted); text-align: center; font-family: var(--font-mono); font-size: 0.75rem; }
.cs-todos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1.25rem; }
.cs-note { color: var(--muted); }

@media (min-width: 900px) {
  .shell { grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: var(--gap); }
  .shell::before, .shell::after { content: ""; position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--guide); pointer-events: none; }
  .shell::before { left: calc(var(--gutter) + var(--rail) + var(--gap) / 2); }
  .shell::after { right: var(--gutter); }
  .rail { position: sticky; top: 0; height: 100vh; align-self: start; display: flex; flex-direction: column; justify-content: space-between; padding-block: 2.5rem; }
  .rail__nav { display: block; }
  .rail__foot { flex-direction: column; margin-top: 0; }
  .main { padding-right: var(--main-pr); padding-bottom: 0; }
  .row { grid-template-columns: 10.5rem minmax(0, 1fr); }
  .cs-fact { grid-template-columns: 9rem minmax(0, 1fr); }
  .cs-split { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .cs-todos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .flow__visual { display: none; }
  .flow__lists { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin-top: 0.5rem; }
  .flow__controls { margin-top: 0.5rem; }
  .rail { border-bottom: 1px dashed var(--guide); padding-bottom: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}


.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.intro { max-width: 40rem; }
.intro p { font-size: 1rem; line-height: 1.5; color: var(--muted); }
.intro p + p { margin-top: 1.5rem; }
.intro__link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}
.intro__link:hover { text-decoration-thickness: 3px; }

.collage {
  position: relative;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  aspect-ratio: 11 / 6.6;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}

.cl-item {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w, auto);
  z-index: var(--zi);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.4s var(--ease-out);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.cl-item img { -webkit-user-drag: none; pointer-events: none; }
.cl-item.is-dragging { cursor: grabbing; transition: none; transform: rotate(var(--r, 0deg)) scale(1.08); z-index: 40; }
.cl-item.is-dragging .cl-tip { opacity: 0; }
.cl-item:hover, .cl-item:focus {
  transform: translateY(-10px) rotate(calc(var(--r, 0deg) * 0.25)) scale(1.06);
  z-index: 30;
}
.cl-item:focus { outline: none; }
.cl-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 6px; }

.cl-polaroid, .cl-print {
  margin: 0;
  background: #FFFFFF;
  border: 1px solid #E6E6E3;
  border-radius: 2px;
}
.cl-polaroid { padding: 8px 8px 30px; }
.cl-print { padding: 6px 6px 22px; }
.cl-polaroid img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; }
.cl-print img { width: 100%; height: auto; }

.cl-sticker {
  width: 100%;
  height: auto;
  filter: drop-shadow(2px 0 0 #FFFFFF) drop-shadow(-2px 0 0 #FFFFFF) drop-shadow(0 2px 0 #FFFFFF) drop-shadow(0 -2px 0 #FFFFFF);
}
.cl-flag {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(90deg, #008751 33.34%, #FFFFFF 33.34% 66.67%, #008751 66.67%);
  border: 2px solid #FFFFFF;
}
.cl-tag {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  font-size: 1rem;
  white-space: nowrap;
}
.cl-squiggle { position: absolute; left: var(--x, 4%); top: var(--y, 78%); width: var(--w, 20%); z-index: var(--zi); color: var(--accent); }

.cl-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 13rem;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px) rotate(calc(var(--r, 0deg) * -0.25));
  transition: opacity 0.2s, transform 0.25s var(--ease-out);
}
.cl-item--below .cl-tip { bottom: auto; top: calc(100% + 10px); transform: translate(-50%, -4px) rotate(calc(var(--r, 0deg) * -0.25)); }
.cl-item:hover .cl-tip, .cl-item:focus .cl-tip { opacity: 1; transform: translate(-50%, 0) rotate(calc(var(--r, 0deg) * -0.25)); }

.cl-item--portrait { --x: 4%; --y: 6%; --w: 24%; --r: -5deg; }
.cl-item--flag { --x: 24%; --y: 2%; --w: 6.5%; --r: 8deg; }
.cl-item--anime { --x: 36%; --y: 4%; --w: 26%; --r: 3deg; }
.cl-item--ball { --x: 70%; --y: 8%; --w: 15%; --r: -8deg; }
.cl-item--crest { --x: 78%; --y: 52%; --w: 10%; --r: 6deg; }
.cl-item--pad { --x: 42%; --y: 58%; --w: 22%; --r: 4deg; }
.cl-squiggle { --x: 8%; --y: 72%; --w: 22%; }

@media (max-width: 899px) {
  .collage { aspect-ratio: 1 / 0.9; margin-top: 1.75rem; margin-bottom: 0.75rem; }
  .cl-item--portrait { --x: 6%; --y: 3.5%; --w: 38%; }
  .cl-item--flag { --x: 35%; --y: 1%; --w: 10%; }
  .cl-item--anime { --x: 53%; --y: 5.5%; --w: 40%; }
  .cl-item--ball { --x: 8%; --y: 71%; --w: 18%; }
  .cl-item--crest { --x: 79%; --y: 49%; --w: 13%; }
  .cl-item--pad { --x: 32%; --y: 72%; --w: 34%; }
  .cl-squiggle { display: none; }
  .cl-tip { max-width: 9rem; }
}


.peek { position: relative; display: inline; }
.peek__link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
  white-space: nowrap;
}
.peek__link:hover { text-decoration-thickness: 3px; }
.peek__card {
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  z-index: 40;
  display: block;
  width: min(21rem, 80vw);
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--guide);
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px) scale(0.97);
  transform-origin: 50% 0;
  transition: opacity 0.2s, transform 0.3s var(--ease-out);
}
.peek__card img { width: 100%; height: auto; border-radius: 11px; display: block; border: 1px solid var(--line); }
.peek__label { display: block; margin: 6px 4px 2px; font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.2; color: var(--muted); }
.peek:hover .peek__card, .peek:focus-within .peek__card { opacity: 1; transform: translate(-50%, 0) scale(1); }

@media (max-width: 899px) {
  .peek__card { display: none; }
}

.sound > span:first-child { color: var(--muted); margin-right: 0.15rem; }
.cl-item--laptop { --x: 63%; --y: 32%; --w: 11%; --r: -6deg; }
@media (max-width: 899px) {
  .cl-item--laptop { --x: 59%; --y: 44%; --w: 14%; }
}

/* Icon controls */
.tools { display: flex; gap: 0.25rem; margin-left: -0.45rem; }
.icon-btn { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; transition: color 0.2s, background-color 0.2s; }
.icon-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn svg { width: 1.0625rem; height: 1.0625rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.theme-btn[data-mode="dark"] .i-sun, .theme-btn:not([data-mode="dark"]) .i-moon { display: none; }
.theme-btn:active svg { transform: rotate(25deg) scale(0.9); }
.theme-btn svg { transition: transform 0.4s var(--ease-spring); }
.sound-btn .spk { fill: currentColor; fill-opacity: 0.12; }
.sound-btn .w1, .sound-btn .w2 { transform-box: fill-box; transform-origin: 0% 50%; transition: opacity 0.25s, transform 0.5s var(--ease-spring); }
.sound-btn .x { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0.4) rotate(-45deg); transition: opacity 0.2s, transform 0.45s var(--ease-spring); }
.sound-btn[aria-pressed="false"] .w1, .sound-btn[aria-pressed="false"] .w2 { opacity: 0; transform: scale(0.3); }
.sound-btn[aria-pressed="false"] .x { opacity: 1; transform: none; }

/* Theme change: the new theme grows out of the button as a soft-edged circle */
@property --theme-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
html.theme-vt::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
html.theme-vt::view-transition-new(root) {
  mix-blend-mode: normal;
  mask-image: radial-gradient(circle at var(--vt-x, 0) var(--vt-y, 100%), #000 var(--theme-r), transparent calc(var(--theme-r) + 16vmax));
  animation: theme-in 1.1s ease both;
}
@keyframes theme-in { from { --theme-r: -16vmax; } to { --theme-r: 150vmax; } }

/* How I work: paper notes */
.notes { margin-top: 2rem; container-type: inline-size; }
.notes__wall { display: grid; grid-template-columns: repeat(2, minmax(0, 16.5rem)); gap: 1.75rem 1.5rem; padding-top: 0.75rem; }
@container (max-width: 36rem) { .notes__wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 24rem) { .notes__wall { grid-template-columns: minmax(0, 1fr); } }
.note-slot { perspective: 900px; transform: rotate(var(--r)); transition: transform 0.4s var(--ease-out); }
.note-slot:hover { transform: rotate(0deg) translateY(-6px); }
.note {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 0.9; padding: 0; border: 0; background: none;
  color: #1c1c1a; text-align: left; font: inherit; cursor: pointer;
}
.note:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.note__in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.7s var(--ease-spring); }
.note[aria-pressed="true"] .note__in { transform: rotateY(180deg); }
.note__face {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.5rem;
  padding: 1.2rem 1.05rem 1rem; border-radius: 3px 3px 12px 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff) 0%, var(--c) 70%);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 14px 18px -14px rgba(0,0,0,0.45);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.note__face::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 1.6rem; height: 1.6rem;
  background: linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--c) 70%, #000) 50%, color-mix(in srgb, var(--c) 88%, #fff) 100%);
  border-bottom-right-radius: 12px;
}
.note__back { transform: rotateY(180deg); justify-content: flex-start; }
.note__tape {
  position: absolute; z-index: 3; left: 50%; top: -0.7rem; width: 4.5rem; height: 1.3rem; transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 255, 255, 0.55); box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.note__title { font-weight: 500; font-size: 1.25rem; line-height: 1.1; letter-spacing: -0.025em; }
.note__text { font-size: 0.875rem; line-height: 1.45; color: rgba(28, 28, 26, 0.78); }
.note__label { font-family: var(--font-mono); font-size: 0.6875rem; color: rgba(28, 28, 26, 0.6); }
.note__hint { font-family: var(--font-mono); font-size: 0.625rem; color: rgba(28, 28, 26, 0.5); margin-top: 0.15rem; }
.notes__ctl { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; flex: none; min-height: 2.5rem; padding: 0 1.15rem 0 1rem; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1; letter-spacing: -0.005em; white-space: nowrap; cursor: pointer; transition: transform 0.25s var(--ease-spring), background-color 0.2s, color 0.2s, border-color 0.2s; }
.pill svg { width: 1rem; height: 1rem; flex: none; }
.pill:not(.pill--solid):hover { border-color: var(--accent); color: var(--accent); }
.pill--solid { background: var(--ink); color: var(--bg); }
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: scale(0.96); }
.pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.note__num { position: absolute; top: 1.15rem; left: 1.25rem; font-family: var(--font-mono); font-size: 0.75rem; color: rgba(28, 28, 26, 0.6); }
.note__text { font-size: 0.8125rem; }
.note__back .note__text { font-size: 0.8125rem; line-height: 1.5; }
.note__list { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.note__list li { position: relative; padding-left: 1.2rem; font-size: 0.8125rem; line-height: 1.4; color: rgba(28, 28, 26, 0.85); }
.note__list li::before { content: ""; position: absolute; left: 0; top: 0.28em; width: 0.7rem; height: 0.7rem; border: 1.5px solid rgba(28, 28, 26, 0.55); border-radius: 2px; }
.note__list li::after { content: ""; position: absolute; left: 0.17rem; top: 0.38em; width: 0.28rem; height: 0.15rem; border-left: 1.5px solid rgba(28, 28, 26, 0.85); border-bottom: 1.5px solid rgba(28, 28, 26, 0.85); transform: rotate(-45deg); }

.notes__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
.notes__aside { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.notes__intro { color: var(--muted); font-size: 0.9375rem; line-height: 1.55; max-width: 15rem; }
.notes .notes__ctl { margin-top: 0; flex-direction: column; align-items: stretch; width: max-content; min-width: 10.5rem; }
@container (min-width: 52rem) {
  .notes__layout { grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 3.5rem); }
  .notes__aside { padding-top: 0.75rem; }
}
@container (max-width: 51.99rem) {
  .notes .notes__ctl { flex-direction: row; width: auto; }
}

.edu { margin-top: 1.5rem; }
.edu__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; }
.edu__mark { width: 3rem; height: 3rem; object-fit: contain; border: 1px solid var(--guide); border-radius: 10px; background: #fff; padding: 2px; }
.edu__school { font-weight: 500; font-size: 1.0625rem; line-height: 1.25; }
.edu__degree { color: var(--muted); font-size: 0.9375rem; }
.edu__meta { display: grid; gap: 0.15rem; text-align: right; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); }
.edu__text { margin-top: 1.25rem; max-width: 36rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
@media (max-width: 560px) { .edu__head { grid-template-columns: auto minmax(0, 1fr); } .edu__meta { grid-column: 1 / -1; text-align: left; } }
.work__kind { margin-top: 0.35rem; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); }
.work__kind + .work__text { margin-top: 0.5rem; }
.cs-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.cs-gallery .cs-figure { margin: 0; }
.cs-gallery .cs-figure img { border-radius: 8px; }
@media (max-width: 560px) { .cs-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.socials { display: flex; gap: 0.15rem; margin-left: -0.45rem; width: 100%; }
.soc { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; color: var(--muted); transition: color 0.2s, background-color 0.2s, transform 0.3s var(--ease-spring); }
.soc svg { width: 1.0625rem; height: 1.0625rem; fill: currentColor; }
.soc:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); transform: translateY(-2px); }
.soc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.soc--lg { width: 2.5rem; height: 2.5rem; border: 1px solid var(--guide); border-radius: 999px; color: var(--ink); }
.soc--lg svg { width: 1.125rem; height: 1.125rem; }

/* Case-study media */
.cs-media { margin: 1.75rem 0 0; }
.cs-media img, .cs-media video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.cs-media figcaption { margin-top: 0.7rem; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.cs-media--narrow { max-width: 26rem; margin-inline: auto; }
.cs-media--narrow img { border: 0; background: transparent; }
.cs-media--phone { max-width: 15rem; margin-top: 0; }
.cs-media--phone img { border-radius: 22px; }
.cs-media--wide { margin-top: 0; }
.cs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.cs-pair .cs-media { margin: 0; }
.cs-pair__cap { margin-top: 0.7rem; font-size: 0.8125rem; color: var(--muted); }
.cs-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.cs-trio .cs-media { margin: 0; }
.cs-trio .cs-media img { border-radius: 20px; }
.cs-step { margin-top: clamp(2.5rem, 6vw, 3.75rem); }
.cs-step > p { margin-top: 0.6rem; }
.cs-step__title { max-width: none; font-size: 1.25rem; }
.cs-body > .cs-step:first-of-type { margin-top: 2rem; }
.cs-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.cs-side__text > * + * { margin-top: 1.1rem; }
@media (min-width: 700px) { .cs-side { grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); gap: 2.5rem; } .cs-side .cs-media--wide { grid-column: auto; } }
.cs-body p, .cs-body ul { max-width: 36rem; }
.cs-body .cs-pair, .cs-body .cs-media, .cs-body .cs-rail, .cs-body .cs-trio, .cs-body .cs-side { max-width: none; }
.cs-rail { display: flex; gap: 1rem; margin-top: 1.75rem; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 0.75rem; scrollbar-width: thin; scrollbar-color: var(--guide) transparent; }
.cs-rail .cs-media { flex: 0 0 11.5rem; margin: 0; scroll-snap-align: start; }
.cs-rail .cs-media img { border-radius: 18px; }
.cs-rail:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.cs-video video { background: #101219; cursor: pointer; }
.cs-swatches { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cs-swatches li { display: grid; gap: 0.45rem; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); }
.cs-sw { width: 4.5rem; height: 4.5rem; border-radius: 12px; background: var(--sw); border: 1px solid var(--guide); }
.cs-type { margin-top: 1.5rem; display: flex; align-items: baseline; gap: 0.75rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.cs-type span { font-family: "Nunito", var(--font-body); font-size: 2.5rem; line-height: 1; color: var(--ink); }
@media (max-width: 560px) { .cs-trio { grid-template-columns: minmax(0, 1fr); } .cs-rail .cs-media { flex-basis: 9.5rem; } }

/* Rail footer: quiet links, one icon bar */
.rail__foot { gap: 1rem; }
.rail__links { gap: 0.35rem 1.25rem; }
.rail__bar { display: inline-flex; align-items: center; gap: 0.1rem; padding: 0.2rem 0.3rem; border: 1px solid var(--guide); border-radius: 999px; width: fit-content; }
.rail__bar .socials, .rail__bar .tools { margin-left: 0; width: auto; gap: 0; }
.rail__bar .soc, .rail__bar .icon-btn { width: 1.9rem; height: 1.9rem; border-radius: 999px; }
.rail__sep { width: 1px; height: 1.1rem; margin-inline: 0.25rem; background: var(--guide); }
.cs-pair--phones { grid-template-columns: repeat(2, minmax(0, 14rem)); gap: 1.5rem; }
.cs-pair--phones .cs-media { max-width: none; }
.cs-side .cs-media--phone video { border-radius: 22px; }

/* Theme and sound live in the top-right corner, apart from the profile column */
.corner { position: fixed; top: 1rem; right: clamp(1rem, 2.5vw, 1.75rem); z-index: 50; display: flex; align-items: center; gap: 0.1rem; padding: 0.2rem 0.3rem; border: 1px solid var(--guide); border-radius: 999px; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.corner .tools { margin: 0; gap: 0; }
.corner .icon-btn { width: 1.9rem; height: 1.9rem; border-radius: 999px; }
.socials { margin-left: -0.45rem; }
.rail__foot { gap: 0.9rem; }

/* Case-study stages, persona and annotations */
.cs-stage { position: relative; margin-top: 2rem; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); --ink-blue: #1f7fd6; }
:root[data-theme="dark"] .cs-stage { --ink-blue: #4aa8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cs-stage { --ink-blue: #4aa8ff; } }
.cs-cutv { margin: 0; position: relative; }
.cs-cutv canvas { display: none; width: 100%; height: auto; }
.cs-cutv video { display: block; width: 100%; height: auto; border-radius: 22px; }
.cs-cutv.is-cut canvas { display: block; cursor: pointer; }
.cs-cutv.is-cut video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cs-cutv--lg { max-width: 21rem; margin-inline: auto; }
.cs-cutv--md { max-width: 14rem; }
.anno { position: absolute; margin: 0; color: var(--ink-blue); font-family: "Caveat", "Segoe Script", cursive; font-weight: 500; font-size: 1.2rem; line-height: 1.05; }
.anno span { display: block; max-width: 9.5rem; }
.anno-arrow { width: 3.4rem; height: auto; display: block; }
.anno-img { position: absolute; top: 1.25rem; left: 1.5rem; width: 9.5rem; height: auto; }
:root[data-theme="light"] .anno-img { filter: none; }
.persona { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; align-items: start; }
.pcard { padding: 1.25rem 1.35rem 1.4rem; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.pcard h3 { font-size: 0.9375rem; font-weight: 500; display: flex; align-items: center; gap: 0.55rem; }
.pcard h3::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--dot, var(--accent)); }
.pcard p { margin-top: 0.7rem; font-size: 0.875rem; line-height: 1.6; color: var(--muted); max-width: none; }
.pcard--details { --dot: #9a9a95; } .pcard--pain { --dot: #a78bfa; } .pcard--bg { --dot: #5aa9f2; } .pcard--goals { --dot: #e8b93a; }
.pcard--details img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 30%; border-radius: 12px; margin-top: 0.9rem; }
.pcard dl { margin: 0.9rem 0 0; display: grid; gap: 0.4rem; font-size: 0.875rem; }
.pcard dl div { display: flex; gap: 0.5rem; }
.pcard dt { color: var(--muted); } .pcard dt::after { content: ":"; }
.pcard--details { grid-row: span 2; } .pcard--bg { grid-row: span 1; }
/* navigating stage */
.cs-stage--nav { display: flex; justify-content: center; gap: 7rem; padding: 3.5rem 1.5rem 2.5rem; }
.cs-stage--nav .ph { position: relative; width: 11.5rem; }
.anno--group { right: calc(100% + 0.6rem); top: 28%; text-align: right; width: 9rem; }
.anno--group .anno-arrow { margin: 0.25rem 0 0 auto; width: 3rem; transform: scaleX(-1) rotate(0deg); }
.anno--sub { left: calc(100% + 0.4rem); top: 34%; width: 6rem; }
.anno--search { left: 0.5rem; top: -2.9rem; width: 12rem; }
.anno--search span { max-width: none; }
.anno--search .anno-arrow { margin-left: 5.5rem; width: 2.6rem; }
/* alert stage */
.cs-stage--alert { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding-bottom: 4.5rem; }
.al { position: relative; }
.al__t { font-size: 0.875rem; margin-bottom: 0.6rem; color: var(--ink); }
.al .cs-media { margin: 0; }
.al .cs-media img { border-radius: 12px; }
.anno--new, .anno--none { position: static; margin-top: 0.4rem; display: flex; align-items: flex-start; gap: 0.5rem; padding-left: 78%; }
.anno--new span, .anno--none span { max-width: 9rem; }
.anno--new .anno-arrow, .anno--none .anno-arrow { width: 2.2rem; order: -1; margin-left: -2.7rem; margin-top: -0.4rem; transform: rotate(-12deg); }
.cs-stage--proto { padding: 2.75rem 1.5rem 2rem; }
@media (max-width: 760px) {
  .cs-stage--nav { flex-direction: column; align-items: center; gap: 1.5rem; padding: 1.5rem; }
  .cs-stage--nav .anno { position: static; width: auto; text-align: left; margin-top: 0.6rem; }
  .cs-stage--nav .anno-arrow { display: none; }
  .persona { grid-template-columns: minmax(0, 1fr); }
  .pcard--details { grid-row: auto; }
  .cs-stage--alert { grid-template-columns: minmax(0, 1fr); }
  .anno--new, .anno--none { padding-left: 0; }
  .anno-img { position: static; display: block; margin-bottom: 1rem; }
}

/* tuned annotations */
.cs-stage--nav { gap: 7rem; }
.cs-stage--nav .ph { width: 12.5rem; }
.anno--group { width: 7.5rem; right: calc(100% + 0.5rem); top: 22%; text-align: right; }
.anno--group .anno-arrow { margin: 0.2rem 0 0 auto; }
.anno--sub { left: calc(100% + 0.5rem); top: 30%; width: 6rem; }
.anno--sub .anno-arrow { margin-top: 0.1rem; }
.anno--search { left: 0.5rem; top: -3.3rem; width: 13rem; }
.anno--search .anno-arrow { margin-left: 3.6rem; margin-top: -0.1rem; width: 2.8rem; }
.anno-arrow { width: 3.2rem; }
.cs-stage--alert { padding-bottom: 5.5rem; }
.al { padding-bottom: 0; }
.anno--new, .anno--none { position: absolute; right: 2.5%; bottom: -4.6rem; left: auto; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.anno--new .anno-arrow, .anno--none .anno-arrow { order: 0; margin: 0; transform: none; width: 2.2rem; }
.anno--new span, .anno--none span { max-width: 10rem; }
.al { position: relative; }
.persona { grid-template-areas: "details bg" "pain goals"; align-items: stretch; }
.pcard--details { grid-area: details; grid-row: auto; }
.pcard--bg { grid-area: bg; } .pcard--pain { grid-area: pain; } .pcard--goals { grid-area: goals; }
@media (max-width: 760px) { .persona { grid-template-areas: none; } .pcard--details, .pcard--bg, .pcard--pain, .pcard--goals { grid-area: auto; } }
.anno-arrow { aspect-ratio: 6 / 5; height: auto; flex: none; overflow: visible; }
.cs-stage--alert { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.anno.anno--new, .anno.anno--none { position: static; margin: 0.35rem 0 0; padding: 0 2% 0 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.cs-stage--still { display: grid; justify-items: center; padding-block: clamp(1.75rem, 4vw, 2.75rem); }
.cs-stage--still .cs-media--phone { max-width: 15rem; margin: 0; }
.cs-stage--still .cs-media--phone img { border: 0; background: transparent; }
.cs-stage--still figcaption { text-align: center; }

/* One media system for every case study */
.cs-media { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(0.75rem, 2.5vw, 1.25rem); margin: 2rem 0 0; }
.cs-media img, .cs-media video { border: 0; border-radius: 10px; background: transparent; }
.cs-media figcaption { margin-top: 0.85rem; padding-inline: 0.15rem; font-size: 0.8125rem; color: var(--muted); }
.cs-stage .cs-media, .cs-rail .cs-media, .cs-cutv, .cs-media--narrow, .cs-media--phone { background: none; border: 0; padding: 0; }
.cs-pair .cs-media, .cs-trio .cs-media { margin: 0; }
.cs-media--phone { margin-top: 0; }
.cs-rail { padding: 1.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.cs-video { padding: 0; background: #101219; overflow: hidden; }
.cs-video video { border-radius: 0; }
.cs-video figcaption { padding: 0.75rem 1rem; }
.cs-stage .cs-media figcaption, .cs-rail .cs-media figcaption { text-align: center; }
.cs-stage--dark { background: #000; border-color: #000; display: grid; justify-items: center; padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.cs-stage--dark .cs-cutv--md { width: 100%; max-width: 15rem; }
.cs-body .cs-cutv--md { max-width: 15rem; }
.cs-stage__cap { margin-top: 1rem; font-size: 0.8125rem; color: #9a9a95; text-align: center; }
.cs-hero > .cs-media { margin-top: 2.25rem; }
.cs-hero > .cs-media--narrow { max-width: 28rem; margin-inline: auto; }
.cs-body .cs-step > .cs-media, .cs-body .cs-step > .cs-pair, .cs-body .cs-step > .cs-stage { margin-top: 1.25rem; }

/* DiveHQ feature rows */
.cs-feature { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(1.5rem, 5vw, 3.5rem); padding: clamp(1.75rem, 4vw, 3rem); }
.cs-feature + .cs-feature { margin-top: 1.25rem; }
.cs-feature__text .cs-step__title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; }
.cs-feature__text p { margin-top: 0.6rem; max-width: 22rem; font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }
.cs-cutv--phone { width: clamp(10rem, 20vw, 12.5rem); }
@media (max-width: 700px) { .cs-feature { grid-template-columns: minmax(0, 1fr); justify-items: start; } .cs-cutv--phone { justify-self: center; } }
.cs-rail--light .cs-media img { border-radius: 0; }
.cs-vidgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.cs-vidgrid .cs-media { margin: 0; }
.cs-vidgrid .cs-video video { width: 100%; height: auto; display: block; }
@media (max-width: 560px) { .cs-vidgrid { grid-template-columns: minmax(0, 1fr); } }
.cs-featgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 1.5rem; margin-top: 2rem; }
.cs-feat .cs-media { margin: 0; }
.cs-feat .cs-video { border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.cs-feat__label { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); max-width: none; }
.cs-feat__title { margin-top: 0.3rem; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.02em; }
.cs-feat__text { margin-top: 0.4rem; font-size: 0.9375rem; line-height: 1.55; color: var(--muted); max-width: 26rem; }
@media (max-width: 640px) { .cs-featgrid { grid-template-columns: minmax(0, 1fr); } }

/* Nuton: key numbers and the pinned live-site button */
.cs-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cs-stats li { display: grid; gap: 0.15rem; padding: 0.7rem 1rem; min-width: 8.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.cs-stats strong { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.cs-stats span { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); }
.cs-stats__note { margin-top: 0.6rem; font-size: 0.8125rem; color: var(--muted); }
.live-cta {
  position: fixed; z-index: 55; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.15rem 0.7rem 1rem;
  border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 0.875rem; font-weight: 500; text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55); transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}
.live-cta svg { width: 0.95rem; height: 0.95rem; transition: transform 0.3s var(--ease-spring); }
.live-cta:hover { transform: translateX(-50%) translateY(-3px); box-shadow: 0 16px 34px -12px rgba(0, 0, 0, 0.6); }
.live-cta:hover svg { transform: translate(2px, -2px); }
.live-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.live-cta__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.6); animation: live-pulse 2.2s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 0.45rem rgba(62, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); } }
@media (min-width: 900px) { .live-cta { left: calc(50% + (var(--rail) + var(--gap)) / 2); } }
.main:has(~ .live-cta), body:has(.live-cta) .foot { padding-bottom: 5.5rem; }
@media (prefers-reduced-motion: reduce) { .live-cta__dot { animation: none; } }
.cs-pair--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-trio--phones .cs-media { padding: 0; background: none; border: 0; }
.cs-trio--phones .cs-media img { border-radius: 24px; border: 1px solid var(--line); }
.cs-stage--still .cs-media--shot { max-width: 24rem; margin: 0; }
.cs-stage--still .cs-media--shot img { border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 640px) { .cs-pair--duo { grid-template-columns: minmax(0, 1fr); } }

/* Nuton: web screenshots as windows that fade out at the bottom */
.cs-shot { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(0.9rem, 3vw, 1.75rem) clamp(0.9rem, 3vw, 1.75rem) 0; overflow: hidden; }
.cs-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: #fff;
  -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent 100%); mask-image: linear-gradient(to bottom, #000 68%, transparent 100%); }
.cs-shot figcaption { margin-top: 0; padding: 0.9rem 0.15rem 1.1rem; }
.cs-media.cs-shot { margin-top: 2rem; }
.cs-hero > .cs-media.cs-shot { margin-top: 2.25rem; }
.cs-side--shot { grid-template-columns: minmax(0, 1fr); }
.cs-side--shot .cs-shot--tall { margin: 0; align-self: start; }
.cs-side--shot .cs-shot--tall img { max-height: 30rem; object-fit: cover; object-position: top; }
@media (min-width: 760px) { .cs-side--shot { grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); gap: 2.25rem; } }
.cs-shot--clean { padding-bottom: 0; }
.cs-shot--clean img { -webkit-mask-image: none; mask-image: none; border-bottom: 1px solid var(--line); border-radius: 12px; max-width: 40rem; margin-inline: auto; }
.cs-shot--clean figcaption { text-align: center; }
.cs-shot img { -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%); mask-image: linear-gradient(to bottom, #000 80%, transparent 100%); }
.cs-shot.cs-shot--clean img { -webkit-mask-image: none; mask-image: none; }

/* ---------- Motion ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
.progress { position: fixed; z-index: 80; top: 0; left: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

/* Page-to-page: the profile column and controls stay put, the content slides through */
@view-transition { navigation: auto; }
.rail { view-transition-name: rail; }
.corner { view-transition-name: corner; }
html.theme-vt .rail, html.theme-vt .corner { view-transition-name: none; }
::view-transition-group(rail), ::view-transition-group(corner) { animation-duration: 0s; }
::view-transition-old(root) { animation: vt-out 0.28s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 0.65s var(--ease-out) 0.06s both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(26px); } }

/* Scroll reveals: one calm fade-and-rise, staggered inside a group */
html.js-anim .rv { opacity: 0; transform: translate3d(0, 20px, 0); transition: opacity 0.9s var(--ease-out) var(--rv-d, 0s), transform 0.9s var(--ease-out) var(--rv-d, 0s); will-change: opacity, transform; }
html.js-anim .rv.in { opacity: 1; transform: none; }

/* Home: the collage lands piece by piece */
html.js-anim .cl-item { animation: cl-in 0.95s var(--ease-out) both; animation-delay: calc(var(--n, 0) * 110ms + 450ms); }
@keyframes cl-in { from { opacity: 0; translate: 0 36px; scale: 0.9; } to { opacity: 1; translate: 0 0; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .progress { display: none; } ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
@media print { html.js-anim .rv { opacity: 1 !important; transform: none !important; } }

/* ---------- Boxes: every section runs edge to edge between the two vertical guides ---------- */
@media (min-width: 900px) {
  .main > section, .main > footer {
    margin-inline: calc(var(--gap) / -2) calc(var(--main-pr) * -1);
    padding-inline: calc(var(--gap) / 2) var(--main-pr);
    border-top: 1px dashed var(--guide);
  }
  .main > footer { border-bottom: 1px dashed var(--guide); }
}

/* ---------- Current: a few soft lights run along the guides and box edges ---------- */
.current { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 4; display: none; }
@media (min-width: 900px) { html.js-anim .current { display: block; } }
@media (prefers-reduced-motion: reduce) { .current { display: none !important; } }

/* Experience timeline */
.timeline { list-style: none; margin: 2rem 0 0; padding: 0; }
.tl { position: relative; padding: 0 0 2.5rem 2.25rem; }
.tl:last-child { padding-bottom: 0.5rem; }
.tl::before { content: ""; position: absolute; left: 0.4375rem; top: 1.4rem; bottom: -0.2rem; width: 1px; background: var(--guide); }
.tl:last-child::before { display: none; }
.tl::after { content: ""; position: absolute; left: 0; top: 0.3rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--dot); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--guide); transition: background-color 0.3s, box-shadow 0.3s; }
.tl.is-current::after { background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); }
.tl:hover::after { background: var(--accent); }
.tl__meta { display: flex; align-items: center; gap: 0.7rem; }
.tl__badge { font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1; padding: 0.35rem 0.6rem; border-radius: 999px; background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
.tl.is-current .tl__badge { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.tl__when { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.tl__title { margin-top: 0.85rem; font-weight: 500; font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.25; letter-spacing: -0.025em; }
.tl__at { color: var(--muted); margin-inline: 0.15rem; }
.tl__co { color: inherit; text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 0.35s var(--ease-out), color 0.2s; }
.tl__co svg { width: 0.7em; height: 0.7em; margin-left: 0.2em; vertical-align: 0.05em; opacity: 0.55; transition: transform 0.3s var(--ease-spring), opacity 0.2s; }
.tl__co:hover, .tl__co:focus-visible { color: var(--accent); background-size: 100% 1px; }
.tl__co:hover svg { transform: translate(2px, -2px); opacity: 1; }
.tl__text { margin-top: 0.55rem; max-width: 34rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.tl__links { margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-family: var(--font-mono); font-size: 0.75rem; }
.tl__link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--guide); text-underline-offset: 0.25em; }
.tl__link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.tl__link svg { width: 0.85em; height: 0.85em; margin-left: 0.25em; vertical-align: -0.05em; }

/* Archive: rows that open to show the work */
.archive { margin-top: 2rem; border-top: 1px solid var(--guide); }
.arc { border-bottom: 1px solid var(--guide); }
.arc__row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 0.9fr) 1.25rem; gap: 1rem; align-items: center; width: 100%; padding: 1.15rem 0.5rem; margin: 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.9375rem; text-align: left; cursor: pointer; transition: color 0.25s, background-color 0.25s; }
.arc__row:hover, .arc.is-open .arc__row { color: var(--ink); }
.arc__row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.arc__row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.arc__name { color: var(--ink); font-weight: 500; }
.arc.is-open .arc__name { color: var(--ink); }
.arc__type { font-family: var(--font-mono); font-size: 0.75rem; }
.arc__chev { width: 1.1rem; height: 1.1rem; justify-self: end; transition: transform 0.45s var(--ease-out); }
.arc.is-open .arc__chev { transform: rotate(180deg); color: var(--accent); }
.arc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s var(--ease-out); }
.arc.is-open .arc__panel { grid-template-rows: 1fr; }
.arc__inner { overflow: hidden; min-height: 0; }
.arc__body { padding: 0.25rem 0.5rem 1.75rem; display: grid; gap: 1.1rem; justify-items: start; opacity: 0; transform: translateY(-6px); transition: opacity 0.4s 0.05s, transform 0.5s var(--ease-out); }
.arc.is-open .arc__body { opacity: 1; transform: none; }
.arc__text { max-width: 32rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.arc__frame { margin: 0; width: min(100%, 34rem); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent) inset, 0 22px 44px -26px rgb(0 0 0 / 0.5); }
.arc__bar { display: flex; align-items: center; gap: 0.6rem; height: 1.9rem; padding: 0 0.75rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 4%, var(--bg)); }
.arc__dots { display: flex; gap: 5px; }
.arc__dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.arc__url { flex: 1; text-align: center; margin-right: 2.2rem; font: 0.625rem/1 var(--font-mono); color: var(--muted); }
.arc__frame img { display: block; width: 100%; height: auto; }
.arc__fig { margin: 0; width: min(100%, 24rem); aspect-ratio: 10 / 7; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.arc__fig img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.arc__img--contain img { object-fit: contain; padding: 0.6rem; }
.arc__link { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--guide); padding-bottom: 0.2rem; transition: color 0.2s, border-color 0.2s; }
.arc__link svg { width: 1rem; height: 1rem; transition: transform 0.3s var(--ease-spring); }
.arc__link:hover { color: var(--accent); border-color: var(--accent); }
.arc__link:hover svg { transform: translateX(3px); }
@media (max-width: 640px) {
  .arc__row { grid-template-columns: minmax(0, 1fr) 1.25rem; row-gap: 0.15rem; }
  .arc__what, .arc__type { grid-column: 1; }
  .arc__chev { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

/* ---------- Audit additions ---------- */
/* mobile: a section bar that appears once you scroll past the profile */
.mnav { display: none; }
@media (max-width: 899px) {
  .corner { position: absolute; }
  .mnav { display: flex; gap: 0.3rem; position: fixed; z-index: 60; top: 0; left: 0; right: 0; padding: 0.55rem var(--gutter); overflow-x: auto; scrollbar-width: none; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--guide); transform: translateY(-110%); transition: transform 0.4s var(--ease-out); }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav.is-on { transform: none; }
  .mnav a { flex: none; padding: 0.55rem 0.9rem; border-radius: 999px; border: 1px solid transparent; font-size: 0.8125rem; color: var(--muted); text-decoration: none; transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
  .mnav a[aria-current="true"] { color: var(--ink); background: var(--panel); border-color: var(--guide); }
}

/* next and previous project */
.cs-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding-block: clamp(1.75rem, 4vw, 2.5rem); }
.cs-pager__link { position: relative; display: grid; gap: 0.3rem; padding: 1.25rem 3rem 1.25rem 1.35rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; text-decoration: none; transition: transform 0.4s var(--ease-out), border-color 0.25s; }
.cs-pager__link--next { text-align: right; padding: 1.25rem 1.35rem 1.25rem 3rem; }
.cs-pager__dir { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); }
.cs-pager__name { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.02em; }
.cs-pager__kind { font-size: 0.8125rem; color: var(--muted); }
.cs-pager__link svg { position: absolute; top: 50%; width: 1.1rem; height: 1.1rem; color: var(--muted); transform: translateY(-50%); transition: transform 0.35s var(--ease-spring), color 0.2s; }
.cs-pager__link--prev svg { right: 1.2rem; transform: translateY(-50%) scaleX(-1); }
.cs-pager__link--next svg { left: 1.2rem; }
.cs-pager__link:hover, .cs-pager__link:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-3px); }
.cs-pager__link--prev:hover svg { transform: translateY(-50%) scaleX(-1) translateX(3px); color: var(--accent); }
.cs-pager__link--next:hover svg { transform: translateY(-50%) translateX(3px); color: var(--accent); }
.cs-pager__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 640px) { .cs-pager { grid-template-columns: minmax(0, 1fr); } }

/* 404 */
.nf { min-height: 100vh; display: grid; align-content: center; justify-items: start; gap: 1rem; padding: 2rem clamp(1.25rem, 8vw, 6rem); max-width: 44rem; margin-inline: auto; }
.nf__code { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--accent); }
.nf__title { font-size: clamp(2rem, 6vw, 3rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; }
.nf__text { color: var(--muted); max-width: 28rem; }
.nf__links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.nf__links .pill { text-decoration: none; display: inline-block; }

/* copy the email */

/* small hover touches */
.rail__nav a { transition: color 0.2s, transform 0.3s var(--ease-out); }
.rail__nav a:hover { transform: translateX(3px); }
.pcard { transition: transform 0.4s var(--ease-out), border-color 0.25s; }
.pcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.cs-stats li { transition: transform 0.35s var(--ease-spring), border-color 0.25s; }
.cs-stats li:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cs-media { transition: border-color 0.3s; }
.cs-media:hover { border-color: var(--guide); }
.foot .link { transition: color 0.2s; }

/* touch screens: bigger targets */
@media (pointer: coarse) {
  .icon-btn, .soc { width: 2.75rem; height: 2.75rem; }
  .corner .icon-btn { width: 2.5rem; height: 2.5rem; }
  .rail__links a { padding-block: 0.7rem; }
  .arc__link, .tl__link { padding-block: 0.6rem; }
  .arc__row { padding-block: 1.3rem; }
  .pill { min-height: 2.75rem; }
}

/* Ask assistant (React + Halaska UI bundle in assistant/) */
.ask-fab { position: fixed; left: var(--ask-cx, 50%); translate: -50% 0; bottom: 1.25rem; z-index: 55; display: inline-flex; align-items: center; gap: 0.55rem; height: 2.75rem; padding: 0 1.1rem 0 0.7rem; border: 1px solid var(--guide); border-radius: 999px; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink); font: inherit; font-size: 0.875rem; cursor: pointer; transition: border-color 0.2s, transform 0.35s var(--ease-out), opacity 0.16s; }
.ask-fab:hover { border-color: var(--accent); transform: translateY(-2px); }
.ask-fab:active { transform: scale(0.96); }
.ask-fab.is-away { opacity: 0; pointer-events: none; }
.ask-mascot { display: block; width: 1.6rem; height: 1.6rem; flex: none; }
.ask-mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ask-fab:focus-visible, .ask-panel__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ask-panel { position: fixed; left: var(--ask-left, 1rem); bottom: 1.25rem; z-index: 56; width: var(--ask-w, 42rem); height: var(--ask-h, 32rem); border: 1px solid var(--guide); border-radius: 24px; overflow: hidden; background: var(--bg); box-shadow: 0 28px 70px -20px rgb(0 0 0 / 0.55); }
.ask-panel[hidden] { display: none; }
.ask-panel iframe { position: absolute; left: 0; bottom: 0; width: var(--ask-w, 42rem); height: var(--ask-h, 32rem); margin: -1px; border: 0; display: block; background: var(--bg); }
.ask-panel__pill { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0.55rem; background: var(--bg); color: var(--ink); font-size: 0.875rem; white-space: nowrap; pointer-events: none; z-index: 3; opacity: 0; }
.ask-panel__close { position: absolute; top: 0.85rem; right: 0.8rem; z-index: 2; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s; }
.ask-panel__close:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
/* phones: the full "Ask about me" pill stays visible, and the panel opens as a bottom sheet */
@media (max-width: 639px) {
  .ask-fab { bottom: max(1rem, calc(env(safe-area-inset-bottom) + 0.5rem)); height: 3rem; padding: 0 1.25rem 0 0.75rem; font-size: 0.9375rem; background: color-mix(in srgb, var(--bg) 90%, transparent); box-shadow: 0 10px 28px -12px rgb(0 0 0 / 0.35); }
  .ask-panel { bottom: 0; border-bottom-width: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -18px 50px -20px rgb(0 0 0 / 0.5); }
  body { padding-bottom: 4.5rem; }
}
.ask-scrim { position: fixed; inset: 0; z-index: 54; background: color-mix(in srgb, var(--ink) 38%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.4s ease; }
.ask-scrim.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ask-fab { transition: none; } }



/* Section headers: a band of fine dots above the title, an accent marker, and crosshairs on the guides.
   Moving the cursor into a section lets an accent glow flow into the band, following the cursor. */
@property --glow-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.block { position: relative; --bandh: clamp(2.5rem, 6vw, 4.5rem); --dot: color-mix(in srgb, var(--ink) 17%, transparent); }
.block::before, .block::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--bandh) - 2.7rem); height: 1.7rem; pointer-events: none; background-size: 10px 10px, 100% 1px, 100% 1px; background-repeat: repeat, no-repeat, no-repeat; background-position: 0 0, 0 0, 0 100%; }
.block::before { background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 1.4px), linear-gradient(var(--guide), var(--guide)), linear-gradient(var(--guide), var(--guide)); }
.block::after { --glow-r: 0px; background-image: radial-gradient(circle at 1px 1px, var(--accent) 1px, transparent 1.5px), linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)); -webkit-mask-image: radial-gradient(ellipse var(--glow-r) 220% at var(--mx, 50%) 50%, #000 0%, rgb(0 0 0 / 0.55) 35%, transparent 100%); mask-image: radial-gradient(ellipse var(--glow-r) 220% at var(--mx, 50%) 50%, #000 0%, rgb(0 0 0 / 0.55) 35%, transparent 100%); transition: --glow-r 1.3s var(--ease-out); }
.block:hover::after { --glow-r: 520px; }
.block__title::before { content: ""; position: absolute; left: 0; top: 50%; width: 0.45rem; height: 0.45rem; margin-top: -0.225rem; background: var(--accent); border-radius: 1px; transition: box-shadow 0.9s ease, transform 0.9s var(--ease-out); }
.block:hover .block__title::before { box-shadow: 0 0 10px 1px color-mix(in srgb, var(--accent) 55%, transparent); transform: rotate(45deg) scale(1.1); }
.block__title::after { content: ""; position: absolute; left: var(--bx-l, -1px); top: -2.7rem; width: 13px; height: 13px; margin: -6px 0 0 -6px; background: linear-gradient(var(--ink), var(--ink)) center / 1px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) center / 100% 1px no-repeat; opacity: 0.4; pointer-events: none; }
@media (min-width: 900px) { .block__title { --bx-l: calc(var(--gap) / -2); } }
@media (prefers-reduced-motion: reduce) { .block::after, .block__title::before { transition: none; } }

/* Project brief pages (Nuton, Kova, Freshile, TLS) */
.pj-hero { margin: 0; border-radius: 0; overflow: hidden; border: 0; background: var(--panel); }
.pj-hero--web img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.pj-bar { display: flex; align-items: center; gap: 0.7rem; height: 2.1rem; padding: 0 0.9rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 4%, var(--bg)); }
.pj-dots { display: flex; gap: 5px; }
.pj-dots i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.pj-url { flex: 1; text-align: center; margin-right: 2.4rem; font: 0.6875rem/1 var(--font-mono); color: var(--muted); }
.pj-hero--phones { display: flex; justify-content: center; align-items: center; gap: clamp(0.6rem, 2vw, 1.5rem); padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 3vw, 2.5rem); aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(90% 90% at 50% 50%, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel)); }
.pj-hero--phones img { width: auto; height: auto; min-width: 0; max-width: 30%; max-height: 100%; object-fit: contain; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 50px -22px rgb(0 0 0 / 0.5); }
.pj-facts { margin-top: 0; border-bottom: 0; }
.pj-copy { display: grid; gap: 2rem; max-width: 40rem; }
.pj-h { font-weight: 500; font-size: 1rem; margin-bottom: 0.5rem; }
.pj-block p { color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }
.pj-cta { margin-top: 2.25rem; }
.pj-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 2.5rem; min-width: min(100%, 20rem); padding: 0.7rem 0.7rem 0.7rem 1.4rem; border: 1px solid var(--guide); border-radius: 999px; background: var(--panel, transparent); color: var(--ink); text-decoration: none; transition: border-color 0.3s, background-color 0.3s, transform 0.35s var(--ease-out); }
.pj-btn__text { display: grid; gap: 0.3rem; text-align: left; }
.pj-btn__text small { font: 0.6875rem/1 var(--font-mono); color: var(--muted); }
.pj-btn__text b { font-weight: 500; font-size: 1rem; line-height: 1.1; letter-spacing: -0.01em; }
.pj-btn__ic { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--ink); color: var(--bg); transition: background-color 0.3s, transform 0.4s var(--ease-spring); }
.pj-btn__ic svg { width: 1.05rem; height: 1.05rem; transition: transform 0.35s var(--ease-spring); }
.pj-btn:hover { border-color: var(--accent); }
.pj-btn:hover .pj-btn__ic { background: var(--accent); }
.pj-btn:hover .pj-btn__ic svg { transform: translate(2px, -2px); }
.pj-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* project hero: the image fills its whole box, guide to guide */
.main > .pj-heroWrap { padding: 0; }
@media (min-width: 900px) { .main > .pj-heroWrap { padding-inline: 0; } }
.pj-hero--phones img { border-radius: 18px; }

/* small screens: give the phone screens more room */
@media (max-width: 640px) {
  .pj-hero--phones { aspect-ratio: 5 / 4; padding: 1rem 0.75rem; gap: 0.45rem; }
  .pj-hero--phones img { max-width: 31%; border-radius: 12px; }
}

/* anchored sections stop below the sticky top nav on small screens */
@media (max-width: 899px) { .main [id], main [id] { scroll-margin-top: 4.5rem; } }

/* Get the app: Play Store and App Store links */
.store-row { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; vertical-align: middle; }
.store-pill { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.4rem; padding: 0 1rem 0 0.85rem; border: 1px solid var(--guide); border-radius: 999px; color: var(--ink); font-size: 0.8125rem; line-height: 1; text-decoration: none; transition: border-color 0.2s, color 0.2s, background-color 0.2s; }
.store-pill svg { width: 1rem; height: 1rem; }
.store-pill:hover { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.store-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cs-store { margin: 1.25rem 0 0; }
.pj-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.tl__link--store { display: inline-flex; align-items: center; gap: 0.4rem; }
.tl__link--store svg { width: 0.95em; height: 0.95em; margin: 0; vertical-align: 0; }

/* archive action row: the same underlined text links as every other archive entry */
.arc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.75rem; }
.arc__link--store svg { width: 0.95rem; height: 0.95rem; transition: none; }
.arc__link--store:hover svg { transform: none; }

/* store buttons: the same component as the live-site bar, quieter */
.pj-btn--store { min-width: 0; gap: 1.4rem; }
.pj-btn--store .pj-btn__ic { background: transparent; color: var(--ink); border: 1px solid var(--guide); transition: border-color 0.3s, color 0.3s, background-color 0.3s; }
.pj-btn--store .pj-btn__ic svg { width: 1.1rem; height: 1.1rem; }
.pj-btn--store:hover .pj-btn__ic { background: transparent; border-color: var(--accent); color: var(--accent); }
.pj-btn--store:hover .pj-btn__ic svg { transform: none; }
.cs-store { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin: 1.5rem 0 0; }

/* phone screens: one consistent device frame, so every edge, corner and gap matches */
.pj-hero--phones { gap: clamp(1rem, 3vw, 2.25rem); }
.pj-hero--phones .pj-phone { display: block; height: 100%; max-width: 31%; aspect-ratio: 410 / 877; border: 6px solid color-mix(in srgb, var(--ink) 13%, var(--panel, var(--bg))); border-radius: 2.4rem; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 9%, transparent), 0 26px 50px -30px rgb(0 0 0 / 0.4); }
.pj-hero--phones .pj-phone img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: top center; border: 0; border-radius: 0; box-shadow: none; transform: scale(1.012); }
@media (max-width: 640px) { .pj-hero--phones .pj-phone { max-width: 31%; border-width: 3px; border-radius: 1.2rem; } }

/* phones on small screens: size by width so a screen is never cropped */
@media (max-width: 760px) {
  .pj-hero--phones { aspect-ratio: auto; align-items: center; padding: 1.1rem 0.8rem; gap: 0.5rem; }
  .pj-hero--phones .pj-phone { width: 31%; max-width: none; height: auto; aspect-ratio: 410 / 877; border-width: 3px; border-radius: 1.15rem; }
  .pj-hero--phones .pj-phone img { height: 100%; transform: none; }
}

/* small screens: the live-site bar spans the row, the two store buttons share the next one */
@media (max-width: 640px) {
  .pj-cta, .cs-store { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; width: 100%; }
  .pj-cta .pj-btn:not(.pj-btn--store) { grid-column: 1 / -1; width: 100%; }
  .pj-btn { min-width: 0; gap: 0.75rem; padding: 0.6rem 0.6rem 0.6rem 1.1rem; }
  .pj-btn__ic { width: 2.4rem; height: 2.4rem; }
  .pj-btn--store { gap: 0.5rem; padding-left: 1rem; }
  .pj-btn--store .pj-btn__text b { font-size: 0.9rem; white-space: nowrap; }
}

/* Theme and sound: two clear buttons with a divider between them */
.corner { padding: 0; overflow: hidden; gap: 0; }
.corner .tools { display: flex; align-items: stretch; gap: 0; }
.corner .icon-btn { width: 2.4rem; height: 2.4rem; border-radius: 0; }
.corner .icon-btn + .icon-btn { border-left: 1px solid var(--guide); }
.corner .icon-btn svg { width: 1.1rem; height: 1.1rem; }
@media (pointer: coarse) { .corner .icon-btn { width: 2.9rem; height: 2.9rem; } }

/* phones: a small vertical control that stays on screen, in easy reach of the thumb */
@media (max-width: 899px) {
  .corner { position: fixed; top: auto; bottom: max(5rem, calc(env(safe-area-inset-bottom) + 4.5rem)); right: 0.75rem; flex-direction: column; box-shadow: 0 10px 28px -14px rgb(0 0 0 / 0.35); }
  .corner .tools { flex-direction: column; }
  .corner .icon-btn { width: 3rem; height: 3rem; }
  .corner .icon-btn + .icon-btn { border-left: 0; border-top: 1px solid var(--guide); }
}

/* a quiet hint that the pictures can be moved */
.collage__hint { position: absolute; left: 0.9rem; bottom: 0.85rem; z-index: 1; margin: 0; padding: 0.4rem 0.6rem; font: 0.6875rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--guide); background: color-mix(in srgb, var(--bg) 80%, transparent); pointer-events: none; transition: opacity 0.5s ease; }
.collage.is-used .collage__hint { opacity: 0; }
@media (max-width: 899px) { .collage__hint { left: 0.6rem; bottom: 0.6rem; font-size: 0.625rem; } }

/* ---------- Footer playground: pieces to throw around, and a game of noughts and crosses ---------- */
@media (max-width: 899px) { .foot { padding-right: 4.75rem; padding-bottom: 5.5rem; } }


/* ---------- ROCKFALL: an arcade mini game in the footer ---------- */
.rf { margin-bottom: clamp(1rem, 2.5vw, 1.5rem); }
.rf__intro { display: block; padding: 0 0.1rem; }
.rf__lead { margin: 0; font-weight: 500; font-size: clamp(1.0625rem, 1.8vw, 1.25rem); line-height: 1.25; letter-spacing: -0.02em; }
.rf__sub { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.rf__sub span:not(:empty) { margin-left: 0.5rem; padding-left: 0.6rem; border-left: 1px solid var(--guide); font: 0.75rem/1 var(--font-mono); color: var(--accent); }
.rf__stage { display: block; }
.rf__clip { min-height: 0; }
.rf__arena { position: relative; isolation: isolate; margin-top: 1.1rem; height: clamp(28rem, 64vh, 34rem); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 93%, var(--ink)) 0%, var(--bg) 75%); user-select: none; -webkit-user-select: none; }
.rf__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; }
.rf__arena.is-playing .rf__canvas { cursor: none; touch-action: none; }

/* HUD: compact and part of the scene */
.rf__hud { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 1rem; padding: 0.9rem 1.1rem; pointer-events: none; }
.rf__score b { display: block; font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; transform-origin: 0 100%; }
.rf__score b.is-bump { animation: rf-bump 0.4s var(--ease-spring); }
@keyframes rf-bump { 40% { transform: scale(1.16); color: var(--accent); } }
.rf__meta { display: grid; gap: 0.45rem; padding-top: 0.15rem; }
.rf__tm { font: 0.75rem/1 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.rf__lv { display: flex; align-items: center; gap: 0.55rem; font-size: 0.75rem; line-height: 1; }
.rf__lv b { font-weight: 500; }
.rf__pips { display: flex; gap: 3px; }
.rf__pips span { width: 10px; height: 3px; border-radius: 2px; background: var(--guide); transition: background-color 0.4s; }
.rf__pips span.is-on { background: var(--accent); }
.rf__bestb { margin-left: auto; padding-top: 0.5rem; font: 0.6875rem/1 var(--font-mono); letter-spacing: 0.04em; color: var(--muted); }
.rf__bestb b { margin-left: 0.4rem; font-weight: 500; color: var(--ink); }
.rf__ctl { display: flex; gap: 0.4rem; pointer-events: auto; }
.rf__iconbtn { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--guide); border-radius: 50%; background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--muted); cursor: pointer; transition: color 0.2s, border-color 0.2s, transform 0.25s var(--ease-spring); }
.rf__iconbtn:hover { color: var(--ink); border-color: var(--muted); transform: translateY(-1px); }
.rf__iconbtn svg { width: 1.05rem; height: 1.05rem; }
.rf__sound[aria-pressed="false"] .rf__w { display: none; }
.rf__sound[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.rf__pause .rf__pl { display: none; }
[data-rf-state="paused"] .rf__pause .rf__pl { display: block; }
[data-rf-state="paused"] .rf__pause .rf__pp { display: none; }
.rf__iconbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* on the title screen the HUD steps aside, only the sound control stays */
[data-rf-state="ready"] .rf__score, [data-rf-state="ready"] .rf__meta, [data-rf-state="ready"] .rf__bestb, [data-rf-state="ready"] .rf__pause, [data-rf-state="over"] .rf__pause { visibility: hidden; }
[data-rf-state="ready"] .rf__ctl { margin-left: auto; }

/* screens: no dialog boxes, the text sits in the scene */
.rf__overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 1rem; animation: rf-in 0.4s ease both; }
.rf__overlay[hidden] { display: none; }
@keyframes rf-in { from { opacity: 0; } }
.rf__overlay.is-title { place-items: start center; padding-top: clamp(2.6rem, 11vh, 4rem); pointer-events: none; }
.rf__overlay.is-title > * { pointer-events: auto; }
.rf__overlay.is-over, .rf__overlay.is-pause { background: radial-gradient(130% 110% at 50% 0%, color-mix(in srgb, var(--bg) 90%, transparent) 25%, color-mix(in srgb, var(--bg) 66%, transparent) 100%); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rf__headline { margin: 0; max-width: 23rem; font-size: clamp(0.9375rem, 1.6vw, 1.0625rem); line-height: 1.4; color: color-mix(in srgb, var(--ink) 78%, var(--bg)); text-wrap: balance; }
.rf__controls { margin: 0; font: 0.6875rem/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rf__lbtn { border: 0; background: none; padding: 0.2rem 0; color: var(--muted); font: inherit; font-size: 0.8125rem; text-decoration: underline; text-decoration-color: var(--guide); text-underline-offset: 0.25em; cursor: pointer; transition: color 0.2s, text-decoration-color 0.2s; }
.rf__lbtn:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* the main button: chunky, presses down like an arcade key */
.rf__play { display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem; height: 3.4rem; padding: 0 1.8rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 52%, #000), 0 14px 28px -14px color-mix(in srgb, var(--accent) 65%, transparent); transition: transform 0.18s var(--ease-spring), box-shadow 0.18s, filter 0.2s; }
.rf__play i { display: inline-block; font-style: normal; transition: transform 0.25s var(--ease-spring); }
.rf__play:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 52%, #000), 0 18px 30px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.rf__play:hover i { transform: translateX(4px); }
.rf__play:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 52%, #000); }
.rf__play:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.rf__play--sm { height: 2.9rem; padding: 0 1.4rem; font-size: 0.8125rem; }
@media (prefers-reduced-motion: no-preference) { .rf__titlescreen .rf__play { animation: rf-nudge 2.8s ease-in-out 1.4s infinite; } .rf__play:hover { animation: none; } }
@keyframes rf-nudge { 0%, 88%, 100% { transform: none; } 94% { transform: scale(1.045); } }

/* result and pause screens */
.rf__result { display: grid; justify-items: center; gap: 0.75rem; max-width: 26rem; text-align: center; animation: rf-rise 0.55s var(--ease-out) both; }
@keyframes rf-rise { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.rf__rbadge { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.4rem 0.85rem 0.4rem 0.7rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 0.6875rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; animation: rf-badge 0.8s var(--ease-spring) 0.15s both; }
.rf__rbadge svg { width: 0.9rem; height: 0.9rem; }
@keyframes rf-badge { from { opacity: 0; transform: scale(0.4) rotate(-8deg); } }
.rf__rtitle { margin: 0; font-weight: 700; font-size: clamp(2rem, 6vw, 3rem); line-height: 0.95; letter-spacing: -0.045em; }
.rf__rsub { margin: 0; color: color-mix(in srgb, var(--ink) 78%, var(--bg)); font-size: 0.9375rem; }
.rf__rsub b { color: var(--accent); font-weight: 600; }
.rf__sum { display: flex; justify-content: center; margin: 0.35rem 0 0.2rem; }
.rf__sum > div { padding: 0 1.4rem; border-left: 1px solid var(--guide); }
.rf__sum > div:first-child { border-left: 0; }
.rf__sum dt { margin-bottom: 0.4rem; font: 0.5625rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rf__sum dd { margin: 0; font-weight: 500; font-size: 1.9rem; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* level-up banner */
.rf__lvl { position: absolute; left: 50%; top: 36%; z-index: 4; translate: -50% -50%; display: grid; justify-items: center; gap: 0.35rem; text-align: center; pointer-events: none; animation: rf-lvl 1.7s var(--ease-out) both; }
.rf__lvl small { font: 0.6875rem/1 var(--font-mono); letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); }
.rf__lvl b { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 700; line-height: 1; letter-spacing: -0.045em; }
@keyframes rf-lvl { 0% { opacity: 0; transform: translateY(14px) scale(0.9); } 18%, 68% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }

.rf__btn { height: 2.9rem; margin-top: 0.4rem; padding: 0 1.6rem; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: 0.9375rem; font-weight: 500; cursor: pointer; transition: background-color 0.25s, border-color 0.25s, transform 0.3s var(--ease-spring); }
.rf__btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateY(-2px); }
.rf__btn:active { transform: scale(0.97); }
.rf__toast { position: absolute; left: 50%; top: 4.2rem; translate: -50% 0; z-index: 4; padding: 0.4rem 0.8rem; border: 1px solid var(--guide); border-radius: 999px; background: var(--bg); font: 0.6875rem/1 var(--font-mono); color: var(--accent); pointer-events: none; animation: rf-toast 1.4s ease both; }
@keyframes rf-toast { 0% { opacity: 0; transform: translateY(8px); } 15%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .rf__stage { transition: none; } .rf__overlay, .rf__result, .rf__rbadge, .rf__toast, .rf__lvl, .rf__score b.is-bump { animation: none; } }
@media (max-width: 640px) { .rf__arena { height: 30rem; } .rf__hud { gap: 0.8rem; padding: 0.75rem 0.85rem; } .rf__iconbtn { width: 2.75rem; height: 2.75rem; } .rf__bestb { display: none; } .rf__pips span { width: 8px; } .rf__logo { font-size: clamp(2.6rem, 14vw, 3.6rem); } .rf__overlay.is-title { padding-top: 3.4rem; } .rf__sum > div { padding: 0 1rem; } }

/* contact: one big, clickable line, then the email to copy and the links */
.contact__hello-wrap { margin: 0; font-weight: inherit; font-size: inherit; }
.contact__hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; color: color-mix(in srgb, var(--ink) 48%, var(--bg)); font-weight: 500; font-size: clamp(2.6rem, 8.4vw, 6.25rem); line-height: 0.98; letter-spacing: -0.05em; text-decoration: none; transition: color 0.4s ease; }
.contact__hello svg { flex: none; margin-top: 0.12em; width: 0.4em; height: 0.4em; opacity: 0.6; transition: transform 0.45s var(--ease-spring), color 0.3s, opacity 0.3s; }
.contact__hello:hover, .contact__hello:focus-visible { color: var(--ink); }
.contact__hello:hover svg, .contact__hello:focus-visible svg { transform: translate(6px, -6px); color: var(--accent); opacity: 1; }
.contact__hello:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
#contact .block--rf { padding-block: clamp(2rem, 5vw, 3.5rem); }
.block--rf, #contact { padding-top: clamp(2.75rem, 6vw, 4.25rem); }
@media (hover: none) { .contact__hello { color: var(--ink); } .contact__hello svg { opacity: 1; color: var(--accent); } }

/* ---------- ROCKFALL: name entry and leaderboard ---------- */
.rf__arena.is-board { height: auto; min-height: clamp(22rem, 52vh, 28rem); }
.rf__ghost { height: 2.4rem; padding: 0 1.1rem; border: 1px solid var(--guide); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 0.8125rem; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.rf__ghost:hover { border-color: var(--accent); color: var(--accent); }
.rf__ghost:focus-visible, .rf__retry:focus-visible, .rf__tabs button:focus-visible, .rf__field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rf__row2 { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.rf__form { display: grid; gap: 0.55rem; width: min(100%, 22rem); margin-top: 0.3rem; }
.rf__label { font: 0.625rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rf__field { display: flex; gap: 0.5rem; }
.rf__field input { flex: 1; min-width: 0; height: 2.9rem; padding: 0 1.1rem; border: 1px solid var(--guide); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; }
.rf__field input::placeholder { color: var(--muted); }
.rf__field .rf__btn { margin: 0; flex: none; padding: 0 1.2rem; }
.rf__field .rf__btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.rf__err { margin: 0; font-size: 0.8125rem; color: var(--accent); text-align: left; }
.rf__err[hidden] { display: none; }
.rf__overlay.is-board { position: relative; inset: auto; align-items: start; padding: 1rem; }
.rf__board { display: grid; gap: 0.85rem; width: min(100%, 30rem); margin-inline: auto; padding: 1.15rem 1.15rem 1.05rem; border: 1px solid var(--guide); border-radius: 20px; background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: 0 24px 60px -30px rgb(0 0 0 / 0.5); animation: rf-rise 0.5s var(--ease-out) both; }
.rf__bhead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.rf__btitle { margin: 0; font-weight: 600; font-size: 1.5rem; line-height: 1; letter-spacing: -0.04em; }
.rf__total { font: 0.6875rem/1 var(--font-mono); letter-spacing: 0.06em; color: var(--muted); }
.rf__tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 0.2rem; border: 1px solid var(--guide); border-radius: 999px; }
.rf__tabs button { height: 2rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.8125rem; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.rf__tabs button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.rf__rows { list-style: none; margin: 0; padding: 0; min-height: 12rem; }
.rf__row { display: grid; grid-template-columns: 1.9rem minmax(0, 1fr) 3rem 3.4rem; align-items: center; gap: 0.7rem; padding: 0.5rem 0.65rem; border-radius: 12px; animation: rf-row 0.45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.rf__row + .rf__row { border-top: 1px solid var(--line); border-radius: 0; }
@keyframes rf-row { from { opacity: 0; transform: translateY(6px); } }
.rf__rank { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font: 0.75rem/1 var(--font-mono); color: var(--muted); }
.rf__row.is-top1 .rf__rank, .rf__row.is-top2 .rf__rank, .rf__row.is-top3 .rf__rank { color: var(--on-accent); background: var(--accent); }
.rf__row.is-top2 .rf__rank { background: color-mix(in srgb, var(--accent) 68%, var(--bg)); }
.rf__row.is-top3 .rf__rank { background: color-mix(in srgb, var(--accent) 42%, var(--bg)); color: var(--ink); }
.rf__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; }
.rf__you { margin-left: 0.5rem; padding: 0.15rem 0.45rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: normal 0.5625rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 0.1em; }
.rf__time { font: 0.75rem/1 var(--font-mono); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rf__sc { font-weight: 500; font-size: 1.1rem; letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; }
.rf__row.is-me { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 3px 0 0 var(--accent); border-radius: 12px; border-top-color: transparent; }
.rf__row.is-me .rf__name { font-weight: 600; }
.rf__gap { padding: 0.1rem 0 0.1rem 2.3rem; color: var(--muted); letter-spacing: 0.3em; line-height: 1; }
.rf__empty { padding: 2.6rem 1rem; text-align: center; color: var(--muted); font-size: 0.9375rem; }
.rf__retry { border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.rf__row--sk span { height: 0.9rem; border-radius: 6px; background: linear-gradient(90deg, var(--line), color-mix(in srgb, var(--guide) 60%, var(--line)), var(--line)); background-size: 200% 100%; animation: rf-sk 1.2s linear infinite; }
.rf__row--sk span:nth-child(1) { width: 1.4rem; height: 1.4rem; border-radius: 50%; }
.rf__row--sk span:nth-child(3) { grid-column: 3 / 5; }
@keyframes rf-sk { to { background-position: -200% 0; } }
.rf__note { margin: 0; min-height: 1.2em; font: 0.75rem/1.4 var(--font-mono); letter-spacing: 0.02em; color: var(--accent); text-align: center; }
.rf__bact { display: flex; gap: 0.6rem; justify-content: center; }
.rf__bact .rf__btn { margin: 0; height: 2.4rem; font-size: 0.875rem; }
@media (prefers-reduced-motion: reduce) { .rf__board, .rf__row, .rf__row--sk span { animation: none; } }
@media (max-width: 640px) { .rf__board { padding: 1rem 0.85rem; } .rf__row { grid-template-columns: 1.6rem minmax(0, 1fr) 2.6rem 3rem; gap: 0.5rem; padding-inline: 0.4rem; } .rf__field { flex-direction: column; } .rf__field .rf__btn { width: 100%; } }

/* contact: one tidy panel, an email row on top and four equal links below */
.contact__panel { margin-top: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--guide); border-radius: 18px; overflow: hidden; background: color-mix(in srgb, var(--panel) 45%, transparent); }
.contact__mail { display: flex; align-items: center; gap: 1rem 1.5rem; padding: 1.15rem 1.25rem 1.15rem 1.5rem; }
.contact__label { flex: none; width: 3rem; font: 0.625rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact__email { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; font-size: clamp(1.2rem, 2.6vw, 1.75rem); line-height: 1.15; letter-spacing: -0.03em; color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; transition: color 0.25s, text-decoration-color 0.25s; }
.contact__email:hover { color: var(--accent); text-decoration-color: var(--accent); }
.copy { position: relative; flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--guide); border-radius: 50%; background: var(--bg); color: var(--muted); cursor: pointer; transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease-spring); }
.copy:hover { color: var(--ink); border-color: var(--muted); }
.copy:active { transform: scale(0.92); }
.copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.copy__i, .cp__i { grid-area: 1 / 1; width: 1.15rem; height: 1.15rem; transition: opacity 0.2s, transform 0.3s var(--ease-spring); }
.cp__i--check { opacity: 0; transform: scale(0.5); }
.copy.is-done { color: var(--accent); border-color: var(--accent); }
.copy.is-done .cp__i--copy { opacity: 0; transform: scale(0.5); }
.copy.is-done .cp__i--check { opacity: 1; transform: none; }
.copy__tip { position: absolute; right: calc(100% + 0.6rem); top: 50%; padding: 0.35rem 0.6rem; border-radius: 8px; background: var(--ink); color: var(--bg); font: 0.625rem/1 var(--font-mono); letter-spacing: 0.04em; white-space: nowrap; opacity: 0; transform: translate(6px, -50%); pointer-events: none; transition: opacity 0.2s, transform 0.25s; }
.copy.is-done .copy__tip { opacity: 1; transform: translate(0, -50%); }
.contact__list { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--guide); }
.contact__list li + li { border-left: 1px solid var(--guide); }
.contact__item { position: relative; display: flex; align-items: center; gap: 0.85rem; padding: 1.1rem 1.25rem; color: var(--ink); text-decoration: none; transition: background-color 0.25s; }
.contact__item:hover, .contact__item:focus-visible { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.contact__item:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.contact__item .ci { flex: none; width: 1.35rem; height: 1.35rem; fill: currentColor; }
.contact__item .ci--line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact__t { display: grid; gap: 0.3rem; min-width: 0; }
.contact__t b { font-weight: 500; font-size: 0.9375rem; line-height: 1; }
.contact__t small { font: 0.625rem/1 var(--font-mono); letter-spacing: 0.04em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact__item .ca { margin-left: auto; flex: none; width: 0.95rem; height: 0.95rem; color: var(--muted); opacity: 0.55; transition: transform 0.35s var(--ease-spring), color 0.2s, opacity 0.2s; }
.contact__item:hover .ca { transform: translate(3px, -3px); color: var(--accent); opacity: 1; }
@media (max-width: 860px) {
  .contact__list { grid-template-columns: 1fr 1fr; }
  .contact__list li:nth-child(odd) { border-left: 0; }
  .contact__list li:nth-child(n + 3) { border-top: 1px solid var(--guide); }
}
@media (max-width: 520px) {
  .contact__mail { flex-wrap: wrap; padding: 1.1rem 1rem 1.1rem 1.15rem; row-gap: 0.55rem; }
  .contact__label { width: 100%; }
  .contact__email { flex: 1 1 0; }
  .contact__item { padding: 1rem 1rem; gap: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) { .copy__tip, .cp__i { transition: none; } }



/* ---------- Nuton case study: interactive pieces in Nuton's blue ----------
   One scale for everything: statements use the decision-title size, body 15px, captions 13px.
   One window frame (.nu-win), one card (.nu-card look), one rhythm (1.5rem above a widget, 0.75rem above a caption). */
.nu-page { --nu: #2159EB; --nu-on: #FFFFFF; --nu-stage: #F2F4FA; --nu-flame: #F2711C; --nu-ok: #16803C; --nu-bad: #C62828; --nu-pad: clamp(1rem, 3vw, 1.5rem); --nu-r: 16px; }
:root[data-theme="dark"] .nu-page { --nu: #7C9DFF; --nu-on: #0A0A0A; --nu-ok: #5BD08A; --nu-bad: #FF7A7A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nu-page { --nu: #7C9DFF; --nu-on: #0A0A0A; --nu-ok: #5BD08A; --nu-bad: #FF7A7A; } }
.nu-page.is-tldr .nu-long { display: none; }

/* type */
.cs-body p.nu-say { max-width: 30ch; font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 500; line-height: 1.28; letter-spacing: -0.015em; text-wrap: balance; }
.cs-body .nu-say + p { margin-top: 0.9rem; }
.cs-body p.nu-cap { max-width: 36rem; margin-top: 0.75rem; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.nu-sub { margin-top: clamp(2.25rem, 5vw, 3rem); }
.nu-long > * + * { margin-top: 0.9rem; }
.nu-page .cs-section__label { margin-bottom: 1.25rem; }

/* hero */
.nu-heroctl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 1.5rem; }
.nu-heroctl .cs-store { margin: 0; }
.nu-switch { display: inline-flex; align-items: center; gap: 0.6rem; height: 2.6rem; padding: 0 1.05rem 0 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.8125rem; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.nu-switch:hover { border-color: var(--guide); color: var(--ink); }
.nu-switch__track { position: relative; width: 2rem; height: 1.15rem; border-radius: 999px; background: var(--guide); transition: background-color 0.25s; }
.nu-switch__track i { position: absolute; top: 0.15rem; left: 0.15rem; width: 0.85rem; height: 0.85rem; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform 0.3s var(--ease-spring); }
.nu-switch[aria-pressed="true"] { color: var(--ink); }
.nu-switch[aria-pressed="true"] .nu-switch__track { background: var(--nu); }
.nu-switch[aria-pressed="true"] .nu-switch__track i { transform: translateX(0.85rem); }
.nu-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nu-reel { margin: 2rem 0 0; border: 1px solid var(--line); border-radius: var(--nu-r); overflow: hidden; background: var(--panel); }
.nu-reel .pj-bar { border-bottom: 1px solid var(--line); }
.nu-reel__stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.nu-reel__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transform: scale(1.02); transition: opacity 0.7s ease, transform 1.4s var(--ease-out); }
.nu-reel__stage img.is-on { opacity: 1; transform: none; }
.nu-reel__steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); background: var(--panel); }
.nu-reel__steps button { position: relative; padding: 0.85rem 0.9rem 0.9rem; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 0.8125rem; line-height: 1.3; text-align: left; cursor: pointer; transition: color 0.2s; }
.nu-reel__steps button:last-child { border-right: 0; }
.nu-reel__steps button:hover, .nu-reel__steps button[aria-pressed="true"] { color: var(--ink); }
.nu-reel__steps i { position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--nu); }
.nu-reel__steps button[aria-pressed="true"] i { width: var(--p, 100%); }
.nu-reel__steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 640px) {
  .nu-reel__steps { display: flex; overflow-x: auto; scrollbar-width: none; }
  .nu-reel__steps button { flex: 0 0 auto; white-space: nowrap; }
}

/* segmented control: one style everywhere */
.nu-seg { display: inline-flex; gap: 2px; max-width: 100%; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.nu-seg button { flex: none; padding: 0.5rem 1rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.8125rem; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.nu-seg button:hover { color: var(--ink); }
.nu-seg button[aria-selected="true"], .nu-seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 0 0 1px var(--line); }
.nu-seg--accent button[aria-pressed="true"] { background: var(--nu); color: var(--nu-on); box-shadow: none; }
.nu-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nu-seg--scroll { overflow-x: auto; scrollbar-width: none; }
.nu-seg--scroll::-webkit-scrollbar { display: none; }

/* the window frame */
.nu-tabs { margin-top: 1.5rem; }
.nu-win { margin: 1rem 0 0; border: 1px solid var(--line); border-radius: var(--nu-r); overflow: hidden; background: var(--panel); }
.nu-win--solo { margin-top: 1.5rem; }
.nu-win .pj-bar { border-bottom: 1px solid var(--line); }
.nu-win img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; object-position: top center; background: #fff; transition: opacity 0.2s ease; }
.nu-win img.is-swap { opacity: 0; }
.nu-win__stack { position: relative; aspect-ratio: 16 / 10; background: #fff; }
.nu-win__stack img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; transition: opacity 0.35s ease; }
.nu-cmp__stack { user-select: none; -webkit-user-select: none; }
.nu-cmp__stack img { transition: none; pointer-events: none; }
.nu-cmp__old { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.nu-cmp__bar { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--nu); pointer-events: none; }
.nu-cmp__bar i { position: absolute; top: 50%; left: 50%; width: 2.5rem; height: 2.5rem; margin: -1.25rem 0 0 -1.25rem; border-radius: 50%; background: var(--nu); box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.45); }
.nu-cmp__bar i::before, .nu-cmp__bar i::after { content: ""; position: absolute; top: 50%; width: 0.42rem; height: 0.42rem; margin-top: -0.21rem; border: solid var(--nu-on); border-width: 0 0 2px 2px; }
.nu-cmp__bar i::before { left: 0.7rem; transform: rotate(45deg); }
.nu-cmp__bar i::after { right: 0.7rem; transform: rotate(-135deg); }
.nu-cmp__range { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.nu-cmp__stack:has(.nu-cmp__range:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.nu-cmp__tag { position: absolute; bottom: 0.75rem; z-index: 1; padding: 0.3rem 0.6rem; border-radius: 999px; background: rgb(17 17 17 / 0.72); color: #fff; font: 0.6875rem/1 var(--font-mono); pointer-events: none; }
.nu-cmp__tag--l { left: 0.75rem; }
.nu-cmp__tag--r { right: 0.75rem; background: var(--nu); color: var(--nu-on); }
.nu-cmp__ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; }
.nu-cmp { margin-top: 1.5rem; }

/* loop */

/* cards: interactive widgets share padding, radius and surface */
.nu-style, .nu-nuri, .nu-quiz, .nu-streak, .nu-phones { margin-top: 1.5rem; padding: var(--nu-pad); border: 1px solid var(--line); border-radius: var(--nu-r); background: var(--panel); }

/* learning style picker */
.cs-body .nu-style__q { max-width: none; font-weight: 500; font-size: 1rem; text-align: center; }
.nu-style__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 1rem; }
.nu-style__opts button { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 0.75rem; row-gap: 0.1rem; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.nu-style__opts svg { grid-row: span 2; width: 2.1rem; height: 2.1rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); }
.nu-style__opts b { font-weight: 500; font-size: 0.875rem; }
.nu-style__opts span { font-size: 0.8125rem; color: var(--muted); }
.nu-style__opts button:hover { border-color: var(--guide); }
.nu-style__opts button[aria-checked="true"] { border-color: var(--nu); box-shadow: inset 0 0 0 1px var(--nu); }
.nu-style__opts button[aria-checked="true"] svg { border-color: var(--nu); color: var(--nu); }
.nu-style__opts button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nu-style__prev { margin-top: 0.6rem; padding: 1.1rem 1.25rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.cs-body .nu-style__prev p { max-width: none; }
.nu-style__lab { font: 0.6875rem/1.2 var(--font-mono); color: var(--muted); }
.cs-body .nu-style__h { margin-top: 0.6rem; font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 1.125rem; letter-spacing: -0.01em; }
.cs-body .nu-style__t { margin-top: 0.4rem; font-size: 0.9375rem; line-height: 1.6; min-height: 4.8em; }
.nu-style__t.is-in, .nu-nuri__stage.is-in .nu-nuri__when { animation: nu-fade 0.4s ease both; }
@keyframes nu-fade { from { opacity: 0; transform: translateY(4px); } }
@media (max-width: 560px) { .nu-style__opts { grid-template-columns: minmax(0, 1fr); } }

/* Nuri */
.nu-nuri { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
@media (min-width: 760px) { .nu-nuri { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 1rem; } }
.nu-nuri__stage { display: grid; justify-items: center; align-content: center; padding: 1.5rem 1rem 1.25rem; border-radius: 12px; background: var(--nu-stage); color: #111; text-align: center; min-height: 16rem; }
.nu-nuri__art { width: auto; height: 9rem; transform-origin: 50% 100%; }
.nu-nuri__stage.is-in .nu-nuri__art { animation: nu-pop 0.55s var(--ease-spring) both; }
@keyframes nu-pop { 0% { transform: scale(1.06, 0.9); } 55% { transform: scale(0.97, 1.05); } 100% { transform: none; } }
@media (prefers-reduced-motion: no-preference) { .nu-nuri__art { animation: nu-breathe 3.2s ease-in-out infinite; } }
@keyframes nu-breathe { 50% { transform: scale(1.012, 0.985); } }
.cs-body .nu-nuri__name { margin-top: 0.9rem; font-weight: 500; font-size: 1rem; }
.cs-body .nu-nuri__when { margin-top: 0.25rem; max-width: 13rem; font-size: 0.8125rem; line-height: 1.45; color: #5a5a57; }
.nu-nuri__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.9rem, 1fr)); gap: 0.45rem; align-content: start; }
.nu-nuri__grid button { display: grid; justify-items: center; gap: 0.35rem; padding: 0.6rem 0.25rem 0.55rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); font: inherit; font-size: 0.75rem; cursor: pointer; transition: border-color 0.2s, color 0.2s, transform 0.25s var(--ease-spring); }
.nu-nuri__grid img { width: 2.75rem; height: 2.75rem; padding: 0.2rem; object-fit: contain; border-radius: 50%; background: var(--nu-stage); }
.nu-nuri__grid button:hover { color: var(--ink); transform: translateY(-2px); }
.nu-nuri__grid button[aria-checked="true"] { border-color: var(--nu); color: var(--ink); box-shadow: inset 0 0 0 1px var(--nu); }
.nu-nuri__grid button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-side.nu-side { margin-top: clamp(1.75rem, 4vw, 2.5rem); align-items: center; }
@media (min-width: 700px) { .cs-side.nu-side { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 2.5rem); } }
.nu-loopvid { margin: 0; padding: 0; border: 0; background: none; }
.nu-loopvid video { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: var(--nu-r); background: #fff; }
.nu-loopvid figcaption { margin-top: 0.6rem; padding: 0; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.nu-vid--dark { display: none !important; }
:root[data-theme="dark"] .nu-vid--light { display: none !important; }
:root[data-theme="dark"] .nu-vid--dark { display: block !important; background: #000; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nu-vid--light { display: none !important; }
  :root:not([data-theme="light"]) .nu-vid--dark { display: block !important; background: #000; }
}

/* quiz */
.nu-quiz__top { display: grid; gap: 0.55rem; font-size: 0.8125rem; color: var(--muted); }
.nu-quiz__bar { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.nu-quiz__bar i { display: block; width: 6.67%; height: 100%; border-radius: 4px; background: var(--nu); }
.cs-body .nu-quiz__q { max-width: none; margin-top: 1.1rem; font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: clamp(1.125rem, 2vw, 1.3rem); line-height: 1.3; }
.nu-quiz__opts { display: grid; gap: 0.5rem; margin-top: 1rem; }
.nu-quiz__opts button { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 0.9375rem; line-height: 1.4; text-align: left; cursor: pointer; transition: border-color 0.2s, background-color 0.25s, color 0.25s, opacity 0.25s; }
.nu-quiz__opts button::before { content: attr(data-k); flex: none; display: grid; place-items: center; width: 1.65rem; height: 1.65rem; border: 1px solid var(--guide); border-radius: 50%; font-size: 0.75rem; color: var(--muted); }
.nu-quiz__opts button:hover { border-color: var(--guide); }
.nu-quiz__opts button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nu-quiz.is-done .nu-quiz__opts button { pointer-events: none; }
.nu-quiz.is-done .nu-quiz__opts button:not(.is-right):not(.is-wrong) { opacity: 0.5; }
.nu-quiz__opts button.is-right { border-color: var(--nu-ok); background: color-mix(in srgb, var(--nu-ok) 11%, var(--bg)); color: var(--nu-ok); }
.nu-quiz__opts button.is-right::before { content: "✓"; border: 0; background: var(--nu-ok); color: var(--bg); }
.nu-quiz__opts button.is-wrong { border-color: var(--nu-bad); background: color-mix(in srgb, var(--nu-bad) 9%, var(--bg)); color: var(--nu-bad); }
.nu-quiz__opts button.is-wrong::before { content: "✕"; border: 0; background: var(--nu-bad); color: var(--bg); }
.nu-quiz__fb { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); align-items: start; gap: 0.9rem; margin-top: 0.75rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); animation: nu-fade 0.4s ease both; }
.nu-quiz__fb[hidden] { display: none; }
.nu-quiz__fb img { width: 3.6rem; height: 3.6rem; padding: 0.25rem; object-fit: contain; border-radius: 12px; background: var(--nu-stage); }
.cs-body .nu-quiz__fb p { max-width: none; }
.nu-quiz__verdict { font-weight: 500; font-size: 1rem; }
.cs-body .nu-quiz__why { margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.55; color: var(--muted); }
.nu-quiz__why b { display: block; font-weight: 500; color: var(--ink); }
.nu-quiz__again { grid-column: 2; justify-self: start; height: 2.25rem; padding: 0 0.95rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 0.8125rem; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.nu-quiz__again:hover { border-color: var(--nu); color: var(--nu); }

/* streak */
.nu-streak__head { display: flex; align-items: center; gap: 1rem; }
.nu-streak__head img { flex: none; width: 4.4rem; height: 4.4rem; padding: 0.3rem; object-fit: contain; border-radius: 14px; background: var(--nu-stage); }
.nu-streak__head img.is-in { animation: nu-pop 0.55s var(--ease-spring) both; }
.cs-body .nu-streak__n { font-size: 0.9375rem; color: var(--muted); }
.nu-streak__n b { margin-right: 0.3rem; font-size: 2.25rem; font-weight: 500; line-height: 1; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.cs-body .nu-streak__msg { margin-top: 0.15rem; font-size: 0.875rem; color: var(--muted); }
.cs-body .nu-streak__week { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; max-width: none; margin: 1.25rem 0 0; padding: 0; }
.cs-body .nu-streak__week li { display: grid; justify-items: center; gap: 0.35rem; margin: 0; font-size: 0.75rem; color: var(--muted); }
.nu-streak__week li::before { content: ""; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--line); color: #fff; font-size: 0.8rem; transition: background-color 0.3s, transform 0.35s var(--ease-spring); }
.nu-streak__week li.is-done::before { content: "✓"; background: var(--nu-flame); transform: scale(1.06); }
.nu-streak__week li.is-done { color: var(--ink); }
.nu-streak__ms { margin-top: 1.25rem; }
.nu-streak__track { display: block; height: 4px; margin-inline: 10%; border-radius: 4px; background: var(--line); overflow: hidden; }
.nu-streak__track i { display: block; height: 100%; width: var(--f, 0%); border-radius: 4px; background: var(--nu-flame); transition: width 0.6s var(--ease-out); }
.cs-body .nu-streak__ms ol { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: none; margin: 0.6rem 0 0; padding: 0; text-align: center; }
.cs-body .nu-streak__ms li { margin: 0; font-size: 0.75rem; color: var(--muted); transition: color 0.3s; }
.nu-streak__ms li.is-hit { color: var(--nu-flame); font-weight: 500; }
.nu-streak__ctl { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.nu-btn { height: 2.5rem; padding: 0 1.2rem; border: 1px solid var(--nu); border-radius: 999px; background: var(--nu); color: var(--nu-on); font: inherit; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: transform 0.25s var(--ease-spring); }
.nu-btn:hover { transform: translateY(-2px); }
.nu-btn:active { transform: scale(0.97); }
.nu-btn--ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.nu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nu-streak + .nu-cap { margin-bottom: 0; }
.nu-streak ~ .nu-tabs { margin-top: clamp(1.75rem, 4vw, 2.5rem); }

/* phones */
.nu-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.75rem, 2.5vw, 1.5rem); padding: clamp(1.25rem, 4vw, 2.5rem); }
.nu-phones figure { margin: 0; }
.nu-phones img { display: block; width: 100%; height: auto; border-radius: clamp(14px, 3vw, 24px); box-shadow: 0 24px 50px -28px rgb(0 0 0 / 0.45); }
.nu-phones figcaption { margin-top: 0.75rem; text-align: center; font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 640px) { .nu-phones { padding: 1rem 0.75rem; } }

/* stat tiles: override the generic list style inside case-study bodies */
.nu-page .cs-body ul.cs-stats { list-style: none; max-width: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.6rem; }
.nu-page .cs-body ul.cs-stats li { margin: 0; align-content: start; min-width: 0; padding: 0.9rem 1rem 1rem; border-radius: 12px; }
.nu-page .cs-stats strong { font-size: 1.5rem; }
.nu-page .cs-body p.cs-stats__note { margin-top: 0.75rem; max-width: none; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.nu-page .cs-body ul.cs-stats + p { margin-top: 1.25rem; }
.nu-page .cs-body .pj-cta { margin-top: 1.75rem; }

/* the learning loop: a ring with Nuri in the middle, the real screen beside it */
.nu-loop { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: center; margin-top: 1.5rem; padding: var(--nu-pad); border: 1px solid var(--line); border-radius: var(--nu-r); background: var(--panel); }
@media (min-width: 820px) { .nu-loop { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); } }
.nu-ring { position: relative; width: 100%; max-width: 22rem; aspect-ratio: 1; margin-inline: auto; }
.nu-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.nu-ring__track { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 7; }
.nu-ring__arc { fill: none; stroke: var(--nu); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 804.2; stroke-dashoffset: 804.2; transition: stroke-dashoffset 0.9s var(--ease-out); }
.nu-ring__nuri { position: absolute; left: 50%; top: 50%; width: 31%; height: auto; transform: translate(-50%, -52%); transform-origin: 50% 100%; filter: drop-shadow(0 10px 18px rgb(33 89 235 / 0.25)); }
.nu-ring__nuri.is-in { animation: nu-pop-c 0.6s var(--ease-spring) both; }
@keyframes nu-pop-c { 0% { transform: translate(-50%, -52%) scale(0.86); opacity: 0.4; } 100% { transform: translate(-50%, -52%); opacity: 1; } }
.nu-ring__node { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 0.15rem; min-width: 5.4rem; padding: 0.5rem 0.7rem 0.55rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); font: inherit; cursor: pointer; transition: border-color 0.3s, color 0.3s, transform 0.4s var(--ease-spring), box-shadow 0.3s; }
.nu-ring__node i { font: normal 0.625rem/1 var(--font-mono); }
.nu-ring__node span { font-size: 0.8125rem; line-height: 1.2; }
.nu-ring__node:hover { color: var(--ink); border-color: var(--guide); }
.nu-ring__node[aria-pressed="true"] { transform: translate(-50%, -50%) scale(1.08); border-color: var(--nu); color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--nu) 16%, transparent); }
.nu-ring__node[aria-pressed="true"] i { color: var(--nu); }
.nu-ring__node:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nu-loop__side { display: grid; gap: 1.1rem; min-width: 0; }
.nu-loop__panes { display: grid; }
.nu-loop__pane { grid-area: 1 / 1; opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.45s var(--ease-out); pointer-events: none; }
.nu-loop__pane.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cs-body .nu-loop__k { max-width: none; font: 0.6875rem/1.2 var(--font-mono); color: var(--muted); }
.cs-body .nu-loop__h { max-width: none; margin-top: 0.5rem; font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; }
.cs-body .nu-loop__t { max-width: 30rem; margin-top: 0.5rem; font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }
.nu-win--mini { margin: 0; }
.nu-win--mini .pj-bar { height: 1.9rem; }
.nu-win--mini .nu-win__stack img { opacity: 0; transition: opacity 0.5s ease, transform 0.8s var(--ease-out); transform: scale(1.03); }
.nu-win--mini .nu-win__stack img.is-on { opacity: 1; transform: none; }
@media (max-width: 819px) {
  .nu-ring { max-width: 20rem; }
  .nu-ring__node { min-width: 4.4rem; padding: 0.4rem 0.5rem 0.45rem; }
  .nu-ring__node span { font-size: 0.75rem; }
}

/* ---- Nuton case study v3: horizontal rows like a studio case study ----
   Label on the left, statement and text in a right column, media breaking out below. */
.cs-body p.nu-say { max-width: 32ch; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.3; }
.nu-page .cs-body p.nu-long, .nu-page .cs-body .nu-long p { color: color-mix(in srgb, var(--ink) 76%, var(--bg)); }
.nu-page .cs-section__label { font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.nu-rowlabel { font-size: 0.875rem; color: var(--muted); }
.nu-sub { margin-top: 0; }

/* the stage: a Nuton-blue panel the window sits on */
.nu-stage { position: relative; margin-top: 1rem; padding: clamp(0.75rem, 3.5vw, 2rem); border-radius: var(--nu-r); overflow: hidden; background: radial-gradient(120% 100% at 12% 0%, #3b72ff 0%, #2159EB 38%, #1a47c4 75%, #163FBA 100%); }
.nu-stage::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / 0.16) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%); mask-image: linear-gradient(180deg, #000, transparent 75%); pointer-events: none; }
.nu-stage .nu-win { position: relative; margin: 0; border-color: rgb(255 255 255 / 0.14); box-shadow: 0 40px 70px -28px rgb(4 12 48 / 0.7), 0 2px 0 rgb(255 255 255 / 0.06) inset; }
.nu-tabs .nu-stage, .nu-cmp .nu-stage { margin-top: 0.85rem; }
.nu-win--solo { margin-top: 0; }
.nu-page .cs-body > .nu-stage { margin-top: 1.5rem; }

@media (min-width: 1100px) {
  .nu-page .cs-section > .grid { display: grid; grid-template-columns: 10rem minmax(0, 1fr); column-gap: 1.5rem; align-items: start; }
  .nu-page .cs-section__body { display: contents; }
  .nu-page .cs-section__label { grid-column: 1; grid-row: 1; margin: 0; padding-top: 0.15rem; }
  .nu-page .cs-section__body > * { grid-column: 1 / -1; }
  .nu-page .cs-section__body > .nu-say,
  .nu-page .cs-section__body > .nu-long,
  .nu-page .cs-section__body > .nu-rowtext,
  .nu-page .cs-section__body > p.nu-cap,
  .nu-page .cs-section__body > p.cs-stats__note,
  .nu-page .cs-section__body > .pj-cta { grid-column: 2; }
  .nu-page .cs-section__body > .nu-rowlabel { grid-column: 1; margin-top: clamp(2.25rem, 5vw, 3rem); padding-top: 0.15rem; }
  .nu-page .cs-section__body > .nu-rowtext { margin-top: clamp(2.25rem, 5vw, 3rem); }
  .nu-page .cs-section__body > .nu-rowlabel + .nu-rowtext { margin-top: clamp(2.25rem, 5vw, 3rem); }
  .nu-page .cs-section__body > .nu-say:first-of-type { grid-row: 1; }
}

/* ---- Nuton case study: type scale, locked ----
   statement 16px, paragraph 14px, label 14px, caption 13px (unchanged). */
.nu-page .cs-body p, .nu-page .cs-body li { font-size: 0.875rem; line-height: 1.65; }
.nu-page .cs-body p.nu-say, .nu-page .cs-body .nu-sub, .nu-page .cs-body .nu-loop__h { font-size: 1rem; line-height: 1.4; letter-spacing: -0.01em; font-weight: 500; max-width: 36ch; }
.nu-page .cs-body p.nu-cap, .nu-page .cs-body p.cs-stats__note, .nu-page .nu-loopvid figcaption { font-size: 0.8125rem; line-height: 1.5; }
.nu-page .cs-section__label, .nu-page .nu-rowlabel { font-size: 0.875rem; line-height: 1.5; }
.nu-page .cs-lede { font-size: 1rem; line-height: 1.6; }
.nu-page .cs-fact dt, .nu-page .cs-fact dd { font-size: 0.875rem; line-height: 1.55; }
.nu-page .cs-body p.nu-loop__t, .nu-page .cs-body .nu-style__t, .nu-page .cs-body .nu-style__prev p { font-size: 0.875rem; }
.nu-page .cs-body .nu-style__h, .nu-page .cs-body .nu-quiz__q, .nu-page .cs-body .nu-nuri__name { font-size: 1rem; }
.nu-page .nu-quiz__opts button, .nu-page .cs-body .nu-quiz__why, .nu-page .cs-body .nu-streak__msg { font-size: 0.875rem; }
.nu-page .cs-body .nu-quiz__verdict { font-size: 0.875rem; }
.nu-page .cs-body .nu-loop__k { font-size: 0.75rem; }

/* Nuton rows: label at the start, text block pushed to the far end, wide gap between */
@media (min-width: 1100px) {
  .nu-page .cs-section > .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 38rem); column-gap: clamp(2rem, 6vw, 6rem); }
  .nu-page .cs-section__body > .nu-say, .nu-page .cs-section__body > .nu-long, .nu-page .cs-section__body > .nu-rowtext, .nu-page .cs-section__body > p.nu-cap, .nu-page .cs-section__body > p.cs-stats__note, .nu-page .cs-section__body > .pj-cta { grid-column: 2; }
  .nu-page .cs-body p, .nu-page .cs-body ul { max-width: none; }
  .nu-page .cs-body p.nu-say, .nu-page .cs-body .nu-sub { max-width: 36ch; }
}

/* ---- neutral stage (the portfolio's own surface, no brand colour) ---- */
.nu-stage { padding: clamp(0.75rem, 3vw, 1.75rem); border: 1px solid var(--line); background: var(--panel); }
.nu-stage::before { display: none; }
.nu-stage .nu-win { border-color: var(--line); box-shadow: 0 24px 48px -30px rgb(0 0 0 / 0.45); }

/* ---- metrics: one bordered strip, hairline dividers, big numbers ---- */
.nu-page .cs-body ul.nu-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0; max-width: none; margin: 1.75rem 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--nu-r); background: var(--panel); overflow: hidden; }
.nu-page .cs-body ul.nu-metrics li { display: grid; gap: 0.4rem; align-content: start; margin: 0; min-width: 0; padding: clamp(1.1rem, 3vw, 1.6rem) clamp(1.1rem, 3vw, 1.75rem); border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; transition: none; transform: none; }
.nu-page .cs-body ul.nu-metrics li:first-child { border-left: 0; }
.nu-page .cs-body ul.nu-metrics li:hover { transform: none; border-color: var(--line); }
.nu-page .nu-metrics strong { font-size: clamp(1.5rem, 2.6vw, 2.25rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.nu-page .nu-metrics span { font: 400 0.8125rem/1.4 var(--font-body); color: var(--muted); }
@media (max-width: 640px) {
  .nu-page .cs-body ul.nu-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nu-page .cs-body ul.nu-metrics li:nth-child(odd) { border-left: 0; }
  .nu-page .cs-body ul.nu-metrics li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.nu-page .cs-body p.cs-stats__note { margin-top: 0.75rem; }
.nu-page .cs-body ul.nu-metrics + p.cs-stats__note + p { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.nu-page .cs-body .pj-cta { margin-top: 1.5rem; }
@media (min-width: 1100px) {
  .nu-page .cs-section__body > p.cs-stats__note { grid-column: 1 / -1; }
}

/* ======== All case studies: the Nuton look ========
   One type scale (statement 16, paragraph 14, label 14, caption 13), label-left / text-right rows,
   media breaking out full width, the same panel frame. Applies to every page with .cs-section. */
.cs-section .cs-body p, .cs-section .cs-body li, .pj-block p { font-size: 0.875rem; line-height: 1.65; }
.cs-section .cs-body p:not(.cs-cap), .cs-section .cs-body li, .pj-block p { color: color-mix(in srgb, var(--ink) 76%, var(--bg)); }
.cs-section .cs-body strong { color: var(--ink); }
.cs-section__label, .pj-h { font-size: 0.875rem; font-weight: 400; line-height: 1.5; color: var(--muted); }
.cs-decision__title, .cs-step__title { font-size: 1rem; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; max-width: 36ch; }
.cs-section figcaption, .cs-stage__cap, .cs-pair__cap, .cs-feat__text { font-size: 0.8125rem; line-height: 1.5; }
.cs-lede { font-size: 1rem; line-height: 1.6; }
.cs-fact dt, .cs-fact dd { font-size: 0.875rem; line-height: 1.55; }
.cs-feature__text p, .cs-feat__text { font-size: 0.875rem; }
/* one frame radius */
.cs-media, .cs-stage, .cs-rail, .cs-shot, .cs-hero > .cs-media { border-radius: 16px; }

@media (min-width: 1100px) {
  /* sections with a label and a body */
  .cs-section > .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38rem); column-gap: clamp(2rem, 6vw, 6rem); align-items: start; }
  .cs-section > .grid > .cs-section__body { display: contents; }
  .cs-section > .grid > .cs-section__label { grid-column: 1; grid-row: 1; margin: 0; padding-top: 0.15rem; }
  .cs-section > .grid > .cs-section__body > * { grid-column: 1 / -1; }
  .cs-section > .grid > .cs-section__body > p, .cs-section > .grid > .cs-section__body > ul:not(.cs-stats), .cs-section > .grid > .cs-section__body > ol, .cs-section > .grid > .cs-section__body > .cs-type { grid-column: 2; }
  .cs-section .cs-body p, .cs-section .cs-body ul { max-width: none; }
  /* decisions: title on the left, text on the right, media below */
  .cs-body > .cs-decision { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38rem); column-gap: clamp(2rem, 6vw, 6rem); align-items: start; grid-column: 1 / -1; }
  .cs-body > .cs-decision > * { grid-column: 1 / -1; }
  .cs-body > .cs-decision > .cs-decision__title { grid-column: 1; margin: 0; }
  .cs-body > .cs-decision > p, .cs-body > .cs-decision > ul, .cs-body > .cs-decision > ol { grid-column: 2; }
  .cs-body > .cs-decision > .cs-decision__title + p { margin-top: 0; }
  /* project pages (blocks of heading and text) */
  .cs-section > .pj-copy { max-width: none; gap: clamp(2.25rem, 5vw, 3.25rem); }
  .pj-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38rem); column-gap: clamp(2rem, 6vw, 6rem); align-items: start; }
  .pj-block .pj-h { margin: 0; padding-top: 0.15rem; }
  .pj-block p { max-width: none; }
  .cs-section > .pj-cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38rem); column-gap: clamp(2rem, 6vw, 6rem); }
  .cs-section > .pj-cta > .pj-btn { grid-column: 2; justify-self: start; }
}
@media (min-width: 1100px) {
  .cs-body > .cs-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38rem); column-gap: clamp(2rem, 6vw, 6rem); align-items: start; grid-column: 1 / -1; }
  .cs-body > .cs-split .cs-figure { max-width: 20rem; }
  .cs-body > .cs-decision:first-child { margin-top: 1.5rem; }
}
/* project pages: the facts sit right under the title, then the hero image */
.cs-section:has(> .pj-facts) { padding-block: 0 clamp(1.5rem, 3vw, 2rem); border-top: 0; }
.cs-hero + .cs-section:has(> .pj-facts) { margin-top: -0.5rem; }

/* links row in the facts list: icon, name, arrow. Plain links, no buttons. */
.cs-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.cs-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink); font-size: 0.875rem; line-height: 1.4; text-decoration: none; padding-block: 0.1rem; border-bottom: 1px solid var(--guide); transition: border-color 0.25s, color 0.25s; }
.cs-link__ic { flex: none; width: 1rem; height: 1rem; color: var(--muted); transition: color 0.25s; }
.cs-link__go { flex: none; width: 0.85rem; height: 0.85rem; color: var(--muted); transition: transform 0.35s var(--ease-spring), color 0.25s; }
.cs-link:hover, .cs-link:focus-visible { color: var(--accent); border-color: var(--accent); }
.cs-link:hover .cs-link__ic, .cs-link:hover .cs-link__go, .cs-link:focus-visible .cs-link__ic, .cs-link:focus-visible .cs-link__go { color: var(--accent); }
.cs-link:hover .cs-link__go { transform: translate(2px, -2px); }
.cs-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.cs-link__logo { flex: none; width: 1.25rem; height: 1.25rem; border-radius: 5px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
/* Nuri's stage is a light panel in both themes, so its text must be dark in both */
.nu-page .cs-body .nu-nuri__stage p.nu-nuri__name { color: #111111; }
.nu-page .cs-body .nu-nuri__stage p.nu-nuri__when { color: #4a4a47; }

/* title screen: a real leaderboard button and the top three */

/* ---- ROCKFALL v3: logotype, title spacing, result screen ---- */
.rf__titlescreen { display: grid; justify-items: center; gap: clamp(0.9rem, 2.2vh, 1.3rem); max-width: 34rem; text-align: center; }
.rf__startgroup { display: grid; justify-items: center; gap: 0.85rem; margin-top: 0.35rem; }
.rf__titlescreen > .rf__lbbtn { margin-top: 0.4rem; }

/* the logotype: chunky stone letters, each a little off its baseline, stacked hard shadows and a soft drop */
.rf__logo { display: flex; justify-content: center; margin: 0 0 0.2rem; font-family: "Bowlby One", var(--font-display); font-weight: 400; font-size: clamp(2.5rem, 8.2vw, 4.9rem); line-height: 1; letter-spacing: 0.01em; }
@keyframes rf-drop { 0% { transform: translateY(-1.3em) rotate(calc(var(--r) * 1deg)); opacity: 0; } 55% { opacity: 1; } 100% { transform: translateY(calc(var(--y) * 1px)) rotate(calc(var(--t) * 1deg)); } }
.rf__lbbtn { height: 2.5rem; padding: 0 1.1rem 0 0.95rem; font-size: 0.8125rem; }

/* result screen: one column, one control height, even spacing */
.rf__result { gap: 0.8rem; width: min(100%, 24rem); max-width: none; }
.rf__rsub { margin-bottom: 0.2rem; }
.rf__sum { margin: 0.55rem 0 0.9rem; }
.rf__panel { display: grid; gap: 0.85rem; width: 100%; padding-top: 1.15rem; border-top: 1px solid var(--guide); }
.rf__result .rf__form { display: grid; gap: 0.55rem; width: 100%; margin: 0; }
.rf__result .rf__label { justify-self: start; font: 0.625rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rf__join { display: flex; align-items: center; gap: 0.4rem; height: 3rem; padding: 0.25rem 0.25rem 0.25rem 1.15rem; border: 1px solid var(--guide); border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); transition: border-color 0.2s, box-shadow 0.2s; }
.rf__join:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.rf__join input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 0.9375rem; outline: none; }
.rf__join input::placeholder { color: var(--muted); }
.rf__submit { flex: none; height: 100%; padding: 0 1.15rem; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease-spring); }
.rf__submit:hover { background: var(--accent); color: var(--on-accent); }
.rf__submit:active { transform: scale(0.96); }
.rf__submit:disabled { opacity: 0.6; cursor: default; transform: none; }
.rf__result .rf__form.is-bad .rf__join { border-color: #e5484d; box-shadow: 0 0 0 3px rgb(229 72 77 / 0.18); }
.rf__result .rf__err { margin: 0; justify-self: start; font-size: 0.8125rem; line-height: 1.4; color: #e5484d; text-align: left; }
.rf__acts { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0.6rem; width: 100%; }
.rf__cta { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; height: 3rem; padding: 0 1rem; border-radius: 999px; font: inherit; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: transform 0.18s var(--ease-spring), box-shadow 0.18s, border-color 0.2s, color 0.2s, filter 0.2s; }
.rf__cta i { display: inline-block; font-style: normal; transition: transform 0.25s var(--ease-spring); }
.rf__cta--primary { border: 0; background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 52%, #000), 0 12px 24px -14px color-mix(in srgb, var(--accent) 65%, transparent); }
.rf__cta--primary:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 52%, #000), 0 16px 26px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.rf__cta--primary:hover i { transform: translateX(4px); }
.rf__cta--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 52%, #000); }
.rf__cta--ghost { border: 1px solid var(--guide); background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--ink); }
.rf__cta--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.rf__cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 420px) { .rf__acts { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; } }
.rf__lbbtn { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.5rem; padding: 0 1.1rem 0 0.95rem; border: 1px solid var(--guide); border-radius: 999px; background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--ink); font: inherit; font-size: 0.8125rem; cursor: pointer; transition: border-color 0.2s, color 0.2s, transform 0.25s var(--ease-spring); }
.rf__lbbtn svg { flex: none; width: 1rem; height: 1rem; color: var(--accent); }
.rf__lbbtn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.rf__lbbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- polish: tap targets, logo, landmarks, scroll locking ---- */
.rf__letters { display: flex; justify-content: center; }
.rf__logo .rf__letters b { display: inline-block; font-weight: 400; padding: 0 0.01em; color: transparent; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 38%, #fff) 0%, var(--accent) 48%, color-mix(in srgb, var(--accent) 62%, #000) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0.02em color-mix(in srgb, var(--accent) 32%, #000); transform: translateY(calc(var(--y) * 1px)) rotate(calc(var(--t) * 1deg)); filter: drop-shadow(0 0.045em 0 color-mix(in srgb, var(--accent) 48%, #000)) drop-shadow(0 0.09em 0 color-mix(in srgb, var(--accent) 34%, #000)) drop-shadow(0 0.14em 0 color-mix(in srgb, var(--accent) 22%, #000)) drop-shadow(0 0.4em 0.45em rgb(0 0 0 / 0.38)); }
html.js-anim .rf__logo .rf__letters b { animation: rf-drop 0.8s var(--ease-spring) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
html.ask-open, html.ask-open body { overflow: hidden; overscroll-behavior: none; }
@media (max-width: 899px) {
  .rail__links a, .rail__foot > a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .foot .link { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .arc__link, .tl__link, .cs-link { min-height: 2.75rem; padding-block: 0.4rem; }
  .arc__link, .tl__link { display: inline-flex; align-items: center; }
  .flow__controls button, .nu-seg button, .nu-cmp__ctl button { min-height: 2.5rem; }
  .flow__controls button { padding-block: 0.5rem; }
  .cs-fact dd .cs-link, .cs-links { gap: 0.25rem 1.5rem; }
}
@media (max-width: 899px) { .contact__email, .contact__email a, .contact__panel a { min-height: 2.75rem; } .contact__email a { display: inline-flex; align-items: center; } }

/* ---- smoothness: lazy images fade in as they arrive; anchors clear the phone's top bar ---- */
html.js-anim img[loading="lazy"]:not(.nu-win img):not(.nu-reel img):not(.is-loaded) { opacity: 0; }
html.js-anim img[loading="lazy"]:not(.nu-win img):not(.nu-reel img) { transition: opacity 0.6s var(--ease-out); }
html { scroll-padding-top: 0.5rem; }
@media (max-width: 899px) { html { scroll-padding-top: 4rem; } }
@media (prefers-reduced-motion: reduce) {
  html.js-anim img[loading="lazy"]:not(.nu-win img):not(.nu-reel img):not(.is-loaded) { opacity: 1; }
  html.js-anim img[loading="lazy"]:not(.nu-win img):not(.nu-reel img) { transition: none; }
}
.collage__hint { z-index: 6; }
@media (max-width: 640px) { .collage__hint { top: 0.6rem; bottom: auto; left: 0.6rem; } }

/* ---- ROCKFALL title buttons: angular, bevelled game buttons (clip-path, no rounded corners) ---- */
.rf__startgroup { gap: 0.7rem; margin-top: 0; }
.rf__controls em { font-style: normal; color: var(--accent); }

.rf__frame { position: relative; display: inline-block; padding: 1rem 1.7rem; --brk: color-mix(in srgb, var(--accent) 80%, transparent); }
.rf__frame::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.85; transition: inset 0.35s var(--ease-out), opacity 0.3s;
  background:
    linear-gradient(var(--brk), var(--brk)) 0 0 / 1.35rem 2px no-repeat, linear-gradient(var(--brk), var(--brk)) 0 0 / 2px 1rem no-repeat,
    linear-gradient(var(--brk), var(--brk)) 100% 0 / 1.35rem 2px no-repeat, linear-gradient(var(--brk), var(--brk)) 100% 0 / 2px 1rem no-repeat,
    linear-gradient(var(--brk), var(--brk)) 0 100% / 1.35rem 2px no-repeat, linear-gradient(var(--brk), var(--brk)) 0 100% / 2px 1rem no-repeat,
    linear-gradient(var(--brk), var(--brk)) 100% 100% / 1.35rem 2px no-repeat, linear-gradient(var(--brk), var(--brk)) 100% 100% / 2px 1rem no-repeat; }
.rf__frame:hover::before { inset: -4px; opacity: 1; }

/* the primary button: a slanted face with a two-step bevel built from stacked hard shadows */
.rf__go { --k: 1.7rem; --bv1: color-mix(in srgb, var(--accent) 60%, #000); --bv2: color-mix(in srgb, var(--accent) 34%, #000); position: relative; display: block; padding: 0; border: 0; background: none; color: var(--on-accent); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(4px 5px 0 var(--bv1)) drop-shadow(4px 5px 0 var(--bv2)); transition: transform 0.22s var(--ease-out), filter 0.22s var(--ease-out); }
.rf__go .rf__face { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.85rem; min-width: 18rem; height: 4rem; padding: 0 calc(var(--k) + 1.6rem);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 68%, #fff) 0%, var(--accent) 56%, color-mix(in srgb, var(--accent) 86%, #000) 100%);
  clip-path: polygon(var(--k) 0, 100% 0, calc(100% - var(--k)) 100%, 0 100%);
  font-style: italic; font-weight: 800; font-size: 1.45rem; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; transition: filter 0.2s; }
.rf__go .rf__face::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(255 255 255 / 0.34) 0%, rgb(255 255 255 / 0) 46%); pointer-events: none; }
.rf__go .rf__face::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgb(255 255 255 / 0.6); pointer-events: none; }
.rf__go i { font-style: normal; display: inline-block; transition: transform 0.28s var(--ease-spring); }
.rf__go:hover { transform: translateY(-2px); filter: drop-shadow(4px 6px 0 var(--bv1)) drop-shadow(4px 6px 0 var(--bv2)); }
.rf__go:hover .rf__face { filter: brightness(1.1) saturate(1.05); }
.rf__go:hover i { transform: translateX(5px); }
.rf__go:active { transform: translate(7px, 9px); filter: drop-shadow(0 0 0 var(--bv1)) drop-shadow(1px 1px 0 var(--bv2)); transition-duration: 0.08s; }
.rf__go:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; }

/* the secondary button: same slant with chamfered corners, a thin mint outline and a dark interior */
.rf__lb { --k: 0.95rem; --c: 0.6rem; --b: 1.5px; position: relative; display: block; margin-top: 0.15rem; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 0.22s var(--ease-out), filter 0.22s; }
.rf__lb::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 78%, transparent); transition: background-color 0.22s; clip-path: polygon(var(--k) 0, calc(100% - var(--c)) 0, 100% var(--c), calc(100% - var(--k)) 100%, var(--c) 100%, 0 calc(100% - var(--c))); }
.rf__lb .rf__face { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; height: 3rem; padding: 0 calc(var(--k) + 1.5rem); background: color-mix(in srgb, var(--bg) 94%, var(--accent)); transition: background-color 0.22s;
  clip-path: polygon(calc(var(--k) + var(--b) * 1.2) var(--b), calc(100% - var(--c) - var(--b) * 0.4) var(--b), calc(100% - var(--b)) calc(var(--c) + var(--b) * 0.4), calc(100% - var(--k) - var(--b) * 1.2) calc(100% - var(--b)), calc(var(--c) + var(--b) * 0.4) calc(100% - var(--b)), var(--b) calc(100% - var(--c) - var(--b) * 0.4));
  font-style: italic; font-weight: 700; font-size: 1rem; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.rf__lb svg { flex: none; width: 1.1rem; height: 1.1rem; }
.rf__lb:hover { transform: translateY(-2px); }
.rf__lb:hover::before { background: var(--accent); }
.rf__lb:hover .rf__face { background: color-mix(in srgb, var(--bg) 86%, var(--accent)); }
.rf__lb:active { transform: translateY(1px); }
.rf__lb:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
@media (max-width: 640px) { .rf__frame { padding: 0.85rem 1.2rem; } .rf__go .rf__face { min-width: 14rem; height: 3.4rem; font-size: 1.15rem; } .rf__go { --k: 1.3rem; } .rf__lb .rf__face { height: 2.8rem; font-size: 0.9375rem; } }

/* ====== ROCKFALL: every button in the angular, bevelled style ======
   Solid buttons: a slanted parallelogram with a two-step bevel.  Outline buttons: the chamfered hexagon with a thin mint line.
   Built with clip-path on pseudo-elements, so the markup, focus and keyboard behaviour stay exactly as they were. */
/* outline family */
.rf__cta--ghost, .rf__ghost, .rf__iconbtn, .rf__tabs button, .rf__join { --k: 0.95rem; --c: 0.55rem; --b: 1.5px; --line: color-mix(in srgb, var(--accent) 78%, transparent); --fill: color-mix(in srgb, var(--bg) 94%, var(--accent));
  --rf-hex: polygon(var(--k) 0, calc(100% - var(--c)) 0, 100% var(--c), calc(100% - var(--k)) 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  --rf-hex-in: polygon(calc(var(--k) + var(--b) * 1.2) var(--b), calc(100% - var(--c) - var(--b) * 0.4) var(--b), calc(100% - var(--b)) calc(var(--c) + var(--b) * 0.4), calc(100% - var(--k) - var(--b) * 1.2) calc(100% - var(--b)), calc(var(--c) + var(--b) * 0.4) calc(100% - var(--b)), var(--b) calc(100% - var(--c) - var(--b) * 0.4));
  position: relative; isolation: isolate; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--accent); backdrop-filter: none; -webkit-backdrop-filter: none; }
.rf__cta--ghost::before, .rf__ghost::before, .rf__iconbtn::before, .rf__tabs button::before, .rf__join::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--line); clip-path: var(--rf-hex); transition: background-color 0.22s; }
.rf__cta--ghost::after, .rf__ghost::after, .rf__iconbtn::after, .rf__tabs button::after, .rf__join::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fill); clip-path: var(--rf-hex-in); transition: background-color 0.22s; }
.rf__cta--ghost, .rf__ghost, .rf__tabs button { font-style: italic; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; transition: transform 0.22s var(--ease-out), color 0.2s; }
.rf__cta--ghost:hover, .rf__ghost:hover, .rf__iconbtn:hover { color: var(--accent); border: 0; transform: translateY(-2px); }
.rf__cta--ghost:hover::before, .rf__ghost:hover::before, .rf__iconbtn:hover::before, .rf__tabs button:hover::before { background: var(--accent); }
.rf__cta--ghost:hover::after, .rf__ghost:hover::after, .rf__iconbtn:hover::after, .rf__tabs button:hover::after { background: color-mix(in srgb, var(--bg) 86%, var(--accent)); }
.rf__cta--ghost:active, .rf__ghost:active, .rf__iconbtn:active { transform: translateY(1px); }
.rf__cta--ghost { height: 3rem; padding: 0 calc(var(--k) + 1.2rem); font-size: 0.875rem; }
.rf__ghost { height: 2.6rem; padding: 0 calc(var(--k) + 1.2rem); font-size: 0.8125rem; }
.rf__cta--ghost:focus-visible, .rf__ghost:focus-visible, .rf__iconbtn:focus-visible, .rf__tabs button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* the small round controls become small chamfered tiles */
.rf__iconbtn { --k: 0.5rem; --c: 0.45rem; width: 2.5rem; height: 2.5rem; border-radius: 0; }
.rf__sound[aria-pressed="true"], .rf__iconbtn:hover { border: 0; }
.rf__sound[aria-pressed="true"]::before { background: var(--accent); }
.rf__iconbtn { color: var(--muted); }
.rf__iconbtn:hover, .rf__sound[aria-pressed="true"] { color: var(--accent); }

/* the name field: the same outline, with the Submit button sitting inside it */
.rf__join { --k: 1.1rem; height: 3rem; padding: 0.3rem 0.3rem 0.3rem calc(var(--k) + 0.75rem); gap: 0.5rem; transition: filter 0.25s; }
.rf__join:focus-within { box-shadow: none; border: 0; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 38%, transparent)); }
.rf__join:focus-within::before { background: var(--accent); }
.rf__result .rf__form.is-bad .rf__join { box-shadow: none; --line: #e5484d; filter: drop-shadow(0 0 7px rgb(229 72 77 / 0.3)); }

/* solid family: slanted face, two-step bevel */
.rf__cta--primary, .rf__play, .rf__btn, .rf__submit { --k: 1.1rem; --bv1: color-mix(in srgb, var(--accent) 60%, #000); --bv2: color-mix(in srgb, var(--accent) 34%, #000);
  position: relative; isolation: isolate; border: 0; border-radius: 0; background: none; color: var(--on-accent); box-shadow: none; animation: none;
  font-style: italic; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  filter: drop-shadow(3px 4px 0 var(--bv1)) drop-shadow(3px 4px 0 var(--bv2)); transition: transform 0.22s var(--ease-out), filter 0.22s var(--ease-out); }
.rf__cta--primary::before, .rf__play::before, .rf__btn::before, .rf__submit::before { content: ""; position: absolute; inset: 0; z-index: -2; clip-path: polygon(var(--k) 0, 100% 0, calc(100% - var(--k)) 100%, 0 100%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 68%, #fff) 0%, var(--accent) 56%, color-mix(in srgb, var(--accent) 86%, #000) 100%); transition: filter 0.2s; }
.rf__cta--primary::after, .rf__play::after, .rf__btn::after, .rf__submit::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; clip-path: polygon(var(--k) 0, 100% 0, calc(100% - var(--k)) 100%, 0 100%);
  background: linear-gradient(rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.6)) 0 0 / 100% 2px no-repeat, linear-gradient(180deg, rgb(255 255 255 / 0.32) 0%, rgb(255 255 255 / 0) 46%); }
.rf__cta--primary { height: 3rem; padding: 0 calc(var(--k) + 1.4rem); font-size: 0.9375rem; }
.rf__play { height: 3.4rem; padding: 0 calc(var(--k) + 1.6rem); font-size: 1.1rem; }
.rf__btn { height: 2.6rem; margin: 0; padding: 0 calc(var(--k) + 1.2rem); font-size: 0.8125rem; }
.rf__submit { --k: 0.7rem; height: 100%; padding: 0 calc(var(--k) + 0.9rem); font-size: 0.75rem; filter: none; }
.rf__cta--primary:hover, .rf__play:hover, .rf__btn:hover { transform: translateY(-2px); background: none; color: var(--on-accent); border: 0; filter: drop-shadow(3px 6px 0 var(--bv1)) drop-shadow(3px 6px 0 var(--bv2)); }
.rf__cta--primary:hover::before, .rf__play:hover::before, .rf__btn:hover::before, .rf__submit:hover::before { filter: brightness(1.1) saturate(1.05); }
.rf__submit:hover { background: none; color: var(--on-accent); }
.rf__cta--primary:active, .rf__play:active, .rf__btn:active { transform: translate(4px, 6px); filter: drop-shadow(0 0 0 var(--bv1)) drop-shadow(1px 1px 0 var(--bv2)); transition-duration: 0.08s; }
.rf__submit:active { transform: translateY(1px); }
.rf__submit:disabled { opacity: 0.6; cursor: default; transform: none; }
.rf__cta--primary:focus-visible, .rf__play:focus-visible, .rf__btn:focus-visible, .rf__submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

/* leaderboard tabs: two angular buttons, the chosen one filled */
.rf__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0; border: 0; border-radius: 0; background: none; }
.rf__tabs button { --k: 0.8rem; height: 2.3rem; padding: 0 1rem; font-size: 0.8125rem; color: var(--muted); }
.rf__tabs button:hover { color: var(--accent); }
.rf__tabs button[aria-checked="true"] { color: var(--on-accent); background: none; }
.rf__tabs button[aria-checked="true"]::before { background: var(--accent); }
.rf__tabs button[aria-checked="true"]::after { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, #fff) 0%, var(--accent) 60%, color-mix(in srgb, var(--accent) 88%, #000) 100%); }
.rf__bact { gap: 0.9rem; }
.rf .rf__bact { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; }
.rf .rf__bact .rf__btn { height: 2.6rem; font-size: 0.8125rem; }

/* Nuton rows at mid widths (rail + narrower window): keep label left, text right, side by side */
@media (min-width: 760px) and (max-width: 1099.98px) {
  .nu-page .cs-section > .grid { display: grid; grid-template-columns: 8rem minmax(0, 1fr); column-gap: 1.5rem; align-items: start; }
  .nu-page .cs-section__body { display: contents; }
  .nu-page .cs-section__label { grid-column: 1; grid-row: 1; margin: 0; padding-top: 0.15rem; }
  .nu-page .cs-section__body > * { grid-column: 1 / -1; }
  .nu-page .cs-section__body > .nu-say, .nu-page .cs-section__body > .nu-long, .nu-page .cs-section__body > .nu-rowtext, .nu-page .cs-section__body > p.nu-cap, .nu-page .cs-section__body > p.cs-stats__note, .nu-page .cs-section__body > .pj-cta { grid-column: 2; }
  .nu-page .cs-section__body > .nu-rowlabel { grid-column: 1; margin-top: clamp(2.25rem, 5vw, 3rem); padding-top: 0.15rem; text-align: left; }
  .nu-page .cs-section__body > .nu-rowtext { margin-top: clamp(2.25rem, 5vw, 3rem); }
  .nu-page .cs-section__body > .nu-say:first-of-type { grid-row: 1; }
  .nu-page .cs-body p.nu-say, .nu-page .cs-body .nu-sub { max-width: 36ch; }
}

/* Nuton rows: beat the generic case-study grid rules (label left, text right, same row) */
@media (min-width: 760px) {
  .nu-page .cs-section > .grid > .cs-section__body > .nu-rowlabel { grid-column: 1; text-align: left; justify-self: start; }
  .nu-page .cs-section > .grid > .cs-section__body > .nu-rowtext,
  .nu-page .cs-section > .grid > .cs-section__body > .nu-long,
  .nu-page .cs-section > .grid > .cs-section__body > .nu-say { grid-column: 2; }
}

/* ---- Case-study chrome: top bar + table of contents in the rail ---- */
.cs-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 55; height: 3.25rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding-inline: var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); font-size: 0.8125rem; }
.cs-bar a { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink); text-decoration: none; min-height: 2.75rem; transition: color 0.2s var(--ease-out, ease), transform 0.3s var(--ease-out, ease); }
.cs-bar a:hover { color: var(--accent); }
.cs-bar svg { width: 1rem; height: 1rem; flex: none; }
.cs-bar__back:hover svg { transform: translateX(-3px); }
.cs-bar__talk { justify-self: end; }
.cs-bar__talk:hover svg { transform: translate(2px, -2px); }
.cs-bar svg { transition: transform 0.3s var(--ease-out, ease); }
.cs-bar__title { font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.cs-page .shell { padding-top: 3.25rem; }
.cs-page .cs-hero > .cs-back, .cs-page .mnav { display: none; }
.cs-page .cs-hero { padding-top: clamp(1.25rem, 3vw, 2.25rem); }
.cs-page .cs-hero, .cs-page .cs-section, .cs-page .pj-block { scroll-margin-top: 4.5rem; }

.cs-toc__h { font-size: 0.75rem; color: var(--muted); margin-bottom: 1rem; }
.cs-toc a { gap: 0.9rem; padding-block: 0.32rem; }
.cs-toc a i { font-style: normal; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); min-width: 1.4rem; }
.cs-toc a span { min-width: 0; }
.cs-toc a::before { display: none; }
.cs-toc a[aria-current="true"] i { color: var(--accent); }
.cs-toc a[aria-current="true"] { color: var(--ink); }
.cs-toc__end { margin-top: 0.9rem; }
.cs-toc__end svg { width: 0.8rem; height: 0.8rem; flex: none; color: var(--muted); margin-inline: 0.3rem 0.4rem; }
.cs-toc__end:hover { transform: none; }

@media (min-width: 900px) {
  .cs-page .rail { top: 3.25rem; height: calc(100vh - 3.25rem); padding-block: 2rem 1.75rem; }
  .cs-page .rail__nav { margin-top: 2.25rem; overflow-y: auto; scrollbar-width: none; max-height: calc(100vh - 21rem); }
  .cs-page .rail__nav::-webkit-scrollbar { display: none; }
  .cs-page .corner { top: 0.4rem; }
  .cs-bar { padding-right: calc(var(--gutter) + 6.5rem); }
}
@media (max-width: 899px) {
  .cs-page .rail__nav { display: none; }
  .cs-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.75rem; }
  .cs-bar__title { text-align: center; max-width: none; }
  html { scroll-padding-top: 4.5rem; }
}
@media (max-width: 520px) { .cs-bar__long { display: none; } }

/* DiveHQ additions: process steps, single-phone row, closing note */
.dv-steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; counter-reset: dv; }
.dv-steps li { display: grid; justify-items: center; gap: 0.9rem; text-align: center; }
.dv-steps span { display: grid; place-items: center; width: min(100%, 8.5rem); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--guide); font-size: 0.9375rem; color: var(--ink); transition: border-color 0.3s var(--ease-out, ease), transform 0.4s var(--ease-out, ease); }
.dv-steps li:hover span { border-color: var(--accent); transform: translateY(-3px); }
.dv-steps em { font-style: normal; font-size: 0.8125rem; color: var(--muted); max-width: 16ch; line-height: 1.45; }
.cs-trio--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-trio--one { grid-template-columns: minmax(0, 18rem); }
.dv-wrap { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.dv-wrap img { width: 100%; height: auto; }
.dv-thanks { color: var(--muted); margin-top: 0.75rem; }
@media (max-width: 640px) { .dv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-trio--two { grid-template-columns: minmax(0, 1fr); } .dv-wrap { grid-template-columns: 6rem minmax(0, 1fr); } }
.dv-wrap img { max-height: 15rem; width: auto; justify-self: center; }

/* DiveHQ process: four rings that fill in as the work moves on, two by two */
.dv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1.5rem; max-width: 30rem; margin-top: 2rem; }
.dv-steps span { position: relative; width: min(100%, 10rem); border: 0; display: grid; align-content: center; justify-items: center; gap: 0.3rem; font-size: 1.0625rem; letter-spacing: -0.01em; background: radial-gradient(closest-side, color-mix(in srgb, var(--panel) 70%, transparent), transparent); }
.dv-steps span::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from -90deg, var(--accent) calc(var(--p) * 1turn), var(--guide) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px)); }
.dv-steps b { font-weight: 400; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); }
.dv-steps li:hover span { transform: translateY(-3px); border: 0; }
.dv-steps em { max-width: 20ch; }
/* Transfers beside the transactions view */
.dv-around { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1rem; align-items: center; margin-top: 1.75rem; }
.dv-around .cs-media { margin: 0; }
@media (max-width: 640px) { .dv-around { grid-template-columns: minmax(0, 1fr); } }

.cs-media.cs-media--bare { padding: 0; background: none; border: 0; box-shadow: none; }
.cs-media--bare img { border-radius: 0; }

/* DiveHQ screens: a phone frame around each screen, with a light/dark switch */
.dv-mode { display: inline-flex; margin-top: 1.25rem; padding: 3px; border: 1px solid var(--guide); border-radius: 999px; background: var(--panel); }
.dv-mode button { appearance: none; border: 0; background: none; font: inherit; font-size: 0.8125rem; color: var(--muted); padding: 0.4rem 1rem; min-height: 2rem; border-radius: 999px; cursor: pointer; transition: color 0.2s, background 0.25s var(--ease-out, ease); }
.dv-mode button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }
.dv-flow { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.dv-flow > .cs-step__title { margin-bottom: 0.4rem; }
.dv-row { display: flex; flex-wrap: wrap; gap: clamp(1rem, 2.5vw, 1.75rem); margin-top: 1.5rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 16px; background: var(--panel); }
.dv-device { margin: 0; flex: 1 1 10rem; max-width: 13.5rem; display: grid; gap: 0.75rem; justify-items: center; }
.dv-device figcaption { font-size: 0.8125rem; line-height: 1.4; color: var(--muted); text-align: center; }
.dv-phone { position: relative; display: block; width: 100%; aspect-ratio: 393 / 852; padding: 5px; border-radius: 2.1rem; background: #0b0b0c; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14) inset, 0 0 0 1px rgb(0 0 0 / 0.5), 0 24px 40px -24px rgb(0 0 0 / 0.55); }
.dv-phone::before { content: ""; position: absolute; top: 12px; left: 50%; width: 28%; height: 0.95rem; border-radius: 999px; background: #000; transform: translateX(-50%); z-index: 2; }
.dv-phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 1.65rem; background: var(--panel); transition: opacity 0.25s; }
@media (max-width: 640px) { .dv-device { max-width: 9.5rem; } .dv-phone { border-radius: 1.5rem; padding: 4px; } .dv-phone img { border-radius: 1.2rem; } .dv-phone::before { top: 9px; height: 0.7rem; } }

/* DiveHQ personas, wireframes and success flow */
.dv-persona { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; margin-top: 2rem; padding: 1rem; border-radius: 18px; background: var(--panel); }
.dv-persona--r { grid-template-columns: minmax(0, 1fr) minmax(0, 11rem); }
.dv-persona--r img { order: 2; }
.dv-persona img { width: 100%; height: 100%; min-height: 15rem; object-fit: cover; border-radius: 14px; display: block; }
.dv-persona__t { display: grid; align-content: center; gap: 0.9rem; padding: 0.5rem 0.5rem 0.5rem 0.25rem; }
.dv-persona__t .cs-step__title { margin: 0; }
.dv-persona__m { margin: 0; display: grid; gap: 0.2rem; }
.dv-persona__m div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0.75rem; }
.dv-persona__m dt { color: var(--muted); }
.dv-persona__m dd { margin: 0; }
.dv-persona__c { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 0.25rem; }
.dv-persona__c h4 { margin: 0 0 0.35rem; font-size: 0.875rem; font-weight: 500; }
.dv-persona__c ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; }
.dv-persona__c b { font-weight: 500; }
@media (max-width: 720px) { .dv-persona, .dv-persona--r { grid-template-columns: minmax(0, 1fr); } .dv-persona--r img { order: 0; } .dv-persona img { min-height: 0; aspect-ratio: 4 / 3; object-position: top; } .dv-persona__m div { grid-template-columns: 7rem minmax(0, 1fr); } .dv-persona__c { grid-template-columns: minmax(0, 1fr); } }

.dvf { list-style: none; margin: 2rem 0 0; padding: 1.25rem; display: grid; gap: 1.25rem; border-radius: 18px; background: var(--panel); }
.dvf__row { display: grid; gap: 0.5rem; }
.dvf__line { display: flex; align-items: stretch; gap: 0.9rem; flex-wrap: wrap; }
.dvf__n { position: relative; display: grid; place-items: center; text-align: center; min-height: 3.1rem; padding: 0.5rem 0.75rem; flex: 1 1 7rem; max-width: 11rem; border-radius: 10px; border: 1px solid var(--guide); background: var(--bg); font-size: 0.8125rem; line-height: 1.3; }
.dvf__n:not(:last-child)::after { content: ""; position: absolute; left: 100%; top: 50%; width: 0.9rem; height: 1px; background: var(--guide); }
.dvf__n--in { background: #155BC6; border-color: #155BC6; color: #fff; }
.dvf__n--q { border-style: dashed; }
.dvf__n--ok, .dvf__n--end { background: color-mix(in srgb, #155BC6 14%, var(--bg)); border-color: color-mix(in srgb, #155BC6 40%, var(--guide)); }
.dvf__n--end { background: var(--ink); color: var(--bg); border-color: var(--ink); max-width: 6rem; }
.dvf__no { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.dvf__no b { font-weight: 500; color: var(--ink); }
.dvf__end { display: flex; gap: 0.9rem; align-items: center; padding-top: 1rem; border-top: 1px dashed var(--guide); }
.dvf__end i { width: 0.9rem; height: 1px; background: var(--guide); }

/* DiveHQ personas, v2: two quiet cards side by side */
.dvp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); margin-top: 2rem; }
.dvp { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.dvp__who { display: flex; align-items: center; gap: 1rem; }
.dvp__img { flex: none; width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; object-position: 50% 30%; box-shadow: 0 0 0 1px var(--guide); }
.dvp__tags { margin-top: 0.5rem; }
.dvp__body { display: grid; gap: 1.5rem; padding: clamp(1.25rem, 2.4vw, 1.75rem); }
.dvp__name { margin: 0; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; }
.dvp__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0; }
.dvp__tags span { padding: 0.2rem 0.65rem; border: 1px solid var(--guide); border-radius: 999px; font-size: 0.75rem; color: var(--muted); }
.cs-body .dvp__tech { margin: 0.9rem 0 0; color: var(--muted); }
.dvp section { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.dvp h4 { margin: 0 0 0.35rem; font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.cs-body .dvp__list { list-style: none; margin: 0; padding: 0; display: grid; }
.cs-body .dvp__list li { display: grid; gap: 0.1rem; padding: 0.65rem 0 0.65rem 1.1rem; position: relative; border-top: 1px solid var(--line); }
.cs-body .dvp__list li:first-child { border-top: 0; }
.cs-body .dvp__list li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 5px; height: 5px; border-radius: 50%; background: var(--guide); }
.cs-body .dvp__list--goals li::before { background: var(--accent); }
.dvp__list b { font-weight: 500; }
.dvp__list span { color: var(--muted); }
@media (max-width: 820px) { .dvp-grid { grid-template-columns: minmax(0, 1fr); } }

/* DiveHQ success flow, v2: a connected diagram */
.dvf-wrap { margin-top: 2rem; padding: clamp(1.25rem, 3.5vw, 3rem); border-radius: 18px; background: var(--panel); overflow-x: auto; }
.dvf-svg { display: block; width: 100%; min-width: 880px; height: auto; color: color-mix(in srgb, var(--ink) 45%, var(--bg)); font-size: 17px; }
.dvf-svg .e { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dvf-svg .e.loop { stroke-dasharray: 4 4; }
.dvf-svg .n rect { fill: var(--bg); stroke: var(--guide); stroke-width: 1; }
.dvf-svg .n text { fill: var(--ink); text-anchor: middle; font-family: inherit; }
.dvf-svg .n.start rect, .dvf-svg .n.entry rect { fill: #155BC6; stroke: #155BC6; }
.dvf-svg .n.start text, .dvf-svg .n.entry text { fill: #fff; }
.dvf-svg .n.dec rect { stroke-dasharray: 4 3; stroke: color-mix(in srgb, #155BC6 55%, var(--guide)); }
.dvf-svg .n.conf rect, .dvf-svg .n.done rect { fill: color-mix(in srgb, #155BC6 13%, var(--bg)); stroke: color-mix(in srgb, #155BC6 40%, var(--guide)); }
.dvf-svg .n.fix rect { fill: transparent; stroke-dasharray: 3 3; }
.dvf-svg .n.fix text { fill: var(--muted); font-size: 15px; }
.dvf-svg .n.end rect { fill: var(--ink); stroke: var(--ink); }
.dvf-svg .n.end text { fill: var(--bg); }
.dvf-svg .lab rect { fill: var(--panel); stroke: var(--guide); }
.dvf-svg .lab text { fill: var(--muted); font-size: 13px; text-anchor: middle; font-family: inherit; }
html.js-anim .dvf-svg .row { opacity: 0; transform: translateY(8px); transition: opacity 0.6s var(--ease-out, ease), transform 0.6s var(--ease-out, ease); }
html.js-anim .dvf-svg.is-in .row { opacity: 1; transform: none; }
html.js-anim .dvf-svg.is-in .row:nth-of-type(2) { transition-delay: 0.08s; } 
html.js-anim .dvf-svg.is-in .row:nth-of-type(3) { transition-delay: 0.16s; }
html.js-anim .dvf-svg.is-in .row:nth-of-type(4) { transition-delay: 0.24s; }
html.js-anim .dvf-svg.is-in .row:nth-of-type(5) { transition-delay: 0.32s; }

/* Features in motion: the phone swaps sides on every other feature */
@media (min-width: 701px) {
  .cs-feature:nth-of-type(odd) { grid-template-columns: auto minmax(0, 1fr); }
  .cs-feature:nth-of-type(odd) .cs-feature__text { order: 2; }
  .cs-feature:nth-of-type(odd) .cs-cutv--phone { order: 1; justify-self: start; margin-left: clamp(0rem, 4vw, 3rem); }
  .cs-feature:nth-of-type(even) .cs-cutv--phone { justify-self: end; margin-right: clamp(0rem, 4vw, 3rem); }
}

/* Table of contents: make the current section unmistakable */
.cs-toc a { margin-inline: -0.75rem; padding: 0.38rem 0.75rem; border-radius: 10px; color: color-mix(in srgb, var(--muted) 85%, var(--bg)); transition: color 0.25s var(--ease-out, ease), background 0.3s var(--ease-out, ease), transform 0.3s var(--ease-out, ease); }
.cs-toc a:hover { color: var(--ink); transform: none; }
.cs-toc a[aria-current="true"] { background: var(--panel); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line) inset; }
.cs-toc a[aria-current="true"]::before { display: block; left: 0; top: 22%; bottom: 22%; width: 3px; height: auto; margin: 0; border-radius: 3px; background: var(--accent); }
.cs-toc a[aria-current="true"] i { color: var(--accent); }
.cs-toc .cs-toc__end { margin-top: 0.9rem; }

/* Screens: centre each group of phones in its panel */
.dv-row { justify-content: center; gap: clamp(1.25rem, 4vw, 3.5rem); padding-block: clamp(1.75rem, 4vw, 3rem); }
.dv-device { flex: 0 1 15rem; max-width: 15rem; }
.dv-device figcaption { max-width: 15rem; }
@media (max-width: 640px) { .dv-device { flex: 0 1 9.5rem; max-width: 9.5rem; } }

/* Phone frame v2: a real-proportion body, a metal rim, a proper bezel and side buttons */
.dv-phone { aspect-ratio: auto; box-sizing: border-box; padding: 4.3%; border: 2.5px solid transparent; border-radius: 16% / 7.4%; background: linear-gradient(#050506, #050506) padding-box, linear-gradient(150deg, #8a8a90 0%, #26262a 28%, #151517 55%, #5e5e64 100%) border-box; box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 28px 44px -26px rgb(0 0 0 / 0.55), 0 10px 18px -12px rgb(0 0 0 / 0.35); }
.dv-phone::before { top: 3.1%; width: 27%; height: 2.6%; min-height: 12px; background: #000; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.04); }
.dv-phone::after { content: ""; position: absolute; left: -4.5px; top: 17%; width: 3px; height: 11%; border-radius: 2px 0 0 2px; background: linear-gradient(#3a3a3e, #1b1b1d); box-shadow: 0 calc(1.2 * 100%) 0 0 #2b2b2e; z-index: 0; }
.dv-phone img { aspect-ratio: 393 / 852; height: auto; border-radius: 12.4% / 5.8%; }
@media (max-width: 640px) { .dv-phone { padding: 4.3%; border-width: 2px; border-radius: 16% / 7.4%; } .dv-phone img { border-radius: 12.4% / 5.8%; } .dv-phone::before { top: 3.1%; height: 2.6%; min-height: 8px; } .dv-phone::after { left: -3.5px; width: 2px; } }

/* Kova case study: cropped sections of the real screens */
.kv-h { margin: clamp(2rem, 4vw, 2.75rem) 0 0.5rem; }
.kv-h:first-child { margin-top: 0; }
.kv-stage { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: clamp(1.25rem, 3vw, 2.25rem); margin-top: 1.5rem; padding: clamp(1.5rem, 4vw, 3rem); border-radius: 20px; background: var(--panel); }
.kv-fig { margin: 0; flex: 0 1 21rem; max-width: 21rem; display: grid; gap: 0.85rem; justify-items: center; }
.kv-fig img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06), 0 24px 40px -28px rgb(0 0 0 / 0.5); }
.kv-fig figcaption { font-size: 0.8125rem; line-height: 1.4; color: var(--muted); text-align: center; }
.kv-index { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cs-body .kv-index li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.5rem; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.kv-index b { font-weight: 400; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); padding-top: 0.2rem; }
.kv-index strong { display: block; font-weight: 500; }
.kv-index span span, .kv-index span { color: var(--muted); }
.kv-index strong { color: var(--ink); }
@media (max-width: 640px) { .kv-index { grid-template-columns: minmax(0, 1fr); } .kv-fig { flex-basis: 100%; } }
@media (min-width: 900px) { .cs-section > .grid > .cs-section__body > .kv-h { grid-column: 2; } }

/* Kova demos: spacing around the interactive blocks */
.kv-demo { margin-top: 1.5rem; }
.kv-demo:empty { min-height: 8rem; }
.kv-caption { margin-top: 0.85rem; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.kv-demo--hero { margin-top: 0; }
