/* Metric-matched fallback, so swapping in the webfont does not reflow the page.
   Inter Tight is ~3.7% narrower than Arial at the same size, so until it loaded, text was
   laid out too wide and then shrank: measured 74.3 -> 70.6px on the Sign in label and
   77.6 -> 73.0px on the wordmark, on every load. Scaling the fallback closes that gap.
   The ratio is measured against Arial rather than system-ui, because Arial's metrics are
   the same everywhere while system-ui is a different typeface per platform (96.27% here
   against Arial, Helvetica and the generic sans-serif alike; 94.17% against macOS system-ui).
   Only the width is overridden -- ascent and descent are left alone, since line-height here
   is unitless and so follows font-size, not font metrics. */
@font-face{font-family:'Inter Tight Fallback';src:local('Arial'),local('Helvetica'),local('Liberation Sans');size-adjust:96.27%}

*{margin:0;padding:0;box-sizing:border-box}
:root{
  --surface-canvas:#0b0a08; --surface-sunken:#0f0d0b; --surface-base:#141210; --surface-raised:#1c1814; --surface-overlay:#242019;
  --border:rgba(240,225,205,0.09); --border-strong:rgba(240,225,205,0.16);
  --text-primary:#DCE4E2; --text-secondary:#93a09d; --text-tertiary:#5c6866;
  --accent:oklch(0.613 0.198 32); --accent-hover:oklch(0.660 0.210 32); --accent-active:oklch(0.550 0.200 32); --accent-soft:oklch(0.613 0.198 32 / 0.12); --accent-ring:oklch(0.613 0.198 32 / 0.45);
  --accent-text:oklch(0.720 0.175 32);
  /* tamed orange: same hue as --accent, chroma pulled back the way osw-studio-git does it
     (app --primary 0.22 chroma -> app --accent 0.03). Carries structural chrome: $ labels,
     eyebrows, "you are here" markers, code sigils, inline links. Never an action. */
  --accent-quiet:oklch(0.620 0.030 32);
  /* Text/glyphs sitting ON the vermilion fill. Measured: white on dark-mode #ff5d00 is
     3.08:1 (fails), near-black is 6.42:1; on light-mode #ce3f00 it is the other way round
     (white 4.84:1, near-black 4.09:1). So this flips with the theme, not with the fill. */
  --on-accent:#ffffff;
  --success:#5bbd7a; --warning:#e0a93b; --danger:#e5485e; --info:#9b87e8;
  --r-sm:6px; --r-md:9px; --r-lg:13px; --r-xl:18px; --r-pill:999px;
  --shadow-sm:0 2px 8px -2px rgba(0,0,0,0.5);
  --shadow-md:0 8px 24px -6px rgba(0,0,0,0.6);
  --shadow-lg:0 24px 60px -20px rgba(0,0,0,0.7);
  --motion-fast:130ms; --motion-base:200ms; --motion-slow:420ms; --ease:cubic-bezier(.2,.7,.2,1);
  --mono:'JetBrains Mono',ui-monospace,monospace;
  --sans:'Inter Tight','Inter Tight Fallback','Outfit',system-ui,sans-serif;
  /* preview renders at the tablet size, which fills the panel */
  /* one sine period, 2px stroke; used as a mask so the colour comes from --d-acc */
  --wiggle:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='48'%3E%3Cpath d='M8 0 Q 16 12 8 24 Q 0 36 8 48' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E");
  --prev-w:760px;
  --osws-tile:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360' viewBox='0 0 300 300'%3E%3Crect x='52' y='52' width='256' height='256' rx='10' ry='9' fill='%23ffffff'/%3E%3Cg transform='translate(52,308) scale(0.0476,-0.0476)' fill='%23121214' stroke='none'%3E%3Cpath d='M725 4825 c-50 -18 -100 -71 -114 -122 -22 -54 -15 -1573 0 -1628 16 -55 44 -92 89 -115 38 -19 62 -20 855 -20 781 0 817 1 853 19 46 23 67 46 87 94 13 32 15 138 15 830 0 566 -3 804 -11 828 -16 45 -55 87 -104 110 -38 18 -82 19 -835 18 -659 0 -802 -2 -835 -14z m1351 -371 c15 -11 37 -33 48 -48 21 -27 21 -38 21 -520 0 -547 3 -523 -68 -566 -31 -19 -54 -20 -521 -20 -483 0 -489 0 -524 22 -20 12 -42 38 -53 62 -17 38 -19 74 -19 504 0 496 1 503 51 548 46 41 66 43 561 41 464 -2 477 -3 504 -23z'/%3E%3Cpath d='M3058 4830 c-44 -13 -87 -49 -108 -90 -19 -37 -20 -61 -20 -471 0 -428 0 -432 22 -471 13 -22 41 -51 64 -64 41 -24 41 -24 685 -24 645 0 645 0 689 -22 63 -33 80 -71 80 -183 0 -101 -15 -144 -63 -179 -28 -21 -41 -21 -695 -26 -666 -5 -667 -5 -702 -27 -109 -68 -106 -247 5 -310 40 -23 40 -23 858 -23 664 0 824 3 850 14 43 17 95 78 102 118 3 18 5 225 3 459 -3 426 -3 426 -31 462 -58 76 -15 71 -757 77 -620 5 -667 6 -692 23 -44 30 -58 74 -58 179 0 116 16 153 80 186 44 22 44 22 693 22 710 0 678 -3 731 60 80 96 41 240 -79 287 -35 14 -1612 17 -1657 3z'/%3E%3Cpath d='M702 2509 c-48 -24 -75 -57 -91 -114 -9 -29 -11 -253 -9 -840 3 -779 4 -801 23 -834 11 -19 37 -48 58 -65 39 -31 39 -31 380 -31 342 0 342 0 399 28 31 15 63 39 73 53 16 25 16 25 62 -16 77 -67 104 -71 470 -68 320 3 320 3 360 30 24 16 49 44 62 70 21 44 21 49 21 854 0 773 -1 811 -19 851 -35 76 -135 120 -215 93 -41 -13 -90 -51 -109 -84 -9 -16 -13 -187 -17 -688 -5 -654 -5 -667 -26 -694 -43 -58 -68 -69 -169 -72 -82 -3 -99 -1 -133 18 -22 12 -49 39 -61 60 -21 37 -21 45 -21 664 0 439 -3 641 -11 673 -32 123 -190 174 -285 91 -73 -64 -69 -20 -70 -743 0 -721 3 -687 -66 -737 -28 -20 -47 -23 -133 -26 -91 -3 -103 -2 -134 20 -19 13 -44 36 -55 51 -21 28 -21 38 -26 695 -4 481 -8 673 -17 687 -50 87 -152 118 -241 74z'/%3E%3Cpath d='M3047 2515 c-47 -16 -81 -46 -101 -90 -14 -28 -16 -95 -16 -463 0 -281 4 -440 11 -459 15 -40 48 -73 94 -94 38 -17 79 -19 685 -19 626 0 646 -1 678 -20 58 -35 72 -72 72 -185 0 -110 -14 -147 -67 -182 -25 -17 -73 -18 -698 -23 -672 -5 -672 -5 -708 -33 -20 -15 -44 -42 -53 -60 -21 -39 -21 -125 -1 -163 20 -38 65 -80 100 -93 19 -8 289 -11 833 -11 701 0 809 2 841 15 48 20 71 41 94 88 19 35 19 60 17 480 -3 444 -3 444 -30 479 -54 71 -23 68 -740 68 -612 0 -645 1 -685 20 -67 30 -83 66 -83 183 0 116 14 156 68 189 35 21 35 21 691 22 606 1 658 2 688 19 137 74 130 264 -12 328 -38 18 -85 19 -840 18 -652 0 -807 -2 -838 -14z'/%3E%3C/g%3E%3C/svg%3E");
  --col:700px; --wide:1400px;
  /* one measure for prose AND the artifacts under it (chips, code, steps) so a
     text section has a single right edge instead of three */
  --measure:660px;
  /* editorial layout tokens */
  --lcol:236px; --rcol:210px; --gap:clamp(1.6rem,4vw,4.2rem);
}
html[data-theme="light"]{
  /* White canvas, not cream. Elevated surfaces sit just off it and every one of them also
     carries a border, so separation survives a fill that matches the canvas exactly. */
  --surface-canvas:#ffffff; --surface-sunken:#f1f2f4; --surface-base:#fafafa; --surface-raised:#ffffff; --surface-overlay:#ffffff;
  --border:rgba(18,20,26,0.11); --border-strong:rgba(18,20,26,0.19);
  --text-primary:#1d1813; --text-secondary:#5f574c; --text-tertiary:#8a8073;
  --accent:oklch(0.57 0.19 32); --accent-hover:oklch(0.53 0.18 32); --accent-active:oklch(0.49 0.17 32); --accent-soft:oklch(0.57 0.19 32 / 0.12); --accent-ring:oklch(0.57 0.19 32 / 0.40);
  --accent-text:oklch(0.50 0.175 32);
  --accent-quiet:oklch(0.48 0.03 32);
  --on-accent:#ffffff;
  --shadow-sm:0 1px 2px rgba(40,28,16,0.06),0 2px 8px -2px rgba(40,28,16,0.08);
  --shadow-md:0 6px 20px -4px rgba(40,28,16,0.12);
  --shadow-lg:0 24px 48px -16px rgba(40,28,16,0.18);
}
@media (prefers-reduced-motion: no-preference){ html{scroll-behavior:smooth} }
html{background:var(--surface-canvas)}
body{background:transparent;color:var(--text-primary);font-family:var(--sans);line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden}
::selection{background:var(--accent-soft);color:var(--accent)}
a{color:inherit}
svg{display:block}
.ic{width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ic-f{fill:currentColor;stroke:none}
.logo{--logo-bg:#f7f4ee;color:#141210}
html[data-theme="light"] .logo{--logo-bg:#141210;color:#f7f4ee}
section[id]{scroll-margin-top:72px}


/* NAV. Site chrome runs at 400 throughout -- headings, inline emphasis and the wordmark.
   Only the interactive controls (.btn*) keep weight, and the demo panel keeps its
   own brand entirely. With the background carrying real visual weight now, heavy type competed
   with it; at display sizes 400 reads calmer without losing presence. */
nav{position:fixed;top:0;left:0;right:0;z-index:100;background:color-mix(in srgb,var(--surface-canvas) 80%,transparent);backdrop-filter:blur(18px);border-bottom:1px solid var(--border);
  transition:background-color .3s ease,border-color .3s ease,backdrop-filter .3s ease}
/* Over the hero the nav sits directly on the background effect with nothing behind it. site.js
   adds this only on the page that has a hero, and drops it once the scrub is done and the page
   is scrolling content -- so every other page, and the no-JS case, keeps the solid bar. */
nav.nav-ghost{background:transparent;backdrop-filter:none;border-bottom-color:transparent}
.nav-inner{max-width:var(--wide);margin:0 auto;height:56px;padding:0 clamp(1.25rem,5vw,1.75rem);display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none}
.brand .logo{width:24px;height:24px}
.brand-name{font-size:15px;font-weight:400;color:var(--text-primary);letter-spacing:-0.01em}
.nav-links{display:flex;gap:1.7rem;align-items:center}
.bn-accent{color:var(--accent)}
/* The wordmark spells out its initials on hover, where there is hover (OSWStudio -> Open Source Web Studio).
   The tails are in the DOM but zero-width until then; the link carries the full name for screen readers. */
.bn-l{display:inline-flex}
.bn-x{display:inline-block;max-width:0;opacity:0;overflow:hidden;white-space:pre;vertical-align:bottom}
@media (hover:hover) and (min-width:861px){
  .bn-x{transition:max-width .42s var(--ease),opacity .3s var(--ease)}
  .brand:hover .bn-x,.brand:focus-visible .bn-x{max-width:4.5em;opacity:1}
  .brand:hover .bn-l:nth-child(2) .bn-x,.brand:focus-visible .bn-l:nth-child(2) .bn-x{transition-delay:.05s}
  .brand:hover .bn-l:nth-child(3) .bn-x,.brand:focus-visible .bn-l:nth-child(3) .bn-x{transition-delay:.1s}
}
@media (prefers-reduced-motion: reduce){ .bn-x{transition:none!important} }
.acc-name{font-weight:400;color:var(--text-primary)}
/* Same tone as the wordmark rather than the muted secondary: these are primary destinations,
   and the underline on hover is what marks them as interactive. */
.nav-links a{font-size:14px;color:var(--text-primary);text-decoration:none;transition:color .18s;position:relative}
.nav-links a:not(.theme-btn):not(.nav-icon)::after{content:"";position:absolute;left:0;right:100%;bottom:-4px;height:1px;background:var(--accent);transition:right .25s}
/* Nav position implies "a section of this site", so the two nav items that leave are marked.
   Deliberately NOT marked: Templates (internal) and Sign in (the gateway is a separate host
   but is part of the product, so it should read as internal). Links whose label already names
   the destination -- "Try on Hugging Face", "Read the docs on GitHub", the footer -- stay
   unmarked; marking all 15 outbound links would just add noise. */
.nav-ext{display:inline-flex;align-items:center;gap:5px}
.nav-ext .ext{width:11px;height:11px;opacity:.55;transition:opacity .18s}
.nav-ext:hover .ext{opacity:1}
.nav-links a:not(.theme-btn):not(.nav-icon):hover{color:var(--text-primary)}
.nav-links a:not(.theme-btn):not(.nav-icon):hover::after{right:0}
/* Icon controls (the GitHub link, the theme toggle): quiet/tertiary per the design language,
   no border, hover tints the background. 36px keeps the hit target at the a11y minimum. The two
   sit as a pair, closer together than the text links. */
.nav-icon{margin-right:calc(8px - 1.7rem)}
.theme-btn,.nav-icon{width:36px;height:36px;border-radius:var(--r-pill);border:none;background:transparent;color:var(--text-primary);
  display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .18s,color .18s}
.theme-btn:hover,.nav-icon:hover{background:color-mix(in srgb,var(--text-primary) 8%,transparent);color:var(--text-primary)}
/* the icon turns over when the theme actually changes -- motion tied to the state change */
.theme-btn svg{transition:transform .4s var(--ease)}
.theme-btn.turn svg{transform:rotate(180deg) scale(.85)}
@media (prefers-reduced-motion: reduce){ .theme-btn svg{transition:none} }
.theme-btn svg,.nav-icon svg{width:16px;height:16px}
@media(max-width:600px){ .nav-links a.hide-sm{display:none} }

.btn{display:inline-flex;align-items:center;gap:8px;font-size:14.5px;font-weight:500;text-decoration:none;padding:11px 20px;border-radius:var(--r-pill);transition:transform .16s,box-shadow .2s,border-color .18s,background .18s}
.btn svg{width:16px;height:16px}
/* The HF mark is a filled face on a 95x88 box, so it reads smaller than the 16px line
   icons next to it; size it up to match them optically. */
.btn-hf svg{width:21px;height:21px}
.btn-primary{background:var(--accent);color:var(--on-accent);border:1px solid transparent;font-weight:600;box-shadow:var(--shadow-sm)}
.btn-primary svg{color:var(--on-accent)}
.btn-primary:hover{transform:translateY(-2px);background:var(--accent-hover);box-shadow:var(--shadow-md)}
/* the one secondary treatment: a high-contrast neutral, used for every in-section
   action so a section never presents three competing button styles */
.btn-line{background:var(--text-primary);color:var(--surface-canvas);border:1px solid transparent;font-weight:600;box-shadow:var(--shadow-sm)}
.btn-line svg{color:currentColor}
.btn-line:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);background:var(--text-primary)}
/* "Watch it build" until the demo has widened all the way, then "Read more about OSWS" */
.hero2:not(.full) #readMore{display:none}
.hero2.full #howItWorks{display:none}
/* HF glyph: yellow with a dark outline so it reads on the vermilion fill. paint-order puts
   the stroke behind the fill, so it hugs the outside edge instead of eating the shape. */
/* Play chip: white disc on the vermilion fill, triangle in the accent. Beats
   .btn-primary svg{color:var(--on-accent)} on specificity so the glyph stays orange. */
.pb{width:19px;height:19px;flex:0 0 auto;border-radius:50%;background:var(--on-accent);display:inline-flex;align-items:center;justify-content:center}
.btn-primary .pb svg{width:14px;height:14px;color:var(--accent);margin-left:1px}
/* the play chip on the neutral button: a canvas-coloured disc so it reads on the light fill */
/* the OSWS mark on the orange button: white plate, orange glyph, in both themes */
.btn-primary .logo,
html[data-theme="light"] .btn-primary .logo{--logo-bg:#ffffff;color:var(--accent)}
.btn-line .pb{background:var(--surface-canvas)}
/* light theme: the button is dark and the canvas is white, so the disc takes the accent to keep the white triangle visible */
html[data-theme="light"] .btn-line .pb{background:var(--accent)}
.btn-line .pb svg{width:14px;height:14px;color:#ffffff;margin-left:1px}
/* The OSWS mark on a filled button reverses against it: the plate takes the page
   canvas and the glyph the page text colour, which is the inverse of the fill. */
.btn-line .logo,
html[data-theme="light"] .btn-line .logo{--logo-bg:var(--surface-canvas);color:var(--text-primary)}
.desk-dl{gap:7px}
.desk-dl .sl{color:var(--text-tertiary);font-weight:400}

@keyframes blink{50%{opacity:0}}
.lead{font-size:17.5px;color:var(--text-secondary);line-height:1.72;max-width:var(--measure)}
.lead+.lead{margin-top:1.15rem}
.lead a{color:var(--accent-quiet);text-decoration:none}.lead a:hover{text-decoration:underline}

/* ============================================================
   HERO: split that widens the studio once, when the reader starts scrolling
   ============================================================ */
/* The hero is as tall as its content: no pinned viewport-tall box, no scroll band. It loads
   collapsed (the studio shows only its preview); the first scroll down, the play button or
   "Watch it build" animates --wp from 0 to 1 (site.js) and starts the build. --wp drives the
   column widths and headline size below. (#heroSticky keeps its id for hero-bg.js; it is no
   longer sticky.) */
.hero2{--wp:0;position:relative}
.hero2-sticky{position:relative;padding:calc(56px + clamp(2.5rem,7vh,5.5rem)) 0 clamp(2rem,5vh,3.5rem)}
.hero2-grid{width:100%;max-width:var(--wide);margin:0 auto;padding:0 clamp(1.25rem,5vw,1.75rem);
  display:flex;gap:var(--gap);align-items:center;position:relative;z-index:1}
/* Shaded facet background (scripts/hero-bg.js injects the svg into #heroSticky). It overhangs
   the hero and fades out on its own (FADE_FROM/FADE_TO) so it never ends in a hard edge over
   the content below. Absent JS the hero is simply flat. */
/* Overhangs the hero at the bottom: the facets dissolve into the canvas colour and stop being
   drawn (hero-bg.js FADE_FROM/FADE_TO) rather than being masked out, so there is no scrim over
   the page and the falloff reads correctly in both themes.
   The one remaining mask is horizontal, holding the facets back over the text column -- at full
   strength the brightest facet put the subhead at 3.6:1, under the 4.5 needed for body copy.
   Damping that side to ~34% restores it while the right half keeps the full effect. */
/* top:-56px lifts it under the fixed nav (which is 56px and transparent over the hero), so the
   effect runs to the very top of the page instead of starting at the nav's lower edge. */
/* height is explicit, NOT top+bottom: an <svg> is a replaced element with an intrinsic aspect
   ratio from its viewBox, so with height:auto it sizes to width x (viewBox ratio) and silently
   ignores the bottom offset -- which is what made the overhang a no-op on every viewport.
   BOTH axes have to be explicit: give it only a height and it derives the width from the ratio
   instead, ignoring left/right and blowing out past the viewport. */
.hero-bg{position:absolute;top:-56px;left:0;width:100%;height:calc(100% + 56px + 40vh);z-index:0;pointer-events:none;
  -webkit-mask-image:linear-gradient(to right,rgba(0,0,0,.34) 0%,rgba(0,0,0,.34) 26%,#000 62%);
  mask-image:linear-gradient(to right,rgba(0,0,0,.34) 0%,rgba(0,0,0,.34) 26%,#000 62%)}
.hero-bg-amb{mix-blend-mode:screen}
.hero-bg-ao{mix-blend-mode:multiply}
/* Column width and headline size are interpolated off --wp, which site.js tweens once from 0
   to 1 when the demo opens. The short linear transition only smooths the tween's frames. */
.hero2-left{width:calc(46% + (var(--lcol) - 46%) * var(--wp));flex:0 0 auto;min-width:0;transition:width .06s linear}
.hero2-left h1{font-weight:400;letter-spacing:-0.035em;line-height:1.04;margin:0 0 1.15rem;
  font-size:calc(clamp(2.3rem,4.4vw,3.7rem) * (1 - var(--wp)) + 25px * var(--wp));transition:font-size .1s linear}
.hero2-left h1 .grad{color:var(--accent)}
/* each phrase stays whole, so the headline can only break between them ("An AI workspace / for the web.") */
.hero2-left h1 .h-ph{display:inline-block;white-space:nowrap}
/* The subhead used to collapse to 0 as --wp rose, so the product description vanished the
   moment you scrolled. It now stays for the whole scrub; the text column narrows around it. */
.hsub-wrap{overflow:visible}
/* Reduced motion pins --wp to 1 (site.js) to skip the animation and show the studio's end state.
   --wp also drives the text column width and the subhead's max-height, so without this the
   hero loses its entire explanation of the product. Keep the at-rest text column instead. */
.hero2.no-scrub .hero2-left{width:46%}
.hsub{color:var(--text-secondary);font-size:clamp(1rem,1.6vw,1.14rem);line-height:1.6;margin:0;max-width:44ch;overflow:hidden;min-height:0}
.hactions{display:flex;gap:12px;flex-wrap:wrap;margin-top:1.5rem}
.hnote{margin-top:.9rem;font-size:14px;color:var(--text-secondary);max-width:44ch}
/* .hscroll also carries .reveal, whose `rise` animation (fill:forwards) pins opacity:1 above
   any normal declaration; only !important beats an animation fill, so use it to hide the cue
   once the build starts. */
.hero2-right{position:relative;flex:1 1 auto;min-width:0}

/* collapsed teaser: force ONLY the Live Preview panel (header + sidebar + preview) */
.hero2:not(.expanded) .work .p-chat,
.hero2:not(.expanded) .work .p-files{display:none!important}
.hero2:not(.expanded) .work .p-prev{display:flex!important;flex:1 1 auto!important;border-right:none}
/* play overlay sitting on the preview */
.demo-play{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;border:none;cursor:pointer;
  background:radial-gradient(ellipse 65% 60% at 50% 50%,rgb(11 9 8 / 25%),rgb(11 9 8 / 0%));
  border-radius:var(--r-lg);transition:opacity .45s var(--ease)}
/* A soft pool behind the play button that fades to nothing at the edges, rather than a
   vignette that darkens them. Light mode lifts, dark mode deepens; same shape either way. */
html[data-theme="light"] .demo-play{background:radial-gradient(ellipse 65% 60% at 50% 50%,rgb(255 255 255 / 25%),rgb(255 255 255 / 0%))}
.demo-play .dp-ring{width:72px;height:72px;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;
  box-shadow:0 14px 46px -10px var(--accent-ring),0 0 0 9px color-mix(in srgb,var(--accent) 18%,transparent);transition:transform .2s var(--ease)}
.demo-play:hover .dp-ring{transform:scale(1.07)}
.demo-play .dp-ring svg{width:27px;height:27px;margin-left:4px;fill:#fff}
.hero2-right .demo-play{opacity:calc(1 - var(--wp) * 1.5);transition:opacity .1s linear}
/* once the build starts drop the overlay at once, rather than letting it linger over an
   already-playing studio */
.hero2.expanded .demo-play{opacity:0;pointer-events:none}
@media(max-width:860px){ .demo-play{display:none} }
.hero2-right .preview-label{font-family:var(--mono);font-size:13px;color:var(--accent-quiet);margin-bottom:.8rem}
.hero2-right .preview-label::after{content:"▋";margin-left:3px;animation:blink 1.1s steps(1) infinite}
/* once the demo is showing its wide/desktop view, the "$ preview" tag is redundant */
@media(min-width:861px){ .hero2-right .preview-label{display:none} }
@media (prefers-reduced-motion: reduce){ .hero2-right .preview-label::after{animation:none} }

/* ============================================================
   EDITORIAL ROWS: narrow title left, content right, dividers
   ============================================================ */
/* Positioned so it paints above the hero background: .hero2-sticky is positioned, so it and
   the hero-bg svg (which overhangs the section bottom) would otherwise paint over this static
   sibling no matter the source order. */
.ed{max-width:var(--wide);margin:0 auto;padding:0 clamp(1.25rem,5vw,1.75rem);position:relative;z-index:1}
.ed-row{display:grid;grid-template-columns:var(--lcol) 1fr;gap:var(--gap);padding:3.6rem 0;border-top:1px solid var(--border)}
.ed-row:first-child{border-top:none;padding-top:2.6rem}
/* Divider between the demo and the first content row. Index only: the templates page's
   first .ed-row sits directly under the fixed nav, where a hairline would float. */
#overview{border-top:none;padding-top:0}
.ed-side{position:sticky;top:84px;align-self:start}
.ed-side h2{font-size:clamp(1.3rem,2.4vw,1.7rem);font-weight:400;letter-spacing:-0.02em;color:var(--text-primary);line-height:1.12}
.ed-side .side-note{margin-top:.7rem;font-size:13px;color:var(--text-secondary);line-height:1.5;max-width:22ch}
/* A second block in the sticky column: the three steps that turn a listed template into a
   project. It sits beside the grid rather than above it, so the listing starts at the top of
   the main column and the instructions stay in view while you scroll the cards. */
.side-how{margin-top:1.4rem;padding-top:1.1rem;border-top:1px solid var(--border);max-width:22ch}
.side-how h3{font-family:var(--mono);font-size:10.5px;font-weight:400;text-transform:uppercase;
  letter-spacing:0.14em;color:var(--text-tertiary);margin-bottom:.7rem}
.side-how ol{margin:0;padding:0;list-style:none;counter-reset:sh}
.side-how li{counter-increment:sh;position:relative;padding-left:1.4rem;margin-bottom:.55rem;
  font-size:13px;line-height:1.5;color:var(--text-tertiary)}
.side-how li::before{content:counter(sh);position:absolute;left:0;top:0;font-family:var(--mono);
  font-size:11px;color:var(--accent-quiet)}
.side-how li:last-child{margin-bottom:0}
.side-how code{font-size:11.5px}
/* The side-note is secondary grey, so a link inside it lifts to the primary text colour to read
   as one; the underline does the rest. */
.side-note a{color:var(--text-primary);text-decoration:underline;text-underline-offset:2px;
  text-decoration-color:var(--border-strong);transition:color .18s,text-decoration-color .18s}
.side-note a:hover{color:var(--text-primary);text-decoration-color:currentColor}
/* svg is display:block globally, which pushes an inline arrow onto its own line no matter
   what the surrounding white-space is. The nav avoids this because its links are flex
   containers; inside running text the icon has to be made inline itself. */
.side-note a .ext{display:inline-block;width:10px;height:10px;margin-left:3px;vertical-align:-1px;color:var(--text-tertiary)}
.ed-main{min-width:0;max-width:1040px}

@media(max-width:860px){
  /* .hero2-sticky is static here, so .hero-bg anchors to .hero2 instead. Run it on past the
     hero so the mesh carries through the overview rather than stopping at the fold; the
     shader's own fade (fadeFrom/fadeTo, in viewBox fractions) does the falloff. */
  /* Mobile text runs the full width, so the desktop side-mask (which only damps the left
     column) protects nothing here. Damp the whole mesh uniformly instead: it stays visible
     through the overview, at a strength body copy can sit on. */
  .hero-bg{height:calc(100% + 56px + 78vh);
    -webkit-mask-image:linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5));
    mask-image:linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5))}
  .hero2-sticky{position:static;min-height:0;padding:6.5rem 0 1rem;display:block}
  .hero2-grid{flex-direction:column;gap:2.2rem;align-items:stretch}
  .hero2-left{width:auto!important}
  .hero2-right{width:100%}
  /* --wp is frozen at its last desktop value when the viewport narrows (site.js onScroll
     early-returns on mobile), so max-height must be reset here too or a desktop->mobile
     resize leaves the subhead collapsed. */
  .hsub-wrap{grid-template-rows:1fr!important;opacity:1!important}
  .hactions{margin-top:1.3rem}
  .hero2-left h1{font-size:clamp(2.2rem,7.5vw,3.1rem)!important}
  .ed-row{grid-template-columns:1fr;gap:1.1rem;padding:2.8rem 0}
  .ed-side{position:static}
  .ed-side .side-note{max-width:none}
}

/* studio glow */
.studio-glow{position:relative}
/* ===== the demo's transport bar: segments per prompt, play/pause, restart, a caption =====
   Lives under the studio window, in page colours (the studio itself is always dark). It keeps
   its space while the hero is collapsed so expanding never shifts the layout. */
.demo-bar{position:relative;z-index:1;margin-top:12px;-webkit-user-select:none;user-select:none;font-family:var(--mono);font-size:12px;color:var(--text-secondary);transition:opacity .3s ease}
.hero2:not(.expanded) .demo-bar{opacity:0;pointer-events:none}
.hero2.no-scrub .demo-bar{display:none}
.db-labels{display:flex;gap:8px;margin-bottom:7px;font-size:10.5px;letter-spacing:.02em;color:var(--text-tertiary)}
.db-lab{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:color .2s}
.db-lab:hover{color:var(--text-secondary)}
.db-lab.on{color:var(--text-primary)}
/* where the steps are too narrow for their labels, only the current one shows, at full length */
@media(max-width:1199px){ .db-lab{visibility:hidden} .db-lab.on{visibility:visible;overflow:visible;text-overflow:clip} }
.db-track{position:relative;display:flex;gap:8px;padding:8px 0;margin:-8px 0;cursor:pointer;touch-action:none;user-select:none}
.db-step{display:flex;gap:3px;min-width:0}
.db-seg{position:relative;flex:1 1 auto;height:4px;min-width:6px;padding:0;border:0;border-radius:2px;background:var(--border-strong);cursor:pointer;overflow:visible}
.db-seg i{position:absolute;inset:0;border-radius:2px;background:var(--accent);transform-origin:left center;transform:scaleX(var(--p,0))}
.db-seg:hover{background:var(--text-tertiary)}
.db-thumb{position:absolute;left:-5px;top:50%;width:10px;height:10px;margin-top:-5px;border-radius:50%;background:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent);opacity:0;transition:opacity .15s;pointer-events:none}
.db-track:hover .db-thumb,.db-track.scrub .db-thumb,.db-track:focus-within .db-thumb{opacity:1}
.db-track.scrub{cursor:grabbing}
.db-seg:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.db-row{display:flex;align-items:flex-start;gap:8px;margin-top:9px;min-width:0}
.db-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--border-strong);border-radius:50%;background:var(--surface-raised);color:var(--text-primary);cursor:pointer;transition:border-color .2s,color .2s}
.db-btn:hover{border-color:var(--accent);color:var(--accent)}
.db-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.db-btn svg{width:13px;height:13px}
.db-i-pause{fill:currentColor}
.db-btn .db-i-play{display:none;margin-left:2px}
.demo-bar.paused .db-i-play{display:block}
.demo-bar.paused .db-i-pause{display:none}
/* the description of what is happening now; the step's name is the lit label above the line.
   Desktop never clips it; phones clamp it to four lines */
