:root { --font-inter: 'Inter'; }
/* ═══════════════════════════════════════════════════════════
   ThinksGrid — Creative Learning Lab design system
   Tokens first; every component below reads from them.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Color */
  --cobalt: #254bff;
  --orange: #ff6b35;
  --lime: #e9f56b;
  --paper: #f5f3ed;
  --ink: #171717;
  --white: #ffffff;
  --ink-2: #333333;
  --ink-3: #444444;
  --ink-4: #555555;
  --line-soft: #d8d5cc;
  --on-ink-2: #c9c7c0;
  --error: #b42318;

  /* Type */
  --font-display: var(--font-inter), system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: var(--font-inter), system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: var(--font-inter), system-ui, sans-serif;

  /* Space + layout */
  --gutter: 28px;
  --max: 1360px;
  --header-h: 76px;
  --section-y: clamp(80px, 10vw, 128px);

  /* Shape */
  --line: 1.5px solid var(--ink);
  --radius: 0;
  --shadow-hard: 4px 4px 0 var(--ink);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-pop: cubic-bezier(0.2, 0.9, 0.3, 1.2);
  --dur-fast: 0.25s;
  --dur: 0.45s;
  --dur-slow: 0.8s;
}

/* ─── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cobalt); }
a:hover { color: var(--ink); }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.on-dark :focus-visible, .section-cobalt :focus-visible, .section-ink :focus-visible { outline-color: var(--lime); }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
button { font: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 12px 18px; background: var(--lime); color: var(--ink); border: var(--line); font-weight: 600; text-decoration: none; transition: top var(--dur-fast) var(--ease); }
.skip-link:focus { top: 12px; }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section-cobalt { background: var(--cobalt); color: var(--white); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-white { background: var(--white); }
.section-orange { background: var(--orange); color: var(--ink); }
.rule-top { border-top: var(--line); }
.rule-bottom { border-bottom: var(--line); }

/* ─── Type ─────────────────────────────────────────────── */
.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.display-hero { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.08; letter-spacing: -0.025em; }
.display-xl { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -0.025em; }
.display-l { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.12; letter-spacing: -0.02em; }
.display-m { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -0.02em; }
.display-s { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -0.015em; }
.title-l { font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 1.8vw, 22px); line-height: 1.3; letter-spacing: -0.01em; }
.title-m { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; }
.lede { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 560px; }
.on-dark .lede, .section-cobalt .lede, .section-ink .lede { color: inherit; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-size: 13px; }
.hl { background: var(--lime); padding: 0 0.12em; color: var(--ink); }
.c-cobalt { color: var(--cobalt); }
.outline-num { color: transparent; -webkit-text-stroke: 1px var(--ink); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }

