/* BoardKeep home page: Option B, "Product canvas" (Soma, 15 Oct). Studio's Moodboard tab first, with the
   words on a card laid over its corner; then the page in sections, "On this page" beside them on a wide
   screen and a row of chips on a phone. Paper white, one ink, one green for the action; Studio's own red
   only inside the drawing of Studio. Desktop is the 1280 design, phone the 390 one; between them the
   sections' own width decides their layout (container queries). */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #fbf9f8;      /* the page */
  --ground: #ebe5e3;     /* the closing band */
  --card: #f3eeec;       /* Studio's canvas, the drawings, the icon tiles */
  --line: #e1dad7;
  --line-ui: #ddd6d2;    /* chips, dots, quiet edges */
  --ink: #2b2622;
  --text-2: #5a524e;     /* second-level text */
  --muted: #6a615d;
  --accent: #0f7d45;
  --accent-strong: #0b6538;
  --red: #e11d48;        /* Studio's own red */

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --pad: 40px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { font-weight: 500; }
h1, h2 { text-wrap: pretty; }
p, li { text-wrap: pretty; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: var(--ink); }
a:hover { color: var(--accent-strong); }
svg { display: block; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }

/* buttons: square, like the extension's own --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  border: 0; border-radius: 0; cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--ease-out);
}
.btn:hover { background: var(--accent-strong); color: #fff; }
.btn:active { transform: scale(0.97); }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { background: var(--accent); }
.btn[aria-disabled="true"]:active { transform: none; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn--xl { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--ghost:hover { background: transparent; color: var(--accent-strong); border-color: var(--accent-strong); }

/* the header ------------------------------------------------------------------------------------------ */
.head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.head-nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.head-link { text-decoration: none; font-size: 15px; font-weight: 500; }

/* the hero: Studio, drawn, and the card over its corner ------------------------------------------------ */
.hero { padding: 8px 0 72px; }
.hero-wrap { display: flex; flex-direction: column; }

/* The slideshow (Soma, 15 Oct: "like in Netflix … these dots and it automatically changes from one movie to
   another"): Studio first, then a muted stretch of each film, in one frame shaped like the films. The slides
   share one grid cell, so they're as tall as Studio needs where that's more than the films' 16:9; a film
   then sits on its own paper colour. */
.show {
  position: relative; overflow: clip;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(43, 38, 34, 0.1);
  transition: background-color 700ms var(--ease-out);
}
.slides { display: grid; aspect-ratio: 16 / 9; }
.slide { grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; min-width: 0; }
.slide:not(.is-on) { opacity: 0; visibility: hidden; transition: opacity 700ms var(--ease-out), visibility 0s linear 700ms; }
.slide.is-on { opacity: 1; visibility: visible; transition: opacity 700ms var(--ease-out), visibility 0s; }
.slide--promo, .show[data-on="promo"] { background: #eaded1; } /* on a phone the dots' strip takes the slide's paper too */
.slide--days, .show[data-on="days"] { background: #fef7f4; }
.slide--walk, .show[data-on="walk"] { background: #f6f5f1; }
.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.canvas { flex: 1; display: flex; flex-direction: column; background: var(--card); }

/* "Watch with sound": big, in the middle of each film (Soma: "the placement is not very prominent") */
.slide-watch {
  position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 14px; min-height: 68px; padding: 0 30px 0 11px;
  border: 0; border-radius: 999px; background: var(--accent); color: #fff; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 19px; white-space: nowrap;
  box-shadow: 0 14px 36px rgba(15, 125, 69, 0.35), 0 2px 6px rgba(43, 38, 34, 0.12);
  transition: transform 160ms var(--ease-out), background-color 180ms ease;
}
.slide-watch .play-dot { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--accent); }
.slide-watch .play-dot svg { width: 20px; height: 20px; margin-left: 2px; }
.slide-watch .len { margin-left: 2px; font-weight: 400; opacity: 0.85; }
.slide-watch:hover { background: var(--accent-strong); transform: translate(-50%, -50%) scale(1.04); }
.slide-watch:active { transform: translate(-50%, -50%) scale(0.97); }
.slide-watch:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.slide.is-on .slide-watch { animation: watch-in 600ms var(--ease-out) 250ms backwards; }
@keyframes watch-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); } }