.db-cap{flex:1 1 auto;min-width:0;margin:0 0 0 4px;line-height:1.5;padding-top:4px}
.db-desc{color:var(--text-secondary)}
@media(max-width:860px){ .db-desc{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;margin:2px 0 0} }
}

.studio-glow::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:80%;height:70%;background:radial-gradient(ellipse,var(--accent-soft),transparent 70%);filter:blur(40px);z-index:0;pointer-events:none}

/* ===== STUDIO WINDOW (dark in both themes) ===== */
.studio{
  --s-bg:oklch(0.135 0 0); --s-surface:oklch(0.185 0 0); --s-2:oklch(0.235 0 0); --s-rail:oklch(0.16 0 0);
  --s-border:rgba(255,255,255,0.10); --s-border2:rgba(255,255,255,0.16);
  --s-text:#ededed; --s-t2:#a0a0a0; --s-t3:#6f6f6f; --s-green:#5bbd7a; --s-blue:#5b8cff; --s-purple:#9b87e8; --s-accent:oklch(0.70 0.22 40); --s-rail-active:oklch(0.30 0 0);
  position:relative;z-index:1;width:100%;max-width:100%;margin:0;border:1px solid var(--s-border2);border-radius:var(--r-lg);overflow:hidden;background:var(--s-bg);
  box-shadow:var(--shadow-lg);isolation:isolate;
  container-type:inline-size;container-name:studio;
}
/* Light-mode studio chrome. Values are the app's own light :root tokens
   (osw-studio-git/assets/globals.css): background .98, card 1, foreground .145,
   muted-foreground .45, border .88, sidebar .985. The site inside the preview stays
   dark -- that is the project being built, not the app. */