/* ─── Buttons + links ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast), background-color var(--dur-fast), color var(--dur-fast);
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-hard); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn[disabled], .btn[aria-disabled='true'] { cursor: not-allowed; opacity: 0.7; transform: none; box-shadow: none; }
.btn-primary { background: var(--cobalt); color: var(--white); }
.btn-primary:hover { color: var(--white); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); transform: none; box-shadow: none; }
.btn-quiet-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-quiet-light:hover { background: var(--white); color: var(--cobalt); transform: none; box-shadow: none; }
.btn-block { width: 100%; justify-content: space-between; }
.arr { display: inline-block; transition: transform var(--dur-fast) var(--ease); }
.btn:hover .arr, .link-u:hover .arr, .row-link:hover .arr, .crow:hover .arr, .feat:hover .arr { transform: translateX(5px); }
.link-u { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.link-u:hover { color: inherit; }
.tag { display: inline-block; padding: 6px 10px; border: var(--line); font-size: 13px; line-height: 1.2; background: var(--white); color: var(--ink); }
.tag-lime { background: var(--lime); font-weight: 600; }
.tag-mono { font-family: var(--font-mono); font-size: 12px; background: var(--paper); }

/* ─── Header ───────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: var(--line); }
.site-header__bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__word { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav-link { position: relative; padding: 14px 12px; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; }
.nav-link::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current='page']::after { transform: scaleX(1); background: var(--cobalt); height: 3px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { min-height: 46px; padding: 0 18px; font-size: 15px; }
.header-account { font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; padding: 12px 6px; }
.burger { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; border: var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.mobile-menu { background: var(--cobalt); color: var(--white); border-top: var(--line); padding: 16px var(--gutter) 28px; display: flex; flex-direction: column; }
.mobile-menu a.mobile-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.4); color: var(--white); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; animation: rise 0.5s var(--ease) both; }
.mobile-menu a.mobile-item[aria-current='page'] { color: var(--lime); }
.mobile-menu a.mobile-item:nth-child(2) { animation-delay: 0.04s; }
.mobile-menu a.mobile-item:nth-child(3) { animation-delay: 0.08s; }
.mobile-menu a.mobile-item:nth-child(4) { animation-delay: 0.12s; }
.mobile-menu a.mobile-item:nth-child(5) { animation-delay: 0.16s; }
.mobile-menu a.mobile-item:nth-child(6) { animation-delay: 0.2s; }
.mobile-menu .btn { margin-top: 20px; }
@media (max-width: 960px) {
  .nav, .header-actions .desk-only { display: none; }
  .burger { display: inline-flex; }
}

/* ─── Footer ───────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--paper); overflow: hidden; }
.site-footer a { color: var(--paper); }
.footer-grid { padding-top: 80px; display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h2 { margin-bottom: 6px; color: var(--lime); }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; color: var(--paper); }
.footer-brand { flex: 1 1 320px; max-width: 420px; gap: 22px; }
.footer-brand p { color: var(--on-ink-2); }
.footer-bottom { margin-top: 64px; padding: 22px 0; border-top: 1px solid #3a3a3a; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--on-ink-2); }
.footer-word { margin: 0 0 -0.2em; padding: 0 20px; font-family: var(--font-display); font-weight: 700; font-size: clamp(44px, 9vw, 130px); line-height: 1; letter-spacing: -0.03em; color: var(--cobalt); white-space: nowrap; text-align: center; user-select: none; }

/* ─── Motion primitives ────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-16px) rotate(8deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-enter { animation: page-in 0.45s var(--ease) both; }
.in { animation: rise 0.9s var(--ease) both; }
.in-1 { animation-delay: 0.06s; } .in-2 { animation-delay: 0.14s; } .in-3 { animation-delay: 0.22s; } .in-4 { animation-delay: 0.3s; } .in-5 { animation-delay: 0.42s; }
.pop { animation: pop 0.9s var(--ease-pop) both; }
.float { animation: float 9s ease-in-out infinite; }
.spin { animation: spin 28s linear infinite; }

/* Scroll reveals — only hidden once JS confirms IntersectionObserver works. */
.js-reveal .rv { opacity: 0; transform: translateY(32px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.js-reveal .rv.is-in { opacity: 1; transform: none; }
.js-reveal .rv-clip { clip-path: inset(0 0 100% 0); transition: clip-path 1s cubic-bezier(0.7, 0, 0.2, 1); }
.js-reveal .rv-clip.is-in { clip-path: inset(0 0 0 0); }
.js-reveal .rv-shape { opacity: 0; transform: scale(0.6) rotate(-20deg); transition: opacity 0.9s var(--ease-pop), transform 0.9s var(--ease-pop); }
.js-reveal .rv-shape.is-in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s !important; } .d2 { transition-delay: 0.16s !important; } .d3 { transition-delay: 0.24s !important; } .d4 { transition-delay: 0.32s !important; }

/* Staggered list entrance (filters re-render without re-hiding content) */
.stagger > * { animation: rise 0.55s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: 0.05s; } .stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; } .stagger > *:nth-child(5) { animation-delay: 0.2s; } .stagger > *:nth-child(6) { animation-delay: 0.25s; }

