html, body { background: #131C25; color: #F3F6FB; }

/* ---------- Tokens (Koo Arts & Tech brand kit) ---------- */
:root {
  --bg: #131C25;        /* Midnight Reef */
  --surface: #1E2A36;   /* Reef */
  --ink: #F3F6FB;       /* Seafoam White */
  --muted: #C8D3DF;     /* Mist */
  --soon: #8E9DAE;
  --teal: #51C2C6;      /* Lagoon Teal: arts */
  --blue: #5795CE;      /* Atoll Blue: tech */
  --coral: #F2866B;     /* Sunset Coral */
  --teal-deep: #23797D;
  --navy-muted: #2B3A4A; /* secondary ink on light plates */

  /* Outer margin: 32px, growing on screens wider than 1440px so content stays in a centred 1376px column
     and header, heroes, sections and footer share the same left and right edges. Colour plates stay full-bleed. */
  --m: max(32px, calc((100vw - 1440px) / 2 + 32px));
  --gap: 24px;
  /* One type scale: hero 136 / display 84 / h2 44 / lead 22 / body 18 / small 15 at 1440px. */
  --t-hero: clamp(44px, 8.6vw, 136px);
  --t-display: clamp(36px, 5.4vw, 84px);
  --t-h2: clamp(28px, 3vw, 44px);
  --t-lead: clamp(18px, 1.5vw, 22px);
  --t-body: 18px;
  --t-small: 15px;
  /* Vertical rhythm: the gap between sections, the padding inside colour plates, and the wave on each plate edge.
     Balanced on purpose: the 160/120px originals felt empty, 56/48px felt cramped. */
  --space-section: clamp(64px, 6.6vw, 96px);
  --space-plate: clamp(56px, 5.6vw, 80px);
  --wave-h: 44px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-dv: "Noto Sans Thaana", "MV Faseyha", sans-serif;
  /* film grain: light specks for dark grounds, dark specks for plates */
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .09 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .14 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 759px) { :root { --m: 16px; --gap: 16px; --t-body: 17px; } }


/* Smooth cross-fade between pages where the browser supports it */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; animation-timing-function: var(--ease-out); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 var(--t-body)/1.6 var(--font); background: var(--bg) var(--grain-light); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -0.02em; font-weight: 750; text-wrap: balance; }
h2 { font-size: var(--t-h2); font-stretch: 112%; }
h3 { font-size: var(--t-lead); font-weight: 650; }
p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
[lang="dv"] { font-family: var(--font-dv); }
::selection { background: var(--coral); color: var(--bg); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -60px; z-index: 30; background: var(--coral); color: var(--bg); padding: 10px 16px; }
.skip:focus { top: 12px; }
.meta { font-size: var(--t-small); color: var(--muted); }
/* Section headings on the dark ground carry a short coral bar, so each section starts with a clear mark */
main > section:not(.plate) > h2::before, .labplate-text > h2::before, .made-text > h2::before { content: ""; display: block; width: 40px; height: 4px; margin-bottom: 16px; border-radius: 2px; background: var(--coral); }

/* ---------- Plates: full-bleed colour fields with grain ---------- */
.plate { --ink-on: var(--bg); color: var(--bg); background-image: var(--grain-dark); }
.plate .meta, .plate .muted { color: var(--navy-muted); }
.plate-paper { background-color: var(--ink); }
.plate-teal { background-color: var(--teal); }
.plate-coral { background-color: var(--coral); }
.plate-blue { background-color: var(--blue); }
.plate :focus-visible { outline-color: var(--bg); }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 54px; padding: 0 28px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--bg);
  font: 700 var(--t-body)/1 var(--font); font-stretch: 110%; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-coral { background: var(--coral); }
.btn-sm { height: 40px; padding: 0 18px; font-size: var(--t-small); }
.link { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; text-decoration: underline 2px var(--coral); text-underline-offset: 6px; white-space: nowrap; transition: text-decoration-color 200ms ease; }
.link::after { content: "\2192"; transition: transform 200ms var(--ease-out); }
.link-ink { text-decoration-color: var(--bg); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--teal); }
  .link:hover::after { transform: translateX(5px); }
}

/* ---------- Ring cursor (the Koo O follows the pointer; fine pointers only) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 40; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid var(--coral); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 200ms ease, width 220ms var(--ease-out), height 220ms var(--ease-out), margin 220ms var(--ease-out); }
.cursor::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--coral); }
.has-cursor .cursor { opacity: 1; }
.cursor.is-big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }

/* ---------- Header ---------- */
.top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px var(--m); }
.top-mark img { height: 32px; width: auto; }
.top-nav { display: flex; align-items: center; gap: 28px; font-size: var(--t-small); font-weight: 600; font-stretch: 112%; text-transform: uppercase; letter-spacing: 0.02em; }
.top-nav a:not(.btn) { text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.top-nav a:not(.btn):hover { color: var(--coral); }
.top-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--coral); }
.menu-btn { height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--t-small) var(--font); cursor: pointer; }
/* The full nav needs about 1010px with AI Resources in it, so narrower windows get the Menu button. */
@media (max-width: 1023px) {
  .top { flex-wrap: wrap; }
  .js .top-nav { display: none; }
  .js .top-nav.is-open { display: flex; }
  .top-nav { flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 0 8px; font-size: var(--t-h2); text-transform: none; letter-spacing: -0.02em; }
  .top-nav .btn { margin-top: 16px; }
}
@media (min-width: 1024px) { .menu-btn { display: none; } }

/* ---------- Display type: wide line, narrow line ---------- */
.display { font-size: var(--t-display); font-weight: 900; line-height: 0.86; letter-spacing: -0.03em; text-transform: uppercase; }
.wide { font-stretch: 125%; }
.narrow { font-stretch: 62%; font-weight: 800; letter-spacing: -0.01em; }
.mask { display: block; overflow: hidden; padding: 0.04em 0 0.08em; }
.mask > span { display: block; }
.js .mask > span { transform: translateY(105%); transition: transform 650ms var(--ease-out); }
.js .mask + .mask > span { transition-delay: 110ms; }
.ready .mask > span { transform: none; }
main > section, main > .credits, main > nav { margin-top: var(--space-section); }
main > .plate, main > .page-hero.plate + section, main > .plate + .plate, main > .plate + section.plate { margin-top: 0; }
main > .plate + section:not(.plate), main > .page-hero + section, main > section + .plate { margin-top: var(--space-section); }
.plate { padding-top: var(--space-plate); padding-bottom: var(--space-plate); }

/* ---------- Home hero: letters in orbit ---------- */
.hero { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr auto; gap: 0 var(--gap); min-height: max(640px, calc(100svh - 84px)); padding: 0 var(--m) 28px; overflow: hidden; }
#sculpture { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#sculpture:active { cursor: grabbing; }
.js #sculpture { opacity: 0; transition: opacity 1200ms ease 200ms; }
.webgl-ok #sculpture { opacity: 1; }
.hero-fallback { display: none; position: absolute; right: 6vw; top: 6vh; gap: 2vw; font-size: 16vw; line-height: 1; }
.hero-fallback span:nth-child(1) { color: var(--teal); }
.hero-fallback span:nth-child(2) { color: var(--ink); }
.hero-fallback span:nth-child(3) { color: var(--coral); }
.no-webgl .hero-fallback { display: flex; }
.no-webgl #sculpture { display: none; }
.hero-note { position: relative; grid-row: 1; grid-column: 1 / span 5; font-size: var(--t-small); color: var(--muted); max-width: 36ch; }
.hero-tag { position: relative; grid-row: 1; grid-column: 9 / -1; justify-self: end; text-align: right; font-size: var(--t-small); font-weight: 600; font-stretch: 112%; text-transform: uppercase; letter-spacing: 0.02em; }
.hero-foot { position: relative; grid-row: 2; grid-column: 9 / -1; align-self: end; padding-bottom: 32px; }
.hero-lede { font-size: var(--t-lead); line-height: 1.4; }
.hero-foot .actions { margin-top: 24px; }
.hero .display { position: relative; grid-row: 3; grid-column: 1 / -1; font-size: var(--t-hero); }
.motion-btn { margin-left: 8px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: 600 var(--t-small) var(--font); text-decoration: underline 1.5px var(--coral); text-underline-offset: 5px; cursor: pointer; }
.js .hero-foot, .js .hero-note, .js .hero-tag { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out) 550ms, transform 700ms var(--ease-out) 550ms; }
.ready .hero-foot, .ready .hero-note, .ready .hero-tag { opacity: 1; transform: none; }
@media (max-width: 859px) {
  .hero { grid-template-columns: 1fr; min-height: max(700px, calc(100svh - 76px)); }
  .hero-note, .hero-tag, .hero-foot, .hero .display { grid-column: 1; }
  .hero-tag { grid-row: 1; justify-self: start; text-align: left; }
  .hero-note { grid-row: 4; margin-top: 16px; }
  .hero-foot { grid-row: 3; padding: 0 0 24px; }
  .hero .display { grid-row: 2; align-self: end; font-size: 11.4vw; margin-bottom: 24px; }
  .hero-fallback { top: 14vh; right: 8vw; font-size: 28vw; }
}

