/* Beeem home — design direction v9 "Mirror + Markdown" (v6 with a cooler left side, Markdown marks, and a compare window) (prototype, not deployed).
   World: two halves, one seam.
   - Left = あなた: warm paper, deep-violet ink. Text leans toward the seam (right-aligned).
   - Right = Twin: deep violet night, moon-white text. Text leans toward the seam (left-aligned).
   - The seam: a thin line of the wordmark gradient running down the whole page.
   - Every block is a .split of .you | .twin. On mobile the seam turns horizontal:
     the あなた block sits on top, the Twin block below, joined by the gradient line. */
:root {
  color-scheme: light;
  --paper: #fbfaff;
  --paper-2: #eeebfb;
  --sheet: #ffffff;
  --ink: #3a2f66;
  --ink-2: #5a5180;
  --ink-line: rgba(58, 47, 102, 0.16);
  --twin: #2c2550;
  --twin-2: #362e60;
  --moon: #f4f1ff;
  --moon-2: #cbc4ef;
  --moon-line: rgba(244, 241, 255, 0.16);
  --lav: #b9aef6;
  --violet: #7c6fd0;
  --pink: #f2929c;
  --seam: linear-gradient(180deg, #9a86e8, #f2929c, #9a86e8);
  --seam-x: linear-gradient(96deg, #9a86e8, #f2929c);
  --half: 580px;          /* content + outer gutter limit of one half */
  --inner: 64px;          /* distance from the seam */
  --outer: 24px;          /* minimum outer gutter */
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  --body: system-ui, -apple-system, "Hiragino Sans", sans-serif;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3, .hero-h, .close-h {
  font-family: var(--round); font-weight: 800;
  text-wrap: balance; word-break: auto-phrase; letter-spacing: 0.01em;
}
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 8px; }
.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;
}

/* ---------- the split and the seam ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.you, .twin { position: relative; min-width: 0; }
.you {
  background: var(--paper); color: var(--ink);
  text-align: right;
  padding: 88px var(--inner) 88px max(var(--outer), calc(100% - var(--half)));
}
.twin {
  background: var(--twin); color: var(--moon);
  padding: 88px max(var(--outer), calc(100% - var(--half))) 88px var(--inner);
}
.twin::before {
  content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px;
  background: var(--seam); background-size: 100% 1200px;
  animation: seam 14s linear infinite;
  pointer-events: none;
}
@keyframes seam { to { background-position: 0 1200px; } }
.you > *, .twin > * { max-width: 520px; }
.you > * { margin-left: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 24px; border-radius: 999px;
  background: var(--ink); color: var(--sheet);
  font: 700 15px/1.3 var(--body); text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); background: #2a2150; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-moon { background: var(--moon); color: var(--twin); }
.btn-moon:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--moon); box-shadow: inset 0 0 0 1.5px var(--moon-line), inset 0 0 0 1.5px rgba(244, 241, 255, 0.4); }
.btn-ghost:hover { background: rgba(244, 241, 255, 0.08); }
.btn-sm { min-height: 38px; padding: 6px 18px; font-size: 14px; }

/* ---------- header ---------- */
.head { position: sticky; top: 0; z-index: 10; }
.head .you, .head .twin { padding-top: 14px; padding-bottom: 14px; }
.head .you > *, .head .twin > * { max-width: none; margin-left: 0; }
.head-you { display: flex; align-items: center; justify-content: space-between; gap: 24px; text-align: left; background: rgba(251, 250, 255, 0.94); }
.head-twin { display: flex; align-items: center; justify-content: flex-end; gap: 20px; background: rgba(44, 37, 80, 0.96); }
.head-nav { display: flex; gap: 22px; font-size: 14px; font-weight: 600; }
.head-nav a, .head-login { text-decoration: none; }
.head-nav a { color: var(--ink-2); }
.head-nav a:hover { color: var(--ink); }
.head-login { font-size: 14px; font-weight: 600; color: var(--moon-2); }
.head-login:hover { color: var(--moon); }
.head-brand img { width: 84px; height: 22px; }

/* ---------- hero ---------- */
.hero .you, .hero > .split .twin { padding-top: 96px; padding-bottom: 72px; }
.side {
  display: flex; align-items: center; gap: 10px;
  font: 700 13px/1 var(--body); letter-spacing: 0.14em;
  margin-bottom: 36px;
}
.you .side { justify-content: flex-end; color: var(--ink-2); }
.twin .side { color: var(--lav); }
.side img { width: 20px; height: 20px; border-radius: 5px; }
.side-mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0.7; }
.hero-h {
  font-size: clamp(34px, 4.3vw, 64px); line-height: 1.2;
  margin-bottom: 40px; max-width: none !important;
}
.hero-h span { display: block; white-space: nowrap; }
.hero .you .hero-h { color: var(--ink); }
.hero .twin .hero-h { color: var(--moon); }
.hero-h em {
  font-style: normal;
  background: var(--seam-x); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 17px; line-height: 1.9; color: var(--ink-2); max-width: 400px !important; text-wrap: balance; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--moon-2); }
.hero-note a { color: var(--moon); }

/* the bridge: the screenshot sits on the seam itself */
.bridge {
  position: relative;
  background: linear-gradient(90deg, var(--paper) 50%, var(--twin) 50%);
  padding: 0 24px 96px;
}
.bridge::before {
  content: ""; position: absolute; left: calc(50% - 1px); top: 0; bottom: 0; width: 2px;
  background: var(--seam); background-size: 100% 1200px; animation: seam 14s linear infinite;
}
.bridge-say {
  position: relative; max-width: 980px; margin: 0 auto 22px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 128px;
}
.say { display: flex; align-items: baseline; gap: 10px; font-size: 15px; font-weight: 600; }
.say b { font-size: 12px; letter-spacing: 0.12em; font-weight: 700; }
.say-you { justify-content: flex-end; color: var(--ink); }
.say-you b { color: var(--ink-2); }
.say-twin { color: var(--moon); }
.say-twin b { color: var(--lav); }