/* ─── Thumbnails (geometric course / resource art) ─────── */
.thumb { border: var(--line); transition: transform 0.6s var(--ease); flex: none; }
.th-a { background: var(--cobalt); border-radius: 50% 50% 0 50%; }
.th-b { background: var(--orange); }
.th-c { background: var(--lime); border-radius: 50%; }
.th-d { background: var(--ink); border-radius: 0 100% 0 0; }
.th-e { background: var(--paper); background-image: repeating-linear-gradient(45deg, var(--ink) 0 1.5px, transparent 1.5px 10px); }
.th-f { background: var(--cobalt); border-radius: 0 0 100% 0; }
.row-link:hover .thumb, .feat:hover .thumb { transform: rotate(-8deg) scale(1.06); }

/* ─── Home: hero ───────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-bottom: var(--line); }
.hero__inner { padding-top: 72px; padding-bottom: 88px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero__copy { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.hero__title span.line { display: block; }
.hero__mark { position: relative; display: inline-block; padding: 0 0.08em; isolation: isolate; }
.hero__mark::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0.08em; height: 0.42em; background: var(--lime); z-index: -1; }
.hero__foot { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; }
.hero__foot .lede { flex: 1 1 300px; max-width: 440px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.hero__art { flex: 1 1 420px; min-width: 0; display: flex; justify-content: center; }
.art { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1 / 1; }
.art__layer { position: absolute; transition: transform 0.7s var(--ease); will-change: transform; }
.art__grid { inset: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); border-top: var(--line); border-left: var(--line); }
.art__grid > * { position: relative; overflow: hidden; border-right: var(--line); border-bottom: var(--line); }
.art__label { position: absolute; font-family: var(--font-mono); font-size: 12px; }
.marquee { background: var(--ink); color: var(--paper); overflow: hidden; padding: 16px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0; white-space: nowrap; }
.marquee__group { display: flex; gap: 40px; padding-right: 40px; align-items: center; }
.marquee__dot { width: 10px; height: 10px; }

/* ─── Home: sections ───────────────────────────────────── */
.split { display: flex; flex-wrap: wrap; gap: 64px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 48px; }
.section-head__copy { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.statement { font-family: var(--font-display); font-weight: 600; font-size: clamp(21px, 2.2vw, 28px); line-height: 1.4; letter-spacing: -0.01em; text-wrap: pretty; }
.abc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); border-top: var(--line); }
.abc li { padding: 24px 24px 0 0; display: flex; flex-direction: column; gap: 10px; }

.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.5); }
.crow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.5); color: var(--white); text-decoration: none; transition: color var(--dur-fast), padding 0.35s var(--ease); }
.crow:hover { color: var(--lime); padding-left: 14px; }
.crow__n { flex: 0 0 48px; font-family: var(--font-mono); font-size: 14px; }
.crow__t { flex: 1 1 420px; font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 1.8vw, 24px); letter-spacing: -0.01em; line-height: 1.3; }
.crow__d { flex: 0 1 300px; font-size: 15px; line-height: 1.5; }