/* ---------- Home: manifesto, crafts, name plate, feature, lab ---------- */
.manifesto { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: center; padding-left: var(--m); padding-right: var(--m); }
.manifesto-text { grid-column: 1 / span 7; }
.manifesto .statement { margin-top: 32px; }
.statement { font-size: clamp(20px, 1.9vw, 28px); line-height: 1.4; max-width: 32ch; font-weight: 450; }
.manifesto-art { grid-column: 8 / -1; font-size: clamp(180px, 28vw, 460px); line-height: 1; color: var(--coral); text-align: center; }

.crafts { padding: 0 var(--m); position: relative; }
/* Numbered rows with hairlines: the number, the craft, then its note, so the note sits near the name it describes. */
.craft-list { margin-top: 32px; border-bottom: 1px solid rgba(243, 246, 251, 0.12); counter-reset: craft; }
.craft-list li { counter-increment: craft; border-top: 1px solid rgba(243, 246, 251, 0.12); }
.craft-list a, .craft-list .is-soon { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 18ch); align-items: baseline; gap: 16px; padding: 14px 0; text-decoration: none; }
.craft-list a::before, .craft-list .is-soon::before { content: counter(craft, decimal-leading-zero); font-size: var(--t-small); font-weight: 700; color: var(--coral); }
.craft-name { font-size: clamp(30px, 4.2vw, 64px); font-weight: 850; font-stretch: 118%; letter-spacing: -0.035em; line-height: 1.05; transition: color 250ms ease, transform 400ms var(--ease-out); }
.craft-note { font-size: var(--t-small); color: var(--muted); text-align: right; }
.craft-list a:hover .craft-name { color: var(--coral); transform: translateX(24px); }
.is-soon .craft-name { color: var(--soon); }
.craft-preview { position: fixed; left: 0; top: 0; z-index: 4; width: min(340px, 26vw); aspect-ratio: 4 / 3; object-fit: cover; border: 10px solid var(--ink); pointer-events: none; opacity: 0; transform: translate(-50%, -50%) rotate(-4deg) scale(0.9); transition: opacity 200ms ease, transform 300ms var(--ease-out); }
.craft-preview.is-on { opacity: 1; transform: translate(-50%, -50%) rotate(-4deg) scale(1); }
@media (hover: none), (max-width: 859px) { .craft-preview { display: none; } .craft-note { max-width: 12ch; } }