.window {
  position: relative; overflow: hidden;
  border-radius: 14px; background: var(--sheet);
  box-shadow: 0 0 0 1px rgba(58, 47, 102, 0.12), 0 40px 80px -36px rgba(15, 10, 40, 0.65);
}
.bar {
  display: flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 14px;
  background: #efebf8; border-bottom: 1px solid rgba(58, 47, 102, 0.08);
  position: relative; z-index: 1;
}
.bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(58, 47, 102, 0.2); }
.bar small { margin-left: auto; margin-right: auto; padding-right: 51px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.window-wide { max-width: 980px; margin: 0 auto; }

/* facts: two on each side */
.hero .facts .you, .hero .facts .twin { padding-top: 8px; padding-bottom: 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-content: start; }
.facts .you { margin: 0; }
.facts li { font-size: 14px; line-height: 1.7; max-width: none; margin: 0; text-wrap: balance; word-break: auto-phrase; }
.facts b { display: block; font-family: var(--round); font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.facts .you li { color: var(--ink-2); }
.facts .you b { color: var(--ink); }
.facts .twin li { color: var(--moon-2); }
.facts .twin b { color: var(--moon); }
.facts .you, .facts .twin { border-top: 0; }
.facts .you::after, .facts .twin::after { content: none; }

/* ---------- section intro ---------- */
.intro .you, .intro .twin { padding-top: 88px; padding-bottom: 48px; }
.intro .twin { display: flex; align-items: flex-end; }
.kicker { font: 700 12px/1 var(--body); letter-spacing: 0.18em; color: var(--violet); margin-bottom: 18px; }
.intro h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.3; }
.intro-lead { font-size: 17px; line-height: 1.9; color: var(--moon-2); max-width: 420px; }

/* ---------- exchanges ---------- */
.ex .you, .ex .twin { padding-top: 64px; padding-bottom: 64px; }
.ex + .ex .you { border-top: 1px solid var(--ink-line); }
.ex + .ex .twin { border-top: 1px solid var(--moon-line); }
.node {
  position: absolute; left: 50%; top: 64px; z-index: 2;
  transform: translate(-50%, 0);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); color: var(--ink);
  font: 800 13px/1 var(--round); letter-spacing: 0.04em;
  box-shadow: 0 0 0 2px var(--twin), 0 0 0 4px #c9a3d8;
}
.when { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--violet); margin-bottom: 14px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.plus-tag { font-size: 11px; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--sheet); }
.ex h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.4; margin-bottom: 16px; }
.ex-text { font-size: 15.5px; line-height: 1.9; color: var(--ink-2); max-width: 430px !important; text-wrap: balance; }

.turn { display: inline-flex; flex-direction: column; gap: 6px; margin-top: 32px; font: 800 19px/1.5 var(--round); }
.turn b { font: 700 12px/1 var(--body); letter-spacing: 0.14em; }
.turn-you { color: var(--ink); align-items: flex-end; padding-right: 18px; border-right: 3px solid var(--ink); }
.turn-you b { color: var(--ink-2); }
.turn-twin { color: var(--moon); padding-left: 18px; border-left: 3px solid var(--lav); margin-top: 0; margin-bottom: 28px; }
.turn-twin b { color: var(--lav); }
.ex .twin .window { max-width: 560px; }
.window-right img { transform: scale(3); transform-origin: 100% 35%; }

.more {
  display: block; width: fit-content; margin-top: 28px;
  font-size: 14px; font-weight: 700; color: var(--violet);
  text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.more:hover { color: var(--ink); }

/* voice */
.free { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 24px; }
.free li { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink-line); }
.free .free-big { font: 800 22px/1 var(--round); padding: 8px 16px; background: var(--ink); color: var(--sheet); box-shadow: none; }
.press { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 32px; }
.press .turn { margin-top: 0; }
.keycap {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px;
  background: var(--sheet); font-size: 28px; color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--paper-2), 0 0 0 1px var(--ink-line), 0 10px 20px -12px rgba(58, 47, 102, 0.5);
}
.wave { display: flex; align-items: center; gap: 4px; height: 36px; }
.wave i { width: 4px; border-radius: 2px; background: var(--violet); height: 30%; animation: wave 1.4s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: 0.1s; height: 60%; }
.wave i:nth-child(3) { animation-delay: 0.2s; height: 90%; }
.wave i:nth-child(4) { animation-delay: 0.3s; height: 55%; }
.wave i:nth-child(5) { animation-delay: 0.4s; height: 75%; }
.wave i:nth-child(6) { animation-delay: 0.5s; height: 40%; }
.wave i:nth-child(7) { animation-delay: 0.6s; height: 25%; }
@keyframes wave { 50% { transform: scaleY(0.45); } }
.fields { display: grid; gap: 10px; }
.field {
  display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: baseline;
  padding: 16px 18px; border-radius: 12px;
  background: var(--twin-2); box-shadow: inset 0 0 0 1px var(--moon-line);
  font-size: 15px; color: var(--moon);
}
.field b { font-size: 12px; letter-spacing: 0.08em; color: var(--lav); }
.field span::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px;
  vertical-align: -0.15em; background: var(--pink); animation: caret 1.1s steps(1) infinite;
}
.field + .field span::after { content: none; }
@keyframes caret { 50% { opacity: 0; } }

/* night: Twin's side gets a faint moon */
.ex-night .twin { background: radial-gradient(420px 260px at 80% 0%, rgba(185, 174, 246, 0.16), transparent 70%), var(--twin); }

/* capabilities */
.caps .you, .caps .twin { padding-top: 64px; padding-bottom: 64px; border-top: 1px solid var(--ink-line); }
.caps .twin { border-top-color: var(--moon-line); }
.caps-label { font: 800 clamp(24px, 2.4vw, 32px)/1.4 var(--round); text-wrap: balance; word-break: auto-phrase; }
.caps-list { display: grid; gap: 8px; }
.caps-list a {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 16px; border-radius: 12px; text-decoration: none;
  background: var(--twin-2); box-shadow: inset 0 0 0 1px var(--moon-line);
  font-size: 15px; font-weight: 600; color: var(--moon);
  transition: background 0.2s var(--ease);
}
.caps-list a:hover { background: #40376e; }
.caps-list svg { width: 22px; height: 22px; fill: none; stroke: var(--lav); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.caps-list small { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--moon-2); padding: 3px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--moon-line); }
.caps-list small.is-plus { background: var(--moon); color: var(--twin); box-shadow: none; }

