/* ivanteong.com
   Layout idea: warm white page, charcoal type, one cinnabar accent on the seal,
   main actions and the headline; cobalt for text links only. */
:root {
  --ground: #FBF9F6;
  --surface: #FFFFFF;
  --ink: #23262B;
  --ink-2: #3A3F45;
  --muted: #5A5F66;
  --line: #E7E1D9;
  --accent: #C8401A;
  --accent-ink: #FFFFFF;
  --tint: #FCEBDD;
  --link: #2346C7;
  --shadow: 0 18px 44px rgba(35, 38, 43, 0.14);
  --f-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-han: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #17181B;
    --surface: #1F2125;
    --ink: #F1EEEA;
    --ink-2: #D9D5CF;
    --muted: #A8A6A1;
    --line: #34363B;
    --accent: #EB4A3A;
    --accent-ink: #17181B;
    --tint: #2C221D;
    --link: #8FA6FF;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #17181B;
  --surface: #1F2125;
  --ink: #F1EEEA;
  --ink-2: #D9D5CF;
  --muted: #A8A6A1;
  --line: #34363B;
  --accent: #EB4A3A;
  --accent-ink: #17181B;
  --tint: #2C221D;
  --link: #8FA6FF;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 4px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(38px, 5vw, 64px); }
.hero h1 { font-size: clamp(36px, 3.9vw, 54px); }
h2 { font-size: clamp(28px, 3.4vw, 42px); }
h3 { font-size: clamp(20px, 2vw, 24px); letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 12px 16px; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* Header */
.site-header { padding-block: 22px; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.seal { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 5px; background: var(--accent); color: #FFFFFF; font-family: var(--f-han); font-size: 26px; line-height: 1; font-weight: 700; flex: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; font-size: 16px; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 12px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 17px; text-decoration: none; border: 0; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { color: var(--accent-ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.dark { background: var(--ink); color: var(--ground); }
.btn.dark:hover { color: var(--ground); }
.site-nav .btn { min-height: 44px; padding: 10px 20px; font-size: 16px; color: var(--ground); }
.text-link { font-weight: 600; padding: 12px 0; display: inline-block; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

/* Hero */
.hero { padding-block: 36px 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.hero h1 .hl { color: var(--accent); }
.lede { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--bar, var(--accent)); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.tile:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow); }
.tile-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--tint); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); transition: transform 2.4s ease, object-position 2.4s ease; }
.tile:hover .tile-media img, .tile:focus-visible .tile-media img { transform: scale(1.12); object-position: var(--pos-hover, var(--pos, center)); }
.tile-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 18px; }
.tag { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile-name { font-weight: 700; font-size: 18px; }
.tile-line { font-size: 14px; line-height: 1.4; color: var(--muted); }

.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; margin-top: 56px; border-top: 2px solid var(--ink); }
.proof > div { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; }
.proof .num { font-weight: 800; font-size: 36px; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.proof .what { color: var(--ink-2); }
.proof .calc { color: var(--muted); font-size: 15px; }

/* Sections */
.section { padding-block: 72px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band-tint { background: var(--tint); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 32px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 16px; max-width: 56ch; }

/* Numbered index rows */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 360px); gap: 20px 32px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.rows > .row:first-child { border-top: 2px solid var(--ink); }
.rows > .row:last-child { border-bottom: 1px solid var(--line); }
.row:hover { color: var(--ink); }
.row:hover h3 { color: var(--accent); }
.row .n { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .meta { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.row p { color: var(--ink-2); max-width: 62ch; margin-top: 8px; }
.row .media { aspect-ratio: 2 / 1; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.row .media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 0.6s ease; }
.row:hover .media img { transform: scale(1.04); }
.row .media.contain img { object-fit: contain; padding: 10px; }

/* Card grid */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.flip { appearance: none; font: inherit; color: inherit; text-align: left; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1200px; min-height: 220px; display: block; width: 100%; }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; min-height: 220px; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.flip.is-flipped .flip-inner { transform: rotateX(180deg); }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back { transform: rotateX(180deg); background: var(--ink); color: var(--ground); border-color: var(--ink); }
.face .k { font-size: 14px; font-weight: 700; color: var(--accent); }
.face.back .k { color: var(--tint); }
.face .t { font-weight: 700; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
.face .d { font-size: 15px; line-height: 1.45; }
.face .hint { margin-top: auto; font-size: 13px; color: var(--muted); }
.face.back .hint { color: #C9C5BF; }

/* Link lists */
.two-col { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px 64px; }
.links { display: flex; flex-direction: column; }
.links a { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.links a:first-child { border-top: 2px solid var(--ink); }
.links a:last-child { border-bottom: 1px solid var(--line); }
.links a:hover .lt { color: var(--accent); }
.links .lt { font-weight: 700; font-size: 19px; line-height: 1.3; }
.links .lm { font-size: 15px; color: var(--muted); }
.links.inline a { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 24px; }
.eyebrow { font-size: 15px; color: var(--muted); font-weight: 500; }

/* Talks */
.talks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; margin-bottom: 36px; }
figure { margin: 0; }
.talk img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.talk figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.talk .tt { font-weight: 700; font-size: 20px; line-height: 1.3; }

/* About strip */
.about-strip { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px 64px; align-items: center; }
.about-strip img { width: 240px; height: 240px; object-fit: cover; border-radius: var(--radius); }
.about-strip h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.14; }

/* Art band */
.art-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px 64px; align-items: center; }
.art-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.art-pair figure:nth-child(2) { margin-top: 48px; }
.print { background: #FFFFFF; padding: 12px; box-shadow: var(--shadow); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.2s ease-out; will-change: transform; }
.print img { width: 100%; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* Contact and footer */
.contact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px 48px; }
.contact h2 { font-size: clamp(34px, 4.6vw, 60px); max-width: 16ch; letter-spacing: -0.03em; }
.site-footer { padding-block: 24px 48px; }
.site-footer .wrap > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.han { font-family: var(--f-han); }

/* Inner pages */
.page-head { padding-block: 40px 48px; }
.page-head .wrap { display: flex; flex-direction: column; gap: 20px; }
.crumbs { font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-head h1 { font-size: clamp(34px, 4.6vw, 58px); max-width: 20ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 15px; color: var(--muted); padding: 0; margin: 0; list-style: none; }
.facts b { color: var(--ink); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 40px; border-top: 2px solid var(--ink); margin-block: 8px 8px; }
.stats > div { padding: 18px 0; display: flex; flex-direction: column; gap: 4px; }
.stats .num { font-weight: 800; font-size: 34px; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats .what { color: var(--ink-2); }
.stats .calc { font-size: 14px; color: var(--muted); }
.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 18px; }
.prose h2 { font-size: clamp(24px, 2.6vw, 32px); margin-top: 28px; }
.prose h3 { margin-top: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose blockquote { margin: 8px 0; padding: 20px 24px; background: var(--tint); border-radius: var(--radius); font-size: 20px; line-height: 1.45; }
.prose blockquote cite { display: block; margin-top: 10px; font-size: 15px; font-style: normal; color: var(--muted); }
.wide { max-width: 980px; }
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.shot img { width: 100%; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; align-items: start; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 12px 16px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 2px solid var(--ink); font-size: 14px; color: var(--muted); font-weight: 600; }
td.num { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.callout { padding: 20px 24px; border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-block: 28px; border-top: 2px solid var(--ink); margin-top: 56px; }
.next a { color: var(--ink); text-decoration: none; font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; }
.next a:hover { color: var(--accent); }
.pcard { display: flex; flex-direction: column; gap: 12px; padding: 28px 0; border-top: 1px solid var(--line); }
.pcard:first-of-type { border-top: 2px solid var(--ink); }
.pcard .k { font-weight: 700; color: var(--accent); font-size: 15px; }
.pcard dl { margin: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 24px; }
.pcard dt { font-weight: 600; color: var(--muted); font-size: 15px; }
.pcard dd { margin: 0; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.timeline > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 6px 32px; padding: 18px 0; border-top: 1px solid var(--line); }
.timeline > div:first-child { border-top: 2px solid var(--ink); }
.timeline .when { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.timeline .role { font-weight: 700; }
@media (max-width: 620px) {
  div.timeline > div, div.timeline > div:first-child { border-top: 0; border-left: 2px solid var(--ink); margin-left: 6px; padding: 0 0 26px 24px; position: relative; gap: 4px; }
  div.timeline > div:last-child { padding-bottom: 4px; }
  div.timeline > div::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
}
@media (prefers-reduced-motion: no-preference) {
  div.timeline > div.armed { opacity: 0; translate: 0 14px; }
  div.timeline > div.armed.in-view { opacity: 1; translate: 0 0; transition: opacity .6s ease, translate .6s cubic-bezier(.2,.7,.2,1); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 620px) {
  div.timeline > div.armed { border-left-color: transparent; background: linear-gradient(var(--ink), var(--ink)) no-repeat left top / 2px 0; background-origin: border-box; }
  div.timeline > div.armed.in-view { background-size: 2px 100%; transition: opacity .6s ease, translate .6s cubic-bezier(.2,.7,.2,1), background-size .7s ease .1s; }
  div.timeline > div.armed::before { scale: 0; }
  div.timeline > div.armed.in-view::before { scale: 1; transition: scale .4s cubic-bezier(.3,1.6,.5,1) .15s; }
}
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

/* Gallery */
.gallery { columns: 3 260px; column-gap: 20px; }
.gallery button { appearance: none; border: 0; padding: 0; margin: 0 0 20px; background: none; cursor: zoom-in; display: block; width: 100%; break-inside: avoid; text-align: left; font: inherit; color: inherit; }
.gallery .print { display: block; padding: 10px; }
.gallery .cap { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.gallery .cap b { color: var(--ink); font-weight: 600; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1100px); max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(20, 20, 22, 0.86); }
dialog.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; background: #FFFFFF; padding: 12px; }
dialog.lightbox .lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #FFFFFF; padding: 12px 4px; }
dialog.lightbox button { appearance: none; border: 1px solid #FFFFFF; background: transparent; color: #FFFFFF; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: var(--radius); cursor: pointer; }

/* FAQ */
.faq { display: flex; flex-direction: column; max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:first-child { border-top: 2px solid var(--ink); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 19px; padding: 16px 0; list-style-position: outside; }
.faq details p { padding: 0 0 18px; color: var(--ink-2); max-width: 68ch; }

/* 404 */
.lost { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; }

/* Chart that draws itself */
.draw { position: relative; }
.draw img { width: 100%; }

/* Motion: everything below is decoration on top of a page that is complete at rest */
@media (prefers-reduced-motion: no-preference) {
  .seal.stamp { animation: stamp 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
  @keyframes stamp {
    0% { transform: translateY(-26px) scale(1.5) rotate(-12deg); opacity: 0; }
    55% { transform: translateY(0) scale(0.9) rotate(2deg); opacity: 1; box-shadow: 0 0 0 10px rgba(200, 64, 26, 0.18); }
    75% { transform: scale(1.05) rotate(-1deg); }
    100% { transform: none; box-shadow: 0 0 0 0 rgba(200, 64, 26, 0); }
  }
  .perform .roll { display: inline-block; overflow: hidden; vertical-align: bottom; height: 1.08em; }
  .perform .roll > span { display: inline-block; animation: roll 0.7s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  @keyframes roll { from { transform: translateY(105%); } to { transform: none; } }
  .perform .first { display: inline-block; animation: rise 0.5s 0.05s ease-out both; }
  .perform .grow { display: inline-block; transform-origin: left bottom; animation: grow 0.8s 0.95s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
  @keyframes grow { from { transform: scale(0.55); opacity: 0.2; } to { transform: none; opacity: 1; } }
  .perform .hl { animation: fade 0.7s 1.45s ease-out both; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
  .tiles .tile { animation: rise 0.6s ease-out both; }
  .tiles .tile:nth-child(1) { animation-delay: 0.5s; }
  .tiles .tile:nth-child(2) { animation-delay: 0.65s; }
  .tiles .tile:nth-child(3) { animation-delay: 0.8s; }
  .tiles .tile:nth-child(4) { animation-delay: 0.95s; }
  .draw.armed img { clip-path: inset(0 100% 0 0); }
  .draw.armed.in-view img { clip-path: inset(0 0 0 0); transition: clip-path 2.6s cubic-bezier(0.4, 0, 0.2, 1); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .tile-media img, .btn, .flip-inner, .print, .row .media img { transition: none; }
  .tile:hover, .btn:hover { transform: none; }
  .tile:hover .tile-media img { transform: none; }
}

/* Small screens */
@media (max-width: 920px) {
  .hero-grid, .two-col, .art-band { grid-template-columns: minmax(0, 1fr); }
  .proof { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 40px minmax(0, 1fr); }
  .row .media { grid-column: 2; max-width: 420px; }
  .about-strip { grid-template-columns: minmax(0, 1fr); }
  .timeline > div, .pcard dl { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .art-pair figure:nth-child(2) { margin-top: 0; }
  .site-nav { gap: 0 18px; }
}
@media print {
  .site-nav, .actions, .next { display: none; }
}

/* ---------- Visual components for case studies and work pages ---------- */
.viz { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; }
.viz-title { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.viz-note { font-size: 14px; color: var(--muted); }
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(150px, 40%) minmax(0, 1fr); gap: 16px; align-items: center; padding: 8px 6px; border-radius: 4px; }
.bar-row:hover { background: var(--tint); }
.bar-label { font-size: 15px; line-height: 1.35; }
.bar-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar { height: 14px; flex: 0 0 auto; width: calc(var(--v) * 0.78%); min-width: 3px; border-radius: 0 4px 4px 0; background: var(--accent); transform-origin: left center; }
.bar.quiet { background: var(--muted); opacity: 0.55; }
.bar-val { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 15px; }
.chip.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chips .sep { color: var(--muted); font-weight: 700; }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr); gap: 16px; align-items: stretch; }
.compare .mid { align-self: center; font-weight: 800; color: var(--accent); font-size: 22px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.panel.after { border-top: 6px solid var(--accent); }
.panel .k { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.panel .t { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.panel ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.mini { display: grid; grid-template-columns: minmax(0, 1fr) 44px 70px; gap: 10px; align-items: center; font-size: 14px; padding: 7px 0; border-top: 1px solid var(--line); }
.mini b { font-variant-numeric: tabular-nums; text-align: right; }
.pill { justify-self: end; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--tint); }
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border-top: 2px solid var(--ink); padding-top: 12px; }
.totals b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.totals span { font-size: 13px; color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; counter-reset: s; }
.strip > div { counter-increment: s; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.strip > div::before { content: counter(s); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #FFFFFF; font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.strip.plain > div::before { content: none; }
.strip b { font-size: 17px; }
.strip span { font-size: 14px; color: var(--muted); line-height: 1.4; }
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 2px solid var(--ink); }
.milestones > div { position: relative; padding: 22px 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.milestones > div::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ground); }
.milestones .when { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.milestones b { font-size: 16px; line-height: 1.3; }
@media (max-width: 620px) {
  .milestones { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--ink); margin-left: 6px; }
  .milestones > div { padding: 0 0 24px 24px; }
  .milestones > div:last-child { padding-bottom: 0; }
  .milestones > div::before { top: 1px; left: -9px; }
}
/* Case-study headline numbers rise in one after another while they count up. */
@media (prefers-reduced-motion: no-preference) {
  .cs-stats.lead.armed > div { opacity: 0; translate: 0 16px; }
  .cs-stats.lead.armed.in-view > div { opacity: 1; translate: 0 0; transition: opacity .6s ease, translate .7s cubic-bezier(.2,.7,.2,1); }
  .cs-stats.lead.armed.in-view > div:nth-child(2) { transition-delay: .12s; }
  .cs-stats.lead.armed.in-view > div:nth-child(3) { transition-delay: .24s; }
  .cs-stats.lead.armed.in-view > div:nth-child(4) { transition-delay: .36s; }
}
/* TradeSumo timeline: the line draws in and each milestone drops in turn. */
@media (prefers-reduced-motion: no-preference) {
  .milestones.armed { border-top-color: transparent; background: linear-gradient(var(--ink), var(--ink)) no-repeat left top / 0 2px; background-origin: border-box; }
  .milestones.armed.in-view { background-size: 100% 2px; transition: background-size 1.6s cubic-bezier(.4,0,.2,1); }
  .milestones.armed > div::before { scale: 0; }
  .milestones.armed > div > * { opacity: 0; translate: 0 6px; }
  .milestones.armed.in-view > div::before { scale: 1; transition: scale .4s cubic-bezier(.3,1.6,.5,1); }
  .milestones.armed.in-view > div > * { opacity: 1; translate: 0 0; transition: opacity .5s ease, translate .5s ease; }
  .milestones.armed.in-view > div:nth-child(1)::before, .milestones.armed.in-view > div:nth-child(1) > * { transition-delay: .1s; }
  .milestones.armed.in-view > div:nth-child(2)::before, .milestones.armed.in-view > div:nth-child(2) > * { transition-delay: .45s; }
  .milestones.armed.in-view > div:nth-child(3)::before, .milestones.armed.in-view > div:nth-child(3) > * { transition-delay: .8s; }
  .milestones.armed.in-view > div:nth-child(4)::before, .milestones.armed.in-view > div:nth-child(4) > * { transition-delay: 1.15s; }
  .milestones.armed.in-view > div:nth-child(5)::before, .milestones.armed.in-view > div:nth-child(5) > * { transition-delay: 1.5s; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 620px) {
  .milestones.armed { border-left-color: transparent; background-size: 2px 0; }
  .milestones.armed.in-view { background-size: 2px 100%; }
}
.xgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.xcard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.xcard .ximg { aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; border-bottom: 1px solid var(--line); }
.xcard .ximg img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.xcard .ximg.right img { object-position: right top; }
.xcard .xbody { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.xcard b.t { font-size: 18px; line-height: 1.25; }
.xcard p { font-size: 15px; color: var(--ink-2); }
.xhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xhead .glyph { width: 44px; height: 44px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { font-weight: 700; font-size: 14px; padding: 4px 10px; border-radius: 999px; background: var(--tint); font-variant-numeric: tabular-nums; }
.status { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1.5px solid currentColor; }
.status.win { color: #1B6E3C; }
.status.fail { color: #9B1C1C; }
.banner { background: var(--b, var(--tint)); border-radius: var(--radius); padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 56px) 0; display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 3vw, 36px); overflow: hidden; }
.banner.pad { padding-bottom: clamp(24px, 4vw, 56px); align-items: center; }
.phone { flex: 0 1 250px; min-width: 0; border: 8px solid #1B1D21; border-bottom: 0; border-radius: 34px 34px 0 0; overflow: hidden; background: #FFFFFF; box-shadow: var(--shadow); max-height: 460px; }
.phone img { width: 100%; }
.browser { flex: 1 1 auto; max-width: 940px; min-width: 0; border-radius: 10px; overflow: hidden; background: #FFFFFF; box-shadow: var(--shadow); }
.browser::before { content: "● ● ●"; display: block; padding: 6px 14px; font-size: 10px; letter-spacing: 3px; color: #B9B4AD; background: #EFECE7; }
.browser img { width: 100%; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.sw { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.sw i { display: block; height: 64px; background: var(--c); }
.sw span { display: block; padding: 8px 10px 10px; font-size: 13px; line-height: 1.35; }
.sw b { display: block; font-size: 14px; }
.bigquote { margin: 0; padding: clamp(24px, 4vw, 44px); background: var(--tint); border-radius: var(--radius); font-size: clamp(22px, 2.8vw, 34px); font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.bigquote cite { display: block; margin-top: 16px; font-size: 15px; font-weight: 400; font-style: normal; letter-spacing: 0; color: var(--muted); }
.trade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; }
.trade > div { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.trade > div.table { border: 2px dashed var(--accent); background: var(--tint); }
.trade .k { font-size: 13px; font-weight: 700; color: var(--muted); }
.item { padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font-size: 14px; font-weight: 600; }
.item.cash { border-color: var(--accent); color: var(--accent); }
.block { margin-top: 40px; display: flex; flex-direction: column; gap: 18px; }
.block > h2 { font-size: clamp(24px, 2.6vw, 32px); }
.block > p { max-width: 70ch; color: var(--ink-2); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
svg.dist { width: 100%; height: auto; display: block; }
svg.dist text { font-family: var(--f-body); font-size: 13px; fill: var(--muted); }
svg.dist .lbl { fill: var(--ink); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .viz.armed .bar { transform: scaleX(0); }
  .viz.armed.in-view .bar { transform: none; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .viz.armed.in-view .bar-row:nth-child(2) .bar { transition-delay: 0.08s; }
  .viz.armed.in-view .bar-row:nth-child(3) .bar { transition-delay: 0.16s; }
  .viz.armed.in-view .bar-row:nth-child(4) .bar { transition-delay: 0.24s; }
  .viz.armed.in-view .bar-row:nth-child(5) .bar { transition-delay: 0.32s; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .status.win { color: #6FCF97; }
  :root:not([data-theme="light"]) .status.fail { color: #F29B9B; }
}
:root[data-theme="dark"] .status.win { color: #6FCF97; }
:root[data-theme="dark"] .status.fail { color: #F29B9B; }
@media (max-width: 760px) {
  .compare, .split, .trade { grid-template-columns: minmax(0, 1fr); }
  .compare .mid { justify-self: center; transform: rotate(90deg); }
  .bar-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .phone { max-height: 340px; }
}

/* In-page menu, experiment blocks, placeholders */
.toc { position: sticky; top: 0; z-index: 5; background: var(--ground); border-block: 1px solid var(--line); margin-bottom: 32px; }
.toc .wrap { display: flex; gap: 6px 22px; overflow-x: auto; padding-block: 12px; font-size: 15px; font-weight: 500; white-space: nowrap; scrollbar-width: thin; }
.toc a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.toc a:hover { color: var(--accent); }
.block { scroll-margin-top: 72px; }
.page-head .project { font-size: 16px; font-weight: 700; color: var(--accent); }
.exps { display: flex; flex-direction: column; gap: 20px; }
.exp { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.exp .media { background: var(--tint); border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; min-height: 240px; }
.exp .media img { width: 100%; height: 100%; max-height: 360px; object-fit: contain; background: #FFFFFF; padding: 14px; align-self: stretch; }
.exp .ph { font-size: 14px; color: var(--muted); border: 1px dashed var(--muted); border-radius: 4px; padding: 10px 14px; margin: 24px; text-align: center; }
.exp .body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.exp h3 { font-size: 21px; }
.exp dl { margin: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 16px; font-size: 15px; }
.exp dt { font-weight: 700; color: var(--muted); }
.exp dd { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) {
  .exp { grid-template-columns: minmax(0, 1fr); }
  .exp .media { border-right: 0; border-bottom: 1px solid var(--line); min-height: 160px; }
  .exp dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .exp dd { margin-bottom: 8px; }
}

/* Screenshot grids that open full size. */
.exp.text { grid-template-columns: minmax(0, 1fr); }
.shots .shot img { border: 1px solid var(--line); border-radius: 4px; background: #FFFFFF; }
.shots.tall { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.shots.tall .shot img { height: 420px; width: 100%; object-fit: contain; padding: 10px; }
.zoom img { cursor: zoom-in; transition: transform .25s ease, box-shadow .25s ease; }
.zoom img:hover { box-shadow: 0 10px 28px rgba(35, 38, 43, 0.14); }
.zoom img:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.photos { columns: 4 200px; column-gap: 14px; }
.photos figure { margin: 0 0 14px; break-inside: avoid; }
.photos img { width: 100%; height: auto; border-radius: 4px; display: block; }
@media (max-width: 760px) { .shots.tall .shot img { height: 320px; } }
.xgrid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.shots.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* Product tour: large screenshots with numbered pins. */
.chapter { margin-top: 56px; }
.chapter:first-of-type { margin-top: 28px; }
.chead { display: flex; gap: 18px; align-items: flex-start; max-width: 760px; margin-bottom: 20px; }
.cnum { font-weight: 800; font-size: 15px; color: var(--accent); border: 2px solid var(--accent); border-radius: 50%; width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.chead h3 { font-size: 26px; margin: 4px 0 6px; }
.chead p { margin: 0; color: var(--ink-2); }
.tour { margin: 0 0 32px; }
.anno { position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #FFFFFF; box-shadow: 0 14px 40px rgba(35, 38, 43, 0.08); }
.anno img { display: block; width: 100%; height: auto; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #FFFFFF; font-weight: 800; font-size: 15px; display: grid; place-items: center; box-shadow: 0 0 0 5px rgba(200, 64, 26, 0.22), 0 4px 10px rgba(0, 0, 0, 0.2); pointer-events: none; }
ol.pins { list-style: none; counter-reset: pin; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px 24px; }
ol.pins li { counter-increment: pin; display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
ol.pins li::before { content: counter(pin); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #FFFFFF; font-weight: 800; font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
.tour figcaption { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 28px; align-items: start; }
.pair .pins { grid-template-columns: 1fr; }
/* Close-up crops of small UI: show them near real on-screen size instead of filling the column. */
.ui-actual .pair > figure { width: 100%; max-width: 340px; margin-inline: auto; }
.pair > figure.ui-actual { width: 100%; max-width: 340px; margin-inline: auto; }
.pair > figure.ui-actual.wider { max-width: 400px; }
@media (max-width: 760px) { .pin { width: 22px; height: 22px; font-size: 12px; box-shadow: 0 0 0 3px rgba(200, 64, 26, 0.22); } .chead h3 { font-size: 22px; } }
@media (prefers-reduced-motion: no-preference) {
  .pin { animation: pinpulse 2.4s ease-out infinite; }
  @keyframes pinpulse { 0%, 100% { box-shadow: 0 0 0 5px rgba(200, 64, 26, 0.22), 0 4px 10px rgba(0, 0, 0, 0.2); } 50% { box-shadow: 0 0 0 10px rgba(200, 64, 26, 0.08), 0 4px 10px rgba(0, 0, 0, 0.2); } }
}
.tour .swipe { display: none; }
@media (max-width: 760px) {
  .tour.wide .scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px 8px; }
  .tour.wide .anno { width: 820px; }
  .tour.wide .swipe { display: block; margin-top: 6px; }
}

/* ================================================================ Case-study template */
.cs-hero { background: var(--hb); color: #FFFFFF; padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); text-align: center; position: relative; }
.cs-hero.has-device { padding-bottom: 0; }
.cs-hero.light { color: #0F1B2D; }
.cs-hero .crumbs { color: inherit; opacity: 0.75; font-size: 14px; margin: 0 0 22px; }
.cs-hero .crumbs a { color: inherit; }
.cs-label { display: inline-block; margin: 0 0 20px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.cs-hero.light .cs-label { background: rgba(15, 27, 45, 0.08); }
.cs-hero h1 { font-size: clamp(34px, 5.2vw, 64px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; max-width: 20ch; margin: 0 auto; text-wrap: balance; }
.cs-lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; max-width: 60ch; margin: 22px auto 0; opacity: 0.88; text-wrap: pretty; }
.cs-facts { list-style: none; padding: 0; margin: 24px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; font-size: 14px; opacity: 0.85; }
.cs-facts b { font-weight: 700; margin-right: 4px; }
.cs-device { margin-top: clamp(36px, 5vw, 56px); margin-bottom: -120px; position: relative; z-index: 2; }
.cs-device .browser, .cs-device .chart-card { max-width: 980px; margin: 0 auto; box-shadow: 0 30px 80px rgba(10, 12, 30, 0.35); }
.cs-device .banner { background: none !important; padding: 0 !important; }
.cs-device .banner .browser { box-shadow: 0 30px 80px rgba(10, 12, 30, 0.35); }
.chart-card { background: #FFFFFF; border-radius: 10px; padding: 18px; }
.chart-card img { display: block; width: 100%; height: auto; }
.trio { display: grid; grid-template-columns: 1fr 1.25fr 1.25fr; gap: 20px; align-items: end; max-width: 1080px; margin: 0 auto; }
.trio .browser { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.trio .browser:nth-child(1) { transform: translateY(-14px) rotate(-1.5deg); }
.trio .browser:nth-child(3) { transform: translateY(-14px) rotate(1.5deg); }
.has-device + .cs-body { padding-top: 120px; }

.cs-intro { padding: clamp(48px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 28px 32px; text-align: center; }
.cs-stats b { display: block; font-size: clamp(40px, 5vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.cs-stats .l { display: block; margin-top: 12px; font-weight: 700; font-size: 16px; }
.cs-stats .n { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); max-width: 26ch; margin-inline: auto; }
.cs-stats.small { text-align: left; margin: 28px 0 8px; max-width: 900px; }
.cs-stats.small b { font-size: clamp(34px, 4vw, 48px); color: var(--accent); }
.cs-stats.small .n { margin-inline: 0; }
.cs-stats.stack { grid-template-columns: 1fr; text-align: left; align-content: center; }
.cs-stats.stack .n { margin-inline: 0; }

.cs-nav { position: sticky; top: 12px; z-index: 6; display: flex; justify-content: center; padding: 8px var(--gutter); pointer-events: none; }
.cs-nav .pill { pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(35, 38, 43, 0.08); }
.cs-nav .cs-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.cs-nav .cs-links::-webkit-scrollbar { display: none; }
.cs-nav .cs-links a { white-space: nowrap; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; transition: background 0.2s ease, color 0.2s ease; }
.cs-nav .cs-links a:hover { color: var(--ink); }
.cs-nav .cs-links a.on { background: var(--tint); color: var(--accent); font-weight: 700; }
.cs-nav .arrows { display: flex; gap: 2px; border-left: 1px solid var(--line); padding-left: 6px; flex: none; }
.cs-nav .arrows a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); text-decoration: none; font-size: 17px; }
.cs-nav .arrows a:hover { background: var(--tint); color: var(--accent); }

.cs-ch { padding: clamp(64px, 9vw, 120px) 0 0; scroll-margin-top: 70px; }
.cs-ch + .cs-ch > .wrap { border-top: 1px solid var(--line); padding-top: clamp(64px, 9vw, 120px); }
.cs-ch + .cs-ch { padding-top: 0; margin-top: clamp(64px, 9vw, 120px); }
.cs-ch .eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 700; color: var(--accent); margin: 0 0 14px; }
.cs-ch h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; max-width: 22ch; margin: 0 0 28px; text-wrap: balance; }
.cs-ch h3 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 14px; }
.measure { max-width: 700px; }
.measure p { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin: 0 0 18px; }
.measure p:last-child { margin-bottom: 0; }
.cs-ch > .wrap > * + * { margin-top: 36px; }
.cs-ch > .wrap > .eyebrow + h2 { margin-top: 0; }
.cs-ch > .wrap > h2 + * { margin-top: 0; }
.cs-sub { margin-top: 64px !important; }
.cs-sub > * + * { margin-top: 28px; }
.cs-cap { margin-top: 12px !important; }
.cs-fig { margin: 0; }
.cs-fig img { display: block; width: 100%; height: auto; }
.cs-fig.native img { width: auto; max-width: 100%; margin-inline: auto; }
.cs-fig.framed img { border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; box-shadow: 0 14px 40px rgba(35, 38, 43, 0.08); }
.cs-fig figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }

.cs-icons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px 36px; }
.cs-icons .ico { width: 32px; height: 32px; color: var(--accent); margin-bottom: 14px; }
.cs-icons h4 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.cs-icons p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }

:is(ul, ol).timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0; border-top: 2px solid var(--ink); }
:is(ul, ol).timeline li { padding: 16px 18px 0 0; position: relative; display: flex; flex-direction: column; gap: 6px; }
:is(ul, ol).timeline li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
:is(ul, ol).timeline b { font-size: 15px; }
.timeline span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 620px) {
  :is(ul, ol).timeline { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--ink); margin-left: 5px; }
  :is(ul, ol).timeline li { padding: 0 0 24px 22px; gap: 4px; }
  :is(ul, ol).timeline li:last-child { padding-bottom: 0; }
  :is(ul, ol).timeline li::before { top: 3px; left: -7px; }
}
/* Work OS: the job description gives way to the work itself; the timeline draws in step by step. */
@media (prefers-reduced-motion: no-preference) {
  .compare.armed > .panel, .compare.armed > .mid, .compare.armed .mini, .compare.armed .pill, .compare.armed .totals { opacity: 0; }
  .compare.armed > .panel:first-child { translate: -18px 0; }
  .compare.armed > .mid { scale: 0.4; }
  .compare.armed > .panel.after { translate: 0 14px; }
  .compare.armed .mini { translate: -10px 0; }
  .compare.armed .pill { scale: 0.6; }
  .compare.armed.in-view > .panel, .compare.armed.in-view > .mid, .compare.armed.in-view .mini, .compare.armed.in-view .pill, .compare.armed.in-view .totals {
    opacity: 1; translate: 0 0; scale: 1; transition: opacity .5s ease, translate .6s cubic-bezier(.2,.7,.2,1), scale .45s cubic-bezier(.3,1.5,.5,1); }
  .compare.armed.in-view > .mid { transition-delay: .45s; }
  .compare.armed.in-view > .panel.after { transition-delay: .7s; }
  .compare.armed.in-view .mini:nth-of-type(1) { transition-delay: 1s; }
  .compare.armed.in-view .mini:nth-of-type(2) { transition-delay: 1.15s; }
  .compare.armed.in-view .mini:nth-of-type(3) { transition-delay: 1.3s; }
  .compare.armed.in-view .mini:nth-of-type(4) { transition-delay: 1.45s; }
  .compare.armed.in-view .mini:nth-of-type(5) { transition-delay: 1.6s; }
  .compare.armed.in-view .mini:nth-of-type(2) .pill { transition-delay: 1.4s; }
  .compare.armed.in-view .mini:nth-of-type(3) .pill { transition-delay: 1.55s; }
  .compare.armed.in-view .mini:nth-of-type(4) .pill { transition-delay: 1.7s; }
  .compare.armed.in-view .mini:nth-of-type(5) .pill { transition-delay: 1.85s; }
  .compare.armed.in-view .totals { transition-delay: 1.9s; }

  ol.timeline.armed { border-top-color: transparent; background: linear-gradient(var(--ink), var(--ink)) no-repeat left top / 0 2px; background-origin: border-box; }
  ol.timeline.armed.in-view { background-size: 100% 2px; transition: background-size 1.6s cubic-bezier(.4,0,.2,1); }
  ol.timeline.armed li::before { scale: 0; }
  ol.timeline.armed li > * { opacity: 0; translate: 0 6px; }
  ol.timeline.armed.in-view li::before { scale: 1; transition: scale .4s cubic-bezier(.3,1.6,.5,1); }
  ol.timeline.armed.in-view li > * { opacity: 1; translate: 0 0; transition: opacity .5s ease, translate .5s ease; }
  ol.timeline.armed.in-view li:nth-child(1)::before, ol.timeline.armed.in-view li:nth-child(1) > * { transition-delay: .1s; }
  ol.timeline.armed.in-view li:nth-child(2)::before, ol.timeline.armed.in-view li:nth-child(2) > * { transition-delay: .45s; }
  ol.timeline.armed.in-view li:nth-child(3)::before, ol.timeline.armed.in-view li:nth-child(3) > * { transition-delay: .8s; }
  ol.timeline.armed.in-view li:nth-child(4)::before, ol.timeline.armed.in-view li:nth-child(4) > * { transition-delay: 1.15s; }
  ol.timeline.armed.in-view li:nth-child(5)::before, ol.timeline.armed.in-view li:nth-child(5) > * { transition-delay: 1.5s; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 620px) {
  ol.timeline.armed { border-left-color: transparent; background-size: 2px 0; }
  ol.timeline.armed.in-view { background-size: 2px 100%; }
}

.xp { padding-top: 48px; margin-top: 48px !important; border-top: 1px solid var(--line); }
.cs-ch > .wrap > .xp:first-of-type { border-top: 0; padding-top: 8px; }
.xp > * + * { margin-top: 24px; }
.xp-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.xp-head h3 { margin: 0; }
.xp .cs-fig { max-width: 900px; }
.hyp { max-width: 760px; padding: 20px 24px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; }
.hyp h4 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.hyp p { margin: 0; font-size: 17px; line-height: 1.6; }
.xp-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 36px; padding-top: 48px; border-top: 1px solid var(--line); }
.xp-mini > div { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.xp-mini h3 { font-size: 20px !important; margin: 0 !important; }
.xp-mini p { margin: 0; color: var(--ink-2); }
.xp-mini .cs-stats.small { margin: 6px 0 0; gap: 16px 24px; grid-template-columns: repeat(2, auto); }

.cs-build { padding-top: 24px; }
.cs-next { padding: clamp(72px, 9vw, 120px) 0 24px; }
.next-card { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 24px; padding: clamp(32px, 5vw, 56px); border-radius: 18px; background: var(--hb); color: #FFFFFF; text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.next-card:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(10, 12, 30, 0.25); }
.next-card .k { grid-column: 1 / -1; font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.8; }
.next-card .t { font-size: clamp(30px, 4.5vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.next-card .go { font-size: 40px; transition: transform 0.3s ease; }
.next-card:hover .go { transform: translateX(6px); }
.cs-next .small { margin-top: 18px; color: var(--muted); }

/* Cover cards for indexes */
.covers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px 28px; }
.cover { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; }
.cover-art { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; background: var(--hb); overflow: hidden; display: block; margin-bottom: 10px; }
.cover-art img { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.cover-art.float img { position: absolute; left: 9%; right: 9%; width: 82%; height: auto; top: 16%; border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); background: #FFFFFF; }
.cover-art.handset img { position: absolute; left: 50%; width: 36%; height: auto; top: 12%; transform: translateX(-50%); border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.cover-art.fill img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover:hover .cover-art.float img { transform: translateY(-8px) scale(1.02); }
.cover:hover .cover-art.handset img { transform: translateX(-50%) translateY(-8px); }
.cover:hover .cover-art.fill img { transform: scale(1.04); }
.cover-tag { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(15, 18, 30, 0.72); color: #FFFFFF; font-size: 13px; font-weight: 600; white-space: nowrap; backdrop-filter: blur(6px); }
.cover-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.cover-line { color: var(--ink-2); font-size: 16px; max-width: 48ch; }
.covers.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

@media (max-width: 760px) {
  .cs-device { margin-bottom: -60px; }
  .has-device + .cs-body { padding-top: 60px; }
  .trio { grid-template-columns: 1fr; max-width: 420px; }
  .trio .browser:nth-child(n+2) { display: none; }
  .trio .browser:nth-child(1) { transform: none; }
  .cs-nav { top: 6px; }
  .cs-nav .cs-links a { padding: 7px 10px; font-size: 13px; }
  .measure p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .cover-art img, .next-card, .next-card .go { transition: none; } }
.cs-device .phone { border-bottom: 8px solid #1B1D21; border-radius: 34px; box-shadow: 0 30px 80px rgba(10, 12, 30, 0.35); }
.cover-art.word { display: grid; place-items: center; }
.cover-word { color: #FFFFFF; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.02em; text-align: center; padding: 0 24px 32px; }
@media (max-width: 520px) { .cs-intro .cs-stats { grid-template-columns: 1fr 1fr; gap: 28px 16px; } .cs-intro .cs-stats b { font-size: 36px; } }
.video { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.cs-fig img[src*="-phone"] { max-height: 640px; width: auto; max-width: 100%; margin: 0 auto; }
.cs-fig video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }

/* ================================================================ Native diagrams */
.dg { margin: 0; padding: clamp(18px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.4; }
.dg-node { border-radius: 8px; padding: 10px 14px; text-align: center; border: 1px solid var(--line); background: var(--ground); }
.dg-node b { display: block; margin-bottom: 2px; }
.dg-node.pick { background: var(--accent); color: #FFFFFF; border-color: var(--accent); font-weight: 700; }
.dg-node.choice, .dg-node.decide { background: var(--tint); border-color: color-mix(in srgb, var(--accent) 40%, transparent); font-weight: 600; border-radius: 999px; padding: 12px 22px; }
.dg-node.decide { border-radius: 14px; font-weight: 400; }
.dg-node.ask { color: var(--ink-2); font-style: italic; }
.dg-node.ask b { font-style: normal; display: inline; margin-right: 4px; color: var(--ink); }
.dg-node.answer { display: flex; flex-direction: column; gap: 8px; align-items: center; background: var(--surface); border-color: var(--ink-2); }
.dg-node.sys { background: var(--surface); border-color: var(--ink-2); }
.dg-node.end.go { background: color-mix(in srgb, #2E8B57 14%, var(--surface)); border-color: #2E8B57; font-weight: 700; }
.dg-node.end.stop { background: var(--tint); border-color: var(--accent); font-weight: 700; }
.dg-line { width: 2px; height: 18px; background: color-mix(in srgb, var(--muted) 60%, transparent); margin: 0 auto; }
.dg-plus { text-align: center; font-weight: 800; color: var(--muted); margin: 4px 0; }
.dg-costs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dg-cost { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.dg-cost.lookup { background: color-mix(in srgb, var(--link) 14%, var(--surface)); color: var(--link); }
.dg-cost.model { background: color-mix(in srgb, #7A4CD9 14%, var(--surface)); color: #6A3FC8; }
.dg-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--ink-2); margin-bottom: 22px; align-items: center; }
.dg-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--ink-2); }
.dg-legend .sw.pick { background: var(--accent); border-color: var(--accent); }
.dg-legend .sw.ask { background: var(--ground); border-color: var(--line); }
.dg-legend .sw.answer { background: var(--surface); }
.dg-top { position: relative; display: flex; justify-content: center; }
.dg-stack { display: flex; flex-direction: column; align-items: center; max-width: 360px; margin: 0 auto; }
.dg-before { position: absolute; left: 0; top: 0; max-width: 200px; font-size: 13px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; }
.dg-before b { display: block; color: var(--ink-2); }
.dg-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.dg-cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dg-col { display: flex; flex-direction: column; }
.dg-cols > .dg-col { position: relative; padding-top: 20px; }
.dg-cols > .dg-col::before { content: ""; position: absolute; top: 0; left: calc(50% - 1px); width: 2px; height: 20px; background: color-mix(in srgb, var(--muted) 60%, transparent); }
.dg-cols > .dg-col::after { content: ""; position: absolute; top: 0; left: -9px; right: -9px; height: 2px; background: color-mix(in srgb, var(--muted) 60%, transparent); }
.dg-cols > .dg-col:first-child::after { left: calc(50% - 1px); }
.dg-cols > .dg-col:last-child::after { right: calc(50% - 1px); }
.dg-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.dg-branch { text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 6px 0 10px; }
.dg-sync .dg-stack { max-width: 420px; }
.dg-family, .dg-group { border-radius: 12px; padding: 16px; }
.dg-family { border: 2px solid var(--line); }
.dg-group { border: 2px solid var(--accent); background: var(--ground); margin-top: 14px; }
.dg-family > b, .dg-group > b { font-size: 17px; }
.dg-k { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.dg-groups { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dg-chip { display: inline-block; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.dg-chip.group.on { border-color: var(--accent); color: var(--accent); }
.dg-chip.role { background: color-mix(in srgb, var(--link) 9%, var(--surface)); border-color: color-mix(in srgb, var(--link) 35%, transparent); }
.dg-chip.role.mgr { background: color-mix(in srgb, #2E8B57 10%, var(--surface)); border-color: color-mix(in srgb, #2E8B57 40%, transparent); }
.dg-chip.skill { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: var(--tint); border-color: transparent; }
.dg-lanes { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; margin-top: 14px; }
.dg-lane { font-size: 12px; font-weight: 700; color: var(--muted); }
.dg-ladder { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dg-arrow { color: var(--muted); font-size: 13px; }
.dg-lateral { grid-column: 2; font-size: 12.5px; color: var(--muted); }
.dg-tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-top: 16px; }
.dg-task { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.dg-task.float { border-style: dashed; }
.dg-who { font-size: 12.5px; color: var(--ink-2); }
.dg-skills { display: flex; gap: 6px; flex-wrap: wrap; }
.dg-tnote { font-size: 12.5px; color: var(--muted); }
.dg-rules { margin: 18px 0 0; padding-left: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 6px 24px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 760px) {
  .dg-cols, .dg-cols.two { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dg-cols > .dg-col { padding-top: 0; }
  .dg-cols > .dg-col::before, .dg-cols > .dg-col::after { display: none; }
  .dg-before { position: static; max-width: none; margin-bottom: 14px; }
  .dg-top { flex-direction: column; }
  .dg-lanes { grid-template-columns: minmax(0, 1fr); }
  .dg-lateral { grid-column: 1; }
}
@media (max-width: 760px) { .dg-stack > .dg-line:last-child { display: none; } }

/* Diagrams build themselves once, in reading order. Without motion they are simply complete. */
@media (prefers-reduced-motion: no-preference) {
  .dg-armed .dg-step { opacity: 0; transform: translateY(8px); }
  .dg-armed .dg-line.dg-step { transform: scaleY(0); transform-origin: top; opacity: 1; }
  .dg-armed .dg-cost.dg-step, .dg-armed .dg-chip.skill.dg-step { transform: scale(0.6); }
  .dg-armed .dg-cols > .dg-col::before, .dg-armed .dg-cols > .dg-col::after { opacity: 0; }
  .dg-play .dg-step { animation: dgIn 0.45s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: var(--d, 0ms); }
  .dg-play .dg-line.dg-step { animation-name: dgLine; animation-duration: 0.3s; }
  .dg-play .dg-cost.dg-step, .dg-play .dg-chip.skill.dg-step { animation-name: dgPop; }
  .dg-play .dg-cols > .dg-col::before, .dg-play .dg-cols > .dg-col::after { animation: dgFade 0.3s ease forwards; animation-delay: var(--cd, 0ms); }
  @keyframes dgIn { to { opacity: 1; transform: none; } }
  @keyframes dgLine { to { transform: scaleY(1); } }
  @keyframes dgPop { 60% { opacity: 1; transform: scale(1.12); } to { opacity: 1; transform: none; } }
  @keyframes dgFade { to { opacity: 1; } }
}
.dg-scale { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: var(--muted); padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid color-mix(in srgb, var(--muted) 60%, transparent); }
.dg-scale .dg-here { color: var(--accent); }
.dg-cols.plain > .dg-col { padding-top: 0; }
.dg-cols.plain > .dg-col::before, .dg-cols.plain > .dg-col::after { display: none; }
.dg-size .dg-col { border-radius: 12px; padding: 14px; }
.dg-size .dg-col.on { background: var(--tint); outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.dg-node.team { background: var(--surface); border-color: var(--line); }
.dg-node.edition { background: transparent; border-style: dashed; font-weight: 600; font-size: 13px; }
@media (max-width: 760px) { .dg-scale { display: none; } }
.cs-narrow { max-width: 460px; }
.prizes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.prizes figure { margin: 0; }
.prizes img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 6px 18px rgb(0 0 0 / 0.06); cursor: zoom-in; }
.prizes figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
/* Home hero: the career arc */
.arc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 20px 50px -30px rgb(0 0 0 / 0.25); }
.arc-k { margin: 0 0 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.arc ol { list-style: none; margin: 0; padding: 0; position: relative; }
.arc ol::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.arc li { position: relative; padding-left: 34px; }
.arc li + li { margin-top: 6px; }
.arc li::before { content: ""; position: absolute; left: 0; top: 18px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-sizing: border-box; }
.arc li.scale::before { border-color: var(--ink); }
.arc li.build::before { background: var(--accent); }
.arc li a { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 12px 14px; margin-left: -14px; border-radius: 10px; color: inherit; text-decoration: none; transition: background 0.2s; }
.arc li a:hover, .arc li a:focus-visible { background: var(--tint); }
.arc li b { grid-column: 1 / -1; font-size: 18px; letter-spacing: -0.01em; }
.arc li a > span:last-child { grid-column: 1 / -1; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.arc-when { font-size: 13px; color: var(--muted); }
.arc-tag { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #FFFFFF; white-space: nowrap; }
.arc li.scale .arc-tag, .arc-tag.scale { background: var(--ink); }
.arc li.build .arc-tag { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.arc-now { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.arc-now .dot { width: 9px; height: 9px; border-radius: 50%; background: #2E8B57; box-shadow: 0 0 0 4px color-mix(in srgb, #2E8B57 20%, transparent); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .arc li { animation: rise 0.6s ease-out both; }
  .arc li:nth-child(1) { animation-delay: 0.5s; } .arc li:nth-child(2) { animation-delay: 0.65s; }
  .arc li:nth-child(3) { animation-delay: 0.8s; } .arc li:nth-child(4) { animation-delay: 0.95s; }
  .arc ol::before { transform-origin: top; animation: arcLine 1.1s 0.4s ease-out both; }
}
@keyframes arcLine { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* Home: case-study groups */
.cs-group { margin: 44px 0 20px; }
.cs-group:first-of-type { margin-top: 8px; }
.cs-group h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font-size: 24px; }
.cs-group p { margin: 0; color: var(--ink-2); }
/* Home hero portrait, larger */
.hero .avatar { width: 136px; height: 136px; border-width: 4px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -22px rgb(0 0 0 / 0.45); margin-bottom: 6px; }
@media (max-width: 760px) { .hero .avatar { width: 104px; height: 104px; } }
.porder { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin: 0 0 18px; font-size: 14px; }
.porder a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; }
.porder a:hover { border-color: var(--accent); color: var(--accent); }
.porder b { color: var(--accent); }
.porder .sep { color: var(--muted); }
.pcard dd a { white-space: nowrap; }
/* Talks: small click-to-play videos */
.vids { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 24px 20px; margin-top: 36px; }
.vid { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.vid figcaption { display: flex; flex-direction: column; gap: 4px; }
.vid .tt { font-weight: 700; line-height: 1.3; }
.yt, .yt-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #111; padding: 0; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease, filter 0.3s; }
.yt:hover img, .yt:focus-visible img { transform: scale(1.04); filter: brightness(0.85); }
.yt .play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 8px 24px rgb(0 0 0 / 0.35); transition: transform 0.2s; }
.yt .play svg { width: 24px; height: 24px; fill: #FFFFFF; margin-left: 3px; }
.yt:hover .play { transform: scale(1.08); }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vids + .links { margin-top: 32px; }
/* AI essay: kinds of work */
.k-data { --kf: color-mix(in srgb, #87918D 12%, var(--surface)); --ks: #87918D; }
.k-code { --kf: color-mix(in srgb, #2346C7 9%, var(--surface)); --ks: #2346C7; }
.k-ml { --kf: color-mix(in srgb, #2E7D32 11%, var(--surface)); --ks: #2E7D32; }
.k-llm { --kf: color-mix(in srgb, #7A4EA3 11%, var(--surface)); --ks: #7A4EA3; }
.k-person { --kf: color-mix(in srgb, #B06A00 13%, var(--surface)); --ks: #B06A00; }
.dg-node[class*="k-"] { background: var(--kf); border: 1.5px solid var(--ks); display: flex; flex-direction: column; gap: 2px; }
.dg-node[class*="k-"] b { margin: 0; font-size: 14px; }
.dg-node[class*="k-"] span { font-size: 12.5px; color: var(--ink-2); }
.dg-legend .sw[class*="k-"] { background: var(--kf); border: 1.5px solid var(--ks); }
.dg-wire { padding: 16px 0; border-top: 1px solid var(--line); }
.dg-wire:first-of-type { border-top: 0; }
.dg-wire-h { display: flex; gap: 10px; align-items: baseline; margin-bottom: 12px; }
.dg-wire-h b { font-size: 16px; }
.dg-tagline { font-size: 13px; color: var(--muted); }
.dg-chain { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dg-chain .dg-node { flex: 1 1 110px; min-width: 0; }
.dg-arr { color: var(--muted); font-weight: 700; }
.dg-note.left { text-align: left; margin-top: 12px; max-width: 70ch; }
.dg-cop .dg-stack { max-width: 420px; }
.kinds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.kinds-grid > div { border-radius: 12px; padding: 16px; background: var(--kf); border: 1.5px solid var(--ks); }
.kinds-grid h3 { margin: 0 0 6px; font-size: 17px; }
.kinds-grid p { margin: 0; font-size: 15px; }
.kinds-grid .kd { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--ks); }
.ai-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
.ai-table th, .ai-table td { text-align: left; vertical-align: top; padding: 12px 12px; border-bottom: 1px solid var(--line); }
.ai-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ai-table td:first-child { font-weight: 700; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.qa > div { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 18px 20px; }
.qa h3 { margin: 0 0 8px; font-size: 17px; }
.qa p { margin: 0 0 8px; }
.qa p:last-child { margin-bottom: 0; }
.prose .gallery { columns: 2 200px; column-gap: 14px; } .prose .gallery figure { margin: 0 0 14px; break-inside: avoid; } .prose figure { margin: 0; } .prose figure img { border-radius: 8px; } .prose figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; } .prose .video { margin: 6px 0; }
/* Home proof row: three equal columns, one line each, divided */
.proof { gap: 0; }
.proof > div { padding: 22px 28px 6px; border-left: 1px solid var(--line); gap: 6px; }
.proof > div:first-child { padding-left: 0; border-left: 0; }
.proof .num { font-size: 40px; }
.proof .what { font-weight: 600; color: var(--ink); font-size: 16px; }
.proof .calc { font-size: 14.5px; }
@media (max-width: 760px) {
  .proof > div, .proof > div:first-child { padding: 18px 0; border-left: 0; border-top: 1px solid var(--line); }
  .proof > div:first-child { border-top: 0; }
}
.cover-art.fill img { object-position: 0 50%; }
/* ---------- Animated section glyphs ---------- */
.gh { display: flex; align-items: center; gap: 14px; }
.glyph { width: 52px; height: 52px; flex: none; color: var(--ink); overflow: visible; }
.cs-group .glyph { width: 40px; height: 40px; }
.glyph .fill-soft { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
.glyph .fill-bg { fill: var(--bg); }
.glyph .fill-accent { fill: var(--accent); }
.glyph .fill-ink { fill: var(--ink); }
.glyph * { transform-box: fill-box; transform-origin: center; }
.g-case .ln, .g-compass .ln { stroke: var(--muted); stroke-width: 2; }
.g-case .lens { stroke: var(--accent); }
.g-rocket .flame { color: var(--accent); transform-origin: top center; }
.g-rocket .smoke circle { fill: color-mix(in srgb, var(--muted) 30%, transparent); stroke: none; }
.g-scale .cell { stroke-width: 2.2; }
.g-scale .c0 { fill: var(--accent); stroke: var(--accent); }
.g-scale .c1 { fill: color-mix(in srgb, var(--accent) 30%, transparent); }
.g-merge .m1 { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); }
.g-merge .m2 { fill: color-mix(in srgb, #2346C7 14%, transparent); stroke: #2346C7; }
.g-merge .m3 { fill: color-mix(in srgb, var(--ink) 10%, transparent); }
.g-pen .ink { stroke: var(--accent); stroke-dasharray: 80; }
.glyph-armed .g-pen .ink, .glyph-armed.g-pen .ink { stroke-dasharray: 40; }
.g-talk .w1, .g-talk .w2 { stroke: var(--accent); }
.g-brush .paint { stroke: color-mix(in srgb, var(--accent) 75%, transparent); stroke-dasharray: 70; }
.g-ask .q { stroke: var(--accent); }
.g-ask .q .fill-ink { fill: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .glyph-armed .lens { animation: gLens 1.8s cubic-bezier(.4,0,.2,1) both paused; }
  .glyph-armed .g-case .ln, .glyph-armed.g-case .ln { stroke-dasharray: 16; animation: gDraw 1s .2s ease-out both paused; }
  .glyph-armed .ship { animation: gLift 1.8s cubic-bezier(.3,0,.2,1) both paused; }
  .glyph-armed .flame { animation: gFlame .18s ease-in-out infinite alternate paused; }
  .glyph-armed .smoke circle { animation: gPuff 1.4s ease-out both paused; }
  .glyph-armed .smoke circle:nth-child(2) { animation-delay: .15s; }
  .glyph-armed .smoke circle:nth-child(3) { animation-delay: .3s; }
  .glyph-armed .cell { animation: gPop .45s cubic-bezier(.3,1.5,.5,1) both paused; }
  .glyph-armed .c1 { animation-delay: .3s; }
  .glyph-armed .c2 { animation-delay: .6s; }
  .glyph-armed .m1 { animation: gM1 1.4s cubic-bezier(.5,0,.2,1) both paused; }
  .glyph-armed .m2 { animation: gM2 1.4s cubic-bezier(.5,0,.2,1) both paused; }
  .glyph-armed .m3 { animation: gM3 1.4s cubic-bezier(.5,0,.2,1) both paused; }
  .glyph-armed .core { animation: gPop .5s 1.2s cubic-bezier(.3,1.6,.5,1) both paused; }
  .glyph-armed .needle { animation: gNeedle 2s cubic-bezier(.3,0,.2,1) both paused; }
  .glyph-armed .ink { animation: gInk2 1.6s ease-in-out both paused; }
  .glyph-armed .nib { animation: gNib 1.6s ease-in-out both paused; }
  .glyph-armed.g-talk path[d^="M21"] { animation: gPop .5s cubic-bezier(.3,1.6,.5,1) both paused; }
  .glyph-armed .w1 { animation: gWave 1.6s .3s ease-out both paused; }
  .glyph-armed .w2 { animation: gWave 1.6s .55s ease-out both paused; }
  .glyph-armed .paint { animation: gInk 1.4s .1s ease-in-out both paused; }
  .glyph-armed .bristle { animation: gBrush 1.5s ease-in-out both paused; }
  .glyph-armed .q { animation: gQ .9s .2s cubic-bezier(.3,1.6,.5,1) both paused; }
  .glyph-armed.go * { animation-play-state: running !important; }
  .glyph-armed.replay * { animation: none !important; }
}
@keyframes gLens { 0% { transform: translate(-22px, 4px) rotate(-10deg); } 55% { transform: translate(6px, -3px) rotate(6deg); } 80% { transform: translate(-2px, 1px); } 100% { transform: none; } }
@keyframes gDraw { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }
@keyframes gLift { 0% { transform: translateY(16px); } 20% { transform: translate(-1px, 16px); } 25% { transform: translate(1px, 15px); } 30% { transform: translate(-1px, 16px); } 75% { transform: translateY(-8px); } 100% { transform: translateY(-3px); } }
@keyframes gFlame { from { transform: scaleY(.7); } to { transform: scaleY(1.2); } }
@keyframes gPuff { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(1.4); opacity: .5; } }
@keyframes gPop { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gM1 { 0% { transform: translateY(-12px); } 100% { transform: none; } }
@keyframes gM2 { 0% { transform: translate(-12px, 8px); } 100% { transform: none; } }
@keyframes gM3 { 0% { transform: translate(12px, 8px); } 100% { transform: none; } }
@keyframes gNeedle { 0% { transform: rotate(-120deg); } 45% { transform: rotate(30deg); } 70% { transform: rotate(-12deg); } 88% { transform: rotate(5deg); } 100% { transform: rotate(0); } }
@keyframes gInk { from { stroke-dashoffset: 80; } to { stroke-dashoffset: 0; } }
@keyframes gNib { 0% { transform: translate(-26px, 12px); } 100% { transform: none; } }
@keyframes gWave { 0% { opacity: 0; transform: translateX(-4px); } 100% { opacity: 1; transform: none; } }
@keyframes gBrush { 0% { transform: translate(-30px, 26px) rotate(-10deg); } 100% { transform: none; } }
@keyframes gQ { 0% { transform: scale(0) rotate(-30deg); } 70% { transform: scale(1.15) rotate(8deg); } 100% { transform: none; } }
@keyframes gInk2 { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
/* LLM lesson glyphs */
.prose h2.gh { gap: 14px; }
.prose h2.gh .glyph { width: 44px; height: 44px; }
.glyph .ln { stroke: var(--muted); stroke-width: 2; }
.g-clock .arc-fill { fill: color-mix(in srgb, var(--accent) 20%, transparent); }
.g-clock .hand, .g-slider .track, .g-review .tick, .g-shield .tick, .g-list path[class^="t"], .g-explain .eq, .g-loop .tick { stroke: var(--accent); }
.g-slider .track { stroke-width: 4; }
.g-bars .b1, .g-bars .b2 { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.g-signal .r1, .g-signal .r2 { stroke: var(--accent); }
.g-code .digits { fill: var(--accent); font-family: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .glyph-armed .drop { animation: gDrop 1.6s ease-in both paused; }
  .glyph-armed .d1 { animation-name: gDropL; }
  .glyph-armed .d2 { animation-name: gDropR; animation-delay: .15s; }
  .glyph-armed .d3 { animation-delay: .3s; }
  .glyph-armed .hand { animation: gSpin 1.6s cubic-bezier(.3,0,.2,1) both paused; transform-origin: 50% 100%; }
  .glyph-armed .arc-fill { animation: gFade 1.6s ease-out both paused; }
  .glyph-armed .k1 { animation: gK1 1.6s cubic-bezier(.4,0,.2,1) both paused; }
  .glyph-armed .k2 { animation: gK2 1.6s cubic-bezier(.4,0,.2,1) both paused; }
  .glyph-armed .track { stroke-dasharray: 30; animation: gTrack 1.6s cubic-bezier(.4,0,.2,1) both paused; }
  .glyph-armed .l1 { animation: gL1 1.4s cubic-bezier(.4,0,.2,1) both paused; }
  .glyph-armed .l2 { animation: gL2 1.4s cubic-bezier(.4,0,.2,1) both paused; }
  .glyph-armed .l3 { animation: gL3 1.4s cubic-bezier(.4,0,.2,1) both paused; }
  .glyph-armed .tick { stroke-dasharray: 40; animation: gTick .8s .4s ease-out both paused; }
  .glyph-armed .b { animation: gBar .7s cubic-bezier(.3,1.4,.5,1) both paused; transform-origin: 50% 100%; }
  .glyph-armed .b2 { animation-delay: .2s; } .glyph-armed .b3 { animation-delay: .4s; }
  .glyph-armed .sh { stroke-dasharray: 140; animation: gSh 1s ease-out both paused; }
  .glyph-armed .r1 { animation: gRing 1.4s ease-out both paused; }
  .glyph-armed .r2 { animation: gRing 1.4s .35s ease-out both paused; }
  .glyph-armed .digits { animation: gRoll 1.2s .2s cubic-bezier(.3,1.5,.5,1) both paused; }
  .glyph-armed .t1, .glyph-armed .t2, .glyph-armed .t3 { stroke-dasharray: 20; animation: gT .4s ease-out both paused; }
  .glyph-armed .t1 { animation-delay: .2s; } .glyph-armed .t2 { animation-delay: .6s; } .glyph-armed .t3 { animation-delay: 1s; }
  .glyph-armed .lk { stroke-dasharray: 16; animation: gLk .6s ease-out both paused; }
  .glyph-armed .s1, .glyph-armed .s2 { animation: gPop .5s .5s cubic-bezier(.3,1.6,.5,1) both paused; }
  .glyph-armed .eq { animation: gFade .4s 1s ease-out both paused; }
  .glyph-armed .spin { animation: gLoop 1.6s cubic-bezier(.4,0,.2,1) both paused; }
}
@keyframes gDrop { 0% { transform: translateY(-14px); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(28px); opacity: 1; } }
@keyframes gDropL { 0% { transform: translate(0, -12px); opacity: 0; } 30% { opacity: 1; transform: none; } 100% { transform: translate(8px, 10px); opacity: 0; } }
@keyframes gDropR { 0% { transform: translate(0, -12px); opacity: 0; } 30% { opacity: 1; transform: none; } 100% { transform: translate(-8px, 10px); opacity: 0; } }
@keyframes gSpin { from { transform: rotate(-300deg); } to { transform: rotate(60deg); } }
@keyframes gFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gK1 { 0% { transform: translateX(-30px); } 60% { transform: translateX(14px); } 100% { transform: none; } }
@keyframes gK2 { 0% { transform: translateX(26px); } 60% { transform: translateX(-8px); } 100% { transform: none; } }
@keyframes gTrack { 0% { stroke-dashoffset: 30; } 60% { stroke-dashoffset: -14; } 100% { stroke-dashoffset: 0; } }
@keyframes gL1 { 0% { transform: translate(17px, -14px) scale(1.35); } 100% { transform: none; } }
@keyframes gL2 { 0% { transform: scale(1.0); } 100% { transform: none; } }
@keyframes gL3 { 0% { transform: translate(-18px, 0) scale(.6); } 100% { transform: none; } }
@keyframes gTick { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes gBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes gSh { from { stroke-dashoffset: 140; } to { stroke-dashoffset: 0; } }
@keyframes gRing { 0% { transform: scale(.3); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gRoll { 0% { transform: translateY(14px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes gT { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes gLk { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }
@keyframes gLoop { from { transform: rotate(-270deg); } to { transform: rotate(0); } }
.g-layers .l2 { stroke: var(--ink); }
/* Principle glyphs */
.g-pillars .p2 { stroke: var(--accent); }
.g-pillars .roof { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.g-target .arrow { stroke: var(--accent); }
.g-stamp .c-b { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.g-anchor .anc { stroke: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .glyph-armed .pl { stroke-dasharray: 22; animation: gPl .5s ease-out both paused; }
  .glyph-armed .p1 { animation-delay: .1s; } .glyph-armed .p2 { animation-delay: .35s; } .glyph-armed .p3 { animation-delay: .6s; }
  .glyph-armed .roof { animation: gRoof .6s .9s cubic-bezier(.3,1.5,.5,1) both paused; }
  .glyph-armed .leaf { animation: gDoor 2s ease-in-out both paused; transform-origin: 0 50%; }
  .glyph-armed .knob-d { animation: gDoorK 2s ease-in-out both paused; }
  .glyph-armed .arrow { animation: gArrow .8s .2s cubic-bezier(.5,0,.2,1.2) both paused; }
  .glyph-armed .src { animation: gStamp 1.5s ease-in-out both paused; }
  .glyph-armed .cp { animation: gPop .4s cubic-bezier(.3,1.6,.5,1) both paused; }
  .glyph-armed .c-b { animation-delay: .45s; } .glyph-armed .c-a { animation-delay: .8s; } .glyph-armed .c-c { animation-delay: 1.05s; }
  .glyph-armed .anc { animation: gAnchor 1.4s cubic-bezier(.3,0,.2,1) both paused; transform-origin: 50% 0; }
}
@keyframes gPl { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
@keyframes gRoof { 0% { transform: translateY(-12px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes gDoor { 0% { transform: none; } 35% { transform: scaleX(.25) skewY(-8deg); } 65% { transform: scaleX(.25) skewY(-8deg); } 100% { transform: none; } }
@keyframes gDoorK { 0% { transform: none; } 35% { transform: translateX(-17px); opacity: .2; } 65% { transform: translateX(-17px); opacity: .2; } 100% { transform: none; opacity: 1; } }
@keyframes gArrow { 0% { transform: translate(24px, -24px); opacity: 0; } 30% { opacity: 1; } 100% { transform: none; } }
@keyframes gStamp { 0% { transform: translateY(0); } 25% { transform: translateY(20px); } 40% { transform: translateY(0); } 55% { transform: translate(-19px, 20px); } 70% { transform: translate(0, 0); } 82% { transform: translate(19px, 20px); } 100% { transform: none; } }
@keyframes gAnchor { 0% { transform: translateY(-14px) rotate(-14deg); } 55% { transform: translateY(2px) rotate(8deg); } 80% { transform: rotate(-3deg); } 100% { transform: none; } }
.flip-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.flip .glyph { width: 44px; height: 44px; }
/* AI essay: questions as rows */
.qa { display: block; border-top: 2px solid var(--ink); }
.qa .qa-row { display: grid; grid-template-columns: 52px minmax(0, 240px) minmax(0, 1fr); gap: 8px 28px; align-items: start; padding: 26px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.qa-row .glyph { width: 44px; height: 44px; }
.qa-row h3 { margin: 6px 0 0; font-size: 19px; line-height: 1.3; }
.qa-a p { margin: 0 0 10px; max-width: 68ch; }
.qa-a p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .qa .qa-row { grid-template-columns: 44px minmax(0, 1fr); }
  .qa-row .qa-a { grid-column: 1 / -1; }
}
/* Work OS: tables vs cards */
.dg-tv .glyph.tvc, .dg-tv .glyph.tv-bar { width: 100%; height: auto; }
.tv-tension { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: center; font-size: 13.5px; font-weight: 600; margin-bottom: 22px; }
.tv-tension span:first-child { text-align: right; color: var(--muted); }
.tv-tension span:last-child { color: var(--accent); }
.tv-track { stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.tv-knob { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.tv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tv-k { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tv-k.on { color: var(--accent); }
.tv-cap { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.tv-card { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.tvc text { font-family: inherit; stroke: none; }
.tv-n { font-size: 10px; fill: var(--ink-2); }
.tv-p { font-size: 19px; font-weight: 800; fill: var(--ink); }
.tv-p.sm { font-size: 11px; }
.tv-d { font-size: 9.5px; fill: var(--muted); }
.tv-h { font-size: 9px; font-weight: 700; fill: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tv-rule { stroke: var(--line); stroke-width: 1; }
.tv-col { fill: color-mix(in srgb, var(--accent) 9%, transparent); stroke: none; }
.dg-tv .scan { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 4; opacity: .9; }
.dg-tv .scan-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
@media (prefers-reduced-motion: no-preference) {
  .glyph-armed.tvc .scan { stroke-dasharray: 100; animation: gScan 2.6s .3s ease-in-out both paused; }
  .glyph-armed.tvc .scan-dot { animation: gFade .3s 2.8s both paused; }
  .glyph-armed.tv-bar .tv-knob { animation: gKnob 1.8s .2s cubic-bezier(.4,0,.2,1) both paused; }
}
/* TradeSumo lesson glyphs */
@media (prefers-reduced-motion: no-preference) {
  .glyph-armed .pc { animation: gPop .5s .15s cubic-bezier(.3,1.6,.5,1) both paused; }
  .glyph-armed .pl { stroke-dasharray: 16; animation: gLk .5s .5s ease-out both paused; }
  .glyph-armed.g-phone .r1 { animation-delay: .8s; }
  .glyph-armed .tap { animation: gPop .4s .7s cubic-bezier(.3,1.6,.5,1) both paused; }
  .glyph-armed .sp { animation: gSpread 1.1s cubic-bezier(.2,.7,.2,1) both paused; }
  .glyph-armed .sp:nth-of-type(odd) { animation-delay: .1s; }
  .glyph-armed.g-spread .core { animation: gFadeDown 1.1s ease-out both paused; }
  .glyph-armed .coin { animation: gCoin 1.4s cubic-bezier(.4,0,.2,1) both paused; }
}
@keyframes gSpread { from { transform: translate(var(--dx), var(--dy)) scale(.5); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes gFadeDown { 0% { transform: scale(2.2); } 100% { transform: none; } }
@keyframes gCoin { 0% { transform: translateY(-18px); opacity: 0; } 25% { opacity: 1; } 55% { transform: translateY(10px); } 70% { transform: translateY(10px); } 100% { transform: none; opacity: 1; } }
@keyframes gScan { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes gKnob { 0% { transform: translateX(-86px); } 40% { transform: translateX(-86px); } 100% { transform: none; } }
@media (max-width: 760px) {
  .tv-pair { grid-template-columns: minmax(0, 1fr); }
  .tv-tension { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tv-tension svg { grid-column: 1 / -1; grid-row: 2; }
  .tv-tension span:first-child { text-align: left; }
  .tv-tension span:last-child { text-align: right; }
}

/* Analytics consent banner */
.consent { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-inline: auto; display: grid; gap: 14px; padding: 18px 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 15px; line-height: 1.5; }
.consent p { margin: 0; color: var(--ink-2); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.consent .btn { min-height: 44px; padding: 10px 20px; font-size: 15px; flex: 1 1 120px; }
.consent-link button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.consent-link button:hover { color: var(--ink); }
@media print { .consent { display: none; } }
