/* =====================================================================
   Now It Clicks: design tokens and styles (preview build)
   Warm paper, ink outlines, cobalt, butter. Archivo display,
   Atkinson Hyperlegible Next for reading. Carried over from site-v2
   base.css / site.css, now themed for light and dark.
   ===================================================================== */

@font-face { font-family: "Archivo"; src: url("fonts/Archivo-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson"; src: url("fonts/AtkinsonHyperlegibleNext-latin.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson"; src: url("fonts/AtkinsonHyperlegibleNext-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson"; src: url("fonts/AtkinsonHyperlegibleNext-Italic-latin.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fbf7ef;
  --paper-deep: #f3ecdf;
  --card: #ffffff;
  --line: #e7dfd0;
  --ink: #172435;
  --ink-soft: #435166;
  --ink-faint: #6a778a;
  --edge: #172435;          /* outlines + pop shadows */
  --band: #172435;          /* dark bands (ask, takeaway) */
  --band-ink: #fbf7ef;
  --band-soft: #1f2f44;
  --band-line: #33475f;
  --cobalt: #245ae7;
  --cobalt-deep: #173c9e;
  --cobalt-soft: #e3eafd;
  --butter: #f5cc55;
  --butter-deep: #e8b82e;
  --butter-soft: #fdf1cc;
  --on-butter: #172435;
  --danger: #b3261e;
  --t-solid: #172435;
  --t-soft: #e4e7ec;
  --t-ink: #172435;
  --stage: #f7f5ef;
  --c-cobalt: #245AE7; --c-cobalt-soft: #E3EAFD; --c-cobalt-ink: #173C9E;
  --c-butter: #F5CC55; --c-butter-soft: #FDF1CC; --c-butter-ink: #7A5A00;
  --c-coral: #D9654B; --c-coral-soft: #FBE4DD; --c-coral-ink: #9A3A24;
  --c-mint: #2F9E73; --c-mint-soft: #DDF2E9; --c-mint-ink: #1C6B4C;
  --c-plum: #8B5CC7; --c-plum-soft: #EEE6F8; --c-plum-ink: #5E3796;
  --c-ink: #172435; --c-ink-soft: #E4E7EC; --c-ink-ink: #172435;
  --s1: #245ae7; --s2: #d9654b;
  --clip-bg: transparent;
  --clip-pad: 0px;
  --prop-bg: transparent;
  --prop-pad: 0px;

  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-xl: 32px;
  --pop: 4px 4px 0 var(--edge);
  --pop-lg: 6px 6px 0 var(--edge);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --head-h: 68px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #101a28; --paper-deep: #0b131f; --card: #182538; --line: #2a3a51;
    --ink: #f3ede1; --ink-soft: #c2cad6; --ink-faint: #93a0b3;
    --edge: #05090f; --band: #0b131f; --band-ink: #f3ede1; --band-soft: #182538; --band-line: #2e4059;
    --cobalt: #7b9dff; --cobalt-deep: #a9c0ff; --cobalt-soft: #1c2d52;
    --butter-soft: #2e2913; --t-soft: #22324a; --t-ink: #f3ede1;
    --clip-bg: #f7f5ef; --clip-pad: 0.75rem; --s1: #5b82f5; --s2: #e0704f; --c-cobalt-soft: #1c2d52; --c-cobalt-ink: #a9c0ff; --c-butter-soft: #3a3216; --c-butter-ink: #f5cc55; --c-coral-soft: #3d2420; --c-coral-ink: #f2a48f; --c-mint-soft: #15352a; --c-mint-ink: #7fd6b1; --c-plum-soft: #2c2140; --c-plum-ink: #c7a9ef; --c-ink: #0b131f; --c-ink-soft: #22324a; --c-ink-ink: #f3ede1; --prop-bg: #f3ede1; --prop-pad: 6px;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101a28; --paper-deep: #0b131f; --card: #182538; --line: #2a3a51;
  --ink: #f3ede1; --ink-soft: #c2cad6; --ink-faint: #93a0b3;
  --edge: #05090f; --band: #0b131f; --band-ink: #f3ede1; --band-soft: #182538; --band-line: #2e4059;
  --cobalt: #7b9dff; --cobalt-deep: #a9c0ff; --cobalt-soft: #1c2d52;
  --butter-soft: #2e2913; --t-soft: #22324a; --t-ink: #f3ede1;
  --clip-bg: #f7f5ef; --clip-pad: 0.75rem; --s1: #5b82f5; --s2: #e0704f; --c-cobalt-soft: #1c2d52; --c-cobalt-ink: #a9c0ff; --c-butter-soft: #3a3216; --c-butter-ink: #f5cc55; --c-coral-soft: #3d2420; --c-coral-ink: #f2a48f; --c-mint-soft: #15352a; --c-mint-ink: #7fd6b1; --c-plum-soft: #2c2140; --c-plum-ink: #c7a9ef; --c-ink: #0b131f; --c-ink-soft: #22324a; --c-ink-ink: #f3ede1; --prop-bg: #f3ede1; --prop-pad: 6px;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  min-height: 100vh; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
ul[class], ol[class] { list-style: none; padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--butter); color: #172435; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--butter); color: #172435; padding: 10px 16px; border: 2px solid var(--edge); border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { width: 100%; max-width: calc(700px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-media { width: 100%; max-width: calc(980px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ------------------------------------------------------------------ type */
.h-hero, .h-article, .h-section, .h-feature, .card-title, .wordmark {
  font-family: var(--display); font-weight: 850; letter-spacing: -0.02em; word-spacing: 0.08em; line-height: 1.02;
}
.h-hero { font-size: clamp(2.5rem, 6.2vw, 4.6rem); }
.h-article { font-size: clamp(2.15rem, 5vw, 3.6rem); line-height: 1.04; }
.h-section { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
.h-feature { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 46ch; }
.eyebrow { font-family: var(--display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cobalt); }
.hl {
  background: linear-gradient(transparent 8%, var(--butter) 8%, var(--butter) 92%, transparent 92%);
  color: #172435; padding: 0 0.12em; margin: 0 -0.04em; border-radius: 0.08em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.accent { color: var(--cobalt); }

/* ------------------------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--card); --btn-fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.6rem 1.15rem; border: 2px solid var(--edge); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; line-height: 1.15;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s;
}
.btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.btn:active:not(:disabled) { transform: none; box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { --btn-bg: #245ae7; --btn-fg: #fff; }
.btn-primary:hover:not(:disabled) { --btn-bg: #173c9e; }
.btn-butter { --btn-bg: var(--butter); --btn-fg: #172435; }
.btn-ghost { --btn-bg: transparent; }
.btn-ghost:hover:not(:disabled) { --btn-bg: var(--card); }
.btn[aria-pressed="true"] { --btn-bg: var(--ink); --btn-fg: var(--paper); }
.btn-butter[aria-pressed="true"] { --btn-bg: var(--butter); --btn-fg: #172435; box-shadow: inset 0 0 0 2px var(--edge); }
.btn-sm { min-height: 36px; padding: 0.35rem 0.85rem; font-size: 0.92rem; }
.btn-lg { min-height: 52px; padding: 0.75rem 1.45rem; font-size: 1.05rem; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; color: var(--cobalt); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow svg { width: 1em; height: 1em; transition: transform 0.15s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ------------------------------------------------------------------ bubble mark */
.bubble { position: relative; display: inline-grid; place-items: center; flex: none; perspective: 200px; }
.bubble svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bubble path { fill: #fff; stroke: var(--edge); stroke-width: 2.8; stroke-linejoin: round; }
.bubble-butter path { fill: var(--butter); }
.bubble b {
  position: relative; grid-area: 1 / 1; margin-top: -0.22em; font-family: var(--display); font-weight: 900; line-height: 1; color: #172435;
  backface-visibility: hidden; transition: transform 0.35s var(--ease), opacity 0.2s;
}
.bubble .g-x { color: #245ae7; transform: rotateY(-90deg); opacity: 0; }
.flip:hover .g-q, .flip:focus-visible .g-q, .flip[open] .g-q, .is-open .g-q { transform: rotateY(90deg); opacity: 0; }
.flip:hover .g-x, .flip:focus-visible .g-x, .flip[open] .g-x, .is-open .g-x { transform: rotateY(0); opacity: 1; }

/* ------------------------------------------------------------------ small parts */
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.65rem 0.2rem 0.55rem; border-radius: 999px;
  background: var(--t-soft); color: var(--t-ink); font-size: 0.82rem; font-weight: 700; line-height: 1.4; text-decoration: none; white-space: nowrap;
}
.chip::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--t-solid); box-shadow: 0 0 0 1.5px var(--edge); }
a.chip:hover { text-decoration: underline; }
.tag { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.tag-new { background: #172435; color: #f5cc55; }
.tag-example { background: var(--paper-deep); color: var(--ink-soft); border: 1px dashed var(--ink-faint); }
.tag-anim { background: var(--cobalt-soft); color: var(--cobalt-deep); }
kbd { font-family: var(--body); font-size: 0.8rem; font-weight: 700; padding: 0.05rem 0.45rem; border: 1.5px solid var(--line); border-bottom-width: 3px; border-radius: 6px; color: var(--ink-faint); background: var(--card); }
.preview-note { font-size: 0.85rem; color: var(--ink-faint); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--head-h); }
.site-header nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.2vw, 1.75rem); }
.site-header nav > a:not(.btn) { font-weight: 700; text-decoration: none; padding: 0.35rem 0; border-bottom: 2.5px solid transparent; }
.site-header nav > a:not(.btn):hover { border-bottom-color: var(--butter); }
.site-header nav > a[aria-current="page"] { border-bottom-color: var(--cobalt); }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.wordmark { font-size: 1.42rem; letter-spacing: -0.03em; word-spacing: 0.12em; white-space: nowrap; }
.wordmark .dot { color: var(--cobalt); }
.yt-btn svg rect { fill: currentColor; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); }
.icon-btn:hover { border-color: var(--edge); }
.icon-btn svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .hide-sm { display: none !important; } }
@media (max-width: 420px) { .hide-xs { display: none; } .wordmark { font-size: 1.2rem; } }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: clamp(4rem, 8vw, 6rem); background: var(--paper-deep); border-top: 1px solid var(--line); padding-top: 3rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem 4rem; }
.footer-brand { max-width: 380px; display: grid; gap: 0.9rem; }
.footer-brand p { color: var(--ink-soft); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 2rem 3.5rem; }
.site-footer nav div { display: grid; gap: 0.45rem; align-content: start; }
.site-footer nav h2 { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.2rem; }
.site-footer nav a { text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { text-decoration: underline; }
.footer-small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-block: 1.25rem; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--ink-faint); }
main.has-ask + .site-footer { margin-top: 0; }

/* ------------------------------------------------------------------ sections */
.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head p { color: var(--ink-soft); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 3.5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy { display: grid; gap: 1.25rem; justify-items: start; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 0.6rem; font-weight: 700; font-size: 0.95rem; color: var(--ink-faint); }
.hero-stats b { color: var(--ink); font-family: var(--display); font-variant-numeric: tabular-nums; }

.hero-stage { position: relative; display: grid; padding: 7.5rem 0 1rem 0; isolation: isolate; }
.hero-sun {
  position: absolute; z-index: -1; width: min(88%, 420px); aspect-ratio: 1; right: -4%; top: 0;
  border-radius: 50%; background: var(--butter); box-shadow: inset 0 0 0 2.5px var(--edge);
}
.hero-sun::after {
  content: ""; position: absolute; inset: -16%; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--edge) 0 1.2deg, transparent 1.2deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 60.5%, #000 64%, transparent 64.5%);
  mask: radial-gradient(circle, transparent 60%, #000 60.5%, #000 64%, transparent 64.5%);
  opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) { .hero-sun::after { animation: turn 60s linear infinite; } }
@keyframes turn { to { transform: rotate(1turn); } }
.hero-presenter { position: absolute; z-index: 0; left: 4%; top: 0; width: 170px; height: 196px; }
.hero-presenter img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; transition: opacity 0.25s, transform 0.35s var(--ease); }
.hero-presenter img + img { opacity: 0; transform: translateY(6px) scale(0.97); }
.clicker.is-open ~ .hero-presenter img:first-child, .hero-stage.is-open .hero-presenter img:first-child { opacity: 0; }
.hero-stage.is-open .hero-presenter img + img { opacity: 1; transform: none; }
.hero-prop { position: absolute; z-index: -1; width: 74px; }
.hero-prop.p1 { right: 6%; top: 8%; }
.hero-prop.p2 { right: -2%; bottom: 6%; width: 64px; }

.clicker {
  position: relative; z-index: 1; display: grid; gap: 1rem; justify-items: start;
  padding: 1.75rem clamp(1.25rem, 3vw, 2rem) 1.4rem; background: var(--card);
  border: 2.5px solid var(--edge); border-radius: var(--r-lg); box-shadow: var(--pop-lg); min-height: 290px; align-content: start;
}
.clicker-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.clicker-label { font-family: var(--display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.clicker-topic { font-size: 0.82rem; font-weight: 700; padding: 0.1rem 0.6rem; background: var(--cobalt-soft); color: var(--cobalt-deep); border-radius: 999px; }
.clicker-count { margin-left: auto; font-size: 0.82rem; font-weight: 700; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.clicker-q { font-family: var(--display); font-weight: 850; letter-spacing: -0.02em; word-spacing: 0.08em; font-size: clamp(1.55rem, 2.6vw, 2.1rem); line-height: 1.08; }
.clicker-go { padding-left: 0.8rem; }
.clicker-a {
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; width: 100%;
  padding: 1rem 1.1rem; background: var(--butter-soft); border: 2px solid var(--edge); border-radius: var(--r);
  animation: pop-in 0.35s var(--ease);
}
.clicker-a p { font-size: 1.08rem; margin-bottom: 0.5rem; }
.clicker-next { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.92rem; color: var(--ink-soft); padding: 0.3rem 0; }
.clicker-next:hover { color: var(--ink); text-decoration: underline; }
.clicker-next svg { width: 15px; height: 15px; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { max-width: 560px; padding-top: 6.5rem; }
  .hero-sun { width: 300px; right: -70px; top: -10px; }
  .hero-presenter { width: 136px; height: 157px; left: 2%; }
}

/* ------------------------------------------------------------------ feature */
.feature {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); background: var(--card);
  border: 2px solid var(--edge); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--pop);
}
.feature-media { position: relative; display: grid; align-content: center; background: #172435; border-right: 2px solid var(--edge); text-decoration: none; }
.feature-badge { position: absolute; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border-radius: 999px; background: #172435; color: #fff; font-weight: 700; font-size: 0.85rem; }
.feature-badge svg { width: 16px; height: 16px; }
.feature-body { display: grid; align-content: center; justify-items: start; gap: 1rem; padding: clamp(1.5rem, 4vw, 3rem); }
.feature-body h2 a { text-decoration: none; }
.feature-body h2 a:hover { text-decoration: underline; text-decoration-color: var(--butter); text-decoration-thickness: 0.12em; }
.feature-excerpt { font-size: 1.12rem; color: var(--ink-soft); }
.feature-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.92rem; color: var(--ink-faint); font-weight: 600; }
@media (max-width: 800px) { .feature { grid-template-columns: 1fr; } .feature-media { border-right: 0; border-bottom: 2px solid var(--edge); } }

/* ------------------------------------------------------------------ covers + cards */
.cover { position: relative; display: block; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: var(--paper-deep); }
.cover > img, .cover > video { width: 100%; height: 100%; object-fit: cover; }
.cover-scene { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cover-scene .cs-prop { position: absolute; width: 34%; right: 12%; top: 50%; transform: translateY(-50%) rotate(-4deg); filter: drop-shadow(0 6px 0 rgb(23 36 53 / 0.18)); }
.cover-scene .cs-presenter { position: absolute; height: 82%; left: 7%; bottom: 0; }
.cover-scene .cs-title { position: absolute; left: 6%; top: 10%; max-width: 52%; font-family: var(--display); font-weight: 850; font-size: clamp(0.95rem, 2.2vw, 1.45rem); line-height: 1.05; letter-spacing: -0.02em; color: #172435; }
.cover-scene .cs-title span { background: var(--butter); padding: 0 0.15em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cover-blank { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.75rem; padding: 1.5rem; text-align: center; background: radial-gradient(circle at 78% 30%, var(--butter) 0 22%, transparent 22.5%), var(--t-soft); }
.cover-blank strong { font-family: var(--display); font-weight: 850; font-size: clamp(1.1rem, 2.2vw, 1.5rem); line-height: 1.05; max-width: 18ch; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.card-link {
  display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s;
}
.card-link:hover { transform: translate(-3px, -3px); border-color: var(--edge); box-shadow: var(--pop); }
.card-link .cover { border-bottom: 1.5px solid var(--line); }
.card-link:hover .cover { border-bottom-color: var(--edge); }
.card-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; }
.card-top { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.card-title { font-size: 1.35rem; line-height: 1.12; letter-spacing: -0.018em; }
.card-answer { color: var(--ink-soft); font-size: 0.98rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.9rem; margin-top: auto; padding-top: 0.25rem; font-size: 0.86rem; font-weight: 600; color: var(--ink-faint); }

/* ------------------------------------------------------------------ topics */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.topic-tile {
  position: relative; display: grid; gap: 0.45rem; align-content: start; height: 100%; padding: 1.35rem 1.35rem 1.2rem;
  background: var(--t-soft); border: 2px solid var(--edge); border-radius: var(--r-lg); text-decoration: none; overflow: hidden;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.topic-tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--t-solid); border: 2px solid var(--edge); }
.topic-tile .topic-prop { position: absolute; z-index: 1; right: 6px; top: 6px; width: 58px; transition: transform 0.3s var(--ease); }
.topic-tile:hover { transform: translate(-3px, -3px); box-shadow: var(--pop); }
.topic-tile:hover .topic-prop { transform: rotate(-10deg) scale(1.08); }
.topic-name { font-family: var(--display); font-weight: 850; font-size: 1.35rem; letter-spacing: -0.015em; line-height: 1.1; padding-right: 4rem; }
.topic-desc { color: var(--ink-soft); font-size: 0.95rem; padding-right: 1.5rem; }
.topic-subs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
.topic-subs span { padding: 0.1rem 0.55rem; border-radius: 999px; background: color-mix(in srgb, var(--card) 75%, transparent); border: 1px solid var(--line); font-size: 0.8rem; font-weight: 700; color: var(--t-ink); }
.topic-count { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.5rem; font-weight: 700; font-size: 0.9rem; color: var(--t-ink); }
.topic-count svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ watch band */
.watch {
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem); background: #245ae7; color: #fff; border: 2px solid var(--edge);
  border-radius: var(--r-xl); box-shadow: var(--pop-lg); overflow: hidden;
}
.watch-media { width: 190px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 2.5px solid #172435; background: #f7f5ef; }
.watch-media video, .watch-media img { width: 100%; height: 100%; object-fit: cover; }
.watch p { color: #dfe7ff; max-width: 48ch; margin-top: 0.4rem; font-size: 1.08rem; }
@media (max-width: 820px) { .watch { grid-template-columns: 1fr; justify-items: start; } .watch-media { width: min(100%, 320px); } }

/* ------------------------------------------------------------------ ask */
.ask { margin-top: clamp(2rem, 5vw, 3.5rem); padding-block: clamp(3rem, 7vw, 5rem); background: var(--band); color: var(--band-ink); }
.ask .lede { color: #c3cad6; }
.ask-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.ask-copy { display: grid; gap: 1.1rem; }
.ask-form { display: flex; gap: 0.6rem; margin-top: 0.5rem; }
.ask-form input { flex: 1; min-width: 0; min-height: 52px; padding: 0 1.1rem; border-radius: 999px; border: 2px solid #fbf7ef; background: #0f1a28; color: #fbf7ef; font-size: 1.05rem; }
.ask-form input::placeholder { color: #8390a3; }
.ask-form input:focus-visible { outline-color: var(--butter); }
.ask-form .btn { border-color: #fbf7ef; min-height: 52px; }
.ask-note { font-size: 0.95rem; color: #aab4c3; min-height: 1.5em; }
.ask-note.is-ok { color: var(--butter); font-weight: 700; }
.ask-note.is-error { color: #ffb4a8; font-weight: 700; }
@media (max-width: 560px) { .ask-form { flex-direction: column; } }
.wanted { background: var(--band-soft); border: 1.5px solid var(--band-line); border-radius: var(--r-lg); padding: 1.35rem; }
.wanted h3 { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--butter); margin-bottom: 0.75rem; }
.wanted ol { display: grid; gap: 0.25rem; }
.wanted li { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: center; padding: 0.55rem 0; border-top: 1px solid var(--band-line); font-weight: 600; }
.wanted li:first-child { border-top: 0; }
.vote { display: grid; justify-items: center; min-width: 48px; padding: 0.35rem 0.4rem 0.3rem; border-radius: 12px; border: 2px solid #4a5f7a; color: #fbf7ef; font-weight: 800; font-size: 0.95rem; line-height: 1.1; font-variant-numeric: tabular-nums; transition: background-color 0.15s, border-color 0.15s, transform 0.15s var(--ease); }
.vote:hover { border-color: var(--butter); transform: translateY(-1px); }
.vote[aria-pressed="true"] { background: var(--butter); border-color: var(--butter); color: #172435; }
.vote svg { width: 14px; height: 14px; }
@media (max-width: 880px) { .ask-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ library */
.library-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; background: linear-gradient(var(--t-soft), transparent); }
.library-head .wrap { display: grid; gap: 1rem; justify-items: start; }
.search { display: flex; align-items: center; gap: 0.6rem; width: min(100%, 620px); min-height: 56px; margin-top: 0.75rem; padding: 0 0.9rem 0 1.1rem; background: var(--card); border: 2px solid var(--edge); border-radius: 999px; box-shadow: var(--pop); }
.search:focus-within { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.search > svg { width: 20px; height: 20px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.08rem; outline: none; padding-block: 0.5rem; }
.search input::-webkit-search-cancel-button { display: none; }
.search button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.search button:hover { background: var(--paper-deep); }
.search button svg { width: 18px; height: 18px; }
.library-body { display: grid; gap: 1.5rem; }
.library-tools { display: grid; gap: 1rem; }
.filter-row { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.25rem 0.25rem 0.5rem; margin-inline: -0.25rem; scrollbar-width: thin; }
.filter { display: inline-flex; align-items: center; gap: 0.45rem; flex: none; min-height: 40px; padding: 0.35rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 0.95rem; transition: border-color 0.15s; }
.filter:hover { border-color: var(--edge); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter .n { font-size: 0.8rem; color: var(--ink-faint); font-weight: 700; font-variant-numeric: tabular-nums; }
.filter[aria-pressed="true"] .n { color: var(--butter); }
.swatch { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--t-solid); box-shadow: 0 0 0 1.5px var(--edge); }
.sub-row { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.75rem; border-radius: var(--r); background: var(--t-soft); }
.sub { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 34px; padding: 0.25rem 0.8rem; border-radius: 999px; border: 1.5px solid transparent; background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--t-ink); font-weight: 700; font-size: 0.9rem; }
.sub:hover { border-color: var(--t-ink); }
.sub[aria-pressed="true"] { background: var(--card); border-color: var(--edge); color: var(--ink); box-shadow: 2px 2px 0 var(--edge); }
.sub .n { font-size: 0.78rem; opacity: 0.7; }
.sort-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.result-count { font-weight: 700; color: var(--ink-soft); }
.sort { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.92rem; color: var(--ink-soft); }
.sort select { min-height: 38px; padding: 0 0.8rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; color: var(--ink); }
.empty { display: grid; justify-items: start; gap: 0.8rem; padding: 2.5rem; border: 2px dashed var(--line); border-radius: var(--r-lg); background: var(--card); }
.empty h2 { font-family: var(--display); font-size: 1.5rem; }
.empty p { color: var(--ink-soft); max-width: 52ch; }

/* ------------------------------------------------------------------ article */
.progress { position: fixed; z-index: 60; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 4px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--cobalt); transform-origin: left; transform: scaleX(0); }
.article-head { display: grid; gap: 1.1rem; justify-items: start; padding-top: clamp(2rem, 6vw, 4rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-weight: 700; font-size: 0.92rem; color: var(--ink-faint); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs a:last-child { color: var(--t-ink); }
.standfirst { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--ink-soft); line-height: 1.5; }
.byline { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.byline img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--edge); background: var(--butter); object-fit: cover; }
.byline > span:not(.tag) { display: grid; line-height: 1.3; }
.byline-meta { font-size: 0.9rem; color: var(--ink-faint); font-weight: 600; }
.short-answer { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; margin-top: 2rem; }
.short-answer > div { padding: 1.25rem 1.4rem; background: var(--butter-soft); border: 2px solid var(--edge); border-radius: 6px var(--r-lg) var(--r-lg) var(--r-lg); box-shadow: var(--pop); }
.short-answer h2 { font-family: var(--display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.35rem; }
.short-answer p { font-size: clamp(1.1rem, 1.8vw, 1.25rem); font-weight: 600; line-height: 1.5; }
@media (max-width: 520px) { .short-answer { grid-template-columns: 1fr; } .short-answer > .bubble { display: none; } }
.article-media { margin-top: 2.25rem; }
.article-media .cover { border-radius: var(--r-lg); border: 2px solid var(--edge); }
.media-note { margin-top: 0.75rem; font-size: 0.92rem; color: var(--ink-faint); font-weight: 600; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 700px) minmax(0, 1fr); gap: 2.5rem; margin-top: clamp(2rem, 5vw, 3.25rem); }
.article-layout .prose { grid-column: 2; }
.article-side { grid-column: 3; grid-row: 1; align-self: start; position: sticky; top: 96px; display: grid; gap: 1.5rem; max-width: 240px; }
.side-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.contents h2 { font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.6rem; }
.contents ol { display: grid; gap: 0.1rem; border-left: 2px solid var(--line); }
.contents a { display: block; margin-left: -2px; padding: 0.3rem 0 0.3rem 0.9rem; border-left: 2px solid transparent; font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; line-height: 1.35; }
.contents a:hover { color: var(--ink); }
.contents a[aria-current] { color: var(--ink); border-left-color: var(--cobalt); }
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); max-width: calc(700px + 2 * var(--gutter)); }
  .article-layout .prose { grid-column: 1; }
  .article-side { grid-column: 1; grid-row: 2; position: static; max-width: none; }
  .contents { display: none; }
}

.prose { font-size: clamp(1.08rem, 1.4vw, 1.18rem); line-height: 1.72; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-family: var(--display); font-weight: 850; font-size: clamp(1.5rem, 2.6vw, 1.95rem); letter-spacing: -0.02em; line-height: 1.12; margin-top: 2.1em; }
.prose h2::before { content: ""; display: block; width: 44px; height: 6px; border-radius: 3px; background: var(--t-solid); box-shadow: 0 0 0 1.5px var(--edge); margin-bottom: 0.7rem; }
.prose h3 { font-family: var(--display); font-weight: 800; font-size: 1.3rem; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a { color: var(--cobalt); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--cobalt); font-weight: 800; }
.prose blockquote { padding: 0.4rem 0 0.4rem 1.25rem; border-left: 4px solid var(--butter); font-size: 1.1em; font-weight: 600; color: var(--ink-soft); }
.prose figure { display: grid; gap: 0.6rem; }
.prose figure > img { width: 100%; border-radius: var(--r); border: 1.5px solid var(--line); }
.prose figcaption { font-size: 0.9rem; color: var(--ink-faint); }
.inline-prop { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: -0.38em; margin: 0 0.08em; }

.wait { border: 2px solid var(--edge); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.wait summary { display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1.1rem; cursor: pointer; list-style: none; font-weight: 700; line-height: 1.35; }
.wait summary::-webkit-details-marker { display: none; }
.wait summary:hover { background: var(--butter-soft); }
.wait-q { flex: 1; }
.wait-plus { flex: none; width: 20px; height: 20px; transition: transform 0.2s var(--ease); }
.wait[open] .wait-plus { transform: rotate(45deg); }
.wait[open] summary { background: var(--butter-soft); border-bottom: 2px solid var(--edge); }
.wait-a { padding: 1rem 1.25rem 1.15rem; font-size: 0.97em; }

.callout { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: start; padding: 1.15rem 1.25rem; background: var(--cobalt-soft); border: 2px solid var(--edge); border-radius: var(--r-lg); }
.callout img { width: 72px; }
.callout strong { display: block; font-family: var(--display); font-weight: 850; font-size: 1.1rem; margin-bottom: 0.2rem; }
.callout p { font-size: 0.98em; }

.prop-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.75rem; padding: 1.25rem; background: var(--stage); border: 1.5px solid var(--line); border-radius: var(--r-lg); }
.prop-row figure { display: grid; justify-items: center; gap: 0.35rem; text-align: center; }
.prop-row img { width: min(96px, 100%); }
.prop-row span { font-size: 0.85rem; font-weight: 700; color: #435166; }

.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.75rem; align-items: stretch; }
.compare-side { display: grid; justify-items: center; align-content: start; gap: 0.5rem; padding: 1.25rem 1rem; text-align: center; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r-lg); }
.compare-side img { width: 96px; }
.compare-side strong { font-family: var(--display); font-weight: 850; font-size: 1.15rem; line-height: 1.1; }
.compare-side p { font-size: 0.95rem; color: var(--ink-soft); }
.compare-vs { align-self: center; font-family: var(--display); font-weight: 900; font-size: 1.1rem; }
@media (max-width: 520px) { .compare { grid-template-columns: 1fr; } .compare-vs { justify-self: center; } }

.takeaway { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; margin-top: 2.5em !important; padding: clamp(1.4rem, 3vw, 2rem); border-radius: var(--r-lg); background: var(--band); color: var(--band-ink); }
.takeaway h2 { margin: 0 0 0.35rem !important; color: var(--butter); font-size: clamp(1.5rem, 3vw, 2rem); }
.takeaway h2::before { display: none; }
.takeaway p { font-size: 1.1em; }
.takeaway .bubble path { stroke: #fbf7ef; }
.did { display: grid; justify-items: center; gap: 1rem; margin-top: clamp(2.5rem, 6vw, 4rem); padding: 1.75rem 1.25rem; text-align: center; border-block: 1.5px solid var(--line); }
.did h2 { font-family: var(--display); font-weight: 850; font-size: 1.6rem; }
.did-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.did-msg { min-height: 1.5em; color: var(--ink-soft); font-weight: 600; max-width: 50ch; }
.leads { margin-top: clamp(2.5rem, 6vw, 4rem); display: grid; gap: 0.6rem; }
.lead-list { display: grid; gap: 0.75rem; margin-top: 1rem; }
.lead-list li { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: center; }
.lead-link, .lead-open { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; padding: 0.95rem 1.15rem; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.lead-link { transition: border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.lead-link:hover { border-color: var(--edge); transform: translate(-2px, -2px); box-shadow: var(--pop); }
.lead-open { border-style: dashed; }
.want { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; }
.want-count { font-size: 0.88rem; font-weight: 600; color: var(--ink-faint); }
.related { margin-top: clamp(3rem, 7vw, 5rem); }
.related .h-section { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.related .h-section .chip { font-family: var(--body); font-size: 1rem; letter-spacing: 0; padding: 0.3rem 0.85rem 0.3rem 0.7rem; }

/* ------------------------------------------------------------------ animation clips (made in Clicks Animator)
   They sit in the text like a moving illustration: no frame, no player chrome.
   Transparent clips show the page through; in dark mode they get a cream card
   because the app draws in navy ink. */
.clip-fig { display: grid; gap: 0.5rem; margin-inline: auto; }
.clip-fig figcaption { text-align: center; }
.clip-left figcaption, .clip-right figcaption { text-align: left; }
.clip-wide { width: 100%; }
.clip-medium { width: min(100%, 72%); }
.clip-small { width: min(100%, 48%); }
.clip-full { width: 100%; }
@media (min-width: 1100px) { .prose .clip-full { width: calc(100% + 280px); margin-inline: -140px; } }
@media (min-width: 700px) {
  .prose .clip-left { float: left; width: 46%; margin: 0.35em 1.75rem 1rem 0; }
  .prose .clip-right { float: right; width: 46%; margin: 0.35em 0 1rem 1.75rem; }
  .prose .clip-left.clip-small, .prose .clip-right.clip-small { width: 36%; }
  .prose h2, .prose .takeaway, .prose .wait, .prose .compare, .prose .scene { clear: both; }
}
.clip { position: relative; width: 100%; aspect-ratio: var(--ar, 16 / 9); background: var(--clip-bg); padding: var(--clip-pad); border-radius: var(--r-lg); }
.clip video { display: block; width: 100%; height: 100%; object-fit: contain; }
.clip.is-solid video { mix-blend-mode: darken; -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%); }
:root[data-theme="dark"] .clip.is-solid video { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .clip.is-solid video { mix-blend-mode: normal; } }
@media (prefers-reduced-motion: no-preference) { .clip { opacity: 0; transition: opacity 0.6s ease; } .clip.is-seen { opacity: 1; } }
.clip-toggle { position: absolute; right: 0.4rem; bottom: 0.4rem; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgb(23 36 53 / 0.72); color: #fff; opacity: 0; transition: opacity 0.2s; }
.clip-toggle svg { width: 15px; height: 15px; }
.clip:hover .clip-toggle, .clip-toggle:focus-visible, .clip.is-paused .clip-toggle { opacity: 1; }
@media (hover: none) { .clip-toggle { opacity: 0.55; } }
.clip-head { margin-top: 0.5rem; }
.watch-media .clip { border-radius: 0; padding: 0; background: #f7f5ef; opacity: 1; }
.watch-media .clip video { mix-blend-mode: normal; -webkit-mask-image: none; mask-image: none; object-fit: cover; }
.lib-grid.wide .asset .thumb .clip { padding: 0; }

/* ------------------------------------------------------------------ live scene (props + presenter animated in CSS) */
.scene { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border-radius: var(--r-lg); border: 2px solid var(--edge); background: #f7f5ef center / cover no-repeat; container-type: inline-size; }
.scene-item { position: absolute; transform: translate(-50%, -50%); }
.scene-item > img { width: 100%; }
.scene-item.is-flip > img { transform: scaleX(-1); }
.scene-text { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 850; letter-spacing: -0.02em; line-height: 1.02; color: #172435; text-align: center; white-space: nowrap; }
.scene-text .hl { padding-inline: 0.12em; }
.scene-replay { position: absolute; right: 0.6rem; bottom: 0.6rem; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(23 36 53 / 0.82); color: #fff; z-index: 5; }
.scene-replay svg { width: 16px; height: 16px; }

/* motion vocabulary, named after Clicks Animator's presets */
@media (prefers-reduced-motion: no-preference) {
  .is-playing .e-pop { animation: e-pop 0.55s var(--ease) backwards; }
  .is-playing .e-drop { animation: e-drop 0.8s cubic-bezier(.3,1.4,.5,1) backwards; }
  .is-playing .e-rise { animation: e-rise 0.6s var(--ease) backwards; }
  .is-playing .e-fade { animation: e-fade 0.6s ease backwards; }
  .is-playing .e-slide-left { animation: e-slide-left 0.7s var(--ease) backwards; }
  .is-playing .e-slide-right { animation: e-slide-right 0.7s var(--ease) backwards; }
  .is-playing .e-spin-in { animation: e-spin-in 0.7s var(--ease) backwards; }
  .is-playing .m-float > img { animation: m-float 3.2s ease-in-out infinite; }
  .is-playing .m-sway > img { animation: m-sway 3s ease-in-out infinite; transform-origin: 50% 90%; }
  .is-playing .m-wiggle > img { animation: m-wiggle 1.6s ease-in-out infinite; }
  .is-playing .m-pulse > img { animation: m-pulse 1.8s ease-in-out infinite; }
  .is-playing .m-spin > img { animation: m-spin 6s linear infinite; }
  .is-playing .m-shake > img { animation: m-shake 2.4s ease-in-out infinite; }
  .is-playing .m-hop > img { animation: m-hop 1.4s cubic-bezier(.3,.7,.4,1) infinite; }
  .is-playing .is-flip.m-sway > img, .is-playing .is-flip.m-float > img { scale: -1 1; }
}
@keyframes e-pop { 0% { opacity: 0; scale: 0.3; } 70% { scale: 1.08; } 100% { opacity: 1; scale: 1; } }
@keyframes e-drop { 0% { opacity: 0; translate: 0 -60cqh; } 100% { opacity: 1; translate: 0 0; } }
@keyframes e-rise { 0% { opacity: 0; translate: 0 12cqh; } 100% { opacity: 1; translate: 0 0; } }
@keyframes e-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes e-slide-left { 0% { opacity: 0; translate: -40cqw 0; } 100% { opacity: 1; translate: 0 0; } }
@keyframes e-slide-right { 0% { opacity: 0; translate: 40cqw 0; } 100% { opacity: 1; translate: 0 0; } }
@keyframes e-spin-in { 0% { opacity: 0; rotate: -180deg; scale: 0.4; } 100% { opacity: 1; rotate: 0deg; scale: 1; } }
@keyframes m-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6%; } }
@keyframes m-sway { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
@keyframes m-wiggle { 0%, 100% { rotate: 0deg; } 20% { rotate: -7deg; } 40% { rotate: 6deg; } 60% { rotate: -3deg; } 80% { rotate: 0deg; } }
@keyframes m-pulse { 0%, 100% { scale: 1; } 50% { scale: 1.08; } }
@keyframes m-spin { to { rotate: 1turn; } }
@keyframes m-shake { 0%, 70%, 100% { translate: 0 0; } 74% { translate: -4% 0; } 78% { translate: 4% 0; } 82% { translate: -3% 0; } 86% { translate: 2% 0; } }
@keyframes m-hop { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 -10%; } }

/* ------------------------------------------------------------------ asset library */
.lib-head { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.lib-head .wrap { display: grid; gap: 1rem; justify-items: start; }
.lib-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 132px), 1fr)); gap: 0.75rem; }
.lib-grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.asset { position: relative; display: grid; gap: 0.35rem; justify-items: center; align-content: start; padding: 0.8rem 0.6rem 0.7rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); text-align: center; transition: border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.asset:hover, .asset:focus-visible { border-color: var(--edge); transform: translate(-2px, -2px); box-shadow: var(--pop); }
.asset .thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 10px; background: #f7f5ef; }
.asset .thumb img { width: 78%; height: 78%; object-fit: contain; }
.lib-grid.wide .asset .thumb { aspect-ratio: 16 / 9; }
.lib-grid.wide .asset .thumb img, .lib-grid.wide .asset .thumb video { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.asset .name { font-weight: 700; font-size: 0.88rem; line-height: 1.25; }
.asset code { font-size: 0.75rem; color: var(--ink-faint); word-break: break-all; }
.asset.is-copied { border-color: #2f9e73; }
.asset.is-copied::after { content: "Copied"; position: absolute; top: 0.4rem; right: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 6px; background: #2f9e73; color: #fff; font-size: 0.72rem; font-weight: 800; }
.lib-group { display: grid; gap: 0.8rem; }
.lib-group + .lib-group { margin-top: 2rem; }
.lib-group h2 { font-family: var(--display); font-weight: 850; font-size: 1.25rem; display: flex; align-items: baseline; gap: 0.5rem; }
.lib-group h2 small { font-family: var(--body); font-size: 0.85rem; color: var(--ink-faint); font-weight: 700; }
.howto { display: grid; gap: 1rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--card); border: 2px solid var(--edge); border-radius: var(--r-lg); box-shadow: var(--pop); }
.howto h2 { font-family: var(--display); font-weight: 850; font-size: 1.35rem; }
.howto ol { display: grid; gap: 0.6rem; padding-left: 1.3em; }
.snippet { display: block; padding: 0.9rem 1rem; border-radius: var(--r-sm); background: #172435; color: #f3ede1; font-size: 0.86rem; line-height: 1.55; overflow-x: auto; white-space: pre; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 90; translate: -50% 0; padding: 0.6rem 1rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 0.92rem; box-shadow: 0 8px 24px rgb(0 0 0 / 0.25); max-width: calc(100vw - 32px); }

.plain-page { display: grid; justify-items: start; gap: 1.1rem; padding-block: clamp(4rem, 12vw, 8rem); min-height: 55vh; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Studio (editor only)
   ===================================================================== */
.nav-studio { color: var(--cobalt); }
body.in-studio .site-footer { display: none; }
.studio { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 0; min-height: calc(100vh - var(--head-h)); padding-bottom: 64px; }
.studio-nav { position: sticky; top: var(--head-h); align-self: start; height: calc(100vh - var(--head-h)); overflow-y: auto; padding: 1.25rem 1rem; border-right: 1px solid var(--line); background: var(--paper-deep); }
.studio-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-weight: 850; font-size: 1.2rem; margin-bottom: 1rem; }
.studio-nav nav { display: grid; gap: 0.15rem; }
.studio-nav-h { font-family: var(--display); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 1rem 0 0.3rem 0.6rem; }
.studio-nav a { display: flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.6rem; border-radius: 10px; font-weight: 700; font-size: 0.95rem; text-decoration: none; color: var(--ink-soft); }
.studio-nav a svg { width: 14px; height: 14px; }
.studio-nav a:hover { background: var(--card); color: var(--ink); }
.studio-nav a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: inset 3px 0 0 var(--cobalt); }
.studio-main { min-width: 0; padding: clamp(1.25rem, 3vw, 2rem) clamp(16px, 3vw, 2.5rem) 2rem; }
.studio-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.studio-head > div:first-child { display: grid; gap: 0.35rem; justify-items: start; }
.studio-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.studio-bar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding: 0.6rem clamp(16px, 3vw, 2rem) calc(0.6rem + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
#studio-status { font-weight: 700; font-size: 0.92rem; color: var(--ink-faint); }
#studio-status[data-state="dirty"] { color: #b86b00; }
#studio-status[data-state="dirty"]::before { content: "● "; }
.studio-bar kbd { background: transparent; border-color: rgb(255 255 255 / 0.4); color: #fff; font-size: 0.72rem; }
.studio-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; margin-bottom: 1rem; border-radius: var(--r); background: var(--butter-soft); border: 1.5px solid var(--butter-deep); font-weight: 600; }
.studio-export { display: grid; gap: 0.6rem; margin-top: 1.5rem; padding: 1rem; border: 2px solid var(--edge); border-radius: var(--r); background: var(--card); }
.studio-export textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; border: 1.5px solid var(--line); border-radius: 10px; padding: 0.6rem; background: var(--paper); }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.s-danger { color: var(--danger) !important; }
.pill { display: inline-flex; align-items: center; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 800; }
.pill-live { background: #ddf2e9; color: #1c6b4c; }
.pill-draft { background: var(--paper-deep); color: var(--ink-soft); border: 1px dashed var(--ink-faint); }
.pill-changed { background: #fdf1cc; color: #7a5a00; }
.pill-archived { background: #e4e7ec; color: #435166; }
.pill-star { background: #172435; color: #f5cc55; }

.s-list { display: grid; gap: 0.6rem; margin-top: 0.75rem; }
.s-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.6rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); }
.s-row:hover { border-color: var(--edge); }
.s-thumb .cover { border-radius: 10px; }
.s-thumb .cover-blank strong { font-size: 0.7rem; }
.s-thumb .cover-blank .bubble { display: none; }
.s-info { display: grid; gap: 0.35rem; min-width: 0; }
.s-title { font-family: var(--display); font-weight: 850; font-size: 1.15rem; line-height: 1.15; text-decoration: none; }
.s-title:hover { text-decoration: underline; }
.s-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem; align-items: center; font-size: 0.85rem; color: var(--ink-faint); font-weight: 600; }
.s-warn { color: var(--danger); font-weight: 700; }
.s-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
@media (max-width: 700px) { .s-row { grid-template-columns: 88px minmax(0, 1fr); } .s-actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* editor */
.ed-tabs { display: none; gap: 0.4rem; margin-bottom: 1rem; }
.ed-tabs button { flex: 1; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; }
.ed-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ed-form { display: grid; gap: 1rem; min-width: 0; }
.ed-card { display: grid; gap: 0.85rem; padding: 1.1rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); }
.ed-h { font-family: var(--display); font-weight: 850; font-size: 1.05rem; }
.ed-preview { position: sticky; top: calc(var(--head-h) + 12px); max-height: calc(100vh - var(--head-h) - 90px); overflow: auto; border: 2px solid var(--edge); border-radius: var(--r-lg); background: var(--paper); }
.ed-preview-bar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.9rem; background: var(--paper-deep); border-bottom: 1px solid var(--line); font-weight: 800; font-size: 0.85rem; }
.studio-preview { zoom: 0.72; padding-bottom: 2rem; }
.studio-preview .progress { display: none; }
.studio-preview .article-side { display: none; }
.studio-preview .article-layout { grid-template-columns: minmax(0, 1fr); max-width: calc(700px + 2 * var(--gutter)); }
.studio-preview .article-layout .prose { grid-column: 1; }
@media (max-width: 1180px) {
  .ed-tabs { display: flex; }
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed[data-mtab="write"] .ed-preview { display: none; }
  .ed[data-mtab="preview"] .ed-form { display: none; }
  .ed-preview { position: static; max-height: none; }
  .studio-preview { zoom: 1; }
}
@media (max-width: 820px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .studio-nav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0.75rem 16px; }
  .studio-nav nav { display: flex; overflow-x: auto; gap: 0.25rem; }
  .studio-nav-h, .studio-brand { display: none; }
  .studio-nav a { flex: none; }
}

.f { display: grid; gap: 0.3rem; min-width: 0; }
.f-l { font-weight: 800; font-size: 0.85rem; color: var(--ink-soft); }
.f-h { font-size: 0.82rem; color: var(--ink-faint); }
.f-c { justify-self: end; font-size: 0.75rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; margin-top: -0.2rem; }
.ed input:not([type="checkbox"]):not([type="range"]):not([type="file"]), .ed textarea, .ed select, .t-row input, .t-row select, .se-item-panel input, .se-item-panel select {
  width: 100%; min-height: 40px; padding: 0.45rem 0.7rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 0.98rem; line-height: 1.45;
}
.ed textarea { resize: vertical; }
.ed input:focus, .ed textarea:focus, .ed select:focus, .t-row input:focus { outline: 2px solid var(--cobalt); outline-offset: 1px; border-color: transparent; }
.f-big { font-family: var(--display); font-weight: 850; font-size: 1.15rem !important; }
.f-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; flex: 1; min-width: 0; }
.f-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; }
.f-col { display: grid; gap: 0.5rem; flex: 1; min-width: 180px; }
.f-img { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper-deep); }
.f-upload { justify-self: start; }
.f-check { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.92rem; }
.f-check input { width: 18px; height: 18px; accent-color: var(--cobalt); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.25rem; border-radius: 999px; background: var(--paper-deep); justify-self: start; }
.seg button { padding: 0.35rem 0.85rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; }
.seg button[aria-checked="true"] { background: var(--card); box-shadow: 0 0 0 1.5px var(--edge); }
.asset-pick { display: inline-grid; justify-items: center; gap: 0.25rem; width: 104px; padding: 0.45rem; border: 1.5px dashed var(--ink-faint); border-radius: 12px; background: var(--paper); font-size: 0.75rem; font-weight: 700; color: var(--ink-soft); word-break: break-all; text-align: center; }
.asset-pick:hover { border-style: solid; border-color: var(--cobalt); }
.asset-pick img { width: 64px; height: 64px; object-fit: contain; background: #f7f5ef; border-radius: 8px; }
.asset-none { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 8px; background: var(--paper-deep); font-weight: 900; }
.x { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; color: var(--ink-faint); }
.x:hover { background: var(--paper-deep); color: var(--danger); }
.x svg { width: 16px; height: 16px; }
.fu { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 0.4rem; align-items: center; margin-bottom: 0.4rem; }
@media (max-width: 560px) { .fu { grid-template-columns: minmax(0, 1fr) auto; } .fu select { grid-column: 1; } }
.ed-check ul { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.ed-check li { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); }
.ed-check li[data-ok="true"] { color: #1c6b4c; }
.ed-check li svg { width: 16px; height: 16px; }
.ed-check .dot { width: 12px; height: 12px; margin-inline: 2px; border-radius: 50%; border: 2px solid var(--ink-faint); }

.blks { list-style: none; padding: 0; display: grid; gap: 0.3rem; }
.blk { display: grid; gap: 0.6rem; padding: 0.8rem 0.85rem 0; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); }
.blk:focus-within { border-color: var(--cobalt); }
.blk-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.blk-type { font-family: var(--display); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cobalt); }
.blk-tools { display: flex; gap: 0.15rem; }
.blk-tools button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--ink-faint); font-weight: 800; }
.blk-tools button:hover:not(:disabled) { background: var(--paper-deep); color: var(--ink); }
.blk-tools button:disabled { opacity: 0.3; }
.blk-tools button.is-confirm { background: var(--danger); color: #fff; }
.blk-tools svg { width: 15px; height: 15px; }
.blk-add { position: relative; display: flex; justify-content: center; margin: 0 -0.85rem; padding: 0.15rem 0 0.35rem; }
.blk-add-btn { padding: 0.15rem 0.75rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: var(--ink-faint); }
.blk-add-btn:hover { background: var(--cobalt-soft); color: var(--cobalt-deep); }
.blks > .blk-add { margin: 0; }
.blk-menu { position: absolute; z-index: 20; top: 100%; left: 50%; translate: -50% 0; display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 0.2rem; padding: 0.4rem; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); box-shadow: var(--pop); }
.blk-menu button { padding: 0.45rem 0.7rem; border-radius: 8px; text-align: left; font-weight: 700; font-size: 0.9rem; }
.blk-menu button:hover { background: var(--butter-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.prop-chip { display: inline-grid; gap: 0.3rem; justify-items: center; position: relative; }
.prop-chip input { width: 104px !important; min-height: 32px !important; font-size: 0.8rem !important; padding: 0.2rem 0.4rem !important; }
.prop-chip .x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; background: var(--card); border: 1.5px solid var(--line); }
.cmp-edit { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: start; }
.cmp-edit > div:not(.cmp-vs) { display: grid; gap: 0.5rem; justify-items: start; }
.cmp-vs input { width: 60px !important; text-align: center; margin-top: 2rem; }
@media (max-width: 560px) { .cmp-edit { grid-template-columns: 1fr; } .cmp-vs input { margin-top: 0; } }

/* scene editor */
.se { display: grid; gap: 0.6rem; }
.se-stage, .se-playing { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border-radius: var(--r); border: 2px solid var(--edge); background: #f7f5ef center / cover no-repeat; container-type: inline-size; touch-action: none; user-select: none; }
.se-item { position: absolute; transform: translate(-50%, -50%); cursor: grab; outline: 2px dashed transparent; outline-offset: 2px; border-radius: 6px; }
.se-item img { width: 100%; pointer-events: none; }
.se-item.is-flip img { transform: scaleX(-1); }
.se-item:hover { outline-color: rgb(36 90 231 / 0.45); }
.se-item.is-sel { outline: 2px solid #245ae7; }
.se-item:active { cursor: grabbing; }
.se-text { font-family: var(--display); font-weight: 850; letter-spacing: -0.02em; line-height: 1.02; color: #172435; white-space: nowrap; }
.se-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.se-tools .asset-pick { width: 120px; }
.se-tools .asset-pick img { width: 104px; height: 58px; object-fit: cover; }
.se-item-panel { display: grid; gap: 0.6rem; padding: 0.75rem; border-radius: var(--r); background: var(--cobalt-soft); }

/* topics */
.t-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.t-sub { margin-left: clamp(1rem, 4vw, 3rem); }
.t-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.7rem; background: var(--t-soft); border: 1.5px solid var(--edge); border-radius: var(--r); }
.t-row.is-sub { grid-template-columns: minmax(0, 1fr) auto; background: var(--card); border-color: var(--line); }
.t-fields { display: grid; gap: 0.35rem; min-width: 0; }
.t-tools { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; justify-content: flex-end; }
.t-tools select { width: auto !important; }
.t-tools > button:not(.btn) { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; font-weight: 800; }
.t-tools > button:not(.btn):hover:not(:disabled) { background: var(--card); }
.t-tools > button:disabled { opacity: 0.3; }
.t-n { font-size: 0.8rem; font-weight: 700; color: var(--ink-faint); }
@media (max-width: 760px) { .t-row, .t-row.is-sub { grid-template-columns: minmax(0, 1fr); } .t-tools { justify-content: flex-start; } }

/* picker */
.picker { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgb(11 19 31 / 0.55); }
.picker-box { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(980px, 100%); max-height: min(86vh, 900px); background: var(--paper); border: 2px solid var(--edge); border-radius: var(--r-lg); box-shadow: var(--pop-lg); overflow: hidden; }
.picker-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); background: var(--card); }
.picker-head h2 { font-family: var(--display); font-weight: 850; font-size: 1.15rem; margin-right: auto; }
.picker-head input { flex: 1 1 220px; min-height: 40px; padding: 0 0.9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); }
.picker-x { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.picker-x:hover { background: var(--paper-deep); }
.picker-x svg { width: 18px; height: 18px; }
.picker-body { overflow-y: auto; padding: 0.5rem 1rem 1.25rem; }
.picker-body h3 { font-family: var(--display); font-weight: 850; font-size: 0.95rem; margin: 1rem 0 0.5rem; }
.picker-body .lib-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.picker-body .lib-grid.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.picker-body .asset.wide .thumb { aspect-ratio: 16 / 9; }
.picker-body .asset.wide .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
[hidden] { display: none !important; }

/* studio: animation import */
.drop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; padding: 1.4rem; border: 2.5px dashed var(--ink-faint); border-radius: var(--r-lg); background: var(--card); transition: border-color 0.15s, background-color 0.15s; }
.drop.is-over { border-color: var(--cobalt); background: var(--cobalt-soft); }
.drop h2 { font-family: var(--display); font-weight: 850; font-size: 1.25rem; margin-bottom: 0.3rem; }
.drop p { color: var(--ink-soft); margin-bottom: 0.8rem; max-width: 62ch; }
@media (max-width: 560px) { .drop { grid-template-columns: 1fr; } }
.imp-proj { display: grid; gap: 1rem; margin-top: 1.25rem; padding: 1.25rem; border: 2px solid var(--edge); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--pop); }
.imp-proj-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: start; }
.imp-proj-head > div:first-child { display: grid; gap: 0.3rem; }
.imp-scenes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 0.75rem; }
.imp-scene { position: relative; display: grid; gap: 0.4rem; padding: 0.5rem; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--paper); }
.imp-scene.is-on { border-color: var(--cobalt); box-shadow: 0 0 0 2px var(--cobalt); }
.imp-scene input { position: absolute; top: 0.9rem; left: 0.9rem; width: 20px; height: 20px; accent-color: var(--cobalt); z-index: 1; }
.imp-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #f7f5ef; }
.imp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.imp-name { display: grid; line-height: 1.3; }
.imp-name small { color: var(--ink-faint); font-weight: 600; }
.imp-log { font-size: 0.82rem; font-weight: 700; color: var(--cobalt); min-height: 1.2em; }
.clip-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.clip-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.6rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); }
.clip-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #f7f5ef; }
.clip-thumb img { width: 100%; height: 100%; object-fit: contain; }
.clip-meta { display: grid; gap: 0.1rem; min-width: 0; }
.clip-meta small { color: var(--ink-faint); font-weight: 600; }
.clip-meta code { font-size: 0.75rem; color: var(--ink-faint); word-break: break-all; }
@media (max-width: 700px) { .clip-item { grid-template-columns: 100px minmax(0, 1fr); } .clip-item > .row { grid-column: 1 / -1; } }

/* props are drawn in navy ink, so in dark mode they sit on a small cream tile */
.compare-side img, .callout img, .asset-pick img { background: var(--prop-bg); padding: var(--prop-pad); border-radius: 14px; }
.inline-prop { background: var(--prop-bg); border-radius: 6px; padding: calc(var(--prop-pad) / 3); }
.asset-pick.is-wide { width: 150px; word-break: normal; }
.asset-pick.is-wide img { width: 134px; height: 75px; object-fit: contain; }

.info-prose { margin-top: 2rem; }
.wanted-empty { color: #aab4c3; }
a.filter, a.sub { text-decoration: none; }

/* studio: questions, analytics, settings */
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cobalt); color: #fff; font-size: 0.72rem; font-weight: 800; }
.q-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; margin-top: 0.75rem; }
.q-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0.4rem 1rem; align-items: start; padding: 0.8rem 0.9rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); }
.q-row > .row { grid-column: 2; }
.q-row select { min-height: 36px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); padding: 0 0.7rem; font-weight: 700; font-size: 0.88rem; max-width: 220px; }
.q-votes { display: grid; justify-items: center; padding: 0.35rem; border-radius: 12px; background: var(--paper-deep); font-variant-numeric: tabular-nums; }
.q-votes b { font-family: var(--display); font-size: 1.3rem; line-height: 1; }
.q-votes small { font-size: 0.72rem; color: var(--ink-faint); font-weight: 700; }
.q-main { display: grid; gap: 0.2rem; min-width: 0; }
.q-text { font-weight: 700; font-size: 1.05rem; }
.q-main small { color: var(--ink-faint); font-weight: 600; }
.q-edit { width: 100%; min-height: 40px; padding: 0.4rem 0.7rem; border: 1.5px solid var(--cobalt); border-radius: 10px; background: var(--paper); }
.ignore-me { margin-bottom: 1rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.kpi { display: grid; gap: 0.15rem; padding: 0.9rem 1rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); }
.kpi span { font-weight: 800; font-size: 0.82rem; color: var(--ink-soft); }
.kpi b { font-family: var(--display); font-weight: 850; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--ink-faint); font-size: 0.8rem; }
.chart { position: relative; display: grid; gap: 0.5rem; padding: 1rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); margin-bottom: 1rem; }
.chart-legend { display: flex; gap: 1rem; font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); }
.chart-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.sw1 { background: var(--s1); } .sw2 { background: var(--s2); }
.chart-box { position: relative; overflow-x: auto; }
.chart svg { width: 100%; min-width: 520px; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-faint); font-size: 11px; font-family: var(--body); }
.chart .lbl { fill: var(--ink-soft); font-size: 12px; font-weight: 700; font-family: var(--body); font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln1 { stroke: var(--s1); } .chart .ln2 { stroke: var(--s2); }
.chart .dot1 { fill: var(--s1); stroke: var(--card); stroke-width: 2; } .chart .dot2 { fill: var(--s2); stroke: var(--card); stroke-width: 2; }
.chart .hover-line { stroke: var(--ink-faint); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tip { position: absolute; top: 8px; display: grid; gap: 0.15rem; min-width: 150px; padding: 0.5rem 0.7rem; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 0.82rem; pointer-events: none; font-variant-numeric: tabular-nums; }
.chart-tip span { display: flex; align-items: center; gap: 0.4rem; }
.chart-table summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--ink-faint); }
.chart-table table, .an-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td, .an-table th, .an-table td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); }
.an-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); }
.table-wrap { overflow-x: auto; }
.an-card { display: grid; gap: 0.6rem; align-content: start; padding: 1rem 1.1rem; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); margin-bottom: 1rem; }
.an-card h2 { font-family: var(--display); font-weight: 850; font-size: 1.05rem; }
.an-card h3 { font-weight: 800; font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.5rem; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 0 1rem; }
.bars { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; font-size: 0.9rem; }
.bars.plain li { grid-template-columns: minmax(0, 1fr) auto; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bar-track { height: 8px; border-radius: 4px; background: var(--paper-deep); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 4px; background: var(--s1); }
.bar-val { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.bar-val small { margin-left: 0.35rem; font-weight: 600; color: var(--ink-faint); }
.searches { list-style: none; padding: 0; display: grid; gap: 0.3rem; }
.searches li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.searches li span { font-weight: 700; }
.searches li small { color: var(--ink-faint); }
.searches li.miss small { color: #b86b00; font-weight: 700; }
.launch ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.launch li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.95rem; }
.launch li span { display: grid; }
.launch li small { color: var(--ink-faint); }
.launch li svg { width: 18px; height: 18px; flex: none; color: #1c6b4c; margin-top: 2px; }
.launch .dot { width: 14px; height: 14px; flex: none; margin: 3px 2px 0; border-radius: 50%; border: 2px solid var(--ink-faint); }
.login-page { max-width: 460px; }
.login-form { display: grid; gap: 0.6rem; width: 100%; }
.login-form input { min-height: 48px; padding: 0 1rem; border: 2px solid var(--edge); border-radius: 12px; background: var(--card); font-size: 1.05rem; }
.f-l { font-weight: 800; font-size: 0.85rem; color: var(--ink-soft); }