.feature-box { display: flex; flex-wrap: wrap; border: var(--line); }
.feat { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; border-right: var(--line); }
.feat:hover { color: var(--ink); }
.feat__art { position: relative; height: 260px; background: var(--orange); border-bottom: var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.feat__body { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feat-side { flex: 2 1 360px; min-width: 0; display: flex; flex-direction: column; }
.feat-side .row-link { flex: 1; border-bottom: var(--line); }
.feat-side .row-link:last-child { border-bottom: 0; }
@media (max-width: 900px) { .feat { border-right: 0; border-bottom: var(--line); } }

.row-link { display: flex; gap: 20px; padding: 28px; color: var(--ink); text-decoration: none; transition: background-color 0.3s; }
.row-link:hover { background: var(--white); color: var(--ink); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; border-top: var(--line); }
.steps li:last-child { border-top: 3px solid var(--cobalt); }
.steps .outline-num { font-size: 44px; }
.steps li:last-child .outline-num { color: var(--cobalt); -webkit-text-stroke: 0; }

.magazine { display: flex; flex-wrap: wrap; gap: 48px; }
.mag-lead { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; color: var(--ink); text-decoration: none; }
.mag-lead:hover { color: var(--ink); }
.mag-lead:hover .mag-lead__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.mag-art { position: relative; aspect-ratio: 16 / 10; border: var(--line); overflow: hidden; }
.mag-art__inner { position: absolute; inset: 0; transition: transform 0.7s var(--ease); }
.mag-lead:hover .mag-art__inner { transform: scale(1.04) rotate(-2deg); }
.mag-list { flex: 2 1 340px; min-width: 0; list-style: none; margin: 0; padding: 0; border-top: var(--line); }
.mag-list li { border-bottom: var(--line); }
.mag-list .row-link { padding: 22px 8px; }

.benefits { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 40px 48px; }
.benefits > div { display: flex; flex-direction: column; gap: 12px; }
.benefits p { color: var(--on-ink-2); }

.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); border-top: var(--line); border-left: var(--line); }
.strip > div { padding: 36px 32px; border-right: var(--line); border-bottom: var(--line); display: flex; flex-direction: column; gap: 14px; }
.strip .price { font-family: var(--font-display); font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: -0.02em; }
.strip .price small { font-family: var(--font-body); font-size: 17px; font-weight: 500; letter-spacing: 0; }

.cta-orange { position: relative; overflow: hidden; }
.cta-orange .ring { position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border: 1.5px dashed var(--ink); border-radius: 50%; }
.cta-orange .quarter { position: absolute; right: 12%; bottom: 14%; width: 120px; height: 120px; background: var(--ink); border-radius: 0 100% 0 0; }