.nameplate { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px var(--gap); padding-left: var(--m); padding-right: var(--m); }
.nameplate-head { grid-column: 1 / span 6; }
.nameplate-head p { margin-top: 16px; max-width: 38ch; }
.nameplate-controls { grid-column: 8 / -1; display: grid; gap: 16px; align-self: end; }
.nameplate .field input { background: rgba(19, 28, 37, 0.12); color: var(--bg); font-size: var(--t-lead); }
.nameplate .field > span { color: var(--navy-muted); }
.name-out { grid-column: 1 / -1; font-size: clamp(64px, 10vw, 168px); line-height: 1.3; text-align: center; min-height: 1.3em; overflow-wrap: anywhere; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(19, 28, 37, 0.12); color: var(--bg); font: 600 var(--t-small) var(--font); cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.chips button:active { transform: scale(0.96); }
.chips button[aria-pressed="true"] { background: var(--bg); color: var(--ink); }
.tester .chips button { background: var(--surface); color: var(--ink); }

.feature { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: center; padding-left: var(--m); padding-right: var(--m); }
.collage { grid-column: 1 / span 7; position: relative; aspect-ratio: 5 / 4; }
.collage .print { position: absolute; }
.collage .c1 { width: 72%; left: 0; top: 4%; --tilt: -2.5deg; }
.collage .c2 { width: 34%; right: 2%; top: 0; --tilt: 4deg; }
.collage .c3 { width: 46%; right: 10%; bottom: 0; --tilt: -5deg; }
.feature-text { grid-column: 9 / -1; }
.feature-text p { margin: 20px 0 28px; }
@media (max-width: 859px) {
  .manifesto, .nameplate, .feature { grid-template-columns: 1fr; }
  .manifesto-text, .manifesto-art, .nameplate-head, .nameplate-controls, .name-out, .collage, .feature-text { grid-column: 1; }
  .manifesto-art { font-size: 54vw; }
  .collage { aspect-ratio: 1; }
}

.labplate { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: center; padding: 0 var(--m); }
.labplate-text { grid-column: 1 / span 5; }
.labplate-text > p { margin-top: 16px; max-width: 38ch; }
.mini-rows { margin: 28px 0; }
.mini-rows li { display: grid; grid-template-columns: 12px 1fr auto; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid rgba(243, 246, 251, 0.1); font-weight: 600; }
.mini-rows li:last-child { border-bottom: 1px solid rgba(243, 246, 251, 0.1); }
.labplate-art { grid-column: 7 / -1; }
.oo-field { width: 100%; aspect-ratio: 5 / 4; }
@media (max-width: 859px) { .labplate { grid-template-columns: 1fr; } .labplate-text, .labplate-art { grid-column: 1; } }

/* ---------- Prints: pictures framed like pinned prints ---------- */
.print { background: var(--ink); padding: 10px; transform: rotate(var(--tilt, 0deg)); transition: transform 450ms var(--ease-out); }
.print img { width: 100%; }
.print figcaption { padding: 10px 2px 0; font-size: var(--t-small); color: var(--navy-muted); }
a:hover .print, [data-reveal]:hover > .print { transform: rotate(0deg) scale(1.015); }
[style*="--tilt"] > .print, [style*="--tilt"] .print { transform: rotate(var(--tilt)); }
a:hover > .print, a:hover .print { transform: rotate(0deg) scale(1.015); }

/* ---------- Inner page heroes ---------- */
/* Title block and art are about the same height and centre against each other, so neither leaves an empty corner;
   the art sits in the middle of its half rather than pinned to the edge. */
.page-hero { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px var(--gap); align-items: center; padding: clamp(16px, 1.8vw, 28px) var(--m) 0; }
.page-hero.plate { padding-top: clamp(16px, 2vw, 28px); padding-bottom: clamp(40px, 4vw, 60px); }
/* The first block after a hero belongs to it, so it sits a little closer than a new section would */
main > .page-hero + section, main > .page-hero + div { margin-top: clamp(44px, 4.4vw, 64px); }
main > .page-hero.plate + section, main > .page-hero.plate + div { margin-top: calc(var(--wave-h) + 32px); }
/* Dark heroes get a soft brand glow behind the art; closest-side keeps each glow inside the hero, so no edge shows */
.page-hero:not(.plate) { background:
  radial-gradient(closest-side at 78% 50%, rgba(87, 149, 206, 0.2), transparent),
  radial-gradient(closest-side at 18% 55%, rgba(81, 194, 198, 0.09), transparent); }
.page-hero-text { grid-column: 1 / span 6; }
.page-hero .lede { margin-top: 20px; max-width: 42ch; font-size: var(--t-lead); line-height: 1.5; }
/* Hero art: every page uses one height, about the title block's, so art and title carry equal weight.
   Each piece takes the width its own shape gives and starts at the left of its half, right beside the text. */
.page-hero { --art-h: clamp(200px, 21vw, 300px); }
.page-hero-art { grid-column: 7 / -1; align-self: center; justify-self: start; display: flex; align-items: center; height: var(--art-h); max-width: 100%; }
.page-hero-art > svg, .page-hero-art > canvas, .page-hero-art > .mini-collage { width: auto; height: 100%; max-width: 100%; }
.page-hero-art > .print { width: min(100%, calc(var(--art-h) * 4 / 3)); }
/* Thaana letters fill only part of their em, so letter art is set larger than the box to look as tall as the others */
.page-hero-art > .giant-glyph { font-size: calc(var(--art-h) * 1.05); line-height: 1; text-align: left; }
.page-hero-art > .name-glyph, .page-hero-art > .blog-glyph { font-size: calc(var(--art-h) * 0.66); line-height: 1.2; }
/* Letter art takes only the height it needs, so a hero without a lede (About) does not grow a gap below the title */
.page-hero-art:has(> .giant-glyph) { height: auto; }
.mini-collage { position: relative; aspect-ratio: 1; }
.mini-collage .print { position: absolute; width: 74%; }
.mini-collage .m1 { left: 0; top: 6%; --tilt: -4deg; }
.mini-collage .m2 { right: 0; bottom: 4%; --tilt: 5deg; }
.hero-print { --tilt: 3deg; }
.giant-glyph { font-size: clamp(110px, 12vw, 190px); line-height: 1.1; text-align: center; color: var(--coral); }
.plate .giant-glyph { color: var(--bg); }
.glyph-draw { width: 100%; height: auto; aspect-ratio: 3 / 2; overflow: visible; }
.glyph-draw path { fill: transparent; stroke-width: 6; stroke-linejoin: round; }
.tilemap { width: 100%; }
.tilemap .t-sea { fill: var(--teal-deep); }
.tilemap .t-rim { fill: var(--ink); }
.tilemap .t-lagoon { fill: var(--teal); }
.tilemap .t-isle { fill: var(--blue); }
.tilemap .t-alt { opacity: 0.82; }
.tilemap .t-tower { fill: var(--bg); }
.tilemap .t-path { stroke: var(--coral); stroke-width: 3; stroke-dasharray: 6 7; stroke-linecap: round; }
.tilemap .t-foe { fill: var(--coral); }
.rings-art { width: 100%; }
.rings-art circle { fill: none; stroke-width: 28; }
.rings-art circle:nth-child(1) { stroke: var(--bg); }
.rings-art circle:nth-child(2) { stroke: var(--ink); }
.rings-art .isle { fill: var(--ink); stroke: none; }
.page-hero:not(.plate) .rings-art circle:nth-child(1) { stroke: var(--teal); }
.page-hero:not(.plate) .rings-art circle:nth-child(2), .page-hero:not(.plate) .rings-art .isle { stroke: var(--blue); }
.page-hero:not(.plate) .rings-art .isle { fill: var(--blue); }
.page-pad { padding: 48px var(--m) 0; }
@media (max-width: 859px) {
  .page-hero { grid-template-columns: 1fr; }
  .page-hero-text, .page-hero-art { grid-column: 1; }
  .page-hero-art { max-width: 360px; justify-self: start; }
}

/* ---------- Work ---------- */
.work-list { padding: 0 var(--m); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--t-small) var(--font); cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.filters button span { opacity: 0.7; margin-left: 4px; }
.filters button[aria-pressed="true"] { background: var(--coral); color: var(--bg); }
.entry { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: center; margin-top: clamp(56px, 6vw, 88px); }
.entry[hidden] { display: none; }
.entry-pic { grid-column: 1 / span 6; }
.entry-text { grid-column: 8 / -1; }
.entry-flip .entry-pic { grid-column: 7 / -1; grid-row: 1; }
.entry-flip .entry-text { grid-column: 1 / span 5; grid-row: 1; }
.entry-pic .print img { aspect-ratio: 3 / 2; object-fit: cover; }
.entry h2 a { text-decoration: none; }
.entry h2 a:hover { color: var(--coral); }
.entry .meta { margin-top: 14px; }
.entry-text > p:not(.meta) { margin-top: 16px; }
.entry .link { margin-top: 24px; }
@media (max-width: 859px) {
  .entry, .entry-flip { grid-template-columns: 1fr; margin-top: 56px; }
  .entry-pic, .entry-text, .entry-flip .entry-pic, .entry-flip .entry-text { grid-column: 1; grid-row: auto; }
}

/* ---------- Case study ---------- */
.facts > div + div { margin-top: 12px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.facts dt { font-size: var(--t-small); color: var(--muted); }
/* On dark pages the facts beside a case study, the About intro or a typeface sit on a card. */
.case-intro > :first-child, .font-intro > :first-child, .about-intro > :first-child { padding: 22px 24px; border-radius: 20px; background: var(--surface); }
.plate .facts dt { color: var(--navy-muted); }
.facts dd { font-weight: 600; }
.case-intro, .font-intro, .about-intro { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding: 0 var(--m); align-items: start; }
.case-intro > :first-child, .font-intro > :first-child, .about-intro > :first-child { grid-column: 1 / span 3; }
.case-body { grid-column: 5 / span 7; font-size: var(--t-lead); line-height: 1.5; }
.case-body p + p { margin-top: 1em; }
.board { display: grid; grid-template-columns: repeat(12, 1fr); gap: 56px var(--gap); padding-left: var(--m); padding-right: var(--m); align-items: start; }
.board .b1 { grid-column: 1 / span 7; }
.board .b2 { grid-column: 9 / span 4; margin-top: 10vw; }
.board .b3 { grid-column: 2 / span 4; }
.board .b4 { grid-column: 7 / span 6; margin-top: 6vw; }
.board .b5 { grid-column: 1 / span 6; }
.board .b6 { grid-column: 8 / span 5; margin-top: 4vw; }
.credits { padding: 0 var(--m); font-size: var(--t-small); color: var(--muted); }
/* Credits sit between two waves, so this keeps both clear of the line without leaving it stranded */
main > .plate + .credits, main > .credits + .plate { margin-top: calc(var(--wave-h) + 28px); }
.next a { display: block; padding: 0 var(--m); text-decoration: none; }
.next-label { display: block; font-size: var(--t-small); color: var(--navy-muted); }
.next-title { display: block; margin-top: 8px; font-size: var(--t-display); font-weight: 900; font-stretch: 125%; letter-spacing: -0.03em; line-height: 0.9; text-transform: uppercase; transition: color 200ms ease; }
.next a:hover .next-title { color: var(--coral); }
@media (max-width: 859px) {
  .case-intro, .font-intro, .about-intro, .board { grid-template-columns: 1fr; }
  .case-intro > *, .font-intro > *, .about-intro > *, .board > div { grid-column: 1 !important; margin-top: 0 !important; }
}

/* ---------- Fonts ---------- */
.font-plate { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px var(--gap); padding-left: var(--m); padding-right: var(--m); }
.font-plate { padding-top: clamp(32px, 3.4vw, 48px); padding-bottom: clamp(32px, 3.4vw, 48px); }
.font-plate-sample { grid-column: 1 / -1; font-size: clamp(56px, 7vw, 116px); line-height: 1.35; text-align: right; overflow-wrap: anywhere; }
.font-plate-text { grid-column: 1 / span 5; }
.font-plate-text h2 a { text-decoration: none; }
.font-plate-text .meta { margin-top: 12px; }
.font-plate-text p:not(.meta) { margin-top: 12px; }
.font-plate-text .link { margin-top: 20px; }
.made { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px var(--gap); padding: 0 var(--m); align-items: start; }
.made-text { grid-column: 1 / span 4; }
.made-text p { margin-top: 16px; }
.made-pics { grid-column: 6 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 40px var(--gap); }
.tester { padding: 0 var(--m); }
.tester-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); margin-top: 40px; align-items: start; }
.tester-controls { grid-column: 1 / span 4; display: grid; gap: 24px; }
.specimen { grid-column: 6 / -1; min-height: 1.6em; font-size: var(--size, 110px); line-height: 1.6; text-align: right; overflow-wrap: anywhere; color: var(--teal); }
.field { display: grid; gap: 8px; }
.field > span, .compare legend { font-size: var(--t-small); color: var(--muted); }
.field input:not([type="range"]), .field select, .field textarea { width: 100%; border: 0; border-radius: 14px; padding: 14px 18px; background: var(--surface); color: var(--ink); font: 400 var(--t-body)/1.4 var(--font); }
.field input[type="range"] { width: 100%; height: 32px; accent-color: var(--coral); }
.compare { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.compare legend { margin-bottom: 8px; }
.compare label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.compare input { accent-color: var(--coral); width: 18px; height: 18px; }
.font-intro .small-h { font-size: var(--t-lead); margin-bottom: 24px; }
.font-sheet { grid-column: 5 / -1; }
.glyphs { padding: 0 var(--m); }
.glyph-key { margin-top: 16px; max-width: 60ch; color: var(--muted); }
.glyph-set { margin-top: 40px; }
.glyph-grid { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 12px; font-size: clamp(32px, 3.4vw, 52px); line-height: 1.8; }
.glyph-grid li.missing { opacity: 0.32; text-decoration: line-through 2px; }
.siblings { padding: 0 var(--m); }
.siblings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 32px; }
.sibling { display: block; padding: 32px; text-decoration: none; transition: transform 300ms var(--ease-out); }
.sibling:hover { transform: rotate(-1deg); }
.sibling-sample { font-size: clamp(48px, 5.4vw, 92px); line-height: 1.5; text-align: right; }
.sibling span { font-weight: 700; }
.note { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding-left: var(--m); padding-right: var(--m); }
.note h2 { grid-column: 1 / span 5; }
.note p, .note .link { grid-column: 7 / span 6; justify-self: start; }
@media (max-width: 859px) {
  .font-plate, .made, .note { grid-template-columns: 1fr; }
  .font-plate-text, .made-text, .made-pics, .note h2, .note p, .note .link, .tester-controls, .specimen { grid-column: 1 / -1; }
  .specimen { font-size: min(var(--size, 110px), 20vw); order: -1; }
  .tester-grid { grid-template-columns: 1fr; }
  .siblings-grid { grid-template-columns: 1fr; }
}

/* ---------- Cards: Lab and AI resources ---------- */
.dot { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; }
.dot-teal { background: var(--teal); }
.dot-blue { background: var(--blue); }
.dot-ring { border: 2px solid var(--muted); }
.card-list { padding: 0 var(--m); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: var(--gap); align-items: start; }
.card { padding: 20px; border-radius: 20px; background: var(--surface); transition: translate 300ms var(--ease-out), box-shadow 300ms ease; }
.card:hover { translate: 0 -3px; box-shadow: 0 0 0 2px rgba(242, 134, 107, 0.45); }
.card[hidden] { display: none; }
.card h2 { margin-top: 10px; font-size: clamp(22px, 1.8vw, 27px); font-stretch: 100%; line-height: 1.12; }
.card h2 a { text-decoration: underline 2px var(--coral); text-underline-offset: 5px; }
.card > p:not(.meta) { margin-top: 10px; color: var(--muted); }
.card-status { display: flex; align-items: flex-start; gap: 10px; }
.card-status .dot { margin-top: 0.3em; }
.card > .link { margin-top: 14px; }
.card-buy { margin-top: 18px; }
.card-buy .btn { height: 44px; padding: 0 20px; font-size: var(--t-small); }
.copy-btn { margin-top: 10px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--t-small) var(--font); cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.copy-btn:hover { background: var(--coral); color: var(--bg); }

