:root {
  color-scheme: light;
  /* Neutral base — system-like, subdued */
  --bg: #f6f6f4;
  --bg-alt: #efeeea;
  --surface: #ffffff;
  --ink: #1b1b1d;
  --ink-soft: #5c5c63;
  --ink-faint: #8a8a92;
  --line: #e3e2dd;

  /* Accents */
  --blue: #2f6bff;
  --blue-soft: #e7eeff;
  --orange: #ff7a1a;
  --orange-soft: #ffeede;

  /* Theme-able surfaces */
  --nav-bg: rgba(246, 246, 244, .8);
  --mock-screen: #fafaf9;
  --mock-card: #ffffff;
  --mock-cardline: #dcdbd6;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 12px 32px rgba(20, 20, 30, .06);
  --maxw: 1120px;
  --page-gutter: clamp(20px, 4vw, 32px);
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font: "Inter", "Noto Sans KR", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Language-specific font priority (CJK glyph disambiguation) */
html[lang="ja"] { --font: "Inter", "Noto Sans JP", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
html[lang="en"] { --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131316;
  --bg-alt: #1a1a1e;
  --surface: #1f1f24;
  --ink: #f1f1ef;
  --ink-soft: #a8a8b1;
  --ink-faint: #74747d;
  --line: #2e2e35;

  --blue: #5a8bff;
  --blue-soft: #1c2742;
  --orange: #ff944d;
  --orange-soft: #3a2a1a;

  --nav-bg: rgba(19, 19, 22, .72);
  --mock-screen: #161619;
  --mock-card: #26262c;
  --mock-cardline: #3a3a42;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s var(--ease), color .3s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(var(--page-gutter), env(safe-area-inset-left));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right));
}
.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;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
}
.btn--lg { padding: 14px 28px; font-size: 1.02rem; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(47, 107, 255, .28); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(47, 107, 255, .34); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-faint); transform: translateY(-2px); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.accent--blue { color: var(--blue); }
.accent--orange { color: var(--orange); }

:where(
  .hero__title,
  .section__title,
  .feature__title,
  .cta__title,
  .contact-page__header h1,
  .docs__title,
  .doc-header h1,
  .doc-article h2,
  .learn-landing__title,
  .learn-cases__head h2
) {
  text-wrap: balance;
  overflow-wrap: break-word;
}

:where(
  .section__sub,
  .feature__body,
  .cta__sub,
  .contact-page__header p,
  .docs__sub,
  .doc-header p,
  .doc-article p,
  .learn-landing__lead,
  .learn-case-card p
) {
  text-wrap: pretty;
}

html[lang="ko"] :where(
  .hero__title,
  .section__title,
  .feature__title,
  .cta__title,
  .contact-page__header h1,
  .docs__title,
  .doc-header h1,
  .doc-article h2,
  .learn-landing__title,
  .learn-cases__head h2,
  .section__sub,
  .feature__body,
  .contact-page__header p,
  .docs__sub,
  .doc-header p,
  .learn-landing__lead,
  .learn-case-card p
) {
  word-break: keep-all;
  overflow-wrap: break-word;
}

html[lang="ja"] :where(
  .hero__title,
  .section__title,
  .feature__title,
  .cta__title,
  .contact-page__header h1,
  .docs__title,
  .doc-header h1,
  .doc-article h2,
  .learn-landing__title,
  .learn-cases__head h2
) {
  line-break: strict;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__logo { height: 26px; width: auto; display: block; }
.brand__logo--app-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, .14);
}
.brand__name { font-weight: 700; font-size: 1.18rem; letter-spacing: 0; }

.nav__links { display: flex; gap: clamp(18px, 2.4vw, 28px); }
.nav__links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .96rem; transition: color .15s; }
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s var(--ease); }

.nav__actions { display: flex; align-items: center; gap: 12px; }
.lang-select {
  font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--ink-soft); background-color: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 30px 7px 12px; cursor: pointer; flex: none;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238a8a92' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 10px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.lang-select:hover { color: var(--ink); border-color: var(--ink-faint); }