/* the dots: bottom right, clear of the card */
.show-bar {
  position: absolute; right: 18px; bottom: 18px; z-index: 2;
  display: flex; align-items: center; gap: 4px; padding: 5px;
  border-radius: 999px; background: rgba(251, 249, 248, 0.9);
  box-shadow: 0 8px 24px rgba(43, 38, 34, 0.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.dots { display: flex; align-items: center; padding: 0 4px; }
.dot { display: grid; place-items: center; width: 22px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; transition: width 300ms var(--ease-out); }
.dot i { position: relative; display: block; width: 8px; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(43, 38, 34, 0.3); transition: width 300ms var(--ease-out), background-color 200ms ease; }
.dot:hover i { background: rgba(43, 38, 34, 0.5); }
.dot[aria-current="true"] { width: 42px; }
.dot[aria-current="true"] i { width: 32px; background: rgba(43, 38, 34, 0.16); }
/* the one showing fills as it plays */
.dot[aria-current="true"] i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left center; transform: scaleX(var(--p, 0)); }
.show-pause { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; transition: background-color 180ms ease; }
.show-pause:hover { background: rgba(43, 38, 34, 0.08); }
.show-pause svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.show-pause .i-pause { fill: none; }
.show-pause .i-play { fill: currentColor; display: none; }
.show.is-paused .show-pause .i-pause { display: none; }
.show.is-paused .show-pause .i-play { display: block; }
.show.is-still .show-pause { display: none; } /* nothing moves by itself, so nothing to pause */
.cv-tabs { display: flex; flex-wrap: wrap; gap: 26px; padding: 14px 22px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.cv-tabs span { padding-bottom: 10px; }
.cv-tabs .is-on { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--ink); margin-bottom: -1px; }
.cv-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 22px; font-size: 11px; font-weight: 600; }
.cv-gap { flex: 1; }
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 13px;
  background: #fff; border: 1px solid var(--line-ui); color: var(--ink); white-space: nowrap;
}
.chip--red { background: var(--red); border-color: var(--red); color: #fff; }
.chip--quiet { color: var(--text-2); }
.chip--sm { height: 24px; padding: 0 10px; border-radius: 12px; }
.chip--sm.is-on { background: var(--card); border-color: var(--card); font-weight: 600; }
.cv-body { flex: 1; display: flex; gap: 16px; min-height: 0; padding: 4px 22px 22px; }
.cv-board {
  flex: 1; min-width: 0; container-type: inline-size;
  display: flex; flex-direction: column; gap: 16px;
  padding: 18px; background: #fff; border-radius: 12px;
}
.cv-pals { display: flex; flex-wrap: wrap; gap: 16px; }
.pal {
  flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 8px;
  padding: 10px; background: #fff; border-radius: 6px; box-shadow: 0 2px 10px rgba(43, 38, 34, 0.1);
}
.pal-strip { display: flex; height: 44px; border-radius: 4px; overflow: hidden; }
.pal-strip i { flex: 1; background: var(--c); }
.pal-strip--sm { height: 18px; border-radius: 3px; }
.pal-hex { display: flex; font-size: 8px; color: var(--text-2); letter-spacing: 0.02em; }
.pal-hex span { flex: 1; min-width: 0; overflow: hidden; }
.pal-name { font-size: 11px; font-weight: 600; }
.cv-pins { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@container (max-width: 560px) {
  .cv-pins { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cv-pin:nth-child(n+4) { display: none; } /* one row, so Studio keeps the films' shape */
}
.cv-pin { display: flex; height: 104px; padding: 10px; border-radius: 6px; background: var(--a); }
.cv-pin > span { width: var(--w); height: var(--h); background: var(--b); border-radius: 3px; }
.cv-side {
  flex: 0 0 190px; display: flex; flex-direction: column; gap: 14px;
  padding: 16px; background: #fff; border-radius: 12px;
  font-size: 11px; color: var(--text-2);
}
.cv-group { display: flex; flex-direction: column; gap: 8px; }
.cv-label, .cv-name { font-weight: 600; color: var(--ink); }
.cv-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(43, 38, 34, 0.12); }
.cv-seg, .cv-moods { display: flex; gap: 6px; }
.cv-seg .chip { color: var(--ink); }
.cv-moods { gap: 10px; }
.cv-kept { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid #ede7e4; }
.cv-small { font-size: 10px; }

.hero-card {
  position: relative; z-index: 1; /* over the canvas, not under its words */
  max-width: 600px; margin: -150px 0 0 40px; padding: 36px;
  display: flex; flex-direction: column; gap: 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 48px rgba(43, 38, 34, 0.14);
}
.hero-card h1 { font-size: 50px; line-height: 1.04; font-weight: 300; letter-spacing: -0.02em; color: var(--accent); }
.hero-lead { font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.watch { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; text-decoration: none; font-weight: 500; font-size: 15px; }
.watch svg { width: 22px; height: 22px; flex: none; }
.hero-note { font-size: 13px; color: var(--muted); }

/* the body: "On this page", and the sections beside it ------------------------------------------------ */
.body { display: flex; align-items: flex-start; gap: 56px; padding-bottom: 72px; }
.toc { flex: 0 0 200px; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.toc-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.toc a { display: flex; align-items: center; gap: 12px; min-height: 40px; text-decoration: none; font-size: 15px; transition: color 180ms ease; }
.toc a i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-ui); flex: none; transition: background-color 180ms ease; }
.toc a[aria-current="true"] { color: var(--accent); font-weight: 600; }
.toc a[aria-current="true"] i { background: var(--accent); }
.sections { flex: 1; min-width: 0; container-type: inline-size; }

.sec { display: flex; flex-direction: column; gap: 32px; padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 8px; }
.sec--first { padding-top: 6px; border-top: 0; }
.sec--last { padding-bottom: 0; }
.sec-head { display: flex; flex-direction: column; gap: 6px; }
.sec h2 { font-size: 32px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
#top { scroll-margin-top: 0; }

/* how it works: three steps, each with its drawing ------------------------------------------------------ */
.steps { display: flex; flex-direction: column; gap: 8px; }
.step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
@container (min-width: 600px) {
  .step { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step--flip .art { order: 2; }
}
.step-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step-no { font-size: 13px; font-weight: 600; color: var(--accent); }
.step h3 { font-size: 24px; font-weight: 500; }
.step-text > p:not(.step-no) { font-size: 16px; color: var(--text-2); }

.art { display: flex; flex-direction: column; gap: 12px; min-height: 168px; padding: 18px; border-radius: 12px; }
.art--board { background: var(--card); }
.art-pins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.art-pins i { height: 56px; border-radius: 5px; background: var(--c); }
.art-save {
  align-self: flex-end; display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px; border-radius: 16px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  box-shadow: 0 6px 16px rgba(15, 125, 69, 0.25);
}
.art-save svg { width: 14px; height: 14px; }
.art--palette { position: relative; background: #fff; border: 1px solid var(--line); transition: border-color 180ms ease, box-shadow 180ms ease; }
.art--palette.is-drop { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 125, 69, 0.15); }
.art-title { font-size: 13px; font-weight: 600; padding-right: 56px; }
.art-share { display: flex; height: 48px; border-radius: 6px; overflow: hidden; }
.art-share i { flex: var(--s) 1 0%; background: var(--c); }
.art-rows { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.art-rows li { display: flex; align-items: center; gap: 8px; }
.art-rows i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: inset 0 0 0 1px rgba(43, 38, 34, 0.1); }
.art-rows .nm { flex: 1; min-width: 0; }
.art-rows .hx { color: var(--text-2); font-variant-numeric: tabular-nums; }
.try-pic { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.art--book { flex-direction: row; align-items: center; gap: 16px; background: var(--card); }
.mini-page {
  flex: none; width: 112px; aspect-ratio: 210 / 297; display: flex; flex-direction: column; gap: 6px;
  padding: 10px; background: #fff; box-shadow: 0 4px 14px rgba(43, 38, 34, 0.14);
}
.mp-blocks { display: flex; flex-direction: column; gap: 6px; }
.mp-big { display: block; height: 46px; border-radius: 2px; background: var(--c); }
.mp-row { display: flex; gap: 6px; }
.mp-row i { flex: 1; height: 28px; border-radius: 2px; background: var(--c); }
.mp-line { display: block; width: 80%; height: 4px; border-radius: 2px; background: var(--line-ui); }
.mp-line--short { width: 60%; }
.mp-strip { display: flex; gap: 3px; margin-top: auto; }
.mp-strip i { flex: 1; height: 8px; background: var(--c); }
.book-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 12px; }
.book-title { font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line-ui); }

/* "Try it on a picture of your own": the palette above is read from it, here in the browser */
.try { margin-top: 2px; }
.try-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer;
  color: var(--accent); font-weight: 600; font-size: 15px;
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}
.try-link svg { width: 20px; height: 20px; flex: none; }
.try-link:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
.file-input:focus-visible + .try-link { outline: 2px solid var(--accent); outline-offset: 3px; }
.step-text > .try-note { font-size: 13px; color: var(--muted); }

/* the films: a card each, the walkthrough twice the size; each plays in the player ---------------------- */
.films { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.film-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@container (min-width: 640px) {
  .films { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .film-item--main { grid-column: span 2; display: flex; flex-direction: column; }
  .film-item--main .film { flex: 1; }
  .film-item--main .film-frame { flex: 1; }
  .film-side { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
.film-item { min-width: 0; }
.film { display: flex; flex-direction: column; gap: 12px; height: 100%; text-decoration: none; color: var(--ink); }
.film:hover { color: var(--ink); }
.film-frame {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 12px; background: var(--card);
}
.film-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
/* The walkthrough's cover is a page of its own: shown whole, on its own paper colour, whatever the card's shape. */
.film-frame--walk { background: #f6f5f1; border: 1px solid var(--line); }
.film-frame--walk img { object-fit: contain; }
.film-play {
  position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); color: var(--accent);
  transition: transform 180ms var(--ease-out), background-color 180ms ease, color 180ms ease;
}
.film-play svg { width: 16px; height: 16px; margin-left: 2px; }
.film-play--big {
  left: 50%; top: 50%; right: auto; width: 72px; height: 72px; transform: translate(-50%, -50%);
  background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(15, 125, 69, 0.35);
}
.film-play--big svg { width: 30px; height: 30px; }
@media (hover: hover) and (pointer: fine) {
  .film:hover .film-frame:not(.film-frame--walk) img { transform: scale(1.03); }
  .film:hover .film-play { background: var(--accent); color: #fff; }
  .film:hover .film-play--big { background: var(--accent-strong); transform: translate(-50%, -50%) scale(1.06); }
}
.film-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.film-name { font-size: 15px; font-weight: 600; }
.film-len { font-size: 13px; color: var(--muted); }
.film-item--main .film-name { font-size: 17px; }
.film-item--main .film-len { font-size: 14px; }

/* what else Studio does ------------------------------------------------------------------------------- */
.feats { display: flex; flex-direction: column; }
.feat { display: flex; align-items: flex-start; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.feat:last-child { border-bottom: 1px solid var(--line); }
.feat-icon { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--card); color: var(--accent); }
.feat-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.feat h3 { font-size: 17px; font-weight: 600; }
.feat p { font-size: 15px; color: var(--text-2); }
.feat .note { font-size: 13px; color: var(--muted); }

/* boards and their colours: the picture beside its four colours, two rows at a time -------------------- */
.boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.board { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.board-art {
  display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px;
  height: 150px; border-radius: 10px; overflow: hidden;
}
.board-art img { grid-row: 1 / 3; width: 100%; height: 100%; object-fit: cover; background: var(--card); }
.board-art i { background: var(--c); }
.board-name { font-size: 15px; font-weight: 600; }
.board-meta { font-size: 13px; color: var(--muted); margin-top: -4px; }
/* Two rows at a time (Soma: rows always even): four on a phone, six when there's room; "See all" opens the rest. */
.js .boards:not(.is-open) > :nth-child(n+5) { display: none; }
@container (min-width: 600px) {
  .boards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .boards.is-open { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .js .boards:not(.is-open) > :nth-child(n+5) { display: flex; }
  .js .boards:not(.is-open) > :nth-child(n+7) { display: none; }
}
.more {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--accent);
}
.more svg { width: 16px; height: 16px; transition: transform 180ms var(--ease-out); }
.more:hover { color: var(--accent-strong); }
.more:hover svg { transform: translateX(3px); }
.more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* pricing: two cards -------------------------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@container (min-width: 660px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan { display: flex; flex-direction: column; gap: 20px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.plan--pro { border: 2px solid var(--accent); }
.plan-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.plan-name { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.plan--pro .plan-name { color: var(--accent); }
.plan-trial, .plan-note { font-size: 13px; color: var(--muted); }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.amount { font-size: 44px; font-weight: 300; line-height: 1; letter-spacing: -0.02em; }
.per { font-size: 15px; color: var(--muted); }
.ticks { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.ticks li { display: flex; align-items: flex-start; gap: 10px; }
.ticks li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%230f7d45' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.plan .btn { align-self: flex-start; margin-top: auto; }

/* good to know: questions that open ----------------------------------------------------------------- */
.qa { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px;
  cursor: pointer; list-style: none; font-size: 17px; font-weight: 500;
  transition: color 180ms ease;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--accent-strong); }
.qa summary svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease-out); }
.qa details[open] summary svg { transform: rotate(180deg); }
.qa p { max-width: 640px; margin: 0 0 22px; font-size: 15px; color: var(--text-2); }
.qa p a { color: inherit; text-underline-offset: 0.18em; }
.qa p a:hover { color: var(--accent-strong); }

/* the close and the footer ------------------------------------------------------------------------------ */
.install { padding: 88px 0; background: var(--ground); }
.install-inner { max-width: 760px; margin: 0 auto; padding: 0 var(--pad); display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.install h2 { font-size: 42px; font-weight: 300; line-height: 1.12; letter-spacing: -0.02em; }
.install-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; }
.text-link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; text-decoration: none; font-weight: 500; font-size: 16px; }
.install p { font-size: 13px; color: var(--text-2); }
.site-foot { padding: 36px 0; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; font-size: 13px; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-links a { text-decoration: none; }

/* the player ------------------------------------------------------------------------------------------- */
.player {
  width: min(1200px, calc(100vw - 24px), calc((100svh - 168px) * 16 / 9));
  max-width: none; max-height: none; padding: 0; border: 0; overflow: visible;
  background: transparent; color: #fff;
}
.player::backdrop { background: rgba(24, 20, 18, 0.88); }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.player-title { font-weight: 600; }
.player-close {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.45); background: transparent; color: #fff; cursor: pointer;
  font-weight: 600; font-size: 14px; transition: background-color 180ms ease, border-color 180ms ease;
}
.player-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.player-close:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.player-close:focus-visible { outline-color: #fff; }
.player-screen { aspect-ratio: 16 / 9; background: #000; }
.player-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
/* "From there, it should give an option to either see the second Brighter Days or go through the walkthrough" */
.player-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.player-next-label { margin-right: 4px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.player-pick {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.45); background: transparent; color: #fff; cursor: pointer;
  font-weight: 600; font-size: 14px; transition: background-color 180ms ease, border-color 180ms ease;
}
.player-pick .len { font-weight: 400; opacity: 0.75; }
.player-pick:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.player-pick:focus-visible { outline-color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40; max-width: calc(100vw - 32px);
  padding: 12px 18px; background: var(--ink); color: #fff; font-size: 14px;
  opacity: 0; visibility: hidden; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out), visibility 0s linear 240ms;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* narrower: the drawing of Studio sheds its quieter tools, then its side panel --------------------------- */
@media (max-width: 1099px) { .cv-wider { display: none; } }
/* Below this the card would cover the dots, so they get a strip of their own under the slides (as on a phone),
   and the card overlaps only that. */
@media (max-width: 1079px) {
  .show-bar {
    position: static; width: max-content; margin: 8px auto 26px; padding: 0;
    background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .hero-card { margin-top: -20px; }
}
@media (max-width: 1023px) { .cv-pals--more { display: none; } }
@media (max-width: 859px) { .cv-side, .cv-wide { display: none; } }

/* tablet and phone: one column; "On this page" becomes a row of chips --------------------------------- */
@media (max-width: 959px) {
  .hero-card { margin: -20px 0 0 24px; }
  .body { flex-direction: column; align-items: stretch; gap: 8px; }
  .toc {
    position: static; flex: none; flex-direction: row; gap: 8px; padding: 0 var(--pad) 8px; margin: 0 calc(-1 * var(--pad));
    overflow-x: auto; scrollbar-width: none;
  }
  .toc::-webkit-scrollbar { display: none; }
  .toc-title { display: none; }
  .toc a { flex: none; gap: 0; padding: 0 14px; border: 1px solid var(--line-ui); border-radius: 20px; font-size: 14px; white-space: nowrap; }
  .toc a i { display: none; }
  .toc a[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
  .sec--first { padding-top: 40px; }
}

/* the phone: the 390 design --------------------------------------------------------------------------- */
@media (max-width: 640px) {
  :root { --pad: 16px; }
  .eyebrow { font-size: 11px; }
  .head { padding-top: 14px; padding-bottom: 14px; gap: 12px; flex-wrap: nowrap; }
  .brand { gap: 8px; font-size: 17px; }
  .brand svg { width: 28px; height: 28px; }
  .head-link { display: none; }
  .head .btn--sm { padding: 0 16px; }

  .hero { padding: 4px 0 48px; }
  .show { border-radius: 14px; box-shadow: 0 16px 40px rgba(43, 38, 34, 0.1); }
  .slide-watch { min-height: 48px; gap: 10px; padding: 0 18px 0 8px; font-size: 15px; }
  .slide-watch .play-dot { width: 32px; height: 32px; }
  .slide-watch .play-dot svg { width: 15px; height: 15px; }
  .cv-tabs { gap: 18px; padding: 12px 16px 0; font-size: 12px; flex-wrap: nowrap; }
  .cv-tabs span { padding-bottom: 8px; }
  .cv-tabs .cv-wide { display: none; }
  .cv-tools { gap: 6px; padding: 10px 16px; font-size: 10px; }
  .cv-tools .chip { height: 24px; padding: 0 10px; border-radius: 12px; }
  .cv-body { padding: 2px 16px 16px; }
  .cv-board { gap: 12px; padding: 12px; border-radius: 10px; }
  .cv-pins { order: -1; gap: 8px; }
  .cv-pin { height: 72px; padding: 8px; border-radius: 5px; }
  .cv-pin:nth-child(n+4), .cv-pals--more, .pal-hex { display: none; }
  .cv-pals { flex-wrap: nowrap; gap: 10px; }
  .pal { flex: 1 1 0; gap: 6px; padding: 8px; }
  .pal-strip { height: 32px; }
  .pal-name { font-size: 10px; }

  .hero-card { margin: -20px 12px 0; padding: 24px 20px; gap: 16px; box-shadow: 0 12px 36px rgba(43, 38, 34, 0.14); }
  .hero-card h1 { font-size: 36px; line-height: 1.06; }
  .hero-lead { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .watch { justify-content: center; min-height: 44px; }
  .hero-note { text-align: center; }

  .body { padding-bottom: 0; gap: 0; }
  .sec { gap: 20px; padding: 40px var(--pad); margin: 0 calc(-1 * var(--pad)); } /* its line runs edge to edge */
  .sec--first, #films { gap: 24px; }
  .sec h2 { font-size: 28px; line-height: 1.15; }

  .steps { gap: 24px; }
  .step { gap: 16px; padding: 24px 0 0; }
  .step:last-child { padding-bottom: 24px; }
  .step-text { gap: 16px; }
  .step h3 { font-size: 22px; }
  .step-text > p:not(.step-no) { font-size: 15px; }
  .art { min-height: 0; padding: 16px; }
  .art-pins i { height: 52px; }
  .art-save { box-shadow: none; }
  .art-save svg { display: none; }
  .art--palette { gap: 10px; }
  .art-share { height: 44px; }
  .art-rows li:nth-child(n+3) { display: none; }
  .art--book { gap: 14px; }
  .mini-page { width: 96px; gap: 5px; padding: 8px; }
  .mp-blocks { gap: 5px; }
  .mp-big { height: 40px; }
  .mp-row { gap: 5px; }
  .mp-row i { height: 24px; }
  .mp-line--short, .tag--wide { display: none; }
  .mp-strip { gap: 2px; }
  .mp-strip i { height: 7px; }

  .film { gap: 10px; }
  .film-frame { border-radius: 10px; }
  .film-frame--walk { border-radius: 12px; }
  .film-play:not(.film-play--big) { right: 8px; top: 8px; width: 32px; height: 32px; }
  .film-play:not(.film-play--big) svg { width: 14px; height: 14px; }
  .film-play--big { width: 60px; height: 60px; }
  .film-play--big svg { width: 26px; height: 26px; }
  .film-item--main .film-name { font-size: 16px; }
  .film-item--main .film-len { font-size: 13px; }
  .film-side .film { gap: 8px; }
  .film-side .film-cap { flex-direction: column; gap: 0; }
  .film-side .film-name { font-size: 14px; }
  .film-side .film-len { font-size: 12px; }

  .feat { gap: 14px; padding: 16px 0; }
  .feat-icon { width: 40px; height: 40px; }
  .feat-icon svg { width: 20px; height: 20px; }
  .feat h3 { font-size: 16px; }
  .feat p { font-size: 14px; }

  .board { gap: 8px; }
  .board-art { height: 120px; gap: 3px; }
  .board-name { font-size: 14px; }
  .board-meta { font-size: 12px; margin-top: -2px; }
  .board-kind { display: none; }

  .plan { gap: 16px; padding: 22px; }
  .plan-top { display: contents; }
  .plan-trial { order: 1; }
  .plan-note { order: 2; }
  .plan .btn { order: 3; align-self: stretch; }
  .plan-name { font-size: 12px; }
  .amount { font-size: 40px; }
  .per { font-size: 14px; }
  .ticks { gap: 8px; }

  .qa summary { min-height: 56px; gap: 12px; font-size: 16px; }
  .qa p { margin-bottom: 18px; }

  .install { padding: 56px 0; }
  .install-inner { padding: 0 20px; gap: 22px; }
  .install h2 { font-size: 32px; }
  .install-actions { flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
  .text-link { min-height: 44px; }

  .site-foot { padding: 32px 0; }
  .foot { flex-direction: column; align-items: flex-start; gap: 16px; }
  .foot-links { order: -1; gap: 16px 20px; }
  .foot-links a { display: inline-flex; align-items: center; min-height: 32px; }
}

/* the smallest phones: the drawing's tools still fit on one line */
@media (max-width: 379px) {
  .cv-tools .chip { padding: 0 8px; }
  .cv-tabs { gap: 14px; }
}