/* ---------- Games, about ---------- */
.game { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding-left: var(--m); padding-right: var(--m); align-items: start; }
.game-text { grid-column: 1 / span 6; }
.game-text > p:not(.meta) { margin-top: 16px; font-size: var(--t-lead); }
.game-text .meta { margin-top: 12px; }
.game > div:last-child { grid-column: 9 / -1; }
.about-intro .statement { grid-column: 5 / -1; max-width: 34ch; }
@media (max-width: 859px) { .game { grid-template-columns: 1fr; } .game > *, .about-intro .statement { grid-column: 1 !important; } }

/* ---------- Contact ---------- */
.reach li { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: baseline; padding: 24px var(--m); }
.reach li:nth-child(odd) { background: var(--surface); }
.reach-label { grid-column: 1 / span 3; font-size: var(--t-small); color: var(--muted); }
.reach li > a, .reach li > span:last-child { grid-column: 4 / -1; font-size: clamp(24px, 2.6vw, 36px); font-weight: 800; font-stretch: 110%; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }
.reach li > a { text-decoration: underline 3px var(--coral); text-underline-offset: 8px; }
/* The heading sits beside the form, and the form is one card, so the row is used edge to edge. */
.write { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px var(--gap); align-items: start; padding: 0 var(--m); }
.write > h2 { grid-column: 1 / span 4; }
.form { grid-column: 5 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px var(--gap); padding: 28px; border-radius: 24px; background: var(--surface); }
.form .field input:not([type="range"]), .form .field select, .form .field textarea { background: var(--bg); }
.field-wide { grid-column: 1 / -1; }
.form textarea { resize: vertical; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-note { font-size: var(--t-small); color: var(--muted); max-width: 46ch; }
.form-error { color: #FFB4A3; }
@media (max-width: 759px) {
  .reach li { grid-template-columns: 1fr; gap: 4px; padding: 24px var(--m); }
  .reach-label, .reach li > a, .reach li > span:last-child { grid-column: 1; }
  .reach li > a, .reach li > span:last-child { font-size: clamp(22px, 6.2vw, 30px); }
  .form { grid-template-columns: 1fr; padding: 20px; }
}
@media (max-width: 1023px) { .write > h2, .form { grid-column: 1 / -1; } }

/* ---------- From the studio strip ---------- */
.studio { padding: 0 var(--m); }
/* A closing band on every inner page: Reef-coloured, with its own wave, running straight into the footer wave.
   Landscape prints keep it short. */
.studio { position: relative; padding-top: var(--space-plate); padding-bottom: calc(var(--space-plate) + var(--wave-h)); background: var(--surface) var(--grain-light); }
main > .plate + section.studio { margin-top: 0; }
.plate:has(+ .studio)::after { display: none; }
main:has(> .studio:last-child) + .foot { margin-top: 0; }
.studio ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px var(--gap); margin-top: 28px; align-items: start; }
.studio a { text-decoration: none; }
.studio .print { padding: 8px; }
.studio .print img { aspect-ratio: 4 / 3; object-fit: cover; }
.studio span { display: block; margin-top: 12px; font-size: var(--t-small); font-weight: 600; }
@media (max-width: 759px) { .studio ul { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer: the Atoll Blue plate ----------
   Three bands on an 8px rhythm: logo + about beside the call to action, link columns, then a slim legal row.
   All text is full navy: the muted navy falls below 4.5:1 on this blue. */
.foot { margin-top: calc(var(--wave-h) + 48px); padding: 56px var(--m) 24px; font-size: var(--t-small); line-height: 1.55; }
.foot a { text-decoration: none; }
.foot ul { margin: 0; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end; padding-bottom: 40px; border-bottom: 1px solid rgba(19, 28, 37, 0.22); }
.foot-brand { display: grid; gap: 16px; max-width: 46ch; }
.foot-logo { width: fit-content; }
.foot-logo img { display: block; width: auto; height: 44px; }
.foot-cta { display: grid; gap: 16px; justify-items: end; text-align: right; }
.foot-cta h2 { font-size: clamp(28px, 3vw, 44px); font-weight: 900; font-stretch: 112%; line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.foot-cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 24px; }
.foot-email { font-size: clamp(18px, 1.5vw, 22px); font-weight: 700; text-decoration: underline 2px; text-underline-offset: 6px; overflow-wrap: anywhere; }
.foot .foot-btn { background: var(--bg); color: var(--ink); }
.foot-cols { display: flex; flex-wrap: wrap; gap: 32px var(--gap); padding: 40px 0; }
.foot-cols > div { flex: 1 1 140px; }
.foot-cols > .foot-now { flex: 2 1 260px; }
.foot-now p:last-child { max-width: 36ch; }
.foot-h { margin-bottom: 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.foot-cols li { padding: 3px 0; }
.foot-cols a { font-weight: 600; text-decoration: underline 1.5px transparent; text-underline-offset: 4px; transition: text-decoration-color 200ms ease; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; padding-top: 20px; border-top: 1px solid rgba(19, 28, 37, 0.22); font-size: 13px; }
.foot-bottom p { max-width: 82ch; }
.foot-up { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-weight: 700; white-space: nowrap; }
.foot-up::after { content: "\2191"; }
@media (hover: hover) and (pointer: fine) {
  .foot-cols a:hover, .foot-up:hover { text-decoration: underline 1.5px; text-underline-offset: 4px; }
  .foot .foot-btn:hover { background: var(--ink); color: var(--bg); }
}
@media (max-width: 899px) {
  .foot-top { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .foot-cta { justify-items: start; text-align: left; }
  .foot-cta-row { justify-content: flex-start; }
}
@media (max-width: 759px) {
  .foot { margin-top: calc(var(--wave-h) + 32px); padding-top: 44px; }
  .foot-top { padding-bottom: 32px; }
  .foot-cols { padding: 32px 0; }
  .foot-cols > div { flex-basis: calc(50% - var(--gap)); }
  .foot-cols > .foot-now { flex-basis: 100%; }
}

/* ---------- Entrances ---------- */
.js [data-reveal] { opacity: 0; translate: 0 24px; transition: opacity 700ms var(--ease-out), translate 700ms var(--ease-out); }
.js [data-reveal].in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js .hero-foot, .js .hero-note, .js .hero-tag { transform: none; translate: none; transition: opacity 400ms ease; }
  .js .mask > span { transform: none; transition: none; }
  .craft-list a:hover .craft-name { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* =================== v3.1: calmer hero, wavy edges, more motion, shop =================== */

/* Hero: only the liquid O's, the headline and one block of text */
.hero { grid-template-rows: 1fr auto; }
.hero-foot { grid-row: 1; }
.hero .display { grid-row: 2; }
.hero .motion-btn { margin-left: 0; }
.hero-fallback { display: none; position: absolute; left: 18vw; top: 10vh; width: 36vw; }
.hero-fallback circle { fill: none; stroke-width: 28; }
.hero-fallback circle:nth-child(1) { stroke: var(--teal); }
.hero-fallback circle:nth-child(2) { stroke: var(--blue); }
.hero-fallback .isle { fill: var(--blue); stroke: none; }
.no-webgl .hero-fallback { display: block; }
@media (max-width: 859px) {
  .hero { grid-template-rows: 1fr auto auto; }
  .hero .display { grid-row: 2; }
  .hero-foot { grid-row: 3; }
  .hero-fallback { left: 11vw; top: 8vh; width: 78vw; }
}

/* Wavy edges: every colour plate rises into the section above with a wave, and falls into the one below.
   The wave is the plate's own colour (background: inherit), shaped by a mask that drifts slowly. */
.plate { position: relative; }
.plate::before, .plate::after, .studio::before {
  content: ""; position: absolute; left: 0; right: 0; height: var(--wave-h); pointer-events: none;
  background: inherit;
  -webkit-mask: var(--wave) 0 0 / 720px 100% repeat-x; mask: var(--wave) 0 0 / 720px 100% repeat-x;
  animation: wave-drift 18s linear infinite;
}
.plate::before, .studio::before { bottom: calc(100% - 1px); }
.plate::after { top: calc(100% - 1px); transform: scaleY(-1); animation-direction: reverse; }
.plate:has(+ .plate)::after, .foot::after, .shop-item::before, .shop-item::after, .sibling::before, .sibling::after { display: none; }
@keyframes wave-drift { to { -webkit-mask-position: 720px 0; mask-position: 720px 0; } }

/* More motion, all one-time or gentle: pictures unmask, headings rise with a lean, Thaana art floats */
.js [data-reveal] .print img { clip-path: inset(0 0 100% 0); transition: clip-path 900ms var(--ease-io) 120ms; }
.js [data-reveal].in .print img { clip-path: inset(0 0 0 0); }
.js h2[data-reveal], .js [data-reveal] > h2 { transform: skewY(3deg); transform-origin: left; transition: transform 800ms var(--ease-out); }
.js h2[data-reveal].in, .js [data-reveal].in > h2 { transform: none; }
.manifesto-art, .giant-glyph, .font-plate-sample { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -14px; rotate: -1.5deg; } }
.craft-list li:nth-child(2n) .craft-name { transition-delay: 40ms; }
.name-out { transition: font-size 300ms var(--ease-out); }
.chips button[aria-pressed="true"] { animation: pop 320ms var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.08); } }

/* Selling */
.buy-box { margin-top: 32px; display: grid; gap: 12px; justify-items: start; }
.sale-note { font-size: var(--t-small); color: var(--muted); max-width: 40ch; }
.plate .sale-note { color: var(--navy-muted); }
.font-plate .actions { margin-top: 24px; }
.plate .btn-coral { background: var(--bg); color: var(--ink); }
.plate .btn-coral:hover { background: var(--ink); color: var(--bg); }
.row-buy { margin-top: 14px; }
.row-buy .btn { height: 44px; padding: 0 20px; font-size: var(--t-small); }
/* Four products to a row on desktop, so the cards stay card-sized */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 32px var(--gap); padding: 0 var(--m); align-items: start; }
.shop-item { padding: 22px; border-radius: 22px; transform: rotate(var(--tilt, 0deg)); transition: transform 450ms var(--ease-out); }
.shop-item:hover { transform: rotate(0deg) translateY(-6px); }
.shop-art { min-height: 108px; display: grid; place-items: center end; }
.shop-art .shop-art, .shop-art p { font-size: clamp(60px, 5.4vw, 92px); line-height: 1.3; }
.shop-tool { font-size: clamp(56px, 5vw, 84px); font-weight: 900; font-stretch: 62%; }
.shop-item h2 { margin-top: 6px; font-size: clamp(22px, 1.9vw, 28px); }
.shop-item h2 a { text-decoration: none; }
.shop-item > p:not(.meta):not(.shop-price):not(.sale-note) { margin-top: 12px; }
.shop-price { margin: 16px 0 12px; font-size: clamp(24px, 2vw, 32px); font-weight: 900; font-stretch: 125%; letter-spacing: -0.03em; line-height: 1; }
.shop-item .sale-note { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .plate::before, .plate::after, .studio::before, .manifesto-art, .giant-glyph, .font-plate-sample, .chips button[aria-pressed="true"] { animation: none; }
  .js [data-reveal] .print img, .js h2[data-reveal], .js [data-reveal] > h2 { clip-path: none; transform: none; transition: none; }
}

/* A colour plate that opens a page sits below the header, so its top wave never cuts the navigation */
main > .page-hero.plate:first-child { margin-top: calc(var(--wave-h) + 16px); }

/* Home hero, split lagoon: words on the left, the liquid O's floating in a lagoon on the right */
.hero { grid-template-columns: repeat(12, 1fr); grid-template-rows: 1fr; align-items: center; gap: 32px var(--gap); padding-bottom: 48px; }
.hero-text { grid-column: 1 / span 6; position: relative; z-index: 1; }
.hero .display { grid-row: auto; grid-column: auto; font-size: clamp(48px, 7vw, 124px); }
.hero-text .hero-lede { margin-top: 36px; max-width: 34ch; }
.hero-text .actions { margin-top: 32px; }
.js .hero-text > p, .js .hero-text > .actions { opacity: 0; translate: 0 14px; transition: opacity 700ms var(--ease-out) 550ms, translate 700ms var(--ease-out) 550ms; }
.ready .hero-text > p, .ready .hero-text > .actions { opacity: 1; translate: 0 0; }
.lagoon { grid-column: 7 / -1; position: relative; aspect-ratio: 1; width: 100%; max-height: calc(100svh - 140px); justify-self: center; }
.lagoon::before {
  content: ""; position: absolute; inset: 4%; background: #23797D var(--grain-dark);
  border-radius: 47% 53% 44% 56% / 52% 45% 55% 48%;
  animation: lagoon 16s ease-in-out infinite;
}
@keyframes lagoon {
  33% { border-radius: 55% 45% 52% 48% / 44% 56% 46% 54%; }
  66% { border-radius: 44% 56% 47% 53% / 55% 47% 53% 45%; }
}
.lagoon #sculpture { position: absolute; inset: 0; width: 100%; height: 100%; }
.lagoon .hero-fallback { left: 10%; top: 28%; width: 80%; }
@media (max-width: 859px) {
  .hero { grid-template-columns: 1fr; align-content: start; }
  .hero-text, .lagoon { grid-column: 1; }
  .lagoon { grid-row: 1; width: min(100%, 520px); }
  .hero .display { font-size: 12vw; }
}
@media (prefers-reduced-motion: reduce) { .lagoon::before { animation: none; } .js .hero-text > p, .js .hero-text > .actions { translate: none; transition: opacity 400ms ease; } }

/* Hero, tightened: no lagoon disc, no tall empty band under the header */
.hero { min-height: 0; padding-top: 4vh; padding-bottom: 24px; align-items: center; }
.lagoon { aspect-ratio: 5 / 4; max-height: none; }
.lagoon::before { display: none; }
@media (max-width: 859px) { .lagoon { aspect-ratio: 4 / 3; } }

/* A seamless wave: start and end share height and slope, so repeated tiles join with no points */
:root { --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C120 2 240 2 360 30 S600 58 720 30 V60 H0 Z'/%3E%3C/svg%3E"); }

/* The hero opens the page: no section gap above it, and a shorter box for the rings */
main > .hero { margin-top: 0; }
.hero { padding-top: 2vh; }
.lagoon { aspect-ratio: 3 / 2; }

/* =================== Blog: a list of posts in the work-entry layout, and posts set as a case study with a reading column =================== */
.blog-glyph { font-size: clamp(88px, 11vw, 190px); line-height: 1.6; }
.post-list { padding: 0 var(--m); }
.entry:not(:has(.entry-pic)) .entry-text { grid-column: 1 / span 8; }
.post-empty { margin-top: 120px; font-size: var(--t-lead); color: var(--muted); }
.post-hero { padding: clamp(24px, 2.8vw, 44px) var(--m) 0; }
.post-title { font-size: clamp(40px, 5.8vw, 100px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.035em; line-height: 0.98; max-width: 17ch; }
.post-hero .lede { margin-top: 28px; max-width: 40ch; font-size: var(--t-lead); line-height: 1.45; color: var(--muted); }
.post-cover { margin-top: 48px; padding: 0 var(--m); }
.post-cover .print { --tilt: -1deg; }
.post-cover .print img { aspect-ratio: 16 / 9; object-fit: cover; }
main > .post-body { margin-top: 96px; }
.post-body .link { margin-top: 32px; }
.prose { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.65; max-width: 40em; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.9em; font-size: clamp(26px, 2.4vw, 36px); font-stretch: 106%; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--coral); }
.prose a { text-decoration: underline 2px var(--coral); text-underline-offset: 5px; transition: color 200ms ease; }
.prose a:hover { color: var(--coral); }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 1.6em 0 0; padding-left: 24px; border-left: 3px solid var(--teal); font-size: var(--t-lead); line-height: 1.45; }
.prose img { background: var(--ink); padding: 10px; }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--surface); padding: 2px 6px; }
.prose pre { background: var(--surface); padding: 20px; overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose hr { border: 0; border-top: 2px solid var(--surface); margin: 2.4em 0 0; }
.post-next .next-title { font-size: clamp(36px, 5.4vw, 88px); }
@media (max-width: 859px) { .entry:not(:has(.entry-pic)) .entry-text { grid-column: 1; } .post-hero { padding-top: 8vh; } }

/* =================== Home hero reel: photos and designs drift past as cards under a Midnight Reef wash =================== */
.hero { isolation: isolate; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--grain-light), linear-gradient(0deg, var(--bg), transparent 28%), linear-gradient(90deg, var(--bg) 4%, rgb(19 28 37 / 0.88) 46%, rgb(19 28 37 / 0.68));
}
.hero-reel { position: absolute; inset: -14% -10%; z-index: -1; display: flex; flex-direction: column; justify-content: center; gap: 22px; rotate: -7deg; pointer-events: none; }
.reel-track { display: flex; width: max-content; animation: reel 120s linear infinite; }
.reel-track:nth-child(2) { animation-direction: reverse; animation-duration: 140s; }
.reel-track:nth-child(3) { animation-duration: 130s; }
.reel-track img { flex: none; width: clamp(120px, 12vw, 200px); aspect-ratio: 4 / 5; object-fit: cover; margin-right: 22px; border-radius: 16px; }
@keyframes reel { to { transform: translateX(-50%); } }
.motion-paused .reel-track { animation-play-state: paused; }
@media (max-width: 859px) { .hero::after { background: var(--grain-light), linear-gradient(0deg, var(--bg), transparent 30%), rgb(19 28 37 / 0.84); } }
@media (prefers-reduced-motion: reduce) { .reel-track { animation: none; } }