/* ---------- pricing ---------- */
.pricing .intro .you, .pricing .intro .twin { border-top: 0; }
.plans .you, .plans .twin { padding-top: 0; padding-bottom: 40px; }
.plans .you > *, .plans .twin > * { max-width: 460px; }
.plan { text-align: left; padding: 36px; border-radius: 22px; height: 100%; }
.plans .you, .plans .twin { display: flex; }
.plans .you { justify-content: flex-end; }
.plans .plan { width: 100%; }
.plans .you .plan { background: var(--sheet); box-shadow: 0 0 0 1px var(--ink-line); }
.plan-plus { background: var(--twin-2); box-shadow: inset 0 0 0 1px var(--moon-line); }
.plan h3 { font-size: 24px; }
.plan-for { font-size: 14px; margin-top: 4px; color: var(--ink-2); }
.plan-plus .plan-for { color: var(--moon-2); }
.plan-price { font: 800 44px/1.1 var(--round); margin: 20px 0 22px; display: flex; align-items: baseline; gap: 10px; }
.plan-price small { font: 600 14px/1 var(--body); color: var(--ink-2); }
.plan-plus .plan-price small { color: var(--moon-2); }
.plan .btn { width: 100%; }
.plan-includes { margin-top: 24px; font-size: 13px; font-weight: 700; color: var(--lav); }
.plan ul { margin-top: 22px; display: grid; gap: 12px; }
.plan-includes + ul { margin-top: 12px; }
.plan li { position: relative; padding-left: 24px; font-size: 14.5px; line-height: 1.6; font-weight: 600; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); opacity: 0.6; }
.plan li small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.plan-plus li small { color: var(--moon-2); }
.fine .you, .fine .twin { padding-top: 0; padding-bottom: 88px; }
.fineprint { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); max-width: 460px !important; text-wrap: balance; }
.fine .twin .fineprint { color: var(--moon-2); }
.fineprint a { color: inherit; }

/* ---------- faq ---------- */
.faq .intro .you, .faq .intro .twin { border-top: 1px solid var(--ink-line); }
.faq .intro .twin { border-top-color: var(--moon-line); }
.qa .you, .qa .twin { padding-top: 30px; padding-bottom: 30px; }
.qa:last-child .you, .qa:last-child .twin { padding-bottom: 120px; }
.q { font-size: 20px; line-height: 1.5; display: flex; justify-content: flex-end; align-items: baseline; gap: 12px; }
.a { font-size: 15px; line-height: 1.9; color: var(--moon-2); display: flex; gap: 12px; }
.a a { color: var(--moon); }
.qa-mark { flex: none; font: 800 14px/1 var(--round); width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; transform: translateY(2px); }
.q .qa-mark { background: var(--ink); color: var(--sheet); order: 2; }
.a .qa-mark { background: var(--moon); color: var(--twin); }

/* ---------- closing ---------- */
.closing .you, .closing .twin { padding-top: 140px; padding-bottom: 140px; }
.closing .you { background: var(--paper-2); }
.closing .twin { background: radial-gradient(520px 300px at 0% 50%, rgba(242, 146, 156, 0.14), transparent 70%), var(--twin); }
.close-h { font-size: clamp(44px, 6vw, 88px); line-height: 1.1; margin-bottom: 32px; max-width: none !important; white-space: nowrap; }
.closing .twin .close-h { background: var(--seam-x); -webkit-background-clip: text; background-clip: text; color: transparent; }
.close-text { font-size: 16px; line-height: 1.9; color: var(--ink-2); max-width: 360px !important; text-wrap: balance; }

