/* =========================================================
   Skritter Landing — ported from Fiona's Claude Design
   Brand: secondary #32BFB2 (teal) · tertiary-darken-1 #6436FF
   Text: black (#15141B); grey reserved for minor captions.
   ========================================================= */

/* Stand-in fonts shown until Roboto and Caveat download. Arial, scaled to the
   same text width, so lines wrap the same way before and after the swap and
   the page does not jump (measured: Roboto 400-500 = 99.7% of Arial,
   Roboto 700-900 = 94.5% of Arial Bold, Caveat 700 = 70.5% of Arial Bold). */
@font-face { font-family: 'Roboto Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 100 500; size-adjust: 99.7%; }
@font-face { font-family: 'Roboto Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 900; size-adjust: 94.5%; }
@font-face { font-family: 'Caveat Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 100 900; size-adjust: 70.5%; }

/* :host lets the same tokens apply inside the shadow roots used by site/js/chrome.js */
:root, :host {
  --ink: #15141B;
  --secondary: #32BFB2;        /* teal highlight */
  --secondary-dark: #0C8C7B;   /* teal, dark enough for text on light teal */
  --secondary-tint: #DEF6F1;
  --tertiary: #6436FF;         /* purple highlight */
  --tertiary-dark: #4A3CD4;
  --tertiary-tint: #EEEBFD;
  --pink: #ED4C9C;
  --amber: #F5A524;
  --bg: #FBFAFE;
  --line: #ECEAF3;
  --line-soft: #F0EEF6;
  --grey: #6B6A78;             /* rare-use caption grey */
  --grey-faint: #9D9BAA;       /* rare-use metadata grey */
  --grey-tint: #F2F2F2;        /* neutral pale grey, no purple cast (Features B strips not picked) */
  --font-ui: 'Roboto', 'Roboto Fallback', system-ui, sans-serif;
  --font-hand: 'Caveat', 'Caveat Fallback', cursive;
  --font-kai: 'Kaiti TC', 'STKaiti', 'BiauKai', 'DFKai-SB', serif;
  --sec-py: 50px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font-ui);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--tertiary); }
::selection { background: #DAD3FB; }
.cjk { font-family: var(--font-kai); }

@keyframes sk-float  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes sk-float2 { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(-2deg); } }
@keyframes sk-pop    { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes sk-rise   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sk-pulse  { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* ---------- Buttons ---------- */
.btn {
  font-weight: 600;
  border-radius: 11px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--tertiary);
  color: #fff;
  font-size: 14.5px;
  padding: 11px 19px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(100,54,255,.2); }
.btn-lg { font-size: 16px; padding: 15px 26px; border-radius: 13px; }
.btn-lg:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(100,54,255,.22); }
.btn-white {
  background: #fff;
  color: var(--tertiary);
  font-weight: 700;
  font-size: 16.5px;
  padding: 16px 30px;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.btn-white:hover { transform: translateY(-2px); }
.btn-block { display: block; width: 100%; padding: 14px; font-weight: 700; font-size: 15.5px; border-radius: 12px; }
.btn-block:hover { background: var(--tertiary-dark); box-shadow: 0 4px 10px rgba(100,54,255,.2); transform: none; }
.btn-ghost {
  padding: 13px 18px;
  border: 1px solid #E4E1EE;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}
.btn-ghost:hover { border-color: #D9D3F6; }

/* Segmented controls */
.seg {
  display: inline-flex;
  gap: 4px;
  background: #F3F1F9;
  border: 1px solid #E7E3F1;
  padding: 5px;
  border-radius: 13px;
}
.seg button {
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  transition: all .18s;
  color: var(--grey);
  display: flex;
  align-items: center;
  gap: 7px;
}
.seg button.active { color: var(--ink); background: #fff; }
.seg--solid { border-radius: 11px; background: #fff; box-shadow: 0 2px 8px rgba(20,19,32,.04); }
.seg--solid button { padding: 8px 16px; border-radius: 8px; font-size: 13.5px; }
.seg--solid button.active { background: var(--tertiary); color: #fff; }
.seg--center { border-radius: 12px; margin-bottom: 16px; }
.seg--center button.active { background: var(--tertiary); color: #fff; }

/* ---------- Page frame & device toggle ---------- */
.page { min-height: 100vh; background: #FFFFFFEB; }
.frame { margin: 0 auto; width: 100%; }
body.mobile-view .frame {
  max-width: 412px;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(20,19,32,.22);
  border: 1px solid #E4E1EE;
  overflow: hidden;
  /* see-through, so the page's near-white shows as on a real phone (an opaque --bg reads lavender beside it) */
  background: transparent;
  margin-top: 22px;
  margin-bottom: 22px;
}

.device-toggle {
  position: fixed;
  /* bottom-left: bottom-right belongs to the Help Scout Beacon */
  left: 18px;
  bottom: 18px;
  z-index: 70;
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid #E4E1EE;
  padding: 5px;
  border-radius: 13px;
  box-shadow: 0 10px 30px rgba(20,19,32,.16);
}
.device-toggle button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  transition: all .18s;
  color: var(--grey);
}
.device-toggle button.active { color: #fff; background: var(--tertiary); }
.device-toggle--variant { bottom: 68px; }

/* the body is the card, sized to its content; padding cancelled by
   negative margin keeps the heading exactly on its line, and the line is
   drawn above the card edge */

/* the card paints over its line on both sides, so an open card hides the
   line's end and dot (a closed card is transparent, so the dot shows) */

/* hand-drawn frame like the Get Started button, in teal on white; it
   stretches with the card while the stroke keeps its width */

/* headings sit close together around the phone's middle with a fixed gap,
   so the gaps stay equal as a card expands */

/* scatter the groups so they feel loosely placed rather than aligned;
   main.js keeps every line's origin pinned to the phone edge */

/* the top lines hang below their heading; keep them out of the spacing so
   the equal gaps are measured between the visible headings and cards */

/* collapsed to zero height; grid rows animate 0fr -> 1fr to expand */

.hero.hero--callouts .hero-callout-cards img { box-shadow: none; }

/* description lines in regular weight; 700+ heading at one size */

.hero.hero--callouts .hero-callout-text { font-weight: 400; }

/* the hero: the items line sits under the heading as "HSK / TOCFL / JLPT"
   (teal slashes, no checks), with the description below it in smaller
   caption grey. The pop-up notes on mobile get the same treatment */
:is(.hero.hero--callouts, .hero-note-pop) .hero-callout-text { font-size: 13px; color: var(--grey); }

/* on the mobile sticky notes (open, and the miniature left on a read note)
   the descriptions are black for legibility */
.hero-note-pop .hero-callout-text,
.hero.hero--callouts .hero-note-mini .hero-callout-text { color: var(--ink); }

:is(.hero.hero--callouts, .hero-note-pop, .lang-col) .hero-callout-list li + li::before { content: "/"; margin-right: 12px; color: var(--secondary); }

/* Chinese 2x2: a slash only between the two columns, so they line up */
.hero.hero--callouts .hero-callout-list--cols li:nth-child(odd) { justify-self: end; }

:is(.hero.hero--callouts, .hero-note-pop) .hero-callout-list--cols li:nth-child(odd)::before { content: none; }

.hero.hero--callouts .hero-callout-list--cols li:nth-child(even) { justify-self: start; }

.hero-note-pop .hero-callout-list--cols li { gap: 0; justify-self: start; }

/* Spaced repetition: "80% long-term word retention" is an ordinary
   description line; the figure stands out in bold brand teal */
.hero-callout-figure {
  font-weight: 700;
  color: var(--secondary);
}

/* on the green sticky notes (open, and the miniature left on a read note)
   the marks take the headings' stronger highlighter teal (brand teal at
   .45, as in the heading stroke) */

/* set measures so the descriptions sit on a fixed number of lines
   (Exam Prep one, Chinese and Japanese two); the right edge stays on the
   heading's edge and any extra width runs left, away from the phone,
   without widening the callout (which would push its heading out of line) */

.hero.hero--callouts .hero-callouts--left .hero-callout-body { min-width: 0; }

.hero.hero--callouts .hero-callout--lm .hero-callout-text { white-space: nowrap; width: 300px; margin-left: calc(100% - 300px); }

.hero.hero--callouts .hero-callout--lt .hero-callout-text { width: 280px; margin-left: calc(100% - 280px); }

.hero.hero--callouts .hero-callout--lb .hero-callout-text { width: 270px; margin-left: calc(100% - 270px); }

.hero.hero--callouts .hero-callout-stat strong { font-size: 1em; }

/* headings get a hand-drawn highlighter swipe behind them: two
   overlapping, gently tilted passes with ragged edges (darker where they
   overlap). It runs a little past the text on the outer side only, so it
   never reaches the line's dot. The mobile sticky notes reuse it. Brand teal #32BFB2 (= --secondary),
   written out because it lives in an SVG data URI */

.hero.hero--callouts .hero-callout-title,
.hero.hero--callouts .hero-callout-stat,
.hero-note-pop .hero-callout-title,
.hero-note-pop .hero-callout-stat,
.ways-web-title {
  display: inline-block;
  padding: 0 10px;
  margin: 0 -10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%2332BFB2' fill-opacity='.45' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%2332BFB2' fill-opacity='.25' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat 0 92% / 100% 72%;
}

.hero.hero--callouts .hero-callouts--left :is(.hero-callout-title, .hero-callout-stat) { padding-right: 0; margin-right: 0; }

.hero.hero--callouts .hero-callouts--right :is(.hero-callout-title, .hero-callout-stat) { padding-left: 0; margin-left: 0; }

/* demo video in place of the drawn phone. The 900x1900 video has a white
   margin around its phone (the black bezel spans x 32-867 / y 74-1824),
   so it is scaled up and pulled in until the bezel fills the .hero-phone
   box exactly, keeping the drawn phone's width; the box is clipped to the
   phone's rounded outline so the leftover white is cut away (it showed as
   a white ring on the dark theme), and nothing behind shows through */
/* flow-root keeps the video's negative margins from collapsing through */
.hero-phone--video { display: flow-root; clip-path: inset(0 round 18% / 8.3%); }
.hero-phone-video {
  display: block;
  width: 107.66%;
  /* with the width/height attributes this holds the 900:1900 space before the poster loads */
  height: auto;
  aspect-ratio: 900 / 1900;
  margin: -8.852% 0 -8.971% -3.828%;
}

body.mobile-view .hero.hero--callouts h1 { text-align: center; }

@media (max-width: 720px) {
  
  .hero.hero--callouts h1 { text-align: center; }
  
}

.hero-notes { display: none; }

body.mobile-view .hero.hero--callouts .hero-b-stage { isolation: isolate; }

body.mobile-view .hero.hero--callouts .hero-notes { display: block; position: absolute; inset: 0; z-index: -1; pointer-events: none; }

body.mobile-view .hero.hero--callouts .hero-note { pointer-events: auto; cursor: pointer; padding: 0; border: 0; }

body.mobile-view .hero.hero--callouts .hero-note {
  position: absolute;
  width: 104px;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--secondary-tint);
  box-shadow: 0 6px 4px -4px rgba(20,19,32,.1);
  animation: note-peek .7s cubic-bezier(.2,.7,.2,1) both;
}

body.mobile-view .hero.hero--callouts .hero-note--l1 { top: 16%; right: 50%; --tx: -60px; --rot: -10deg; animation-delay: .5s; }

body.mobile-view .hero.hero--callouts .hero-note--l2 { top: 54%; right: 50%; --tx: -48px; --rot: 7deg; animation-delay: .7s; background: color-mix(in srgb, var(--secondary) 45%, #fff); }

body.mobile-view .hero.hero--callouts .hero-note--r1 { top: 30%; left: 50%; --tx: 58px; --rot: 9deg; animation-delay: .6s; background: color-mix(in srgb, var(--secondary) 45%, #fff); }

body.mobile-view .hero.hero--callouts .hero-note--r2 { top: 66%; left: 50%; --tx: 50px; --rot: -6deg; animation-delay: .8s; }

@media (max-width: 900px) {
  
  .hero.hero--callouts .hero-b-stage { isolation: isolate; }
  
  
  .hero.hero--callouts .hero-notes { display: block; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
  
  
  .hero.hero--callouts .hero-note { pointer-events: auto; cursor: pointer; padding: 0; border: 0; }
  
  
  .hero.hero--callouts .hero-note {
    position: absolute;
    width: 104px;
    aspect-ratio: 1;
    border-radius: 3px;
    background: var(--secondary-tint);
    box-shadow: 0 6px 4px -4px rgba(20,19,32,.1);
    animation: note-peek .7s cubic-bezier(.2,.7,.2,1) both;
  }
  
  
  .hero.hero--callouts .hero-note--l1 { top: 16%; right: 50%; --tx: -60px; --rot: -10deg; animation-delay: .5s; }
  
  
  .hero.hero--callouts .hero-note--l2 { top: 54%; right: 50%; --tx: -48px; --rot: 7deg; animation-delay: .7s; background: color-mix(in srgb, var(--secondary) 45%, #fff); }
  
  
  .hero.hero--callouts .hero-note--r1 { top: 30%; left: 50%; --tx: 58px; --rot: 9deg; animation-delay: .6s; background: color-mix(in srgb, var(--secondary) 45%, #fff); }
  
  
  .hero.hero--callouts .hero-note--r2 { top: 66%; left: 50%; --tx: 50px; --rot: -6deg; animation-delay: .8s; }
  
}
/* a tapped note flies to the front, enlarged, with its callouts'
   content; tapping the dimmed space around it sends it back (main.js) */
.hero-note-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20,19,32,.18);
  opacity: 0;
  transition: opacity .35s ease;
}
.hero-note-backdrop.is-in { opacity: 1; }
.hero-note-pop {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 91;
  width: min(320px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding: 22px 22px 24px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(20,19,32,.16);
  text-align: left;
  transform-origin: center;
  /* the colour shifts to the light tint on the way out and back on return */
  transition: transform .45s cubic-bezier(.2,.7,.2,1), background-color .45s ease;
}
/* a note that has been opened keeps a miniature of its content (main.js);
   only the part peeking out from behind the phone shows */
.hero-note.has-mini { overflow: hidden; }
.hero-note-pop.hero-note-mini {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: auto;
  max-width: none;
  max-height: none;
  overflow: visible;
  background: none;
  box-shadow: none;
  transform-origin: 0 0;
  transition: none;
  pointer-events: none;
  color: var(--ink); /* not the faint grey of the unrelated .hero-note caption style */
}
.hero-note-mini .hero-note-pop-content { opacity: 1; transition: none; }
/* the hero's desktop column rule would otherwise right-align the Chinese 2x2 */
.hero .hero-note-mini .hero-callout-list--cols li:nth-child(n) { justify-self: start; }
/* notes on the right of the phone show their outer (right) edge, so their
   miniature is right-aligned to put the content there */
.hero-note:is(.hero-note--r1, .hero-note--r2) .hero-note-mini { text-align: right; }
.hero-note:is(.hero-note--r1, .hero-note--r2) .hero-note-mini :is(.hero-callout-list, .hero-callout-cards) { justify-content: flex-end; }
/* the hero's notes sit clear of the phone, so every miniature stays left-aligned */
.hero.hero--callouts .hero-note .hero-note-mini { text-align: left; }
.hero.hero--callouts .hero-note .hero-note-mini :is(.hero-callout-list, .hero-callout-cards) { justify-content: flex-start; }
/* notes marked data-hug (Spaced repetition) size to their content */
.hero-note-pop--hug { width: fit-content; max-width: min(320px, calc(100vw - 48px)); }
.hero-note-pop-content { opacity: 0; transition: opacity .25s ease; }
.hero-note-pop.is-in .hero-note-pop-content { opacity: 1; transition-delay: .15s; }
.hero-note-pop section + section { margin-top: 18px; }
.hero-note-pop .hero-callout-list { justify-content: flex-start; }
/* Chinese 2x2: each check sits at its column's right edge so they line up */
.hero-note-pop .hero-callout-list--cols li { display: flex; justify-content: space-between; gap: 6px; }
.hero-note-pop .hero-callout-stat strong { font-size: 1em; }

.hero-note-pop .hero-callout-text { font-weight: 400; }
@media (prefers-reduced-motion: reduce) {
  .hero-note-pop, .hero-note-backdrop, .hero-note-pop-content { transition: none; }
}
@keyframes note-peek {
  from { transform: translateX(0) rotate(0deg); }
  to { transform: translateX(var(--tx)) rotate(var(--rot)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-note { animation-duration: 0s; animation-delay: 0s; }
}
/* an unread note shows a big handwritten "?" centred in the part that
   peeks out from behind the phone; reading it swaps this for its content
   (main.js). The phone is 200px wide here and each note slides --tx out
   from the middle, so 100px minus that much of the note is covered */
.hero .hero-note:not(.has-mini)::after {
  content: "?";
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-hand);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: var(--secondary-dark);
}
.hero :is(.hero-note--l1, .hero-note--l2):not(.has-mini)::after { left: 0; width: calc(100% - 100px - var(--tx)); }
.hero :is(.hero-note--r1, .hero-note--r2):not(.has-mini)::after { right: 0; width: calc(100% - 100px + var(--tx)); }
/* the hinted note (.hero-note--hint: the top-right one, or the top one in
   the hero) wiggles now and then, inviting a tap, until it's read */
@keyframes note-wiggle {
  0%, 72%, 100% { transform: translateX(var(--tx)) rotate(var(--rot)); }
  78% { transform: translateX(var(--tx)) rotate(calc(var(--rot) + 4deg)); }
  84% { transform: translateX(var(--tx)) rotate(calc(var(--rot) - 3deg)); }
  90% { transform: translateX(var(--tx)) rotate(calc(var(--rot) + 2deg)); }
  95% { transform: translateX(var(--tx)) rotate(calc(var(--rot) - 1deg)); }
}
@media (prefers-reduced-motion: no-preference) {
  body.mobile-view .hero .hero-note--hint:not(.has-mini) {
    animation: note-peek .7s cubic-bezier(.2,.7,.2,1) .6s both, note-wiggle 3s ease-in-out 1.3s infinite;
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 900px) {
  .hero .hero-note--hint:not(.has-mini) {
    animation: note-peek .7s cubic-bezier(.2,.7,.2,1) .6s both, note-wiggle 3s ease-in-out 1.3s infinite;
  }
}
/* ...with a gently curved hand-drawn teal arrow pointing down to it, in the
   space between the phone and the screen edge; it fades in once the
   notes have slid out and goes when the note is read */
.hero-note-hint {
  position: absolute;
  top: calc(30% - 52px);
  left: calc(50% + 110px);
  margin-top: 24px; /* the notes pick up this top margin from the unrelated .hero-note caption style */
  width: 52px;
  height: 52px;
  overflow: visible;
  fill: none;
  stroke: var(--secondary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  animation: hint-in .4s ease 1.3s both;
}
/* the moment its note is tapped, the arrow (and the hero's "Tap!") shrinks away
   down into the note, as if the note swallowed it */
.hero-notes:has(.hero-note--hint.was-tapped) :is(.hero-note-hint, .hero-note-tap) { animation: hint-out .35s ease-in both; }
@keyframes hint-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hint-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translate(-8px, 12px) scale(.4); }
}
.hero-note-hint { transform-origin: 40% 90%; }
/* the hero's "Tap!" beside the arrow, in the headings' Caveat */
.hero-note-tap { display: none; }
/* the hero mobile: the phone sits on the left and the four notes stack down the
   space between it and the right edge, centred there and clear of the phone
   (so a read note's miniature isn't hidden), spread over the phone's height.
   They tilt in where they sit rather than sliding out from behind it. The
   stage fills the row so the notes' column can start at the phone's 200px
   edge. Each unread note shows its heading in the headings' Caveat instead
   of a "?". "Tap!" sits just above the top note's edge, 6px in from its
   left (the notes' column is centred 100px right of the middle, as it
   starts at the phone's 200px edge), and a short arrow runs from just past
   the "!" round and down onto the note. Both turn about the note's centre
   by its -10deg tilt, so they stay parallel to its edge */
body.mobile-view .hero.hero--callouts .hero-b-stage { flex: 1; }
body.mobile-view .hero.hero--callouts .hero-phone { margin: 0; }
body.mobile-view .hero.hero--callouts .hero-notes { display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 24px 0 0 200px; }
body.mobile-view .hero.hero--callouts .hero-note { position: relative; top: auto; right: auto; left: auto; width: 120px; margin: 0; flex: none; --tx: 0px; }
body.mobile-view .hero.hero--callouts .hero-note-hint { top: -3px; left: calc(50% + 84px); margin-top: 0; transform-origin: 16px 77px; rotate: -10deg; }
body.mobile-view .hero.hero--callouts .hero-note-tap { display: block; position: absolute; top: -6px; left: calc(50% + 46px); transform-origin: 54px 80px; rotate: -10deg; }
@media (max-width: 900px) {
  .hero.hero--callouts .hero-b-stage { flex: 1; }
  .hero.hero--callouts .hero-phone { margin: 0; }
  .hero.hero--callouts .hero-notes { display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 24px 0 0 200px; }
  .hero.hero--callouts .hero-note { position: relative; top: auto; right: auto; left: auto; width: 120px; margin: 0; flex: none; --tx: 0px; }
  .hero.hero--callouts .hero-note-hint { top: -3px; left: calc(50% + 84px); margin-top: 0; transform-origin: 16px 77px; rotate: -10deg; }
  .hero.hero--callouts .hero-note-tap { display: block; position: absolute; top: -6px; left: calc(50% + 46px); transform-origin: 54px 80px; rotate: -10deg; }
}
.hero-note-tap {
  font-family: var(--font-hand);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--secondary); /* same as its arrow */
  pointer-events: none;
  animation: hint-in .4s ease 1.3s both;
}
/* the hero: a note turns the light tint once it's been opened, and stays so
   (it changes the moment it's tapped, while hidden behind its pop, so the
   pop flies back light too) */
body.mobile-view .hero.hero--callouts .hero-note.was-tapped,
.hero.hero--callouts .hero-note.was-tapped.was-tapped { background: var(--secondary-tint); }
.hero-note-title { display: none; }
.hero.hero--callouts .hero-note:not(.has-mini)::after { content: none; }
.hero.hero--callouts .hero-note:not(.has-mini) .hero-note-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6px;
  font-family: var(--font-hand);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
}
/* 700+ official decks: a big "700+" (the desktop heading's 42px) over
   "official decks" on one line, sized down to fit the note */
.hero.hero--callouts .hero-note:not(.has-mini) .hero-note-title--stat { font-size: 23px; white-space: nowrap; align-content: center; }
.hero.hero--callouts .hero-note:not(.has-mini) .hero-note-title--stat strong { display: block; font-size: 42px; font-weight: 700; }
/* 80% in brand teal to match its rising arrow */

/* 700+'s description widens to sit on two lines where there's room on
   the right; narrower screens keep it inside the column */
@media (min-width: 1200px) {
  
  .hero.hero--callouts .hero-callout--rm .hero-callout-text { width: 360px; }
  
}

/* Chinese 2x2: tags in a column share its width, so the checks line up */

/* tap only: hover and the focus left behind by a tap don't open a card */

/* ---------- Hero variant comparison (build tool) ---------- */

/* ---------- Hero variant C: full-bleed artwork, tagline, big CTA ---------- */

/* soft scrim so the tagline reads over the doors; fades out before the critters */

/* teal-on-teal would vanish against the artwork: the Caveat face alone marks the accent */

/* ---------- Hero variant B: tagline -> centred screenshot -> CTA ---------- */
.hero { text-align: center; }
/* .hero.hero--callouts out-specifies the base .hero h1 margin so auto margins centre it */
.hero.hero--callouts h1 {
  max-width: 860px;
  margin: 0 auto 34px;
  text-wrap: balance;
}
/* Handwritten language word: both words share one grid cell so the line
   keeps the wider word's width and never jumps; letters are wiped in
   left to right like a pen stroke, then the word fades before the next */

@keyframes hw-letter { to { clip-path: inset(-30% -20% -30% 0); } }

.hero-b-visual { display: flex; justify-content: center; margin: 0 0 30px; }
/* size the phone by viewport height so the CTA stays above the fold on
   shorter laptops and the phone grows on taller displays (603:1304 screen) */
.hero .hero-phone {
  width: clamp(190px, calc(50vh * .4624), 260px);
  min-width: 0;
  margin: 0 auto;
}
.hero .hero-actions { align-items: center; }
body.mobile-view .hero .hero-phone { width: 200px; }

/* Hand-drawn callouts: note-style lines from the phone out to three
   feature headings, two on the left and one on the right */
.hero-b-stage { position: relative; }
/* each line ends level with its group's first heading (y=16 in the svg) */
/* one column per side, spread over the phone's height so the groups
   push each other apart instead of overlapping as content grows */
.hero-callouts {
  position: absolute;
  top: 6%;
  bottom: 4%;
  width: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
/* the phone shrinks with the viewport height but the callout content
   doesn't, so on short laptop screens the groups crushed together. Below
   ~500px of phone the stage stops shrinking and centres the phone in it,
   keeping at least the spacing seen on a tall screen */
@media (min-width: 901px) {
  body:not(.mobile-view) .hero.hero--callouts .hero-b-stage { display: flex; align-items: center; min-height: 500px; }
  
}
.hero-callouts--left  { right: 100%; }
.hero-callouts--right { left: 100%; }
.hero-callout {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.hero-callout-body { flex: 1; }
.hero-callout--lt .hero-callout-body,
.hero-callout--lm .hero-callout-body,
.hero-callout--lb .hero-callout-body { text-align: right; }
.hero-callout--rt .hero-callout-body,
.hero-callout--rm .hero-callout-body,
.hero-callout--rb .hero-callout-body { text-align: left; }
.hero-callout-line {
  flex: none;
  width: 90px;
  overflow: visible;
  fill: none;
  stroke: var(--secondary);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.hero-callout-line circle { fill: var(--secondary); stroke: none; }
/* the Get Started branch is drawn in the CTA purple */
.hero-callout-line--cta { stroke: var(--tertiary); }
.hero-callout-line--cta circle { fill: var(--tertiary); }
/* Get Started drawn as a jittery hand-sketched box, filled purple */

.hero-callout--rm .hero-callout-line { height: 32px; }
/* the CTA's rising line ends level with the middle of the button, not a heading */
.hero-callouts .hero-callout--cta .hero-callout-line { margin-top: -46px; }
.hero-callout-line { height: 90px; }
.hero-callout--lm .hero-callout-line { height: 32px; }
/* bottom lines rise to the phone, so they start above the heading */
.hero-callout--lb .hero-callout-line,
.hero-callout--rb .hero-callout-line { margin-top: -60px; }
.hero-callout-title {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  line-height: 32px;
  color: var(--ink);
}
.hero-callout-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
}
.hero-callout--lt .hero-callout-list,
.hero-callout--lm .hero-callout-list,
.hero-callout--lb .hero-callout-list { justify-content: flex-end; }
.hero-callout-list li { white-space: nowrap; }
.hero-callout-list + .hero-callout-list { margin-top: 2px; }
/* 2x2 items laid out in columns so the checks line up down each column */
.hero-callout-list--cols { display: grid; grid-template-columns: auto auto; }
.hero-callout--lt .hero-callout-list--cols { justify-content: end; }
/* an item that keeps a row to itself so related items wrap together */
.hero-callout-list .is-row { flex-basis: 100%; }
/* deck covers dealt like playing cards: tilted, overlapping a little */
.hero-callout-cards { display: flex; margin: 14px 0 0 4px; }
.hero-callout--lm .hero-callout-cards { justify-content: flex-end; margin: 14px 4px 0 0; }
.hero-callout-cards img {
  width: 62px;
  aspect-ratio: 351/512;
  border-radius: 9px;
  box-shadow: 0 6px 14px rgba(20,19,32,.16);
  transition: transform .18s ease;
}
.hero-callout-cards img + img { margin-left: -16px; }
.hero-callout-cards img:nth-child(1) { transform: rotate(-8deg); }
.hero-callout-cards img:nth-child(2) { transform: rotate(4deg) translateY(6px); }
.hero-callout-cards img:nth-child(3) { transform: rotate(-3deg) translateY(-2px); }
.hero-callout-cards img:nth-child(4) { transform: rotate(7deg) translateY(4px); }
.hero-callout-cards img:nth-child(5) { transform: rotate(-5deg); }
/* oversized figure under a heading (Spaced repetition's 80%↑) */

/* hand-drawn up arrow (Caveat has no ↑ glyph) */

.hero-callout-text {
  margin: 4px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
}
/* "700+ official decks" heads its own branch: big bold number, body-size label */
.hero-callout-stat {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  line-height: 32px;
  color: var(--ink);
}
.hero-callout-stat strong {
  font-size: 42px;
  font-weight: 700;
  margin-right: 6px;
}

/* mobile layout still to be designed: hide the callouts there for now */
body.mobile-view .hero-callouts { display: none; }
@media (max-width: 900px) { .hero-callouts { display: none; } }
/* the CTA moves into a callout on desktop; keep the stacked one where callouts are hidden */
@media (min-width: 901px) {
  body:not(.mobile-view) .hero-b-actions { display: none; }
  body:not(.mobile-view) .hero-b-visual { margin-bottom: 0; }
}

/* ---------- Announcement bar ---------- */
.announce {
  background: linear-gradient(90deg, var(--secondary), var(--tertiary));
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 44px 9px 16px;
  position: relative;
  letter-spacing: .1px;
}
.announce b { font-weight: 700; }
.announce-tag { text-transform: uppercase; letter-spacing: 1.5px; margin-right: 6px; }
.announce-spark {
  display: inline-flex;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex: none;
}
.announce-link { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.announce-link:hover { color: #fff; }
.announce-close {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1;
  opacity: .8;
}
.announce-close:hover { opacity: 1; background: rgba(255,255,255,.15); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: padding .25s ease, background .25s ease, box-shadow .25s ease, border-color .25s ease;
  padding: 16px 0;
  background: rgba(251,250,254,0);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  padding: 9px 0;
  background: rgba(251,250,254,.72);
  /* soft diffuse falloff instead of a hard rule */
  box-shadow: 0 12px 40px rgba(20,19,32,.05);
  border-bottom: 1px solid transparent;
}
/* The Gaussian blur lives on a pseudo-layer, not on .header itself: a backdrop-filter on the
   header would make it a "backdrop root" and the Resources mega panel inside it couldn't blur the page */
.header::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}
.header.scrolled::before { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.header.mega-open { background: rgba(251,250,254,.86); box-shadow: none; }

/* ---------- Resources drop-down (desktop mega menu, RevenueCat-style) ---------- */
.nav-drop { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px;
  border-radius: 9px;
  font: inherit; font-size: 14.5px; font-weight: 500;
  color: inherit; background: none; border: 0; cursor: pointer;
}
.nav-drop-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.nav-drop-btn:hover,
.nav-drop-btn[aria-expanded="true"] { background: #F1EFFA; color: var(--tertiary); }
.nav-drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.mega {
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(251,250,254,.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 50px -20px rgba(20,19,32,.14);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.mega.open { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .18s ease, visibility 0s; }
.mega-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 26px 24px 34px;
  display: grid; grid-template-columns: 1fr 380px; gap: 40px;
}
.mega-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mega-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; color: var(--ink); }
.mega-col a {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 8px; margin: 0 -8px;
  border-radius: 9px;
  font-size: 14.5px; line-height: 1.35;
  color: var(--ink); text-decoration: none;
}
.mega-col a:hover { background: #F1EFFA; color: var(--tertiary); }
.mega-col a.mega-course { align-items: center; gap: 12px; padding: 6px 8px; }
.mega-cover {
  width: 44px; height: auto; flex: none;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(20,19,32,.14);
  transition: transform .2s ease, box-shadow .2s ease;
}
.mega-col a.mega-course:hover .mega-cover { transform: translateY(-2px) rotate(-2deg); box-shadow: 0 8px 16px rgba(100,54,255,.2); }
.mega-col a.mega-exam { align-items: center; }
.mega-mini {
  width: 18px; height: auto; flex: none;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(20,19,32,.18);
  transition: transform .2s ease;
}
.mega-col a.mega-exam:hover .mega-mini { transform: scale(1.12) rotate(-3deg); }
.mega-col a.mega-sub { align-items: center; margin-left: 20px; font-size: 13.5px; }
.mega-thumb {
  width: 38px; height: auto; flex: none;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(20,19,32,.18);
  transition: transform .2s ease;
}
.mega-col a.mega-sub:hover .mega-thumb { transform: scale(1.08) rotate(-2deg); }
.mega-ic { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.mega-feature {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding-left: 40px; border-left: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 13.5px; line-height: 1.45;
}
.mega-feature-cover {
  width: 104px; height: auto; flex: none;
  border-radius: 4px 8px 8px 4px;
  box-shadow: 0 10px 22px rgba(20,19,32,.18), inset 0 0 0 1px rgba(0,0,0,.04);
  rotate: -2deg;
  transition: transform .2s ease, box-shadow .2s ease;
}
.mega-feature:hover .mega-feature-cover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(100,54,255,.2); }
.mega-feature-text { display: flex; flex-direction: column; gap: 6px; }
.mega-feature-text b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.mega-feature:hover .mega-feature-text b { color: var(--tertiary); }
.mega-pill {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--secondary-tint);
  color: var(--secondary-dark);
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.mega-new {
  display: table; /* own line, shrink-wrapped */
  margin: 0 0 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--tertiary);
  color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
body.mobile-view .mega { display: none; }
@media (max-width: 720px) { .mega { display: none; } }
/* mobile burger menu: Resources group */
.header-menu .menu-label { padding: 12px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
/* Resources in the burger menu: one tappable row per subsection, content cloned from the desktop panel */
.menu-resources { padding: 0 0 4px 12px; }
.menu-acc-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-align: left;
}
.menu-acc-btn:hover { background: #F1EFFA; }
.menu-acc-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.menu-acc-btn[aria-expanded="true"] { color: var(--tertiary); }
.menu-acc-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.menu-acc-panel { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 10px 12px; animation: sk-rise .2s ease both; }
.menu-acc-panel[hidden] { display: none; }
.header-menu .menu-acc-panel a { display: flex; align-items: center; gap: 12px; padding: 7px 8px; font-weight: 500; font-size: 14.5px; line-height: 1.35; color: var(--ink); }
.header-menu .menu-acc-panel a.mega-sub { margin-left: 20px; font-size: 13.5px; }
.menu-acc-panel .mega-feature { margin-top: 8px; padding: 12px 8px 0; border-left: 0; border-top: 1px solid var(--line); justify-content: flex-start; align-items: center; }
.menu-acc-panel .mega-feature-cover { width: 64px; }
body.mobile-view .header { position: relative; }
body.mobile-view .header.scrolled { padding: 16px 0; background: rgba(251,250,254,0); box-shadow: none; border-bottom-color: transparent; }

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-logo { display: flex; align-items: center; margin-right: 6px; }
.header-logo img { height: 25px; width: auto; display: block; }
.header-nav { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.header-nav a {
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 500;
}
.header-nav a:hover { background: #F1EFFA; color: var(--tertiary); }
.header-spacer { flex: 1; }
.header-login { font-size: 14.5px; font-weight: 600; padding: 8px 6px; }
.header-burger {
  display: none;
  flex-direction: column;
  gap: 3.5px;
  align-items: flex-end;
  padding: 8px 4px 8px 8px;
}
.header-burger span { width: 20px; height: 2px; background: #3A3946; border-radius: 2px; }
.header-burger span:last-child { width: 14px; }

body.mobile-view .header-nav,
body.mobile-view .header-login { display: none; }
body.mobile-view .header-burger { display: flex; }
body.mobile-view .header-cta { font-size: 13.5px; padding: 9px 14px; border-radius: 10px; }

.header-menu {
  padding: 6px 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: sk-rise .25s ease both;
}
.header-menu a { padding: 11px 12px; border-radius: 9px; font-weight: 600; font-size: 15px; }
.header-menu a:hover { background: #F1EFFA; }
.header-menu .menu-login { color: var(--tertiary); }

/* ---------- Sections (shared) ---------- */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--sec-py) 24px;
  scroll-margin-top: 88px;
}
.section--narrow { max-width: 1080px; }
.section--faq { max-width: 780px; }
.section--cta { padding: 50px 24px 76px; }

.section-head { text-align: center; margin: 0 auto 38px; max-width: 720px; }
.section-head--tight { margin-bottom: 26px; max-width: 560px; }
.section-head--pricing { margin-bottom: 60px; max-width: 560px; position: relative; }
.eyebrow {
  font-family: var(--font-hand);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--secondary);
}
.section-head h2, .features-head h2, .about-page .section-head h1 {
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: 12px 0 0;
}
.section-head .h2-big { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 12px; }
.section-sub { font-size: 16.5px; line-height: 1.5; margin: 12px 0 0; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--sec-py) * .7) 24px var(--sec-py);
  scroll-margin-top: 96px;
}

.hero h1 {
  font-weight: 900;
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 0 0 32px;
}
.hero .hl { color: var(--secondary); }

/* Handwriting accent words ("Chinese", "Japanese", "Write"): Caveat, the
   eyebrows' family, coloured by .hl in context. */
.hand { font-family: var(--font-hand); font-weight: 700; font-size: 1.18em; line-height: 1; margin-right: .14em; }

.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero-note { font-size: 13px; color: var(--grey-faint); margin: 24px 0 0; }
.btn-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 13px 34px; }
.btn-hero-main { font-size: 16px; font-weight: 700; }
.btn-hero-sub { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.82); letter-spacing: .02em; }

.hero-phone {
  position: relative;
  width: 50%;
  min-width: 188px;
  z-index: 3;
}

/* dynamic island */

body.mobile-view .hero { padding-top: 34px; }

body.mobile-view .hero-actions { order: 4; align-items: center; margin-top: 4px; }
body.mobile-view .hero h1 { font-size: 36px; }

body.mobile-view .hero-phone { width: 46%; }

/* ---------- Why / stats ---------- */
/* ---------- Key numbers: handwritten figure, regular body, highlighter marks ---------- */
.stats {
  padding: 28px 0 24px;
  text-align: left;
}
.stats-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 36px; }
.stat { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
/* no card around the four: a hand-drawn teal rule (the Why line's stroke, nearly straight with a slight
   wobble) stands in the gap before each one after the first */
.stat + .stat::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 4px;
  bottom: 4px;
  width: 6px;
  translate: -50% 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 200' preserveAspectRatio='none'%3E%3Cpath d='M3 2 C 2.2 40, 3.8 82, 3 120 S 2.3 172, 3.2 198' fill='none' stroke='%2332BFB2' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.stat-num { font-family: var(--font-hand); font-weight: 700; font-size: 62px; line-height: 1; color: var(--ink); letter-spacing: 0; margin-bottom: 10px; }
.stat-num small { font-size: .5em; margin-left: .12em; }
.stat-body { font-size: 14.5px; line-height: 1.6; margin: 0; color: var(--ink); }
/* highlighter: a teal band behind the lower three-quarters of the phrase */
.stat-body mark {
  background: linear-gradient(transparent 18%, rgba(50,191,178,.32) 18%, rgba(50,191,178,.32) 94%, transparent 94%);
  color: inherit;
  padding: 0 .18em;
  margin: 0 -.18em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
/* the 10 min figure's source, right under its text */
.stat-note { font-size: 12px; color: var(--grey); margin: 8px 0 0; }
body.mobile-view .stats { padding: 22px 0 20px; }
/* mobile is two by two: a rule only between the two in each row */
/* mobile: the four figures swipe sideways like the phones above, one centred at a time, the rule
   between every pair; the swipe bleeds to the screen edges and its padding centres the first and last */
body.mobile-view .stats-grid { display: flex; gap: 36px; margin: 0 -24px; padding: 0 calc((100% + 48px - 240px) / 2); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
body.mobile-view .stats-grid::-webkit-scrollbar { display: none; }
body.mobile-view .stats-grid.is-dragging { scroll-snap-type: none; cursor: grabbing; }
body.mobile-view .stat { flex: 0 0 240px; scroll-snap-align: center; }
body.mobile-view .stat-num { font-size: 52px; }
/* mobile: the figures sit close under the three reasons */
body.mobile-view #why .stats { margin-top: 12px; }

/* ---------- Two languages: typographic split ---------- */
.lang-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 900px;
  margin: 0 auto;
}
.lang-col { text-align: center; padding: 26px 32px; }
.lang-col--divided { border-left: 1px solid var(--line); }
.lang-big { display: block; font-size: 148px; line-height: 1.1; font-weight: 700; }
/* real app screenshots dropped into phone/screen placeholders */
.mini-shot { width: 100%; height: 100%; object-fit: cover; display: block; }
.inst-feat-shot--phone { align-items: center; justify-content: center; }
.inst-feat-shot--phone img { height: 92%; width: auto; border-radius: 8px; box-shadow: 0 4px 14px rgba(20,19,32,.18); }
.stroke-anim { display: flex; justify-content: center; }
/* the app's writing canvas (Figma "iPhone X Writing Canvas", scaled from
   308.74px): white card, dashed mint guides inset 4% */
.lang-big.stroke-anim {
  width: 200px;
  height: 200px;
  align-items: center;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g stroke='%23BEEFEA' stroke-width='0.59' stroke-dasharray='1.8 1.8' fill='none'><line x1='4' y1='4' x2='96' y2='96'/><line x1='96' y1='4' x2='4' y2='96'/><line x1='50' y1='4' x2='50' y2='96'/><line x1='4' y1='50' x2='96' y2='50'/></g></svg>") center / 100% 100% no-repeat, #FFFFFF;
}
.stroke-anim svg { width: 156px; height: 156px; }
.stroke-anim path {
  fill: none;
  stroke: currentColor;
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-big--zh.stroke-anim { color: var(--tertiary); }
.lang-big--ja.stroke-anim { color: var(--tertiary); }
body.mobile-view .stroke-anim svg { width: 120px; height: 120px; }
.lang-big--zh { color: var(--tertiary); }
.lang-big--ja { color: var(--pink); }
.lang-col h3 { font-weight: 900; font-size: 23px; letter-spacing: -.01em; margin: 18px 0 10px; }
.lang-col p { font-size: 15.5px; line-height: 1.55; margin: 0 0 14px; }
.lang-stat { font-size: 14px; font-weight: 700; text-decoration: none; }
a.lang-stat:hover { text-decoration: underline; text-underline-offset: 3px; }
.lang-stat--zh { color: var(--tertiary); }
.lang-stat--ja { color: var(--tertiary); }
/* heading in the hand font, as the hero callouts; the "Pinyin / ㄅㄆㄇㄈ"
   line and the dealt deck covers reuse the hero callout pieces, centred */
.lang-col .lang-title {
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: 0;
}
.lang-col .hero-callout-list { justify-content: center; margin: 0 0 12px; }
/* covers in a straight, evenly spaced row (not dealt and overlapping as in
   the hero); they shrink together to fit a narrow phone column */
.lang-col .hero-callout-cards { justify-content: center; gap: 8px; max-width: 100%; margin: 4px 0 18px; }
.lang-col .hero-callout-cards img { box-shadow: none; min-width: 0; }
.lang-col .hero-callout-cards img + img { margin-left: 0; }
.lang-col .hero-callout-cards img:nth-child(n) { transform: none; translate: none; transition: transform .18s ease; }
/* desktop hover: only the card under the pointer grows and tips a little;
   no hover motion on phones (or the mobile preview) */
@media (hover: hover) and (min-width: 721px) {
  body:not(.mobile-view) .lang-col .hero-callout-cards img:nth-child(n):hover { transform: scale(1.06) rotate(-3deg); }
}
/* body copy matches the hero callout descriptions */
.lang-split--mine .lang-col p { font-size: 13px; font-weight: 400; line-height: 1.3; color: var(--grey); }
/* the two columns share row heights so the pieces line up across the
   divider; the one-line Japanese title sits on the "Chinese" baseline */
.lang-split--mine .lang-col { display: grid; grid-row: span 6; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); min-width: 0; justify-items: center; }
.lang-col .lang-title { align-self: end; margin-top: 0; }
/* stacked on phones: two columns side by side overflowed a 375px screen */
@media (max-width: 720px) {
  .lang-split { grid-template-columns: minmax(0, 1fr); }
  .lang-col--divided { border-left: none; border-top: 1px solid var(--line); }
  .lang-split--mine .lang-col { padding-left: 16px; padding-right: 16px; }
  .lang-col .hero-callout-list { gap: 0 6px; }
  .lang-split .lang-col .hero-callout-list li + li::before { margin-right: 6px; }
}
body.mobile-view .lang-split { grid-template-columns: minmax(0, 1fr); }
body.mobile-view .lang-col--divided { border-left: none; border-top: 1px solid var(--line); }
body.mobile-view .lang-split--mine .lang-col { padding-left: 16px; padding-right: 16px; }
body.mobile-view .lang-col .hero-callout-list { gap: 0 6px; }
body.mobile-view .lang-split .lang-col .hero-callout-list li + li::before { margin-right: 6px; }
body.mobile-view .lang-big { font-size: 110px; }

/* ---------- Library ---------- */
.library-band { background: #FDFFFF; scroll-margin-top: 70px; }
.lib-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 26px;
}
#lib-langs button.active-zh { color: #fff; background: var(--tertiary); }
#lib-langs button.active-ja { color: #fff; background: var(--secondary); }
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.lib-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(20,19,32,.05);
  transition: transform .2s ease, border-color .2s;
}
.lib-card:hover { transform: translateY(-4px); border-color: var(--tertiary); box-shadow: 0 18px 40px rgba(100,54,255,.12); }
.lib-thumb {
  aspect-ratio: 16/10;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* deck tiles: portrait cover art, five across on desktop */
/* always one row of five — tiles scale down instead of wrapping */
.lib-grid--decks { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) {
  .lib-grid--decks { gap: 10px; }
  .lib-card--deck .lib-body { padding: 7px 8px; }
  .lib-card--deck .lib-body h3 { font-size: 10.5px; }
}
.lib-card--deck .lib-thumb--cover { aspect-ratio: 351/512; background: #F3F1F9; }
.lib-thumb--cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lib-card--deck .lib-body { padding: 12px 13px; }
.lib-card--deck .lib-body h3 { font-size: 13.5px; margin-bottom: 2px; }
.lib-card--deck .lib-body p { font-size: 11.5px; margin-bottom: 6px; }
.lib-card--deck .lib-meta { font-size: 11px; }
.lib-grid--courses { grid-template-columns: repeat(3, 1fr); }
body.mobile-view .lib-grid--courses { grid-template-columns: 1fr; }
.lib-card--course { display: flex; align-items: stretch; }
.lib-card--course .lib-thumb--cover {
  aspect-ratio: 351/512;
  width: 132px;
  flex: none;
  position: relative;
  background: #F3F1F9;
}
.lib-card--course .lib-body { padding: 18px 20px; display: flex; flex-direction: column; align-items: flex-start; }
.lib-card--course .lib-body h3 { font-size: 16.5px; }
.lib-card--course .lib-body p { margin-bottom: 8px; }
.lib-store-btn {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--tertiary);
  border: 1.5px solid #DDD7F4;
  border-radius: 9px;
  padding: 8px 13px;
  transition: background .15s, border-color .15s;
}
.lib-store-btn:hover { background: var(--tertiary-tint); border-color: var(--tertiary); color: var(--tertiary); }
.lib-browse-row { text-align: center; margin-top: 18px; }
.lib-browse-link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--grey);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  transition: color .15s, border-color .15s;
}
.lib-browse-link:hover { color: var(--tertiary); border-color: #DDD7F4; }
body.mobile-view .lib-grid--decks { grid-template-columns: repeat(5, 1fr); gap: 6px; }
body.mobile-view .lib-card--deck .lib-body { display: none; }
body.mobile-view .lib-controls { flex-wrap: nowrap; gap: 5px; margin-bottom: 18px; }
body.mobile-view .seg { padding: 3px; border-radius: 10px; }
body.mobile-view .seg button { padding: 6px 6px; font-size: 10.5px; border-radius: 7px; letter-spacing: 0; }

.lib-yt-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lib-yt-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.lib-play { position: relative; z-index: 2; }
.lib-tag {
  position: absolute;
  bottom: 9px; right: 9px;
  font-size: 9px;
  color: #fff;
  background: rgba(0,0,0,.45);
  padding: 3px 7px;
  border-radius: 5px;
  font-family: 'Roboto', monospace;
}
.lib-play {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
  transition: transform .15s;
}
.lib-play:hover { transform: scale(1.08); }
.lib-play span {
  border-left: 16px solid var(--ink);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}
.lib-playing {
  position: absolute;
  inset: 0;
  background: #0C0B12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.lib-playing-live { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: 12px; font-weight: 600; }
.lib-playing-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); animation: sk-pulse 1.2s infinite; }
.lib-playing-embed {
  font-family: 'Roboto', monospace;
  font-size: 10px;
  color: #8E8AA0;
  background: rgba(255,255,255,.06);
  padding: 4px 9px;
  border-radius: 6px;
}
.lib-body { padding: 16px 17px; }
.lib-body h3 { font-weight: 700; font-size: 16px; margin: 0 0 4px; letter-spacing: -.01em; }
.lib-body p { font-size: 13px; color: var(--grey); margin: 0 0 10px; line-height: 1.45; }
.lib-meta { font-size: 12px; font-weight: 600; color: var(--tertiary); }

/* ---------- Testimonials ---------- */
/* A board of ten quotes on taped sticky notes, the sources under it. Phones (and up to
   the desktop row): the notes as a sideways swipe, one centred at a time like Why
   Skritter's (main.js lets a mouse drag it too). Desktop: five to a row */
/* the sources, centred under the board, and each note's source, set like the hero
   callout notes ("Includes vocabulary from popular textbooks") */
.lt-src, .lt-note figcaption { font-size: 13px; font-weight: 400; line-height: 1.3; color: var(--grey); }
.lt-src { margin: 26px 0 0; text-align: center; }
.lt-notes {
  display: flex; align-items: flex-start; gap: 16px;
  margin: 26px -24px 0; padding: 22px calc((100% + 48px - 300px) / 2) 26px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.lt-notes::-webkit-scrollbar { display: none; }
.lt-notes.is-dragging { scroll-snap-type: none; cursor: grabbing; }
/* a sticky note as on the hero and the pricing band: square-cornered paper, a soft
   shadow, ink handwriting; each sits at its own small tilt, held by a strip of
   see-through tape, the tape and the stars in a deeper shade of its paper */
.lt-note {
  position: relative; flex: 0 0 300px; scroll-snap-align: center;
  display: flex; flex-direction: column;
  margin: 0; padding: 30px 22px 24px;
  background: var(--lt-paper); color: var(--ink);
  /* the site's sticky-note shadow (tuned by eye; hero, pricing and Decks notes share it):
     short and crisp, so the paper sits close to the page */
  border-radius: 3px; box-shadow: 0 6px 4px -4px rgba(20,19,32,.1);
  rotate: var(--rot, 0deg);
}
.lt-note::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 96px; height: 26px; translate: -50% 0;
  background: color-mix(in srgb, var(--lt-accent) 45%, transparent); rotate: var(--tape-rot, -2deg);
}
.lt-note--yellow { --lt-paper: #FFF4C4; --lt-accent: #E8B10E; }
.lt-note--mint { --lt-paper: var(--secondary-tint); --lt-accent: var(--secondary); }
.lt-note--pink { --lt-paper: color-mix(in srgb, var(--pink) 14%, #fff); --lt-accent: var(--pink); }
.lt-note--lavender { --lt-paper: var(--tertiary-tint); --lt-accent: var(--tertiary); }
.lt-note:nth-child(1) { --rot: -1.5deg; --tape-rot: 2deg; }
.lt-note:nth-child(2) { --rot: 1deg; }
.lt-note:nth-child(3) { --rot: 1.5deg; --tape-rot: -3deg; }
.lt-note:nth-child(4) { --rot: -1deg; --tape-rot: 1deg; }
.lt-note:nth-child(5) { --rot: 1.5deg; --tape-rot: -2deg; }
.lt-note:nth-child(6) { --rot: -1.5deg; --tape-rot: 2deg; }
.lt-note:nth-child(7) { --rot: 1deg; --tape-rot: -1deg; }
.lt-note:nth-child(8) { --rot: -1deg; --tape-rot: 3deg; }
.lt-note:nth-child(9) { --rot: 1.5deg; --tape-rot: -2deg; }
.lt-note:nth-child(10) { --rot: -1deg; --tape-rot: 1deg; }
.lt-stars { margin-bottom: 8px; font-size: 15px; letter-spacing: 3px; color: var(--lt-accent); }
.lt-note blockquote { margin: 0; font-family: var(--font-hand); font-size: 22px; font-weight: 700; line-height: 1.2; }
/* the source always sits at the foot of the note, on the left */
.lt-note figcaption { margin-top: auto; padding-top: 14px; text-align: left; }
@media (min-width: 901px) {
  /* the top padding leaves room for the first row's tape */
  body:not(.mobile-view) .lt-notes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 44px 26px; margin: 0; padding: 22px 0 0; overflow: visible; }
}

/* ---------- Pricing ---------- */
.pricing-band {
  scroll-margin-top: 70px;
  /* Time Critters behind the plans: purple at the top for the heading,
     fading down to the (nearly) original illustration at the bottom */
  background:
    linear-gradient(180deg,
      rgba(84,44,215,.94) 0%,
      rgba(100,54,255,.78) 32%,
      rgba(100,54,255,.34) 60%,
      rgba(100,54,255,.06) 100%),
    url("../static/time-critters.jpg") center / cover no-repeat;
}
.pricing-band .eyebrow { color: #67FFEC; }
.pricing-band .section-head h2 { color: #fff; }
.pricing-band .section-sub { color: rgba(255,255,255,.88); }
.pricing-band .section-sub b { color: #fff; }
.pricing-free { position: relative; white-space: nowrap; }
.pricing-note-line {
  position: absolute;
  left: calc(100% + 6px); top: 50%;
  width: 70px; height: 40px;
  overflow: visible;
  fill: none;
  stroke: #67FFEC;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.pricing-note-line circle { fill: #67FFEC; stroke: none; }
/* post-it note: same light-teal sticky note as Iona's mobile hero notes, ink handwriting, teal highlighter */
.pricing-note {
  position: absolute;
  left: calc(100% + 14px); top: -24px;
  width: 300px;
  margin: 0;
  padding: 18px 18px 22px;
  text-align: left;
  font-family: var(--font-hand);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--note-ink, var(--ink));
  background: var(--note-bg, var(--secondary-tint));
  border-radius: 3px;
  box-shadow: 0 6px 4px -4px rgba(20,19,32,.1);
  rotate: -3deg;
}
.pricing-note mark {
  background: linear-gradient(transparent 22%, rgba(50,191,178,.55) 22%, rgba(50,191,178,.55) 92%, transparent 92%);
  color: inherit;
  padding: 0 .12em;
  margin: 0 -.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
/* no room beside the heading on narrow screens: drop the line, stack the note */
@media (max-width: 1260px) {
  .pricing-note-line { display: none; }
  .pricing-note { position: static; width: auto; max-width: 300px; margin: 18px auto 0; text-align: center; rotate: -1.5deg; }
}
body.mobile-view .pricing-note-line { display: none; }
body.mobile-view .pricing-note { position: static; width: auto; max-width: 300px; margin: 18px auto 0; text-align: center; rotate: -1.5deg; }
/* alignment: equal border widths keep card interiors — and the Subscribe buttons — pixel-aligned */
.pricing-band .plan-card { border-width: 2px; }
.pricing-band .plan-card.popular { transform: none; }
.pricing-band .plan-card.popular:hover { transform: translateY(-6px); }
.pricing-band .plan-card.popular .plan-btn { border: 1.5px solid transparent; /* same box height as the outlined button */ }
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.plan-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 4px 16px rgba(20,19,32,.04);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.plan-card:hover { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(100,54,255,.18); }
.plan-card.popular {
  border: 2px solid var(--tertiary);
  box-shadow: 0 18px 44px rgba(100,54,255,.16);
  transform: translateY(-6px);
}
.plan-flag {
  position: absolute;
  top: -18px; right: 18px;
  background: var(--tertiary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(100,54,255,.34);
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.plan-flag small { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .9; }
.plan-name { font-size: 20px; font-weight: 700; color: var(--ink); }
.plan-tagline { font-size: 14px; color: var(--grey); margin: 3px 0 18px; }
.plan-price { display: flex; align-items: baseline; gap: 3px; margin-bottom: 24px; }
.plan-big { font-weight: 900; font-size: 44px; letter-spacing: -.02em; }
.plan-unit { font-size: 17px; color: var(--grey); font-weight: 600; }
.plan-btn {
  /* pinned to the card bottom so Subscribe buttons align across plans */
  margin-top: auto;
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s, box-shadow .15s;
  background: #fff;
  color: var(--tertiary);
  border: 1.5px solid #DDD7F4;
}
.plan-btn:hover { transform: translateY(-1px); }
.plan-card.popular .plan-btn {
  background: var(--tertiary);
  color: #fff;
  border: none;
  box-shadow: 0 10px 22px rgba(100,54,255,.28);
}
.plan-trial-note { text-align: center; font-size: 12px; color: var(--grey-faint); margin-top: 10px; white-space: nowrap; }

/* ---------- Study on the go (Mobile, Tablet & Web) ---------- */
/* The two app downloads and the web log-in, each joined by a hand-drawn line to a
   picture of the app on its devices. Phones (and up to the desktop row): the phone and
   tablet picture, the two apps side by side under it, then the laptop over the web
   log-in. Desktop: one picture of all three devices, with the two apps and the log-in
   in one row under it */
.ways { max-width: 1080px; margin: 0 auto; }
.ways-text { display: grid; grid-template-columns: 1fr; gap: 44px; }
.ways-block { position: relative; min-width: 0; text-align: center; }
/* the devices sit over the lines' start, so the lines seem to come from behind them */
.ways-devices { display: flex; justify-content: center; margin: 22px 0 48px; }
.ways-device { position: relative; z-index: 1; display: block; width: 240px; max-width: 100%; height: auto; }
.ways-device--all { display: none; }
/* each app stacks: icon, language, store links */
.ways-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.ways-app { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ways-app-icon { flex: none; width: 72px; height: 72px; border-radius: 18px; }
/* the language in Caveat over a light purple highlighter swipe: the hero heading
   swipe in the CTA purple (#6436FF = --tertiary) at about half its strength */
.ways-app-lang {
  display: inline-block; margin: 0; padding: 0 10px;
  font-family: var(--font-hand); font-size: 30px; font-weight: 700; line-height: 32px; color: var(--ink);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%236436FF' fill-opacity='.25' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%236436FF' fill-opacity='.14' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat 0 92% / 100% 72%;
}
/* "App Store / Google Play" set like the hero's "Tones / stroke order": purple words, a
   grey slash between. Side by side on phones it won't fit on one line, so there it
   takes one store per line, without the slash */
.ways-app-links { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.ways-app-links a { color: var(--tertiary); }
.ways-app-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ways-sep { display: none; color: var(--grey-faint); }
/* the web log-in: the laptop (phones), then a hand-written link over the teal swipe
   (the swipe comes with the hero heading rule) with a hand-drawn arrow, and under it a
   line set like the language blurbs ("Characters, tones and pinyin...") */
.ways-web-shot { display: block; width: 100%; height: auto; margin: 0 0 22px; }
.ways-web { display: inline-flex; flex-direction: column; align-items: center; color: var(--ink); text-decoration: none; }
a.ways-web:hover { color: var(--ink); }
.ways-web-title { font-family: var(--font-hand); font-size: 30px; font-weight: 700; line-height: 32px; }
/* hand-drawn arrow, drawn like the hero's "Tap!" arrow (Caveat's → reads as type) */
.ways-web-arrow {
  display: inline-block; width: 28px; height: 16px; margin-left: 2px; vertical-align: middle; overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .15s ease;
}
.ways-web:hover .ways-web-arrow { transform: translateX(3px); }
/* 7px (not the apps' 10px gap): its taller line sits 3px lower, so this puts its
   baseline level with "App Store / Google Play" */
.ways-web-sub { margin-top: 7px; font-size: 15.5px; font-weight: 400; line-height: 1.55; }
/* the lines (drawn by main.js): purple down to the apps, teal to the web log-in, each
   ending in a dot. On phones the laptop sits between the apps and the log-in, so no
   line runs to the log-in there */
.ways-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.ways-line { fill: none; stroke: var(--tertiary); stroke-width: 2.5; stroke-linecap: round; }
.ways-line-dot { fill: var(--tertiary); }
.ways-line--web { display: none; stroke: var(--secondary); }
.ways-line-dot--web { display: none; fill: var(--secondary); }
/* desktop: one row under the devices, in order Chinese, Japanese, the web log-in. The
   download half's box steps aside (display: contents) so the devices and the apps share
   one grid with the log-in; the lines then measure against the whole grid */
@media (min-width: 901px) {
  body:not(.mobile-view) .ways-text {
    position: relative; grid-template-columns: repeat(3, auto); justify-content: center; align-items: start; column-gap: 80px; row-gap: 0;
  }
  body:not(.mobile-view) .ways-block:not(.ways-block--web) { display: contents; }
  body:not(.mobile-view) .ways-devices { grid-column: 1 / -1; grid-row: 1; margin: 22px 0 120px; }
  body:not(.mobile-view) .ways-device--all { display: block; width: 560px; }
  body:not(.mobile-view) :is(.ways-device--mobile, .ways-web-shot) { display: none; }
  body:not(.mobile-view) .ways-apps { display: contents; }
  body:not(.mobile-view) .ways-app { grid-row: 2; justify-self: center; }
  body:not(.mobile-view) .ways-app:first-child { grid-column: 1; }
  body:not(.mobile-view) .ways-app:last-child { grid-column: 2; }
  body:not(.mobile-view) .ways-app-links { flex-direction: row; align-items: baseline; gap: 0 12px; }
  body:not(.mobile-view) .ways-sep { display: inline; }
  /* "Log In on Web" drops past the height of an app icon (72px) and the gap under it
     (10px) to sit level with "Chinese" and "Japanese" */
  body:not(.mobile-view) .ways-block--web { grid-row: 2; grid-column: 3; margin-top: 82px; }
  body:not(.mobile-view) :is(.ways-line--web, .ways-line-dot--web) { display: inline; }
}

/* ---------- Features ---------- */
.features-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 30px;
}
.features-head h2 { margin: 10px 0 0; }
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .18s, transform .18s;
}
.feature-card:hover { border-color: #D9D3F6; transform: translateY(-3px); }
.feature-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon span { width: 13px; height: 13px; border-radius: 4px; }
.feature-card h3 { font-weight: 700; font-size: 15.5px; margin: 0; letter-spacing: -.01em; }
.feature-card p { font-size: 13.5px; color: var(--grey); line-height: 1.5; margin: 0; }

/* ---------- Features carousel (App Store style) ---------- */
/* Desktop: the section is taller than the viewport and the inner block pins
   (sticky) while page scroll drives the carousel sideways. JS sets the
   section height and maps scroll progress → track.scrollLeft.
   Mobile / narrow: plain swipe carousel, no pinning. */
.feat-section { position: relative; }
.feat-pin {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  /* tighter than the default section rhythm so the pinned block fits one viewport */
  padding-top: 20px;
  padding-bottom: 48px;
}
.feat-section.feat-no-pin .feat-pin { position: static; min-height: 0; }
.feat-carousel { width: 100%; }
.feat-track {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent);
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 24px;
  padding: 10px 24px 28px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.feat-track::-webkit-scrollbar { display: none; }
/* while scroll-driven (pinned), snapping would fight the scroll mapping */
.feat-section:not(.feat-no-pin) .feat-track { scroll-snap-type: none; }
.feat-track.feat-dragging { cursor: grabbing; scroll-snap-type: none; }
.feat-track.feat-dragging .feat-card { pointer-events: none; }

.feat-card { transition: transform .2s ease, border-color .2s, box-shadow .2s; border: 1px solid transparent; }
.feat-card:hover { transform: translateY(-4px); border-color: var(--tertiary); box-shadow: 0 18px 40px rgba(100,54,255,.18); }
.feat-card {
  position: relative;
  flex: none;
  width: min(440px, 85vw);
  height: 520px;
  border-radius: 28px;
  overflow: hidden;
  scroll-snap-align: start;
  padding: 34px 28px 0;
  display: flex;
  flex-direction: column;
}
.feat-card--purple { background: var(--tertiary); }
.feat-card--pink { background: var(--pink); }
.feat-card--teal { background: var(--secondary); }
.feat-card--white { background: #fff; border: 1px solid var(--line); }

.feat-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
}
.feat-card--white .feat-kicker { color: var(--grey); }
.feat-title {
  font-weight: 900;
  font-size: 28px;
  line-height: 1.2;
  color: #fff;
  margin: 10px 0 8px;
}
.feat-card--white .feat-title { color: var(--ink); }
.feat-card--teal .feat-title,
.feat-card--teal .feat-kicker { color: #0B3F39; }
.feat-body {
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255,255,255,.88);
  max-width: 30ch;
  margin: 0;
}
.feat-card--white .feat-body { color: var(--grey); }
.feat-card--teal .feat-body { color: rgba(11,63,57,.82); }

.feat-phone {
  position: absolute;
  left: 50%;
  bottom: -40px;
  transform: translateX(-50%);
  width: 230px;
  height: 360px;
  background: var(--ink);
  border-radius: 44px 44px 0 0;
  padding: 5px 5px 0;
}
/* dynamic island, matching the other phone frames */
.feat-phone::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 27%; height: 15px;
  border-radius: 999px;
  background: var(--ink);
}
.feat-screen {
  width: 100%;
  height: 100%;
  border-radius: 39px 39px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 56px;
  overflow: hidden;
}
.feat-screen .cjk { font-size: 90px; line-height: 1; }
/* real app captures fill the screen instead of centring a glyph */
.feat-screen--shot { padding-top: 0; background: #fff; }
.feat-screen--shot img { width: 100%; display: block; }

body.mobile-view .feat-track { padding: 10px 12% 28px; scroll-padding-left: 12%; }
body.mobile-view .feat-card { width: 78%; height: 480px; scroll-snap-align: center; }
body.mobile-view .feat-screen .cjk { font-size: 76px; }

.feat-pager {
  display: flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  margin: 22px auto 0;
  padding: 13px 19px;
  background: #E7F4F2;
  border-radius: 999px;
}
.feat-dot {
  width: 8px; height: 8px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: #9FD8D2;
  cursor: pointer;
  transition: width .28s ease, background .28s ease;
}
.feat-dot.active { width: 36px; background: var(--secondary); }
body.mobile-view .feat-pager { display: none; }

/* ---------- Features (homepage): hand-cut tabs + app pictures ---------- */
/* three copies (A / B / C) to compare, picked with the build toggle */
body:not(.feat-a) .ftabs--a { display: none; }
/* Tabs are hand-cut paper strips (straighter than the "See what our learners say" sticker),
   each at its own small tilt; the picked one turns teal. Mobile: tabs scroll sideways above the phone. Desktop: tabs
   stacked on the left, phone on the right. main.js steps through them and handles clicks */
.ftabs { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ftabs-list {
  position: relative;
  display: flex;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 4px 10px;
}
.ftabs-list::-webkit-scrollbar { display: none; }
.ftab {
  position: relative;
  isolation: isolate;
  flex: none;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--grey-faint);
  transition: color .2s ease;
}
.ftab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--line);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 56' preserveAspectRatio='none'%3E%3Cpath d='M4 3 C 60 1.8, 140 3.6, 196 2.4 C 197.5 16, 196.8 38, 198 53 C 140 54.4, 60 52.6, 2.5 54 C 3.2 40, 1.8 16, 4 3 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 56' preserveAspectRatio='none'%3E%3Cpath d='M4 3 C 60 1.8, 140 3.6, 196 2.4 C 197.5 16, 196.8 38, 198 53 C 140 54.4, 60 52.6, 2.5 54 C 3.2 40, 1.8 16, 4 3 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  transition: background-color .2s ease;
}
.ftab:nth-child(even)::before { scale: -1 1; }
.ftab:nth-child(1) { rotate: -.6deg; }
.ftab:nth-child(2) { rotate: .4deg; }
.ftab:nth-child(3) { rotate: -.2deg; }
.ftab:nth-child(4) { rotate: .6deg; }
.ftab:nth-child(5) { rotate: -.4deg; }
.ftab:nth-child(6) { rotate: .2deg; }
.ftab:hover { color: var(--ink); }
.ftab[aria-selected="true"] { color: var(--ink); }
.ftab[aria-selected="true"]::before { background: rgba(50,191,178,.32); }
.ftab:focus-visible { outline: 2px solid var(--tertiary); outline-offset: 4px; }
/* a chosen line break inside a tab title: desktop only (mobile tabs stay on one line) */
.ftab-br { display: none; }

/* one fixed stage for every feature: each picture is fitted inside it (never past it), so they all
   take up the same room. Phones fill its height; mobile centres them, desktop lines them up on the left */
.ftabs-stage { position: relative; width: min(100%, 340px); height: 440px; touch-action: pan-y; cursor: grab; user-select: none; }
.ftabs-stage img { -webkit-user-drag: none; }
.ftabs-panel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ftabs-panel:not([hidden]) { animation: sk-fade .35s ease both; }
.ftabs-panel > img { display: block; max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; }
/* the settings cards aren't a phone: as wide as the stage instead */
.ftabs-panel--free > img { width: 112%; max-width: none; height: auto; }
/* single-phone pictures: centre the phone's frame, not the whole picture (a hand or critter drawn beside
   the phone spills out to that side). --shift = how far the frame sits off the picture's centre */
.ftabs-panel--phone { justify-content: center; }
.ftabs-panel--phone > img { translate: var(--shift, 0) 0; }
/* example sentences: two phones tipped apart; the Japanese one smaller, behind and off to the right */
.ftabs-panel--duo > img { position: absolute; height: 100%; max-width: none; }
.ftabs-panel--duo > .ftabs-duo-zh { left: -2%; top: 0; rotate: -4deg; }
.ftabs-panel--duo > .ftabs-duo-ja { left: 38%; top: 6%; height: 88%; rotate: 4deg; }
/* Features A. Mobile: only the current feature shows, as picture → Caveat title (broken where the copy
   says, each line on the hero callouts' teal highlighter swipe) → a pager of hand-written numbers, the
   current one on a teal swipe; swipe the picture or tap a number to move.
   Desktop (see the 901px block): pictures left, every title listed on the right with its number, the
   picked one in ink with a hand-drawn underline */
/* mobile spacing: heading, picture, title and pager sit close together */
body.feat-a #features .section-head { margin-bottom: 20px; }
.ftabs--a { gap: 8px; }
/* while dragging, the neighbouring pictures slide in from the sides (main.js); clip them at the page edge */
.ftabs-section { overflow-x: clip; }
.ftabs--a .ftabs-stage { order: 1; }
.ftabs--a .ftabs-list { order: 2; justify-content: center; overflow: visible; padding: 0; }
.ftabs--a .ftabs-pager { order: 3; }
.ftabs--a .ftab {
  rotate: none;
  max-width: 100%;
  padding: 0 0 4px;
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: normal;
  text-align: center;
  color: var(--ink);
  transition: color .2s ease, opacity .2s ease, font-size .2s ease, padding .2s ease;
}
.ftabs--a .ftab:not([aria-selected="true"]) { display: none; }
/* the number (this ::before is the paper strip on B / C, flipped on every other tab: not here). Written
   out per tab, not a CSS counter: on mobile the other tabs are hidden, and hidden ones aren't counted */
.ftabs--a .ftab:nth-child(1)::before { content: "1."; }
.ftabs--a .ftab:nth-child(2)::before { content: "2."; }
.ftabs--a .ftab:nth-child(3)::before { content: "3."; }
.ftabs--a .ftab:nth-child(4)::before { content: "4."; }
.ftabs--a .ftab:nth-child(5)::before { content: "5."; }
.ftabs--a .ftab:nth-child(6)::before { content: "6."; }
.ftabs--a .ftab::before {
  display: none;
  position: static;
  inset: auto;
  z-index: auto;
  scale: none;
  font-size: .75em;
  color: var(--secondary);
  background: none;
  -webkit-mask: none;
          mask: none;
}
.ftabs--a .ftab::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 2px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2 C 30 3.6, 62 6.2, 90 4.4 S 112 3.8, 118 4.6' fill='none' stroke='%2332BFB2' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  opacity: 0;
  transition: opacity .2s ease;
}
.ftabs--a .ftab[aria-selected="true"]::after { opacity: 1; }
.ftabs--a .ftab::after { display: none; }
.ftabs--a .ftab-br { display: inline; }
.ftabs--a .ftab-text {
  padding: 0 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%2332BFB2' fill-opacity='.45' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%2332BFB2' fill-opacity='.25' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat 0 92% / 100% 72%;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
.ftabs-pager { display: flex; justify-content: center; gap: 4px; }
.ftabs-dot {
  position: relative;
  isolation: isolate;
  width: 34px;
  height: 34px;
  padding: 0;
  font-family: var(--font-hand);
  font-size: 23px;
  font-weight: 700;
  line-height: 34px;
  color: var(--grey-faint);
  transition: color .2s ease;
}
.ftabs-dot::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 2px;
  right: 2px;
  top: 9px;
  bottom: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%2332BFB2' fill-opacity='.45' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%2332BFB2' fill-opacity='.25' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  opacity: 0;
  transition: opacity .2s ease;
}
.ftabs-dot.is-current { color: var(--ink); }
.ftabs-dot.is-current::before { opacity: 1; }
.ftabs-dot:focus-visible { outline: 2px solid var(--tertiary); outline-offset: 2px; border-radius: 6px; }

/* Features B on mobile: laid out like A (picture → the current feature's paper-strip title, broken where
   the copy says → a pager), in B's look: Roboto titles on the teal paper strip, numbers on a smaller strip.
   Desktop B keeps its column of strips beside the pictures (see the 901px block) */

/* strips not picked sit on a neutral pale grey */

@keyframes sk-fade { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 901px) {
  body:not(.mobile-view) .ftabs { flex-direction: row; justify-content: center; align-items: center; gap: 64px; }
  body:not(.mobile-view) .ftabs-list {
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    width: auto;
    overflow: visible;
    padding: 0;
  }
  /* each title breaks only where the copy says (.ftab-br), so the column is as narrow as its longest line */
  body:not(.mobile-view) .ftab { font-size: 17px; padding: 14px 26px; }
  body:not(.mobile-view) .ftab-br { display: inline; }
  /* Features A on desktop: pictures on the left, every title listed on the right in a fixed column
     (shrinking only when the page is too narrow, so a bigger picked title never nudges the pictures),
     each on one line where it fits; the rest small and pale, the picked one larger, in ink, underlined.
     Pictures sit against the titles' side of the stage so the gap between them never changes */
  body:not(.mobile-view).feat-a #features .section-head { margin-bottom: 38px; }
  /* the picked strip, or one under the pointer, gets nudged to a new tilt */

  body:not(.mobile-view) .ftabs--a { flex-direction: row-reverse; }
  body:not(.mobile-view) .ftabs--a .ftabs-stage,
  body:not(.mobile-view) .ftabs--a .ftabs-list { order: 0; }
  body:not(.mobile-view) .ftabs--a .ftabs-pager { display: none; }
  body:not(.mobile-view) .ftabs--a .ftabs-list { flex: 0 1 520px; min-width: 0; align-items: flex-start; gap: 12px; }
  body:not(.mobile-view) .ftabs--a .ftabs-stage { flex: none; }
  body:not(.mobile-view) .ftabs--a .ftabs-panel { justify-content: flex-end; }
  body:not(.mobile-view) .ftabs .ftabs-panel--phone { justify-content: center; }
  body:not(.mobile-view) .ftabs--a .ftab-br { display: none; }
  body:not(.mobile-view) .ftabs--a .ftab { display: inline-block; font-size: 23px; padding: 0 2px 4px; text-align: left; color: var(--grey-faint); opacity: .7; }
  body:not(.mobile-view) .ftabs--a .ftab:hover { color: var(--ink); opacity: 1; }
  body:not(.mobile-view) .ftabs--a .ftab[aria-selected="true"] { font-size: 30px; padding: 2px 2px 12px; color: var(--ink); opacity: 1; }
  body:not(.mobile-view) .ftabs--a .ftab::before { display: inline-block; width: 1.1em; font-size: 1em; }
  /* titles not picked: the number goes grey with its title; the picked one keeps the teal */
  body:not(.mobile-view) .ftabs--a .ftab:not([aria-selected="true"])::before { color: inherit; }
  body:not(.mobile-view) .ftabs--a .ftab::after { display: block; left: calc(2px + 1.1em); right: 2px; }
  body:not(.mobile-view) .ftabs--a .ftab-text { padding: 0; background: none; }
  body:not(.mobile-view) .ftabs-stage { width: 480px; height: 560px; }
  body:not(.mobile-view) .ftabs-panel { justify-content: flex-start; }
  body:not(.mobile-view) .ftabs-panel--duo > .ftabs-duo-zh { left: -6%; }
  body:not(.mobile-view) .ftabs-panel--duo > .ftabs-duo-ja { left: 44%; top: 4%; height: 92%; }
  body:not(.mobile-view) .ftabs-panel--free > img { width: 104%; }
}
@media (prefers-reduced-motion: reduce) {
  .ftabs-panel:not([hidden]) { animation: none; }
}

/* ---------- FAQ ---------- */
.faq-hc-link { color: var(--tertiary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.faqs { display: flex; flex-direction: column; gap: 10px; }
.faq {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(20,19,32,.03);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  text-align: left;
}
.faq-q > span:first-child { font-weight: 700; font-size: 16px; }
.faq-plus {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #F1EFFA;
  color: var(--tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  transition: transform .25s ease;
}
.faq.open .faq-plus { transform: rotate(45deg); }
.faq-a {
  overflow: hidden;
  transition: max-height .35s ease, opacity .3s ease;
  max-height: 0;
  opacity: 0;
}
.faq.open .faq-a { max-height: 240px; opacity: 1; }
.faq-a p { margin: 0; padding: 0 20px 20px; font-size: 15px; line-height: 1.6; }

/* ---------- Institutions: classroom features carousel ---------- */
.inst-track { margin-top: 8px; padding-left: 48px; padding-right: 48px; scroll-padding-left: 48px; }
.inst-card {
  flex: 0 0 auto;
  width: min(640px, 82vw);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 22px 20px;
}
.inst-card h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 14px; }
.inst-card-shot {
  aspect-ratio: 16/10;
  border-radius: 14px;
  background: repeating-linear-gradient(45deg, #F4F1FB, #F4F1FB 12px, #ECE7F8 12px, #ECE7F8 24px);
  border: 1px solid var(--line);
}
body.mobile-view .inst-card { width: 86vw; }
@media (max-width: 720px) { .inst-card { width: 86vw; } }

/* ---------- Final CTA ---------- */

.cta-banner {
  background: linear-gradient(135deg, var(--tertiary), #7B3FD4 55%, var(--pink));
  border-radius: 28px;
  padding: 56px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(100,54,255,.32);
}
.cta-blob { position: absolute; border-radius: 50%; }
.cta-blob--tr { top: -40px; right: -20px; width: 180px; height: 180px; background: rgba(255,255,255,.08); }
.cta-blob--bl { bottom: -60px; left: -30px; width: 220px; height: 220px; background: rgba(255,255,255,.06); }
.cta-banner h2 {
  font-weight: 900;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -.02em;
  color: #fff;
  margin: 0 0 14px;
  position: relative;
}
.cta-banner p { font-size: 17px; color: rgba(255,255,255,.9); margin: 0 0 26px; position: relative; }
.cta-banner .btn-white { position: relative; }
.cta-banner--roomy .cta-copy p { margin-bottom: 52px; }
/* Photo CTA: illustration as the background, opaque on the left fading out
   to the right so the copy stays readable over the purple */
.cta-banner--photo {
  text-align: left;
  padding: 64px 56px;
  background:
    linear-gradient(90deg, #4A2AB8 0%, rgba(84,44,215,.96) 34%, rgba(100,54,255,.55) 58%, rgba(100,54,255,.06) 100%),
    url("../static/digital-critters.jpg") right center / cover no-repeat;
}
.cta-copy { position: relative; max-width: 460px; }
body.mobile-view .cta-banner--photo,
body.mobile-view .cta-copy { text-align: center; }
body.mobile-view .cta-banner--photo {
  padding: 40px 24px;
  background:
    linear-gradient(rgba(84,44,215,.9), rgba(84,44,215,.9)),
    url("../static/digital-critters.jpg") center / cover no-repeat;
}
@media (max-width: 720px) {
  .cta-banner--photo, .cta-copy { text-align: center; }
  .cta-banner--photo {
    padding: 40px 24px;
    background:
      linear-gradient(rgba(84,44,215,.9), rgba(84,44,215,.9)),
      url("../static/digital-critters.jpg") center / cover no-repeat;
  }
}
/* About: the closing banner is mirrored, its copy on the right over the
   purple and the illustration showing through on the left (desktop only;
   on mobile it stays centred over the full wash) */
@media (min-width: 721px) {
  body.about-page:not(.mobile-view) .cta-banner--photo {
    text-align: right;
    background:
      linear-gradient(270deg, #4A2AB8 0%, rgba(84,44,215,.96) 34%, rgba(100,54,255,.55) 58%, rgba(100,54,255,.06) 100%),
      url("../static/digital-critters.jpg") left center / cover no-repeat;
  }
  body.about-page:not(.mobile-view) .cta-copy { margin-left: auto; }
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #fff; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 54px 24px 30px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
}
body.mobile-view .footer-grid { grid-template-columns: 1fr; gap: 28px; }
body.mobile-view .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-brand { min-width: 180px; }
.footer-logo { height: 23px; width: auto; display: block; filter: brightness(0) invert(1); margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: var(--grey-faint); line-height: 1.55; max-width: 230px; margin: 0 0 16px; }
.footer-platforms {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #C3BFD2;
  margin: 0;
}
.footer-platforms a { color: #C3BFD2; }
.footer-platforms a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6E6A82;
  margin-bottom: 13px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: #C3BFD2; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 34px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.footer-bottom-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  font-size: 13px;
  color: #7E7A90;
}
.footer-terms { display: inline-flex; align-items: center; gap: 8px; }
.footer-terms a { color: #C3BFD2; }
.footer-terms a:hover { color: #fff; }
.footer-dot { color: #7E7A90; }
.footer-social { display: flex; gap: 9px; }
.footer-brand .footer-social { margin-top: 16px; }
.footer-social a {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C3BFD2;
}
.footer-social a:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Modals (shared) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20,19,32,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 32px 16px;
}
.modal {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  box-shadow: 0 40px 90px rgba(20,19,32,.4);
  overflow: hidden;
  animation: sk-rise .3s ease both;
  margin: auto;
}
.flow-modal { max-width: 460px; }
.demo-modal { max-width: 420px; }
.modal-close {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--grey-faint);
  font-size: 16px;
}
.modal-close:hover { background: #F3F1F9; color: var(--ink); }

/* ---------- Signup flow ---------- */
.flow-progress { display: flex; align-items: center; gap: 6px; padding: 18px 24px 0; }
.flow-step-ind { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.flow-step-ind .bar { height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.flow-step-ind span { font-size: 11px; font-weight: 600; color: #B6B2C2; }
.flow-step-ind.done .bar { background: var(--tertiary); }
.flow-step-ind.done span { color: var(--tertiary); }
.flow-progress .modal-close { margin-left: 6px; }

.flow-pane { padding: 22px 28px 30px; }
.flow-pane h3 { font-weight: 900; font-size: 25px; letter-spacing: -.02em; margin: 8px 0 6px; }
.flow-sub { font-size: 14.5px; color: var(--grey); margin: 0 0 22px; }
.flow-oauth { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  border: 1px solid #E4E1EE;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  background: #fff;
}
.btn-oauth:hover { background: #FAF9FE; border-color: #D9D3F6; }
.g-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: conic-gradient(#EA4335, #FBBC05, #34A853, #4285F4);
  display: inline-block;
}
.flow-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: #B6B2C2;
  font-size: 12px;
  font-weight: 600;
}
.flow-or span { flex: 1; height: 1px; background: var(--line); }
.flow-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.flow-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #E4E1EE;
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 14px;
  outline: none;
}
.flow-fineprint { font-size: 11.5px; color: var(--grey-faint); text-align: center; margin: 14px 0 0; line-height: 1.5; }

.flow-plans { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; }
.flow-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #E4E1EE;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: all .15s;
}
.flow-plan.selected { border: 2px solid var(--tertiary); background: #F6F4FE; }
.flow-plan-left { display: flex; align-items: center; gap: 12px; }
.flow-radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #CFCAE0;
  flex: none;
}
.flow-plan.selected .flow-radio { border: 6px solid var(--tertiary); }
.flow-plan-name { display: block; font-weight: 700; font-size: 15px; }
.flow-plan-note { display: block; font-size: 12.5px; color: var(--grey); }
.flow-plan-price { display: block; font-weight: 900; font-size: 17px; text-align: right; }
.flow-plan-save { display: block; font-size: 11.5px; color: var(--secondary-dark); font-weight: 700; text-align: right; }

.flow-payment {
  background: #FAF9FE;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
.flow-payment-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--grey-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}
.flow-field {
  background: #fff;
  border: 1px solid #E4E1EE;
  border-radius: 10px;
  padding: 12px 13px;
  font-size: 13px;
  color: #B6B2C2;
}
.flow-field--row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 9px; }
.flow-field--row span { font-family: 'Roboto', monospace; font-size: 12px; }
.flow-field-pair { display: flex; gap: 9px; }
.flow-field-pair .flow-field { flex: 1; }
.flow-mock-note { display: flex; align-items: center; gap: 7px; margin-top: 11px; font-size: 11.5px; color: var(--grey-faint); }
.flow-back { width: 100%; color: var(--grey); font-size: 13.5px; font-weight: 600; padding: 12px 0 0; }

.flow-pane--center { padding: 14px 28px 32px; text-align: center; }
.flow-critter { width: 104px; height: auto; margin: 4px auto 6px; display: block; animation: sk-pop .5s ease both; }
.flow-confirmed {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--secondary-dark);
  background: var(--secondary-tint);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.flow-pane--center h3 { margin: 0 0 8px; }
.flow-pane--center .flow-sub { margin-bottom: 16px; line-height: 1.5; }
#flow-lang button.active-ja { background: var(--pink); }
.flow-qr-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.flow-qr-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(20,19,32,.08);
  text-align: center;
}
.flow-qr-title { font-weight: 700; font-size: 13px; margin-bottom: 10px; color: var(--tertiary); }
.flow-qr-title.ja { color: var(--pink); }
.flow-qr {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  width: 138px; height: 138px;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto;
}
.flow-qr div { background: #fff; }
.flow-qr div.on { background: var(--ink); }
.flow-qr-url { font-family: 'Roboto', monospace; font-size: 9px; color: var(--grey-faint); margin-top: 8px; }
.flow-stores { display: flex; gap: 9px; justify-content: center; margin-bottom: 12px; }
.flow-stores button {
  font-family: 'Roboto', monospace;
  font-size: 10px;
  color: #fff;
  background: var(--ink);
  padding: 11px 15px;
  border-radius: 11px;
}
.flow-stores button:hover { background: #2C2A39; }
.flow-redeem { font-size: 12.5px; color: var(--tertiary); font-weight: 600; margin-bottom: 12px; animation: sk-rise .25s ease both; }
.flow-later {
  width: 100%;
  background: #fff;
  color: var(--grey);
  font-weight: 600;
  font-size: 13.5px;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid #E4E1EE;
}
.flow-later:hover { border-color: #D9D3F6; }

/* ---------- Demo modal ---------- */
.demo-head { padding: 22px 26px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.demo-kicker { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--tertiary); }
.demo-head h3 { font-weight: 900; font-size: 23px; letter-spacing: -.02em; margin: 8px 0 4px; }
.demo-char { color: var(--pink); }
.demo-pinyin { font-size: 15px; color: var(--grey-faint); font-weight: 600; }
.demo-head p { font-size: 13.5px; color: var(--grey); margin: 0; }
.demo-body { padding: 18px 26px 26px; }
.demo-pad {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #E7E3F1;
  background: #fff;
  aspect-ratio: 1/1;
}
.demo-grid-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 50% 50%;
  background-position: center;
}
.demo-diag-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, transparent calc(50% - .5px), var(--line-soft) 50%, transparent calc(50% + .5px)),
    linear-gradient(-45deg, transparent calc(50% - .5px), var(--line-soft) 50%, transparent calc(50% + .5px));
}
.demo-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 200px;
  color: #F4F2FA;
  font-weight: 700;
  user-select: none;
  pointer-events: none;
}
#demo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.demo-result {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: sk-rise .3s ease both;
}
.demo-check {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  animation: sk-pop .45s ease both;
}
.demo-praise { font-weight: 700; font-size: 18px; color: var(--secondary-dark); }
.demo-note { font-size: 13px; }
.demo-actions { display: flex; gap: 10px; margin-top: 16px; }
.demo-actions .btn-primary { flex: 1; font-weight: 700; font-size: 15px; padding: 13px; border-radius: 12px; }
.demo-to-trial { width: 100%; margin-top: 12px; color: var(--tertiary); font-weight: 700; font-size: 14px; padding: 6px; }

/* =========================================================
   Legal pages (Terms of Service, Privacy Policy)
   ========================================================= */

.legal-page { max-width: 780px; margin: 0 auto; padding: 56px 24px 76px; }
.legal-head { margin-bottom: 38px; border-bottom: 1px solid var(--line); padding-bottom: 26px; }
.legal-head h1 {
  font-weight: 900;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -.02em;
  line-height: 1.06;
  margin: 0 0 10px;
}
.legal-updated { font-size: 13.5px; color: var(--grey-faint); margin: 0; }
.legal-body h2 {
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin: 38px 0 12px;
}
.legal-body p { font-size: 15.5px; line-height: 1.7; margin: 0 0 14px; }
.legal-body ul { margin: 0 0 14px; padding-left: 24px; }
.legal-body li { font-size: 15.5px; line-height: 1.7; margin-bottom: 8px; }
.legal-body .legal-updated { margin-top: 38px; }

/* =========================================================
   About page
   ========================================================= */

/* about page keeps the plain page background (minimal white) */
.header-nav a.active { color: var(--tertiary); background: #F1EFFA; font-weight: 600; }
.hl-purple { color: var(--tertiary); }
.hl-pink { color: var(--pink); }

/* Hero: CEO quote over the Digital Critters art */
.about-hero--full { max-width: none; margin: 0; padding: 0; }
.about-hero-banner {
  overflow: hidden;
  padding: 84px 24px;
  background:
    linear-gradient(90deg, #4A2AB8 0%, rgba(84,44,215,.96) 38%, rgba(100,54,255,.55) 62%, rgba(100,54,255,.06) 100%),
    url("../static/digital-critters.jpg") right center / cover no-repeat;
}
.about-hero-inner { max-width: 1180px; margin: 0 auto; }
.about-hero-copy { max-width: 580px; }
.about-quote {
  font-weight: 900;
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0 0 22px;
  color: #fff;
}
/* the bright teal that reads on the purple: the quote's highlight, and the
   closing banner's "Write" on the About page... */
.about-quote-hl,
.about-page .cta-banner .hl { color: #67FFEC; }
/* About CTA button stays white like the other pages */
.about-attrib { display: flex; align-items: center; gap: 12px; }
.about-attrib-dash { width: 38px; height: 2px; background: var(--pink); border-radius: 2px; }
.about-attrib-name { font-size: 15px; font-weight: 600; color: #fff; }
.about-attrib-role { color: rgba(255,255,255,.75); }
body.mobile-view .about-hero-banner {
  padding: 44px 26px;
  background:
    linear-gradient(rgba(84,44,215,.92), rgba(84,44,215,.92)),
    url("../static/digital-critters.jpg") center / cover no-repeat;
}
body.mobile-view .about-quote { font-size: 23px; }
@media (max-width: 720px) {
  .about-hero-banner {
    padding: 44px 26px;
    background:
      linear-gradient(rgba(84,44,215,.92), rgba(84,44,215,.92)),
      url("../static/digital-critters.jpg") center / cover no-repeat;
  }
  .about-quote { font-size: 23px; }
}

/* Mission (simple, centered, white) + who-for */
/* About: all bold section headers share one size (fits the mission line unbroken) */
.about-page .section-head :is(h1, h2),
.about-page .team-head h2,
.about-page .who-tagline { font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.about-page .who-tagline { font-weight: 900; margin: 12px 0 16px; }
.mission-plain { padding-bottom: 20px; }
.mission-plain .section-sub { max-width: 620px; margin-left: auto; margin-right: auto; margin-top: 16px; text-align: left; }
/* a critter closes the mission and the who-for copy */
.about-critter { display: block; width: 240px; max-width: 70%; height: auto; margin: 24px auto 0; }
/* the science critter sits as close to the copy and the link as the
   paragraphs sit to each other (~18px of visible gap); its image carries
   ~17px of empty space top and bottom, so its margins pull in to cancel it */
.who-section .about-critter { margin: -17px auto -5px; }
.who-section { max-width: 820px; margin: 0 auto; padding: 20px 24px 40px; text-align: center; }
/* headings stay centered; body copy reads left-aligned on a narrow measure */
.who-section p { font-size: 16.5px; line-height: 1.65; margin: 0 auto 18px; max-width: 620px; text-align: left; }

/* Story */
.story-section { max-width: 1080px; margin: 0 auto; padding: 50px 24px 30px; }
.story-section .section-head { margin: 0 auto 46px; max-width: 560px; text-align: center; }
/* "Our story" as a hand-drawn timeline: three stops along a teal line drawn
   like the Hero's callout lines, ending in an arrowhead. Above the line each
   stop has its year in Caveat (brand teal); on the line, a hand-drawn ring (hollow for today); below it, the heading,
   with an inked Caveat note after it, and the text. On mobile the stops stack and the line runs down the
   left */
.timeline { position: relative; }
.timeline-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}
.timeline-year {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: var(--secondary);
}
/* the note trails its heading, wrapping to the next line when there's no room */
.timeline-note { font-family: var(--font-hand); font-size: 23px; font-weight: 400; letter-spacing: 0; white-space: nowrap; color: var(--ink); }
/* 44px year + 12px gap puts the rings' middles 65px down */
.timeline-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 18px;
  height: 18px;
  margin: 12px 0 22px 10px;
  overflow: visible;
  fill: var(--bg);
  stroke: var(--secondary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  translate: 0 var(--dot-dy, 0px);
}
.timeline-item:not(.timeline-item--teal) .timeline-dot { fill: var(--secondary); }
/* the line wobbles a little, so each ring is nudged onto it */
.timeline-item--purple { --dot-dy: -.3px; }
.timeline-item--pink { --dot-dy: 1px; }
.timeline-item--teal { --dot-dy: -2.6px; }
.timeline-item h3 { font-weight: 700; font-size: 23px; letter-spacing: -.01em; margin: 0 0 10px; }
.timeline-item p:last-child { font-size: 15.5px; line-height: 1.6; margin: 0; }
/* the line: the Hero callouts' teal stroke, a gentle wobble with its
   arrowhead, 40px tall with its middle on the rings' 65px line */
.timeline-line {
  position: absolute;
  top: 45px;
  left: 0;
  width: 100%;
  height: 40px;
  overflow: visible;
  fill: none;
  stroke: var(--secondary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.timeline-line path { vector-effect: non-scaling-stroke; }
.timeline-line--down { display: none; }
body.mobile-view .timeline { padding-left: 34px; }
body.mobile-view .timeline-items { grid-template-columns: 1fr; gap: 34px; }
body.mobile-view .timeline-item { position: relative; }
body.mobile-view .timeline-dot { position: absolute; left: -33px; top: 13px; margin: 0; translate: none; }
body.mobile-view .timeline-year { margin-bottom: 10px; }
body.mobile-view .timeline-line { display: none; }
body.mobile-view .timeline-line--down { display: block; top: 18px; left: -10px; width: 40px; height: calc(100% - 18px); }
@media (max-width: 720px) {
   .timeline { padding-left: 34px; }
   .timeline-items { grid-template-columns: 1fr; gap: 34px; }
   .timeline-item { position: relative; }
   .timeline-dot { position: absolute; left: -33px; top: 13px; margin: 0; translate: none; }
   .timeline-year { margin-bottom: 10px; }
   .timeline-line { display: none; }
   .timeline-line--down { display: block; top: 18px; left: -10px; width: 40px; height: calc(100% - 18px); }
}

/* the timeline plays in once it's scrolled to (main.js arms it, then draws
   the line from 2008 to the arrow at a steady speed by clipping it frame by
   frame; with reduced motion it's never armed and simply shows). Each stop
   gets .is-in the moment the line reaches its ring: the ring pops in and
   its year, heading and text fade in just after */
.timeline.is-armed:not(.is-playing) .timeline-line { clip-path: inset(-20px 100% -20px 0); }
.timeline.is-armed:not(.is-playing) .timeline-line--down { clip-path: inset(0 -20px 100% -20px); }
.timeline.is-armed .timeline-item:not(.is-in) > * { opacity: 0; }
.timeline-item.is-in > .timeline-dot { animation: tl-pop .3s cubic-bezier(.2,.7,.2,1.4) both; }
.timeline-item.is-in > :not(.timeline-dot) { animation: tl-in .5s ease .1s both; }
@keyframes tl-pop { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@keyframes tl-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Team */
.team-band { margin-top: 40px; }
.team-inner { max-width: 1180px; margin: 0 auto; padding: 60px 24px 66px; }
.team-head { max-width: 620px; margin: 0 auto 40px; text-align: center; }
.team-head h2 {
  font-weight: 900;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: 8px 0 16px;
}
.team-head p { font-size: 16.5px; line-height: 1.55; margin: 0; text-align: left; }
.team-note { font-size: 13px; color: var(--grey-faint); margin: 28px 0 0; font-style: italic; }

/* Team cards: one column on mobile, two from 721px, in a narrower column than the page. Each card:
   photo with name and role centred under it, then hand-written about / speaks / learning / loves labels in the card's colour */
.team-list { display: grid; gap: 44px 40px; max-width: 900px; margin: 0 auto; }
.team-entry--purple { --card-ink: var(--tertiary); --card-mark: rgba(100,54,255,.1); }
.team-entry--pink { --card-ink: var(--pink); --card-mark: rgba(237,76,156,.12); }
.team-entry--teal { --card-ink: var(--secondary-dark); --card-mark: rgba(50,191,178,.2); }
.team-entry-head { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.team-entry-photo { position: relative; width: 104px; }
.team-entry-photo > img { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--line); }
/* easter egg: on a mouse, hovering Iona's photo fades in her critter */
.team-entry-photo > .team-entry-egg { position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease; }
@media (hover: hover) {
  .team-entry-photo:hover > .team-entry-egg { opacity: 1; }
}
/* a hand-drawn ring in the card's colour, closed with a small overlap, centred just outside the photo */
.team-entry-ring {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  overflow: visible;
  fill: none;
  stroke: var(--card-ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  pointer-events: none;
}
.team-entry-name { font-weight: 700; font-size: 19px; letter-spacing: -.01em; line-height: 1.2; margin: 0; }
.team-entry-cjk { font-weight: 500; margin-left: 4px; white-space: nowrap; }
.team-entry-role { font-family: var(--font-hand); font-size: 19px; line-height: 1.1; color: var(--card-ink); margin: 4px 0 0; }
/* highlighter behind the role: the hand-cut sticker shape of "See what our learners say", tinted in the card's
   colour and kept shorter than the letters so it only sits under their lower part */
.team-entry-role mark {
  position: relative;
  isolation: isolate;
  background: none;
  color: inherit;
}
.team-entry-role mark::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.4em;
  right: -.4em;
  top: 38%;
  bottom: -2%;
  background: var(--card-mark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 56' preserveAspectRatio='none'%3E%3Cpath d='M10 6 C 50 2, 120 5.5, 188 3 C 196 3, 199.5 10, 197 22 C 195.5 34, 199 44, 192 51 C 150 54.5, 80 50.5, 12 54 C 4 54.5, 1.5 46, 3 33 C 4.5 22, 1 10, 10 6 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 56' preserveAspectRatio='none'%3E%3Cpath d='M10 6 C 50 2, 120 5.5, 188 3 C 196 3, 199.5 10, 197 22 C 195.5 34, 199 44, 192 51 C 150 54.5, 80 50.5, 12 54 C 4 54.5, 1.5 46, 3 33 C 4.5 22, 1 10, 10 6 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.team-entry-facts { display: grid; grid-template-columns: max-content 1fr; gap: 12px; align-items: baseline; margin: 22px 0 0; }
/* labels as small bold caps (the site's kicker style), right-aligned against the copy */
.team-entry-facts dt { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.5; color: var(--card-ink); text-transform: uppercase; text-align: right; }
.team-entry-facts dd { font-size: 13px; line-height: 1.5; margin: 0; }

@media (min-width: 721px) {
  body:not(.mobile-view) .team-list { grid-template-columns: 1fr 1fr; gap: 56px 40px; }
  body:not(.mobile-view) .team-entry-photo { width: 150px; }
}

/* =========================================================
   Why Skritter — variant B (scrollytelling, build toggle)
   ========================================================= */

/* ---------- Why Skritter: three captures, one point each ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: start;
}
.why-col { text-align: center; }
.why-col h3 { margin: 26px 0 8px; }
/* titles in the hand font, black, with the Features tabs' hand-drawn teal underline */
.why-title {
  display: inline-block;
  padding: 0 2px 12px;
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  line-height: 32px;
  color: var(--ink);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2 C 30 3.6, 62 6.2, 90 4.4 S 112 3.8, 118 4.6' fill='none' stroke='%2332BFB2' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left bottom 2px / 100% 8px;
}
.why-col p { font-size: 14.5px; line-height: 1.6; margin: 0 auto; max-width: 34ch; }
/* the real iPhone frame laid over the capture: its screen area is see-through, and it carries the
   dynamic island and side buttons. The capture sits in that screen area (x 51-925, y 50-1950 of 977x2000) */
.why-phone {
  position: relative;
  z-index: 1;
  width: 220px;
  margin: 0 auto;
  aspect-ratio: 977/2000;
}
.why-phone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("../static/screens/phone-frame.webp") no-repeat center / 100% 100%;
  pointer-events: none;
}
.why-screen {
  position: absolute;
  left: 5.22%;
  top: 2.5%;
  width: 89.46%;
  height: 95%;
  border-radius: 13% / 6%;
  overflow: hidden;
  background: #fff;
}
.why-screen img, .why-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* a line break that only applies on mobile */
.br-mobile { display: none; }
body.mobile-view .br-mobile { display: inline; }
#why .stats { margin-top: 64px; }
/* the hand-drawn line behind the phones: as wide as the page, centred on the phones' middle (a 220px
   phone is 450px tall); the section clips it at the page edge. Desktop only for now */
#why { overflow-x: clip; }
.why-grid { position: relative; }
.why-col { position: relative; z-index: 1; }
.why-line {
  position: absolute;
  left: 50%;
  top: 125px;
  width: 100vw;
  height: 200px;
  translate: -50% 0;
  overflow: visible;
  fill: none;
  stroke: var(--secondary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.why-line path { vector-effect: non-scaling-stroke; }
.why-line .why-line-short { display: none; }
/* mobile: the three phones become a sideways swipe of 300px cards, one centred at a time with the next
   peeking in. The swipe bleeds to the screen edges (-24px), its side padding centres the first and last
   card, and the line spans the whole swipe less 32px at each end (screen width - 300 + 3 x 300 + 2 x 16
   - 64 = width + 568px), so it scrolls along as one continuous backdrop that stops short of the first and
   last page. A 196px phone is 401px tall; drawn 168px high, the line
   centres on it at 116px and its two loops land in the middle of the gaps between the phones.
   Titles drop to 26px so each stays on one line in a card */
body.mobile-view .why-grid {
  display: flex;
  gap: 16px;
  margin: 0 -24px;
  padding: 0 calc((100% + 48px - 300px) / 2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
body.mobile-view .why-grid::-webkit-scrollbar { display: none; }
body.mobile-view .why-col { flex: 0 0 300px; scroll-snap-align: center; }
body.mobile-view .why-title { font-size: 26px; }
body.mobile-view .why-line { display: block; left: 32px; top: 116px; width: calc(100% + 568px); height: 168px; translate: none; }
body.mobile-view .why-line .why-line-full { display: none; }
body.mobile-view .why-line .why-line-short { display: inline; }
body.mobile-view .why-grid.is-dragging { scroll-snap-type: none; cursor: grabbing; }

body.mobile-view .why-phone { width: 196px; }
body.mobile-view .feat-pin { min-height: 0; top: 72px; justify-content: flex-start; }

/* =========================================================
   Login modal (visual spec)
   ========================================================= */

.login-modal { max-width: 420px; padding: 32px; text-align: left; position: relative; }
.login-modal .modal-close { position: absolute; top: 14px; right: 14px; }
.login-heading { font-weight: 900; font-size: 25px; color: var(--ink); margin: 0 0 8px; }
.login-subline { font-size: 14px; line-height: 1.4; color: var(--grey); margin: 0 0 24px; }
.login-oauth-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.login-apple-icon { width: 18px; font-size: 18px; line-height: 1; display: inline-block; }
.login-apple-icon::before { content: "\F8FF"; }
.login-password-label { margin-top: 16px; }
.login-forgot-row { display: flex; justify-content: flex-end; margin: 8px 0 20px; }
.login-link-btn { background: none; border: 0; padding: 0; font-size: 13px; color: var(--tertiary); cursor: pointer; }
.login-submit { margin-top: 4px; }
.login-back-btn { display: block; margin: 16px auto 0; background: none; border: 0; padding: 0; font-size: 14px; color: var(--grey); cursor: pointer; }
.login-to-trial { background: none; border: 0; padding: 0; font: inherit; color: var(--tertiary); text-decoration: underline; cursor: pointer; }
.login-check-circle { width: 52px; height: 52px; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.login-heading-center { text-align: center; }
.login-subline-center { text-align: center; margin-bottom: 24px; }
.login-btn-secondary { background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }

/* ---------- Real small screens (mirror of mobile-view) ---------- */
@media (max-width: 720px) {
  .lib-grid--decks { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .lib-card--deck .lib-body { display: none; }
  .lib-controls { flex-wrap: nowrap; gap: 5px; margin-bottom: 18px; }
  .seg { padding: 3px; border-radius: 10px; }
  .seg button { padding: 6px 6px; font-size: 10.5px; border-radius: 7px; letter-spacing: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .header-nav, .header-login { display: none; }
  .header-burger { display: flex; }
  .header { position: relative; }
  .hero h1 { font-size: 36px; }
  
  
  
  .hero-phone { width: 46%; }
  
  
  .hero .hero-phone { width: 200px; }
  
  
  
  
  
  .hero-actions { order: 4; align-items: center; margin-top: 4px; }
  .stats { padding: 22px 0 20px; }
  #why .stats { margin-top: 12px; }
  .stats-grid { display: flex; gap: 36px; margin: 0 -24px; padding: 0 calc((100% + 48px - 240px) / 2); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .stats-grid::-webkit-scrollbar { display: none; }
  .stats-grid.is-dragging { scroll-snap-type: none; cursor: grabbing; }
  .stat { flex: 0 0 240px; scroll-snap-align: center; }
  .stat-num { font-size: 52px; }
  .why-phone { width: 196px; }
  .br-mobile { display: inline; }
  .why-grid {
    display: flex;
    gap: 16px;
    margin: 0 -24px;
    padding: 0 calc((100% + 48px - 300px) / 2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .why-grid::-webkit-scrollbar { display: none; }
  .why-col { flex: 0 0 300px; scroll-snap-align: center; }
  .why-title { font-size: 26px; }
  .why-line { display: block; left: 32px; top: 116px; width: calc(100% + 568px); height: 168px; translate: none; }
  .why-line .why-line-full { display: none; }
  .why-line .why-line-short { display: inline; }
  .why-grid.is-dragging { scroll-snap-type: none; cursor: grabbing; }
  .feat-pin { min-height: 0; top: 72px; justify-content: flex-start; }
  .feat-pager { display: none; }
}

/* =========================================================
   Institutions page (Skritter for Schools)
   ========================================================= */

/* full-bleed color wash; the .hero inside keeps the 1180px content width */
.inst-hero-band {
  background:
    radial-gradient(1400px 560px at 78% -6%, #EAF7F3 0%, rgba(234,247,243,0) 60%),
    radial-gradient(1100px 520px at 8% 4%, #F1ECFD 0%, rgba(241,236,253,0) 55%);
}
.inst-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.inst-hero-actions .btn-ghost { background: #fff; padding: 15px 26px; border-radius: 13px; font-size: 16px; }
.inst-hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 260px; }
.inst-hero-critter { position: relative; width: 64%; max-width: 300px; height: auto; animation: sk-float 6s ease-in-out infinite; filter: drop-shadow(0 16px 30px rgba(20,19,32,.16)); }

/* Feature tiles (16:10 web-screenshot slots) */
.inst-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.inst-feat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(20,19,32,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.inst-feat:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(20,19,32,.08); }
.inst-feat-shot {
  aspect-ratio: 16/10;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  margin-bottom: 12px;
}
.inst-feat-shot span {
  font-family: 'Roboto', monospace;
  font-size: 9px;
  background: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--grey);
}
.inst-feat-shot--a { background: repeating-linear-gradient(135deg, #DFF5EF, #DFF5EF 12px, #D0EFE6 12px, #D0EFE6 24px); }
.inst-feat-shot--b { background: repeating-linear-gradient(135deg, #EFEBFA, #EFEBFA 12px, #E7E1F6 12px, #E7E1F6 24px); }
.inst-feat-shot--c { background: repeating-linear-gradient(135deg, #FCE9F2, #FCE9F2 12px, #F7DCEA 12px, #F7DCEA 24px); }
.inst-feat-shot--d { background: repeating-linear-gradient(135deg, #FBEEDD, #FBEEDD 12px, #F6E3C8 12px, #F6E3C8 24px); }
.inst-feat-shot--art { align-items: center; justify-content: center; }
.inst-feat-shot--art img { max-height: 78%; max-width: 70%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(20,19,32,.12)); }
.inst-feat h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; margin: 0; }
body.mobile-view .inst-features { grid-template-columns: repeat(2, 1fr); }
.inst-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.inst-dot--a { background: var(--secondary); }
.inst-dot--b { background: var(--tertiary); }
.inst-dot--c { background: var(--pink); }
.inst-dot--d { background: var(--amber); }

/* How it works */
.inst-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.inst-step { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; box-shadow: 0 4px 16px rgba(20,19,32,.04); }
.inst-step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--tertiary-tint); color: var(--tertiary);
  font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.inst-step h3 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.inst-step p { font-size: 14.5px; line-height: 1.6; color: var(--grey); margin: 0; }
.inst-step ul { margin: 10px 0 0; padding-left: 18px; font-size: 14.5px; line-height: 1.6; color: var(--grey); }
.inst-step ul li { margin-bottom: 6px; }

/* Tiered pricing */
.inst-pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 760px; margin: 0 auto; }
.inst-pricing-grid .plan-btn { margin-top: 26px; }
.inst-pricing-grid a.plan-btn { display: block; text-align: center; }
.inst-plan-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.inst-plan-wide .plan-sub { margin: 8px 0 0; min-height: 0; }
.inst-plan-wide .plan-btn { width: auto; margin-top: 0; padding: 13px 30px; flex: none; }

/* Trial form */
.inst-form { display: flex; flex-direction: column; gap: 18px; max-width: 640px; margin: 0 auto; }
.inst-form textarea::placeholder { font-family: 'Caveat', cursive; font-size: 19px; line-height: 1.3; color: var(--grey); }
.inst-form .inst-field:last-child { text-align: center; }
.inst-submit { font-size: 17.5px; padding: 16px 38px; }
.inst-form .flow-input { margin-bottom: 0; }
.inst-form textarea.flow-input { min-height: 96px; resize: vertical; }
.inst-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }

/* intent cards */
.inst-intent { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: -8px; }
.inst-intent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.inst-intent-card:has(input:checked) { border-color: var(--tertiary); background: #F5F2FF; }
.inst-intent-card input { accent-color: var(--tertiary); width: 17px; height: 17px; flex: none; }
.inst-intent-copy { display: flex; flex-direction: column; gap: 2px; }
.inst-intent-copy strong { font-size: 15.5px; }
.inst-intent-copy span { font-size: 13px; color: var(--grey); }

/* numbered section dividers */
.inst-sec { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.inst-sec-num {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  background: #EEEBFD;
  color: var(--tertiary);
  font-size: 12.5px;
  font-weight: 700;
}
.inst-sec-label { font-weight: 700; font-size: 15.5px; }
.inst-sec::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* chip selectors */
.inst-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.inst-chip {
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
.inst-chip:hover { border-color: #C9C2E8; }
.inst-chip.selected { border-color: var(--tertiary); background: #F5F2FF; color: var(--tertiary); font-weight: 600; }

.inst-opt { font-weight: 400; color: var(--grey); font-size: 12.5px; }
.inst-form .flow-label { display: block; margin-bottom: 8px; }
.inst-form .inst-hint { margin: -8px 0 0; }
.inst-field--full { grid-column: 1 / -1; }
.inst-hint { font-size: 12px; color: var(--grey-faint); margin-top: 6px; }
.inst-radio-group { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 4px; }
.inst-radio-group label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.inst-required-note { font-size: 12.5px; color: var(--grey-faint); margin: 4px 0 16px; }

body.mobile-view .inst-form { grid-template-columns: 1fr; }
body.mobile-view .inst-pricing-grid { grid-template-columns: 1fr; }
body.mobile-view .inst-plan-wide { flex-direction: column; align-items: stretch; text-align: center; }
body.mobile-view .inst-plan-wide .plan-btn { width: 100%; }
body.mobile-view .inst-hero-visual { min-height: 0; padding-bottom: 20px; }

@media (max-width: 720px) {
  .inst-features { grid-template-columns: repeat(2, 1fr); }
  .inst-form { grid-template-columns: 1fr; }
  .inst-pricing-grid { grid-template-columns: 1fr; }
  .inst-plan-wide { flex-direction: column; align-items: stretch; text-align: center; }
  .inst-plan-wide .plan-btn { width: 100%; }
  .inst-hero-visual { min-height: 0; padding-bottom: 20px; }
}


/* CTA banner accent word: teal on purple */
.cta-banner .hl { color: var(--secondary); }


/* ---------- Library grid swap: fade + scale ---------- */
#lib-grid, #plan-cards { transform-origin: center; }
/* min-height keeps the page from jumping when tabs have different card counts */
#lib-grid { min-height: 280px; }
body.mobile-view #lib-grid { min-height: 90px; }
@media (max-width: 720px) { #lib-grid { min-height: 90px; } }
.swap-exit {
  opacity: 0;
  transform: scale(.99);
  transition: opacity 120ms ease-in, transform 120ms ease-in;
}
.swap-enter { opacity: 0; transform: scale(.99); }
/* gentle ease-out (no hard deceleration snap) over a short scale distance */
.swap-enter-active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 240ms cubic-bezier(.215, .61, .355, 1), transform 240ms cubic-bezier(.215, .61, .355, 1);
}
@media (prefers-reduced-motion: reduce) {
  .swap-exit { transform: none; transition: opacity 100ms ease; }
  .swap-enter { transform: none; }
  .swap-enter-active { transform: none; transition: opacity 100ms ease; }
}

/* ========================================================= 
   Resources page (partners, integrations, other tools)
   ========================================================= */
.res-head { padding-bottom: 0; }
.res-head .section-head { max-width: 640px; }
.res-head h1 { font-weight: 900; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.02em; margin: 0; }
.res-head .section-sub a { color: var(--tertiary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.res-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 26px 22px;
  box-shadow: 0 4px 16px rgba(20,19,32,.04);
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.res-card:hover { transform: translateY(-4px); border-color: var(--tertiary); box-shadow: 0 18px 40px rgba(100,54,255,.12); }
.res-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.res-logo { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--bg); border: 1px solid var(--line-soft); flex: none; }
.res-card h3 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.res-card p { font-size: 14.5px; line-height: 1.6; margin: 0 0 10px; }
.res-code {
  align-self: flex-start;
  margin: 2px 0 12px;
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--secondary-tint);
  color: var(--secondary-dark);
  font-size: 12.5px; font-weight: 600;
}
.res-code b { font-weight: 800; letter-spacing: .04em; }
.res-links { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.res-link { font-size: 14px; font-weight: 700; color: var(--tertiary); text-decoration: none; }
.res-link::after { content: " \2192"; }
.res-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.res-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.res-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700; font-size: 14.5px;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.res-tile img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line-soft); flex: none; }
.res-tile:hover { transform: translateY(-4px); border-color: var(--tertiary); box-shadow: 0 18px 40px rgba(100,54,255,.12); }
.res-feature {
  flex-direction: row; align-items: center; gap: 28px;
  margin-bottom: 18px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #fff 55%, var(--tertiary-tint));
}
.res-feature-logo { width: 112px; height: 112px; border-radius: 26px; object-fit: cover; border: 1px solid var(--line-soft); flex: none; box-shadow: 0 10px 24px rgba(34,28,74,.1); }
.res-feature-body { display: flex; flex-direction: column; }
.res-feature h3 { font-size: 26px; margin-bottom: 8px; }
.res-feature p { font-size: 15.5px; max-width: 720px; }
.res-team {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--secondary-tint);
  color: var(--secondary-dark);
  font-size: 12.5px; font-weight: 700;
}
.res-feature-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.res-feature-title h3 { margin: 0; }
.res-feature-title .res-team { margin-bottom: 0; align-self: center; }
a.res-team { text-decoration: none; transition: background .2s, color .2s; }
a.res-team:hover { background: var(--secondary); color: #fff; }
.team-member, .team-entry { scroll-margin-top: 120px; }
@media (max-width: 720px) { .res-feature { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; } .res-feature-logo { width: 72px; height: 72px; border-radius: 18px; } }
body.mobile-view .res-feature { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; }
body.mobile-view .res-feature-logo { width: 72px; height: 72px; border-radius: 18px; }
body.mobile-view .res-grid { grid-template-columns: 1fr; }
body.mobile-view .res-tiles { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .res-grid { grid-template-columns: 1fr; } .res-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .res-tiles { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   Skritter Official Decks page (decks.html)
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dk-head { padding-bottom: 6px; }
.dk-head .section-head { max-width: 640px; }
.dk-head h1 { font-size: clamp(20px, 1.9vw, 24px); font-weight: 700; line-height: 1.35; letter-spacing: -.005em; margin: 0; }
.dk-head .section-sub { font-size: 15.5px; }

/* language tabs = the headline counts */
.dk-tabs { display: flex; justify-content: center; gap: 16px; margin: 30px auto 0; }
.dk-tab {
  display: flex; flex-direction: column; align-items: center;
  min-width: 210px; padding: 14px 26px 16px;
  background: #fff; border: 2px solid var(--line); border-radius: 20px;
  font: inherit; color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 20px rgba(20,19,32,.05);
  transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
.dk-tab:hover { transform: translateY(-3px); border-color: #C9C2E8; }
.dk-tab-num { font-family: var(--font-hand); font-weight: 700; font-size: 58px; line-height: 1; }
.dk-tab-label { font-size: 14.5px; font-weight: 700; margin-top: 2px; }
.dk-tab[aria-selected="true"] { border-color: var(--tertiary); background: var(--tertiary-tint); box-shadow: 0 14px 34px rgba(100,54,255,.16); }
.dk-tab[aria-selected="true"] .dk-tab-num { color: var(--tertiary); }

/* search + dropdowns on one line */
.dk-tools { display: flex; gap: 10px; max-width: 760px; margin: 26px auto 0; }
.dk-search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px; height: 50px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  box-shadow: 0 8px 26px rgba(20,19,32,.06);
  transition: border-color .2s, box-shadow .2s;
}
.dk-search:focus-within { border-color: var(--tertiary); box-shadow: 0 10px 30px rgba(100,54,255,.14); }
.dk-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; opacity: .6; }
.dk-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); }
.dk-select { position: relative; flex: none; }
.dk-select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); pointer-events: none; opacity: .7;
}
.dk-select select {
  appearance: none; -webkit-appearance: none;
  height: 50px; padding: 0 40px 0 18px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer;
  box-shadow: 0 8px 26px rgba(20,19,32,.06);
}
.dk-select select:focus { outline: 0; border-color: var(--tertiary); }
.dk-status { text-align: center; font-size: 13.5px; margin: 16px 0 0; }
.dk-switch { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--tertiary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* showcase rows */
.dk-showcase { min-height: 300px; }
.dk-row { margin-bottom: 34px; }
.dk-row-h { font-size: 20px; font-weight: 900; letter-spacing: -.01em; margin: 0 0 14px; }
.dk-track {
  display: flex; gap: 18px;
  overflow-x: auto; scroll-snap-type: x proximity;
  padding: 4px 4px 14px; margin: 0 -4px;
  scrollbar-width: thin;
}
.dk-card { flex: none; width: 132px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.dk-cover {
  display: block; width: 132px; aspect-ratio: 351/512; object-fit: cover;
  border-radius: 10px; margin-bottom: 6px;
  box-shadow: 0 8px 18px rgba(20,19,32,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.dk-card:hover .dk-cover { transform: translateY(-4px) rotate(-1.5deg); box-shadow: 0 16px 30px rgba(100,54,255,.18); }
.dk-ph { display: flex; flex-direction: column; justify-content: space-between; padding: 12px 11px; }
.dk-ph b { font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.dk-ph span { font-size: 15px; font-weight: 900; line-height: 1.12; letter-spacing: -.01em; }
.dk-ph--teal { background: linear-gradient(160deg, #DEF6F1, #A9E7DE); color: var(--secondary-dark); }
.dk-ph--purple { background: linear-gradient(160deg, #EEEBFD, #C9BEFF); color: #3E22B8; }
.dk-ph--pink { background: linear-gradient(160deg, #FCE6F1, #F7B9D8); color: #B0306F; }
.dk-ph--amber { background: linear-gradient(160deg, #FEF1DA, #F9D597); color: #8A5A08; }
.dk-title { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.dk-meta { font-size: 12px; color: var(--grey); }
@media (max-width: 720px) {
  .dk-tabs { gap: 10px; }
  .dk-tab { min-width: 0; flex: 1; padding: 12px 10px 14px; }
  .dk-tab-num { font-size: 46px; }
  .dk-tab-label { font-size: 13px; }
  .dk-tools { flex-wrap: wrap; }
  .dk-search { flex-basis: 100%; }
  .dk-select { flex: 1; }
  .dk-select select { width: 100%; }
  .dk-card, .dk-cover { width: 112px; }
}
body.mobile-view .dk-tab { min-width: 0; flex: 1; padding: 12px 10px 14px; }
body.mobile-view .dk-tab-num { font-size: 46px; }
body.mobile-view .dk-tools { flex-wrap: wrap; }
body.mobile-view .dk-search { flex-basis: 100%; }
body.mobile-view .dk-select { flex: 1; }
body.mobile-view .dk-select select { width: 100%; }
body.mobile-view .dk-card, body.mobile-view .dk-cover { width: 112px; }
.dk-hl {
  /* hand-drawn purple squiggle under the phrase (repeats to fit any width) */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4.5 C 4 0.5, 8 0.5, 12 4.5 S 20 8.5, 24 4.5' fill='none' stroke='%236436FF' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left bottom / 24px 8px;
  color: inherit; padding-bottom: 7px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.dk-showcase { padding-top: 56px; }
.dk-showcase-h { font-size: clamp(24px, 2.4vw, 30px); font-weight: 900; letter-spacing: -.01em; margin: 0 0 26px; }
.dk-status[hidden] { display: none; }
button.dk-card { border: 0; background: none; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.dk-cover-wrap { position: relative; display: block; }
.dk-latest {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--tertiary); color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(100,54,255,.3);
}
/* deck preview modal */
.dk-modal { max-width: 380px; position: relative; text-align: center; }
.dk-modal-close { position: absolute; top: 12px; right: 12px; z-index: 1; background: rgba(255,255,255,.85); }
.dk-modal-art { padding: 34px 0 6px; background: linear-gradient(180deg, var(--tertiary-tint), #fff); }
.dk-modal-cover { display: block; width: 190px; aspect-ratio: 351/512; object-fit: cover; margin: 0 auto; border-radius: 14px; box-shadow: 0 20px 40px rgba(20,19,32,.22); }
.dk-modal-cover.dk-ph { padding: 18px 16px; }
.dk-modal-cover.dk-ph b { font-size: 14px; }
.dk-modal-cover.dk-ph span { font-size: 22px; }
.dk-modal-body { padding: 18px 28px 26px; display: flex; flex-direction: column; gap: 10px; }
.dk-modal-meta { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--secondary-dark); }
.dk-modal-title { margin: 0 0 8px; font-size: 22px; font-weight: 900; line-height: 1.2; }
.dk-modal-store { font-size: 14px; font-weight: 700; color: var(--tertiary); }
/* desktop: six decks spread evenly across the row (phones keep the sideways scroll) */
@media (min-width: 721px) {
  body:not(.mobile-view) .dk-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px; overflow: visible; }
  body:not(.mobile-view) .dk-card { width: auto; }
  body:not(.mobile-view) .dk-cover { width: 100%; max-width: 170px; }
}
.dk-showcase-h { font-family: var(--font-hand); font-weight: 700; font-size: clamp(32px, 3.2vw, 42px); letter-spacing: 0; }
.dk-modal-desc { margin: -4px 0 8px; font-size: 14px; line-height: 1.55; text-align: left; }
.dk-modal-desc[hidden] { display: none; }
.dk-row--library .dk-row-h { color: var(--tertiary); }
.dk-showcase-h[hidden] { display: none; }

/* =========================================================
   Account modal: mirrors the mobile app's Welcome back / Create your account / Reset your password
   ========================================================= */
.auth-modal { --app-teal: #0A5E63; max-width: 440px; padding: 44px 40px 30px; text-align: center; }
.auth-back, .auth-modal .modal-close { position: absolute; top: 14px; }
.auth-back { left: 14px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.auth-back[hidden] { display: none; }
.auth-back:hover { background: #F3F1F9; }
.auth-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.auth-modal .modal-close { right: 14px; }
.auth-critter { display: block; height: 150px; width: auto; margin: 0 auto 14px; }
.auth-critter--wide { height: 140px; }
.auth-h { font-size: 30px; font-weight: 900; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 8px; color: var(--ink); }
.auth-sub { font-size: 15.5px; line-height: 1.45; margin: 0 0 24px; color: #3A3946; }
.auth-stack { display: flex; flex-direction: column; gap: 12px; }
.auth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 52px; border-radius: 999px;
  background: var(--app-teal); color: #fff; border: 1.5px solid var(--app-teal);
  font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer;
  transition: filter .15s, background .15s;
}
.auth-btn:hover { filter: brightness(1.12); }
.auth-btn--outline { background: #fff; color: var(--app-teal); }
.auth-btn--outline:hover { filter: none; background: #F1F8F8; }
.auth-ic { width: 20px; height: 20px; flex: none; }
.auth-or { margin: 14px 0; font-size: 15px; color: #3A3946; }
.auth-input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1.5px solid #B9B7C2; border-radius: 10px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink);
}
.auth-input::placeholder { color: #9D9BAA; }
.auth-input:focus { outline: 0; border-color: var(--app-teal); box-shadow: 0 0 0 3px rgba(10,94,99,.12); }
.auth-pass { position: relative; }
.auth-pass .auth-input { padding-right: 52px; }
.auth-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: #77757F; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.auth-eye svg { width: 22px; height: 22px; }
.auth-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--app-teal); cursor: pointer; }
.auth-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-forgot { display: block; margin: 18px auto 0; font-size: 15px; }
.auth-foot { margin: 22px 0 0; font-size: 15px; color: var(--ink); }
.auth-legal { margin: 22px 0 0; font-size: 13.5px; line-height: 1.5; color: #5A5966; }
.auth-legal a { font-weight: 700; color: var(--app-teal); text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }
@media (max-width: 720px) { .auth-modal { padding: 44px 22px 26px; } .auth-h { font-size: 27px; } }
/* hero deck strips link to the decks page: lift the covers a touch on hover */
a.hero-callout-cards { text-decoration: none; cursor: pointer; }
/* hero deck fans move as one block: on hover the whole fan eases up and grows a little, then settles back */
a.hero-callout-cards { transition: transform .4s cubic-bezier(.34, 1.3, .64, 1); transform-origin: 50% 80%; }
a.hero-callout-cards:hover { transform: translateY(-4px) scale(1.06); }
.team-entry-link { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--tertiary); text-decoration: none; }
.team-entry-link:hover { text-decoration: underline; text-underline-offset: 3px; }
/* "See our integrations & partners": last line of the Socials column, set apart by a hairline */
/* styled exactly like the column labels (e.g. SOCIALS), but it's a link to resources.html */
.mega-col a.mega-more { display: block; margin: 18px 0 0; padding: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: none; }
.mega-col a.mega-more:hover { background: none; color: var(--tertiary); }

/* phones: the four key stats stack, a hand-drawn teal rule lying across between each (desktop keeps the row) */
@media (max-width: 720px) {
  .stats-grid { display: grid; grid-template-columns: 1fr; gap: 44px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
  .stat { flex: none; }
  .stat + .stat::before {
    left: 0; right: 0; top: -22px; bottom: auto; width: auto; height: 6px; translate: 0 -50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3 C 40 2.2, 82 3.8, 120 3 S 172 2.3, 198 3.2' fill='none' stroke='%2332BFB2' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  }
}
body.mobile-view .stats-grid { display: grid; grid-template-columns: 1fr; gap: 44px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
body.mobile-view .stat { flex: none; }
body.mobile-view .stat + .stat::before {
  left: 0; right: 0; top: -22px; bottom: auto; width: auto; height: 6px; translate: 0 -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3 C 40 2.2, 82 3.8, 120 3 S 172 2.3, 198 3.2' fill='none' stroke='%2332BFB2' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
/* phones: the three app captures stack one under another (no sideways swipe), like the key stats */
@media (max-width: 720px) {
  .why-grid { display: grid; grid-template-columns: 1fr; gap: 44px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
  .why-col { flex: none; }
}
body.mobile-view .why-grid { display: grid; grid-template-columns: 1fr; gap: 44px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
body.mobile-view .why-col { flex: none; }
/* Mobile, Tablet & Web: the cards themselves don't react; only their real links do */
.section--stats { padding-top: 0; }
/* store links and web login: matching purple pills, same height and width */
/* decks page: counts in the regular font (Caveat's 7 read poorly); Highlights heading matches About's "Small team, big characters." */
.dk-tab-num { font-family: var(--font-ui); font-weight: 900; font-size: 46px; letter-spacing: -.02em; }
.dk-showcase-h { font-family: var(--font-ui); font-weight: 900; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
@media (max-width: 720px) { .dk-tab-num { font-size: 38px; } }
body.mobile-view .dk-tab-num { font-size: 38px; }
.dk-showcase-head { text-align: center; margin: 0 auto 30px; max-width: 640px; }
.dk-showcase-head .dk-showcase-h { margin: 0 0 8px; }
.dk-showcase-head .section-sub { margin: 0; }
.dk-showcase-head[hidden] { display: none; }
.dk-tab[aria-selected="true"] .dk-tab-label { color: var(--tertiary); }
.dk-head .section-head { max-width: 720px; }
/* Mobile, Tablet & Web: flat like the rest of the page (no drop shadows on the cards or photos) */

/* =========================================================
   Institutions: Features in the homepage style (handwritten numbered list + photos), flat cards
   ========================================================= */
.inst-features-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; max-width: 1040px; margin: 0 auto; }
.inst-features-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inst-features-photos img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px; }
.inst-features-photos img:first-child { object-position: 38% 50%; }
.inst-features-photos img:last-child { object-position: 42% 60%; margin-top: 36px; }
.inst-features-list { list-style: none; counter-reset: instf; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.inst-features-list li { counter-increment: instf; display: flex; align-items: baseline; gap: 12px; font-family: var(--font-hand); font-weight: 700; font-size: 32px; line-height: 1.15; color: var(--ink); }
.inst-features-list li::before { content: counter(instf) "."; color: var(--secondary); min-width: 1.1em; }
.inst-features-list li span { padding: 0 2px 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2 C 30 3.6, 62 6.2, 90 4.4 S 112 3.8, 118 4.6' fill='none' stroke='%2332BFB2' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left bottom 2px / 100% 8px; }
@media (max-width: 720px) {
  .inst-features-grid { grid-template-columns: 1fr; gap: 32px; }
  .inst-features-list li { font-size: 27px; }
  .inst-features-photos img:last-child { margin-top: 24px; }
}
body.mobile-view .inst-features-grid { grid-template-columns: 1fr; gap: 32px; }
body.mobile-view .inst-features-list li { font-size: 27px; }
/* How it works: flat like the homepage, black text, step numbers in the hand font */
.inst-step { box-shadow: none; }
.inst-step p, .inst-step ul { color: var(--ink); }
.inst-step-num { width: auto; height: auto; border-radius: 0; background: none; justify-content: flex-start; font-family: var(--font-hand); font-weight: 700; font-size: 40px; line-height: 1; color: var(--secondary); margin-bottom: 10px; }
/* Institutions hero: one centred stack (critter, eyebrow, heading at section-heading size, button) */
.inst-hero--centred { text-align: center; padding-top: 40px; padding-bottom: 20px; }
.inst-hero--centred .inst-hero-critter { display: block; width: 150px; height: auto; margin: 0 auto 14px; position: static; transform: none; }
.inst-hero--centred h1 { font-size: clamp(26px, 2.6vw, 32px); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; max-width: 860px; margin: 2px auto 0; }
.inst-hero--centred .inst-hero-actions { justify-content: center; margin-top: 22px; }
/* features photos sit level */
.inst-features-photos img:last-child { margin-top: 0; }
/* Institutions: the features section is now the top of the page */
.inst-featlist--top { padding-top: 56px; }
.inst-featlist--top .section-head h1 { font-size: clamp(26px, 2.6vw, 32px); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.inst-features-cta { display: inline-block; margin-top: 34px; }
@media (max-width: 720px) { .inst-featlist--top { padding-top: 32px; } }
/* Institutions features, centred stack: heading → two photos → the four points with hand-drawn teal ticks → button */
.inst-featlist--top .inst-features-grid { grid-template-columns: 1fr; gap: 34px; max-width: 860px; justify-items: center; text-align: center; }
.inst-featlist--top .inst-features-photos { width: 100%; max-width: 720px; }
.inst-featlist--top .inst-features-photos img { aspect-ratio: 4/3; }
.inst-featlist--top .inst-features-copy { display: flex; flex-direction: column; align-items: center; }
.inst-featlist--top .inst-features-list { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px 34px; }
.inst-featlist--top .inst-features-list li { font-size: 28px; gap: 8px; align-items: center; }
.inst-featlist--top .inst-features-list li::before {
  content: ""; min-width: 0; flex: none; width: 26px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M3 12.5 C 6 14.5, 8 17, 9.5 19.5 C 13 12, 17.5 6.5, 23.5 2.5' fill='none' stroke='%2332BFB2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.inst-featlist--top .inst-features-cta { margin-top: 30px; }
@media (max-width: 720px) {
  .inst-featlist--top .inst-features-list { flex-direction: column; align-items: flex-start; gap: 14px; }
  .inst-featlist--top .inst-features-list li { font-size: 26px; }
}
body.mobile-view .inst-featlist--top .inst-features-list { flex-direction: column; align-items: flex-start; gap: 14px; }
.inst-featlist--top .inst-features-list { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 16px 48px; }
@media (max-width: 720px) { .inst-featlist--top .inst-features-list { grid-template-columns: 1fr; justify-content: start; } }
body.mobile-view .inst-featlist--top .inst-features-list { grid-template-columns: 1fr; justify-content: start; }
/* institutions: critter on top, the four ticks on one row, a bigger Request a trial, links in the steps */
.inst-top-critter { display: block; width: 150px; height: auto; margin: 0 auto 6px; }
.inst-featlist--top .inst-features-list { display: flex; flex-wrap: nowrap; grid-template-columns: none; justify-content: center; gap: 30px; }
.inst-featlist--top .inst-features-list li { font-size: 25px; white-space: nowrap; }
.inst-featlist--top .inst-features-grid { max-width: 1040px; }
.inst-featlist--top .inst-features-cta { padding: 18px 64px; font-size: 17px; min-width: 300px; text-align: center; }
.inst-step-link { display: inline-block; margin-top: 12px; font-size: 14.5px; font-weight: 700; color: var(--tertiary); text-decoration: none; }
.inst-step-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .inst-featlist--top .inst-features-list { flex-wrap: wrap; } }
@media (max-width: 720px) {
  .inst-featlist--top .inst-features-list { flex-direction: column; align-items: flex-start; gap: 14px; }
  .inst-featlist--top .inst-features-cta { min-width: 0; width: 100%; padding: 16px 24px; }
}
body.mobile-view .inst-featlist--top .inst-features-list { flex-direction: column; align-items: flex-start; gap: 14px; }

/* Institutions pricing: a single hand-drawn line with five stops (students above the ring, price below) */
.price-line { position: relative; max-width: 1040px; margin: 10px auto 0; }
.price-line-svg { position: absolute; left: 0; right: 0; top: 30px; width: 100%; height: 40px; overflow: visible; fill: none; stroke: var(--secondary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.price-line-svg path { vector-effect: non-scaling-stroke; }
.price-stops { list-style: none; margin: 0; padding: 0 20px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; position: relative; }
.price-stop { display: flex; flex-direction: column; align-items: center; text-align: center; }
.price-who { font-size: 15px; font-weight: 800; height: 26px; line-height: 26px; }
.price-who span { font-weight: 500; }
.price-dot { width: 24px; height: 24px; margin: 12px 0 14px; fill: #fff; stroke: var(--secondary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.price-amt { font-size: 34px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.price-stop small { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; max-width: 150px; }
.price-line-cta { text-align: center; margin-top: 40px; }
.price-line-cta .btn { padding: 18px 64px; font-size: 17px; }
/* phones: the line runs down the left, one stop per row */
@media (max-width: 720px) {
  .price-line-svg { display: none; }
  .price-stops { grid-template-columns: 1fr; gap: 0; padding: 0; border-left: 2.5px solid var(--secondary); margin-left: 12px; }
  .price-stop { flex-direction: row; align-items: center; gap: 12px; text-align: left; padding: 14px 0 14px 0; position: relative; flex-wrap: wrap; }
  .price-dot { position: absolute; left: -14px; margin: 0; background: #fff; }
  .price-who { order: 1; width: 120px; padding-left: 22px; }
  .price-amt { order: 2; font-size: 28px; }
  .price-stop small { order: 3; flex-basis: 100%; padding-left: 22px; max-width: none; margin-top: 2px; }
  .price-line-cta .btn { width: 100%; padding: 16px 24px; }
}
body.mobile-view .price-line-svg { display: none; }
body.mobile-view .price-stops { grid-template-columns: 1fr; gap: 0; padding: 0; border-left: 2.5px solid var(--secondary); margin-left: 12px; }
body.mobile-view .price-stop { flex-direction: row; align-items: center; gap: 12px; text-align: left; padding: 14px 0; position: relative; flex-wrap: wrap; }
body.mobile-view .price-dot { position: absolute; left: -14px; margin: 0; }
body.mobile-view .price-who { order: 1; width: 120px; padding-left: 22px; }
body.mobile-view .price-amt { order: 2; font-size: 28px; }
body.mobile-view .price-stop small { order: 3; flex-basis: 100%; padding-left: 22px; max-width: none; margin-top: 2px; }
@media (max-width: 720px) { .price-who { width: 150px; white-space: nowrap; } }
body.mobile-view .price-who { width: 150px; white-space: nowrap; }
.inst-featlist--top .inst-features-photos { max-width: 900px; }
.inst-featlist--top .inst-features-photos img { aspect-ratio: 16/9; object-position: center; }
/* the trial form runs as wide as the pricing timeline above it */
#trial-form { max-width: 1180px; }
#trial-form .inst-form { max-width: 1040px; }
/* only the submit row is centred; field labels in two-up rows stay left-aligned */
.inst-form .inst-field { text-align: left; }
.inst-form > .inst-field:last-child { text-align: center; }
.inst-form .inst-row .inst-field:last-child { text-align: left; }
.inst-featlist--top .section-head { max-width: 660px; }
.inst-featlist--top .section-head .section-sub { margin-top: 10px; }
/* pricing timeline: hovering a stop highlights its price (and ring) in purple */
.price-stop { cursor: default; }
.price-amt, .price-dot { transition: color .15s ease, stroke .15s ease; }
.price-stop:hover .price-amt { color: var(--tertiary); }
.price-stop:hover .price-dot { stroke: var(--tertiary); }
/* hover: the student range turns purple too, and the ring fills solid purple */
.price-who, .price-dot { transition: color .15s ease, stroke .15s ease, fill .15s ease; }
.price-stop:hover .price-who { color: var(--tertiary); }
.price-stop:hover .price-dot { stroke: var(--tertiary); fill: var(--tertiary); }
/* hover dot: solid teal (text stays purple) */
.price-stop:hover .price-dot { stroke: var(--secondary); fill: var(--secondary); }
/* language section: a real app recording in the practice-canvas box */
.lang-canvas { width: 200px; height: 200px; margin: 0 auto 16px; border-radius: 14px; overflow: hidden; background: #E9E9E9; }
.lang-canvas video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* pricing: "7 days" circled by hand, a line from the circle arcing over "free." to the sticky note */
.pricing-circled { position: relative; display: inline-block; }
.pricing-circle { position: absolute; left: -10px; top: -6px; width: calc(100% + 20px); height: calc(100% + 12px); overflow: visible; fill: none; stroke: #67FFEC; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.pricing-circle path { vector-effect: non-scaling-stroke; }
.pricing-circled .pricing-note-line { left: calc(100% + 4px); top: -38px; width: 170px; height: 60px; }
.pricing-note { text-align: center; }
/* the 7-days circle and its line read more clearly on the purple */
.pricing-circle { stroke-width: 3.5; }
.pricing-circled .pricing-note-line { stroke-width: 3; }
/* 7-days circle sits behind the words, half transparent */
.pricing-circled { isolation: isolate; }
.pricing-circle { z-index: -1; opacity: .5; }
/* final: circle behind the words at full colour; circle and line both fine strokes */
.pricing-circle { opacity: 1; stroke-width: 1.5; }
.pricing-circled .pricing-note-line { stroke-width: 1.5; }

/* Heading alignment: About, Decks and Institutions follow the homepage
   standard (42px Caveat eyebrow, 12px gap, 30px/900 heading, 12px gap, 16.5px sub, 38px below).
   Decks keeps its longer top line smaller on purpose. */
.about-page .section-head :is(h1, h2),
.about-page .team-head h2,
.about-page .who-tagline { font-size: 30px; line-height: 1.08; }
.about-page .section-head :is(h1, h2),
.about-page .team-head h2 { margin: 12px 0 0; }
.about-page .who-tagline { margin: 12px 0 16px; }
.about-page .team-head p { margin-top: 12px; }
.about-page .team-head,
.story-section .section-head { margin-bottom: 38px; }
.dk-head .section-head h1 { margin-top: 12px; }
.dk-showcase-h { font-size: 30px; line-height: 1.08; }
.dk-showcase-head .dk-showcase-h { margin: 0; }
.dk-showcase-head .section-sub { margin-top: 12px; }
.dk-showcase-head { margin-bottom: 38px; }
.inst-featlist--top .section-head h1 { font-size: 30px; line-height: 1.08; margin-top: 12px; }
.inst-featlist--top .section-head .section-sub { margin-top: 12px; }
.mission-plain .section-sub { margin-top: 12px; }
.about-page .who-tagline { margin-bottom: 12px; }

/* =========================================================
   Decks page, calmer top: one heading system (homepage standard),
   compact tabs with the count and label on one line, and a Courses tab
   ========================================================= */
.dk-head .section-head { max-width: 680px; }
.dk-head .section-head h1 { font-size: 30px; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; margin: 12px 0 0; }
.dk-head .section-head .section-sub { font-size: 16.5px; margin-top: 12px; }
.dk-tabs { gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.dk-tab {
  flex-direction: row; align-items: baseline; gap: 8px;
  min-width: 0; padding: 13px 24px; border-radius: 999px; border-width: 1.5px;
  box-shadow: none;
}
.dk-tab:hover { transform: none; border-color: #C9C2E8; }
.dk-tab-num, body.mobile-view .dk-tab-num { font-family: var(--font-ui); font-size: 20px; font-weight: 900; letter-spacing: -.01em; line-height: 1; }
.dk-tab-label { font-size: 15px; font-weight: 700; margin: 0; }
.dk-tab[aria-selected="true"] { box-shadow: none; }
.dk-tools { margin-top: 18px; }
.dk-tools[hidden], .dk-showcase[hidden], .dk-courses[hidden] { display: none; }
.dk-search, .dk-select select { box-shadow: none; }
.dk-showcase { padding-top: 40px; }
.dk-row-h { font-size: 20px; font-weight: 900; }
@media (max-width: 720px) {
  .dk-tabs { gap: 8px; }
  .dk-tab { flex: 1 1 auto; justify-content: center; padding: 11px 14px; }
  .dk-tab-num { font-size: 17px; }
  .dk-tab-label { font-size: 13.5px; }
}
body.mobile-view .dk-tabs { gap: 8px; }
body.mobile-view .dk-tab { flex: 1 1 auto; justify-content: center; padding: 11px 14px; }
body.mobile-view .dk-tab-num { font-size: 17px; }
body.mobile-view .dk-tab-label { font-size: 13.5px; }

/* Courses: two columns of cover + copy cards */
.dk-courses { padding-top: 40px; }
.dk-course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 1040px; margin: 0 auto; }
.dk-course {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 24px; background: #fff; border: 1.5px solid var(--line); border-radius: 20px;
  transition: border-color .2s, box-shadow .2s;
}
.dk-course--focus { border-color: var(--tertiary); box-shadow: 0 14px 34px rgba(100,54,255,.14); }
.dk-course-cover { flex: none; width: 128px; aspect-ratio: 351/512; object-fit: cover; border-radius: 10px; box-shadow: 0 10px 24px rgba(20,19,32,.16); }
.dk-course-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.dk-course-tag { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--grey, #6b6a75); }
.dk-course-tag--app { color: var(--secondary-dark); }
.dk-course h3 { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.2; letter-spacing: -.01em; }
.dk-course p { margin: 0; font-size: 15.5px; line-height: 1.5; }
.dk-course-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.dk-course-actions .btn { padding: 12px 20px; font-size: 15px; }
.dk-course-link { font-size: 14.5px; font-weight: 700; color: var(--tertiary); }
@media (max-width: 860px) { .dk-course-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .dk-course { gap: 16px; padding: 18px; } .dk-course-cover { width: 92px; } }
body.mobile-view .dk-course-grid { grid-template-columns: 1fr; }
body.mobile-view .dk-course { gap: 16px; padding: 18px; }
body.mobile-view .dk-course-cover { width: 92px; }
.dk-head .section-head { max-width: 940px; }
/* phones: three equal tabs, count above label */
@media (max-width: 720px) {
  .dk-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .dk-tab { flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 16px; }
  .dk-tab-label { font-size: 12.5px; }
}
body.mobile-view .dk-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
body.mobile-view .dk-tab { flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 16px; }
body.mobile-view .dk-tab-label { font-size: 12.5px; }
/* Courses, round 2: one full-width card per course, one pill style for every label */
.dk-course-grid, body.mobile-view .dk-course-grid { grid-template-columns: 1fr; gap: 20px; max-width: 920px; }
.dk-course { gap: 32px; padding: 28px 32px; align-items: center; }
.dk-course-cover { width: 140px; }
.dk-course-body { gap: 10px; }
.dk-course p { max-width: 620px; }
.dk-course-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-pill {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--secondary-tint); color: var(--secondary-dark);
  font-size: 12.5px; font-weight: 700; line-height: 1.4;
}
.dk-course h3 { font-size: 22px; }
.dk-course-actions .btn-ghost { background: #fff; color: var(--ink); }
@media (max-width: 600px) {
  .dk-course { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px; }
  .dk-course-cover { width: 120px; }
}
body.mobile-view .dk-course { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px; }
body.mobile-view .dk-course-cover { width: 120px; }

/* Idiom video courses: shared intro, three app screens, four covers */
.idm { margin: 96px auto 0; max-width: 1040px; }
.idm-screens { display: flex; justify-content: center; align-items: flex-start; gap: 36px; margin: 0 auto; }
.idm-shot { margin: 0; width: 230px; text-align: center; }
.idm-shot:nth-child(2) { margin-top: 36px; }
.idm-shot img {
  display: block; width: 100%; aspect-ratio: 920/1430; object-fit: cover; object-position: top;
  border-radius: 26px; border: 6px solid #fff; box-shadow: 0 0 0 1.5px var(--line), 0 18px 40px rgba(20,19,32,.12);
}
.idm-shot figcaption { margin-top: 14px; font-family: var(--font-hand); font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--secondary); }
.idm-courses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; max-width: 820px; margin: 64px auto 0; }
.idm-course { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.idm-course img { width: 100%; aspect-ratio: 351/512; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 24px rgba(20,19,32,.16); margin-bottom: 8px; transition: transform .2s ease; }
.idm-course:hover img { transform: translateY(-4px); }
.idm-course-t { font-size: 16px; font-weight: 800; }
.idm-course-go { font-size: 14px; font-weight: 700; color: var(--tertiary); }
@media (max-width: 720px) {
  .idm { margin-top: 72px; }
  .idm-screens { gap: 12px; }
  .idm-shot { width: 33%; }
  .idm-shot img { border-radius: 16px; border-width: 4px; }
  .idm-shot:nth-child(2) { margin-top: 20px; }
  .idm-shot figcaption { font-size: 18px; }
  .idm-courses { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; margin-top: 44px; }
}
body.mobile-view .idm-screens { gap: 12px; }
body.mobile-view .idm-shot { width: 33%; }
body.mobile-view .idm-shot img { border-radius: 16px; border-width: 4px; }
body.mobile-view .idm-shot figcaption { font-size: 18px; }
body.mobile-view .idm-courses { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; margin-top: 44px; }
.idm .section-head { max-width: 860px; margin-bottom: 44px; }
/* phones: the app screens scroll sideways at a readable size */
@media (max-width: 720px) {
  .idm-screens { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
  .idm-shot { flex: none; width: 210px; scroll-snap-align: center; }
  .idm-shot figcaption { font-size: 22px; }
}
body.mobile-view .idm-screens { justify-content: flex-start; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; }
body.mobile-view .idm-shot { flex: none; width: 210px; }
.dk-course-facts { font-size: 14px !important; font-weight: 600; color: var(--secondary-dark); }
.idm-pills { justify-content: center; margin-top: 16px; }
.idm-cover { position: relative; display: block; }
.idm-count {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 12px; font-weight: 800; box-shadow: 0 4px 10px rgba(20,19,32,.18);
}
.idm-course:hover img { transform: none; }
.idm-course:hover .idm-cover { transform: translateY(-4px); transition: transform .2s ease; }
.idm-shot figcaption a { color: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.idm-shot figcaption a:hover { color: var(--tertiary); }
.idm-count { top: auto; left: auto; right: 8px; bottom: calc(24% + 6px); }
@media (min-width: 721px) { .idm-shot { width: 250px; } .idm-shot figcaption { font-size: 24px; } }
/* idiom art: three prints, slightly fanned */
.idm-art { display: flex; justify-content: center; margin: 72px auto 0; }
.idm-art img {
  width: 250px; aspect-ratio: 1; object-fit: cover; border-radius: 14px;
  border: 6px solid #fff; box-shadow: 0 18px 40px rgba(20,19,32,.16);
  transition: transform .25s ease;
}
.idm-art img:nth-child(1) { transform: rotate(-5deg) translateY(10px); margin-right: -18px; }
.idm-art img:nth-child(2) { transform: rotate(1.5deg); position: relative; z-index: 1; }
.idm-art img:nth-child(3) { transform: rotate(5deg) translateY(10px); margin-left: -18px; }
.idm-art img:hover { transform: rotate(0) scale(1.04); position: relative; z-index: 2; }
@media (max-width: 720px) {
  .idm-art { margin-top: 48px; }
  .idm-art img { width: 38%; border-width: 4px; border-radius: 10px; }
}
body.mobile-view .idm-art img { width: 38%; border-width: 4px; border-radius: 10px; }
/* idiom art, round 2: small prints tucked behind the app screens */
.idm-stage { position: relative; max-width: 1000px; margin: 0 auto; }
.idm-screens { position: relative; z-index: 1; }
.idm-art { position: absolute; inset: 0; margin: 0; display: block; pointer-events: none; }
.idm-art img, .idm-art img:hover { position: absolute; width: 150px; border-width: 5px; border-radius: 12px; box-shadow: 0 12px 28px rgba(20,19,32,.14); margin: 0; z-index: 0; }
.idm-art img:nth-child(1) { left: 0; top: 24px; transform: rotate(-8deg); }
.idm-art img:nth-child(2) { right: 0; top: 150px; transform: rotate(7deg); }
.idm-art img:nth-child(3) { left: 30px; top: 250px; transform: rotate(4deg); }
@media (max-width: 900px) { .idm-art { display: none; } }
body.mobile-view .idm-art { display: none; }
.idm-courses { margin-top: 72px; }
.idm-stage { max-width: 1060px; }
.idm-art img, .idm-art img:hover { width: 160px; }
.idm-art img:nth-child(1) { left: 0; top: 40px; transform: rotate(-8deg); }
.idm-art img:nth-child(2) { left: auto; right: 0; top: 0; transform: rotate(7deg); }
.idm-art img:nth-child(3) { left: auto; right: 24px; top: 230px; transform: rotate(-4deg); }
.idm-stage .idm-art img { position: absolute; z-index: 0; margin: 0; }
/* idiom art, round 3: four faded prints behind the screens (one each side, two in the gaps);
   hovering a print brings it forward in full colour */
.idm-stage { max-width: 1060px; padding-top: 44px; }
.idm-stage .idm-art img {
  width: 150px; opacity: .45; pointer-events: auto; cursor: zoom-in;
  transition: opacity .25s ease, transform .25s ease;
}
.idm-stage .idm-art .idm-art--l  { left: 30px;  right: auto; top: 110px; transform: rotate(-8deg); }
.idm-stage .idm-art .idm-art--g1 { left: calc(50% - 218px); right: auto; top: 0; transform: rotate(-4deg); }
.idm-stage .idm-art .idm-art--g2 { left: calc(50% + 68px);  right: auto; top: 6px; transform: rotate(5deg); }
.idm-stage .idm-art .idm-art--r  { left: auto; right: 30px; top: 170px; transform: rotate(7deg); }
.idm-stage .idm-art img:hover { opacity: 1; z-index: 2; transform: rotate(0) scale(1.35); }
.idm-stage .idm-screens { pointer-events: none; } .idm-stage .idm-shot { pointer-events: auto; }
/* a count badge on a course cover, like the idiom covers' "25 idioms" */
.dk-course-cover-wrap { position: relative; flex: none; display: block; }
.dk-course-cover-wrap .dk-course-cover { display: block; }
.dk-cover-badge {
  position: absolute; right: 8px; bottom: calc(14% + 6px);
  padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 12px; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 10px rgba(20,19,32,.18);
}
/* course facts in Caveat, ink: fewer colours on the cards */
.dk-course .dk-course-facts { font-family: var(--font-hand); font-size: 22px !important; font-weight: 700; line-height: 1.2; color: var(--ink); }

/* Course cards, round 3: cover | title + copy | actions. Pills become one quiet note under the buttons */
.dk-course { display: grid; grid-template-columns: 120px 1fr 200px; gap: 32px; align-items: center; padding: 28px 32px; }
.dk-course-cover { width: 120px; }
.dk-course-body { gap: 8px; }
.dk-course p { max-width: none; }
.dk-course .dk-course-facts { font-size: 21px !important; margin-top: 2px; }
.dk-course-side { display: flex; flex-direction: column; gap: 8px; }
.dk-course-side .btn { display: block; width: 100%; text-align: center; padding: 12px 16px; font-size: 15px; }
.dk-course-side .btn-ghost { background: #fff; color: var(--ink); }
.dk-course-note { margin: 4px 0 0; font-size: 13px !important; line-height: 1.4; color: var(--grey, #6b6a75); text-align: center; }
@media (max-width: 860px) {
  .dk-course { grid-template-columns: 96px 1fr; gap: 18px 22px; align-items: start; }
  .dk-course-cover { width: 96px; }
  .dk-course-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .dk-course-side .btn { width: auto; flex: 1 1 160px; }
  .dk-course-note { flex-basis: 100%; }
}
body.mobile-view .dk-course { grid-template-columns: 96px 1fr; gap: 18px 22px; align-items: start; padding: 22px; }
body.mobile-view .dk-course-cover { width: 96px; }
body.mobile-view .dk-course-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
body.mobile-view .dk-course-side .btn { width: auto; flex: 1 1 140px; }
body.mobile-view .dk-course-note { flex-basis: 100%; }
@media (max-width: 600px) { .dk-course { flex-direction: unset; padding: 22px; } }
.dk-course-grid, body.mobile-view .dk-course-grid { max-width: 1000px; }
/* phones: small cover beside the title; copy and buttons run full width below */
@media (max-width: 600px) {
  .dk-course { grid-template-columns: 72px 1fr; gap: 12px 16px; align-items: center; }
  .dk-course-cover { width: 72px; border-radius: 8px; }
  .dk-course-body { display: contents; }
  .dk-course h3 { font-size: 19px; }
  .dk-course-body p { grid-column: 1 / -1; }
  .dk-course .dk-course-facts { font-size: 19px !important; }
  .dk-course-side { margin-top: 4px; }
}
.dk-course .dk-course-facts { font-size: 19px !important; }
/* the side column fits "Sign up for a complimentary copy" on one line */
.dk-course { grid-template-columns: 120px 1fr 240px; }
.dk-course-side .btn { white-space: nowrap; font-size: 14.5px; padding: 12px 14px; }
@media (max-width: 600px) { .dk-course .dk-course-facts { font-size: 18px !important; } .dk-course-side .btn { white-space: normal; } }
/* the note now sits above the buttons */
.dk-course-note { margin: 0 0 2px; }
.dk-course-note { white-space: nowrap; } #idiom-courses { scroll-margin-top: 90px; }

/* Resources menu, balanced: Decks | Courses and eBooks (two columns, incl. the Guide) | Socials.
   Skritter Official gets a cover like the courses; the exam lists sit under it, smaller */
.mega-inner { grid-template-columns: 1fr; }
.mega-cols { grid-template-columns: 1fr 2fr 1fr; gap: 40px; }
.mega-course-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.mega-col a.mega-exam--sub { margin-left: 12px; padding: 5px 8px; font-size: 13.5px; }
.mega-cover-wrap { position: relative; flex: none; display: block; }
.mega-cover-wrap .mega-new {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  margin: 0; padding: 2px 7px; font-size: 9.5px; box-shadow: 0 3px 8px rgba(100,54,255,.3);
}
.mega-course-sub { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--tertiary); }
.menu-acc-panel .mega-course-grid { display: block; }
.mega-col a .mega-new { display: block; width: fit-content; margin: 0 0 5px; }
/* menu callouts, calmer: a small teal-tint tag before the title (no purple) */
.mega-col a .mega-new {
  padding: 2px 8px; border-radius: 999px; background: var(--secondary-tint); color: var(--secondary-dark);
  font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; box-shadow: none; margin: 0 0 4px;
}
.mega-col a:hover .mega-new { background: var(--tertiary-tint); color: var(--tertiary); }
/* Decks column: exam lists left-aligned, spread so the last one lines up with the bottom of the courses */
.mega-cols > .mega-col:first-child { display: flex; flex-direction: column; }
.mega-exams { flex: 1; display: flex; flex-direction: column; justify-content: space-between; margin-top: 8px; }
.mega-col a.mega-exam--sub { margin-left: -8px; font-size: 14.5px; padding: 7px 8px; }
.mega-col a.mega-exam--sub .mega-mini { width: 24px; }
.menu-acc-panel .mega-exams { display: block; margin: 0; }
/* menu tags as plain green text, so they line up with the title's first letter */
.mega-col a .mega-new, .mega-col a:hover .mega-new { padding: 0; background: none; border-radius: 0; color: var(--secondary-dark); font-size: 12px; margin: 0 0 2px; }
/* Decks showcase, minimal: four decks per row on a narrower measure, one line promising the rest */
#dk-showcase { max-width: 900px; margin: 0 auto; }
@media (min-width: 721px) {
  body:not(.mobile-view) .dk-track { grid-template-columns: repeat(4, 1fr); gap: 40px; }
  body:not(.mobile-view) .dk-cover { max-width: 180px; }
}
.dk-row { margin-bottom: 44px; }
.dk-more { text-align: center; font-size: 16.5px; margin: 8px 0 0; }
.dk-more a { font-weight: 700; color: var(--tertiary); white-space: nowrap; }
/* bottom CTA: room between the line and the button now the subline is gone */
.cta-copy h2 + .btn { display: inline-block; margin-top: 22px; }
/* end of the deck preview: one button into the full library */
.dk-library-cta { text-align: center; margin-top: 8px; }

/* floating help button (opens the Help Scout Beacon); slides in after the first screen */
.help-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px 12px 14px; border: 0; border-radius: 999px;
  background: var(--tertiary); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 26px rgba(100,54,255,.35);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s;
}
.help-fab--on { opacity: 1; transform: none; pointer-events: auto; }
.help-fab:hover { background: var(--tertiary-dark, #4F25E0); }
.help-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 720px) { .help-fab { right: 14px; bottom: 14px; padding: 13px; } .help-fab span { display: none; } }

/* About: mission and who-for side by side, critter on top of each */
@media (min-width: 900px) {
  body:not(.mobile-view) .about-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; max-width: 1120px; margin: 0 auto; padding: 64px 24px 40px; align-items: start; }
  body:not(.mobile-view) .about-intro > section { padding: 0; margin: 0; max-width: none; }
  body:not(.mobile-view) .about-intro .section-head,
  body:not(.mobile-view) .who-section > div { display: flex; flex-direction: column; align-items: center; max-width: none; margin: 0; text-align: center; }
  body:not(.mobile-view) .about-intro .about-critter { order: -1; width: 170px; max-width: none; margin: 0 0 8px; }
  body:not(.mobile-view) .about-intro .section-head :is(h1, h2),
  body:not(.mobile-view) .about-intro .who-tagline { min-height: 2.16em; display: flex; align-items: center; justify-content: center; }
  body:not(.mobile-view) .about-intro .section-sub,
  body:not(.mobile-view) .who-section p { max-width: none; margin: 12px 0 0; text-align: left; font-size: 16.5px; line-height: 1.65; }
  body:not(.mobile-view) .who-section p + p { margin-top: 16px; }
}
@media (min-width: 900px) {
  body:not(.mobile-view) .about-intro .about-critter,
  body:not(.mobile-view) .who-section .about-critter { width: 170px; height: 130px; object-fit: contain; margin: 0 0 10px; }
  body:not(.mobile-view) .about-intro .section-head :is(h1, h2),
  body:not(.mobile-view) .about-intro .who-tagline { margin: 12px 0 0; }
  body:not(.mobile-view) .about-intro .eyebrow { line-height: 1.1; }
}
.team-entry, #team { scroll-margin-top: 90px; }
/* About intro, round 3: more air under the headings */
@media (min-width: 900px) {
  body:not(.mobile-view) .about-intro { align-items: stretch; }
  body:not(.mobile-view) .about-intro .section-head,
  body:not(.mobile-view) .who-section > div { height: 100%; }
  body:not(.mobile-view) .about-intro .section-sub,
  body:not(.mobile-view) .who-section p { margin-top: 22px; }
}
/* About intro, round 4: one shared grid (subgrid) so critter, label, heading and copy rows line up across both columns */
@media (min-width: 900px) {
  body:not(.mobile-view) .about-intro { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); column-gap: 72px; row-gap: 0; align-items: start; }
  body:not(.mobile-view) .about-intro > section { display: contents; }
  body:not(.mobile-view) .about-intro .section-head,
  body:not(.mobile-view) .who-section > div { display: grid; grid-row: 1 / span 4; grid-template-rows: subgrid; row-gap: 0; justify-items: center; height: auto; }
  body:not(.mobile-view) .about-intro .section-head :is(h1, h2),
  body:not(.mobile-view) .about-intro .who-tagline { min-height: 0; align-self: center; }
  body:not(.mobile-view) .about-intro .section-sub,
  body:not(.mobile-view) .who-section p { justify-self: stretch; align-self: start; }
}
/* real phones (not just the preview toggle): languages stack */
@media (max-width: 720px) {
  .lang-split { grid-template-columns: 1fr; }
  .lang-col--divided { border-left: none; border-top: 1px solid var(--line); }
  .lang-col { padding: 24px 16px; }
}
/* course cards on phones: let the note and buttons wrap inside the card */
@media (max-width: 860px) {
  .dk-course { grid-template-columns: minmax(0, 96px) minmax(0, 1fr); }
  .dk-course-note { white-space: normal; }
  .dk-course-side .btn { white-space: normal; }
}
@media (max-width: 600px) { .dk-course { grid-template-columns: 72px minmax(0, 1fr); } }
/* Why Skritter: a small critter above each tagline */
.why-critter { display: block; width: 88px; height: 72px; object-fit: contain; margin: 22px auto -6px; }
@media (max-width: 720px) { .why-critter { width: 76px; height: 62px; } }
/* Why critters, round 2: smaller, tucked at the top left of each tagline */
.why-col h3 { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.why-critter, body.mobile-view .why-critter { display: block; flex: none; width: 46px; height: 40px; object-fit: contain; margin: 0 0 14px; }
@media (max-width: 720px) { .why-critter { width: 40px; height: 34px; } }
/* critter sits just outside the title's top-left, so titles keep their width */
.why-col h3 { display: block; }
.why-title { position: relative; }
.why-critter, body.mobile-view .why-critter { position: absolute; right: 100%; top: -18px; margin: 0 2px 0 0; }
/* Why critters, round 3: peeking out from behind each phone */
.why-title .why-critter { display: none; }
.why-phone .why-critter, body.mobile-view .why-phone .why-critter {
  position: absolute; z-index: -1; width: 96px; height: 96px; object-fit: contain; margin: 0; top: auto; right: auto;
}
.why-critter--tl { left: -62px; top: 18px !important; transform: rotate(-10deg); }
.why-critter--br { right: -64px !important; bottom: 40px; transform: rotate(8deg); }
.why-critter--tr { right: -62px !important; top: 26px !important; transform: rotate(8deg); }
@media (max-width: 720px) {
  .why-phone .why-critter { width: 72px; height: 72px; }
  .why-critter--tl { left: -44px; }
  .why-critter--br, .why-critter--tr { right: -44px !important; }
}
/* Key numbers, at a glance: big number, a bold one-line label, one quiet line */
.stat-num { margin-bottom: 6px; }
.stat-label { margin: 0 0 6px; font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.stat-body { font-size: 14px; line-height: 1.5; color: var(--grey, #6b6a75); max-width: 26ch; }
.stats > .stat-note { margin-top: 18px; text-align: right; }
.why-link { display: inline-block; margin-top: 10px; font-size: 14.5px; font-weight: 700; color: var(--tertiary); }
.why-link:hover { text-decoration: underline; text-underline-offset: 3px; }
/* subtler: ink text with a soft teal underline */
.why-link { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--secondary); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.why-link:hover { color: var(--secondary-dark); text-decoration-color: currentColor; }
/* plain grey link, no underline (underline only on hover) */
.why-link { font-weight: 600; color: var(--grey, #6b6a75); text-decoration: none; }
.why-link:hover { color: var(--ink); text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* Why copy matches the key-stats lines: same size and measure */
.why-col p { font-size: 14px; line-height: 1.5; max-width: 26ch; }
.why-link { font-size: 14px; margin-top: 8px; }
.why-link { font-weight: 400; }
/* "700+ decks" is the way into the library: reads as text, turns purple on hover */
.why-inline { color: inherit; text-decoration: underline; text-decoration-color: rgba(21,20,27,.25); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
.why-inline:hover { color: var(--tertiary); text-decoration-color: currentColor; }
.why-col p { max-width: 31ch; }
/* Resources, split (OPS-76): integrations first, then partners & resources */
.res-logo--text { display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 22px; color: var(--secondary-dark); background: var(--secondary-tint); }
.res-other .res-feature { margin-bottom: 18px; }
.res-grid--partners { margin-bottom: 28px; }
#integrations, #partners { scroll-margin-top: 90px; }
@media (max-width: 720px) { .res-grid { grid-template-columns: 1fr; } .res-tiles { grid-template-columns: 1fr 1fr; } }
.res-card kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; font: 700 12.5px/1.5 var(--font-ui); background: #fff; }
/* Classroom hero: two primary buttons, each pre-selects the form's first question */
.inst-hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.inst-featlist--top .inst-hero-ctas .inst-features-cta { margin-top: 0; min-width: 250px; padding: 18px 40px; }
@media (max-width: 720px) { .inst-hero-ctas { flex-direction: column; width: 100%; } .inst-featlist--top .inst-hero-ctas .inst-features-cta { width: 100%; min-width: 0; } }
/* icons inside the Classroom hero buttons */
.btn .btn-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inst-hero-ctas .inst-features-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.inst-submit, .price-line-cta .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
/* How it works: links sit on one line at the bottom of every step card */
.inst-steps { align-items: stretch; }
.inst-step { display: flex; flex-direction: column; }
.inst-step .inst-step-link { margin-top: auto; padding-top: 14px; }
/* Classroom hero: three reasons teachers love Skritter (Caveat titles with the teal underline, one short line each) */
.inst-benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; width: 100%; max-width: 980px; text-align: center; }
.inst-benefits li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.inst-benefit-t {
  display: inline-block; padding: 0 2px 10px; font-family: var(--font-hand); font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--ink);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2 C 30 3.6, 62 6.2, 90 4.4 S 112 3.8, 118 4.6' fill='none' stroke='%2332BFB2' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left bottom 2px / 100% 8px;
}
.inst-benefits li > span:last-child { font-size: 14px; line-height: 1.5; max-width: 28ch; }
@media (max-width: 720px) { .inst-benefits { grid-template-columns: 1fr; gap: 22px; } }
body.mobile-view .inst-benefits { grid-template-columns: 1fr; gap: 22px; }
.inst-featlist--top .section-head { max-width: 760px; }
/* Classroom: Why teachers love Skritter (mirrors the homepage Why Skritter columns) */
.inst-why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1040px; margin: 0 auto; }
.inst-why-col { text-align: center; }
.inst-why-critter { display: block; width: 150px; height: 130px; object-fit: contain; margin: 0 auto; }
.inst-why-col h3 { margin: 18px 0 8px; }
.inst-why-col p { font-size: 14px; line-height: 1.5; max-width: 31ch; margin: 0 auto; }
@media (max-width: 720px) { .inst-why-grid { grid-template-columns: 1fr; gap: 36px; } .inst-why-critter { width: 120px; height: 104px; } .inst-why-col .why-title { font-size: 26px; } }
body.mobile-view .inst-why-grid { grid-template-columns: 1fr; gap: 36px; }
/* Classroom top, merged: reasons, then one screenshot with ticks + buttons beside it */
.inst-why-grid--top { margin-top: 8px; }
.inst-split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; max-width: 1000px; margin: 64px auto 0; }
.inst-split-shot { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 18px; box-shadow: 0 18px 40px rgba(20,19,32,.12); }
.inst-split-copy { display: flex; flex-direction: column; align-items: flex-start; }
.inst-featlist--top .inst-split .inst-features-list { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 14px; }
.inst-featlist--top .inst-split .inst-features-list li { font-size: 26px; }
.inst-split .inst-hero-ctas { flex-direction: column; align-items: stretch; justify-content: flex-start; margin-top: 30px; width: 100%; max-width: 300px; }
.inst-featlist--top .inst-split .inst-hero-ctas .inst-features-cta { min-width: 0; width: 100%; padding: 16px 24px; }
@media (max-width: 860px) {
  .inst-split { grid-template-columns: 1fr; gap: 28px; margin-top: 44px; }
  .inst-split-copy { align-items: center; }
  .inst-split .inst-hero-ctas { max-width: none; }
}
body.mobile-view .inst-split { grid-template-columns: 1fr; gap: 28px; }
/* two screenshots open the page; ticks and buttons sit centered under the reasons */
.inst-top-photos { max-width: 1000px; margin: 0 auto 44px; }
.inst-split--centered { display: flex; flex-direction: column; align-items: center; margin-top: 52px; }
.inst-split--centered .inst-split-copy { align-items: center; }
.inst-featlist--top .inst-split--centered .inst-features-list { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px 32px; }
.inst-split--centered .inst-hero-ctas { flex-direction: row; justify-content: center; max-width: none; width: auto; }
.inst-featlist--top .inst-split--centered .inst-hero-ctas .inst-features-cta { width: auto; min-width: 250px; padding: 18px 40px; }
@media (max-width: 720px) {
  .inst-featlist--top .inst-split--centered .inst-features-list { flex-direction: column; align-items: flex-start; }
  .inst-split--centered .inst-hero-ctas { flex-direction: column; width: 100%; }
  .inst-featlist--top .inst-split--centered .inst-hero-ctas .inst-features-cta { width: 100%; min-width: 0; }
}
.inst-why-col p { max-width: 34ch; }
.inst-top-photos { margin: 56px auto 0; }
.inst-top-photos + .inst-split--centered { margin-top: 36px; }
/* ticks now sit under the How it works cards */
.inst-featlist--top.inst-ticks-under { padding-top: 0; margin-top: 40px; }
.inst-top-photos + .inst-split--centered { margin-top: 40px; }
.inst-ticks-under .inst-features-list li span { background: none; padding-bottom: 0; }
.inst-featlist--top.inst-ticks-under { margin: 0 0 32px; }
a.auth-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
/* Get started pop-up: the four app links, then Sign up on web */
.auth-apps { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.auth-app-row { display: grid; grid-template-columns: 72px 1fr 1fr; gap: 8px; align-items: center; }
.auth-app-lang { font-size: 14px; font-weight: 800; text-align: left; }
.auth-app { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 700; text-decoration: none; transition: filter .15s; }
.auth-app:hover { filter: brightness(1.25); color: #fff; }
.auth-app .auth-ic { width: 17px; height: 17px; }
.auth-note { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; color: var(--grey, #6b6a75); }
a.auth-link { color: var(--app-teal); font-weight: 700; }
/* Get started pop-up, cleanup: two clear sections, one accent colour (teal), ink text, outline pills */
.auth-section { width: 100%; margin-top: 18px; }
.auth-section--web { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-section-label { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); text-align: center; }
.auth-app { height: 40px; border-radius: 999px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 700; }
.auth-app:hover { filter: none; border-color: var(--app-teal); color: var(--app-teal); }
.auth-app-lang { color: var(--ink); }
.auth-section--web .auth-note { margin: 10px 0 0; color: var(--ink); font-size: 13px; text-align: center; }
.auth-foot { margin-top: 18px; color: var(--ink); }
/* Get started pop-up, round 3: four app pills in a 2x2 grid, purple accents */
.auth-app-row { grid-template-columns: 1fr 1fr; }
.auth-btn--purple { background: var(--tertiary); border-color: var(--tertiary); color: #fff; }
.auth-btn--purple:hover { filter: none; background: var(--tertiary-dark, #4F25E0); border-color: var(--tertiary-dark, #4F25E0); }
a.auth-link--purple { color: var(--tertiary); }
.auth-app:hover { border-color: var(--tertiary); color: var(--tertiary); }
.login-view[data-view="signup"] .auth-critter + .auth-section { margin-top: 6px; }
/* Get started pop-up, round 4: Caveat section headers, purple-outline app pills with aligned logos */
.auth-section-label { margin: 0 0 16px; font-family: var(--font-hand); font-size: 28px; font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1.1; color: var(--ink); }
.auth-section { margin-top: 10px; }
.auth-section--web { margin-top: 26px; padding-top: 22px; }
.auth-app { justify-content: flex-start; gap: 9px; padding: 0 16px; height: 44px; border: 1.5px solid var(--tertiary); color: var(--tertiary); font-size: 13.5px; white-space: nowrap; }
.auth-app .auth-ic { width: 18px; height: 18px; }
.auth-app:hover { background: var(--tertiary-tint); color: var(--tertiary); border-color: var(--tertiary); }
.auth-section--web .auth-note { margin: 0 0 12px; font-size: 15px; color: var(--ink); }
/* room for the full app names: wider pop-up, equal columns, logos aligned on the left */
.auth-modal { max-width: 500px; padding-left: 32px; padding-right: 32px; }
.auth-app-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.auth-apps { gap: 10px; }
.auth-app { font-size: 13px; padding: 0 14px; }
@media (max-width: 520px) {
  .auth-app-row { grid-template-columns: 1fr; gap: 8px; }
  .auth-apps { gap: 8px; }
}
/* app links split by platform, with a divider between Apple and Android */
.auth-apps--split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0; }
.auth-store { display: flex; flex-direction: column; gap: 10px; padding: 0 14px; }
.auth-store:first-child { padding-left: 0; }
.auth-store + .auth-store { border-left: 1px solid var(--line); padding-right: 0; }
.auth-store-label { margin: 0 0 2px; font-size: 13px; font-weight: 800; color: var(--ink); text-align: center; }
@media (max-width: 520px) {
  .auth-apps--split { grid-template-columns: 1fr; gap: 18px; }
  .auth-store, .auth-store + .auth-store { padding: 0; border-left: 0; }
  .auth-store + .auth-store { padding-top: 16px; border-top: 1px solid var(--line); }
}
/* store logo + store name as each column's header; pills hold just the app name (app icons to come) */
.auth-store-label { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 14px; }
.auth-store-label .auth-ic { width: 18px; height: 18px; color: var(--ink); }
.auth-app { justify-content: center; }
/* app icon, round, to the right of each app name */
.auth-app { justify-content: space-between; padding: 0 5px 0 16px; height: 44px; }
.auth-app-icon { width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(20,19,32,.08); }
/* icon on the left of the name */
.auth-app { justify-content: flex-start; gap: 10px; padding: 0 16px 0 5px; }
/* app names in black for legibility; purple stays on the outline */
.auth-app, .auth-app:hover { color: var(--ink); }
/* app buttons: light grey outline, darkening on hover */
.auth-app { border-color: #D9D7E0; }
.auth-app:hover { background: #F6F5F9; border-color: var(--ink); }
/* Sign up on web: hover lifts with a shadow, stays purple with white text */
.auth-btn--purple { transition: transform .18s ease, box-shadow .18s ease; }
.auth-btn--purple:hover { background: var(--tertiary); border-color: var(--tertiary); color: #fff; filter: none; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(100,54,255,.32); }
/* a little more room under the two section headers */
.auth-section-label { margin-bottom: 22px; }
a.plan-btn { display: block; text-align: center; text-decoration: none; box-sizing: border-box; }
/* badge: "save $80" matches "44% OFF" */
.plan-flag small { font-size: inherit; font-weight: inherit; text-transform: none; }
.plan-flag { gap: 8px; }
.plan-unit { margin-left: 4px; }
/* the global a:hover (purple text) must never apply to filled buttons that are links:
   keep their own text colour on hover so the label never disappears */
a.btn-primary:hover, a.btn-primary:focus-visible,
a.auth-btn--purple:hover,
.plan-card.popular a.plan-btn:hover { color: #fff; }
a.btn-white:hover { color: var(--tertiary); }
a.auth-btn:not(.auth-btn--outline):not(.auth-btn--purple):hover { color: #fff; }
/* key stats (Jake's copy): a worded "stat" sits on the same baseline as the numbers */
.stat-num--words { font-size: 34px; line-height: 1.05; min-height: 62px; display: flex; align-items: flex-end; }
.stat-num--words { display: block; font-size: 29px; line-height: 1.05; min-height: 0; }
.stats-grid .stat-num { height: 62px; display: flex; align-items: flex-end; }
.stats-grid .stat-num--words { display: block; height: 62px; padding-top: 1px; }
.stats-grid { grid-template-columns: repeat(3, 1fr); }
/* Key stats, three centred: number and small word share one baseline, equal gaps either side of each rule */
.stats { text-align: center; }
.stats-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 64px; max-width: 980px; margin: 0 auto; }
.stat { align-items: center; }
.stat + .stat::before { left: -32px; }
.stats-grid .stat-num { display: block; height: auto; white-space: nowrap; margin-bottom: 12px; }
.stats-grid .stat-num small { display: inline; font-size: 30px; margin-left: 6px; vertical-align: baseline; }
.stat-label, .stat-body { text-align: center; }
.stat-body { max-width: 30ch; }
/* phones: the three stats stack, a short teal rule between them */
@media (max-width: 720px) {
  .stats-grid { display: flex; flex-direction: column; align-items: center; gap: 44px; margin: 0; padding: 0; overflow: visible; }
  .stat { flex: none; }
  .stat + .stat::before { left: 50%; top: -24px; bottom: auto; width: 64px; height: 6px; translate: -50% 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3 C 40 2.2, 82 3.8, 120 3 S 172 2.3, 198 3.2' fill='none' stroke='%2332BFB2' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
}
body.mobile-view .stats-grid { display: flex; flex-direction: column; align-items: center; gap: 44px; margin: 0; padding: 0; overflow: visible; }
/* Decks showcase, curated: four areas in two columns, smaller covers, one closing line + button */
@media (min-width: 721px) {
  body:not(.mobile-view) #dk-showcase { max-width: 1080px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 56px; }
  body:not(.mobile-view) #dk-showcase .dk-row--library, body:not(.mobile-view) #dk-showcase .dk-library-cta { grid-column: 1 / -1; }
  body:not(.mobile-view) .dk-track { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  body:not(.mobile-view) .dk-cover { max-width: 112px; }
  body:not(.mobile-view) .dk-title { font-size: 12.5px; }
}
.dk-row-h { font-size: 18px; }
.dk-library-cta .dk-more { margin: 4px 0 16px; font-size: 16px; color: var(--ink); }
.dk-showcase { padding-top: 32px; }
/* bottom banner: "Write" in white on every page */
.cta-banner .hl, .about-page .cta-banner .hl { color: #fff; }
/* room between the 'just a taste' line and the library button */
.dk-library-cta .dk-more { margin: 8px 0 0; }
.dk-library-cta .btn { display: inline-flex; margin-top: 24px; }
.dk-library-cta .btn { margin-top: 16px; }
/* store buttons: our app icon up front, the store logo small beside the store name */
/* Get started pop-up: one style for all supporting text (14px, regular, grey), equal gaps around Sign up on web */
.auth-store-label, .auth-section--web .auth-note, .login-view[data-view="signup"] .auth-foot { font-size: 14px; font-weight: 400; color: var(--grey, #6b6a75); }
.auth-store-label .auth-ic { color: var(--grey, #6b6a75); width: 16px; height: 16px; }
.auth-section--web .auth-note { margin: 0 0 14px; }
.login-view[data-view="signup"] .auth-foot { margin-top: 14px; }
.login-view[data-view="signup"] .auth-foot a { font-weight: 600; }
/* app buttons: purple outline + pale purple fill on hover/focus; text stays black */
.auth-app:hover, .auth-app:focus-visible { border-color: var(--tertiary); background: var(--tertiary-tint); color: var(--ink); }
/* announcement bar: "Explore →" never wraps and keeps clear of the close button */
.announce-link { white-space: nowrap; flex: none; }
@media (max-width: 720px) {
  .announce { gap: 10px; padding-right: 54px; text-align: left; justify-content: flex-start; }
  .announce-spark { display: none; }
}
body.mobile-view .announce { padding-right: 54px; }
/* phones: full-width app buttons, icon + name centred */
@media (max-width: 520px) { .auth-app { justify-content: center; padding: 0 16px; } }
/* store headers back in black (the lines under the buttons stay grey) */
.auth-store-label, .auth-store-label .auth-ic { color: var(--ink); }
/* phones: a much smaller critter at the top of the Get started pop-up */
@media (max-width: 520px) {
  .login-view[data-view="signup"] .auth-critter { height: 72px; width: auto; margin-bottom: 4px; }
}
/* Mobile card: the same four app buttons as the Get started pop-up */
/* phones: room for the yearly badge between the stacked plans */
@media (max-width: 720px) { .plans { row-gap: 40px; gap: 40px; } }
body.mobile-view .plans { row-gap: 40px; gap: 40px; }
/* footer: a tiny meditating critter (the site icon) sits on top of the logo */
.footer-critter { display: block; width: 40px; height: 40px; margin: 0 0 6px; }
.footer-brand .footer-logo + .footer-platforms { margin-top: 14px; }

/* menu tags ("New", "Best for beginners", "Sign up & get free"): one style on desktop and in the phone menu,
   small teal Caveat, no pill */
.mega-new, .mega-col a .mega-new, .mega-col a:hover .mega-new, .menu-acc-panel a .mega-new, .menu-acc-panel a:hover .mega-new {
  display: block; width: fit-content; margin: 0 0 1px; padding: 0;
  background: none; border-radius: 0; box-shadow: none;
  font-family: var(--font-hand); font-size: 17px; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none;
  color: var(--secondary-dark);
}

.menu-acc-link { text-decoration: none; color: inherit; } /* same look as the section rows, no chevron */
/* menu tags in the same teal as the section headers */
.mega-new, .mega-col a .mega-new, .mega-col a:hover .mega-new, .menu-acc-panel a .mega-new, .menu-acc-panel a:hover .mega-new { color: var(--secondary); }
/* app icons: never touch the pill outline */
.auth-app { padding-left: 7px; }
.auth-app-icon { width: 26px; height: 26px; }

.footer-critter { width: 48px; height: 48px; margin: 0 0 4px -4px; }
/* phones: just the arrow, with even space between text, arrow and close */
@media (max-width: 720px) {
  .announce { gap: 18px; padding-right: 52px; }
  .announce-link-word { display: none; }
  .announce-link { text-decoration: none; font-size: 18px; line-height: 1; padding: 4px 2px; }
}
/* announcement bar: the whole message (text + arrow) is one link, same on desktop and phones */
.announce-main { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.announce-main:hover { color: #fff; }
.announce-main:hover .announce-text { text-decoration: underline; text-underline-offset: 3px; }
.announce-arrow { flex: none; font-size: 17px; line-height: 1; transition: transform .2s ease; }
.announce-main:hover .announce-arrow { transform: translateX(3px); }
@media (max-width: 720px) {
  .announce-main { gap: 18px; justify-content: space-between; width: 100%; }
  .announce-arrow { font-size: 18px; }
}
/* phones: no arrow; the whole banner text is the link */
@media (max-width: 720px) { .announce-arrow { display: none; } }
/* phones: the three idiom app screens stack (no sideways scroll) */
@media (max-width: 720px) {
  .idm-screens { flex-direction: column; align-items: center; gap: 28px; overflow: visible; margin: 0; padding: 0; scroll-snap-type: none; }
  .idm-shot, .idm-shot:nth-child(2) { width: 230px; margin-top: 0; }
  .idm-shot figcaption { font-size: 22px; }
}
body.mobile-view .idm-screens { flex-direction: column; align-items: center; gap: 28px; overflow: visible; margin: 0; padding: 0; }
body.mobile-view .idm-shot, body.mobile-view .idm-shot:nth-child(2) { width: 230px; margin-top: 0; }

/* =========================================================
   Light / Dark toggle (bottom right) — same look as the Desktop/Mobile toggle
   ========================================================= */
.theme-toggle { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; gap: 4px; background: #fff; border: 1px solid #E4E1EE; padding: 5px; border-radius: 13px; box-shadow: 0 10px 30px rgba(20,19,32,.16); }
.theme-toggle button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.theme-toggle button.active { color: #fff; background: var(--tertiary); }
/* inside the Desktop / Mobile toggle: a thin divider, then buttons styled
   like Desktop / Mobile, showing just the sun / moon */
.device-toggle .theme-toggle--inline { position: static; gap: 4px; margin-left: 4px; padding: 0 0 0 8px; background: none; border: 0; border-left: 1px solid #E4E1EE; border-radius: 0; box-shadow: none; }
.device-toggle .theme-toggle--inline button { padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--grey); }
.device-toggle .theme-toggle--inline button.active { color: #fff; background: var(--tertiary); }
.device-toggle .theme-toggle--inline button span { display: none; }
/* TEMP design tool: the V1 / V2 / V3 bar, on its own just above the Desktop / Mobile
   toggle (same look); it folds away with that toggle (main.js) */
.device-toggle.ver-bar { bottom: 76px; }
.device-toggle.ver-bar button { padding: 9px 14px; font-weight: 700; }
#device-toggle.is-collapsed ~ .ver-bar { display: none; }
/* TEMP design tool: a Colours button at the end of the toggle opens a small panel of
   the current theme's colour pickers (main.js) */
.color-tool { position: relative; display: flex; align-items: center; margin-left: 4px; padding-left: 8px; border-left: 1px solid #E4E1EE; }
.device-toggle .color-tool-btn.active { color: #fff; background: var(--tertiary); }
.color-tool-panel { position: absolute; left: 0; bottom: calc(100% + 14px); width: 320px; padding: 12px; background: #fff; border: 1px solid #E4E1EE; border-radius: 13px; box-shadow: 0 10px 30px rgba(20,19,32,.16); }
.color-tool-title { margin: 0 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.color-tool-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); }
.color-tool-row:hover { background: var(--line-soft); }
.color-tool-row input { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.color-tool-row input::-webkit-color-swatch-wrapper { padding: 0; }
.color-tool-row input::-webkit-color-swatch { border: 1px solid #E4E1EE; border-radius: 6px; }
.color-tool-name { flex: 1; font-family: 'Roboto', monospace; font-size: 12.5px; }
.color-tool-hex { font-variant-numeric: tabular-nums; color: var(--grey); }
.color-tool-row.is-changed .color-tool-hex { color: var(--ink); }
.device-toggle .color-tool-reset { padding: 4px 6px; border-radius: 7px; font-size: 14px; color: var(--grey); }
/* always shown; faded and inactive while the colour is still the stylesheet's */
.device-toggle .color-tool-reset:disabled { opacity: .35; cursor: default; background: none; }
.device-toggle .color-tool-copy { padding: 4px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--grey); }
.device-toggle .color-tool-copy:hover { background: var(--line); color: var(--ink); }
.device-toggle .color-tool-copy.is-copied { color: var(--tertiary); }
.device-toggle .color-tool-reset:not(:disabled):hover { background: var(--line); color: var(--ink); }
@media (max-width: 720px) { .color-tool { display: none; } }
html[data-theme="dark"] body[data-dark-ready] .color-tool { border-left-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .color-tool-panel { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .color-tool-row:hover { background: var(--surface-2); }
html[data-theme="dark"] body[data-dark-ready] .color-tool-row input::-webkit-color-swatch { border-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .device-toggle .color-tool-reset:not(:disabled):hover,
html[data-theme="dark"] body[data-dark-ready] .device-toggle .color-tool-copy:hover { background: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .device-toggle .color-tool-copy.is-copied { color: var(--tertiary-text); }
/* TEMP design tool: colour-blind preview menu at the end of the toggle (main.js);
   purple when a preview is on so it's never left on by accident */
.cb-preview { display: flex; align-items: center; gap: 6px; margin-left: 4px; padding: 0 4px 0 12px; border-left: 1px solid #E4E1EE; font-size: 13px; color: var(--grey); cursor: pointer; }
.cb-preview select { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: inherit; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.cb-preview select:hover { background: var(--line-soft); }
.cb-preview.active select { color: #fff; background: var(--tertiary); }
@media (max-width: 720px) { .cb-preview { display: none; } }
html[data-theme="dark"] body[data-dark-ready] .cb-preview { border-left-color: var(--line); color: var(--ink); }
html[data-theme="dark"] body[data-dark-ready] .cb-preview select:not(:hover) { background: none; }
html[data-theme="dark"] body[data-dark-ready] .cb-preview select:hover { background: var(--surface-2); }
html[data-theme="dark"] body[data-dark-ready] .cb-preview.active select { color: #fff; background: var(--tertiary); }
/* TEMP design tools: an arrow at the end folds the whole bar away to just itself (main.js) */
.device-toggle .dt-collapse { margin-left: 4px; padding: 9px 10px; border-radius: 9px; font-size: 17px; font-weight: 600; line-height: 1; color: var(--grey); }
.device-toggle .dt-collapse:hover { background: var(--line-soft); }
.device-toggle.is-collapsed > :not(.dt-collapse) { display: none; }
.device-toggle.is-collapsed .dt-collapse { margin-left: 0; }
html[data-theme="dark"] body[data-dark-ready] .dt-collapse { color: var(--ink); }
html[data-theme="dark"] body[data-dark-ready] .dt-collapse:hover { background: var(--surface-2); }
/* TEMP design tools: the version bar floats just above the toggle (main.js) and folds
   away with it. Version-only content: .ver-only-main shows in Main, .ver-only-mine in
   Mine (the default, also when no version is set) */
.device-toggle.ver-bar { bottom: 76px; }
.device-toggle.ver-bar button { padding: 9px 14px; font-weight: 700; }
#device-toggle.is-collapsed ~ .ver-bar { display: none; }
html:not([data-ver="main"]) .ver-only-main { display: none !important; }
html[data-ver="main"] .ver-only-mine { display: none !important; }
/* only the standalone toggle (no Desktop / Mobile box) sits bottom right,
   where the floating Help button moves up to clear it */
body[data-dark-ready]:has(> .theme-toggle) .help-fab { bottom: 76px; }

/* =========================================================
   DARK MODE (homepage first: body[data-dark-ready])
   Colours swap through the variables; a few hard-coded whites are mapped to the dark surface.
   Stays as designed (light): the pricing band, the pop-ups/modals, photo banners.
   ========================================================= */
html[data-theme="dark"] body[data-dark-ready] {
  --ink: #EEEDF4;
  --bg: #121118;
  --surface: #1B1A23;
  --surface-2: #23212D;
  --line: #2E2B3A;
  --line-soft: #26242F;
  --grey: #A8A6B6;
  --grey-faint: #7F7D8E;
  --grey-tint: #23212D;
  --secondary-tint: #133431;
  --tertiary-tint: #2A2150;
  /* brand teal on dark: the About quote's bright aqua (.about-quote-hl) */
  --secondary: #67FFEC;
  --secondary-dark: #67FFEC;
  /* brand purple on dark: a little deeper and more saturated so it holds its own */
  --tertiary: #4F13F6;
  /* purple for text on dark: the deep purple is too dim for type (2.5:1), so
     links, labels and hovers use this lighter one */
  --tertiary-text: #8589FF;
  /* brand pink on dark: shifted toward magenta */
  --pink: #EE4FD0;
  /* the pricing sticky note on dark (its ink follows: light on dark notes) */
  --note-bg: #1F0B6B;
  --note-ink: #EEEDF4;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
}
/* keep these with the light tokens: the footer is dark in both themes and is built
   on the light --ink; the demo writing pad and the QR card stay white like the app's
   canvas (dark strokes) and a scannable code */
html[data-theme="dark"] body[data-dark-ready] .footer,
html[data-theme="dark"] body[data-dark-ready] .demo-pad,
html[data-theme="dark"] body[data-dark-ready] .flow-qr-card {
  --ink: #15141B; --bg: #FBFAFE; --line: #ECEAF3; --line-soft: #F0EEF6; --grey: #6B6A78; --grey-faint: #9D9BAA;
  --grey-tint: #F2F2F2; --secondary: #32BFB2; --secondary-tint: #DEF6F1; --tertiary-tint: #EEEBFD; --secondary-dark: #0C8C7B;
  color-scheme: light;
}
html[data-theme="dark"] body[data-dark-ready] .footer { color: #fff; }
html[data-theme="dark"] body[data-dark-ready] .mega,
html[data-theme="dark"] body[data-dark-ready] .faq { background: var(--surface); border-color: var(--line); box-shadow: none; }
html[data-theme="dark"] body[data-dark-ready] .faq-plus { background: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] body[data-dark-ready] .theme-toggle,
html[data-theme="dark"] body[data-dark-ready] .device-toggle { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .device-toggle button:not(.active) { color: var(--ink); }
html[data-theme="dark"] body[data-dark-ready] .page { background: var(--bg); }
html[data-theme="dark"] body[data-dark-ready] .header-logo img { filter: invert(1) brightness(1.05); }
html[data-theme="dark"] body[data-dark-ready] .header.scrolled { background: rgba(18,17,24,.86); border-bottom-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .header.mega-open { background: rgba(18,17,24,.92); }
html[data-theme="dark"] body[data-dark-ready] .why-inline,
html[data-theme="dark"] body[data-dark-ready] .ftab-text { color: var(--ink); }
/* Chinese & Japanese: the writing canvas as a dark card (--surface-2), its guides in the
   dark aqua #67FFEC (written out: it lives in an SVG data URI), faint; the strokes in the
   dark aqua too (light mode keeps them purple) */
html[data-theme="dark"] body[data-dark-ready] .lang-big.stroke-anim {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g stroke='%2367FFEC' stroke-opacity='.3' stroke-width='0.59' stroke-dasharray='1.8 1.8' fill='none'><line x1='4' y1='4' x2='96' y2='96'/><line x1='96' y1='4' x2='4' y2='96'/><line x1='50' y1='4' x2='50' y2='96'/><line x1='4' y1='50' x2='96' y2='50'/></g></svg>") center / 100% 100% no-repeat, var(--surface-2);
  color: var(--secondary);
}
/* purple text links read lighter on dark (buttons keep the brand purple) */
html[data-theme="dark"] body[data-dark-ready] .lang-stat,
html[data-theme="dark"] body[data-dark-ready] .faq-hc-link,
html[data-theme="dark"] body[data-dark-ready] .team-entry-link,
html[data-theme="dark"] body[data-dark-ready] .why-inline:hover,
html[data-theme="dark"] body[data-dark-ready] .mega-col a:hover,
html[data-theme="dark"] body[data-dark-ready] .header-nav a:hover,
html[data-theme="dark"] body[data-dark-ready] .nav-drop-btn:hover,
html[data-theme="dark"] body[data-dark-ready] .nav-drop-btn[aria-expanded="true"] { color: var(--tertiary-text); }
html[data-theme="dark"] body[data-dark-ready] .mega-col a:hover { background: var(--surface-2); }
/* pop-ups (log in / sign up, subscribe flow, demo) go dark: white and pale tints
   in their parts map to the dark surfaces and lines */
html[data-theme="dark"] body[data-dark-ready] .modal { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] body[data-dark-ready] .modal-close:hover,
html[data-theme="dark"] body[data-dark-ready] .auth-back:hover { background: var(--surface-2); }
html[data-theme="dark"] body[data-dark-ready] .flow-input,
html[data-theme="dark"] body[data-dark-ready] .flow-field,
html[data-theme="dark"] body[data-dark-ready] .flow-plan,
html[data-theme="dark"] body[data-dark-ready] .flow-later,
html[data-theme="dark"] body[data-dark-ready] .auth-input,
html[data-theme="dark"] body[data-dark-ready] .auth-btn--outline,
html[data-theme="dark"] body[data-dark-ready] .btn-oauth,
html[data-theme="dark"] body[data-dark-ready] .login-btn-secondary,
html[data-theme="dark"] body[data-dark-ready] .modal .auth-app { background: var(--surface); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] body[data-dark-ready] .flow-plan.selected { background: var(--tertiary-tint); border-color: var(--tertiary); }
html[data-theme="dark"] body[data-dark-ready] .flow-payment { background: var(--surface-2); }
html[data-theme="dark"] body[data-dark-ready] .flow-later:hover { border-color: var(--tertiary-text); }
html[data-theme="dark"] body[data-dark-ready] .pricing-note { background: var(--note-bg); color: var(--note-ink); }
html[data-theme="dark"] body[data-dark-ready] a.auth-link--purple,
html[data-theme="dark"] body[data-dark-ready] .demo-kicker,
html[data-theme="dark"] body[data-dark-ready] .demo-to-trial,
html[data-theme="dark"] body[data-dark-ready] .flow-redeem,
html[data-theme="dark"] body[data-dark-ready] .flow-step-ind.done span { color: var(--tertiary-text); }
html[data-theme="dark"] body[data-dark-ready] .flow-step-ind:not(.done) span { color: var(--grey-faint); }
/* Decks, Institutions, Resources on dark: their white cards, fields and ghost buttons
   take the dark surface and line; chosen states the purple tint. Cover and screenshot
   placeholders, badges on covers and play buttons stay as drawn (they act as images) */
html[data-theme="dark"] body[data-dark-ready] .lib-card,
html[data-theme="dark"] body[data-dark-ready] .dk-tab,
html[data-theme="dark"] body[data-dark-ready] .dk-search,
html[data-theme="dark"] body[data-dark-ready] .dk-select select,
html[data-theme="dark"] body[data-dark-ready] .dk-course,
html[data-theme="dark"] body[data-dark-ready] .dk-course-actions .btn-ghost,
html[data-theme="dark"] body[data-dark-ready] .dk-course-side .btn-ghost,
html[data-theme="dark"] body[data-dark-ready] .inst-card,
html[data-theme="dark"] body[data-dark-ready] .inst-feat,
html[data-theme="dark"] body[data-dark-ready] .inst-step,
html[data-theme="dark"] body[data-dark-ready] .inst-intent-card,
html[data-theme="dark"] body[data-dark-ready] .inst-chip,
html[data-theme="dark"] body[data-dark-ready] .inst-hero-actions .btn-ghost,
html[data-theme="dark"] body[data-dark-ready] .res-card,
html[data-theme="dark"] body[data-dark-ready] .res-tile { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .dk-tab[aria-selected="true"],
html[data-theme="dark"] body[data-dark-ready] .inst-intent-card:has(input:checked),
html[data-theme="dark"] body[data-dark-ready] .inst-chip.selected { background: var(--tertiary-tint); border-color: var(--tertiary); }
html[data-theme="dark"] body[data-dark-ready] .dk-tab[aria-selected="true"] .dk-tab-num,
html[data-theme="dark"] body[data-dark-ready] .dk-tab[aria-selected="true"] .dk-tab-label,
html[data-theme="dark"] body[data-dark-ready] .idm-course-go,
html[data-theme="dark"] body[data-dark-ready] .inst-step-link,
html[data-theme="dark"] body[data-dark-ready] .ways-app-links a,
html[data-theme="dark"] body[data-dark-ready] .res-link,
html[data-theme="dark"] body[data-dark-ready] .section-sub a,
html[data-theme="dark"] body[data-dark-ready] .inst-chip.selected,
html[data-theme="dark"] body[data-dark-ready] .idm-shot figcaption a:hover,
html[data-theme="dark"] body[data-dark-ready] .inst-sec-num { color: var(--tertiary-text); }
/* white badge printed on a course cover keeps its dark ink */
html[data-theme="dark"] body[data-dark-ready] .idm-count { color: #15141B; }
html[data-theme="dark"] body[data-dark-ready] .inst-sec-num { background: var(--tertiary-tint); }
html[data-theme="dark"] body[data-dark-ready] .lib-card--deck .lib-thumb--cover,
html[data-theme="dark"] body[data-dark-ready] .lib-card--course .lib-thumb--cover,
html[data-theme="dark"] body[data-dark-ready] .res-card kbd { background: var(--surface-2); }
html[data-theme="dark"] body[data-dark-ready] .res-feature { background: linear-gradient(135deg, var(--surface) 55%, var(--tertiary-tint)); }
html[data-theme="dark"] body[data-dark-ready] .dk-modal-art { background: linear-gradient(180deg, var(--tertiary-tint), var(--surface)); }
html[data-theme="dark"] body[data-dark-ready] .dk-modal-close { background: var(--surface-2); color: var(--ink); }
/* the Institutions hero's soft colour wash, in the dark tints */
html[data-theme="dark"] body[data-dark-ready] .inst-hero-band {
  background:
    radial-gradient(1400px 560px at 78% -6%, var(--secondary-tint) 0%, transparent 60%),
    radial-gradient(1100px 520px at 8% 4%, var(--tertiary-tint) 0%, transparent 55%);
}
/* Mobile, Tablet & Web: the language swipe in the text purple at the dark swipes' strength */
html[data-theme="dark"] body[data-dark-ready] .ways-app-lang { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%238589FF' fill-opacity='.22' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%238589FF' fill-opacity='.12' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E"); }
/* segmented switches (e.g. Chinese / Japanese in the subscribe flow) sit on the dark surfaces */
html[data-theme="dark"] body[data-dark-ready] .seg { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .seg:not(.seg--center):not(.seg--solid) button.active { background: var(--surface); }
/* store badges stay near-black (as store badges are), with a hairline so they read on dark */
html[data-theme="dark"] body[data-dark-ready] .flow-stores button { background: #15141B; border: 1px solid var(--line); }
html[data-theme="dark"] body[data-dark-ready] .flow-stores button:hover { background: #2C2A39; }
/* log-in screens: the app's deep teal reads on its filled buttons, but its text links
   and outline button take the dark theme teal; the fixed greys become the dark greys */
html[data-theme="dark"] body[data-dark-ready] .auth-link:not(.auth-link--purple),
html[data-theme="dark"] body[data-dark-ready] .auth-legal a,
html[data-theme="dark"] body[data-dark-ready] .auth-btn--outline { color: var(--secondary); }
html[data-theme="dark"] body[data-dark-ready] .auth-sub,
html[data-theme="dark"] body[data-dark-ready] .auth-or,
html[data-theme="dark"] body[data-dark-ready] .auth-legal { color: var(--grey); }
html[data-theme="dark"] body[data-dark-ready] .btn-oauth:hover,
html[data-theme="dark"] body[data-dark-ready] .auth-btn--outline:hover,
html[data-theme="dark"] body[data-dark-ready] .modal .auth-app:hover { background: var(--surface-2); }
/* pricing cards go dark too: dark surface cards on the illustrated band; Yearly keeps
   its purple outline, flag and filled button; the Monthly outline button reads in text purple */
html[data-theme="dark"] body[data-dark-ready] .plan-card { background: var(--surface); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] body[data-dark-ready] .plan-card.popular { border-color: var(--tertiary); }
html[data-theme="dark"] body[data-dark-ready] .plan-card:not(.popular) .plan-btn { background: none; color: var(--tertiary-text); border-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .plan-card:not(.popular) a.plan-btn:hover { color: var(--tertiary-text); border-color: var(--tertiary-text); }
html[data-theme="dark"] body[data-dark-ready] .nav-drop-btn:hover,
html[data-theme="dark"] body[data-dark-ready] .nav-drop-btn[aria-expanded="true"],
html[data-theme="dark"] body[data-dark-ready] .header-nav a:hover { background: var(--surface-2); }
html[data-theme="dark"] body[data-dark-ready] .footer { background: #0C0B11; border-top: 1px solid var(--line); }
/* About: the current-page nav pill, and the purple team cards' labels, role and ring, lighter on dark */
html[data-theme="dark"] body[data-dark-ready] .header-nav a.active { color: var(--tertiary-text); background: var(--tertiary-tint); }
html[data-theme="dark"] body[data-dark-ready] .team-entry--purple { --card-ink: var(--tertiary-text); }
/* testimonial sticky notes in dark paper: each colour about 15% into the page, as the dark
   teal and purple tints are (mint and lavender use those tints as they are); light ink and
   grey on them, and the tape and stars in the bright dark-mode accents */
html[data-theme="dark"] body[data-dark-ready] .lt-note--yellow { --lt-paper: color-mix(in srgb, #E8B10E 15%, var(--bg)); }
html[data-theme="dark"] body[data-dark-ready] .lt-note--pink { --lt-paper: color-mix(in srgb, var(--pink) 15%, var(--bg)); }
html[data-theme="dark"] body[data-dark-ready] .lt-note--lavender { --lt-accent: var(--tertiary-text); }
/* hero sticky notes and their pop-out cards keep their designed (light) look */
html[data-theme="dark"] body[data-dark-ready] .hero-note,
html[data-theme="dark"] body[data-dark-ready] .hero-note-pop {
  --ink: #15141B; --secondary: #32BFB2; --secondary-tint: #DEF6F1; --tertiary-tint: #EEEBFD; --grey: #6B6A78; --secondary-dark: #0C8C7B;
  color: var(--ink);
}
html[data-theme="dark"] body[data-dark-ready] .header-burger span { background: var(--ink); }
/* phones: the theme toggle shows icons only, so it never collides with the Desktop/Mobile toggle */
@media (max-width: 720px) {
  .theme-toggle button { font-size: 0; padding: 8px 10px; }
  .theme-toggle button::first-letter { font-size: 15px; }
}
html[data-theme="dark"] body[data-dark-ready] .menu-login { color: var(--tertiary-text); }
html[data-theme="dark"] body[data-dark-ready] .header-logo img { filter: brightness(0) invert(1); } /* same pure white as the footer logo */

/* dark mode, teal painted into hand-drawn marks (highlighter swipes, underlines,
   stat rules, tab marks): these carry the colour inside SVG data URIs or rgba(),
   so they can't follow --secondary; repeated here in the About quote's aqua
   #67FFEC (same shapes, same breakpoints) at half the light-mode opacity, so
   white text still reads on the swipes. Light islands keep the brand teal. */
html[data-theme="dark"] body[data-dark-ready] .hero.hero--callouts .hero-callout-title,
html[data-theme="dark"] body[data-dark-ready] .hero.hero--callouts .hero-callout-stat,
html[data-theme="dark"] body[data-dark-ready] .ways-web-title { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%2367FFEC' fill-opacity='.22' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%2367FFEC' fill-opacity='.12' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat 0 92% / 100% 72%; }
html[data-theme="dark"] body[data-dark-ready] .stat + .stat::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 200' preserveAspectRatio='none'%3E%3Cpath d='M3 2 C 2.2 40, 3.8 82, 3 120 S 2.3 172, 3.2 198' fill='none' stroke='%2367FFEC' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
html[data-theme="dark"] body[data-dark-ready] .stat-body mark { background: linear-gradient(transparent 18%, rgba(103,255,236,.16) 18%, rgba(103,255,236,.16) 94%, transparent 94%); }
html[data-theme="dark"] body[data-dark-ready] .pricing-note mark { background: linear-gradient(transparent 22%, rgba(103,255,236,.28) 22%, rgba(103,255,236,.28) 92%, transparent 92%); }
html[data-theme="dark"] body[data-dark-ready] .ftab[aria-selected="true"]::before { background: rgba(103,255,236,.16); }
html[data-theme="dark"] body[data-dark-ready] .ftabs--a .ftab::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2 C 30 3.6, 62 6.2, 90 4.4 S 112 3.8, 118 4.6' fill='none' stroke='%2367FFEC' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
html[data-theme="dark"] body[data-dark-ready] .ftabs--a .ftab-text { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%2367FFEC' fill-opacity='.22' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%2367FFEC' fill-opacity='.12' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat 0 92% / 100% 72%; }
html[data-theme="dark"] body[data-dark-ready] .ftabs-dot::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%2367FFEC' fill-opacity='.22' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%2367FFEC' fill-opacity='.12' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
html[data-theme="dark"] body[data-dark-ready] .team-entry--teal { --card-mark: rgba(103,255,236,.1); }
html[data-theme="dark"] body[data-dark-ready] .why-title { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2 C 30 3.6, 62 6.2, 90 4.4 S 112 3.8, 118 4.6' fill='none' stroke='%2367FFEC' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left bottom 2px / 100% 8px; }
@media (max-width: 720px) {
html[data-theme="dark"] body[data-dark-ready] .stat + .stat::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3 C 40 2.2, 82 3.8, 120 3 S 172 2.3, 198 3.2' fill='none' stroke='%2367FFEC' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
}
html[data-theme="dark"] body[data-dark-ready].mobile-view .stat + .stat::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3 C 40 2.2, 82 3.8, 120 3 S 172 2.3, 198 3.2' fill='none' stroke='%2367FFEC' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
@media (max-width: 720px) {
html[data-theme="dark"] body[data-dark-ready] .stat + .stat::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3 C 40 2.2, 82 3.8, 120 3 S 172 2.3, 198 3.2' fill='none' stroke='%2367FFEC' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
}
/* the numbered feature tabs (1. 2. 3.) have no mark behind the number, as in light mode */
html[data-theme="dark"] body[data-dark-ready] .ftabs--a .ftab::before { background: none; }
/* the announcement bar's message, arrow, spark and close stay white in dark mode too */
html[data-theme="dark"] body[data-dark-ready] .announce,
html[data-theme="dark"] body[data-dark-ready] .announce-main,
html[data-theme="dark"] body[data-dark-ready] .announce-main:hover,
html[data-theme="dark"] body[data-dark-ready] .announce-link,
html[data-theme="dark"] body[data-dark-ready] .announce-close { color: #fff; }
/* the desktop feature tabs show no swipe behind the label (as in light mode) */
@media (min-width: 901px) {
html[data-theme="dark"] body[data-dark-ready]:not(.mobile-view) .ftabs--a .ftab-text { background: none; }
}

/* Deck preview: real deck descriptions can be long. They show four lines with a "Read more"
   link; once opened, the whole pop-up scrolls (no inner scroll bar) */
.dk-modal { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.dk-modal::-webkit-scrollbar { display: none; }
.dk-modal-title { margin-top: 4px; }
.dk-modal-desc { margin: -4px 0 0; }
.dk-modal-desc.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.dk-modal-more { align-self: flex-start; margin: -4px 0 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--tertiary); cursor: pointer; }
.dk-modal-more:hover { text-decoration: underline; }
.dk-modal-more[hidden] { display: none; }
html[data-theme="dark"] body[data-dark-ready] .dk-modal-more { color: var(--tertiary-text); }
@media (max-height: 700px) { .dk-modal-cover { width: 150px; } }

/* Resources menu: "Institutions" sits right under "Integrations and partners" */
.mega-col a.mega-more { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.mega-col a.mega-more + a.mega-more { margin-top: 16px; }

/* Content partners: two example decks from each partner, straight from the deck exports */
.res-decks { margin: 4px 0 14px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); }
.res-decks-h { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.res-deck-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.res-deck { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.res-deck img { width: 44px; aspect-ratio: 351/512; flex: none; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 10px rgba(20,19,32,.14); transition: transform .2s; }
.res-deck:hover { color: var(--tertiary); }
.res-deck:hover img { transform: translateY(-2px); }
@media (max-width: 420px) { .res-deck-row { grid-template-columns: 1fr; } }
html[data-theme="dark"] body[data-dark-ready] .res-decks { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] body[data-dark-ready] .res-deck:hover { color: var(--tertiary-text); }

/* Classroom pricing: the dots on the student-count line are solid teal in dark mode */
html[data-theme="dark"] body[data-dark-ready] .price-dot { fill: var(--secondary); stroke: var(--secondary); background: none; }

/* "+N decks" count beside the deck box heading */
.res-decks-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.res-decks-more { flex: none; padding: 3px 9px; border-radius: 999px; font-weight: 800; letter-spacing: .02em; color: var(--secondary-dark); background: var(--secondary-tint); }
html[data-theme="dark"] body[data-dark-ready] .res-decks-more { color: var(--bg); background: var(--secondary); }

/* LTL School & Flexi Classes: one card across both columns, text left, decks and code right */
.res-card--wide { grid-column: 1 / -1; }
.res-card--wide .res-card-head .res-logo + .res-logo { margin-left: -6px; }
.res-wide-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.res-wide-body .res-decks { margin-top: 0; }
@media (max-width: 900px) { .res-wide-body { grid-template-columns: 1fr; gap: 4px; } }
body.mobile-view .res-wide-body { grid-template-columns: 1fr; gap: 4px; }

/* round partner logos (e.g. Dashu Mandarin): no tile behind them */
.res-logo--round { border-radius: 50%; border: 0; background: none; }

/* wide wordmark logos (e.g. Imagin8 Press): whole logo on a white tile, in both themes */
.res-logo--contain { width: auto; aspect-ratio: 142/83; object-fit: contain; padding: 3px 6px; background: #fff; }
html[data-theme="dark"] body[data-dark-ready] .res-logo--contain { background: #fff; }
.res-deck--square img { aspect-ratio: 1; width: 52px; }

/* filtered views (HSK / TOCFL / JLPT): one grid across the full width, wrapping onto more lines */
#dk-showcase .dk-row--flat { grid-column: 1 / -1; }
.dk-row--flat .dk-track { flex-wrap: wrap; overflow: visible; }

/* filtered views: compact cards at a fixed size instead of stretching across the row;
   "half" groups sit two to a line on desktop */
/* same card size and spacing as the Highlights rows (116px cards, 16px apart), left-aligned */
body:not(.mobile-view) .dk-row--flat .dk-track { display: grid; grid-template-columns: repeat(auto-fill, 116px); gap: 16px; }
@media (min-width: 721px) { body:not(.mobile-view) #dk-showcase .dk-row--half { grid-column: auto; } }

/* exam filter chips under the language tabs: small, quiet, the active one filled purple */
.dk-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dk-chips[hidden] { display: none; }
.dk-chip { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.dk-chip:hover { border-color: var(--tertiary); }
.dk-chip[aria-pressed="true"] { background: var(--tertiary); border-color: var(--tertiary); color: #fff; }

/* Decks page head: the teal highlighter swipe from the homepage callout titles under the key phrase
   (replaces the purple squiggle), and the sub-line as a hand-written sticky note beside the heading */
.dk-hl {
  padding: 0 8px; margin: 0 -8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%2332BFB2' fill-opacity='.45' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%2332BFB2' fill-opacity='.25' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat 0 92% / 100% 60%;
}
html[data-theme="dark"] body[data-dark-ready] .dk-hl {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath fill='%2367FFEC' fill-opacity='.22' d='M1.5 9.2 C 22 8, 46 8.4, 70 6.6 S 93 5.2, 99 5.2 C 100 8.6, 99.4 13, 97.8 16.4 C 76 17.6, 52 17.2, 28 19 S 6.4 20.6, 1.2 19.8 C 0.2 16.8, 0.4 12, 1.5 9.2 Z'/%3E%3Cpath fill='%2367FFEC' fill-opacity='.12' d='M5.6 13.6 C 30 12.4, 55 11.8, 80 10.4 S 95 9.4, 97.4 9.6 C 98 11.2, 97.6 13, 96.6 14.4 C 74 15.6, 48 17, 24 18.6 S 8 19.8, 5 19.2 C 4.6 17.4, 4.8 15, 5.6 13.6 Z'/%3E%3C/svg%3E") no-repeat 0 92% / 100% 60%;
}
.dk-head .section-head { position: relative; }
.dk-note {
  position: absolute; left: calc(50% + 230px); top: 34px;
  width: 230px; margin: 0; padding: 14px 16px 16px;
  text-align: left; font-family: var(--font-hand); font-size: 20px; line-height: 1.2; font-weight: 700;
  color: var(--note-ink, var(--ink)); background: var(--note-bg, var(--secondary-tint));
  border-radius: 3px; box-shadow: 0 6px 4px -4px rgba(20,19,32,.1);
  rotate: 3deg;
}
.dk-note mark {
  background: linear-gradient(transparent 22%, rgba(50,191,178,.55) 22%, rgba(50,191,178,.55) 92%, transparent 92%);
  color: inherit; padding: 0 .12em; margin: 0 -.12em;
}
html[data-theme="dark"] body[data-dark-ready] .dk-note mark { background: linear-gradient(transparent 22%, rgba(103,255,236,.28) 22%, rgba(103,255,236,.28) 92%, transparent 92%); }
/* no room beside the heading: the note sits under it */
@media (max-width: 1100px) { .dk-note { position: static; width: auto; max-width: 300px; margin: 18px auto 0; text-align: center; rotate: -1.5deg; } }
body.mobile-view .dk-note { position: static; width: auto; max-width: 300px; margin: 18px auto 0; text-align: center; rotate: -1.5deg; }

/* phones: deck rows become a small grid instead of a sideways-scrolling strip (no scroll bar),
   four covers to a line everywhere, with short titles (up to three lines) */
@media (max-width: 720px) {
  .dk-track, body .dk-row--flat .dk-track, body .dk-row--half .dk-track, body:not(.mobile-view) .dk-row--flat .dk-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; overflow: visible; padding: 0; margin: 0; }
  .dk-track .dk-title { font-size: 11px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  .dk-track .dk-cover { border-radius: 7px; margin-bottom: 4px; }
  .dk-track .dk-card, .dk-row--flat .dk-card { width: auto; }
  .dk-track .dk-cover { width: 100%; }
}
body.mobile-view .dk-track, body.mobile-view .dk-row--flat .dk-track, body.mobile-view .dk-row--half .dk-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; overflow: visible; padding: 0; margin: 0; }
body.mobile-view .dk-track .dk-title { font-size: 11px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
body.mobile-view .dk-track .dk-cover { border-radius: 7px; margin-bottom: 4px; }
body.mobile-view .dk-track .dk-card, body.mobile-view .dk-row--flat .dk-card { width: auto; }
body.mobile-view .dk-track .dk-cover { width: 100%; }

/* Features: slide pictures that spill past the screen edge (slide 1's hand, slide 4's wide panel) are clipped
   by the section, so iPhone Safari can't leave a sliver of one slide showing at the edge on the next */
.ftabs-section { overflow-x: clip; }

/* Get started pop-up on phones: each store's Chinese and Japanese apps sit side by side under the store name
   (shorter pop-up); the pills drop "Skritter:" and shrink a little to fit */
@media (max-width: 520px) {
  .auth-apps--split .auth-store { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .auth-apps--split .auth-store-label { grid-column: 1 / -1; }
  .auth-apps--split .auth-app { justify-content: center; gap: 6px; padding: 0 8px 0 4px; height: 40px; font-size: 12.5px; }
  .auth-apps--split .auth-app .app-brand { display: none; }
  .auth-apps--split .auth-app-icon { width: 24px; height: 24px; }
  .auth-apps--split { gap: 14px; }
  .auth-apps--split .auth-store + .auth-store { padding-top: 12px; }
}
body.mobile-view .auth-apps--split { grid-template-columns: 1fr; gap: 14px; }
body.mobile-view .auth-apps--split .auth-store, body.mobile-view .auth-apps--split .auth-store + .auth-store { padding: 0; border-left: 0; }
body.mobile-view .auth-apps--split .auth-store + .auth-store { padding-top: 12px; border-top: 1px solid var(--line); }
body.mobile-view .auth-apps--split .auth-store { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
body.mobile-view .auth-apps--split .auth-store-label { grid-column: 1 / -1; }
body.mobile-view .auth-apps--split .auth-app { justify-content: center; gap: 6px; padding: 0 8px 0 4px; height: 40px; font-size: 12.5px; }
body.mobile-view .auth-apps--split .auth-app .app-brand { display: none; }
body.mobile-view .auth-apps--split .auth-app-icon { width: 24px; height: 24px; }
/* the Decks note stays a light-teal post-it in dark mode too, like the homepage hero sticky notes */
html[data-theme="dark"] body[data-dark-ready] .dk-note { background: var(--secondary-tint-light, #DEF6F1); color: #15141B; }

/* idiom video courses on phones: four in a row like the deck grids, no "Study →" line (the cover is the link) */
@media (max-width: 720px) {
  .idm-courses { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; }
  .idm-course img { border-radius: 7px; margin-bottom: 4px; }
  .idm-course-t { font-size: 11px; line-height: 1.25; }
  .idm-course-go { display: none; }
  .idm-count { font-size: 8.5px; padding: 2px 5px; right: 4px; }
}
body.mobile-view .idm-courses { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; }
body.mobile-view .idm-course img { border-radius: 7px; margin-bottom: 4px; }
body.mobile-view .idm-course-t { font-size: 11px; line-height: 1.25; }
body.mobile-view .idm-course-go { display: none; }
body.mobile-view .idm-count { font-size: 8.5px; padding: 2px 5px; right: 4px; }

/* Institutions ticks on phones: two to a row, smaller handwriting */
@media (max-width: 720px) {
  .inst-featlist--top .inst-features-list { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 12px 20px; }
  .inst-featlist--top .inst-features-list li { font-size: 17px; gap: 5px; white-space: nowrap; }
}
body.mobile-view .inst-featlist--top .inst-features-list { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 12px 20px; }
body.mobile-view .inst-featlist--top .inst-features-list li { font-size: 17px; gap: 5px; white-space: nowrap; }

/* idiom courses, desktop: more room between the "Included in app" pill and the screenshot collage */
@media (min-width: 721px) { body:not(.mobile-view) #idiom-courses > .section-head { margin-bottom: 88px; } }

/* closing "The Write way…" banner: a smaller heading on phones (it was filling the banner) */
@media (max-width: 720px) {
  body .cta-banner .cta-copy h2, body .cta-banner h2 { font-size: 30px; line-height: 1.12; }
  body .cta-banner .cta-copy h2 .hand { font-size: 1.15em; }
}
body.mobile-view .cta-banner .cta-copy h2, body.mobile-view .cta-banner h2 { font-size: 30px; line-height: 1.12; }

/* the pricing note matches the other post-its: light teal with dark ink in dark mode too */
html[data-theme="dark"] body[data-dark-ready] .pricing-note { background: var(--secondary-tint-light, #DEF6F1); color: #15141B; }
html[data-theme="dark"] body[data-dark-ready] .pricing-note mark { background: linear-gradient(transparent 22%, rgba(50,191,178,.55) 22%, rgba(50,191,178,.55) 92%, transparent 92%); }
/* outlined plan buttons: a clear purple border in dark mode, not the faint grey card line */
html[data-theme="dark"] body[data-dark-ready] .plan-card:not(.popular) .plan-btn { border: 1.5px solid var(--tertiary-text); }
html[data-theme="dark"] body[data-dark-ready] .plan-card:not(.popular) a.plan-btn:hover { background: rgba(133,137,255,.12); }

/* Features on phones: the picture area runs the full screen width and clips there, so nothing (like the
   slide-1 hand) ever hangs outside it. iPhone Safari wasn't repainting that overhang when the slide changed,
   leaving the fingertip stuck at the screen edge on slides 2–6 */
@media (max-width: 900px) {
  body:not(.mobile-view) .ftabs-stage { width: 100vw; max-width: none; overflow: hidden; }
}

/* Chinese & Japanese writing canvas: the character always fills the same share of its canvas (as on desktop,
   156 of 200), and on phones the whole canvas shrinks with it rather than leaving a big empty square */
.lang-big.stroke-anim svg { width: 78%; height: 78%; }
@media (max-width: 720px) { .lang-big.stroke-anim { width: 140px; height: 140px; border-radius: 11px; } }
body.mobile-view .lang-big.stroke-anim { width: 140px; height: 140px; border-radius: 11px; }

/* 404: the "404" critters, a short note and the way back */
.nf { text-align: center; padding-top: 72px; padding-bottom: 110px; }
.nf-critter { display: block; width: min(380px, 80vw); height: auto; margin: 0 auto 26px; }
.nf h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; margin: 8px auto 12px; max-width: 22ch; }
.nf-sub { color: var(--grey); font-size: 17px; margin: 0 auto 28px; max-width: 34ch; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.nf-help { margin-top: 28px; font-size: 14px; color: var(--grey); }
.nf-help a { color: var(--tertiary-text, var(--tertiary)); font-weight: 600; }
/* both 404 buttons the same height, text centred in each */
.nf-actions .btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: 0 26px; box-sizing: border-box; font-size: 16px; }

/* phone menu in dark mode: hovered / tapped rows get a dark highlight, not the light-mode lavender (white text was unreadable on it) */
html[data-theme="dark"] body[data-dark-ready] .header-menu a:hover,
html[data-theme="dark"] body[data-dark-ready] .menu-acc-btn:hover { background: var(--surface-2); color: var(--ink); }

/* dark-mode pop-ups stand out from the page: a lighter raised card, and the page behind dimmed and blurred more */
html[data-theme="dark"] body[data-dark-ready] { --surface-raised: #2A2836; }
html[data-theme="dark"] body[data-dark-ready] .modal { background: var(--surface-raised); }
html[data-theme="dark"] body[data-dark-ready] .modal-overlay { background: rgba(5,4,10,.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html[data-theme="dark"] body[data-dark-ready] .dk-modal-art { background: linear-gradient(180deg, var(--tertiary-tint), var(--surface-raised)); }
html[data-theme="dark"] body[data-dark-ready] .dk-modal-close { background: #3A3749; }
/* the phone homepage's enlarged sticky note gets the same deeper backdrop */
html[data-theme="dark"] body[data-dark-ready] .hero-note-backdrop { background: rgba(5,4,10,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Partners & Resources, content partners: a shelf of deck covers (each opens its deck), then a footer with the
   partner's links on the left and where to find the rest of their decks on the right. No deck counts on purpose */
.res-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 84px)); gap: 10px; margin: 6px 0 18px; }
.res-cover { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 10px rgba(20,19,32,.14); transition: transform .2s; }
.res-cover img { display: block; width: 100%; aspect-ratio: 351/512; object-fit: cover; }
.res-cover--square img { aspect-ratio: 1; }
.res-cover:hover { transform: translateY(-3px); }
.res-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.res-foot .res-links { margin: 0; padding: 0; }
.res-find { font-size: 12.5px; color: var(--grey); }
html[data-theme="dark"] body[data-dark-ready] .res-foot { border-top-color: var(--line); }

/* HSK groups with an intro: the main page's light-teal post-it on the left, running from the top of the heading
   to the end of the deck names; heading and covers (4 to a line) together on the right. Phones: heading, note, covers */
@media (min-width: 721px) {
  body:not(.mobile-view) #dk-showcase .dk-row--noted { display: grid; grid-template-columns: 330px 608px; column-gap: 44px; justify-content: center; align-items: stretch; }
  body:not(.mobile-view) #dk-showcase .dk-row--noted .dk-row-main { display: contents; }
  body:not(.mobile-view) #dk-showcase .dk-row--noted .dk-row-h { grid-column: 2; grid-row: 1; text-align: left; }
  body:not(.mobile-view) #dk-showcase .dk-row--noted .dk-track { grid-column: 2; grid-row: 2; grid-template-columns: repeat(4, 140px); justify-content: start; }
  /* the note runs from the top of the first covers to the bottom of the last ones (main.js trims off the deck names) */
  body:not(.mobile-view) #dk-showcase .dk-row--noted .dk-side-note { grid-column: 1; grid-row: 2; }
}
/* straight (no tilt), with a strip of see-through teal tape across the top like the testimonial notes */
.dk-side-note { position: relative; margin: 0; padding: 24px 22px 14px; background: var(--note-bg, var(--secondary-tint)); color: var(--note-ink, var(--ink)); border-radius: 3px; box-shadow: 0 6px 4px -4px rgba(20,19,32,.1); }
.dk-side-note::before { content: ""; position: absolute; top: -12px; left: 50%; width: 96px; height: 26px; translate: -50% 0; background: color-mix(in srgb, var(--secondary) 45%, transparent); rotate: -2deg; }
.dk-side-note b { display: block; text-align: center; font-family: var(--font-hand); font-weight: 700; font-size: 26px; line-height: 1.1; margin-bottom: 10px; }
.dk-side-note p { margin: 0; font-size: 14px; line-height: 1.6; }
html[data-theme="dark"] body[data-dark-ready] .dk-side-note { background: var(--secondary-tint-light, #DEF6F1); color: #15141B; }
@media (max-width: 720px) {
  .dk-row--noted { display: flex; flex-direction: column; }
  .dk-row--noted .dk-row-main { display: contents; }
  .dk-row--noted .dk-row-h { order: 1; }
  .dk-side-note { order: 2; margin: 14px 0 22px; }
  .dk-row--noted .dk-track { order: 3; }
}

/* exam views (HSK / TOCFL / JLPT) on desktop: each row centred, covers larger (140px) so the longest rows fill
   the width and shorter ones sit balanced under them, instead of bunching to the left. Phones keep 4 to a row */
@media (min-width: 721px) {
  body:not(.mobile-view) .dk-row--flat .dk-row-h { text-align: center; }
  body:not(.mobile-view) .dk-row--flat .dk-track { grid-template-columns: repeat(auto-fit, 140px); justify-content: center; gap: 16px; }
}
.dk-side-note p + p { margin-top: 12px; }
/* exam views: the cover art fills its 140px card, so rows sit truly centred (it was capped at 112px, left-aligned) */
@media (min-width: 721px) { body:not(.mobile-view) .dk-row--flat .dk-cover { max-width: none; width: 100%; } }
/* HSK notes: text centred top-to-bottom in the note, so short notes do not leave an empty lower half */
.dk-side-note { display: flex; flex-direction: column; justify-content: center; }

/* ---------- Institutions form: reCAPTCHA and request status ---------- */
.inst-recaptcha { margin: 0 0 14px; }
.inst-status { font-size: 14px; line-height: 1.5; margin: 0 0 14px; color: var(--grey); }
.inst-status--error { color: #C8324B; }
.inst-status--success { color: var(--secondary-dark); font-weight: 500; }
html[data-theme="dark"] body[data-dark-ready] .inst-status--error { color: #FF8FA3; }
html[data-theme="dark"] body[data-dark-ready] .inst-status--success { color: var(--secondary); }
.inst-form--sent > :not(:last-child) { display: none; }
.inst-form--sent .inst-required-note, .inst-form--sent .inst-recaptcha, .inst-form--sent .inst-submit, .inst-form--sent .flow-fineprint { display: none; }


/* Cookie consent banner: a white card bottom-left with the reading critter peeking over it. Accept all and
   Reject all are the same size and style, so neither is the "easy" choice */
.cookie-banner { position: fixed; left: 20px; bottom: 20px; z-index: 120; width: min(440px, calc(100vw - 32px)); padding: 22px 22px 18px; background: #fff; color: var(--ink); border-radius: 20px; box-shadow: 0 18px 50px rgba(20,19,32,.18), 0 2px 8px rgba(20,19,32,.08); }
.cookie-banner[hidden] { display: none; }
.cookie-critter { position: absolute; top: -30px; right: 18px; width: 78px; height: auto; } /* top: the drawing itself sits half above, half below the card edge */
.cookie-title { margin: 0 0 6px; font-family: var(--font-hand); font-size: 28px; line-height: 1.1; font-weight: 700; color: var(--secondary); }
.cookie-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--grey); }
.cookie-text a { color: var(--tertiary); font-weight: 600; }
.cookie-prefs { display: grid; gap: 10px; margin: 14px 0 2px; }
.cookie-prefs[hidden] { display: none; }
.cookie-pref { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--grey); cursor: pointer; }
.cookie-pref b { display: block; color: var(--ink); font-size: 14px; }
.cookie-pref input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--tertiary); flex: none; }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cookie-btn { font: inherit; font-size: 15px; font-weight: 700; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--tertiary); color: #fff; cursor: pointer; }
.cookie-btn:hover { filter: brightness(1.08); }
.cookie-btn[hidden], .cookie-link[hidden] { display: none; }
.cookie-actions [data-cookie="save"] { grid-column: 1 / -1; }
.cookie-link { grid-column: 1 / -1; justify-self: center; font: inherit; font-size: 13.5px; font-weight: 600; background: none; border: 0; padding: 4px; color: var(--tertiary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-link:hover { color: var(--tertiary-dark, #4F25E0); }
html[data-theme="dark"] body[data-dark-ready] .cookie-link { color: var(--tertiary-text); }
@media (max-width: 520px) { .cookie-banner { left: 16px; bottom: 16px; } .cookie-critter { width: 64px; top: -26px; } }
html[data-theme="dark"] body[data-dark-ready] .cookie-banner { background: var(--surface-raised, #2A2836); box-shadow: 0 18px 50px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.06); }
html[data-theme="dark"] body[data-dark-ready] .cookie-title { color: var(--secondary); }
html[data-theme="dark"] body[data-dark-ready] .cookie-text a { color: var(--tertiary-text); }
/* Save my preferences: outlined, so it reads lighter than the two solid buttons above it */
.cookie-btn[data-cookie="save"] { background: #fff; color: var(--tertiary); box-shadow: inset 0 0 0 1.5px var(--tertiary); }
.cookie-btn[data-cookie="save"]:hover { filter: none; background: var(--tertiary-tint, #F1EEFF); }
html[data-theme="dark"] body[data-dark-ready] .cookie-btn[data-cookie="save"] { background: transparent; color: var(--tertiary-text); box-shadow: inset 0 0 0 1.5px var(--tertiary-text); }