/* =================== Shop: filter by kind, asset cards, "on the way" cards, how buying works, the licence =================== */
.shop-list { padding: 0 var(--m); }
.shop-list .shop-grid { padding: 0; margin-top: 56px; }
.shop-item[hidden] { display: none; }
.shop-item:not(.plate) { background: var(--surface); }
.shop-art:has(.print) { display: block; min-height: 0; margin-bottom: 20px; }
.shop-art .print img { aspect-ratio: 4 / 3; object-fit: cover; }
.shop-item.shop-soon { background: none; border: 2px dashed var(--surface); transform: none; }
.shop-soon > p:not(.meta) { margin-top: 12px; color: var(--muted); }
.shop-soon .link { margin-top: 28px; }
.buying { padding-left: var(--m); padding-right: var(--m); }
.steps { margin: 48px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px var(--gap); }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-size: clamp(44px, 4.4vw, 72px); font-weight: 900; font-stretch: 125%; letter-spacing: -0.03em; line-height: 0.9; color: var(--teal-deep); }
.steps h3 { margin-top: 16px; font-size: clamp(22px, 1.9vw, 30px); font-stretch: 112%; }
.steps p { margin-top: 12px; max-width: 34ch; }
.licence { padding: 0 var(--m); }
.licence-cols { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px var(--gap); }
.licence-cols h3 { color: var(--teal); }
.licence-cols > div + div h3 { color: var(--coral); }
.licence-cols ul { margin-top: 16px; }
.licence-cols li { padding: 14px 0; border-top: 1px solid var(--surface); font-size: var(--t-body); line-height: 1.5; }
.licence-note { margin-top: 40px; max-width: 60ch; color: var(--muted); }
.licence-note a { text-decoration: underline 2px var(--coral); text-underline-offset: 4px; }
@media (max-width: 859px) { .steps, .licence-cols { grid-template-columns: 1fr; } }