/* The studio is a recording, not an app: no pointer, no text selection, no scrolling inside it.
   A wheel or swipe over it falls through to the page (which drives the hero scrub); the replay
   still scrolls its own panels from script. */
.studio{pointer-events:none;-webkit-user-select:none;user-select:none}
html[data-theme="light"] .studio{
  --s-bg:oklch(0.98 0 0); --s-surface:oklch(1 0 0); --s-2:oklch(0.97 0 0); --s-rail:oklch(0.985 0 0);
  --s-border:oklch(0.88 0 0); --s-border2:oklch(0.80 0 0);
  --s-text:oklch(0.145 0 0); --s-t2:oklch(0.45 0 0); --s-t3:oklch(0.58 0 0);
  --s-green:oklch(0.65 0.2 145); --s-blue:oklch(0.6 0.15 220); --s-purple:oklch(0.55 0.18 285);
  --s-accent:oklch(0.65 0.20 40); --s-rail-active:oklch(0.92 0 0);
  --s-shadow:0 1px 2px rgba(20,16,12,.06),0 8px 24px -10px rgba(20,16,12,.14);
}
/* In light mode the app fills the active rail button with its panel colour and inverts
   the glyph, rather than tinting a neutral surface the way dark mode does. */
html[data-theme="light"] .rail button[data-panel="chat"].act{background:var(--s-green);color:#fff}
html[data-theme="light"] .rail button[data-panel="files"].act{background:var(--s-blue);color:#fff}
html[data-theme="light"] .rail button[data-panel="preview"].act{background:var(--s-accent);color:#fff}
/* light mode separates by shadow, not by lightness (see the design language) */
html[data-theme="light"] .studio{box-shadow:var(--s-shadow)}
.studio svg{display:block}
.app-bar{display:flex;align-items:center;gap:11px;padding:9px 13px;background:var(--s-2);border-bottom:1px solid var(--s-border)}
.app-bar .logo{width:22px;height:22px}
.app-bar .proj{font-family:var(--mono);font-size:13px;color:var(--s-text);font-weight:500}
.app-bar .right{margin-left:auto;display:flex;align-items:center;gap:8px}
.app-bar .hbtn{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:var(--s-text);border:1px solid var(--s-border2);border-radius:var(--r-pill);padding:4px 9px;white-space:nowrap}
.app-bar .hbtn svg{width:13px;height:13px;color:var(--s-t2)}
.app-bar .hbtn.muted{color:var(--s-t3);border-color:var(--s-border)}
.app-bar .hbtn.cost b{font-weight:600;color:var(--s-text)}
.app-bar .hbtn.seg{padding:0;gap:0;overflow:hidden;align-items:stretch}
.app-bar .hbtn.seg .hb-main{display:inline-flex;align-items:center;gap:6px;padding:4px 9px}
.app-bar .hbtn.seg .hb-chev{display:inline-flex;align-items:center;padding:0 6px;border-left:1px solid var(--s-border2)}
.app-bar .hbtn.seg .hb-chev svg{width:11px;height:11px}
@container studio (max-width:600px){ .app-bar .right{display:none} }
.work{display:flex;height:540px;position:relative}
/* single persistent cursor that lives across the whole studio and glides between points */
.gcur{position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-2px 0 0 -2px;opacity:0;z-index:20;pointer-events:none;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,0.55));
  transition:left .42s cubic-bezier(.45,.55,.2,1),top .42s cubic-bezier(.45,.55,.2,1),opacity .25s ease}
.gcur.show{opacity:1}
.gcur.tap{animation:gtap .3s ease}
@keyframes gtap{35%{transform:scale(.72)}100%{transform:scale(1)}}
.rail{width:40px;flex-shrink:0;background:var(--s-rail);border-right:1px solid var(--s-border);display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 0}
.rail button{width:26px;height:26px;border-radius:var(--r-sm);border:none;background:transparent;color:var(--s-t3);display:flex;align-items:center;justify-content:center;cursor:default}
.rail button svg{width:15px;height:15px}
.rail button[data-panel="chat"].act{background:var(--s-rail-active);color:var(--s-green)}
.rail button[data-panel="files"].act{background:var(--s-rail-active);color:var(--s-blue)}
.rail button[data-panel="preview"].act{background:var(--s-rail-active);color:var(--s-accent)}
.rail button{transition:background .25s ease,color .25s ease}
.rail .only-mobile{display:none}
.panel{display:flex;flex-direction:column;min-width:0;border-right:1px solid var(--s-border)}
.panel:last-child{border-right:none}
.p-chat{flex:0 0 33%}.p-prev{flex:1 1 auto;background:var(--s-surface)}.p-files{flex:0 0 23%}
.p-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--s-border);flex-shrink:0}
.p-head .t{font-size:13px;font-weight:600;color:var(--s-text)}
.p-head .hi{width:15px;height:15px;color:var(--s-t2)}
.p-head .hi.green{color:var(--s-green)}.p-head .hi.blue{color:var(--s-blue)}.p-head .hi.orange{color:var(--s-accent)}
.p-head .ctl{margin-left:auto;display:flex;align-items:center;gap:9px;color:var(--s-t3)}
.p-head .ctl svg{width:14px;height:14px}
.chat-body{flex:1;overflow:hidden;padding:13px;display:flex;flex-direction:column;gap:10px;min-height:0}
.chat-foot{flex-shrink:0;border-top:1px solid var(--s-border);padding:10px 12px;position:relative}
.cmp-body{border:1px solid var(--s-border);border-radius:0 0 var(--r-lg) var(--r-lg);background:var(--s-surface);overflow:hidden}
.cmp-body:has(.composer.focused){border-color:var(--s-border2)}
.composer{display:flex;align-items:flex-start;gap:8px;padding:10px 11px;background:var(--s-surface);position:relative}
.composer .ph{flex:1;font-size:13px;color:var(--s-t3);line-height:1.45;min-height:2.6em;padding-top:1px;overflow:hidden}
.composer .send{flex-shrink:0;background:transparent;color:var(--s-t2);border:1px solid var(--s-border2);border-radius:var(--r-pill);padding:5px 13px;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500}
.composer .send svg{width:12px;height:12px}
.composer .send .s-spin{display:none}
.composer .send.working .s-send{display:none}
.composer .send.working .s-spin{display:block;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.chat-tools{display:flex;align-items:center;gap:8px;padding:7px 9px;border-top:1px solid var(--s-border);background:var(--s-2)}
.model-sel{display:inline-flex;align-items:stretch;font-family:var(--mono);font-size:11px;border:1px solid var(--s-border);border-radius:var(--r-pill);overflow:hidden;background:var(--s-surface)}
.model-sel .ms-label{display:inline-flex;align-items:center;padding:3px 8px;color:var(--s-t2)}
.model-sel .ms-chev{display:inline-flex;align-items:center;padding:0 5px;border-left:1px solid var(--s-border)}
.model-sel .ms-chev svg{width:11px;height:11px;color:var(--s-t3)}
.mode-tog{margin-left:auto;display:inline-flex;align-items:stretch;border:1px solid var(--s-border);border-radius:var(--r-pill);overflow:hidden;font-family:var(--mono);font-size:11px;background:var(--s-surface)}
.mode-tog .mt-main{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;color:var(--s-text)}
.mode-tog .mt-main svg{width:11px;height:11px;color:var(--s-accent)}
.mode-tog .mt-chev{display:inline-flex;align-items:center;padding:0 5px;border-left:1px solid var(--s-border)}
.mode-tog .mt-chev svg{width:11px;height:11px;color:var(--s-t3)}
/* modality tabs + permission selector + composer action column */
.cmp-col{flex-shrink:0;display:flex;flex-direction:column;align-items:stretch;gap:8px}
.cmp-icons{display:flex;align-items:center}
.cmp-add,.cmp-mic{flex:1;display:flex;align-items:center;justify-content:center;color:var(--s-t2);cursor:default}
.cmp-add svg,.cmp-mic svg{width:16px;height:16px}
.cmp-tabs{display:flex;align-items:flex-end;gap:0}
.cmp-tab{display:inline-flex;align-items:center;justify-content:center;padding:5px 10px;border:1px solid var(--s-border);border-bottom:none;background:var(--s-surface);color:var(--s-text)}
.cmp-tab svg{width:14px;height:14px}
.cmp-tab:not(:first-child){border-left:none}
.cmp-tab:first-child{border-top-left-radius:var(--r-md)}
.cmp-tab.on{color:var(--s-text)}
.perm-sel{margin-left:auto;display:inline-flex;align-items:stretch;border:1px solid var(--s-border);border-bottom:none;border-top-left-radius:var(--r-md);border-top-right-radius:var(--r-md);overflow:hidden;font-size:11.5px;background:var(--s-surface)}
.perm-sel .ps-main{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;color:var(--s-text)}
.perm-sel .ps-main svg{width:12px;height:12px;color:var(--s-t2)}
.perm-sel .ps-chev{display:inline-flex;align-items:center;padding:0 5px;border-left:1px solid var(--s-border)}
.perm-sel .ps-chev svg{width:11px;height:11px;color:var(--s-t3)}
.msg-user{align-self:stretch;max-width:100%;background:color-mix(in srgb,var(--s-accent) 10%,transparent);border:1px solid color-mix(in srgb,var(--s-accent) 22%,transparent);border-radius:var(--r-md);padding:7px 10px;line-height:1.4}
.mu-label{display:block;font-size:11px;font-weight:600;color:var(--s-accent);margin-bottom:3px}
.mu-body{font-size:12.5px;color:var(--s-text);white-space:pre-wrap}
.msg-agent{color:var(--s-text);line-height:1.5;font-size:12.5px;max-width:97%}
.row-reason,.row-tool{display:flex;align-items:center;gap:8px;border:1px solid var(--s-border);border-radius:var(--r-md);padding:6px 9px;font-family:var(--mono)}
.row-reason{background:rgba(155,135,232,0.07);border-color:rgba(155,135,232,0.2)}
.row-reason svg{width:13px;height:13px;color:var(--s-purple);flex-shrink:0}
.row-reason .lbl{font-size:11.5px;color:var(--s-purple);flex-shrink:0}
.row-reason .prev{font-size:11px;color:var(--s-t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}
.row-reason .chev{width:12px;height:12px;color:var(--s-t3);flex-shrink:0}
.row-tool .chev{width:12px;height:12px;color:var(--s-blue);flex-shrink:0}
.row-tool .ti{width:13px;height:13px;flex-shrink:0}.row-tool .ti.status{color:var(--s-accent)}.row-tool .ti.write{color:var(--s-blue)}
.row-tool .name{font-size:11.5px;color:var(--s-text);font-weight:500;flex-shrink:0}
.row-tool .cmd{font-size:11px;color:var(--s-t2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}
.row-tool .ok{width:14px;height:14px;color:var(--s-green);flex-shrink:0}
.compact{display:flex;align-items:center;gap:10px;color:var(--s-t3);font-size:11px;padding:2px 0}
.compact::before,.compact::after{content:"";flex:1;border-top:1px dashed var(--s-border2)}
.pctx{display:flex;align-items:center;gap:7px;padding:5px 7px;color:var(--s-t2);font-size:12px}
.pctx .chev{width:12px;height:12px;color:var(--s-t3)}
.pctx .fic{width:13px;height:13px;color:var(--s-t3)}
.msg-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:1px 1px 2px;font-size:11px;color:var(--s-t3)}
.msg-foot .acts{display:flex;gap:4px}
.msg-foot .acts button{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--s-t2);background:transparent;border:none;padding:3px 6px;border-radius:var(--r-sm);cursor:default;font-family:inherit}
.msg-foot .acts button svg{width:12px;height:12px}
.prev-tb{display:flex;align-items:center;gap:8px;padding:7px 10px;border-bottom:1px solid var(--s-border);flex-shrink:0;color:var(--s-t3)}
.prev-tb svg{width:14px;height:14px}
.prev-tb .url{flex:1;background:var(--s-bg);border:1px solid var(--s-border);border-radius:var(--r-sm);padding:4px 9px;font-family:var(--mono);font-size:11px;color:var(--s-t2)}
.prev-tb .dev{display:flex;gap:7px}.prev-tb .dev .on{color:var(--s-accent)}
.prev-tb .rld.spin{animation:spin .6s ease}
.prev-canvas{flex:1;overflow:hidden;background:var(--s-bg);display:flex;align-items:flex-start;justify-content:center;position:relative}
/* The real preview renders the page inside a rounded container inset from the panel edges,
   not edge-to-edge -- so at tablet/desktop widths it reads as a device, not a bleed. The
   starter canvas (osw-studio-git lib/vfs/templates/utils.ts:6) lives INSIDE that container,
   because it is project content: the OSWS mark tiled at 36px, 0.04 opacity, rotate(-10deg)
   scale(1.5). It shows while the project is empty and is covered once the page renders. */
.prev-frame{position:absolute;top:14px;bottom:14px;left:50%;transform:translateX(-50%);
  width:calc(100% - 28px);max-width:var(--prev-w);border-radius:14px;overflow:hidden;
  background:var(--s-surface);border:1px solid var(--s-border);z-index:0;pointer-events:none}
.prev-frame::before{content:"";position:absolute;inset:-30%;background-image:var(--osws-tile);
  background-size:36px 36px;opacity:.04;transform:rotate(-10deg) scale(1.5);transform-origin:center center}
.site{width:calc(100% - 28px);max-width:var(--prev-w);height:calc(100% - 28px);margin:14px 0;border-radius:14px;
  overflow:hidden;background:#0C0C0D;color:#F2F0EC;font-family:var(--sans);opacity:0;transition:opacity .55s;
  container-type:inline-size;contain:paint;position:relative;z-index:1}
.site.in{opacity:1}
/* ---- the preview's fake site: Studio Verda, built to BRAND-SPEC.md ---- */
.dsite{--d-acc:#17D1A1;--d-ink:#0C0C0D;--d-mut:#8A8783;position:relative;width:100%;height:100%;display:flex;flex-direction:column;padding:5cqw 6cqw 0;overflow:hidden;background:#0C0C0D}
/* step 2 warms the accent: the spec ships a cold teal, the follow-up prompt swings it to red.
   Starting genuinely cold is what makes that beat read. --d-ink flips with it because dark
   text clears 9.5:1 on the teal but only 4.13:1 on the red, where paper gets 4.67:1. */
.dsite.warm{--d-acc:#E5243C;--d-ink:#F2F0EC}
/* The page's only ornament: six vertical rules in a lightened wash of the accent, so the
   grid warms along with everything else. 2px so it actually reads on the near-black. */
.dsite::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;transition:background-color .5s;
  background-image:repeating-linear-gradient(90deg,color-mix(in srgb,var(--d-acc) 8%,transparent) 0 3px,transparent 3px 16.666%)}
/* Warming loosens the grid: straight rules become vertical wiggles. Drawn as a mask rather
   than a background image, so the stroke colour can stay a variable instead of being baked
   into the data URI. One sine period per 48px tile = a seamless vertical repeat. */
.dsite.wave::before{background-image:none;background-color:color-mix(in srgb,var(--d-acc) 12%,transparent);
  -webkit-mask-image:var(--wiggle);mask-image:var(--wiggle);
  -webkit-mask-size:16.666% 48px;mask-size:16.666% 48px;
  -webkit-mask-repeat:repeat;mask-repeat:repeat}
.dsite>*{position:relative;z-index:1}
.ds-top{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.ds-logo{font-weight:900;font-size:4.4cqw;letter-spacing:0.02em;color:#F2F0EC;line-height:1;transition:transform .18s ease,opacity .18s ease}
.ds-logo.press{transform:scale(0.94);opacity:.7}
.ds-end{display:flex;align-items:center;gap:3.2cqw}
/* Same two beats for the language switcher: the nav markup renders plain, then the
   .nav-end / .lang-switch rules arrive and give it tracking, case and an active state. */
.ds-lang{display:none;align-items:center;gap:.6cqw;font-size:2.2cqw;color:var(--d-mut);
  transition:gap .35s var(--ease),letter-spacing .35s var(--ease)}
.ds-lang.on{display:inline-flex}
.ds-lang.st{gap:1cqw;font-weight:600;letter-spacing:0.18em;text-transform:uppercase}
.ds-lang .ll{color:var(--d-mut);text-decoration:none;transition:color .18s}
.ds-lang.st .ll.on{color:#F2F0EC}
.ds-lang i{color:var(--d-mut);font-style:normal;opacity:.5}
.ds-menu{display:flex;flex-direction:column;gap:1.11cqw;flex-shrink:0}
.ds-menu i{width:5cqw;height:1.6px;background:#F2F0EC;border-radius:0}
.ds-menu i:nth-child(2){width:3.51cqw}
/* The frame is a fixed 428px tall at every viewport, but everything in here is sized in
   cqw, so the hero's content height tracks the container's WIDTH (540-598px across
   desktop) against a height that never moves. The rhythm below is tuned to fit at the
   widest case; `safe center` is the backstop, so if a state ever does overflow it spills
   downward into overflow:hidden instead of bleeding symmetrically over the top bar and
   the marquee, which is how it failed before. */
.ds-hero{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;justify-content:safe center;gap:1.7cqw}
.ds-kicker{display:flex;align-items:center;gap:2.6cqw;font-weight:600;font-size:2.6cqw;letter-spacing:0.18em;text-transform:uppercase;color:var(--d-mut)}
/* the NOW BOOKING badge arrives in step 2 */
/* Two beats, because that is how the run actually went: the ss on index.html adds the
   badge markup (it renders, but inherits the eyebrow's styling), and the ss on style.css
   a moment later gives it .eyebrow-badge -- accent colour and weight. */
.ds-book{color:inherit;font-weight:inherit;opacity:0;transform:translateX(-4px);max-width:0;overflow:hidden;white-space:nowrap;
  transition:opacity .4s var(--ease),transform .4s var(--ease),max-width .4s var(--ease),color .35s var(--ease),font-weight .35s}
.dsite.v2 .ds-book{opacity:1;transform:none;max-width:40cqw}
.dsite.v2s .ds-book{color:var(--d-acc);font-weight:700}
.ds-title{margin:0;display:flex;flex-direction:column;font-weight:900;font-size:13.5cqw;line-height:0.82;letter-spacing:-0.04em;text-transform:uppercase;color:#F2F0EC}
/* keyed to .acc, not .l2: the flip moves the flare between the two lines. */
.ds-title .acc{color:var(--d-acc);transition:color .5s}
.ds-lede{font-size:3.11cqw;line-height:1.6;color:var(--d-mut);margin:0;max-width:36ch}
.ds-cta{align-self:flex-start;background:var(--d-acc);color:var(--d-ink);font-weight:600;font-size:2.71cqw;letter-spacing:0.18em;text-transform:uppercase;border-radius:2px;padding:2.8cqw 5.6cqw;transition:background .5s,transform .16s ease}
.ds-cta.press{transform:translateY(-2px)}
/* Tinted with the same wash as the background rules, not the full accent: a solid accent
   band competes with the primary button for the one-loud-colour slot. */
.ds-marq{margin:0 -6cqw;background:color-mix(in srgb,var(--d-acc) 12%,transparent);overflow:hidden;white-space:nowrap;flex-shrink:0;transition:background .5s}
.ds-track{display:inline-block;padding:2.6cqw 0;font-weight:600;font-size:2.4cqw;letter-spacing:0.18em;text-transform:uppercase;color:#F2F0EC;transition:color .5s;
  animation:dsMarq 26s linear infinite}
/* the track holds the strip twice, so -50% is a seamless loop point */
@keyframes dsMarq{to{transform:translateX(-50%)}}
@media (prefers-reduced-motion: reduce){ .ds-track{animation:none} }
.ds-track span{margin:0 1.6cqw}
.ds-track b{color:var(--d-acc);font-weight:400}
.ds-works{padding:7cqw 6cqw 9cqw;background:#0C0C0D;border-top:1px solid rgba(242,240,236,0.12)}
.dw-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:5cqw}
.dw-eyebrow{font-weight:600;font-size:2.51cqw;letter-spacing:0.18em;text-transform:uppercase;color:var(--d-mut)}
.dw-yr{font-weight:600;font-size:2.4cqw;letter-spacing:0.08em;color:var(--d-mut)}
/* the 2x2 work grid the real run produced, hairline-separated, square corners */
.dw-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgba(242,240,236,0.12)}
.dw-card{background:#0C0C0D;padding:6cqw 4cqw 4cqw;min-height:22cqw;display:flex;flex-direction:column;justify-content:flex-end;gap:1cqw;text-decoration:none;transition:opacity .18s ease,transform .18s ease}
.dw-card.press{transform:scale(0.98)}
.dw-card.shake b,.dw-card.shake i{animation:cardShake .52s cubic-bezier(.36,.07,.19,.97)}
/* side-to-side shake: the click did not go anywhere, and that has to be unmistakable */
@keyframes cardShake{10%,90%{transform:translateX(-2px)}20%,80%{transform:translateX(4px)}
  30%,50%,70%{transform:translateX(-7px)}40%,60%{transform:translateX(7px)}100%{transform:translateX(0)}}
.dw-card.shake b{color:var(--danger);transition:color .15s}
.dw-card.shake i{color:color-mix(in srgb,var(--danger) 70%,var(--d-mut))}
.dw-card b{font-weight:800;font-size:4.4cqw;line-height:1.05;letter-spacing:-0.02em;text-transform:uppercase;color:#F2F0EC}
.dw-card i{font-style:normal;font-weight:600;font-size:2.29cqw;letter-spacing:0.18em;text-transform:uppercase;color:var(--d-mut)}
.dw-thumb{width:22cqw;height:15cqw;border-radius:2cqw;flex-shrink:0;position:relative;overflow:hidden}
.dw-thumb.t1{background:linear-gradient(135deg,#322b22,#534636)}
.dw-thumb.t2{background:linear-gradient(135deg,#22303a,#3c5668)}
.dw-thumb.t3{background:linear-gradient(135deg,color-mix(in srgb,var(--d-acc) 34%,#1b1712),#1b1712);transition:background .5s}
.dw-thumb::after{content:"";position:absolute;inset:0;background:radial-gradient(62% 62% at 28% 18%,rgba(255,255,255,0.14),transparent 72%)}
.dwork{--d-acc:#E5243C;--d-mut:#8A8783;position:absolute;top:14px;bottom:14px;left:50%;width:calc(100% - 28px);max-width:var(--prev-w);border-radius:14px;transform:translateX(-50%) translateY(18px);background:#0C0C0D;color:#F2F0EC;font-family:var(--sans);opacity:0;pointer-events:none;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;container-type:inline-size;z-index:4;transition:opacity .5s ease,transform .55s cubic-bezier(.4,.5,.2,1)}
.dwork::-webkit-scrollbar{display:none}
.dwork.in{opacity:1;transform:translateX(-50%) translateY(0)}
.dwk-head{position:sticky;top:0;z-index:3;background:#0C0C0D;padding:5cqw 6cqw 3cqw}
.dwk-body{padding:6cqw 6cqw 9cqw;display:flex;flex-direction:column}
.dwk-back{font-weight:600;font-size:2.4cqw;letter-spacing:0.18em;text-transform:uppercase;color:var(--d-mut);margin-bottom:5cqw}
.dwk-cat{font-weight:600;font-size:2.51cqw;letter-spacing:0.18em;text-transform:uppercase;color:var(--d-mut)}
.dwk-title{margin:2cqw 0 3cqw;font-weight:900;font-size:15cqw;line-height:0.82;letter-spacing:-0.04em;text-transform:uppercase;color:#F2F0EC}
.dwk-lede{font-size:3.11cqw;line-height:1.6;color:var(--d-mut);max-width:34ch;margin:0}
.dwk-sec{margin-top:8cqw;padding-top:6cqw;border-top:1px solid rgba(242,240,236,0.12)}
.dwk-lbl{font-weight:600;font-size:2.4cqw;letter-spacing:0.18em;text-transform:uppercase;color:var(--d-mut)}
.dwk-h2{margin:2cqw 0 2.4cqw;font-weight:700;font-size:5.4cqw;line-height:1.05;letter-spacing:-0.02em;color:#F2F0EC}
.dwk-body p.dwk-body{font-size:2.89cqw;line-height:1.6;color:var(--d-mut);margin:0}
.dwk-facts{display:flex;gap:6cqw;margin-top:6cqw;border-top:1px solid rgba(244,241,234,0.08);padding-top:5cqw}
.dwk-facts span{display:flex;flex-direction:column;gap:1.4cqw;font-family:var(--mono);font-size:2.7cqw;color:#cfc8bd}
.dwk-facts b{font-weight:400;font-size:2.3cqw;letter-spacing:0.1em;text-transform:uppercase;color:var(--d-mut)}
.composer.focused{border-color:var(--s-accent)}
.composer.typing .ph{color:var(--s-text)}
.composer.typing .ph::after{content:"▍";margin-left:1px;color:var(--s-accent);animation:cur-blink 1s steps(1) infinite}
@keyframes cur-blink{50%{opacity:0}}
.composer .send{transition:transform .12s ease,filter .12s ease,background .18s}
.composer .send.press{transform:scale(.93);filter:brightness(1.12)}
.fauxcur{position:absolute;top:50%;left:12%;width:14px;height:14px;opacity:0;transform:translate(-1px,-1px);pointer-events:none;z-index:6;filter:drop-shadow(0 1px 2px rgba(0,0,0,0.55));transition:left .44s cubic-bezier(.45,.55,.2,1),top .4s ease,opacity .25s ease}
.fauxcur.show{opacity:1}
.fauxcur.pos-input{left:13%;top:50%}
.fauxcur.pos-send{left:86%;top:56%}
.p-prev{position:relative}
.prev-tb .pick{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;color:var(--s-t3);flex-shrink:0;transition:background .2s,color .2s}
.prev-tb .pick svg{width:14px;height:14px}
.prev-tb .pick.on{background:var(--s-accent);color:#fff}
.ds-title.sel{outline:2px solid #6b8cff;outline-offset:5px;border-radius:5px}
.pvcur{position:absolute;left:50%;top:80%;width:15px;height:15px;opacity:0;z-index:7;pointer-events:none;filter:drop-shadow(0 1px 2px rgba(0,0,0,0.55));transition:left .5s cubic-bezier(.45,.55,.2,1),top .5s ease,opacity .25s ease}
.pvcur.show{opacity:1}
/* Matches the app's own context chip (components/message-context/index.tsx:200):
   border-dashed border-primary/30, bg-primary/5, text-primary/80 -- and no shadow. */
.ctxchip{display:none;position:absolute;left:12px;right:12px;bottom:calc(100% + 4px);border:1px dashed color-mix(in srgb,var(--s-accent) 30%,transparent);background:color-mix(in srgb,var(--s-accent) 5%,var(--s-surface));border-radius:var(--r-md);padding:7px 9px;font-family:var(--mono);z-index:3}
.ctxchip.show{display:block}
.cc-head{font-size:9.5px;letter-spacing:0.1em;text-transform:uppercase;color:color-mix(in srgb,var(--s-accent) 80%,transparent);margin-bottom:6px}
.cc-row{display:flex;align-items:center;gap:7px;font-size:11.5px;color:var(--s-text)}
.cc-ic{width:13px;height:13px;color:var(--s-accent);flex-shrink:0}
.cc-tag{color:var(--s-t3)}
.cc-clear{margin-left:auto;color:var(--s-t3);font-size:11px}
.p-files{position:relative}
/* Drop target, matching the app (file-explorer/index.tsx:951): a content-sized box on
   bg-blue-500/20 with a dashed blue-500 edge and a blue-600 label, centred in the panel
   via absolute inset-0 + flex centring -- not a band pinned near the top. */
.dz-wrap{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:3;
  opacity:0;transition:opacity .22s var(--ease)}
.dz-wrap.show{opacity:1}
.dropz{background:rgba(59,130,246,0.20);border:2px dashed #3b82f6;border-radius:var(--r-lg);padding:26px 30px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  font-family:var(--sans);font-size:12.5px;color:#60a5fa;transform:scale(.97);transition:transform .22s var(--ease)}
.dz-wrap.show .dropz{transform:none}
.dropz .dz-ic{width:30px;height:30px;color:#3b82f6}
/* The ghost is a child of .gcur, so it shares the cursor's coordinate space and rides its
   0.42s move transition -- it cannot drift out of register the way a sibling did. */
.dragfile{position:absolute;left:12px;top:10px;display:inline-flex;align-items:center;gap:6px;
  font-family:var(--mono);font-size:11.5px;color:var(--s-text);background:var(--s-2);border:1px solid var(--s-border2);
  border-radius:var(--r-sm);padding:5px 9px;box-shadow:0 10px 26px -8px rgba(0,0,0,.7);white-space:nowrap;
  opacity:0;transition:opacity .2s var(--ease)}
.dragfile svg{width:12px;height:12px;color:var(--s-t2)}
.dragfile.in{opacity:1}
.dragfile.drop{opacity:0}
@media (prefers-reduced-motion: reduce){ .dz-wrap,.dropz,.dragfile{transition:none} }
.files-body{flex:1;position:relative;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;padding:11px 8px;font-family:var(--mono);font-size:12px}
.files-body::-webkit-scrollbar{display:none}
.frow{display:flex;align-items:center;gap:7px;padding:4px 6px;border-radius:var(--r-sm);color:var(--s-t2);opacity:0;transform:translateX(-4px);transition:opacity .3s,transform .3s}
.frow.in{opacity:1;transform:none}
.frow svg{width:14px;height:14px;flex-shrink:0;color:var(--s-t3)}
.frow.dir svg{color:var(--s-t2)}.frow.dir{color:var(--s-text)}
.frow .chev{width:11px;height:11px;color:var(--s-t3);transition:transform .2s}
.frow.open .chev{transform:rotate(90deg)}
.frow .nm{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.frow.entry svg.home{color:var(--s-green)}.frow.entry .ent{color:var(--s-green);font-size:10.5px}
.files-foot{flex-shrink:0;border-top:1px solid var(--s-border);padding:8px 12px;display:flex;align-items:center;gap:7px;font-family:var(--mono);font-size:10.5px;color:var(--s-t3)}
.files-foot svg{width:13px;height:13px}
@keyframes paneIn{from{opacity:0;transform:translateX(26px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.work .panel{animation:none!important}}
/* The studio adapts to ITS OWN width (container queries), not the viewport, so a
   narrow demo column shows the tablet / mobile layout, a wide one the full desktop view. */
@container studio (min-width:601px) and (max-width:1000px){
  .work{overflow:hidden}
  .work .p-files,.work .p-prev{display:none;flex:1 1 auto;border-right:none}
  .work .p-chat{flex:0 0 40%}
  .work[data-aux="files"] .p-files,.work[data-aux="preview"] .p-prev{display:flex;animation:paneIn .34s cubic-bezier(.4,.5,.2,1)}
}
@container studio (max-width:600px){
  .work{flex-direction:column;height:560px;overflow:hidden}
  .work .panel{display:none;border-right:none}
  .work[data-focus="chat"] .p-chat,
  .work[data-focus="files"] .p-files,
  .work[data-focus="preview"] .p-prev{display:flex;flex:1 1 auto;order:1;min-height:0;animation:paneIn .34s cubic-bezier(.4,.5,.2,1)}
  .rail{order:2;width:100%;height:auto;flex-direction:row;justify-content:center;align-items:center;gap:16px;border-right:none;border-top:1px solid var(--s-border);padding:11px 0}
  .rail .only-desk{display:none}
  .rail .only-mobile{display:flex}
  .rail button{width:38px;height:38px;border-radius:9px}
  .rail button svg{width:19px;height:19px}
}

/* ===== SMALL PLATE: the site's demo (Studio Verda stays at index.html?demo=verda) =====
   A replica of what DeepSeek V4.1 Flash built over five prompts, drawn at the phone layout the
   preview frame shows (the real site stacks below 620px). Sized in cqw against a 560px page, so
   1cqw = 5.6px of the original. Stages are classes on #studio, added by the timeline in site.js:
   plate-built (turn 1), plate-photos (2), plate-pages (3), plate-plan (4), plate-lang (5). */
.psite,.pwork{display:none}
.studio[data-demo="plate"] .dsite,.studio[data-demo="plate"] .ds-works,.studio[data-demo="plate"] .dwork{display:none}
.studio[data-demo="plate"] .psite{display:block}
.studio[data-demo="plate"] .site{background:#F7F3EA;color:#252821;overflow-y:auto;scrollbar-width:none}
.studio[data-demo="plate"] .site::-webkit-scrollbar{display:none}
.psite,.pwork{--pp-paper:#F7F3EA;--pp-deep:#EFE9DC;--pp-ink:#252821;--pp-soft:#5C5F55;--pp-tom:#E85A3C;--pp-sage:#A9BDA2;--pp-sage2:#8CA584;--pp-ph:#D9D4C9;
  --pp-rule:rgba(37,40,33,0.18);--pp-rule2:rgba(37,40,33,0.4);
  --pp-serif:"Fraunces","Iowan Old Style",Georgia,serif;--pp-sans:"Instrument Sans","Helvetica Neue",Arial,sans-serif;
  font-family:var(--pp-sans);color:var(--pp-ink);background:var(--pp-paper);line-height:1.6}
/* header: transparent over the hero, paper once the page is past it */
.pp-head{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:2cqw;height:12.9cqw;margin-bottom:-12.9cqw;padding:0 5cqw;
  color:var(--pp-paper);border-bottom:1px solid transparent;transition:background-color .35s,color .35s,border-color .35s}
.pp-head.solid{background:var(--pp-paper);color:var(--pp-ink);border-bottom-color:var(--pp-rule);margin-bottom:0}
.pp-mark{display:inline-flex;align-items:center;gap:1.9cqw;margin-right:auto;font-size:2.3cqw;font-weight:600;letter-spacing:.3em;transition:transform .18s}
.pp-mark::before{content:"";width:1.45cqw;height:1.45cqw;background:var(--pp-tom)}
.pp-mark.press{transform:scale(.95)}
.pp-lang{display:none;gap:5cqw;margin-right:3cqw;font-size:1.95cqw;font-weight:500;letter-spacing:.16em}
.studio.plate-lang .pp-lang{display:inline-flex}
.pp-lang b{font-weight:500;opacity:.55;transition:opacity .2s}
.pp-lang b.on{opacity:1;text-decoration:underline;text-underline-offset:.5em;text-decoration-thickness:1px}
.pp-lang b.press{opacity:1}
.pp-menu{display:inline-flex;align-items:center;gap:2cqw;padding:1.4cqw 2.2cqw;border:1px solid currentColor;border-radius:2px;font-size:1.95cqw;font-weight:500;letter-spacing:.16em;text-transform:uppercase;transition:transform .16s}
.pp-menu i{width:2.9cqw;height:.9cqw;border-top:1px solid currentColor;border-bottom:1px solid currentColor}
.pp-menu.press{transform:scale(.95)}
/* hero */
.pp-hero{position:relative;height:var(--pp-h,512px);min-height:96cqw;background:var(--pp-ph);overflow:hidden;display:flex;align-items:flex-end}
.pp-ph{display:block;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .7s ease}
.studio.plate-photos .pp-ph{opacity:1}
.pp-heroimg{position:absolute;inset:0;object-position:48% 38%}
.pp-shade{position:absolute;inset:0;background:linear-gradient(to top right,rgba(37,40,33,.9) 0%,rgba(37,40,33,.62) 26%,rgba(37,40,33,.14) 54%,rgba(37,40,33,0) 72%),linear-gradient(to bottom,rgba(37,40,33,.45) 0%,rgba(37,40,33,0) 20%)}
.studio.plate-photos .pp-shade{background:linear-gradient(to top right,rgba(28,30,25,.88) 0%,rgba(28,30,25,.58) 24%,rgba(28,30,25,.12) 50%,rgba(28,30,25,0) 68%),linear-gradient(to bottom,rgba(28,30,25,.4) 0%,rgba(28,30,25,0) 18%)}
.pp-hcontent{position:relative;padding:0 5cqw 6.3cqw;color:var(--pp-paper)}
.pp-eye{display:flex;align-items:center;gap:2.2cqw;font-size:2cqw;font-weight:500;letter-spacing:.24em;text-transform:uppercase;color:rgba(247,243,234,.82)}
.pp-eye::before{content:"";width:5.7cqw;height:1px;background:var(--pp-tom)}
.pp-eye.dark{color:var(--pp-tom);letter-spacing:.22em;gap:2cqw}
.pp-eye.dark::before{width:4.6cqw;background:currentColor}
.pp-title{margin:3cqw 0 0;font-family:var(--pp-serif);font-size:12.6cqw;font-weight:500;line-height:.86;letter-spacing:-.035em;text-transform:uppercase}
.pp-lede{max-width:56ch;margin:3.6cqw 0 0;font-size:2.8cqw;line-height:1.6;color:rgba(247,243,234,.9)}
.pp-acts{display:flex;flex-wrap:wrap;gap:2cqw;margin-top:5cqw}
.pp-btn{font-size:2cqw;font-weight:500;letter-spacing:.14em;text-transform:uppercase;padding:3cqw 3.9cqw;border:1px solid var(--pp-tom);border-radius:3px;background:var(--pp-tom);color:#fff}
.pp-btn.ghost{background:rgba(247,243,234,.08);border-color:rgba(247,243,234,.6)}
/* collection */
.pp-coll{padding:10cqw 5cqw 9cqw}
.pp-h2{margin:2cqw 0 0;font-family:var(--pp-serif);font-size:6cqw;font-weight:400;line-height:.98;letter-spacing:-.025em}
.pp-intro{margin:3.2cqw 0 0;font-size:2.75cqw;line-height:1.65;color:var(--pp-soft)}
.pp-search{display:block;margin-top:5.5cqw;padding:2.6cqw 0;border-bottom:1px solid var(--pp-ink);font-size:2.85cqw;color:var(--pp-soft)}
.pp-search.typing{color:var(--pp-ink)}
.pp-chips{display:flex;flex-wrap:wrap;gap:1.4cqw;margin-top:3.8cqw}
.pp-chips b{font-size:2cqw;font-weight:500;letter-spacing:.12em;text-transform:uppercase;padding:1.6cqw 2.4cqw;border:1px solid var(--pp-rule);border-radius:2px;transition:background-color .2s,border-color .2s}
.pp-chips b.on{background:var(--pp-sage);border-color:var(--pp-sage2)}
.pp-count{display:block;margin-top:5cqw;padding:2.6cqw 0;border-top:1px solid var(--pp-rule);border-bottom:1px solid var(--pp-rule);font-size:1.95cqw;letter-spacing:.16em;text-transform:uppercase}
.pp-grid{display:flex;flex-direction:column;gap:6cqw;padding-top:5.7cqw}
.pp-card{position:relative;display:flex;flex-direction:column;gap:1.6cqw;transition:transform .18s}
.pp-card.gone{display:none}
.pp-card.press{transform:scale(.985)}
/* a card clicked before turn 3 has no page to open: it wiggles, as the Verda work cards do */
.pp-card.shake .pp-media,.pp-card.shake .pp-meta,.pp-card.shake .pp-ct,.pp-card.shake .pp-cd{animation:cardShake .52s cubic-bezier(.36,.07,.19,.97)}
.pp-card.shake .pp-ct{color:var(--danger);transition:color .15s}
.pp-media{position:relative;display:block;aspect-ratio:3/2;background:var(--pp-ph);overflow:hidden;margin-bottom:1.6cqw}
.pp-meta{font-size:1.9cqw;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--pp-soft)}
.pp-meta u{text-decoration:none;color:var(--pp-tom)}
.pp-ct{font-family:var(--pp-serif);font-size:4.3cqw;font-weight:500;line-height:1.05;letter-spacing:-.015em}
.pp-cd{font-size:2.6cqw;line-height:1.62;color:var(--pp-soft)}
.pp-more{display:none;margin-top:1.4cqw;font-size:1.95cqw;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--pp-tom)}
.studio.plate-pages .pp-more{display:block}
/* the save pill (turn 4) */
.pp-save{display:none;position:absolute;top:2.6cqw;right:2.6cqw;z-index:2;align-items:center;gap:1.4cqw;padding:1.6cqw 2.6cqw;border:1px solid var(--pp-rule2);border-radius:999px;
  background:rgba(247,243,234,.92);font-size:1.9cqw;font-weight:500;letter-spacing:.16em;text-transform:uppercase;transition:background-color .22s,color .22s,border-color .22s,transform .16s}
.pp-save em{font-style:normal}
.pp-save i{position:relative;width:2cqw;height:2cqw}
.pp-save i::before,.pp-save i::after{content:"";position:absolute;left:0;right:0;top:50%;height:1.5px;background:currentColor;transform:translateY(-50%);transition:transform .25s,opacity .25s}
.pp-save i::after{left:50%;right:auto;top:0;width:1.5px;height:100%;transform:translateX(-50%)}
.studio.plate-plan .pp-save{display:inline-flex}
.pp-save.on{background:var(--pp-tom);border-color:var(--pp-tom);color:#fff}
.pp-save.on i::after{opacity:0}
.pp-save.on i::before{transform:translateY(-50%) rotate(-45deg)}
.pp-save.press{transform:scale(.93)}
.pp-save.big{position:static;padding:2.6cqw 4cqw;font-size:2cqw}
.pp-note{padding:8cqw 5cqw;background:var(--pp-deep);border-top:1px solid var(--pp-rule)}
.pp-note p{margin:0;max-width:24ch;font-family:var(--pp-serif);font-style:italic;font-size:4.5cqw;line-height:1.22}
.pp-note span{display:block;margin-top:3cqw;font-size:1.95cqw;letter-spacing:.18em;text-transform:uppercase;color:var(--pp-soft)}
.pp-foot{display:flex;flex-direction:column;gap:1.4cqw;padding:8cqw 5cqw 6cqw;background:var(--pp-ink);color:var(--pp-paper)}
.pp-foot b{font-family:var(--pp-serif);font-weight:400;font-size:6cqw;line-height:1;letter-spacing:-.025em;padding-bottom:5cqw;margin-bottom:2cqw;border-bottom:1px solid rgba(247,243,234,.22)}
.pp-foot span{font-size:1.9cqw;letter-spacing:.16em;text-transform:uppercase;color:rgba(247,243,234,.68)}
/* page overlays slide in over the preview, like the Verda project page */
.pwork{position:absolute;top:14px;bottom:14px;left:50%;width:calc(100% - 28px);max-width:var(--prev-w);border-radius:14px;
  transform:translateX(-50%) translateY(18px);opacity:0;pointer-events:none;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;
  container-type:inline-size;z-index:4;transition:opacity .45s ease,transform .5s cubic-bezier(.4,.5,.2,1)}
.pwork::-webkit-scrollbar{display:none}
.studio[data-demo="plate"] .pwork{display:block}
.pwork.in{opacity:1;transform:translateX(-50%) translateY(0)}
/* the phone menu: a paper sheet over everything, the way the build draws it */
.pmenu{z-index:6;flex-direction:column;justify-content:center;padding:0 5cqw;transform:translateX(-50%) translateY(-3cqw)}
.studio[data-demo="plate"] .pmenu{display:flex}
.pmenu>span{display:flex;align-items:center;gap:2cqw;padding:2.6cqw 0;border-bottom:1px solid var(--pp-rule);font-family:var(--pp-serif);font-size:7cqw;line-height:1.1;letter-spacing:-.02em;transition:color .18s}
.pmenu>span.press{color:var(--pp-tom)}
.pmenu>i{margin-top:5cqw;font-style:normal;font-size:2cqw;letter-spacing:.18em;text-transform:uppercase;color:var(--pp-soft)}
.pp-count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:4cqw;height:4cqw;padding:0 1cqw;border-radius:999px;background:var(--pp-tom);color:#fff;font-family:var(--pp-sans);font-size:2cqw;font-weight:600}
.pmenu:not(.in){visibility:hidden}
/* recipe page */
.pr-body{padding:2.6cqw 5cqw 5cqw}
.pr-fig{display:block;aspect-ratio:4/3;background:var(--pp-ph);overflow:hidden;margin-bottom:5cqw}
.pr-title{margin:2cqw 0 0;font-family:var(--pp-serif);font-size:7.6cqw;font-weight:500;line-height:.94;letter-spacing:-.03em}
.pr-lede{margin:3cqw 0 0;font-size:2.85cqw;line-height:1.62;color:var(--pp-soft)}
.pr-acts{display:none;align-items:center;gap:4cqw;margin-top:4.5cqw}
.studio.plate-plan .pr-acts{display:flex}
.pr-acts u{text-decoration:none;font-size:2cqw;font-weight:500;letter-spacing:.16em;text-transform:uppercase;padding:2cqw 0;border-bottom:1px solid var(--pp-rule2)}
.pr-facts{display:grid;grid-template-columns:1fr 1fr;gap:3cqw 2cqw;margin:5.5cqw 0 0;padding:3.6cqw 0;border-top:1px solid var(--pp-rule);border-bottom:1px solid var(--pp-rule)}
.pr-facts dt{font-size:1.85cqw;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--pp-soft)}
.pr-facts dd{margin:.8cqw 0 0;font-family:var(--pp-serif);font-size:3cqw;font-weight:500}
.pr-ing{margin-top:5cqw;padding:2.7cqw;background:var(--pp-deep);border:1px solid var(--pp-rule)}
.pr-ihead{display:flex;align-items:center;justify-content:space-between;padding-bottom:2.8cqw;border-bottom:1px solid var(--pp-rule)}
.pr-ihead>b{font-family:var(--pp-serif);font-size:3.8cqw;font-weight:500;letter-spacing:-.02em}
.pr-step{display:inline-flex;align-items:center;border:1px solid var(--pp-rule2);background:var(--pp-paper)}
.pr-step u{text-decoration:none;width:8.2cqw;line-height:8.2cqw;text-align:center;font-size:3cqw;transition:background-color .18s,color .18s}
.pr-step u.press{background:var(--pp-ink);color:var(--pp-paper)}
.pr-step b{min-width:4.5cqw;text-align:center;font-family:var(--pp-serif);font-size:3cqw;font-weight:500}
.pr-ing ul{list-style:none;margin:0;padding:1cqw 0 0}
.pr-ing li{display:flex;align-items:baseline;gap:1.2cqw;padding:1.7cqw 0;border-bottom:1px dashed var(--pp-rule);font-size:2.65cqw;line-height:1.45}
.pr-ing li:last-child{border-bottom:0}
.pr-ing li b{min-width:5.9cqw;font-weight:600;transition:color .3s}
.pr-ing li b.tick{color:var(--pp-tom)}
.pr-ing li i{font-style:normal;font-size:2.35cqw;color:var(--pp-soft)}
.pr-note{display:block;margin-top:2.8cqw;font-size:1.95cqw;letter-spacing:.1em;text-transform:uppercase;color:var(--pp-soft)}
.pr-mh{display:block;margin-top:6cqw;font-family:var(--pp-serif);font-size:3.8cqw;font-weight:500;letter-spacing:-.02em}
.pr-method{list-style:none;counter-reset:st;margin:2.4cqw 0 0;padding:0}
.pr-method li{counter-increment:st;position:relative;padding:0 0 3.4cqw 5.9cqw;margin-bottom:3.4cqw;border-bottom:1px solid var(--pp-rule);font-size:2.8cqw;line-height:1.68;color:var(--pp-soft)}
.pr-method li:last-child{border-bottom:0;margin-bottom:0}
.pr-method li::before{content:counter(st,decimal-leading-zero);position:absolute;left:0;top:.3cqw;font-family:var(--pp-serif);font-size:2.7cqw;font-weight:500;color:var(--pp-tom)}
.pr-back{display:inline-block;margin-top:6cqw;padding:2cqw 0;font-size:2cqw;font-weight:500;letter-spacing:.16em;text-transform:uppercase;border-bottom:1px solid var(--pp-rule2)}
/* shopping list */
.pl-body{padding:2.6cqw 5cqw 7cqw}
.pl-sum{display:block;margin-top:6cqw;font-size:2cqw;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--pp-soft)}
.pl-acts{display:flex;gap:1.6cqw;margin-top:2.8cqw;padding-bottom:2.8cqw;border-bottom:1px solid var(--pp-rule)}
.pl-acts u{flex:1;text-align:center;text-decoration:none;padding:2.4cqw 0;border:1px solid var(--pp-rule2);border-radius:3px;font-size:2cqw;font-weight:500;letter-spacing:.14em;text-transform:uppercase}
.pl-acts u:first-child{display:none}
.pl-acts.has-checked u:first-child{display:block}
.pl-addl{display:block;margin-top:4cqw;font-size:1.85cqw;font-weight:500;letter-spacing:.18em;text-transform:uppercase;color:var(--pp-soft)}
.pl-add{display:block;margin-top:1.6cqw;padding:2.4cqw 2.8cqw;border:1px solid var(--pp-rule2);border-radius:3px;background:#fff;font-size:2.8cqw;color:rgba(37,40,33,.4)}
.pl-addb{display:block;margin-top:1.4cqw;padding:2.4cqw 0;text-align:center;background:#F0F0F0;font-size:2cqw;letter-spacing:.14em;text-transform:uppercase}
.pl-group{margin-top:6cqw;padding-bottom:3cqw;border-bottom:1px solid var(--pp-rule)}
.pl-gh{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:2cqw}
.pl-gh u{text-decoration:none;font-family:var(--pp-serif);font-size:3.2cqw;font-weight:500;border-bottom:1px solid var(--pp-rule2)}
.pl-gh i{font-style:normal;font-size:1.8cqw;letter-spacing:.16em;text-transform:uppercase;color:var(--pp-soft)}
.pl-group ul{list-style:none;margin:0;padding:0}
.pl-group li{display:flex;align-items:center;gap:1.4cqw;min-height:8.6cqw;border-bottom:1px dashed var(--pp-rule);font-size:2.65cqw;overflow:hidden;max-height:14cqw;transition:max-height .35s ease,opacity .3s,min-height .35s}
.pl-group li:last-child{border-bottom:0}
.pl-group li s{width:3.6cqw;height:3.6cqw;flex-shrink:0;margin-right:1.6cqw;border:1px solid var(--pp-rule2);border-radius:2px;background:#fff;transition:background-color .2s,border-color .2s}
.pl-group li b{min-width:5.9cqw;font-weight:600}
.pl-group li i{font-style:normal;font-size:2.4cqw;color:var(--pp-soft)}
.pl-group li em{margin-left:auto;font-style:normal;font-size:1.75cqw;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--pp-soft);text-decoration:underline;text-underline-offset:.8cqw;transition:color .18s}
.pl-group li em.press{color:var(--pp-tom)}
.pl-group li.chk{text-decoration:line-through;color:rgba(37,40,33,.42)}
.pl-group li.chk s{background:var(--pp-tom);border-color:var(--pp-tom)}
.pl-group li.gone{max-height:0;min-height:0;opacity:0;border-bottom-width:0}
.psite,.pwork{-webkit-font-smoothing:antialiased}

/* GET STARTED / gs-card (used by templates.html publish section) */
.gs-card{border:1px solid var(--border);border-radius:var(--r-lg);background:var(--surface-base);padding:1.7rem 1.9rem;margin-top:1.3rem}
.gs-div{border:none;border-top:1px solid var(--border);margin:1.7rem 0}
.subhead{font-family:var(--mono);font-size:11.5px;font-weight:400;text-transform:uppercase;letter-spacing:0.17em;color:var(--text-primary);margin-bottom:13px;max-width:var(--measure)}
.code{border:1px solid var(--border);border-radius:var(--r-md);background:var(--surface-sunken);padding:14px 16px;font-family:var(--mono);font-size:12.5px;line-height:1.95;overflow-x:auto;max-width:var(--measure)}
.code>div{white-space:nowrap}
.code .p{color:var(--accent-quiet)}.code .u{color:#7cb87c}.code .b{color:#8aa9dd}.code .c{color:var(--text-tertiary)}
.note{font-size:14px;color:var(--text-secondary);line-height:1.62;max-width:var(--measure);margin-top:1rem}
.note a{color:var(--accent-quiet);text-decoration:none;font-weight:500}.note a:hover{text-decoration:underline}
.note strong{color:var(--text-primary);font-weight:400}
/* Sits directly under a .subhead, so no top margin of its own; the pills below supply the
   gap. States what each group actually costs you, which the labels alone could not. */
.sublede{font-size:14px;color:var(--text-secondary);line-height:1.62;max-width:var(--measure);margin:0}
.allow{display:flex;flex-wrap:wrap;gap:9px;margin-top:1.2rem;max-width:var(--measure)}
.allow span{display:inline-flex;align-items:center;gap:6px;background:var(--surface-raised);border:1px solid var(--border-strong);border-radius:var(--r-md);padding:8px 13px;color:var(--text-secondary);font-family:var(--mono);font-size:13px}
.allow span b{color:var(--text-primary);font-weight:400}
.allow span svg{width:14px;height:14px;flex-shrink:0}
.allow span svg.wide{width:40px;height:15px}
.dl{display:flex;gap:1rem;flex-wrap:wrap}
.dl a{display:inline-flex;align-items:center;gap:8px;font-family:var(--mono);font-size:13.5px;color:var(--text-primary);text-decoration:none;border:1px solid var(--border-strong);border-radius:var(--r-md);padding:9px 15px;background:var(--surface-raised);transition:border-color .18s,color .18s,transform .15s}
.dl a:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px)}
.dl a svg{width:16px;height:16px}

/* START-HERE PATHS */
/* getting-started: sticky path index + full-width blocks */
.path-nav{display:flex;flex-direction:column;margin-top:1.5rem;padding-top:1.1rem;border-top:1px solid var(--border)}
/* The active marker is built like the nav's underline rather than as a border: a 1px accent
   rule that grows along its own axis (there, right 100%->0; here, bottom 100%->0), so the
   indicator travels between items instead of blinking on. Padding is 14px to hold the text
   where the old 2px border + 12px padding put it, since the rule is now out of flow. */
.path-nav a{position:relative;display:flex;gap:9px;align-items:baseline;padding:8px 0 8px 14px;font-size:13.5px;line-height:1.4;color:var(--text-tertiary);text-decoration:none;transition:color .2s}
.path-nav a::before{content:"";position:absolute;left:0;top:0;bottom:100%;width:1px;background:var(--accent);transition:bottom .25s}
.path-nav a:hover{color:var(--text-secondary)}
.path-nav a.on{color:var(--text-primary)}
.path-nav a.on::before{bottom:0}
/* Each path is content plus its own action band. The action is sticky inside its own
   block, so it rides down while you are reading that path and comes to rest at the
   block's end as the next one starts travelling. The divider spans both columns.
   No JS: a sticky element is already bounded by its own grid area. */
#start .pblock{display:grid;grid-template-columns:minmax(0,1fr) var(--rcol);column-gap:var(--gap)}
#start .pblock>*{grid-column:1}
/* span, not 1/-1: these rows are implicit, and -1 resolves against EXPLICIT lines only,
   so 1/-1 collapsed the cell to one row and left sticky no room to travel. */
/* Row 2, not row 1: the h3 is every block's first child, so starting the action cell on
   the following row drops the button just below the title rather than level with it. */
.pblock .pb-tag{font-family:var(--mono);font-size:12px;color:var(--accent-quiet);margin:-.2rem 0 .7rem}
#start .pblock .pacts{grid-column:2;grid-row:2/span 50;display:block;margin-top:0;align-self:stretch}
#start .pblock .pacts .btn{position:sticky;top:84px;width:100%;justify-content:center}
@media(max-width:860px){ #start .pblock{display:block}
  #start .pblock .pacts{display:flex;margin-top:1.2rem}
  #start .pblock .pacts .btn{position:static;width:auto} }
.pblock{padding:2.4rem 0;border-top:1px solid var(--border);scroll-margin-top:104px;max-width:var(--measure)}
/* the divider now runs across content + action, so the bands read as one row */
#start .pblock{max-width:none}
#start .pblock>p,#start .pblock .note,#start .pblock .code,#start .pblock .allow{max-width:var(--measure)}
.pblock:first-child{padding-top:0;border-top:0}
.pblock:last-child{padding-bottom:0}
.pblock h3{font-size:1.35rem;font-weight:400;letter-spacing:-0.015em;margin-bottom:.55rem}
.pblock>p{font-size:14.5px;color:var(--text-secondary);line-height:1.65;max-width:var(--measure)}
.pblock>p+p{margin-top:.75rem}
.pblock .code{margin-top:1.2rem}
.pblock .note{margin-top:1rem}
.pblock .pacts{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:1.2rem}
@media(max-width:860px){ .path-nav{display:none} .pblock{padding:1.9rem 0} }

/* CARDS */
/* --measure bounds TEXT. Card/gallery content deliberately uses the full column so the
   right-hand space is spent on content instead of sitting empty. */
/* Fixed two columns, not auto-fit: with Templates unlisted the lone Documentation card
   should still occupy one column rather than stretching across the row. */
.cards{display:grid;grid-template-columns:1fr 1fr;gap:14px}
/* The card is a container, not a control: the button inside is the thing you click, so the
   card itself no longer lifts or stretches a link across its whole area. */
.card{position:relative;border:1px solid var(--border);border-radius:var(--r-lg);background:var(--surface-base);padding:1.6rem 1.7rem;display:flex;flex-direction:column;align-items:flex-start}
.card h3{font-size:1.3rem;font-weight:400;letter-spacing:-0.01em;margin-bottom:0.55rem}
.card p{font-size:14px;color:var(--text-secondary);line-height:1.58;margin-bottom:1.25rem}
/* the card already lifts on hover, so the whole card must be the hit target, not just
   this link. Heading/body sit above the overlay so text stays selectable. */
@media(max-width:640px){ .cards{grid-template-columns:1fr} }

/* FOOTER */
footer{margin-top:5rem;padding:2.2rem 0;border-top:1px solid var(--border)}
/* legal pages: prose-only rows, same rhythm as the rest of the site */
.legal .ed-main p+p{margin-top:1rem}
.legal .ed-main .note{max-width:var(--measure)}
.legal .ed-main a{color:var(--accent-quiet);text-decoration:underline;text-underline-offset:2px}
.legal .ed-main a:hover{color:var(--text-primary)}
.legal code{font-family:var(--mono);font-size:.9em;background:var(--surface-sunken);border:1px solid var(--border);border-radius:var(--r-sm);padding:1px 5px}
.nw{white-space:nowrap}
.wrap-wide{width:100%;max-width:var(--wide);margin:0 auto;padding:0 clamp(1.25rem,5vw,1.75rem)}
.foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem}
.foot .bw{display:flex;align-items:center;gap:9px;font-family:var(--mono);font-size:12.5px;color:var(--text-secondary)}
.foot .bw .logo{width:20px;height:20px}
.foot .fl{display:flex;gap:1.3rem;flex-wrap:wrap;align-items:center}
.foot .fl a{font-size:13px;color:var(--text-secondary);text-decoration:none;transition:color .18s}
.foot .fl a:hover{color:var(--text-primary)}

/* reveal */
@media (prefers-reduced-motion: no-preference){
  .reveal{opacity:0;transform:translateY(14px);animation:rise .7s cubic-bezier(.2,.7,.2,1) forwards}
  .d1{animation-delay:.05s}.d2{animation-delay:.16s}.d3{animation-delay:.28s}.d4{animation-delay:.42s}
  @keyframes rise{to{opacity:1;transform:none}}
  html.sr-on .sr{opacity:0;transform:translateY(22px);transition:opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1)}
  html.sr-on .sr.vis{opacity:1;transform:none}
}

/* ============================================================
   Shared blocks used by other pages (templates.html)
   ============================================================ */
code{font-family:var(--mono);font-size:0.88em;background:var(--surface-sunken);border:1px solid var(--border);border-radius:var(--r-sm);padding:1px 5px;color:var(--text-primary)}
.steps{list-style:none;counter-reset:s;display:flex;flex-direction:column;gap:13px;margin:1.15rem 0 0}
.steps li{counter-increment:s;position:relative;padding-left:36px;font-size:14.5px;color:var(--text-secondary);line-height:1.55}
/* The marker takes the same pair as .btn-line: paper on dark, near-black on light -- the
   numeral is punched out in the canvas colour rather than a literal white. */
.steps li::before{content:counter(s);position:absolute;left:0;top:0;width:23px;height:23px;border-radius:var(--r-pill);background:var(--text-primary);color:var(--surface-canvas);font-family:var(--mono);font-size:12px;font-weight:400;display:flex;align-items:center;justify-content:center}
.steps strong{color:var(--text-primary);font-weight:400}
.tpl-status{font-size:14px;color:var(--text-secondary);font-family:var(--mono);margin:1.4rem 0}
/* Toolbar mirroring OSWS's project/template manager (components/project-manager):
   a flexible search field on the left, then pill controls on the right, each carrying an
   icon and its current value. Labels live inside the controls rather than above them,
   which is why the selects need an aria-label. */
.tpl-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:1.6rem}
.tpl-input{position:relative;display:flex;align-items:center;flex:1 1 260px;min-width:0}
.tpl-input svg{position:absolute;left:12px;width:16px;height:16px;color:var(--text-tertiary);pointer-events:none}
.tpl-input input{width:100%;font:inherit;font-size:13.5px;color:var(--text-primary);background:var(--surface-base);
  border:1px solid var(--border);border-radius:var(--r-md);padding:9px 12px 9px 36px}
.tpl-input input::placeholder{color:var(--text-tertiary)}
/* Pill control wrapping a native select: the icon and chevron are ours, the menu is the
   platform's -- which keeps keyboard and mobile behaviour without a popover to maintain. */
.tpl-ctl{position:relative;display:inline-flex;align-items:center;gap:7px;flex-shrink:0;
  background:var(--surface-base);border:1px solid var(--border);border-radius:var(--r-pill);
  padding:0 11px 0 13px;height:38px;color:var(--text-secondary);transition:border-color .18s,color .18s}
.tpl-ctl:hover{border-color:var(--border-strong);color:var(--text-primary)}
.tpl-ctl>svg{width:15px;height:15px;flex-shrink:0;pointer-events:none}
.tpl-ctl .chev{width:14px;height:14px;color:var(--text-tertiary)}
/* The select covers the whole pill and is transparent: the visible text is the span
   beneath it, so the control can show an icon the native widget has no room for. */
.tpl-ctl select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;
  font:inherit;border:none;-webkit-appearance:none;appearance:none}
.tpl-ctl .val{font-size:13px;font-weight:500;color:var(--text-primary);white-space:nowrap}
.tpl-ctl:focus-within{outline:2px solid var(--accent-ring);outline-offset:1px;border-color:var(--accent)}
.tpl-input input:focus-visible{outline:2px solid var(--accent-ring);outline-offset:1px;border-color:var(--accent)}
.tpl-clear{font-size:13px;font-weight:500;color:var(--text-secondary);background:none;height:38px;
  border:1px solid var(--border);border-radius:var(--r-pill);padding:0 15px;cursor:pointer;
  flex-shrink:0;transition:color .18s,border-color .18s}
.tpl-clear:hover{color:var(--text-primary);border-color:var(--border-strong)}
/* Card stats + the backend-code flag. The flag is the only place a warning-ish colour is
   earned on this page: it marks a package that ships executable functions. */
.tpl-stats{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-family:var(--mono);font-size:11.5px;color:var(--text-tertiary)}
.tpl-flag{font-family:var(--mono);font-size:10.5px;font-weight:400;letter-spacing:0.04em;padding:3px 8px;border-radius:var(--r-sm);
  background:oklch(95.4% 0.038 75.164);color:oklch(55.3% 0.195 38.402);border:1px solid oklch(90.1% 0.076 70.697)}
html[data-theme="dark"] .tpl-flag{background:oklch(26.6% 0.079 36.259);color:oklch(75% 0.183 55.934);border-color:oklch(47% 0.157 37.304)}
.tpl-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
/* Now the card's only action, so it takes the button treatment the download used to have. */
.tpl-inspect{align-self:flex-start;font-size:13.5px;padding:9px 16px;cursor:pointer}

/* Inspect dialog */
.tpl-modal{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:20px}
.tpl-modal[hidden]{display:none}
.tpl-modal-backdrop{position:absolute;inset:0;background:oklch(0 0 0 / 0.55);backdrop-filter:blur(2px)}
.tpl-modal-panel{position:relative;display:flex;flex-direction:column;width:min(560px,100%);max-height:min(72vh,640px);
  background:var(--surface-base);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-md);overflow:hidden}
.tpl-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:1.2rem 1.4rem 1rem;border-bottom:1px solid var(--border)}
.tpl-modal-head h3{font-size:1.05rem;font-weight:400;color:var(--text-primary);letter-spacing:-0.01em;word-break:break-word}
.tpl-modal-sub{margin-top:4px;font-family:var(--mono);font-size:11.5px;color:var(--text-tertiary)}
.tpl-modal-acts{display:flex;align-items:center;gap:10px;flex-shrink:0}
.tpl-modal-dl{font-size:13px;padding:7px 14px}
.tpl-modal-dl svg{width:13px;height:13px}
.tpl-modal-x{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;
  border:1px solid var(--border);border-radius:var(--r-pill);background:none;color:var(--text-secondary);cursor:pointer;transition:color .18s,border-color .18s}
.tpl-modal-x:hover{color:var(--text-primary);border-color:var(--border-strong)}
.tpl-modal-x svg{width:14px;height:14px}
.tpl-modal-body{overflow-y:auto;padding:1.1rem 1.4rem 1.4rem}
/* Detail view. The dialog carries everything the feed knows, so the file tree is one
   section of it rather than the whole thing. */
.tpl-modal-head h3{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.tpl-d-thumb{aspect-ratio:16/9;margin-bottom:1rem;border-radius:var(--r-md);overflow:hidden;
  background:var(--surface-raised);border:1px solid var(--border)}
.tpl-d-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tpl-d-desc{font-size:14px;color:var(--text-secondary);line-height:1.6;margin-bottom:0.9rem}
.tpl-modal-body .tpl-tags{margin-bottom:1rem}
.tpl-d-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:12px;margin:0 0 1.1rem;
  padding:0.9rem 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.tpl-d-meta dt{font-family:var(--mono);font-size:10.5px;font-weight:400;text-transform:uppercase;
  letter-spacing:0.13em;color:var(--text-tertiary);margin-bottom:3px}
.tpl-d-meta dd{margin:0;font-size:13.5px;color:var(--text-primary)}
.tpl-d-warn{font-size:13px;line-height:1.55;color:oklch(55.3% 0.195 38.402);background:oklch(95.4% 0.038 75.164);
  border:1px solid oklch(90.1% 0.076 70.697);border-radius:var(--r-md);padding:9px 12px;margin-bottom:1.1rem}
html[data-theme="dark"] .tpl-d-warn{color:oklch(75% 0.183 55.934);background:oklch(26.6% 0.079 36.259);border-color:oklch(47% 0.157 37.304)}
.tpl-d-h{font-family:var(--mono);font-size:10.5px;font-weight:400;text-transform:uppercase;letter-spacing:0.13em;
  color:var(--text-tertiary);margin-bottom:0.7rem}
.tpl-modal-note{font-size:13px;color:var(--text-tertiary)}
.tpl-tree-group+.tpl-tree-group{margin-top:1.1rem}
.tpl-tree-dir{display:flex;align-items:center;gap:7px;font-family:var(--mono);font-size:11.5px;color:var(--text-secondary);margin-bottom:6px}
.tpl-tree-dir svg{width:13px;height:13px;color:var(--text-tertiary)}
.tpl-tree{list-style:none;margin:0;padding:0 0 0 6px;border-left:1px solid var(--border)}
.tpl-tree li{display:flex;align-items:center;gap:7px;padding:3px 0 3px 10px;font-family:var(--mono);font-size:12px;color:var(--text-secondary)}
.tpl-tree li svg{width:12px;height:12px;color:var(--text-tertiary);flex-shrink:0}
.tpl-tree-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tpl-tree-size{margin-left:auto;color:var(--text-tertiary);font-size:11px;flex-shrink:0}
.tpl-count{font-family:var(--mono);font-size:11.5px;color:var(--text-tertiary);margin-top:1rem}
.tpl-count:empty{display:none}
.tpl-more{display:flex;justify-content:center;margin-top:1.4rem}
.tpl-more button[hidden]{display:none}
.tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin-top:1.6rem}
/* No hover lift, matching .card on the homepage: only the button inside is clickable, so
   a whole-card hover state would promise a click target that isn't there. */
.tpl-card{display:flex;flex-direction:column;gap:12px;border:1px solid var(--border);border-radius:var(--r-lg);background:var(--surface-base);padding:1.6rem 1.7rem}
/* 16:9 to match the studio's capture (640x360), so a published thumbnail lands without
   cropping. The box is reserved whether or not an image arrives, so cards in a row keep
   the same height and the grid does not reflow as thumbnails load. */
.tpl-thumb{aspect-ratio:16/9;margin:-1.6rem -1.7rem 0;border-radius:var(--r-lg) var(--r-lg) 0 0;overflow:hidden;
  background:var(--surface-raised);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:center}
.tpl-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tpl-thumb-fb{font-size:2.4rem;font-weight:400;letter-spacing:-0.02em;color:var(--text-tertiary);opacity:.55}
.tpl-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.tpl-head h3{font-size:1.15rem;font-weight:400;color:var(--text-primary);letter-spacing:-0.01em;line-height:1.25;min-width:0;word-break:break-word}
/* Runtime badges use OSW Studio's own colour coding, so a Handlebars template looks the
   same here as it does in the project manager. Values are Tailwind's palette, at the exact
   steps lib/runtimes/registry.ts BADGE_CLASSES picks: bg-100/text-700/border-200 in light,
   bg-950/text-400/border-800 in dark. Radius is --r-md because ui/badge.tsx is rounded-md,
   not rounded-full -- only buttons are pills. */
.tpl-badge{flex-shrink:0;font-family:var(--mono);font-size:11px;font-weight:400;border-radius:var(--r-md);
  padding:4px 10px;white-space:nowrap;background:var(--rt-bg,var(--surface-raised));
  color:var(--rt-fg,var(--text-secondary));border:1px solid var(--rt-bd,var(--border-strong))}
.tpl-badge[data-rt="static"]     {--rt-bg:oklch(96.7% 0.003 264.542);--rt-fg:oklch(37.3% 0.034 259.733);--rt-bd:oklch(92.8% 0.006 264.531)}
.tpl-badge[data-rt="handlebars"] {--rt-bg:oklch(96.2% 0.059 95.617);--rt-fg:oklch(55.5% 0.163 48.998);--rt-bd:oklch(92.4% 0.12 95.746)}
.tpl-badge[data-rt="react"]      {--rt-bg:oklch(95.1% 0.026 236.824);--rt-fg:oklch(50% 0.134 242.749);--rt-bd:oklch(90.1% 0.058 230.902)}
.tpl-badge[data-rt="preact"]     {--rt-bg:oklch(94.6% 0.033 307.174);--rt-fg:oklch(49.6% 0.265 301.924);--rt-bd:oklch(90.2% 0.063 306.703)}
.tpl-badge[data-rt="svelte"]     {--rt-bg:oklch(95.4% 0.038 75.164);--rt-fg:oklch(55.3% 0.195 38.402);--rt-bd:oklch(90.1% 0.076 70.697)}
.tpl-badge[data-rt="vue"]        {--rt-bg:oklch(96.2% 0.044 156.743);--rt-fg:oklch(52.7% 0.154 150.069);--rt-bd:oklch(92.5% 0.084 155.995)}
.tpl-badge[data-rt="python"]     {--rt-bg:oklch(97.3% 0.071 103.193);--rt-fg:oklch(55.4% 0.135 66.442);--rt-bd:oklch(94.5% 0.129 101.54)}
.tpl-badge[data-rt="lua"]        {--rt-bg:oklch(93.2% 0.032 255.585);--rt-fg:oklch(48.8% 0.243 264.376);--rt-bd:oklch(88.2% 0.059 254.128)}
html[data-theme="dark"] .tpl-badge[data-rt="static"]     {--rt-bg:oklch(13% 0.028 261.692);--rt-fg:oklch(70.7% 0.022 261.325);--rt-bd:oklch(27.8% 0.033 256.848)}
html[data-theme="dark"] .tpl-badge[data-rt="handlebars"] {--rt-bg:oklch(27.9% 0.077 45.635);--rt-fg:oklch(82.8% 0.189 84.429);--rt-bd:oklch(47.3% 0.137 46.201)}
html[data-theme="dark"] .tpl-badge[data-rt="react"]      {--rt-bg:oklch(29.3% 0.066 243.157);--rt-fg:oklch(74.6% 0.16 232.661);--rt-bd:oklch(44.3% 0.11 240.79)}
html[data-theme="dark"] .tpl-badge[data-rt="preact"]     {--rt-bg:oklch(29.1% 0.149 302.717);--rt-fg:oklch(71.4% 0.203 305.504);--rt-bd:oklch(43.8% 0.218 303.724)}
html[data-theme="dark"] .tpl-badge[data-rt="svelte"]     {--rt-bg:oklch(26.6% 0.079 36.259);--rt-fg:oklch(75% 0.183 55.934);--rt-bd:oklch(47% 0.157 37.304)}
html[data-theme="dark"] .tpl-badge[data-rt="vue"]        {--rt-bg:oklch(26.6% 0.065 152.934);--rt-fg:oklch(79.2% 0.209 151.711);--rt-bd:oklch(44.8% 0.119 151.328)}
html[data-theme="dark"] .tpl-badge[data-rt="python"]     {--rt-bg:oklch(28.6% 0.066 53.813);--rt-fg:oklch(85.2% 0.199 91.936);--rt-bd:oklch(47.6% 0.114 61.907)}
html[data-theme="dark"] .tpl-badge[data-rt="lua"]        {--rt-bg:oklch(28.2% 0.091 267.935);--rt-fg:oklch(70.7% 0.165 254.624);--rt-bd:oklch(42.4% 0.199 265.638)}
.tpl-desc{font-size:14px;color:var(--text-secondary);line-height:1.58;flex:1}
.tpl-tags{display:flex;flex-wrap:wrap;gap:6px}
.tpl-tag{font-family:var(--mono);font-size:11px;color:var(--text-tertiary);border:1px solid var(--border);border-radius:var(--r-sm);padding:3px 8px}
.tpl-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-family:var(--mono);font-size:11.5px;color:var(--text-tertiary)}
.tpl-ver{color:var(--text-secondary)}
.tpl-author{color:var(--text-tertiary)}
.tpl-license{color:var(--text-tertiary);margin-left:auto}
.tpl-dl{align-self:flex-start;margin-top:2px;font-size:13.5px;padding:9px 16px}

/* ===================== DOCS ===================== */
/* Generated pages (build-docs.mjs). Three columns on wide screens: contents list, prose,
   on-page anchors. The prose column is capped at the same measure the rest of the site uses,
   so a long doc reads at the same line length as an editorial row. */
.docs{max-width:var(--wide);margin:0 auto;padding:0 clamp(1.25rem,5vw,1.75rem) 5rem;position:relative;z-index:1}
.docs-grid{display:grid;grid-template-columns:210px minmax(0,1fr) 190px;gap:clamp(1.75rem,4vw,3.25rem);padding-top:clamp(5.5rem,12vh,7.5rem)}

.dnav{position:sticky;top:88px;align-self:start;max-height:calc(100vh - 120px);overflow-y:auto;display:flex;flex-direction:column;gap:2px}
.dnav-t{font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:.16em;color:var(--text-primary);margin-bottom:.9rem}
.dnav-t a{color:inherit;text-decoration:none}
.dnav-group{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.14em;color:var(--text-tertiary);margin:1.15rem 0 .45rem}
.dnav>a{font-size:13.5px;color:var(--text-secondary);text-decoration:none;padding:5px 10px;margin-left:-10px;border-radius:var(--r-sm);transition:color .15s,background-color .15s}
.dnav>a:hover{color:var(--text-primary);background:color-mix(in srgb,var(--text-primary) 6%,transparent)}
.dnav>a.on{color:var(--text-primary);background:color-mix(in srgb,var(--accent) 13%,transparent)}

.dtoc{position:sticky;top:88px;align-self:start;max-height:calc(100vh - 120px);overflow-y:auto;display:flex;flex-direction:column;gap:1px}
.dtoc-t{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.14em;color:var(--text-tertiary);margin-bottom:.6rem}
.dtoc a{font-size:12.5px;color:var(--text-secondary);text-decoration:none;line-height:1.45;padding:4px 0;border-left:1px solid var(--border);padding-left:11px;transition:color .15s,border-color .15s}
.dtoc a:hover{color:var(--text-primary);border-left-color:var(--accent)}

/* Prose. Markdown emits bare tags, so these are element selectors scoped to the article. */
.dbody{min-width:0;font-size:15px;color:var(--text-secondary);line-height:1.72}
.dbody>h1:first-child{margin-top:0}
.dbody h1{font-size:clamp(1.9rem,3.4vw,2.5rem);font-weight:400;letter-spacing:-0.02em;color:var(--text-primary);line-height:1.12;margin:0 0 1.4rem}
.dbody h2{font-size:1.45rem;font-weight:400;letter-spacing:-0.015em;color:var(--text-primary);margin:2.9rem 0 .9rem;padding-top:1.6rem;border-top:1px solid var(--border);scroll-margin-top:88px}
.dbody h3{font-size:1.12rem;font-weight:400;letter-spacing:-0.01em;color:var(--text-primary);margin:2rem 0 .7rem;scroll-margin-top:88px}
.dbody h4{font-size:.95rem;font-weight:400;color:var(--text-primary);margin:1.5rem 0 .55rem}
.dbody p{margin:0 0 1.1rem;max-width:var(--measure)}
.dbody a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 35%,transparent)}
.dbody a:hover{border-bottom-color:var(--accent)}
.dbody strong{color:var(--text-primary);font-weight:400}
.dbody em{font-style:italic}
.dbody ul,.dbody ol{margin:0 0 1.2rem;padding-left:1.35rem;max-width:var(--measure)}
.dbody li{margin-bottom:.5rem}
.dbody li>ul,.dbody li>ol{margin:.5rem 0 0}
/* The docs put a --- before most headings, and h2 already draws its own rule, so the two
   stack into a double line with a gap between them. The heading keeps its rule; the
   redundant one collapses. */
.dbody hr{border:0;border-top:1px solid var(--border);margin:2.4rem 0}
.dbody hr+h2{border-top:0;padding-top:0;margin-top:2.4rem}
.dbody hr+h3{margin-top:1.6rem}
.dbody blockquote{margin:0 0 1.2rem;padding:.15rem 0 .15rem 1.1rem;border-left:2px solid var(--border-strong);color:var(--text-tertiary);max-width:var(--measure)}
.dbody blockquote p:last-child{margin-bottom:0}

.dbody code{font-family:var(--mono);font-size:.86em;background:var(--surface-sunken);border:1px solid var(--border);border-radius:var(--r-sm);padding:1px 5px;color:var(--text-primary)}
.dbody pre{background:var(--surface-sunken);border:1px solid var(--border);border-radius:var(--r-md);padding:14px 16px;overflow-x:auto;margin:0 0 1.3rem;line-height:1.7}
.dbody pre code{background:none;border:0;padding:0;font-size:12.5px;color:var(--text-secondary);white-space:pre}

/* Tables are common in these docs and are the thing most likely to overflow, so each one
   scrolls inside its own box rather than widening the page. */
.dbody table{width:100%;border-collapse:collapse;margin:0 0 1.4rem;font-size:13.5px;display:block;overflow-x:auto}
.dbody th,.dbody td{border:1px solid var(--border);padding:8px 12px;text-align:left;vertical-align:top}
.dbody th{color:var(--text-primary);font-weight:400;background:var(--surface-sunken);white-space:nowrap}

.dnote{font-size:13.5px;color:var(--text-tertiary);background:var(--surface-sunken);border:1px solid var(--border);border-radius:var(--r-md);padding:11px 14px;margin:0 0 1.8rem;max-width:var(--measure)}

/* Docs page actions (copy page / view as Markdown) */
.dact{float:right;position:relative;display:flex;margin:.35rem 0 .8rem 1.2rem}
.dact>button{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 11px;font:inherit;font-size:13px;color:var(--text-primary);background:var(--surface-base);border:1px solid var(--border);cursor:pointer;transition:background-color .15s,border-color .15s}
.dact>button:hover{background:var(--surface-raised);border-color:var(--border-strong)}
.dact>button:focus-visible{outline:2px solid var(--accent);outline-offset:1px;z-index:1}
.dact svg{width:14px;height:14px;flex-shrink:0}
.dact-copy{border-radius:var(--r-sm) 0 0 var(--r-sm)}
.dact-more{border-radius:0 var(--r-sm) var(--r-sm) 0;margin-left:-1px;padding:0 8px!important}
.dact-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:20;width:290px;max-width:calc(100vw - 2.5rem);padding:5px;background:var(--surface-overlay);border:1px solid var(--border);border-radius:var(--r-md);box-shadow:var(--shadow-md)}
.dact-menu>*{display:flex;align-items:flex-start;gap:11px;width:100%;padding:8px 9px;font:inherit;text-align:left;color:var(--text-primary);background:none;border:0!important;border-radius:var(--r-sm);text-decoration:none;cursor:pointer;line-height:1.35}
.dact-menu>*:hover,.dact-menu>*:focus-visible{background:var(--surface-raised);outline:none}
.dbody .dact-menu a{color:var(--text-primary)}
.dact-menu svg{margin-top:3px;color:var(--text-tertiary)}
.dact-menu b{display:block;font-weight:500;font-size:13.5px}
.dact-menu small{display:block;font-size:12px;color:var(--text-tertiary)}


@media(max-width:1100px){
  .docs-grid{grid-template-columns:190px minmax(0,1fr)}
  .dtoc{display:none}
}
@media(max-width:860px){
  .docs-grid{grid-template-columns:1fr;gap:1.5rem;padding-top:calc(56px + 1.5rem)}
  /* The sidebar becomes a scrollable strip above the document rather than a sticky rail. */
  .dnav{position:static;max-height:none;flex-direction:row;flex-wrap:wrap;gap:6px;padding-bottom:1.3rem;border-bottom:1px solid var(--border)}
  .dnav-t{width:100%;margin-bottom:.35rem}
  .dnav-group{display:none}
  .dact-copy span{display:none}
  .dnav>a{margin-left:0;border:1px solid var(--border);font-size:12.5px;padding:5px 11px;border-radius:var(--r-pill)}
}
