/* Kasumi website styles: landing page and secondary pages.
 *
 * SECONDARY PAGES (/legal/*.html, /thanks.html)
 * Copy this skeleton. Paths are absolute, so it works from any directory.
 * site.js is optional there: with it the language toggle and the mobile menu
 * work; without it the page still reads correctly.
 *
 *   <html lang="en" class="no-js">
 *   <head> ...
 *     <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&amp;family=Sora:wght@400;500;600;700&amp;display=swap">
 *     <link rel="stylesheet" href="/assets/site.css">
 *     <script defer src="/assets/site.js"></script>
 *   </head>
 *   <body>
 *     <a class="skip-link" href="#main" data-i18n="a11y.skip">Skip to content</a>
 *     <header class="site-header">
 *       <div class="site-header__inner">
 *         <a class="brand" href="/" aria-label="Kasumi home">
 *           <img class="brand__mark" src="/assets/brand/kasumi-symbol.svg" alt="" width="62" height="26">
 *           <img class="brand__word" src="/assets/brand/kasumi-wordmark.svg" alt="Kasumi" width="115" height="13">
 *         </a>
 *         <button class="nav-toggle" type="button" aria-expanded="false" aria-controls="site-nav">
 *           <span class="nav-toggle__bars" aria-hidden="true"></span>
 *           <span class="sr-only" data-i18n="nav.menu">Menu</span>
 *         </button>
 *         <nav class="site-nav" id="site-nav" aria-label="Primary">
 *           <ul class="site-nav__list">
 *             <li><a href="/#why" data-i18n="nav.why">Why Kasumi</a></li>
 *             <li><a href="/#queries" data-i18n="nav.queries">Queries</a></li>
 *             <li><a href="/#deployment" data-i18n="nav.deployment">Deployment</a></li>
 *             <li><a href="/#security" data-i18n="nav.security">Security</a></li>
 *             <li><a href="/#agents" data-i18n="nav.agents">Agents</a></li>
 *             <li><a href="/#support" data-i18n="nav.support">Support</a></li>
 *             <li class="site-nav__ext"><a href="https://github.com/soramitsu/kasumi" rel="noopener">GitHub</a></li>
 *           </ul>
 *         </nav>
 *         <div class="lang" role="group" aria-label="Language">
 *           <a class="lang__opt" href="?lang=en" data-lang="en" lang="en" hreflang="en">EN</a>
 *           <span class="lang__sep" aria-hidden="true">|</span>
 *           <a class="lang__opt" href="?lang=ja" data-lang="ja" lang="ja" hreflang="ja">日本語</a>
 *         </div>
 *       </div>
 *     </header>
 *
 *     <main id="main" class="page" tabindex="-1">
 *       <article class="prose">
 *         <p class="kicker">Legal</p>
 *         <h1>Title</h1>
 *         <p class="prose__meta">Last updated ...</p>
 *         <h2>...</h2> <p>...</p> <ul>...</ul> <table>...</table> <dl>...</dl>
 *       </article>
 *     </main>
 *
 *     <footer class="site-footer"> ... copy the <footer> block from index.html ... </footer>
 *   </body>
 *
 * Bilingual content on a secondary page: either give elements a data-i18n key
 * that exists in the dictionary in site.js, or write both languages in the
 * HTML and mark them class="only-en" / class="only-ja". site.js sets
 * <html lang>, and the .only-en / .only-ja rules in the Base section hide the
 * other one. Without JavaScript <html lang="en"> shows the English blocks.
 * site.js also exposes window.KasumiSite.getLang() / .setLang("ja") and fires
 * a "kasumi:langchange" event on document (detail.lang) after each change.
 * The header is solid on these pages; only <body class="page-home"> makes it
 * transparent over the hero.
 *
 * Other reusable pieces: .btn .btn--primary .btn--ghost, .kicker, .lede,
 * .fineprint, .callout, .link-arrow, .wrap, .wrap--narrow, .sr-only.
 */

/* ───────────── Tokens ───────────── */
:root {
  --red: #E3232C;
  --red-ink: #C1131C;
  --red-deep: #A60E16;
  --ink: #1D1418;
  --ink-2: #4A3C41;
  --ink-3: #6F6066;
  --paper: #FFFFFF;
  --paper-2: #FFF8F4;
  --mist: #FFEFE9;
  --rose: #FFDCD2;
  --peach: #FFC9BB;
  --line: rgba(29, 20, 24, .12);
  --night: #1A1216;
  --night-2: #261A20;
  --night-line: rgba(255, 255, 255, .14);
  --night-text: #F7EEEC;
  --night-muted: #CDBDBF;
  --amber: #FFC27A;
  --focus: #1D1418;
  --radius: 20px;
  --radius-lg: 28px;
  --header-h: 68px;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --font: "Sora", "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", "Noto Sans JP", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}