/* Phones: a shorter lagoon so the rings sit closer to the header, and a fourth row of cards so they fill the hero top to bottom */
.reel-track:nth-child(4) { display: none; animation-direction: reverse; animation-duration: 150s; }
@media (max-width: 859px) {
  .hero { padding-top: 0; }
  .lagoon { aspect-ratio: 16 / 9; }
  .reel-track:nth-child(4) { display: flex; }
}
/* Phones and small tablets: a long one-word craft name ("Photography") leaves no room beside it, so each note sits under its name */
@media (max-width: 859px) {
  .craft-list a, .craft-list .is-soon { grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; padding: 12px 0; }
  .craft-note { grid-column: 2; text-align: left; max-width: none; }
}

/* =================== Plate tones (Lab covers, AI icons and boxes) =================== */
.tone-teal, .tone-blue, .tone-coral, .tone-paper { background-image: var(--grain-dark); color: var(--bg); }
.tone-teal { background-color: var(--teal); }
.tone-blue { background-color: var(--blue); }
.tone-coral { background-color: var(--coral); }
.tone-paper { background-color: var(--ink); }

/* Lab covers: a drawing per experiment, flush with the top of its card */
.card-cover { margin: -20px -20px 16px; aspect-ratio: 2 / 1; border-radius: 20px 20px 0 0; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.lab-art { width: 100%; height: 100%; fill: none; stroke: var(--bg); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.lab-art text { stroke: none; fill: var(--bg); }
.lab-art .la-latin { font: 800 34px var(--font); font-stretch: 112%; }
.lab-art .la-dv { font-family: "FahiThaana", var(--font-dv); font-size: 58px; }
.lab-art .la-small { font: 700 15px var(--font); }
.lab-art .la-fill, .lab-art .la-dot { fill: var(--bg); stroke: none; }
.lab-art .la-path { stroke: var(--coral); stroke-width: 7; }
.lab-art .la-hl { fill: var(--coral); stroke: none; }

/* =================== AI resources =================== */
/* Overview: the four sections as illustrated plates */
.ai-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ai-box { position: relative; display: grid; grid-template-rows: 1fr auto auto; min-height: 210px; padding: 18px 20px 20px; border-radius: 22px; overflow: hidden; text-decoration: none; rotate: var(--tilt, 0deg); transition: rotate 400ms var(--ease-out), translate 400ms var(--ease-out); }
.ai-box:nth-child(1) { --tilt: -2deg; }
.ai-box:nth-child(2) { --tilt: 1.5deg; }
.ai-box:nth-child(3) { --tilt: 1deg; }
.ai-box:nth-child(4) { --tilt: -1.5deg; }
.ai-box:hover, .ai-box:focus-visible { rotate: 0deg; translate: 0 -6px; }
.ai-box-art { position: absolute; right: -8%; top: 10%; width: 74%; fill: none; stroke: currentColor; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.88; }
.ai-box-art .fill { fill: currentColor; stroke: none; opacity: 0.3; }
.ai-box-n, .ai-box-t, .ai-box-s { position: relative; }
.ai-box-n { align-self: start; font-size: clamp(48px, 4.6vw, 76px); font-weight: 900; font-stretch: 62%; line-height: 0.9; }
.ai-box-t { font-size: var(--t-lead); font-weight: 800; font-stretch: 112%; line-height: 1.05; }
.ai-box-s { margin-top: 4px; padding-right: 28px; font-size: var(--t-small); color: var(--navy-muted); }
.ai-box::after { content: "\2192"; position: absolute; right: 18px; bottom: 16px; font-weight: 800; transition: translate 200ms var(--ease-out); }
.ai-box:hover::after { translate: 5px 0; }
.ai-note { display: block; width: fit-content; max-width: min(70ch, calc(100% - 2 * var(--m))); margin: 56px var(--m) 0; padding: 14px 18px; border-radius: 14px; background: var(--surface); color: var(--muted); }
.ai-row { margin-top: 88px; padding: 0 var(--m); }
.ai-row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; }

/* The shell: section menu on the left, content on the right */
.ai-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; padding: 32px var(--m) 0; }
.ai-side { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 20px; background: var(--surface); }
/* Desktop: the section menu stays in view while the page scrolls, and scrolls itself on short windows. */
@media (min-width: 1024px) { .ai-side { position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; scrollbar-width: thin; } }
.ai-side a { padding: 10px 14px; border-radius: 12px; font-weight: 600; text-decoration: none; transition: background-color 200ms ease; }
.ai-side a:hover { background: rgba(243, 246, 251, 0.07); }
.ai-side a[aria-current="page"] { background: var(--coral); color: var(--bg); }
.ai-side-h { margin: 14px 14px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soon); }
@media (max-width: 1023px) {
  .ai-shell { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 12px; }
  .ai-side { flex-direction: row; overflow-x: auto; padding: 6px; border-radius: 999px; scrollbar-width: none; }
  .ai-side a { white-space: nowrap; border-radius: 999px; }
  .ai-side-h { display: none; }
}
.ai-head h1, .ai-run-head h1, .ai-guide-head h1 { font-size: clamp(34px, 3.6vw, 56px); font-weight: 850; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
.ai-head .lede, .ai-guide-head .lede { margin-top: 12px; max-width: 62ch; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; color: var(--muted); }
.ai-back { display: inline-flex; gap: 8px; min-height: 44px; align-items: center; font-weight: 600; text-decoration: none; color: var(--muted); }
.ai-back::before { content: "\2190"; }
.ai-back:hover { color: var(--ink); }
.ai-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--coral); }