.lang-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.lang-select option { color: #1b1b1d; background: #fff; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-soft); cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- Hero (stacked: text over app showcase) ---------- */
.hero { padding: 44px 0 72px; overflow: hidden; }
.hero__top { max-width: 720px; margin: 0 auto; text-align: center; }
.hero__title { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.12; font-weight: 800; letter-spacing: 0; margin-bottom: 24px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero__note { margin: clamp(36px, 4vw, 52px) 0 0; font-size: .88rem; color: var(--ink-faint); display: flex; justify-content: center; align-items: center; gap: 8px; }
.apple-glyph { width: 15px; height: 15px; fill: var(--ink-soft); flex: none; }

.hero__showcase { position: relative; margin-top: 30px; }
.hero__showcase::before {
  content: ""; position: absolute; inset: -4% 6% 8%;
  background: radial-gradient(58% 60% at 50% 38%, rgba(47,107,255,.28), rgba(255,122,26,.16) 46%, transparent 72%);
  filter: blur(46px); z-index: -1;
}
.hero__showcase-stage { position: relative; }
.appframe {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(15, 18, 30, .28);
  background: #0b0b0e;
}
/* Frame ratio = iPad capture minus the top OS status bar, so cover crops only that bar. */
.appframe__screen {
  position: relative; width: 100%; aspect-ratio: 2388 / 1612;
  background-color: #0b0b0e;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 26px 26px;
}
.appframe__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; display: block; }

.hero__phone {
  position: absolute;
  right: clamp(-22px, -1.6vw, -10px);
  bottom: clamp(-48px, -4vw, -22px);
  z-index: 2;
  width: min(clamp(116px, 28%, 238px), calc(100vw - 24px));
  aspect-ratio: 750 / 1334;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 34px;
  background: #09090b;
  box-shadow: 0 28px 54px rgba(0, 0, 0, .42), 0 0 0 1px rgba(0,0,0,.35);
  transform: rotate(1deg);
}
.hero__phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 27px;
}

@media (max-width: 1200px) {
  .hero__phone {
    right: max(12px, env(safe-area-inset-right));
    bottom: clamp(-32px, -3vw, -14px);
  }
}

@media (max-width: 900px) {
  .hero { padding: 32px 0 56px; }
  .hero__showcase { margin-top: 24px; }
}

@media (max-width: 640px) {
  .hero__showcase { padding-bottom: 8px; }
}