/* ─── Accordion (smooth height via grid rows) ──────────── */
.acc { border-top: var(--line); }
.acc__item { border-bottom: var(--line); }
.acc__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; background: transparent; border: 0; cursor: pointer; text-align: left; color: var(--ink); font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.acc__icon { flex: none; width: 40px; height: 40px; border: var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--font-body); font-size: 24px; font-weight: 400; line-height: 1; transition: transform 0.35s var(--ease), background-color var(--dur-fast); }
.acc__btn:hover .acc__icon { background: var(--lime); }
.acc__btn[aria-expanded='true'] .acc__icon { transform: rotate(45deg); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur) var(--ease); }
.acc__panel[data-open='true'] { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel p { padding: 0 64px 22px 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.acc--modules .acc__btn { padding: 24px 12px; gap: 24px; }
.acc--modules .acc__btn:hover { background: var(--white); }
.acc--modules .acc__panel p { padding: 0 76px 26px 60px; }

/* ─── Directory: search + tabs ─────────────────────────── */
.page-hero { position: relative; overflow: hidden; border-bottom: var(--line); }
.page-hero__inner { position: relative; padding-top: 72px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.filters { padding-top: 48px; display: flex; flex-direction: column; gap: 28px; }
.filters__row { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; }
.field-label { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.search { width: 100%; height: 64px; padding: 0; border: 0; border-bottom: 2px solid currentColor; background: transparent; color: inherit; font-family: var(--font-body); font-weight: 500; font-size: 20px; letter-spacing: 0; border-radius: 0; transition: border-color var(--dur-fast); }
.search::placeholder { color: #8a877e; }
.search:focus { outline: none; border-bottom-color: var(--cobalt); }
.on-dark .search:focus { border-bottom-color: var(--lime); }
.select { height: 56px; padding: 0 12px; border: var(--line); border-radius: 0; background: var(--white); color: var(--ink); font-size: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; border-bottom: var(--line); }
.on-dark .tabs { border-bottom-color: #555555; }
.tab { position: relative; min-height: 48px; padding: 0; background: transparent; border: 0; cursor: pointer; font-size: 16px; font-weight: 600; color: inherit; transition: color var(--dur-fast); }
.tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 3px; background: var(--cobalt); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.tab:hover::after { transform: scaleX(0.4); }
.tab[aria-pressed='true'] { color: var(--cobalt); }
.tab[aria-pressed='true']::after { transform: scaleX(1); }
.on-dark .tab::after { background: var(--lime); }
.on-dark .tab[aria-pressed='true'] { color: var(--lime); }
.dir { list-style: none; margin: 0; padding: 0; border-top: var(--line); }
.dir li { border-bottom: var(--line); }
.dir .row-link { flex-wrap: wrap; align-items: center; gap: 20px 36px; padding: 28px 16px; }
.dir__main { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dir__meta { flex: 0 1 260px; display: flex; flex-wrap: wrap; gap: 8px; }
.empty { padding: 72px 24px; border: 1.5px dashed var(--ink); display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

/* ─── Course detail ────────────────────────────────────── */
.course-hero { display: flex; flex-wrap: wrap; border-bottom: var(--line); }
.course-hero__main { flex: 3 1 620px; min-width: 0; position: relative; overflow: hidden; padding: 40px var(--gutter) 64px; display: flex; flex-direction: column; gap: 28px; border-right: var(--line); }
.course-hero__meta { flex: 1 1 320px; min-width: 0; margin: 0; display: flex; flex-direction: column; }
.course-hero__meta > div { flex: 1; padding: 28px; border-bottom: var(--line); display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.course-hero__meta > div:last-child { border-bottom: 0; }
.course-hero__meta dd { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
@media (max-width: 960px) { .course-hero__main { border-right: 0; border-bottom: var(--line); } }
.crumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 13px; }
.crumbs a { color: inherit; }
.with-aside { padding-top: 96px; padding-bottom: 112px; display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.with-aside__main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 96px; }
.aside { flex: 1 1 320px; min-width: 0; position: sticky; top: calc(var(--header-h) + 24px); border: var(--line); background: var(--white); box-shadow: 8px 8px 0 var(--ink); }
@media (max-width: 960px) { .aside { position: static; } }
.aside__bar { padding: 14px 24px; background: var(--ink); color: var(--lime); }
.aside__body { padding: 28px 24px; display: flex; flex-direction: column; gap: 20px; }
.objectives { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px 40px; }
.objectives li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; line-height: 1.6; }
.objectives b { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--cobalt); }
.bullets { list-style: none; margin: 0; padding: 18px 0 0; border-top: var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.bullets li { display: flex; gap: 10px; align-items: center; }
.bullets li::before { content: ''; width: 10px; height: 10px; background: var(--orange); flex: none; }
.placeholder-box { padding: 28px; border: 1.5px dashed var(--ink); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }

/* ─── Learn (lesson) view ──────────────────────────────── */
.lesson { border: var(--line); background: var(--white); }
.lesson + .lesson { margin-top: -1.5px; }
.lesson__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: var(--line); }
.lesson__body { padding: 24px; display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.progress-bar { height: 12px; border: var(--line); background: var(--white); }
.progress-bar > span { display: block; height: 100%; background: var(--cobalt); transition: width 0.6s var(--ease); }

/* ─── Article ──────────────────────────────────────────── */
.prose { max-width: 720px; margin: 0 auto; padding: 80px var(--gutter) 96px; display: flex; flex-direction: column; gap: 24px; font-size: 17px; line-height: 1.75; color: #222222; }
.prose h2 { margin-top: 20px; font-family: var(--font-display); font-weight: 700; font-size: 23px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose blockquote { margin: 20px 0; padding: 28px 0; border-top: var(--line); border-bottom: var(--line); font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.4; letter-spacing: -0.01em; color: var(--ink); }
.prose > p:first-child::first-letter { float: left; margin: 4px 10px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 48px; line-height: 0.85; color: var(--cobalt); }

/* ─── Pricing ──────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); border-top: var(--line); border-left: var(--line); }
.plan { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 36px 32px 40px; border: 0; border-right: var(--line); border-bottom: var(--line); background: var(--paper); text-align: left; cursor: pointer; color: var(--ink); transition: background-color var(--dur) var(--ease); }
.plan:hover { background: var(--white); }
.plan[aria-checked='true'] { background: var(--lime); }
.plan__radio { width: 22px; height: 22px; border-radius: 50%; border: var(--line); transition: background-color 0.3s, box-shadow 0.3s; }
.plan[aria-checked='true'] .plan__radio { background: var(--ink); box-shadow: inset 0 0 0 5px var(--lime); }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; transition: transform var(--dur) var(--ease-pop); }
.plan[aria-checked='true'] .plan__price { transform: translateX(6px); }
.plan__amount { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 3.4vw, 44px); line-height: 1; letter-spacing: -0.02em; }
.plan__features { display: flex; flex-direction: column; gap: 12px; padding: 20px 0 0; margin: 0; list-style: none; border-top: var(--line); }
.plan__features li { display: flex; gap: 12px; font-size: 16px; line-height: 1.45; }
.plan__features li::before { content: ''; flex: none; margin-top: 7px; width: 9px; height: 9px; background: var(--ink); }
.summary-bar { border: var(--line); border-top: 0; background: var(--ink); color: var(--paper); }
.summary-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 24px 28px; }
.compare { overflow-x: auto; border: var(--line); background: var(--white); }
.compare table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { padding: 18px 22px; text-align: left; }
.compare thead tr { border-bottom: var(--line); }
.compare tbody tr + tr { border-top: 1px solid var(--line-soft); }
.compare .hl-col { background: #f8fbd6; }
.compare thead .hl-col { background: var(--lime); }
.terms { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); border-top: 1px solid rgba(255, 255, 255, 0.6); }
.terms > div { padding: 28px 28px 28px 0; display: flex; flex-direction: column; gap: 10px; }
.terms dt { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.terms dd { margin: 0; font-size: 16px; line-height: 1.6; }
.notice { display: flex; gap: 14px; padding: 18px 20px; border: var(--line); font-size: 16px; line-height: 1.55; }
.notice--lime { background: var(--lime); color: var(--ink); }
.notice--white { background: var(--white); color: var(--ink); }
.notice--error { background: #fde8e6; color: var(--ink); border-color: var(--error); }

/* ─── Contact ──────────────────────────────────────────── */
.contact-split { display: flex; flex-wrap: wrap; border-top: var(--line); border-bottom: var(--line); }
.contact-card { flex: 1 1 440px; min-width: 0; position: relative; overflow: hidden; padding: 56px var(--gutter) 64px; display: flex; flex-direction: column; gap: 48px; border-right: var(--line); }
@media (max-width: 960px) { .contact-card { border-right: 0; border-bottom: var(--line); } }
.contact-card address { font-style: normal; font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2vw, 26px); line-height: 1.35; letter-spacing: -0.01em; }
.contact-card .big-mail { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.8vw, 22px); letter-spacing: -0.01em; color: var(--white); text-decoration-thickness: 2px; text-underline-offset: 6px; word-break: break-word; }
.contact-form-wrap { flex: 1.3 1 520px; min-width: 0; padding: 56px var(--gutter) 64px; }
.form { max-width: 640px; display: flex; flex-direction: column; gap: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field textarea { width: 100%; padding: 12px 4px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font-family: inherit; font-size: 18px; transition: border-color var(--dur-fast), background-color var(--dur-fast); }
.field input { height: 52px; }
.field textarea { line-height: 1.6; resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--cobalt); background: var(--white); }
.field [aria-invalid='true'] { border-bottom-color: var(--error); }
.field-error { min-height: 20px; font-size: 14px; color: var(--error); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.dots { display: inline-flex; gap: 4px; }
.dots span { width: 8px; height: 8px; background: currentColor; animation: blink 1s ease-in-out infinite; }
.dots span:nth-child(2) { animation-delay: 0.15s; } .dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 50% { opacity: 0.2; } }
.map-frame { position: relative; height: 460px; border: var(--line); overflow: hidden; background: var(--white); }
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.25) contrast(1.05); }
.map-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; background-image: linear-gradient(#e4e1d8 1.5px, transparent 1.5px), linear-gradient(90deg, #e4e1d8 1.5px, transparent 1.5px); background-size: 80px 80px; }

/* ─── Legal ────────────────────────────────────────────── */
.legal { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 36px; font-size: 16px; line-height: 1.75; color: #222222; }
.legal section { display: flex; flex-direction: column; gap: 14px; padding-top: 36px; border-top: var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.legal h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.ph { background: var(--lime); padding: 1px 6px; border: 1px dashed var(--ink); }
.toc { flex: 1 1 260px; min-width: 0; position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; border-top: var(--line); }
@media (max-width: 960px) { .toc { position: static; } }
.toc a { padding: 10px 8px; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; transition: background-color 0.2s; }
.toc a:hover { background: var(--white); }

/* ─── Cookie notice ────────────────────────────────────── */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; padding: 20px 22px; background: var(--white); color: var(--ink); border: var(--line); box-shadow: 6px 6px 0 var(--ink); display: flex; flex-direction: column; gap: 14px; animation: rise 0.5s var(--ease) both; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie .btn { min-height: 46px; padding: 0 18px; font-size: 15px; }

/* ─── Account + auth ───────────────────────────────────── */
.panel { border: var(--line); background: var(--white); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.panel--danger { border-color: var(--error); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: var(--line); font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; }
.status-pill::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-4); }
.status-pill[data-state='active']::before { background: #1f9d55; }
.status-pill[data-state='warning']::before { background: var(--orange); }

/* ─── 404 ──────────────────────────────────────────────── */
@keyframes roll { 0%, 20% { transform: rotate(0); } 50%, 70% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes escape { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(26px, -30px) rotate(14deg); } }
@keyframes dash-blink { 50% { border-color: transparent; } }
.nf-zero { display: inline-block; width: 0.72em; height: 0.72em; margin: 0 0.04em; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); background-image: linear-gradient(90deg, transparent 50%, var(--ink) 50%); animation: roll 6s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
.nf-grid { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1 / 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); border-top: var(--line); border-left: var(--line); }
.nf-grid > span { border-right: var(--line); border-bottom: var(--line); }
.nf-grid .nf-hole { margin: 10px; border: 2px dashed var(--ink); animation: dash-blink 2.2s ease-in-out infinite; }
.nf-grid .nf-escape { position: absolute; right: -16%; top: -16%; width: 30%; height: 30%; background: var(--lime); border: var(--line); box-shadow: 6px 6px 0 var(--ink); animation: escape 5s ease-in-out infinite; }

/* ─── Responsive tweaks ────────────────────────────────── */
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .acc__panel p { padding-right: 0; }
  .acc--modules .acc__panel p { padding: 0 12px 22px; }
  .row-link { padding: 22px 16px; }
}

/* ─── Reduced motion: everything usable, nothing moving ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-reveal .rv, .js-reveal .rv-clip, .js-reveal .rv-shape { opacity: 1; transform: none; clip-path: none; }
}

/* static build extras */
.is-hidden { display: none !important; }
.cookie[hidden] { display: none; }
.mobile-menu[hidden] { display: none !important; }
@media (min-width: 961px) { .mobile-menu { display: none !important; } }