/* Filters */
.ai-tools { display: grid; gap: 12px; margin-top: 24px; }
.ai-tabs { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; padding: 5px; border-radius: 26px; background: var(--surface); }
.ai-chips, .ai-selects { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-tabs button, .ai-chips button, .ai-pager-btn { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--t-small) var(--font); cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.ai-tabs button { background: transparent; }
.ai-tabs button span, .ai-chips button span { margin-left: 4px; opacity: 0.65; }
.ai-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ai-chips button[aria-pressed="true"], .ai-pager-btn:hover { background: var(--coral); color: var(--bg); }
.ai-filter-h { margin-bottom: -6px; font-size: var(--t-small); color: var(--muted); }
.ai-select select { min-height: 44px; padding: 0 42px 0 18px; border: 0; border-radius: 999px; appearance: none; cursor: pointer; color: var(--ink); font: 600 var(--t-small) var(--font);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3F6FB' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center / 16px; }
.ai-count, .ai-empty { font-size: var(--t-small); color: var(--muted); }
.ai-empty { margin-top: 24px; }

/* Cards */
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: var(--gap); margin-top: 24px; }
.ai-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 18px; background: var(--surface); transition: translate 300ms var(--ease-out), box-shadow 300ms ease; }
.ai-card[hidden] { display: none; }
.ai-card.is-soon:hover { translate: none; box-shadow: none; }
.ai-soon { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--soon); }
.ai-card-foot .ai-soon { margin-top: 0; }
.ai-card:hover { translate: 0 -3px; box-shadow: 0 0 0 2px rgba(242, 134, 107, 0.55); }
.ai-card:has(.ai-stretch:focus-visible) { outline: 3px solid var(--coral); outline-offset: 3px; }
.ai-card h2, .ai-card h3 { font-size: clamp(18px, 1.3vw, 20px); font-stretch: 100%; line-height: 1.2; text-wrap: balance; }
.ai-card-text { color: var(--muted); }
/* Card summaries stop at three lines so cards in a row stay the same height; the full text is on the item's own page. */
.ai-card > .ai-card-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--t-small); line-height: 1.55; }
.ai-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ai-stretch { all: unset; cursor: pointer; }
.ai-stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ai-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 11px; }
.ai-icon svg, .ai-cover-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ai-icon-lg { width: 56px; height: 56px; border-radius: 16px; }
.ai-icon-lg svg { width: 30px; height: 30px; }
.ai-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(243, 246, 251, 0.08); font-size: 13px; font-weight: 600; }
.ai-hot { background: rgba(242, 134, 107, 0.18); color: #FFC2B2; }
.ai-actions { display: flex; gap: 6px; margin-left: auto; }
.ai-card-top > .ai-save { margin-left: auto; width: 40px; padding: 0; justify-content: center; }
/* On cards the bookmark is icon-only; its Save / Saved word stays for screen readers. */
.ai-card-top > .ai-save span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ai-save, .ai-share { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.ai-save[hidden] { display: none; }
.ai-save:hover, .ai-share:hover { background: rgba(243, 246, 251, 0.08); color: var(--ink); }
.ai-save svg, .ai-share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ai-save[aria-pressed="true"] { color: var(--coral); }
.ai-save[aria-pressed="true"] svg { fill: currentColor; }
.ai-chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip, .ai-lvl { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 1px solid rgba(243, 246, 251, 0.16); border-radius: 999px; font-size: 13px; font-weight: 600; }
.ai-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lvl-beginner { color: var(--teal); border-color: rgba(81, 194, 198, 0.45); }
.lvl-intermediate { color: var(--blue); border-color: rgba(87, 149, 206, 0.5); }
.lvl-advanced { color: var(--coral); border-color: rgba(242, 134, 107, 0.5); }
.ai-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(243, 246, 251, 0.08); font-size: 13px; color: var(--muted); }
.ai-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--soon); }
.ai-path { margin-top: -6px; font: 13px ui-monospace, Consolas, monospace; color: var(--teal); }
.ai-view { font-size: var(--t-small); font-weight: 600; color: var(--ink); text-decoration: underline 2px var(--coral); text-underline-offset: 5px; }
.ai-cover { position: relative; display: flex; align-items: flex-end; gap: 8px; aspect-ratio: 16 / 9; padding: 18px; border-radius: 14px; overflow: hidden; }
.ai-guide-card .ai-cover, .ai-pcard .ai-cover { margin: -8px -8px 4px; }
/* A cover rendered from the prompt's code: the still fills the plate, a shade keeps the count readable. */
.ai-cover.has-img { background: var(--bg); color: var(--ink); }
.ai-cover.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ai-cover.has-img:has(.ai-cover-n)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(19, 28, 37, 0.85), transparent 60%); }
.ai-cover.has-img .ai-cover-n, .ai-cover.has-img .ai-cover-l { z-index: 1; }
.ai-cover-icon { position: absolute; right: -6%; top: -14%; width: 62%; }
.ai-cover-icon svg { width: 100%; height: auto; stroke-width: 1.3; opacity: 0.85; }
.ai-cover-n { position: relative; font-size: 56px; font-weight: 900; font-stretch: 62%; line-height: 0.8; }
.ai-cover-l { position: relative; font-weight: 700; }
.ai-pnum { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; line-height: 1; color: var(--coral); }

/* Dialogs (use-case ideas): centred, never a side panel */
.ai-modal { width: min(680px, calc(100% - 32px)); max-height: calc(100% - 48px); margin: auto; padding: 0; border: 0; border-radius: 24px; background: var(--bg); color: var(--ink); }
.ai-modal::backdrop { background: rgba(8, 12, 17, 0.74); }
.ai-modal[open] { animation: ai-pop 260ms var(--ease-out); }
@keyframes ai-pop { from { translate: 0 16px; opacity: 0; } }
.ai-dialog-in { display: grid; gap: 12px; padding: 18px 24px 26px; }
.ai-dialog-in > .ai-badge { width: fit-content; }
.ai-dialog-in h2 { font-size: clamp(24px, 2.2vw, 30px); font-stretch: 105%; line-height: 1.1; }
.ai-meta { display: grid; gap: 6px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: var(--t-small); }
.ai-meta div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
.ai-meta dt { font-weight: 600; color: var(--soon); }
.ai-meta dd { margin: 0; }
.ai-fine { font-size: 13px; color: var(--soon); }
.ai-dialog-in h3 { margin-top: 10px; font-size: var(--t-lead); }
.ai-dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ai-dialog-bar .ai-actions { margin-left: 0; }
.ai-x { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; }
.ai-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ai-x:hover { background: var(--coral); color: var(--bg); }
.ai-goal { padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.ai-goal p:last-child { font-size: var(--t-lead); font-weight: 700; color: var(--teal); }
.ai-timeline { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ai-timeline li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 14px; border-radius: 16px; background: var(--surface); }
.ai-timeline-sm li { align-items: center; padding: 10px 14px; }
.ai-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: var(--bg); font-size: 15px; font-weight: 800; }
.ai-template { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: var(--surface); }
.ai-template h3 { margin-top: 0; }
.ai-template-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.ai-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ai-fields .field input { background: var(--bg); }
.ai-prompt { margin: 0; padding: 16px 18px; border-radius: 14px; background: var(--bg); font: 400 15px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-block > .ai-prompt { background: var(--surface); max-height: 70vh; overflow: auto; }
.ai-prompt mark { padding: 1px 4px; border-radius: 5px; background: rgba(242, 134, 107, 0.22); color: #FFC2B2; }
.ai-prompt mark.is-filled { background: rgba(81, 194, 198, 0.2); color: var(--teal); }
.ai-code { max-height: 440px; overflow: auto; }
.ai-template .copy-btn, .ai-block .copy-btn, .ai-fold .copy-btn, .ai-then .copy-btn { margin: 0; background: var(--coral); color: var(--bg); }
.ai-then { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--surface); }
.ai-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ai-ticks { display: grid; gap: 8px; margin-top: 8px; }
.ai-ticks li { display: flex; gap: 10px; }
.ai-ticks li::before { content: "\2713"; font-weight: 800; color: var(--teal); }
.ai-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--surface); }
@media (max-width: 600px) { .ai-cols { grid-template-columns: 1fr; } .ai-dialog-in { padding: 18px 18px 28px; } }

/* Prompt page and prompt forms: the prompt is copied or downloaded, never shown. */
/* Wide screens: cover and description on the left, the form beside them; narrower screens stack them. */
.ai-pform { display: grid; gap: 16px; max-width: 1180px; margin-top: 8px; padding: 16px; border-radius: 24px; background: var(--surface); }
.ai-pform-info { display: grid; gap: 14px; align-content: start; }
.ai-pform-text { display: grid; gap: 10px; padding: 4px 8px 8px; }
.ai-pform h1 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 850; font-stretch: 108%; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
.ai-pform-text .ai-card-text { font-size: var(--t-small); line-height: 1.6; }
.ai-pform-text strong { color: var(--ink); }
@media (min-width: 1200px) { .ai-pform { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; } }
/* How to use the prompt: its own column beside the prompt card on wide screens, under it otherwise. */
.ai-pform-wrap { display: grid; gap: 16px; max-width: 1180px; }
@media (min-width: 1440px) {
  .ai-pform-wrap { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); align-items: start; gap: 24px; max-width: 1624px; }
  .ai-howto { position: sticky; top: 24px; margin-top: 8px; }
}
.ai-howto { padding: 26px 28px; border: 1px solid rgba(19, 28, 37, 0.12); border-radius: 22px; background: var(--bg); }
.ai-howto h2 { margin-bottom: 18px; font-size: 1.3rem; font-weight: 750; letter-spacing: -0.01em; }
.ai-howto ol { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: how; }
.ai-howto li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start; font-size: 1rem; line-height: 1.55; counter-increment: how; }
.ai-howto li::before { content: counter(how); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 14px; font-weight: 700; }
/* About this prompt: under the title in the left column on wide screens; after the form on narrow ones. */
@media (min-width: 1200px) {
  .ai-pform { grid-template-areas: "info form" "about form"; }
  .ai-pform-info { grid-area: info; }
  .ai-pform > .ai-personalize { grid-area: form; }
  .ai-about { grid-area: about; }
}
.ai-about { display: grid; gap: 18px; min-width: 0; padding: 4px 8px 8px; }
.ai-about h2 { font-size: 1.25rem; font-weight: 750; letter-spacing: -0.01em; }
.ai-about-part { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(19, 28, 37, 0.14); }
.ai-about-part h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #1c6064; }
.ai-about p { max-width: 62ch; font-size: var(--t-small); line-height: 1.6; }
.ai-about-note { color: var(--muted); }
.ai-about-list { display: grid; gap: 8px; margin: 0; padding-left: 1.3em; font-size: var(--t-small); line-height: 1.55; }
.ai-about-eg { display: grid; margin: 0; }
.ai-about-eg > div { display: grid; grid-template-columns: minmax(110px, 0.4fr) minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(19, 28, 37, 0.1); font-size: var(--t-small); line-height: 1.5; }
.ai-about-eg dt { font-weight: 600; }
.ai-about-eg dd { margin: 0; }
.ai-swatches { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 2px 0 0; padding: 0; list-style: none; font-size: var(--t-small); }
.ai-swatches li { display: flex; align-items: center; gap: 8px; }
.ai-swatches span { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(19, 28, 37, 0.2); }
.ai-swatches small { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .ai-about { padding: 4px 6px 6px; } .ai-about-eg > div { grid-template-columns: 1fr; gap: 2px; } }
/* The form is one framed panel wherever it sits: a prompt page, a playbook step or an idea dialog. */
.ai-personalize { display: grid; gap: 12px; padding: 18px; border: 1px solid rgba(243, 246, 251, 0.1); border-radius: 18px; background: var(--surface); }
.ai-personalize-title { font-weight: 700; line-height: 1.3; }
.ai-personalize .field { gap: 6px; }
.ai-personalize .field textarea, .ai-personalize .field input { padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 16px; resize: vertical; }
.ai-personalize .field small { margin-left: 4px; opacity: 0.7; }
.ai-opt { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.ai-seg { display: inline-flex; width: fit-content; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); }
.ai-seg label { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font: 600 var(--t-small) var(--font); cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.ai-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ai-seg label:has(:checked) { background: var(--ink); color: var(--bg); }
.ai-seg label:has(:focus-visible) { outline: 3px solid var(--coral); outline-offset: 2px; }
.ai-opt-note, .ai-personalize-status { font-size: var(--t-small); color: var(--muted); }
.ai-personalize-note { font-size: 13px; line-height: 1.5; color: var(--soon); }
.ai-personalize:has([data-voiceover][value="none"]:checked) [data-voice-only],
.ai-personalize:has([data-voiceover][value="yes"]:checked) [data-novoice-only] { display: none; }
.ai-checkline { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-small); cursor: pointer; }
.ai-checkline input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--coral); }
.ai-detail-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.ai-detail-fields legend { display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 10px; font-weight: 600; }
.ai-detail-fields legend span { padding: 0 8px; border-radius: 999px; background: var(--bg); font-size: 13px; }
.ai-personalize-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(243, 246, 251, 0.1); }
.ai-pnav { display: flex; gap: 8px; margin-right: auto; }
.ai-pnav .ai-pager-btn { display: inline-flex; align-items: center; min-height: 40px; background: var(--bg); text-decoration: none; }
.ai-personalize-status:empty { display: none; }
.ai-personalize .ai-btn-ghost, .ai-then .ai-btn-ghost { background: var(--bg); }
.ai-then-list { display: grid; gap: 10px; max-width: 1180px; }
.ai-then-actions { display: flex; gap: 8px; }
@media (max-width: 600px) { .ai-pform { padding: 10px; } .ai-pform-text { padding: 4px 6px 6px; } .ai-personalize { padding: 14px; } .ai-pnav { width: 100%; } .ai-personalize-actions > .btn { flex: 1; } }