html:lang(ja) body { line-height: 1.85; line-break: strict; }
img, svg { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol.retry__steps { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.018em; font-weight: 600; text-wrap: balance; }
html:lang(ja) :is(h1, h2, h3, h4) { line-height: 1.4; letter-spacing: .01em; font-weight: 700; word-break: auto-phrase; }
html:lang(ja) :is(.lede, .hero__sub, .status) { word-break: auto-phrase; }
p { text-wrap: pretty; overflow-wrap: break-word; }
a { color: var(--red-ink); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--red-deep); }
code, pre, kbd { font-family: var(--mono); }
:not(pre) > code { font-size: .9em; padding: .12em .4em; border-radius: 6px; background: var(--mist); color: var(--ink); overflow-wrap: anywhere; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
::selection { background: var(--red); color: #fff; }

.ph { display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 100; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; color: #fff; outline-color: var(--red); }

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

/* Language-specific blocks for pages that carry both languages in the HTML. */
html:lang(ja) .only-en { display: none !important; }
html:not(:lang(ja)) .only-ja { display: none !important; }

/* ───────────── Buttons and small text styles ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 14px 30px -14px rgba(227, 35, 44, .7); }
.btn--primary:hover { background: var(--red-ink); color: #fff; transform: translateY(-2px); }
.btn--ghost { background: rgba(255, 255, 255, .6); color: var(--ink); border-color: rgba(29, 20, 24, .7); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; transform: none; }
.btn__icon { flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.kicker, .eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red-ink); }
html:lang(ja) :is(.kicker, .eyebrow) { letter-spacing: .12em; }
.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.kicker::before { content: ""; flex: none; width: 34px; height: 8px; border-radius: 99px; background: var(--red); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 42em; }
.fineprint { font-size: .88rem; color: var(--ink-3); }
.callout { padding: 16px 20px; border-radius: 16px; background: var(--mist); color: var(--ink); font-size: .95rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; text-decoration: none; }
.link-arrow::after { content: ""; width: .5em; height: .5em; border-top: 2px solid; border-right: 2px solid; transform: rotate(45deg); transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px) rotate(45deg); }

/* ───────────── Header ───────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s, border-color .3s;
}
.page-home .site-header:not(.is-scrolled):not(.is-open) { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header__inner { height: 100%; max-width: calc(1320px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; padding: 6px 4px; border-radius: 10px; }
.brand__mark { display: block; height: 26px; width: auto; }
.brand__word { display: block; height: 13px; width: auto; }

.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a { display: block; padding: 10px 12px; border-radius: 10px; font-size: .92rem; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--red-ink); background: rgba(227, 35, 44, .07); }
.site-nav__ext a { margin-left: 6px; border: 1.5px solid rgba(29, 20, 24, .7); border-radius: 999px; padding: 8px 16px; font-weight: 600; }
.site-nav__ext a:hover { background: var(--ink); color: #fff; }

.lang { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; font-size: .86rem; white-space: nowrap; }
.lang__opt { padding: 8px 8px; border-radius: 8px; color: var(--ink-3); font-weight: 500; text-decoration: none; }
.lang__opt:hover { color: var(--ink); }
.lang__opt[aria-current="true"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: .4em; }
.lang__sep { color: var(--ink-3); opacity: .6; }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; position: relative; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { position: absolute; left: 11px; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle__bars { top: 21px; }
.nav-toggle__bars::before { content: ""; left: 0; top: -7px; }
.nav-toggle__bars::after { content: ""; left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(90deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { opacity: 0; }

/* Without JavaScript the header cannot change on scroll, so it stays at the top of the page. */
.no-js .site-header { position: absolute; }
.no-js .code__copy { display: none; }

@media (max-width: 1039px) {
  .nav-toggle { display: block; order: 3; }
  .lang { order: 2; margin-left: 0; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 30px 40px -30px rgba(29, 20, 24, .35); padding: 8px var(--gutter) 20px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .site-header.is-open .site-nav { display: block; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav__ext a { margin: 16px 0 0; text-align: center; border-radius: 999px; border: 1.5px solid rgba(29, 20, 24, .7); }
  .no-js .nav-toggle { display: none; }
  .no-js .site-header { position: absolute; height: auto; }
  .no-js .site-header__inner { flex-wrap: wrap; padding-block: 12px; }
  .no-js .site-nav { display: block; position: static; order: 4; width: 100%; padding: 0; box-shadow: none; border: 0; background: transparent; }
  .no-js .site-nav__list { flex-direction: row; flex-wrap: wrap; }
  .no-js .site-nav a { border: 0; padding: 8px 10px; font-size: .9rem; }
}
@media (max-width: 380px) {
  .brand__word { display: none; }
}

/* ───────────── Hero ───────────── */
.hero {
  position: relative;
  --stage-w: max(min(118vw, 100vh), 540px);
  --stage-h: calc(var(--stage-w) * .43956);
}
.hero__pin {
  position: relative; display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;
  overflow: hidden; overflow: clip; isolation: isolate;
  background: linear-gradient(180deg, #FFFBF8 0%, #FFEFE7 26%, #FFD9CC 50%, #FFBEAE 74%, #FFB5A4 100%);
}
.scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.scene::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 88%); }
.stage { position: absolute; left: calc(50% - var(--stage-w) * .565); bottom: clamp(24px, 5vh, 56px); width: var(--stage-w); height: var(--stage-h); }

.layer { position: absolute; transform-origin: 0 0; will-change: transform, opacity; }
.layer > svg:not(.shide) { display: block; width: 100%; height: 100%; }
.layer--hi { left: 0; top: 0; width: 150%; height: 150%; transform: scale(.666667); }
.layer--hi > .art { position: absolute; inset: 0; }
.rocks path, .fgmist path { fill: var(--red); }

.shide { position: absolute; display: block; overflow: visible; will-change: transform; animation: sway 5.6s ease-in-out infinite alternate; }
.shide--1 { left: 64.835%; top: 51.254%; width: 2.953%; height: 14.918%; transform-origin: 50.4% 7.4%; animation-duration: 4.8s; animation-delay: -1.2s; }
.shide--2 { left: 60.169%; top: 50.943%; width: 3.086%; height: 15.456%; transform-origin: 45.2% 7.3%; animation-duration: 5.4s; animation-delay: -3.1s; }
.shide--3 { left: 55.602%; top: 48.390%; width: 2.978%; height: 15.604%; transform-origin: 46.9% 8.1%; animation-duration: 6.1s; animation-delay: -.4s; }
.shide--4 { left: 51.071%; top: 43.722%; width: 3.050%; height: 16.107%; transform-origin: 48.0% 8.1%; animation-duration: 5.2s; animation-delay: -2.3s; }
.shide--5 { left: 46.836%; top: 36.457%; width: 3.089%; height: 16.080%; transform-origin: 48.2% 9.6%; animation-duration: 6.4s; animation-delay: -4.2s; }
@keyframes sway { from { transform: rotate(-3.2deg); } to { transform: rotate(3.6deg); } }
.hero.is-idle .shide, .hero.is-idle .status::after { animation-play-state: paused; }

.sun-glow { left: 14%; top: -47%; width: 88%; height: 200.2%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 246, 240, .78), rgba(255, 240, 232, .42) 38%, rgba(255, 240, 232, 0) 100%); }
.sun { left: 44.99%; top: 23.44%; width: 26.1%; height: 59.375%; }
.sun__disc { width: 100%; height: 100%; border-radius: 50%; background: #fff; box-shadow: 0 0 44px 4px rgba(255, 255, 255, .55); animation: sunrise 2.6s var(--ease) both; }
@keyframes sunrise { from { transform: translate3d(0, 24%, 0); } to { transform: none; } }
.ring { border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .85); }
.ring--1 { left: 39.84%; top: 11.7%; width: 36.4%; height: 82.8%; }
.ring--2 { left: 34%; top: -1.6%; width: 48.08%; height: 109.4%; border-color: rgba(255, 255, 255, .6); }

.sea { left: -150%; width: 400%; top: 77.5%; height: 140%; background: linear-gradient(180deg, #FFA997 0, #FFC0B1 7%, #FFDDD3 26%, #fff 62%); }
.ridge--far { left: -70%; width: 240%; top: 62.6%; height: 15.2%; }
.ridge--far path { fill: #F9A594; }
.islet--a { left: 3.5%; top: 70.6%; width: 13%; height: 7.2%; }
.islet--b { left: 88%; top: 71.6%; width: 11%; height: 6.2%; }
.islet path { fill: #EF8479; }

.mist { border-radius: 999px; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); height: calc(var(--h) * 1%); }
.mist--white { background: rgba(255, 255, 255, var(--a, .92)); }
.mist--veil { background: rgba(255, 255, 255, .6); }
.mist--sky { background: #FFD3C6; }
.mist--rose { background: #FFCFC3; }
.mist--red { background: var(--red); }
.m-s1 { --x: 47; --y: 56; --w: 25; --h: 3.4; }
.m-s2 { --x: 55.5; --y: 64.6; --w: 17; --h: 2.4; }
.m-f1 { --x: 28; --y: 11; --w: 27; --h: 3; }
.m-f2 { --x: 72; --y: 8; --w: 46; --h: 3.4; }
.m-f3 { --x: 86; --y: 31; --w: 32; --h: 2.6; }
.m-h1 { --x: -40; --y: 73.4; --w: 60; --h: 3.2; --a: .8; }
.m-h2 { --x: 76; --y: 73.6; --w: 54; --h: 3; --a: .8; }
.m-h3 { --x: 20; --y: 79.4; --w: 26; --h: 2.2; }
.m-m1 { --x: 90; --y: 60; --w: 40; --h: 4.2; --a: .9; }
.m-m2 { --x: -32; --y: 67.5; --w: 38; --h: 3.8; --a: .85; }
.m-r1 { --x: 80; --y: 88.6; --w: 20; --h: 3.4; }
.m-n1 { --x: -30; --y: 87; --w: 56; --h: 6.4; --a: .96; }
.m-n2 { --x: 62; --y: 95; --w: 70; --h: 7.4; --a: .96; }
.m-n3 { --x: 6; --y: 103; --w: 70; --h: 9; --a: 1; }
.m-n4 { --x: -60; --y: 112; --w: 150; --h: 16; --a: 1; }

.hero__fog { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .7), #fff 62%); opacity: 0; will-change: opacity; }
.hero__veil { position: absolute; inset: 0; background: #FFF7F2; opacity: 0; animation: veil-out 1.8s ease-out both; }
@keyframes veil-out { from { opacity: 1; } to { opacity: 0; } }

.hero__content {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(20px, 5vh, 64px));
  padding-bottom: calc(var(--stage-h) + clamp(24px, 5vh, 56px) + 4px);
  will-change: transform, opacity;
}
.hero__eyebrow { margin-bottom: clamp(14px, 2.4vh, 24px); animation: rise .9s var(--ease) .05s both; }
.hero__title { font-size: clamp(2rem, 8.4vw, 3.4rem); max-width: 15.5em; font-weight: 600; letter-spacing: -.03em; line-height: 1.08; animation: rise 1s var(--ease) .12s both; }
html:lang(ja) .hero__title { font-size: clamp(1.6rem, 6.6vw, 2.75rem); max-width: 17em; line-height: 1.32; letter-spacing: 0; }
.hero__sub { margin-top: clamp(14px, 2.6vh, 26px); max-width: 31em; font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--ink-2); animation: rise 1s var(--ease) .22s both; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 3.4vh, 34px); animation: rise 1s var(--ease) .32s both; }
.status { position: relative; margin-top: clamp(18px, 3vh, 30px); padding-left: 22px; max-width: 36em; font-size: .86rem; line-height: 1.55; color: var(--ink-2); animation: rise 1s var(--ease) .42s both; }
.status::before, .status::after { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.status::after { animation: ping 2.4s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }

@media (max-width: 520px) {
  :root { --header-h: 60px; }
  .hero__content { padding-top: calc(var(--header-h) + 18px); }
  .hero__eyebrow { font-size: .68rem; letter-spacing: .08em; margin-bottom: 12px; }
  .hero__cta { gap: 10px; }
  .hero__cta .btn { min-height: 48px; padding: 10px 18px; font-size: .95rem; }
  .hero__cta .btn__icon { display: none; }
  .status { font-size: .8rem; }
}
@media (min-width: 1000px) and (min-height: 640px) {
  .hero { --stage-w: min(80vw, 118vh, 1240px); }
  .stage { left: auto; right: calc(var(--stage-w) * -.14); bottom: 7%; }
  .hero__content { padding-bottom: 0; padding-top: calc(var(--header-h) + clamp(28px, 7.5vh, 104px)); }
  .hero__title { font-size: clamp(2.6rem, min(4.5vw, 7.4vh), 4.1rem); }
  html:lang(ja) .hero__title { font-size: clamp(2.1rem, min(3.6vw, 6vh), 3.2rem); }
  .hero__sub { max-width: 27em; }
  .status { max-width: 30em; }
}
@media (min-width: 1000px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
  .js .hero { height: calc(100vh + 80vh); height: calc(100svh + 80vh); }
  .js .hero__pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
}

/* ───────────── Sections ───────────── */
.section { position: relative; padding-block: clamp(72px, 10vw, 136px); }
.section--mist { background: linear-gradient(180deg, #FFF9F6 0%, #FFEFE9 100%); }
.section__head { max-width: 54rem; margin-bottom: clamp(36px, 5vw, 64px); }
.section__head h2, .split__text h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); margin-bottom: 20px; }
html:lang(ja) :is(.section__head h2, .split__text h2) { font-size: clamp(1.5rem, 3vw, 2.3rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .kicker { justify-content: center; }
.section__head--center .lede { margin-inline: auto; }
.section__more { margin-top: 36px; }
h3 { font-size: 1.16rem; }

.veil { position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; z-index: 2; overflow-x: clip; overflow-y: visible; }
.veil__band { position: absolute; height: clamp(16px, 2.2vw, 30px); border-radius: 999px; will-change: transform; }
.veil__band--a { left: -10%; width: 48%; top: -44px; background: var(--rose); }
.veil__band--b { left: 46%; width: 66%; top: -12px; background: var(--mist); }
.veil__band--c { left: 68%; width: 26%; top: 34px; height: clamp(8px, 1vw, 12px); background: var(--red); }
.veil--tint .veil__band--a { background: #fff; top: -30px; }
.veil--tint .veil__band--b { background: var(--rose); top: 8px; }

.sheet { margin-inline: clamp(8px, 1.6vw, 28px); border-radius: clamp(24px, 3.4vw, 48px); z-index: 1; }
.sheet--night {
  --focus: #fff;
  color: var(--night-text);
  background: radial-gradient(1100px 520px at 88% -8%, rgba(227, 35, 44, .28), rgba(227, 35, 44, 0) 62%), radial-gradient(900px 420px at -6% 108%, rgba(227, 35, 44, .16), rgba(227, 35, 44, 0) 60%), var(--night);
  box-shadow: 0 50px 90px -50px rgba(29, 20, 24, .65);
}
.sheet--night .kicker { color: #FF8A90; }
.sheet--night .lede, .sheet--night .fineprint { color: var(--night-muted); }
.sheet--night a { color: #FF9CA1; }
.sheet--night :not(pre) > code { background: rgba(255, 255, 255, .1); color: #fff; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split__text > * + * { margin-top: 20px; }
.split__text > .kicker + h2 { margin-top: 0; }
@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split--flip > :first-child { order: 2; }
}

/* Reveal on scroll (JS adds .is-in; without JS everything is visible). */
.reveal { transition: opacity .7s ease, transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js .reveal:not(.is-in) { opacity: 0; transform: translate3d(0, 28px, 0); }

/* ───────────── Cards with 3D tilt ───────────── */
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.card {
  position: relative; grid-column: span 2; padding: clamp(24px, 2.6vw, 34px); border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(29, 20, 24, .03), 0 30px 50px -36px rgba(166, 14, 22, .45);
}
.card--wide { grid-column: span 3; }
.card h3 { margin: 22px 0 10px; font-size: 1.22rem; }
.card p { color: var(--ink-2); font-size: .98rem; }
.card__num { position: absolute; right: 26px; top: 24px; font: 600 .8rem var(--mono); color: var(--red-ink); letter-spacing: .08em; }
.card__icon { display: block; color: var(--red); width: 56px; height: 56px; padding: 11px; border-radius: 18px; background: var(--mist); }
.card__clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.card__glare { position: absolute; left: -180px; top: -180px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(227, 35, 44, .16), rgba(227, 35, 44, 0)); opacity: 0; transform: translate3d(var(--gx, 0px), var(--gy, 0px), 0); transition: opacity .3s; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--mist); font-size: .8rem; font-weight: 600; color: var(--red-deep); }

[data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; }
.tilt { transition: transform .6s var(--ease), opacity .7s ease, box-shadow .3s; transition-delay: calc(var(--d, 0) * 70ms); }
[data-tilt].is-tilting { transition: transform .12s linear; }
.tilt.is-tilting { box-shadow: 0 1px 0 rgba(29, 20, 24, .03), 0 44px 60px -34px rgba(166, 14, 22, .55); }
.tilt.is-tilting .card__glare { opacity: 1; }
.tilt .pop { transform: translateZ(0); transition: transform .5s var(--ease); }
.tilt.is-tilting .pop { transform: translateZ(34px); }
.tilt.is-tilting .card__num.pop { transform: translateZ(54px); }

@media (max-width: 1000px) {
  .card, .card--wide { grid-column: span 3; }
  .card:last-child { grid-column: span 6; }
}
@media (max-width: 640px) {
  .card, .card--wide, .card:last-child { grid-column: span 6; }
}

/* ───────────── Code windows ───────────── */
.code { border-radius: 18px; background: #130D10; color: #F1E6E4; border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; box-shadow: 0 40px 60px -40px rgba(29, 20, 24, .7); }
.code__bar { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px 8px 18px; border-bottom: 1px solid rgba(255, 255, 255, .09); font: 500 .78rem var(--mono); color: var(--night-muted); }
.code__dots { flex: none; width: 10px; height: 10px; margin-right: 34px; border-radius: 50%; background: var(--red); box-shadow: 17px 0 0 #5C4A50, 34px 0 0 #5C4A50; }
.code__name { margin-right: auto; }
.code__copy { --focus: #fff; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #fff; font: 600 .76rem var(--font); }
.code__copy:hover { background: rgba(255, 255, 255, .12); }
.code__body { --focus: #fff; margin: 0; padding: 18px 20px 22px; overflow-x: auto; font-size: .84rem; line-height: 1.75; tab-size: 2; -webkit-overflow-scrolling: touch; }
.code__body:focus-visible { outline-offset: -3px; border-radius: 0 0 18px 18px; }
.code__body code { font-size: inherit; }
.t-k, .t-m { color: #FF8188; }
.t-s { color: #FFD3AE; }
.t-n { color: #A9E3D2; }
.t-f { color: #fff; font-weight: 600; }
.t-p { color: #FFA9AD; }
.t-c { color: #A89499; font-style: italic; }
.split__text > .code { margin-top: 28px; }
.retries .code__body { font-size: .8rem; }
@media (min-width: 961px) { .retries .split { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); } }

/* ───────────── Retry explainer ───────────── */
.retry { --step-ms: 3400ms; padding: clamp(16px, 2.4vw, 28px); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .045); border: 1px solid var(--night-line); }
.retry__board { display: grid; grid-template-columns: minmax(0, 1fr) clamp(64px, 24%, 150px) minmax(0, 1fr); align-items: stretch; }
.retry__node { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid var(--night-line); min-height: 172px; }
.retry__node--db { background: rgba(227, 35, 44, .16); border-color: rgba(255, 138, 144, .4); }
.retry__role { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--night-muted); }
.retry__node--db .retry__role { color: #fff; }
.retry__key, .retry__ledger-key { font: 500 .72rem/1.4 var(--mono); color: #fff; overflow-wrap: anywhere; }
.retry__key { align-self: flex-start; padding: 5px 9px; border-radius: 8px; background: rgba(255, 255, 255, .1); }
.retry__ledger { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: rgba(19, 13, 16, .55); border: 1px dashed rgba(255, 255, 255, .28); }
.retry__ledger-val { font: 600 .72rem/1.4 var(--mono); color: #FFD3AE; }
.retry__states { display: grid; margin-top: auto; }
.retry__state { grid-area: 1 / 1; font-size: .8rem; line-height: 1.4; color: var(--night-muted); opacity: 0; transition: opacity .35s; }
.retry__state--warn { color: var(--amber); }
.retry__state--ok { color: #9FE8C9; }
.retry[data-step="1"] [data-on="1"], .retry[data-step="2"] [data-on="2"], .retry[data-step="3"] [data-on="3"], .retry[data-step="4"] [data-on="4"] { opacity: 1; }
.retry__count { font-size: .76rem; color: var(--night-muted); }
.retry__count b { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: #fff; color: var(--red-deep); font-family: var(--mono); }

.retry__wire { position: relative; container-type: inline-size; }
.retry__line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 6px, rgba(255, 255, 255, 0) 6px 12px); }
.retry__packet { position: absolute; left: 0; top: 50%; height: 26px; margin-top: -13px; padding: 0 9px; border-radius: 13px; display: flex; align-items: center; font: 700 .66rem var(--mono); white-space: nowrap; opacity: 0; }
.retry__packet--req { background: #fff; color: var(--ink); }
.retry__packet--res { background: var(--red); color: #fff; }
.retry__cut { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--night); border: 2px solid var(--amber); opacity: 0; }
.retry__cut::before, .retry__cut::after { content: ""; position: absolute; left: 5px; right: 5px; top: 10px; height: 2px; border-radius: 2px; background: var(--amber); transform: rotate(45deg); }
.retry__cut::after { transform: rotate(-45deg); }

.retry[data-step="1"] .retry__packet--req, .retry[data-step="3"] .retry__packet--req { animation: req-go var(--step-ms) var(--ease) both; }
.retry[data-step="2"] .retry__packet--res { animation: res-drop var(--step-ms) ease-in both; }
.retry[data-step="4"] .retry__packet--res { animation: res-go var(--step-ms) var(--ease) both; }
.retry[data-step="2"] .retry__cut { animation: cut-in var(--step-ms) both; }
.retry[data-step="1"] .retry__ledger, .retry[data-step="1"] .retry__count { animation: ledger-in var(--step-ms) both; }
.retry[data-step="3"] .retry__ledger { animation: ledger-hit var(--step-ms) both; }
.retry[data-step="4"] .retry__count b { animation: count-hit var(--step-ms) both; }
.retry.is-paused * { animation-play-state: paused !important; }
@keyframes req-go { 0% { opacity: 0; transform: translateX(-20%); } 10% { opacity: 1; transform: translateX(0); } 58% { opacity: 1; transform: translateX(calc(100cqw - 100%)); } 70%, 100% { opacity: 0; transform: translateX(calc(100cqw - 80%)); } }
@keyframes res-go { 0% { opacity: 0; transform: translateX(calc(100cqw - 80%)); } 12% { opacity: 1; transform: translateX(calc(100cqw - 100%)); } 58% { opacity: 1; transform: translateX(0); } 72%, 100% { opacity: 0; transform: translateX(-20%); } }
@keyframes res-drop { 0% { opacity: 0; transform: translateX(calc(100cqw - 80%)); } 12% { opacity: 1; transform: translateX(calc(100cqw - 100%)); } 40% { opacity: 1; transform: translateX(calc(50cqw - 50%)); } 60%, 100% { opacity: 0; transform: translateX(calc(50cqw - 50%)) translateY(34px) rotate(16deg); } }
@keyframes cut-in { 0%, 36% { opacity: 0; transform: scale(.4); } 46%, 100% { opacity: 1; transform: scale(1); } }
@keyframes ledger-in { 0%, 56% { opacity: 0; } 66%, 100% { opacity: 1; } }
@keyframes ledger-hit { 0%, 56% { border-color: rgba(255, 255, 255, .28); } 66%, 100% { border-color: #FFD3AE; } }
@keyframes count-hit { 0%, 20% { transform: scale(1); } 34% { transform: scale(1.35); } 50%, 100% { transform: scale(1); } }
@supports not (width: 1cqw) {
  .retry__packet--req, .retry__packet--res { left: 50%; margin-left: -28px; }
  @keyframes req-go { 0%, 100% { opacity: 0; } 20%, 60% { opacity: 1; } }
  @keyframes res-go { 0%, 100% { opacity: 0; } 20%, 60% { opacity: 1; } }
  @keyframes res-drop { 0%, 100% { opacity: 0; } 20%, 45% { opacity: 1; } }
}

.retry__steps { display: grid; gap: 6px; margin: 20px 0 0; }
.retry__step { --focus: #fff; position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid transparent; background: transparent; text-align: left; overflow: hidden; transition: background-color .3s, border-color .3s; }
.retry__step:hover { background: rgba(255, 255, 255, .05); }
.retry__step[aria-current="step"] { background: rgba(255, 255, 255, .08); border-color: var(--night-line); }
.retry__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .4); font: 700 .8rem var(--mono); transition: background-color .3s, border-color .3s; }
.retry__step[aria-current="step"] .retry__n { background: var(--red); border-color: var(--red); color: #fff; }
.retry__t { display: grid; gap: 2px; font-size: .86rem; line-height: 1.5; color: var(--night-muted); }
.retry__t b { font-size: .96rem; font-weight: 600; color: var(--night-text); }
.retry__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }
.retry.is-playing .retry__step[aria-current="step"] .retry__bar { animation: bar var(--step-ms) linear both; }
@keyframes bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.retry__toggle { --focus: #fff; display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 9px 16px 9px 12px; border-radius: 999px; border: 1px solid var(--night-line); background: transparent; color: var(--night-muted); font-size: .82rem; font-weight: 600; }
.retry__toggle:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }
.retry__toggle-icon { width: 12px; height: 12px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.retry__toggle[data-paused="true"] .retry__toggle-icon { width: 0; height: 0; border: 6px solid transparent; border-left: 10px solid currentColor; border-right: 0; margin-left: 2px; }
.no-js .retry__toggle { display: none; }
@media (max-width: 520px) {
  .retry__node { padding: 12px; min-height: 190px; }
  .retry__packet { font-size: .6rem; padding: 0 7px; }
}

/* ───────────── Querying ───────────── */
.queries__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.codestack { padding-block: 10px; }
.codestack__back { margin-left: 12%; transform: translateZ(-50px); }
.codestack__back .code__body { padding-bottom: 46px; }
.codestack__front { position: relative; z-index: 1; margin: -30px 9% 0 0; transform: translateZ(50px); box-shadow: 0 50px 70px -40px rgba(29, 20, 24, .85); }
.facts { display: grid; }
.fact { padding: 20px 0; border-top: 1px solid var(--line); }
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact h3 { margin-bottom: 6px; font-size: 1.08rem; }
.fact h3 code { font-size: .95em; background: var(--mist); color: var(--red-deep); }
.fact p { color: var(--ink-2); font-size: .96rem; }
@media (max-width: 960px) {
  .queries__grid { grid-template-columns: minmax(0, 1fr); }
  .codestack__back { margin-left: 6%; }
  .codestack__front { margin-right: 4%; }
}

/* ───────────── Deployment modes: a deck that fans out, plates that explode ───────────── */
.deck { --deck-gap: clamp(16px, 2vw, 28px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--deck-gap); margin: 0; perspective: 1700px; }
.mode {
  position: relative; padding: clamp(22px, 2.4vw, 32px); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line);
  box-shadow: 0 40px 70px -44px rgba(166, 14, 22, .5);
  transition: transform 1s var(--ease), opacity .6s ease, box-shadow .4s;
}
.mode h3 { font-size: 1.4rem; margin: 4px 0 10px; }
.mode > p { color: var(--ink-2); font-size: .97rem; }
.mode__tag { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red-ink) !important; }
.legend { display: grid; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.legend__item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.legend__item::before { content: ""; width: 12px; height: 12px; border-radius: 4px; transform: translateY(1px); }
.legend__item--red::before { background: var(--red); }
.legend__item--ink::before { background: #2B1E23; }
.legend__item--rose::before { background: #FFB5A6; }
.legend__item--glass::before { background: #fff; border: 1.5px solid var(--ink); }

.iso { height: 230px; display: grid; place-items: end center; padding-bottom: 34px; perspective: 1100px; }
.iso__stack { --gap: 26px; position: relative; width: 128px; height: 128px; transform: rotateX(57deg) rotateZ(-45deg); transform-style: preserve-3d; }
.iso__stack::before { content: ""; position: absolute; inset: -4%; border-radius: 28px; background: radial-gradient(closest-side, rgba(166, 14, 22, .34), rgba(166, 14, 22, 0)); transform: translateZ(-26px) scale(1.25); }
.plate { position: absolute; inset: 0; border-radius: 22%; transform: translateZ(calc(var(--i) * var(--gap))); transition: transform .8s var(--ease); }
.plate--0 { --i: 0; } .plate--1 { --i: 1; } .plate--2 { --i: 2; } .plate--3 { --i: 3; } .plate--4 { --i: 4; }
.plate--red { background: linear-gradient(135deg, #F0444C, var(--red)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); }
.plate--ink { background: linear-gradient(135deg, #3A2A30, #23181C); }
.plate--rose { background: linear-gradient(135deg, #FFCCC0, #FFAE9E); }
.plate--glass { background: rgba(255, 255, 255, .62); border: 1.5px solid rgba(29, 20, 24, .75); }
.iso__stack--trio { width: 172px; }
.voter { position: absolute; top: 0; bottom: 0; width: 29%; transform-style: preserve-3d; }
.voter--a { left: 0; } .voter--b { left: 35.5%; } .voter--c { left: 71%; }
.plate--control { inset: 34% -5%; border-radius: 16px; }
.mode:hover .iso__stack, .mode:focus-within .iso__stack { --gap: 38px; }
.js .deck:not(.is-in) .iso__stack { --gap: 5px; }
.platform { margin-top: 36px; text-align: center; font-size: .94rem; color: var(--ink-2); }

@media (min-width: 961px) {
  .mode:nth-child(1) { transform: rotateY(8deg) translateZ(-40px); transform-origin: 100% 50%; }
  .mode:nth-child(2) { transform: translateZ(26px); z-index: 1; }
  .mode:nth-child(3) { transform: rotateY(-8deg) translateZ(-40px); transform-origin: 0 50%; }
  .mode:hover, .mode:focus-within { transform: translateZ(60px); z-index: 2; box-shadow: 0 60px 90px -44px rgba(166, 14, 22, .6); }
  .js .deck:not(.is-in) .mode:nth-child(1) { transform: translate3d(calc(100% + var(--deck-gap)), 26px, -140px) rotateZ(-5deg); }
  .js .deck:not(.is-in) .mode:nth-child(2) { transform: translate3d(0, 26px, 0); }
  .js .deck:not(.is-in) .mode:nth-child(3) { transform: translate3d(calc(-100% - var(--deck-gap)), 26px, -280px) rotateZ(5deg); }
  .deck.is-in .mode:nth-child(1), .deck.is-in .mode:nth-child(3) { transition-delay: .08s; }
}
@media (max-width: 960px) {
  .deck { grid-template-columns: minmax(0, 1fr); max-width: 34rem; margin-inline: auto; }
  .js .deck:not(.is-in) .mode { opacity: 0; transform: translate3d(0, 40px, 0) scale(.96); }
  .deck.is-in .mode:nth-child(2) { transition-delay: .1s; }
  .deck.is-in .mode:nth-child(3) { transition-delay: .2s; }
}

/* ───────────── Security ───────────── */
.shield { position: relative; width: 100%; max-width: 460px; aspect-ratio: 1 / .94; margin-inline: auto; transform: perspective(1100px) rotateX(var(--rx, 10deg)) rotateY(var(--ry, -18deg)); transition: transform .7s var(--ease), opacity .7s ease; }
.shield__layer { position: absolute; display: flex; align-items: flex-start; padding: 12px 16px; border-radius: 26px; border: 1.5px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .04); font: 500 .72rem/1.3 var(--mono); color: var(--night-muted); }
.shield__layer--1 { inset: 0; transform: translateZ(-70px); }
.shield__layer--2 { inset: 13%; transform: translateZ(-14px); border-color: rgba(255, 255, 255, .42); }
.shield__layer--3 { inset: 26%; transform: translateZ(42px); border-color: rgba(255, 138, 144, .8); background: rgba(227, 35, 44, .12); color: #FFC5C8; }
.shield__layer--4 { inset: 39%; transform: translateZ(98px); align-items: center; justify-content: center; text-align: center; padding: 8px; border-color: transparent; background: var(--red); color: #fff; font-weight: 700; box-shadow: 0 30px 50px -18px rgba(227, 35, 44, .8); }
.oplist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 32px; margin-top: 34px !important; }
.oplist h3 { font-size: 1.02rem; margin-bottom: 6px; padding-top: 14px; border-top: 2px solid var(--red); }
.oplist p { font-size: .92rem; color: var(--night-muted); }
@media (max-width: 560px) {
  .oplist { grid-template-columns: minmax(0, 1fr); }
  .shield__layer { font-size: .58rem; padding: 8px 10px; border-radius: 18px; letter-spacing: -.01em; }
  .shield__layer--4 { inset: 36%; font-size: .6rem; }
}

/* ───────────── Agents ───────────── */
.tools { padding: 10px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: 0 50px 80px -50px rgba(166, 14, 22, .55); transition: transform .6s var(--ease), opacity .7s ease; }
.tools__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 14px; font: 600 .8rem var(--mono); color: var(--ink-3); }
.tools__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.tool { display: grid; grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr); gap: 4px 18px; align-items: baseline; padding: 15px 16px; border-top: 1px solid var(--line); font-size: .93rem; color: var(--ink-2); transform: translateZ(0); transition: transform .4s var(--ease), background-color .2s; }
.tool code { padding: 0; background: none; font-size: .9rem; font-weight: 600; color: var(--red-deep); }
.tool:hover { background: var(--paper-2); }
.tools.is-tilting .tool:hover { transform: translateZ(26px); }
@media (max-width: 520px) { .tool { grid-template-columns: minmax(0, 1fr); } }

/* ───────────── Quickstart ───────────── */
.term .code__body { font-size: .8rem; }

/* ───────────── Support plans ───────────── */
.plans__fallback { text-align: center; color: var(--ink-2); }
.plans__controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; margin-bottom: 36px; }
.seg { display: inline-flex; margin: 0; padding: 4px; border: 0; border-radius: 999px; background: var(--mist); min-width: 0; }
.seg[disabled] { opacity: .6; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg__label { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg input:checked + .seg__label { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(29, 20, 24, .14), 0 8px 18px -10px rgba(29, 20, 24, .4); }
.seg input:focus-visible + .seg__label { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg__save { padding: 2px 8px; border-radius: 99px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 264px), 1fr)); gap: 20px; align-items: stretch; }
.tier { position: relative; display: flex; flex-direction: column; padding: clamp(24px, 2.6vw, 34px); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: 0 40px 60px -48px rgba(29, 20, 24, .5); }
.tier--featured { border: 2px solid var(--red); box-shadow: 0 50px 80px -44px rgba(227, 35, 44, .6); }
.tier__flag { position: absolute; top: -13px; left: 28px; padding: 3px 12px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.tier__audience { font-size: .8rem; font-weight: 600; color: var(--red-ink); }
.tier__name { font-size: 1.5rem; margin-top: 4px; }
.tier__summary { margin-top: 10px; font-size: .94rem; color: var(--ink-2); }
.tier__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 24px; }
.tier__amount { font-size: clamp(2rem, 3.2vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tier__amount--text { font-size: clamp(1.6rem, 2.6vw, 2rem); letter-spacing: -.01em; }
.tier__per { font-size: .92rem; color: var(--ink-3); }
.tier__detail { min-height: 3.2em; margin-top: 8px; font-size: .84rem; line-height: 1.5; color: var(--ink-2); }
.tier__detail b { color: var(--red-deep); }
.tier__list { display: grid; gap: 10px; margin: 20px 0 28px !important; padding-top: 20px !important; border-top: 1px solid var(--line); font-size: .93rem; }
.tier__list li { position: relative; padding-left: 28px; }
.tier__list li::before, .tick::before { content: ""; position: absolute; left: 4px; top: .34em; width: 12px; height: 7px; border-left: 2.4px solid var(--red); border-bottom: 2.4px solid var(--red); transform: rotate(-45deg); }
.tier__cta { margin-top: auto; }
.tier__error { margin-top: 12px; font-size: .86rem; line-height: 1.5; color: var(--red-deep); }
.tier__error:empty { display: none; }
.tier__error a { font-weight: 600; color: inherit; }
.btn.is-loading { position: relative; pointer-events: none; opacity: 1; }
.btn.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.4px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.plans__notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; margin-top: 28px; font-size: .88rem; color: var(--ink-3); text-align: center; }
.plans__notes a { font-weight: 600; }
.plans__h { margin: clamp(48px, 7vw, 88px) 0 24px; font-size: clamp(1.3rem, 2.2vw, 1.7rem); text-align: center; }

.matrix-wrap { --focus: var(--ink); position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; -webkit-overflow-scrolling: touch; }
.matrix { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .92rem; }
.matrix th, .matrix td { padding: 14px 18px; text-align: center; border-bottom: 1px solid var(--line); }
.matrix thead th { font-size: 1rem; font-weight: 700; padding-block: 18px; }
.matrix th[scope="row"] { position: sticky; left: 0; z-index: 1; min-width: 11rem; max-width: 18rem; text-align: left; font-weight: 500; color: var(--ink-2); background: #fff; }
.matrix thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
.matrix__group th { position: sticky; left: 0; text-align: left; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red-ink); background: var(--paper-2); }
.matrix tbody:last-child tr:last-child :is(th, td) { border-bottom: 0; }
.matrix .is-featured { background: rgba(227, 35, 44, .055); }
.matrix thead .is-featured { color: var(--red-deep); }
@media (max-width: 560px) {
  .matrix th, .matrix td { padding: 12px; }
  .matrix th[scope="row"] { min-width: 8.6rem; }
}
.tick, .dash { position: relative; display: inline-block; width: 20px; height: 16px; vertical-align: middle; }
.dash::before { content: ""; position: absolute; left: 4px; right: 4px; top: 7px; height: 2px; border-radius: 2px; background: rgba(29, 20, 24, .28); }

.sevs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.sev { padding: 22px 24px; border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line); }
.sev__level { display: inline-block; padding: 3px 12px; border-radius: 99px; border: 1.5px solid var(--red); font: 700 .76rem var(--mono); color: var(--red-deep); }
.sev:first-child .sev__level { background: var(--red); color: #fff; }
.sev__name { margin: 12px 0 6px; font-size: 1.08rem; }
.sev p { font-size: .92rem; color: var(--ink-2); }

/* ───────────── FAQ ───────────── */
.faq { padding-top: 0; }
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 4px; font-size: 1.08rem; font-weight: 600; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; width: 11px; height: 11px; margin-right: 6px; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: translateY(-3px) rotate(45deg); transition: transform .3s var(--ease); }
.qa[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.qa summary:hover { color: var(--red-deep); }
.qa__a { padding: 0 4px 24px; max-width: 44em; color: var(--ink-2); }
.faq__more { margin-top: 32px; color: var(--ink-2); }
.faq__more a { font-weight: 600; }

/* ───────────── Footer ───────────── */
.site-footer { --focus: #fff; margin-top: clamp(24px, 4vw, 56px); padding-block: clamp(48px, 7vw, 88px); background: var(--night); color: var(--night-muted); font-size: .92rem; }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1.25fr); gap: 40px clamp(24px, 4vw, 64px); align-items: start; }
.site-footer__brand img { display: block; width: 168px; height: auto; margin: -14px 0 0 -10px; }
.site-footer__license { margin-top: 6px; }
.site-footer__nav { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px clamp(24px, 4vw, 56px); }
.site-footer__nav ul { display: grid; gap: 4px; align-content: start; margin: 0; }
.site-footer a { display: inline-block; padding: 6px 0; color: var(--night-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); }
.site-footer__addr { display: grid; gap: 2px; font-style: normal; line-height: 1.6; }
.site-footer__addr span { white-space: nowrap; }
.site-footer__org { margin-bottom: 6px; color: var(--night-text); font-weight: 600; }
@media (max-width: 860px) {
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
}

/* ───────────── Secondary pages ───────────── */
.page { display: block; padding-top: calc(var(--header-h) + clamp(40px, 7vw, 88px)); padding-bottom: clamp(64px, 9vw, 120px); min-height: 70vh; background: linear-gradient(180deg, #FFF6F1 0, #fff 340px); }
.prose { width: 100%; max-width: calc(46rem + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); letter-spacing: -.03em; }
.prose__meta { color: var(--ink-3); font-size: .9rem; }
.prose h2 { margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.prose h3 { margin-top: 1.9em; font-size: 1.12rem; }
.prose :is(p, li, dd, td, th) { color: var(--ink-2); }
.prose :is(ul, ol) { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--red); }
.prose strong { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose :is(th, td) { padding: 14px 16px 14px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { width: 32%; font-weight: 600; color: var(--ink); }
.prose dl { display: grid; grid-template-columns: minmax(8rem, 32%) minmax(0, 1fr); border-top: 1px solid var(--line); }
.prose dt, .prose dd { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.prose dt { font-weight: 600; }
.prose blockquote { margin-inline: 0; padding: 16px 20px; border-radius: 16px; background: var(--mist); }
.prose .btn-row { margin-top: 2em; }
@media (max-width: 560px) {
  .prose th, .prose td { display: block; width: 100%; padding-right: 0; }
  .prose th { padding-bottom: 0; border-bottom: 0; }
  .prose td { padding-top: 6px; }
  .prose dl { grid-template-columns: minmax(0, 1fr); }
  .prose dt { padding-bottom: 0; border-bottom: 0; }
  .prose dd { padding-top: 6px; }
}

/* ───────────── Reduced motion: a still scene, no pinned scroll, no autoplay ───────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; transition-delay: 0s !important; }
  .shide, .sun__disc, .hero__veil, .hero__eyebrow, .hero__title, .hero__sub, .hero__cta, .status, .status::after, .btn.is-loading::before { animation: none !important; }
  .status::after { display: none; }
  .layer { will-change: auto; }
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
  .js .deck:not(.is-in) .mode { opacity: 1; }
  .js .deck:not(.is-in) .iso__stack { --gap: 26px; }
  .retry *, .retry *::before, .retry *::after { animation: none !important; }
  .retry .retry__ledger, .retry .retry__count { opacity: 1; }
  .retry[data-step="1"] .retry__packet--req, .retry[data-step="3"] .retry__packet--req { opacity: 1; transform: translateX(calc(50cqw - 50%)); }
  .retry[data-step="2"] .retry__packet--res { opacity: 1; transform: translateX(calc(100cqw - 100%)); }
  .retry[data-step="2"] .retry__cut { opacity: 1; }
  .retry[data-step="4"] .retry__packet--res { opacity: 1; transform: none; }
  .retry__toggle { display: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 961px) {
  .js .deck:not(.is-in) .mode:nth-child(1) { transform: rotateY(8deg) translateZ(-40px); }
  .js .deck:not(.is-in) .mode:nth-child(2) { transform: translateZ(26px); }
  .js .deck:not(.is-in) .mode:nth-child(3) { transform: rotateY(-8deg) translateZ(-40px); }
}
@media (prefers-reduced-motion: reduce) and (max-width: 960px) {
  .js .deck:not(.is-in) .mode { transform: none; }
}

@media print {
  .site-header, .scene, .veil, .nav-toggle { display: none !important; }
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
  .hero__pin { min-height: 0; }
  .js .hero { height: auto; }
}

/* ───────────── Commerce and legal additions ─────────────
 * Pricing extras rendered from plans.js (price prefix, domestic tax-inclusive
 * amount, design-partner pilot, response-target note) and the legal pages. */
.tier__from { font-size: .5em; font-weight: 600; letter-spacing: 0; color: var(--ink-3); vertical-align: middle; }
.tier__gross { flex-basis: 100%; font-size: .84rem; color: var(--ink-3); }
.pilot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  max-width: 980px; margin: 32px auto 0; padding: 24px 28px;
  border: 1px dashed var(--peach); border-radius: var(--radius); background: var(--paper-2);
}
.pilot__text { flex: 1 1 420px; }
.pilot__title { font-size: 1.1rem; }
.pilot__text p { margin-top: 6px; font-size: .92rem; line-height: 1.6; color: var(--ink-2); }
.pilot__cta { flex: 0 0 auto; }
.plans__fine { max-width: 820px; margin: 20px auto 0; font-size: .82rem; line-height: 1.6; color: var(--ink-3); text-align: center; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table.terms-table { min-width: 640px; }
.prose table.terms-table :is(th, td) { width: auto; padding-right: 14px; }
.prose table.terms-table thead th { font-size: .85rem; color: var(--ink-3); }
.prose .legal-list dd > * + * { margin-top: .6em; }
.prose table.legal-prices { margin-top: 4px; font-size: .9rem; }
.prose table.legal-prices :is(th, td) { width: auto; padding: 10px 14px 10px 0; }
.prose table.legal-prices small { color: var(--ink-3); }
.launch-todo { padding: 2px 6px; border-radius: 6px; background: #FFF1B8; color: #5C4400; font-weight: 600; }
.portal-link { font-weight: 600; }
@media (max-width: 640px) {
  .prose dl.legal-list { grid-template-columns: 1fr; }
  .prose .legal-list dt { padding-bottom: 4px; border-bottom: 0; }
  .prose .legal-list dd { padding-top: 0; }
}

/* Without JavaScript (<html> keeps class no-js), bilingual pages show both
 * languages, so the governing Japanese legal text is never hidden. */
html.no-js .only-en, html.no-js .only-ja { display: revert !important; }
html.no-js span.only-ja + span.only-en::before { content: " / "; }