/* ---------- footer ---------- */
.foot { background: var(--paper); border-top: 1px solid var(--ink-line); position: relative; }
.foot::before { content: ""; position: absolute; left: calc(50% - 1px); top: 0; width: 2px; height: 48px; background: var(--seam); }
.foot-in { max-width: 1192px; margin: 0 auto; padding: 72px 24px 40px; }
.foot-grid { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.foot-brand img { width: 104px; height: 27px; }
.foot-vision { margin-top: 16px; font: 800 16px/1.6 var(--round); }
.foot-vision small { display: block; font: 500 12px/1.6 var(--body); color: var(--ink-2); }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot h4 { font-size: 12px; letter-spacing: 0.12em; color: var(--ink-2); margin: 0 0 12px; }
.foot li { font-size: 14px; line-height: 2.1; }
.foot li a { text-decoration: none; }
.foot li a:hover { text-decoration: underline; }
.foot-legal { margin-top: 48px; font-size: 12px; color: var(--ink-2); }

/* ---------- narrower desktop ---------- */
@media (max-width: 1100px) {
  :root { --inner: 44px; }
  .head-nav { gap: 14px; }
  .hero .facts .you, .hero .facts .twin { grid-template-columns: 1fr; }
}

/* ---------- mobile: the seam turns horizontal ---------- */
@media (max-width: 980px) {
  :root { --inner: 24px; }
  .split { grid-template-columns: 1fr; }
  .you, .twin { padding: 56px 24px; }
  .you { text-align: left; }
  .you > *, .twin > * { max-width: none; margin-left: 0; }
  .twin::before {
    left: 0; right: 0; top: -1px; bottom: auto; width: auto; height: 2px;
    background: var(--seam-x); animation: none;
  }
  .twin::after {
    content: "Twin"; position: absolute; top: -12px; left: 24px;
    font: 700 11px/1 var(--body); letter-spacing: 0.14em;
    padding: 6px 10px; border-radius: 999px; background: var(--twin); color: var(--lav);
    box-shadow: inset 0 0 0 1.5px #c9a3d8;
  }
  .twin[aria-hidden="true"] { display: none; }
  .qa .twin::after, .intro .twin::after, .head .twin::after, .fine .twin::after, .caps .twin::after, .facts .twin::after { content: none; }

  .head { position: static; }
  .head .you { padding: 12px 24px; }
  .head-nav { display: none; }
  .head .twin { padding: 10px 24px; justify-content: space-between; }
  .head .twin::before { height: 1px; }

  .hero .you, .hero > .split .twin { padding-top: 48px; padding-bottom: 48px; }
  .hero > .split .twin::after { content: none; }
  .you .side { justify-content: flex-start; }
  .side { margin-bottom: 22px; }
  .hero-h { font-size: clamp(32px, 9vw, 46px); margin-bottom: 24px; }
  .hero-sub { max-width: none !important; }
  .bridge { background: var(--twin); padding: 0 16px 56px; }
  .bridge::before { content: none; }
  .bridge-say { grid-template-columns: 1fr; gap: 6px; }
  .say-you { justify-content: flex-start; color: var(--moon); }
  .say-you b { color: var(--moon-2); }
  .bar small { display: none; }
  .hero .facts .you, .hero .facts .twin { padding: 40px 24px; gap: 20px; }

  .intro .you { padding-top: 80px; padding-bottom: 24px; }
  .intro .twin { padding-top: 28px; padding-bottom: 36px; }
  .ex .you, .ex .twin { padding-top: 48px; padding-bottom: 48px; }
  .ex + .ex .twin { border-top: 0; }
  .node { left: auto; right: 24px; top: 40px; transform: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px #c9a3d8; }
  .ex .you { padding-right: 80px; }
  .when, .free, .press, .q { justify-content: flex-start; }
  .turn-you { align-items: flex-start; padding-right: 0; border-right: 0; padding-left: 18px; border-left: 3px solid var(--ink); }
  .press { flex-wrap: wrap; }
  .field { grid-template-columns: 1fr; gap: 4px; }

  .caps .you { padding-top: 56px; padding-bottom: 20px; }
  .caps .twin { padding-top: 24px; padding-bottom: 72px; border-top: 0; }
  .plans .you, .plans .twin { padding: 24px 16px; }
  .plans .you > *, .plans .twin > * { max-width: none; }
  .plan { padding: 28px 22px; }
  .fine .you, .fine .twin { padding: 16px 24px 24px; }
  .fine .twin { padding-bottom: 72px; }
  .q { font-size: 18px; }
  .q .qa-mark { order: 0; }
  .qa .you { padding-top: 36px; padding-bottom: 20px; }
  .qa .twin { padding-top: 24px; padding-bottom: 36px; }
  .qa:last-child .twin { padding-bottom: 72px; }
  .qa:last-child .you { padding-bottom: 20px; }
  .closing .you { padding: 80px 24px 32px; }
  .closing .twin { padding: 40px 24px 80px; }
  .closing .twin::after { content: none; }
  .close-h { font-size: clamp(44px, 13vw, 64px); margin-bottom: 18px; }
}

@media (max-width: 400px) {
  .hero .facts .you, .hero .facts .twin { grid-template-columns: 1fr; }
  .cta .btn { width: 100%; }
}

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

/* ================= v9 ================= */
:root { --mono: ui-monospace, "SF Mono", Menlo, monospace; }

/* Markdown, quietly, on your side only: the marks you would type. */
.you .hero-h { position: relative; }
.you .hero-h > span:first-child::before,
.you h2::before, .you h3:not(.q)::before, .you .close-h::before,
.you .when::before, .you .kicker::before, .turn-you::after {
  font-family: var(--mono); font-weight: 500; color: var(--violet); opacity: 0.5; letter-spacing: 0;
}
.you .hero-h > span:first-child::before { content: "# "; font-size: 0.5em; vertical-align: 0.24em; }
.you .kicker::before { content: "<!-- "; } .you .kicker::after { content: " -->"; font-family: var(--mono); color: var(--violet); opacity: 0.5; letter-spacing: 0; }
.you .kicker, .you .when { font-family: var(--mono); letter-spacing: 0.02em; }
.you h2::before { content: "# "; font-size: 0.55em; vertical-align: 0.2em; }
.you h3:not(.q)::before { content: "## "; font-size: 0.55em; vertical-align: 0.2em; }
.you .close-h::before { content: "# "; font-size: 0.4em; vertical-align: 0.4em; }
.you .q .qa-mark { font-family: var(--mono); }

/* The big window: your Markdown on the left, Twin's reading on the right. */
.compare-body { position: relative; container-type: inline-size; }
.compare-body > img { width: 100%; }
.raw {
  position: absolute; inset: 0; overflow: hidden;
  padding: 3.2cqw 4cqw; background: #fff; color: var(--ink);
  clip-path: inset(0 calc(100% - var(--cut)) 0 0);
  font-family: var(--mono); font-size: 1.36cqw; line-height: 2.02;
}
.raw-file { margin-bottom: 1.6cqw; padding-bottom: 1.2cqw; border-bottom: 1px solid var(--ink-line); color: var(--ink-2); font-size: 1.15cqw; }
.raw-file b { color: var(--ink); font-weight: 600; }
.raw ol { margin: 0; padding: 0; list-style: none; counter-reset: ln; }
.raw li { position: relative; padding-left: 4.4cqw; white-space: nowrap; font-family: var(--body); }
.raw li::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 2.6cqw; text-align: right; font-family: var(--mono); font-size: 0.82em; color: var(--ink-2); opacity: 0.55; }
.raw .k { font-family: var(--mono); color: var(--violet); white-space: pre; }
.raw .h { font-weight: 800; font-size: 1.28em; line-height: 1.6; }
.raw .h2 { font-weight: 700; }
.raw .d { color: var(--ink-2); opacity: 0.7; }
.tagline {
  position: absolute; top: 1.4cqw; z-index: 2; padding: 0.35em 0.9em; border-radius: 999px;
  font-family: var(--round); font-size: max(11px, 1.1cqw); font-weight: 700; white-space: nowrap;
  transition: opacity 0.2s var(--ease);
}
.tagline-you { left: 1.6cqw; background: var(--paper-2); color: var(--ink); }
.tagline-twin { right: 1.6cqw; background: var(--twin); color: var(--moon); }
.raw-file { padding-left: 15cqw; }
.cutter {
  position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--cut);
  width: 44px; margin-left: -22px; cursor: col-resize; touch-action: none;
}
.cutter::before { content: ""; position: absolute; top: 0; bottom: 0; left: 21px; width: 2px; background: linear-gradient(180deg, #9a86e8, #f2929c); }
.cutter-knob {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--ink);
  box-shadow: 0 0 0 2px var(--pink), 0 14px 28px -10px rgba(15, 10, 40, 0.7);
  transition: transform 0.18s var(--ease);
}
.cutter:hover .cutter-knob, .compare.dragging .cutter-knob { transform: translate(-50%, -50%) scale(1.12); }
.cutter-knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.compare.dragging { user-select: none; }
.compare.nudge .cutter-knob { animation: nudge 1.6s var(--ease) 2; }
@keyframes nudge { 0%, 100% { transform: translate(-50%, -50%); } 30% { transform: translate(calc(-50% - 10px), -50%); } 60% { transform: translate(calc(-50% + 10px), -50%); } }
@media (prefers-reduced-motion: reduce) { .compare.nudge .cutter-knob { animation: none; } }
@media (max-width: 980px) {
  .raw { font-size: 2.3cqw; line-height: 1.9; padding: 4cqw; }
  .raw-file { font-size: 2cqw; padding-left: 0; padding-top: 6cqw; }
  .raw li { padding-left: 6cqw; }
  .raw li::before { width: 4cqw; }
  .tagline { font-size: 10px; }
  .cutter-knob { width: 38px; height: 38px; }
}

/* ---- start free (home) ---- */
.free-lead { margin-top: 16px; font-size: 17px; color: var(--ink-2); }
.free-list { display: grid; gap: 12px; text-align: left; font-size: 16px; }
.free-list { max-width: 520px !important; }
.free-list li { position: relative; padding-left: 32px; line-height: 1.6; }
.free-list li::before { content: "✓"; position: absolute; left: 0; top: 3px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--seam-x); color: #fff; font-size: 11px; font-weight: 700; }
.free-list small { display: block; font-size: 13px; color: var(--moon-2); }
.startfree .cta { margin-top: 28px; align-items: center; }
.more-moon { color: var(--moon); border-color: var(--moon-line); }
.head-nav a[aria-current="page"] { font-weight: 700; }

/* ---- pricing page ---- */
.price-hero .hero-h em { font-style: normal; background: var(--seam-x); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub-twin { color: var(--moon-2); margin-right: auto; margin-left: 0 !important; text-align: left; }
.price-hero > .split:first-of-type .you, .price-hero > .split:first-of-type .twin { padding-bottom: 48px; }
.compare-table .intro .you, .compare-table .intro .twin { padding-bottom: 36px; }
.cmp .you, .cmp .twin { display: flex; align-items: center; gap: 20px; padding-top: 16px; padding-bottom: 16px; }
.cmp .you { justify-content: flex-end; text-align: left; }
.cmp .you > *, .cmp .twin > * { margin: 0; max-width: none; }
.cmp .you::after { content: ""; position: absolute; left: max(var(--outer), calc(100% - var(--half))); right: 0; top: 0; height: 1px; background: var(--ink-line); }
.cmp .twin::after { content: ""; position: absolute; left: 0; right: max(var(--outer), calc(100% - var(--half))); top: 0; height: 1px; background: var(--moon-line); }
.cmp .f { flex: 1; max-width: 400px !important; font-weight: 600; line-height: 1.5; }
.cmp .f small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.v { flex: none; display: inline-grid; place-items: center; width: 92px; font-family: var(--round); font-weight: 700; font-size: 15px; white-space: nowrap; }
.v-yes { font-size: 0; }
.v-yes::before { content: "✓"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; }
.you .v-yes::before { background: var(--ink); color: #fff; }
.twin .v-yes::before { background: var(--seam-x); color: #fff; }
.v-no { opacity: 0.35; }
.twin .v-txt { color: var(--lav); }
.cmp-head .f, .cmp-head .v { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; opacity: 0.7; }
.cmp-head .you::after, .cmp-head .twin::after { content: none; }
.compare-table { padding-bottom: 0; }
.compare-table .cmp:last-child .you, .compare-table .cmp:last-child .twin { padding-bottom: 72px; }
@media (max-width: 980px) {
  .cmp { grid-template-columns: 1fr auto; }
  .cmp .you { justify-content: space-between; }
  .cmp .twin { background: var(--twin); padding-left: 12px; padding-right: 16px; }
  .cmp .f { max-width: none !important; }
  .v { width: 66px; font-size: 13px; }
  .cmp .f small { display: none; }
}
.startfree .intro .twin { display: block; }
.startfree .intro .twin > * { max-width: 520px; }
.startfree .cta { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---- v9.1: real screens in the compare window, and a narrower footprint ---- */
.compare-body > img.before {
  position: absolute; inset: 0; width: 100%; height: 100%;
  clip-path: inset(0 calc(100% - var(--cut)) 0 0);
}
.head-nav a { white-space: nowrap; }
.close-h { font-size: clamp(40px, 5.4vw, 80px); }
@media (max-width: 1240px) {
  :root { --inner: 40px; }
  .head-nav a[href="/about"], .head-nav a[href$="/about"] { display: none; }
  .ex .twin .window { max-width: none; }
}

/* ================= v10: motion =================
   Everything below applies only under html.motion (wide screens, motion allowed).
   Without it the page is the static v9 layout. Progress values come from home-v10.js:
   --p on each [data-scene] (0 entering → 1 settled), and --b / --c on the hero. */
.pops, .scroll-hint, .pulse, .zap, .sky, .moonrise, .tape { display: none; }

.motion .pulse {
  display: block; position: fixed; z-index: 9; left: 50%; top: calc(var(--page, 0) * 100vh);
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px var(--pink), 0 0 26px 8px rgba(242, 146, 156, 0.75), 0 0 60px 18px rgba(154, 134, 232, 0.5);
  pointer-events: none;
}

/* ---- hero: pinned scene ---- */
.motion .hero-pin { height: 340vh; }
.motion .hero-stick {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: linear-gradient(90deg, var(--paper) 50%, var(--twin) 50%);
}
.motion .hero-stick > .split { position: absolute; inset: 0 0 auto 0; z-index: 1; }
.motion .hero-stick > .split .you, .motion .hero-stick > .split .twin { background: transparent; padding-top: 104px; padding-bottom: 0; }
.motion .hero-stick > .split .twin::before { content: none; }
/* the two halves of the headline open like doors */
.motion .hero-stick > .split .you > * { transform: translateX(calc(var(--b, 0) * -34vw)); opacity: calc(1 - var(--b, 0) * 1.5); }
.motion .hero-stick > .split .twin > * { transform: translateX(calc(var(--b, 0) * 34vw)); opacity: calc(1 - var(--b, 0) * 1.5); }
.motion .hero-stick > .split :is(.you, .twin) > * { transition: translate 1s var(--ease); }
.motion .hero-stick > .split :is(.you, .twin) > :nth-child(2) { transition-delay: 0.07s; }
.motion .hero-stick > .split :is(.you, .twin) > :nth-child(3) { transition-delay: 0.14s; }
.motion .hero-stick > .split :is(.you, .twin) > :nth-child(4) { transition-delay: 0.21s; }
.motion.pre .hero-stick > .split :is(.you, .twin) > * { transition: none; }
.motion.pre .hero-stick > .split .you > * { translate: -30vw 0; }
.motion.pre .hero-stick > .split .twin > * { translate: 30vw 0; }
/* the window rises from far away and lies flat */
.motion .bridge {
  position: absolute; inset: 0; z-index: 2; padding: 0; background: none;
  display: grid; place-items: center; perspective: 1700px; pointer-events: none;
}
.motion .bridge-say { display: none; }
.motion .window-wide {
  width: min(980px, 84vw, calc((100vh - 170px) * 1.52)); max-width: none; margin: 0; pointer-events: auto;
  transform: translateY(calc((1 - var(--b, 0)) * 58vh + 34px)) scale(calc(0.56 + var(--b, 0) * 0.44)) rotateX(calc((1 - var(--b, 0)) * 46deg));
  transform-origin: 50% 0;
  box-shadow: 0 0 0 1px rgba(58, 47, 102, 0.12), 0 60px 120px -40px rgba(15, 10, 40, 0.8), 0 0 calc(var(--b, 0) * 120px) calc(var(--b, 0) * 10px) rgba(154, 134, 232, 0.35);
}
/* what Twin read pops out of the window */
.motion .pops { display: block; position: absolute; inset: 0; pointer-events: none; }
.motion .pop {
  position: absolute; max-width: 250px; padding: 12px 16px; border-radius: 16px;
  font-size: 14px; line-height: 1.6; text-align: left;
  box-shadow: 0 24px 50px -18px rgba(15, 10, 40, 0.75);
  opacity: var(--o); transform: translate(calc((1 - var(--o)) * var(--dx)), calc((1 - var(--o)) * 40px)) scale(calc(0.6 + var(--o) * 0.4)) rotate(calc((1 - var(--o)) * var(--rot)));
}
.motion .pop b { display: block; margin-bottom: 2px; font: 700 11px/1.6 var(--body); letter-spacing: 0.12em; }
.motion .pop-you { --o: clamp(0, calc(var(--c, 0) * 4), 1); --dx: -160px; --rot: -10deg; left: max(16px, calc(50% - 640px)); top: 36%; background: #fff; color: var(--ink); border-bottom-left-radius: 4px; }
.motion .pop-you b { color: var(--violet); }
.motion .pop-t1 { --o: clamp(0, calc(var(--c, 0) * 4 - 0.8), 1); --dx: 160px; --rot: 8deg; right: max(16px, calc(50% - 650px)); top: 22%; }
.motion .pop-t2 { --o: clamp(0, calc(var(--c, 0) * 4 - 1.6), 1); --dx: 200px; --rot: -6deg; right: max(16px, calc(50% - 670px)); top: 44%; }
.motion .pop-t3 { --o: clamp(0, calc(var(--c, 0) * 4 - 2.4), 1); --dx: 240px; --rot: 10deg; right: max(16px, calc(50% - 650px)); top: 68%; }
.motion :is(.pop-t1, .pop-t2, .pop-t3) { background: var(--seam-x); color: #fff; border-bottom-right-radius: 4px; }
.motion .scroll-hint {
  display: block; position: absolute; z-index: 3; left: 50%; bottom: 22px; translate: -50% 0;
  padding: 5px 14px; border-radius: 999px; background: #fff; color: var(--ink);
  font: 700 12px/1.6 var(--body); letter-spacing: 0.1em;
  box-shadow: 0 0 0 2px var(--pink), 0 10px 24px -8px rgba(15, 10, 40, 0.6);
  opacity: calc(1 - var(--b, 0) * 6); animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 50% { translate: -50% 6px; } }

/* ---- tape: your marks run one way, Twin's words the other ---- */
.motion .tape { display: grid; }
.motion .tape .you, .motion .tape .twin { padding: 26px 0; overflow: hidden; }
.motion .tape p { max-width: none; margin: 0; white-space: nowrap; font: 800 clamp(48px, 7vw, 104px)/1.1 var(--round); }
.motion .tape .you p { font-family: var(--mono); font-weight: 600; color: transparent; -webkit-text-stroke: 1.5px rgba(58, 47, 102, 0.3); transform: translateX(calc(-55% + var(--p, 0) * 50%)); text-align: left; width: max-content; }
.motion .tape .twin p { color: transparent; -webkit-text-stroke: 1.5px rgba(244, 241, 255, 0.34); transform: translateX(calc(var(--p, 0) * -50%)); width: max-content; }

/* ---- features: you slide in from the left, Twin swings in from the right ---- */
.motion .ex { overflow: hidden; }
.motion .ex .you > * {
  --q: clamp(0, calc(var(--p, 0) * 1.7 - var(--d, 0)), 1);
  opacity: var(--q); transform: translateX(calc((1 - var(--q)) * -120px));
}
.motion .ex .you > :nth-child(2) { --d: 0.1; } .motion .ex .you > :nth-child(3) { --d: 0.2; }
.motion .ex .you > :nth-child(4) { --d: 0.3; } .motion .ex .you > :nth-child(5) { --d: 0.4; } .motion .ex .you > :nth-child(6) { --d: 0.5; }
.motion .ex .twin { perspective: 1500px; }
.motion .ex .twin > .turn { --q: clamp(0, calc(var(--p, 0) * 2 - 0.7), 1); opacity: var(--q); transform: translateX(calc((1 - var(--q)) * 80px)); }
.motion .ex .twin > :is(.window, .fields) {
  --q: clamp(0, calc(var(--p, 0) * 1.5 - 0.25), 1);
  opacity: clamp(0, calc(var(--q) * 3), 1);
  transform: translateX(calc((1 - var(--q)) * 260px)) rotateY(calc((1 - var(--q)) * -42deg)) rotateZ(calc((1 - var(--q)) * 5deg)) scale(calc(0.72 + var(--q) * 0.28));
  transform-origin: 0 50%;
}
.motion .node { transform: translate(-50%, 0) scale(calc(0.2 + clamp(0, calc(var(--p, 0) * 2), 1) * 0.8)) rotate(calc((1 - clamp(0, calc(var(--p, 0) * 2), 1)) * -270deg)); }
.motion .zap {
  display: block; position: absolute; z-index: 1; left: calc(50% - 300px); top: 85px; width: 600px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #9a86e8 35%, #f2929c 65%, transparent) no-repeat;
  background-size: 45% 100%; background-position: calc(-80% + var(--p, 0) * 260%) 0;
  filter: drop-shadow(0 0 8px rgba(242, 146, 156, 0.9));
}

/* ---- dream: the whole row turns to night ---- */
.motion .ex-night .you { transition: background 0.7s var(--ease), color 0.7s var(--ease); }
.motion .ex-night.night-on .you { background: #1a1536; color: var(--moon); }
.motion .ex-night.night-on .you :is(.ex-text, .when, .turn-you b) { color: var(--moon-2); }
.motion .ex-night.night-on .you .turn-you { color: var(--moon); border-color: var(--lav); }
.motion .ex-night.night-on .you .more { color: var(--moon); }
.motion .ex-night .twin { transition: background 0.7s var(--ease); }
.motion .ex-night.night-on .twin { background: #1a1536; }
.motion .sky {
  display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 0.9s var(--ease);
  background:
    radial-gradient(2px 2px at 6% 22%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 14% 64%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 23% 12%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 31% 80%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 42% 30%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 58% 10%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 66% 86%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 78% 20%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 70%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 95% 34%, #fff 50%, transparent 51%);
}
.motion .ex-night.night-on .sky { opacity: 0.8; }
.motion .ex-night > :is(.you, .twin) { z-index: 1; }
.motion .ex-night .you, .motion .ex-night .twin { background-clip: padding-box; }
.motion .moonrise {
  display: block; position: absolute; z-index: 2; left: 6%; top: 40px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--moon); box-shadow: 0 0 70px 14px rgba(244, 241, 255, 0.4);
  transform: translateY(calc((1 - var(--p, 0)) * 380px)) scale(calc(0.5 + var(--p, 0) * 0.5)); opacity: clamp(0, calc(var(--p, 0) * 2 - 0.6), 1);
}
.motion .moonrise::after { content: ""; position: absolute; left: -14px; top: -8px; width: 64px; height: 64px; border-radius: 50%; background: #1a1536; }

/* ---- lists pop in one by one ---- */
.motion .caps-list > *, .motion .free-list > * {
  --q: clamp(0, calc(var(--p, 0) * 3 - var(--d, 0)), 1);
  opacity: var(--q); transform: translateX(calc((1 - var(--q)) * 140px)) scale(calc(0.8 + var(--q) * 0.2));
}
.motion :is(.caps-list, .free-list) > :nth-child(2) { --d: 0.3; } .motion :is(.caps-list, .free-list) > :nth-child(3) { --d: 0.6; }
.motion :is(.caps-list, .free-list) > :nth-child(4) { --d: 0.9; } .motion :is(.caps-list, .free-list) > :nth-child(5) { --d: 1.2; }
.motion :is(.caps-list, .free-list) > :nth-child(6) { --d: 1.5; }
.motion .caps .you > *, .motion .startfree .you > * { opacity: clamp(0, calc(var(--p, 0) * 2.4), 1); transform: translateX(calc((1 - clamp(0, calc(var(--p, 0) * 2.4), 1)) * -120px)); }

/* ---- closing: the two halves fly in and meet ---- */
.motion .closing .split { overflow: hidden; }
.motion .closing .you .close-h { transform: translateX(calc((1 - var(--p, 0)) * -60vw)) scale(calc(2.2 - var(--p, 0) * 1.2)); transform-origin: 100% 50%; }
.motion .closing .twin .close-h { transform: translateX(calc((1 - var(--p, 0)) * 60vw)) scale(calc(2.2 - var(--p, 0) * 1.2)); transform-origin: 0 50%; }
.motion .closing .split::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(242, 146, 156, 0.5) 30%, rgba(154, 134, 232, 0) 70%);
  opacity: calc(clamp(0, calc((var(--p, 0) - 0.82) * 12), 1) * clamp(0, calc((1.02 - var(--p, 0)) * 9), 1));
  transform: scale(calc(0.3 + var(--p, 0)));
}
.motion .closing :is(.close-text, .cta) { opacity: clamp(0, calc(var(--p, 0) * 4 - 3), 1); }

/* ================= production chrome: the registry-generated nav, account menu and footer links ================= */
.brand { display: inline-flex; align-items: center; }
.brand-wordmark { display: block; width: 84px; height: auto; }
.foot .brand-wordmark { width: 104px; }
.head-twin { display: flex; align-items: center; justify-content: flex-end; }
.head-twin > .nav { max-width: none; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.nav a { padding: 6px 12px; border-radius: 999px; color: var(--moon-2); text-decoration: none; white-space: nowrap; transition: background 0.16s var(--ease), color 0.16s var(--ease); }
.nav a:hover { background: rgba(244, 241, 255, 0.08); color: var(--moon); }
.nav .nav-account { font-weight: 600; }
.nav .nav-download { margin-left: 6px; padding: 8px 18px; background: var(--moon); color: var(--twin); font-weight: 700; }
.nav .nav-download:hover { background: #fff; color: var(--twin); }
.nav a[aria-current="page"] { color: var(--moon); font-weight: 700; }
.nav-user { --line: var(--ink-line); --hover: rgba(58, 47, 102, 0.06); --indigo-soft: var(--paper-2); --muted: var(--ink-2); --surface: #fff; --bg: #fff; --indigo: var(--violet); --grad: var(--seam-x); color: var(--ink); text-align: left; }
.nav-user { position: relative; flex: none; }
.nav-user[hidden], .account-panel[hidden] { display: none; }
.account-trigger, .account-close { font: inherit; cursor: pointer; }
.account-trigger { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #ede8f8; color: #5a469b; font-size: 15px; font-weight: 650; }
.account-trigger:hover { box-shadow: 0 0 0 4px var(--hover); }
.account-trigger[aria-expanded="true"] { box-shadow: 0 0 0 4px var(--indigo-soft); }
.account-panel { position: absolute; top: calc(100% + 14px); right: 0; width: 320px; padding: 30px 24px 20px; border: 1px solid #dce0e6; border-radius: 24px; background: #f6f8fc; box-shadow: 0 8px 28px rgba(30, 40, 60, 0.14); text-align: center; line-height: 1.5; }
.account-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.account-close:hover { background: var(--hover); }
.account-avatar { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: #ede8f8; color: #5a469b; font-size: 24px; font-weight: 600; }
.account-name { margin: 0; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.account-email { margin: 5px 0 22px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.nav .account-manage, .nav .account-billing { display: block; padding: 12px; border-radius: 12px; font-size: 13px; }
.nav .account-manage { border: 1px solid #c7cdd4; background: var(--surface); color: #1967d2; font-weight: 600; }
.nav .account-manage:hover { background: #eef3fc; }
.nav .account-billing { margin-top: 8px; color: var(--muted); }
.nav .account-billing:hover { background: var(--hover); }
@media (max-width: 600px) { .account-panel { position: fixed; top: 72px; right: 16px; width: min(320px, calc(100vw - 32px)); } }
.nav .account-manage, .nav .account-billing { white-space: normal; }
.release-meta { margin-top: 16px; font-size: 13px; color: var(--moon-2); }
.release-meta + .hero-note { margin-top: 2px; }
.foot-links { display: flex; flex-wrap: wrap; align-content: start; gap: 10px 26px; font-size: 15px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-vision small a { text-decoration: none; }
.foot-vision small a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-statement { margin-top: 36px; font-size: 13px; opacity: 0.7; }
.foot-statement + .foot-legal { margin-top: 6px; }
@media (max-width: 980px) {
  .head-twin { justify-content: space-between; }
  .nav { width: 100%; justify-content: flex-end; gap: 0; font-size: 13px; }
  .nav a { padding: 6px 9px; }
}
@media (max-width: 520px) { .nav .nav-product { display: none; } }
.ex-note { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.mail-address { font-family: var(--mono); font-size: 0.94em; white-space: nowrap; }

/* ---- closing: the download button sits on the seam, where the two halves meet ---- */
@media (min-width: 981px) {
  .closing { --close-size: clamp(40px, 5.4vw, 80px); }
  .closing .twin .cta { display: block; margin-top: 128px; }
  .closing .you .close-text { margin-top: 128px; }
  .closing .twin .btn-moon {
    position: absolute; left: 0; top: calc(140px + var(--close-size) * 1.1 + 36px); z-index: 2;
    transform: translateX(-50%);
    min-height: 64px; padding: 12px 40px; white-space: nowrap;
    background: var(--seam-x); color: #fff; font-size: 18px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.5), 0 18px 44px rgba(44, 37, 80, 0.34);
  }
  .closing .twin .btn-moon:hover { background: var(--seam-x); transform: translateX(-50%) translateY(-2px); filter: brightness(1.06); }
  .motion .closing .twin .btn-moon {
    --in: clamp(0, calc(var(--p, 0) * 4 - 3), 1);
    transform: translateX(-50%) scale(calc(0.5 + var(--in) * 0.5));
  }
  .motion .closing .twin .btn-moon:hover { transform: translateX(-50%) translateY(-2px) scale(calc(0.5 + var(--in) * 0.5)); }
  .motion .closing .twin .btn-moon::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(242, 146, 156, 0.55); animation: close-ring 2.4s var(--ease) infinite; pointer-events: none;
  }
}
@keyframes close-ring { 70%, 100% { box-shadow: 0 0 0 22px rgba(242, 146, 156, 0); } }

/* ================= global nav menus (機能 / リソース): the same block lives in site.css and home.css ================= */
.nav { position: relative; }
.nav-menu { position: static; }
.nav-menu > summary {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  color: #cbc4ef; white-space: nowrap; cursor: pointer; list-style: none; user-select: none;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s ease, margin 0.2s ease;
}
.nav-menu[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.nav-menu > summary:hover, .nav-menu[open] > summary { background: rgba(244, 241, 255, 0.1); color: #f4f1ff; }
.nav-menu > summary:focus-visible { outline: 3px solid #f2929c; outline-offset: 2px; }
.nav-panel {
  position: absolute; top: calc(100% + 14px); right: 0; z-index: 20;
  width: min(680px, calc(100vw - 24px)); padding: 18px;
  border-radius: 22px; background: #fff; color: #3a2f66; text-align: left; white-space: normal;
  box-shadow: 0 0 0 1px rgba(58, 47, 102, 0.1), 0 24px 60px rgba(30, 24, 66, 0.28);
  animation: nav-panel-in 0.18s ease both;
}
@keyframes nav-panel-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .nav-panel { animation: none; } }
.nav .nav-panel a { padding: 0; border-radius: 0; background: none; color: #3a2f66; font-weight: 500; white-space: normal; }
.nav .nav-panel a:hover { background: none; color: #6a5cc7; }
.nav-panel-head, .nav-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.nav-panel-head { padding: 2px 6px 12px; }
.nav-panel-head span, .nav-col span { color: #8a82ab; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.nav .nav-panel-head a, .nav .nav-panel-foot a { color: #6a5cc7; font-weight: 600; }
.nav-panel-foot { margin: 14px -18px -18px; padding: 14px 24px; border-radius: 0 0 22px 22px; background: #f6f4fd; }
.nav-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nav .nav-panel .nav-card {
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 168px; padding: 18px;
  border-radius: 16px; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav .nav-panel .nav-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(58, 47, 102, 0.16); }
.nav-card b { font-size: 24px; font-weight: 800; line-height: 1.3; letter-spacing: 0.01em; }
.nav-card span { margin-top: 6px; font-size: 13px; line-height: 1.6; }
.nav .nav-panel .nav-card-write { background: #eeebfb; color: #3a2f66; }
.nav-card-write b::before { content: "# "; color: #b9aef6; }
.nav .nav-panel .nav-card-think, .nav .nav-panel .nav-card-think:hover { background: #2c2550; color: #f4f1ff; }
.nav-card-think span { color: #cbc4ef; }
.nav .nav-panel .nav-card-speak, .nav .nav-panel .nav-card-speak:hover { background: linear-gradient(140deg, #9a86e8, #f2929c); color: #fff; }
.nav-panel-resources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 24px 26px; width: min(560px, calc(100vw - 24px)); }
.nav-col { display: flex; flex-direction: column; gap: 10px; }
.nav-col span { margin-bottom: 4px; }
.nav .nav-panel .nav-col a { font-size: 15px; font-weight: 600; }
@media (max-width: 760px) {
  .nav-menu > summary { padding: 6px 8px; }
  .nav-cards { grid-template-columns: 1fr; }
  .nav .nav-panel .nav-card { min-height: 0; }
  .nav-panel-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 520px) { .nav .nav-product { display: none; } }

/* narrow phones: keep the whole nav row inside the gutter (same block in site.css and home.css) */
@media (max-width: 520px) {
  .nav .nav-menu > summary { padding: 6px 6px; gap: 4px; }
  .nav a.nav-account { padding: 6px 6px; }
  .nav a.nav-download { margin-left: 4px; padding: 8px 14px; }
}