/* Workflow run page */
.ai-run-head { display: grid; justify-items: start; gap: 14px; margin-top: 12px; padding: 28px; border-radius: 24px; background: var(--surface); }
.ai-progress { width: 100%; margin-top: 8px; }
.ai-progress p { display: flex; justify-content: space-between; font-size: var(--t-small); color: var(--muted); }
.ai-progress p span:last-child { font-weight: 700; color: var(--ink); }
.ai-bar { height: 10px; margin-top: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.ai-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width 400ms var(--ease-out); }
.ai-progress.is-done .ai-bar span { background: var(--coral); }
.ai-run, .ai-block { margin-top: 48px; }
.ai-run h2, .ai-block h2, .ai-row h2 { font-size: clamp(22px, 2vw, 28px); }
.ai-run-steps { display: grid; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.ai-run-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 20px; border-radius: 20px; background: var(--surface); transition: opacity 300ms ease; }
.ai-run-step.is-done { opacity: 0.6; }
.ai-run-step.is-done h3 { text-decoration: line-through 2px var(--teal); }
.ai-check { display: grid; place-items: center; width: 44px; height: 44px; }
.ai-check input { width: 30px; height: 30px; margin: 0; border: 2px solid var(--muted); border-radius: 9px; appearance: none; cursor: pointer; }
.ai-check input:checked { border-color: var(--teal); background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131C25' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 20px no-repeat; }
.ai-step-n { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.ai-run-body h3 { margin-top: 4px; }
.ai-run-body > p:not(.ai-step-n) { margin-top: 6px; color: var(--muted); }
.ai-fold { margin-top: 12px; }
/* `>` keeps these off the "Fill specific details" toggle nested inside the form. */
.ai-fold > summary { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--bg); font-size: var(--t-small); font-weight: 600; list-style: none; cursor: pointer; }
.ai-fold > summary::-webkit-details-marker { display: none; }
.ai-fold > summary::after { content: "+"; margin-left: 10px; font-weight: 800; }
.ai-fold[open] > summary { background: var(--coral); color: var(--bg); }
.ai-fold[open] > summary::after { content: "\2212"; }
.ai-fold-in { display: grid; gap: 10px; margin-top: 12px; }
.ai-goal-end { margin-top: 24px; }

/* Skill pages and guides */
.ai-skill-head { display: grid; gap: 14px; margin-top: 12px; }
.ai-btn-ghost { background: var(--surface); color: var(--ink); }
.ai-dl-row { margin-top: 16px; }
.ai-dl { height: auto; min-height: 40px; padding: 8px 18px; white-space: normal; text-align: center; }
.ai-block > p { max-width: 70ch; margin-top: 10px; }
.ai-block > .ai-prompt { margin-top: 14px; }
.ai-install { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.ai-install > div { padding: 18px; border-radius: 16px; background: var(--surface); }
.ai-install ol { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 20px; font-size: var(--t-small); color: var(--muted); }
.ai-subnav { display: flex; gap: 20px; font-size: var(--t-small); font-weight: 600; }
.ai-subnav a { text-decoration: none; }
.ai-subnav a:hover { color: var(--coral); }
.ai-guide-head { margin-top: 12px; }
.ai-guide-head .btn { margin-top: 24px; }
.ai-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 32px; }
.ai-stats li { display: grid; gap: 2px; padding: 18px; border-radius: 16px; background: var(--surface); }
.ai-stat-n { font-size: 42px; font-weight: 900; font-stretch: 62%; line-height: 1; color: var(--teal); }
.ai-stat-l { font-weight: 700; }
.ai-help a { text-decoration: underline 2px var(--coral); text-underline-offset: 4px; }
@media (max-width: 759px) {
  .ai-boxes { gap: 12px; }
  .ai-box { min-height: 170px; padding: 14px 16px 16px; }
  .ai-box-art { right: -10%; top: 6%; width: 56%; }
  .ai-tabs button { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { .ai-modal[open] { animation: none; } .ai-box, .ai-card { transition: none; } }

/* =================== Brand motion: kept deliberately light ===================
   One soft ring glow, the Koo identity's two rings, breathing slowly behind each page hero's art, and the
   heading bars drawing in. No printed patterns on plates or bands: the owner found them distracting.
   Only transform and opacity animate, and both stop with reduced motion. */
:root {
  --rings-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke-width='1.6'%3E%3Ccircle cx='200' cy='200' r='64' stroke='%2351C2C6' stroke-opacity='.4'/%3E%3Ccircle cx='200' cy='200' r='104' stroke='%235795CE' stroke-opacity='.3' stroke-dasharray='2 9'/%3E%3Ccircle cx='200' cy='200' r='144' stroke='%2351C2C6' stroke-opacity='.22'/%3E%3Ccircle cx='200' cy='200' r='184' stroke='%235795CE' stroke-opacity='.16' stroke-dasharray='2 9'/%3E%3C/g%3E%3C/svg%3E");
  --rings-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23131C25' stroke-width='1.6'%3E%3Ccircle cx='200' cy='200' r='64' stroke-opacity='.22'/%3E%3Ccircle cx='200' cy='200' r='104' stroke-opacity='.18' stroke-dasharray='2 9'/%3E%3Ccircle cx='200' cy='200' r='144' stroke-opacity='.13'/%3E%3Ccircle cx='200' cy='200' r='184' stroke-opacity='.09' stroke-dasharray='2 9'/%3E%3C/g%3E%3C/svg%3E");
}
/* The ring glow reaches past the hero; clip sideways only, so plate waves above and below stay visible */
.page-hero { overflow-x: clip; }

/* The ring glow sits behind the hero art (isolation keeps it behind the art, not behind the page) */
.page-hero-art { position: relative; isolation: isolate; }
.page-hero-art::before {
  content: ""; position: absolute; z-index: -1; inset: -18%; pointer-events: none;
  background: var(--rings-light) center / contain no-repeat;
  -webkit-mask: radial-gradient(closest-side, #000 55%, transparent); mask: radial-gradient(closest-side, #000 55%, transparent);
  animation: koo-breathe 14s ease-in-out infinite alternate;
}
.page-hero.plate .page-hero-art::before { background: var(--rings-navy) center / contain no-repeat; }
@keyframes koo-breathe { from { transform: scale(0.96); opacity: 0.35; } to { transform: scale(1.03); opacity: 0.6; } }
.page-hero-art.ai-boxes { display: grid; height: auto; width: 100%; max-width: 560px; }

/* Section heading bars draw in from the left as the heading arrives */
.js main > section:not(.plate) > h2[data-reveal]::before { transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--ease-out) 250ms; }
.js main > section:not(.plate) > h2[data-reveal].in::before { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .page-hero-art::before { animation: none; }
  .js main > section:not(.plate) > h2[data-reveal]::before { transform: none; transition: none; }
}