/* ---------- Generic section ---------- */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section__title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: 0; line-height: 1.18; }
.section__sub { margin-top: 14px; font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Journey / how it works ---------- */
.journey__flow { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; }
.jstep { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.jstep__num { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .9rem; flex: none; }
.jstep__num--blue { background: var(--blue); }
.jstep__num--orange { background: var(--orange); }
.jstep__icon { width: 64px; height: 56px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.jstep__icon--blue { color: var(--blue); }
.jstep__icon--orange { color: var(--orange); }
.jstep__icon circle { fill: currentColor; stroke: none; }
.jstep__icon .ly, .jstep__icon .bk { fill: none; stroke: currentColor; }
.jstep__title { font-size: 1.06rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.jstep__desc { font-size: .9rem; color: var(--ink-soft); max-width: 22ch; }
.jarrow { flex: none; align-self: center; margin-top: 42px; color: var(--ink-faint); font-size: 1.25rem; }

@media (max-width: 880px) {
  .journey__flow { flex-direction: column; align-items: center; gap: 4px; }
  .jstep { flex: none; width: 100%; max-width: 360px; padding: 6px 0; }
  .jstep__desc { max-width: 34ch; }
  .jarrow { margin-top: 0; transform: rotate(90deg); }
}

/* ---------- Feature (copy + visual) ---------- */
.feature { padding: 76px 0; }
.feature--alt { background: var(--bg-alt); }
.feature__inner { display: grid; grid-template-columns: 1fr 1.08fr; gap: 60px; align-items: center; }
.feature--reverse .feature__copy { order: 2; }
.feature__title { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 800; letter-spacing: 0; line-height: 1.2; margin-bottom: 16px; }
.feature__body { font-size: 1.12rem; color: var(--ink-soft); max-width: 42ch; }

/* ---------- Mock screen frame ---------- */
.mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mock__bar { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.mock__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock__screen {
  padding: 22px;
  background-color: var(--mock-screen);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
}
.mock__svg { width: 100%; height: auto; display: block; }

/* mock SVG primitives */
.wrap { fill: rgba(47, 107, 255, .05); stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .6; }
.conn { fill: none; stroke: var(--ink-faint); stroke-width: 2; }
.ccard rect { fill: var(--mock-card); stroke: var(--line); stroke-width: 1.5; }
.ccard line { stroke: var(--mock-cardline); stroke-width: 4; stroke-linecap: round; }
.ccard--blue rect { stroke: var(--blue); }
.ccard--orange rect { stroke: var(--orange); }
.scribble { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; opacity: .8; }
.scribble--orange { stroke: var(--orange); }
.pen { fill: var(--ink); }
.orbit { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 5; }
.lineage { stroke: var(--ink-faint); stroke-width: 1.5; opacity: .5; }
.onode--core { fill: var(--ink); }
.onode--blue { fill: var(--blue); }
.onode--orange { fill: var(--orange); }

/* Version rows */
.mock__screen--rows { display: flex; flex-direction: column; gap: 18px; justify-content: center; min-height: 240px; }
.vrow { display: flex; align-items: center; gap: 14px; }
.vlabel { width: 36px; font-size: .8rem; font-weight: 700; color: var(--ink-faint); flex: none; }
.vcard {
  display: inline-flex; align-items: center; justify-content: center;
  width: 78px; height: 44px; border-radius: 9px;
  background: var(--mock-card); border: 1.5px solid var(--line);
  font-size: .72rem; font-weight: 600; color: var(--ink-soft);
}
.vcard--sm { width: 56px; height: 26px; }
.vcard--new { border-style: dashed; border-color: var(--blue); color: var(--blue); }
.vcard--blue { border-color: var(--blue); color: var(--blue); }
.vcard--orange { border-color: var(--orange); }
.vstack { display: inline-flex; flex-direction: column; gap: 6px; }
.varrow { font-size: 1.3rem; color: var(--ink-faint); }
.varrow--blue { color: var(--blue); }
.varrow--orange { color: var(--orange); }

/* ---------- Chips (version relationship types) ---------- */
.chips { list-style: none; display: grid; gap: 10px; margin-top: 24px; }
.chip {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-soft); font-size: .98rem;
}
.chip b { font-size: .95rem; font-weight: 700; color: var(--ink); letter-spacing: .03em; flex: none; }
.chip--blue b { color: var(--blue); }
.chip--orange b { color: var(--orange); }

/* ---------- Cards (audience) ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(20,20,30,.05), 0 18px 40px rgba(20,20,30,.1); }
.card__title { font-size: 1.18rem; font-weight: 700; margin-bottom: 10px; }
.card__body { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Guide CTA band ---------- */
.guidecta__inner { max-width: 640px; margin: 0 auto; text-align: center; }
.guidecta__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.guidecta__btn { gap: 8px; }

/* ---------- CTA ---------- */
.cta {
  padding: 88px 0 72px;
  background: #080808;
}
.cta__inner {
  text-align: center;
  max-width: 760px;
  color: #fff;
}
.cta__app-icon {
  display: block;
  width: 100px;
  height: 100px;
  margin: 0 auto 26px;
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(0,0,0,.35);
}
.cta__title {
  font-size: clamp(2.15rem, 4.2vw, 3.05rem);
  font-weight: 800;
  line-height: 1.08;
}
.cta__sub {
  color: rgba(255,255,255,.66);
  margin-top: 22px;
  font-size: clamp(1rem, 2vw, 1.24rem);
}
.cta__sub a {
  color: #0a84ff;
  text-decoration: none;
}
.cta__sub a:hover { text-decoration: underline; }
.cta__buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  height: 34px;
  margin-top: 26px;
  padding: 0 18px;
  border-radius: 999px;
  background: #007aff;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.cta__buy:hover {
  background: #0a84ff;
  box-shadow: 0 12px 28px rgba(0,122,255,.28);
  transform: translateY(-1px);
}

/* ---------- Contact ---------- */
.contact-page {
  min-height: calc(100vh - 64px);
}
.contact-page__inner {
  max-width: 820px;
  display: grid;
  gap: 28px;
}
.contact-page__header h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}
.contact-page__header p {
  max-width: 60ch;
  margin: 18px 0 28px;
  color: var(--ink-soft);
  font-size: clamp(1.04rem, 2vw, 1.2rem);
}
.contact-page__note {
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.footer { padding: 52px 0 32px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer__copy { color: var(--ink-soft); font-size: .96rem; margin-top: 12px; }
.footer__connect { display: flex; align-items: center; }
.socials { list-style: none; display: flex; gap: 10px; }
.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink-soft);
  transition: transform .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.social svg { width: 19px; height: 19px; }
.social:hover { transform: translateY(-2px); color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.footer__bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__legal { color: var(--ink-faint); font-size: .9rem; }
.footer__links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer__links a {
  color: var(--ink-soft);
  font-size: .9rem;
  text-decoration: none;
}
.footer__links a:hover { color: var(--blue); }

/* ---------- Docs / guide pages ---------- */
.docs { background: var(--bg); overflow-x: clip; }
.docs__hero { padding: 72px 0 28px; border-bottom: 1px solid var(--line); }
.docs__title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: 0; line-height: 1.12; }
.docs__sub { margin-top: 14px; color: var(--ink-soft); font-size: 1.12rem; max-width: 68ch; }

.docs__layout {
  display: grid;
  gap: 40px;
  align-items: start;
  min-width: 0;
  padding-top: 40px;
  padding-bottom: 96px;
}
.docs__layout--home { grid-template-columns: 240px minmax(0, 1fr); }
.docs__layout--article {
  max-width: 1240px;
  grid-template-columns: 220px minmax(0, 760px) 180px;
  justify-content: center;
}

.docs-sidebar, .doc-outline { position: sticky; top: 84px; align-self: start; min-width: 0; }
.docs-nav { display: grid; gap: 12px; }
.docs-nav__group {
  display: grid;
  gap: 2px;
  border-radius: 8px;
}
.docs-nav__label, .doc-outline__label {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 8px;
}
.docs-nav summary.docs-nav__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
  padding: 7px 8px;
  margin: 0;
  user-select: none;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.docs-nav__home {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 7px 8px;
}
.docs-nav__home[aria-current="page"] {
  color: var(--ink);
  background: var(--blue-soft);
  border-left-color: var(--blue);
}
.docs-nav summary.docs-nav__label::-webkit-details-marker { display: none; }
.docs-nav summary.docs-nav__label::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s var(--ease);
}
.docs-nav__group[open] > summary.docs-nav__label {
  color: var(--ink);
  background: var(--bg-alt);
}
.docs-nav__group[open] > summary.docs-nav__label::after {
  transform: rotate(-135deg) translateY(-1px);
}
.docs-nav__group > a:first-of-type { margin-top: 6px; }
.docs-nav a, .doc-outline a {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .94rem;
  line-height: 1.35;
  border-radius: 8px;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.docs-nav a { padding: 8px 10px; border-left: 2px solid transparent; }
.doc-outline a { padding: 6px 0; font-size: .88rem; }
.docs-nav a:hover, .doc-outline a:hover { color: var(--ink); }
.docs-nav a:hover { background: var(--bg-alt); border-left-color: var(--blue); }
.docs-nav a[aria-current="page"] { color: var(--ink); background: var(--blue-soft); border-left-color: var(--blue); font-weight: 700; }
.docs-toc-toggle,
.docs-toc-overlay,
.docs-sidebar__header {
  display: none;
}

.docs-home { min-width: 0; display: grid; gap: 28px; }
.docs-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.docs-panel__kicker, .doc-card__label, .doc-category {
  display: inline-block;
  color: var(--blue);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.docs-panel h2 { font-size: 1.5rem; line-height: 1.2; margin-bottom: 18px; }
.docs-path { counter-reset: docpath; list-style: none; display: grid; gap: 14px; margin-top: 18px; }
.docs-path li { position: relative; padding-left: 44px; color: var(--ink-soft); }
.docs-path li::before {
  counter-increment: docpath;
  content: counter(docpath);
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
}
.docs-path a { color: var(--ink); text-decoration: none; font-weight: 700; }
.docs-path a:hover { color: var(--blue); }
.docs-path span { display: block; margin-top: 2px; }
.docs-path strong { display: block; color: var(--ink); margin-bottom: 2px; }

.docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.doc-card {
  display: block;
  min-height: 168px;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.doc-card:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 14px 34px rgba(20,20,30,.08); }
.doc-card h2, .doc-card h3 { font-size: 1.16rem; line-height: 1.25; margin-bottom: 10px; }
.doc-card p { color: var(--ink-soft); font-size: .96rem; }

.handbook-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.handbook-chapter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.handbook-chapter__label {
  display: inline-block;
  color: var(--ink-faint);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.handbook-chapter h3 { font-size: 1.12rem; line-height: 1.25; margin-bottom: 12px; }
.handbook-chapter p { color: var(--ink-soft); font-size: .96rem; max-width: 62ch; }
.handbook-chapter ul { list-style: none; display: grid; gap: 8px; }
.handbook-chapter a { color: var(--ink-soft); text-decoration: none; }
.handbook-chapter a:hover { color: var(--blue); text-decoration: none; }
.handbook-chapter--contact {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.doc-article .handbook-chapter__cta { flex: none; color: #fff; }
.doc-article .handbook-chapter__cta:hover { color: #fff; text-decoration: none; }

.docs-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--ink-faint); font-size: .88rem; margin-bottom: 28px; }
.docs-breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.docs-breadcrumb a:hover { color: var(--blue); }
.doc-header { padding-bottom: 34px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.doc-header h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: 0; line-height: 1.12; }
.doc-header p { margin-top: 16px; color: var(--ink-soft); font-size: 1.14rem; max-width: 66ch; }

.doc-article { min-width: 0; }
.doc-article section { scroll-margin-top: 90px; padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.doc-article section:last-of-type:not(:has(> h2)) { border-bottom: none; margin-bottom: 0; }
.doc-article section:has(> h2):has(+ section:has(> h3):not(:has(> h2))) {
  border-bottom: none;
  padding-bottom: 12px;
  margin-bottom: 6px;
}
.doc-article section:has(> h3):not(:has(> h2)) {
  border-bottom: none;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.doc-article section:has(> h3):not(:has(> h2)):has(+ section > h2) {
  border-bottom: none;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.doc-article section:has(> h3):not(:has(> h2)) + section:has(> h2) {
  border-top: 1px solid var(--line);
  padding-top: 34px;
}
.doc-article section:has(> h3):not(:has(> h2)):last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}
.doc-article .handbook-map > .handbook-chapter {
  padding: 22px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}
.doc-article h2 { font-size: clamp(1.35rem, 2.3vw, 1.8rem); font-weight: 800; letter-spacing: 0; line-height: 1.22; margin-bottom: 12px; }
.doc-article h3 { font-size: 1.08rem; line-height: 1.35; margin: 18px 0 6px; }
.doc-article p { color: var(--ink-soft); font-size: 1.04rem; max-width: 68ch; overflow-wrap: break-word; }
.doc-article a { color: var(--blue); text-decoration: none; }
.doc-article a:hover { text-decoration: underline; }
.doc-shortcut-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.doc-shortcut {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 6px;
  align-items: center;
  padding: 16px 0;
}
.doc-shortcut h3 {
  flex: 0 0 auto;
  margin: 0;
}
.doc-shortcut p:not(.doc-shortcut__keys) {
  flex: 0 0 100%;
  margin: 0;
}
.doc-shortcut .doc-shortcut__keys {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--ink-faint) !important;
  font-size: .9rem !important;
  white-space: nowrap;
}
.doc-shortcut kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8em;
  min-height: 1.8em;
  padding: 0 .55em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .88em;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -1px 0 rgba(20, 20, 30, .08);
}
@media (max-width: 640px) {
  .doc-shortcut {
    column-gap: 10px;
  }
}
.doc-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55em;
  height: 1.55em;
  padding: 0;
  margin: 0 .12em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: .9em;
  line-height: 1;
  overflow: hidden;
  vertical-align: -0.12em;
}
.doc-inline-icon__svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doc-inline-icon__svg [data-fill="icon"] {
  fill: currentColor;
  stroke: none;
}
.doc-inline-icon__svg [data-knockout="icon"] {
  stroke: var(--surface);
}
.doc-image-slot {
  margin-top: 18px;
  border: 1px dashed var(--ink-faint);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47,107,255,.06), transparent 40%),
    var(--surface);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.doc-image-slot__inner { text-align: center; max-width: 420px; }
.doc-image-slot__label {
  display: inline-block;
  color: var(--ink-faint);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.doc-image-slot strong { display: block; color: var(--ink); font-size: 1rem; }
.doc-image-slot p { margin-top: 6px; font-size: .92rem; color: var(--ink-faint); }
.doc-image-slot--loaded {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-style: solid;
  border-color: var(--line);
  background: var(--surface);
}
.doc-image-slot--loaded .doc-image-slot__inner { display: none; }
.doc-image-slot__image {
  display: block;
  width: 100%;
  height: auto;
}

/* Memo thumbnails keep their compact source width for legibility. */
.doc-image-slot--loaded[data-screenshot-id^="memos-"][data-screenshot-id$="-thumbnail"] {
  display: flex;
  min-height: 220px;
  padding: 24px;
  overflow: hidden;
}
.doc-image-slot--loaded[data-screenshot-id^="memos-"][data-screenshot-id$="-thumbnail"] .doc-image-slot__image {
  width: min(256px, 100%);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.doc-steps { counter-reset: docstep; list-style: none; display: grid; gap: 12px; margin-top: 18px; }
.doc-steps li {
  position: relative;
  padding: 4px 0 4px 44px;
  color: var(--ink);
  line-height: 1.6;
}
.doc-steps li::before {
  counter-increment: docstep;
  content: counter(docstep);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
}
.doc-list { margin: 16px 0 0 22px; color: var(--ink); }
.doc-list li { margin: 8px 0; padding-left: 4px; }
.doc-callout {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
}
.doc-callout strong { display: block; color: var(--ink); margin-bottom: 6px; }
.doc-callout p { font-size: .98rem; color: var(--ink-soft); }
.lesson-template { display: grid; gap: 14px; margin-top: 18px; }
.lesson-template__item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.lesson-template__item strong { display: block; color: var(--ink); margin-bottom: 6px; }
.lesson-template__item p { font-size: .98rem; }

.doc-next { margin-top: 36px; }
.doc-next a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.doc-next a:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 12px 28px rgba(20,20,30,.08); text-decoration: none; }
.doc-next span { color: var(--ink-faint); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.doc-next strong { font-size: 1.12rem; }

/* ---------- Legal / beta notice ---------- */
.legal-page { background: var(--bg); }
.legal-page__inner {
  max-width: 780px;
  padding-top: 48px;
  padding-bottom: 96px;
}
.legal-article { min-width: 0; }
.legal-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.legal-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}
.legal-header p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 72ch;
}
.legal-header__meta {
  color: var(--ink-faint) !important;
  font-size: .88rem !important;
}
.legal-article section {
  scroll-margin-top: 90px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.legal-article section:last-of-type { border-bottom: none; margin-bottom: 0; }
.legal-article h2 {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  margin-bottom: 12px;
}
.legal-article p {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 72ch;
}
.legal-article p + p { margin-top: 12px; }
.legal-article a { color: var(--blue); text-decoration: none; }
.legal-article a:hover { text-decoration: underline; }

/* ---------- Learn home ---------- */
.learn-home {
  background: var(--bg);
  overflow: hidden;
}
.learn-landing {
  padding: 84px 0 52px;
  background:
    linear-gradient(180deg, var(--bg-alt) 0, var(--bg) 78%);
  border-bottom: 1px solid var(--line);
}
.learn-landing__inner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr);
  gap: 56px;
  align-items: center;
}
.learn-landing__copy { max-width: 620px; }
.learn-landing__title {
  font-size: clamp(2.45rem, 6vw, 5.2rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}
.learn-landing__lead {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 1.16rem;
  max-width: 58ch;
}
.learn-landing__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.learn-landing__visual {
  position: relative;
  margin: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.learn-landing__visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.learn-landing__badge {
  position: absolute;
  left: 28px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(20,20,30,.12);
}
.learn-landing__badge--top { top: 28px; }
.learn-landing__badge--bottom { bottom: 28px; left: auto; right: 28px; color: var(--orange); }

.learn-flow { padding: 24px 0 72px; }
.learn-flow__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.learn-flow__item {
  padding-top: 18px;
  border-top: 2px solid var(--line);
}
.learn-flow__item span {
  display: block;
  color: var(--orange);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.learn-flow__item h2 {
  font-size: 1.22rem;
  line-height: 1.25;
  margin-bottom: 8px;
}
.learn-flow__item p {
  color: var(--ink-soft);
  font-size: .98rem;
}

.learn-lessons {
  padding: 76px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.learn-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.learn-lesson-card {
  --accent: var(--blue);
  --tint: var(--blue-soft);
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 330px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.learn-lesson-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 36px rgba(20,20,30,.1);
  text-decoration: none;
}
.learn-lesson-card__media {
  position: relative;
  display: block;
  height: 116px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(120,120,130,.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120,120,130,.14) 1px, transparent 1px),
    var(--tint);
  background-size: 22px 22px;
}
.learn-lesson-card__media::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 58px;
  border-top: 2px solid var(--accent);
  opacity: .75;
}
.learn-lesson-card__media > span {
  position: absolute;
  width: 58px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(20,20,30,.08);
}
.learn-lesson-card__media > span:nth-child(1) { left: 18px; top: 18px; }
.learn-lesson-card__media > span:nth-child(2) { left: calc(50% - 29px); top: 46px; }
.learn-lesson-card__media > span:nth-child(3) { right: 18px; top: 26px; }
.learn-lesson-card__kicker {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.learn-lesson-card h2 {
  font-size: 1.28rem;
  line-height: 1.2;
}
.learn-lesson-card p {
  color: var(--ink-soft);
  font-size: .98rem;
}
.learn-lesson-card strong {
  align-self: end;
  color: var(--accent);
  font-size: .92rem;
}
.learn-lesson-card--graphics { --accent: #0f8f7b; --tint: #e2f5f1; }
.learn-lesson-card--planning { --accent: var(--orange); --tint: var(--orange-soft); }
.learn-lesson-card--writing { --accent: #d9477f; --tint: #fde7f0; }
.learn-lesson-card--design { --accent: #5572e8; --tint: #e8edff; }
:root[data-theme="dark"] .learn-lesson-card--graphics { --tint: #14342f; }
:root[data-theme="dark"] .learn-lesson-card--writing { --tint: #351825; }
:root[data-theme="dark"] .learn-lesson-card--design { --tint: #1f2747; }

.learn-cases {
  padding: 78px 0 96px;
  background: var(--bg-alt);
}
.learn-cases__head {
  max-width: 760px;
}
.learn-cases__head h2 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}
.learn-cases__head p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 60ch;
}
.learn-case-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.learn-case-card {
  display: grid;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20,20,30,.04);
}
.learn-case-card__image {
  display: block;
  min-height: 150px;
  background:
    linear-gradient(135deg, rgba(47,107,255,.2), rgba(255,122,26,.18)),
    linear-gradient(90deg, rgba(120,120,130,.14) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120,120,130,.12) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 24px 24px, 24px 24px, auto;
  border-bottom: 1px solid var(--line);
}
.learn-case-card__body {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.learn-case-card__label,
.learn-case-card__meta {
  color: var(--ink-faint);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.learn-case-card h3 {
  font-size: 1.12rem;
  line-height: 1.25;
}
.learn-case-card p {
  color: var(--ink-soft);
  font-size: .96rem;
}
.learn-case-card__meta {
  color: var(--orange);
  margin-top: 6px;
}

/* ---------- Learn / lesson pages ---------- */
.learn {
  background:
    linear-gradient(180deg, var(--bg-alt) 0, var(--bg) 240px);
}
.learn__layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 180px;
  gap: 56px;
  align-items: start;
  justify-content: center;
  padding-top: 56px;
  padding-bottom: 96px;
}
.learn .doc-header {
  padding: 34px 0 36px;
  border-top: 1px solid var(--line);
}
.learn .doc-category { color: var(--orange); }
.learn .doc-callout {
  background: var(--orange-soft);
  border-left-color: var(--orange);
}
.learn .handbook-chapter:hover {
  border-color: var(--orange);
}

@media (max-width: 1080px) {
  .docs__layout--article { grid-template-columns: 220px minmax(0, 1fr); }
  .learn__layout { grid-template-columns: minmax(0, 820px); max-width: 880px; }
  .doc-outline { display: none; }
  .learn-landing__inner { grid-template-columns: 1fr; }
  .learn-case-list { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .docs__hero { padding: 48px 0 22px; }
  .docs__layout, .docs__layout--home, .docs__layout--article { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .learn__layout { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .learn-landing { padding: 56px 0 36px; }
  .learn-landing__inner { gap: 34px; }
  .learn-flow__grid { grid-template-columns: 1fr; gap: 18px; }
  .learn-lessons { padding: 56px 0; }
  .learn-cases { padding: 58px 0 80px; }
  body.docs-toc-open { overflow: hidden; }
  .docs-toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 6px 0;
    font: inherit;
    font-size: .94rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
  }
  .docs-toc-toggle::before {
    content: "→";
    flex: 0 0 auto;
    font-weight: 800;
  }
  .docs-toc-toggle:hover { color: var(--blue); }
  .docs-toc-toggle:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
  }
  .docs-toc-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .34);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease);
  }
  body.docs-toc-open .docs-toc-overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  .docs-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: min(380px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    height: 100dvh;
    padding: max(22px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
    background: var(--surface);
    border-right: 1px solid var(--line);
    box-shadow: 24px 0 60px rgba(0, 0, 0, .2);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-105%);
    transition: transform .24s var(--ease), visibility .24s var(--ease);
    visibility: hidden;
  }
  .docs-sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .docs-sidebar__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
  }
  .docs-sidebar__title {
    color: var(--ink);
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.2;
  }
  .docs-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
  }
  .docs-sidebar__close span {
    display: block;
    transform: translateY(-1px);
  }
  .docs-sidebar__close:hover { background: var(--bg-alt); }
  .docs-sidebar__close:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
  }
  .docs-nav {
    display: grid;
    gap: 13px;
    width: 100%;
  }
  .docs-nav__group {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .docs-nav__home { white-space: normal; }
  .docs-nav summary.docs-nav__label { white-space: normal; }
  .docs-nav a {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 10px;
    white-space: normal;
  }
  .docs-grid, .handbook-map { grid-template-columns: 1fr; }
  .handbook-chapter--contact {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 640px) {
  :root { --page-gutter: clamp(18px, 5vw, 24px); }
  .btn { white-space: normal; }
  .learn-landing__actions { align-items: stretch; flex-direction: column; }
  .learn-landing__actions .btn { width: 100%; }
  .learn-landing__badge { position: static; margin-top: 10px; box-shadow: none; }
  .learn-case-card__image { min-height: 120px; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .feature__inner { grid-template-columns: 1fr; gap: 32px; }
  .feature--reverse .feature__copy { order: 0; }
  .feature__body { max-width: none; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--surface);
    border-bottom: 1px solid var(--line); padding: 8px 24px 16px;
  }
  .nav.is-open .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
}
html[data-route-pending] body {
  display: none !important;
}

[data-section-link][hidden] {
  display: none !important;
}
