:root {
  color-scheme: light dark;

  --bg: #fbfcfd;
  --paper: #ffffff;
  --paper-2: #f5f7f9;
  --ink: #0f141a;
  --ink-2: #39434e;
  --muted: #6b7682;
  --line: #e4e8ec;
  --line-strong: #cdd4db;
  --grid: rgb(15 20 26 / 0.07);

  --ruri: #1e50a2;
  --ruri-ink: #ffffff;
  --ruri-soft: #e9eff9;
  --ruri-text: #1a4690;
  --beam: rgb(30 80 162 / 0.10);
  --beam-2: rgb(120 170 230 / 0.10);

  --cta-bg: #0f141a;
  --cta-ink: #ffffff;

  --ok: #0b7348;
  --ok-soft: #e5f3eb;
  --bad: #c2401b;
  --bad-soft: #fbece6;
  --warn: #8a5d00;
  --warn-soft: #fbf2d8;

  --code-bg: #f6f8fa;
  --shadow: 0 1px 2px rgb(15 20 26 / 0.05), 0 12px 32px rgb(15 20 26 / 0.07);
  --shadow-lift: 0 2px 6px rgb(15 20 26 / 0.06), 0 24px 56px rgb(15 20 26 / 0.12);

  --sans: "M PLUS 2", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  --mono: "Geist Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-xs: 3px;
  --r-sm: 5px;
  --r-md: 8px;
  --gutter: clamp(16px, 3.2vw, 64px);
  --max: 100%;

  &:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
  &:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) {
    --bg: #050608; --paper: #0c0f13; --paper-2: #11151a;
    --ink: #eef1f4; --ink-2: #c4ccd4; --muted: #8b96a1; --line: #1d232a; --line-strong: #2b333c; --grid: rgb(255 255 255 / 0.07);
    --ruri: #8fb1ee; --ruri-ink: #08111f; --ruri-soft: #142036; --ruri-text: #a9c4f3;
    --beam: rgb(70 120 200 / 0.28); --beam-2: rgb(150 190 240 / 0.10);
    --cta-bg: #ffffff; --cta-ink: #050608;
    --ok: #5cc895; --ok-soft: #0e2219; --bad: #ff8d6e; --bad-soft: #2a140f; --warn: #e8bd55; --warn-soft: #261f0e;
    --code-bg: #0a0d10;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 16px 40px rgb(0 0 0 / 0.45);
    --shadow-lift: 0 2px 8px rgb(0 0 0 / 0.55), 0 28px 64px rgb(0 0 0 / 0.6);
  }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  --bg: #050608; --paper: #0c0f13; --paper-2: #11151a;
  --ink: #eef1f4; --ink-2: #c4ccd4; --muted: #8b96a1; --line: #1d232a; --line-strong: #2b333c; --grid: rgb(255 255 255 / 0.07);
  --ruri: #8fb1ee; --ruri-ink: #08111f; --ruri-soft: #142036; --ruri-text: #a9c4f3;
  --beam: rgb(70 120 200 / 0.28); --beam-2: rgb(150 190 240 / 0.10);
  --cta-bg: #ffffff; --cta-ink: #050608;
  --ok: #5cc895; --ok-soft: #0e2219; --bad: #ff8d6e; --bad-soft: #2a140f; --warn: #e8bd55; --warn-soft: #261f0e;
  --code-bg: #0a0d10;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 16px 40px rgb(0 0 0 / 0.45);
  --shadow-lift: 0 2px 8px rgb(0 0 0 / 0.55), 0 28px 64px rgb(0 0 0 / 0.6);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  accent-color: var(--ruri);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
:lang(en) body, body:lang(en) { line-height: 1.6; }
a { color: var(--ruri-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, textarea, kbd { font-family: var(--mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
code { font-size: 0.9em; }
h1, h2, h3, h4, h5 { line-height: 1.25; margin: 0; font-weight: 600; }
p { margin: 0; }
::selection { background: var(--ruri-soft); }
:focus-visible { outline: 2px solid var(--ruri); outline-offset: 2px; }

.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 { position: absolute; left: 12px; top: -48px; padding: 8px 12px; background: var(--paper); border: 1px solid var(--line); z-index: 10; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ grid */

main { position: relative; }
.frame {
  position: absolute; z-index: 0; pointer-events: none;
  top: 0; bottom: 0; left: 50%;
  width: calc(min(100%, var(--max)) - 2 * var(--gutter));
  transform: translateX(-50%);
  border-inline: 1px solid var(--grid);
}
.frame i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.frame i:nth-child(1) { left: 25%; }
.frame i:nth-child(2) { left: 50%; }
.frame i:nth-child(3) { left: 75%; }
@media (max-width: 860px) { .frame i:nth-child(1), .frame i:nth-child(3) { display: none; } }

main > section, .intro > section { position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.cross { position: absolute; width: 13px; height: 13px; pointer-events: none; }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--muted); opacity: 0.55; }
.cross::before { left: 6px; top: 0; width: 1px; height: 13px; }
.cross::after { top: 6px; left: 0; height: 1px; width: 13px; }

/* ------------------------------------------------------------------ header */

.logo { font-family: var(--mono); font-weight: 500; font-size: 0.92rem; letter-spacing: -0.03em; white-space: nowrap; }
.logo-c { color: var(--muted); }
.logo-h { color: var(--ruri-text); }
.logo-check { color: var(--ok); font-weight: 600; }
.logo.small { font-size: 0.82rem; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  max-width: none;
  margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 28px; height: 60px;
}
.site-header::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-name { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 26px; margin: 0 auto; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.93rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { font-weight: 600; }
.prefs { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  font-size: 0.86rem; font-weight: 500; text-decoration: none; line-height: 1;
  padding: 9px 14px; border-radius: var(--r-xs); background: var(--cta-bg); color: var(--cta-ink);
}
.nav-cta:hover { opacity: 0.88; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-xs); overflow: hidden; }
.lang-switch button { font: inherit; font-size: 0.78rem; line-height: 1; padding: 8px 10px; border: 0; border-radius: 0; background: transparent; color: var(--muted); cursor: pointer; }
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button[aria-pressed="true"] { color: var(--ink); background: var(--paper-2); font-weight: 600; }
.theme-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-xs); background: transparent; color: var(--ink-2); cursor: pointer; }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-toggle .icon-moon, .theme-toggle .to-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle :is(.icon-sun, .to-dark) { display: none; }
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle .icon-moon { display: block; }
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle .to-light { display: inline; }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle :is(.icon-sun, .to-dark) { display: none; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .icon-moon { display: block; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .to-light { display: inline; }

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; height: auto; padding-block: 10px 0; gap: 6px 16px; background: var(--bg); }
  .site-nav { order: 3; width: 100%; margin: 0; gap: 18px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; padding-bottom: 8px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .prefs { margin-left: auto; }
  .nav-cta { display: none; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  align-items: center;
  min-height: min(680px, calc(100vh - 60px));
  padding-top: clamp(40px, 7vw, 96px) !important;
  padding-bottom: clamp(48px, 7vw, 96px) !important;
}
.hero-beam {
  position: absolute; z-index: -1; pointer-events: none;
  inset: -10% -20% -10% 10%;
  background:
    linear-gradient(118deg, transparent 34%, var(--beam) 46%, var(--beam-2) 50%, transparent 62%),
    radial-gradient(40% 50% at 70% 40%, var(--beam-2), transparent 70%);
  filter: blur(18px);
}
.hero-copy { padding-right: clamp(0px, 3vw, 48px); max-width: 680px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 600; }
:lang(ja) .hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); letter-spacing: -0.02em; line-height: 1.16; }
.lede { margin-top: 26px; font-size: 1.06rem; color: var(--ink-2); max-width: 32em; }

.cta-rows { margin-top: 40px; border-top: 1px solid var(--line-strong); }
.cta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 0 18px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink); text-decoration: none; font-weight: 500;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
a.cta-row:hover { background: var(--paper-2); }
.cta-row svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.cta-row.cmd code { font-size: 0.9rem; font-weight: 500; overflow-x: auto; white-space: nowrap; }
.cta-row.cmd code::before { content: "$ "; color: var(--muted); }
.icon-btn { font-size: 0.78rem; padding: 6px 10px; }

.hero-figure { margin: 0 clamp(0px, 2.4vw, 40px) 0 0; position: relative; padding: 0 0 0 4%; max-width: 920px; justify-self: end; width: 100%; }
.win { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.win-title { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-body { padding: 22px 26px 26px; }
.win-rendered { width: 88%; }
.win-rendered .win-body { padding-bottom: 64px; }
.doc-title { font-weight: 600; font-size: 1.12rem; margin-bottom: 12px; letter-spacing: -0.01em; }
.doc-line { font-size: 0.88rem; color: var(--ink-2); line-height: 1.8; }
.doc-end { margin-top: 16px; font-size: 0.76rem; color: var(--muted); }
.win-source { position: relative; width: 78%; margin: -44px 0 0 18%; box-shadow: var(--shadow-lift); overflow: visible; }
.win-source .win-bar { border-radius: var(--r-md) var(--r-md) 0 0; }
.win-source .win-body { background: var(--code-bg); border-radius: 0 0 var(--r-md) var(--r-md); }
.sig-src { margin: 0; padding: 0; border: 0; background: none; font-size: 0.78rem; line-height: 1.7; color: var(--ink-2); white-space: pre; overflow: hidden; }
pre .c { color: var(--muted); }
.seal {
  position: absolute; right: 18px; bottom: -30px;
  display: grid; place-items: center;
  width: 88px; height: 88px; border-radius: 50%;
  border: 2px solid var(--ok); color: var(--ok); background: var(--paper);
  transform: rotate(-9deg);
  font-size: 0.7rem; font-weight: 600; text-align: center; line-height: 1.2;
  box-shadow: 0 0 0 4px var(--paper);
}
.seal::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid var(--ok); opacity: 0.5; }
.seal-mark { font-size: 1.6rem; line-height: 1; margin-top: 6px; }
.hero-figure figcaption { margin: 46px 0 0 18%; font-size: 0.84rem; color: var(--muted); }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 48px; }
  .hero-copy { max-width: 640px; }
  .hero-figure { margin-right: 0; padding-left: 0; max-width: 640px; }
}
@media (max-width: 980px) { .hero { overflow-x: clip; } .hero-beam { inset: -10% 0 -10% 10%; } }
@media (max-width: 640px) { .hero-texture { display: none; } }
@media (max-width: 520px) {
  .win-rendered { width: 100%; }
  .win-source { width: 94%; margin-left: 6%; }
  .seal { right: 8px; width: 76px; height: 76px; }
  .hero-figure figcaption { margin-left: 0; }
}

/* ------------------------------------------------------------------ facts */

.facts-band { padding-top: 0 !important; padding-bottom: 0 !important; }
.facts {
  margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line-strong);
}
.facts > div { padding: 26px 22px 30px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); }
.facts > div:first-child { border-left: 0; }
.facts dt { font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.facts dd { margin: 0; color: var(--ink-2); font-size: 0.9rem; line-height: 1.7; }
.facts-band .c1 { left: calc(var(--gutter) - 6px); top: -6px; }
.facts-band .c2 { right: calc(var(--gutter) - 6px); bottom: -6px; }
@media (max-width: 980px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div { border-left: 0; border-top: 1px solid var(--line); }
  .facts > div:first-child { border-top: 0; }
}

/* ------------------------------------------------------------------ sections */

.try, .how, .compare, .start { padding-top: clamp(72px, 10vw, 136px) !important; }
.start { padding-bottom: clamp(72px, 10vw, 136px) !important; }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 50%; }
@media (max-width: 860px) { .section-head { max-width: none; } }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); letter-spacing: -0.035em; line-height: 1.1; }
:lang(ja) .section-head h2 { letter-spacing: -0.01em; }
.section-head p { color: var(--ink-2); }
.try .section-head { max-width: none; }
.try .section-head > p { max-width: 50%; }
@media (max-width: 860px) { .try .section-head > p { max-width: none; } }
.try-title-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.full-editor-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-xs); background: var(--paper); color: var(--ink); font-size: 0.86rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.full-editor-link:hover { border-color: var(--ink); }
.full-editor-link .lucide { width: 16px; height: 16px; }
.privacy { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--ok) !important; }
.privacy svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ------------------------------------------------------------------ playground */

.playground { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; min-height: 700px; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); background: var(--paper); }
@media (max-width: 980px) {
  .playground { grid-template-columns: minmax(0, 1fr); }
  .editor-pane { min-height: 460px; border-right: 0 !important; border-bottom: 1px solid var(--line-strong); }
}
.pane { display: flex; flex-direction: column; min-width: 0; background: var(--paper); }
.editor-pane { border-right: 1px solid var(--line-strong); }
.pane-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; min-height: 52px; padding: 8px 12px 8px 18px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.pane-head h3 { font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.pane-actions { display: flex; flex-wrap: wrap; gap: 6px; }

#editor { flex: 1; width: 100%; min-height: 620px; resize: none; border: 0; margin: 0; padding: 18px 20px; background: var(--code-bg); color: var(--ink); font-size: 12.8px; line-height: 1.75; tab-size: 2; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; }
#editor:focus-visible { outline: 2px solid var(--ruri); outline-offset: -2px; }

button, .file-btn, .example-select { font: inherit; font-size: 0.84rem; line-height: 1.2; padding: 8px 12px; border-radius: var(--r-xs); border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; }
button:hover, .file-btn:hover { border-color: var(--muted); }
button.ghost, .file-btn.ghost { background: transparent; }
button.primary { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-ink); font-weight: 500; padding: 10px 16px; }
button.primary:hover { opacity: 0.88; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.small { font-size: 0.76rem; padding: 4px 8px; }
.file-btn { position: relative; display: inline-flex; align-items: center; }
.file-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--ruri); outline-offset: 2px; }
.example-select { max-width: 100%; }

.tabs { display: flex; gap: 0; min-height: 52px; border-bottom: 1px solid var(--line); background: var(--paper-2); overflow-x: auto; }
.tabs [role="tab"] { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 0 18px; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 0.88rem; }
.tabs [role="tab"] + [role="tab"] { border-left: 1px solid var(--line); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; background: var(--paper); }
.panel { padding: 18px; overflow: auto; flex: 1; display: grid; align-content: start; gap: 16px; }
.panel[hidden] { display: none; }

.summary { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--paper-2); color: var(--ink-2); font-weight: 600; font-size: 0.98rem; line-height: 1.45; border: 1px solid transparent; }
.summary .icon { font-size: 1.2rem; line-height: 1.1; flex: none; }
.summary > div { display: grid; gap: 4px; }
.summary .sub { font-weight: 400; font-size: 0.85rem; opacity: 0.9; }
.summary.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.summary.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.summary.pending, .summary.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.cards:empty { display: none; }
.card { position: relative; padding: 14px 16px 14px 18px; background: var(--paper); }
.card + .card { border-top: 1px solid var(--line); }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-strong); }
.card.valid::before { background: var(--ok); }
.card.invalid::before, .card.malformed::before { background: var(--bad); }
.card.unresolved::before, .card.unsupported::before, .card.valid.partial::before { background: var(--warn); }
.card-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.card .idx { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.card .signer { font-weight: 600; overflow-wrap: anywhere; }
.badge, .partial-badge { font-size: 0.72rem; line-height: 1.6; padding: 0 7px; border-radius: var(--r-xs); border: 1px solid var(--line); color: var(--ink-2); background: var(--paper-2); }
.badge-warn, .partial-badge { border-color: transparent; background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.status { margin-left: auto; font-weight: 600; font-size: 0.86rem; white-space: nowrap; }
.valid .status { color: var(--ok); }
.invalid .status, .malformed .status { color: var(--bad); }
.unresolved .status, .unsupported .status { color: var(--warn); }
.meta { color: var(--muted); font-size: 0.83rem; margin-top: 3px; overflow-wrap: anywhere; }
.message { font-size: 0.87rem; margin-top: 6px; }
.invalid .message, .malformed .message { color: var(--bad); }
.warnings { margin: 6px 0 0; padding-left: 18px; font-size: 0.81rem; color: var(--warn); }
.warn-line { font-size: 0.83rem; color: var(--warn); margin-top: 4px; }
.passkey-info { margin-top: 8px; padding: 8px 10px; border-radius: var(--r-xs); background: var(--ruri-soft); font-size: 0.83rem; color: var(--ink-2); }
.passkey-info code { color: var(--ruri-text); }
.res-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 0.83rem; }
.res-list li { overflow-wrap: anywhere; }
.res-icon { display: inline-block; width: 1.3em; font-weight: 600; }
.res.ok .res-icon { color: var(--ok); }
.res.mismatch, .res.missing { color: var(--bad); }
.res.unreachable .res-icon, .res.not-checked .res-icon { color: var(--warn); }
.revocation.revoked { color: var(--bad); }
.revocation.not-revoked { color: var(--ok); }
.card details { margin-top: 8px; font-size: 0.81rem; }
.card details summary { cursor: pointer; color: var(--muted); }
.card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 8px 0 0; font-family: var(--mono); font-size: 0.74rem; }
.card dt { color: var(--muted); }
.card dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.doc-warnings { color: var(--warn); font-size: 0.84rem; }
.doc-warnings:empty { display: none; }

.net-consent { border: 1px solid var(--warn); border-radius: var(--r-sm); padding: 12px 14px; display: grid; gap: 8px; background: var(--paper); font-size: 0.84rem; }
.net-consent[hidden] { display: none; }
.net-consent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.net-consent li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.net-consent code { overflow-wrap: anywhere; }

.attach { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 10px; background: var(--paper-2); }
.attach-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.attach h4 { font-size: 0.9rem; }
.attach-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.server-form { display: flex; gap: 6px; flex-wrap: wrap; }
.server-form input { flex: 1 1 14rem; min-width: 0; font: inherit; font-size: 0.84rem; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-xs); background: var(--paper); color: var(--ink); }
.attach-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.attach-list:empty { display: none; }
.attach-list li { display: inline-flex; align-items: center; gap: 6px; font-size: 0.79rem; padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--paper); }
.status-pane.dropping { outline: 2px dashed var(--ruri); outline-offset: -6px; }

.hint { font-size: 0.81rem; color: var(--muted); line-height: 1.65; }
.hint[hidden] { display: none; }
label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 0.85rem; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; flex: none; }
label.check input { margin-top: 0.3em; }

.cosign { display: grid; gap: 0; }
.cosign > h4, .keygen > h4 { font-size: 0.94rem; }
.cosign form { margin-top: 10px; }
.keygen { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 12px; justify-items: start; }
.keygen > * { max-width: 100%; }
.keygen > .row, .keygen > #kg-output { width: 100%; }
.add-signature { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 16px; border-style: dashed; background: transparent; color: var(--ink-2); font-weight: 500; }
.add-signature:hover { border-color: var(--ruri); color: var(--ruri-text); }
.add-signature .lucide { width: 16px; height: 16px; }
form { display: grid; gap: 12px; margin-top: 14px; }
label { display: grid; gap: 5px; font-size: 0.83rem; font-weight: 500; color: var(--ink-2); }
label[hidden] { display: none; }
.opt { font-weight: 400; color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]), select, form textarea { font: inherit; font-size: 0.88rem; font-weight: 400; color: var(--ink); padding: 8px 10px; border-radius: var(--r-xs); border: 1px solid var(--line-strong); background: var(--paper); width: 100%; min-width: 0; }
form textarea { font-family: var(--mono); font-size: 0.77rem; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.row > label { min-width: 0; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.advanced { border-top: 1px solid var(--line); padding-top: 10px; }
.advanced > summary { cursor: pointer; font-size: 0.85rem; color: var(--ink-2); font-weight: 500; }
.advanced[open] { display: grid; gap: 12px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-xs); padding: 10px 12px; margin: 0; display: grid; gap: 8px; min-width: 0; }
legend { font-size: 0.83rem; font-weight: 500; color: var(--ink-2); padding: 0 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks:empty { display: none; }
.form-error { color: var(--bad); font-size: 0.84rem; }
.form-error:empty, .form-error[hidden] { display: none; }

.keygen > p { color: var(--ink-2); }
#kg-output, #pk-output { display: grid; gap: 14px; }
#kg-output[hidden], #pk-output[hidden] { display: none; }
.kv { display: grid; gap: 6px; justify-items: start; }
.kv h4 { font-size: 0.84rem; }
.kv pre { width: 100%; margin: 0; }
.warn-text { color: var(--bad); font-weight: 600; }
pre.secret { filter: blur(5px); transition: filter 0.2s; }
pre.secret:hover, pre.secret:focus { filter: none; }
.passkeys { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 12px; justify-items: start; }
.passkeys > * { max-width: 100%; }
.passkeys label { width: 100%; }
.passkeys h4 { font-size: 0.94rem; }
.passkeys h5 { font-size: 0.84rem; margin-top: 4px; }
.pgp-key { display: grid; gap: 8px; }
.pgp-key[hidden] { display: none; }
.pgp-key-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.pgp-key-head .file-btn { padding: 5px 10px; font-size: 0.79rem; }
.pgp-key > .hint { margin: 0; }
.pgp-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--paper-2); font-family: var(--mono); font-size: 0.74rem; line-height: 1.55; }
.pgp-info[hidden] { display: none; }
.pgp-info dt { color: var(--muted); }
.pgp-info dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.pgpguide .kv { width: 100%; }
.pgpguide > .hint { margin-top: -4px; }
.blk-fpr { font-family: var(--mono); letter-spacing: 0.02em; }
.pk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.pk-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.83rem; }

pre { margin: 0; padding: 14px 16px; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 0.79rem; line-height: 1.7; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ how */

.how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border-block: 1px solid var(--line-strong); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 6px 16px; padding: 28px 28px 30px 0; }
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); grid-row: span 2; font-family: var(--mono); font-size: 0.84rem; color: var(--ruri-text); padding-top: 0.3rem; }
.steps h3 { font-size: 1.12rem; letter-spacing: -0.015em; }
.steps p { color: var(--ink-2); font-size: 0.94rem; }
.how-code { border-left: 1px solid var(--line); padding: 28px 0 28px 28px; display: grid; align-content: center; }
.sig-example { white-space: pre; overflow-x: auto; background: var(--paper); box-shadow: var(--shadow); padding: 20px 22px; }
@media (max-width: 860px) {
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .how-code { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0; }
  .steps li { padding-right: 0; }
}

/* ------------------------------------------------------------------ compare */

.table-wrap { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 0.91rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th + th, td, th + td { border-left: 1px solid var(--line); }
thead th { font-size: 0.82rem; color: var(--muted); font-weight: 500; background: var(--paper-2); }
thead th:nth-child(2) { color: var(--ink); font-weight: 600; }
tbody th { font-weight: 500; }
tbody td:nth-child(2) { background: color-mix(in srgb, var(--ruri-soft) 55%, transparent); color: var(--ink); }
tbody tr:last-child > * { border-bottom: 0; }
td.no { color: var(--muted); }
@media (max-width: 640px) {
  .compare .table-wrap { overflow: visible; border: 0; background: none; }
  .compare table, .compare tbody, .compare tr, .compare th, .compare td { display: block; min-width: 0; width: auto; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare tbody tr { border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper); margin-bottom: 12px; overflow: hidden; }
  .compare tbody th { padding: 12px 14px; background: var(--paper-2); border-bottom: 1px solid var(--line); font-weight: 600; }
  .compare tbody td { padding: 10px 14px; border-left: 0; border-bottom: 1px solid var(--line); }
  .compare tbody td, .compare tbody td.yes, .compare tbody td.rare { display: flex; align-items: center; gap: 0 12px; white-space: normal; }
  .compare tbody td::before { content: attr(data-label); flex: 0 0 8.5em; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
  .compare tbody td:nth-child(2)::before { color: var(--ink); font-weight: 600; }
  .compare tbody tr > :last-child { border-bottom: 0; }
}

/* ------------------------------------------------------------------ start */

.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--paper); }

/* ------------------------------------------------------------------ footer */

.site-footer {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 44px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  color: var(--muted); font-size: 0.84rem;
}
.site-footer::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 1px; background: var(--line-strong); }
.site-footer p:last-child { margin-left: auto; }
@media (max-width: 640px) { .site-footer p:last-child { margin-left: 0; } }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ------------------------------------------------------------------ slides */

/* Only the top page is a slide deck. */
html.snap { scroll-snap-type: y mandatory; }
/* Slides may exceed the screen here; mandatory snapping would skip their overflow. */
@media (max-width: 980px), (max-height: 680px) { html.snap { scroll-snap-type: y proximity; } }
/* Touch scrolling with snap points stutters on phones, so they scroll freely. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) { html.snap { scroll-snap-type: none; } }

html { scroll-padding-top: var(--header-h, 60px); }
.intro:focus { outline: none; }
.intro, .slide { scroll-snap-align: start; }
.site-footer { scroll-snap-align: end; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.slide:focus { outline: none; }

.intro { display: flex; flex-direction: column; min-height: calc(100dvh - var(--header-h, 60px)); }
.intro .hero { flex: 1; min-height: 0; padding-top: clamp(16px, 2.6vh, 72px) !important; padding-bottom: clamp(16px, 2.6vh, 72px) !important; }
.intro .facts > div { padding-block: clamp(12px, 1.8vh, 28px); }

.slide {
  min-height: calc(100dvh - var(--header-h, 60px));
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(16px, 3.2vh, 72px) !important;
  padding-bottom: clamp(16px, 3.2vh, 72px) !important;
}
.slide .section-head { margin-bottom: clamp(18px, 3.5vh, 36px); }

@media (min-width: 981px) and (min-height: 681px) {
  .try { height: calc(100dvh - var(--header-h, 60px)); justify-content: flex-start; }
  .try .playground { flex: 1; min-height: 0; }
  .try .pane { min-height: 0; }
  .try #editor { min-height: 0; }
}

.start { min-height: calc(100dvh - var(--header-h, 60px) - 96px); }

.slide-nav {
  position: fixed; z-index: 5; right: clamp(10px, 1.6vw, 24px); top: 50%; transform: translateY(-50%);
  display: grid; gap: 4px;
}
.slide-nav a { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.slide-nav a::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid var(--muted); background: transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.slide-nav a:hover::before { border-color: var(--ink); }
.slide-nav a[aria-current="true"]::before { background: var(--ink); border-color: var(--ink); transform: scale(1.35); }
@media (max-width: 980px) { .slide-nav { display: none; } }

/* ------------------------------------------------------------------ motion */
.code-line { display: inline-block; min-width: 1px; }
.hero h1 .line { padding-bottom: 0.06em; }
.motion .frame { will-change: transform; }

/* ------------------------------------------------------------------ icons */
.lucide { flex: none; vertical-align: -0.2em; }
.theme-toggle .lucide { width: 16px; height: 16px; }
.site-nav a { display: inline-flex; align-items: center; gap: 6px; }
.site-nav .lucide { width: 16px; height: 16px; }
.cta-row .lucide { width: 16px; height: 16px; }
.privacy .lucide { width: 16px; height: 16px; }
.file-btn { gap: 6px; }
.file-btn .lucide { width: 15px; height: 15px; }
.facts dt { display: flex; align-items: center; gap: 10px; }
.facts dt .lucide { width: 20px; height: 20px; color: var(--ruri-text); }

.mark { display: inline-flex; align-items: center; justify-content: center; }
.mark .lucide { width: 18px; height: 18px; stroke-width: 2.2; }
td.yes .mark, .legend .mark.yes { color: var(--ok); }
td.rare .mark, .legend .mark.rare { color: var(--warn); }
td.yes { display: table-cell; }
td.yes .mark + span { margin-left: 8px; }
td.yes, td.rare { white-space: nowrap; }
tbody td:nth-child(2).yes { white-space: normal; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; font-size: 0.82rem; color: var(--muted); }
.legend .mark .lucide { width: 15px; height: 15px; }
.legend .mark.rare { margin-left: 10px; }

/* ------------------------------------------------------------------ brand mark */
.brand-mark { height: 26px; width: auto; flex: none; display: block; }

.hero h1 { font-weight: 700; letter-spacing: -0.03em; }
:lang(ja) .hero h1 { letter-spacing: -0.01em; }
.section-head h2 { font-weight: 700; }
.facts dt, .steps h3, .doc-title { font-weight: 700; }

/* ------------------------------------------------------------------ hero texture */
.hero-texture {
  position: absolute; z-index: -1; inset: 0 var(--gutter); pointer-events: none; overflow: hidden;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  font-family: var(--mono); font-size: 11px; line-height: 1.75; color: var(--muted);
  opacity: 0.16;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 45%, transparent 0%, transparent 28%, #000 72%);
          mask-image: radial-gradient(120% 90% at 50% 45%, transparent 0%, transparent 28%, #000 72%);
}
.hero-texture pre { margin: 0; padding: 18px 16px; border: 0; background: none; color: inherit; font: inherit; white-space: pre-wrap; overflow: hidden; }
@media (max-width: 860px) { .hero-texture { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ playground scroll */
.status-pane { min-height: 0; overflow: hidden; }
.status-pane .panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#editor { overscroll-behavior: contain; }
.card dl, .card details { max-width: 100%; }
@media (min-width: 981px) and (min-height: 681px) {
  .try .playground { display: grid; grid-template-rows: minmax(0, 1fr); }
  .try .editor-pane, .try .status-pane { height: 100%; }
}
/* Keeps the card list at content height; otherwise the grid squeezes it and the panel cannot scroll. */
.panel { grid-auto-rows: max-content; }

/* ------------------------------------------------------------------ preview tab */
.editor-tabs { min-height: 44px; }
.editor-tabs [role="tab"] { padding: 0 16px; }
#editor[hidden] { display: none; }
.preview-panel { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); }
.preview-panel[hidden] { display: none; }
.preview-note {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 10px 20px; font-size: 0.84rem;
  border-bottom: 1px solid var(--line); background: var(--paper-2); color: var(--muted);
}
.preview-note.has-sigs { color: var(--ok); }
.md-preview { padding: 22px 28px 40px; font-size: 0.95rem; line-height: 1.8; color: var(--ink); }
.md-preview > :first-child { margin-top: 0; }
.md-preview h1 { font-size: 1.5rem; margin: 0 0 16px; }
.md-preview h2 { font-size: 1.15rem; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.md-preview h3 { font-size: 1rem; margin: 22px 0 8px; }
.md-preview p, .md-preview ul, .md-preview ol, .md-preview table, .md-preview pre, .md-preview blockquote { margin: 0 0 14px; }
.md-preview ul, .md-preview ol { padding-left: 1.4em; }
.md-preview table { border-collapse: collapse; min-width: 0; width: auto; font-size: 0.9rem; }
.md-preview th, .md-preview td { border: 1px solid var(--line); padding: 6px 12px; }
.md-preview thead th { background: var(--paper-2); color: var(--ink); font-weight: 700; }
.md-preview tbody td:nth-child(2) { background: none; }
.md-preview code { background: var(--code-bg); padding: 1px 5px; border-radius: var(--r-xs); }
.md-preview pre code { padding: 0; background: none; }
.md-preview blockquote { border-left: 3px solid var(--line-strong); padding-left: 14px; color: var(--ink-2); }
.md-preview img { max-width: 100%; }

/* ------------------------------------------------------------------ editor header */
.editor-pane .pane-head { flex-wrap: nowrap; gap: 10px; padding: 8px 10px 8px 16px; }
.editor-pane .pane-head h3 { flex: none; white-space: nowrap; }
.editor-pane .pane-actions { flex: 1; min-width: 0; flex-wrap: nowrap; justify-content: flex-end; }
.editor-pane .example-select { flex: 1 1 auto; min-width: 0; max-width: 340px; text-overflow: ellipsis; }
.editor-pane .pane-actions > button, .editor-pane .pane-actions > .file-btn { flex: none; white-space: nowrap; }
@media (max-width: 560px) {
  .editor-pane .pane-head { flex-wrap: wrap; }
  .editor-pane .pane-actions { flex-wrap: wrap; }
  .editor-pane .example-select { flex: 1 1 100%; max-width: none; }
}

/* ------------------------------------------------------------------ preview pane */
.panel.preview-panel { padding: 0; display: block; overflow-y: auto; overscroll-behavior: contain; }
.panel.preview-panel[hidden] { display: none; }

/* ------------------------------------------------------------------ hero figure */
.chain-fig { --lh: 23px; }
.cf-win { overflow: visible; }
.cf-win .win-bar { border-radius: var(--r-md) var(--r-md) 0 0; }
.win-tag { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 0 6px; line-height: 1.6; }
.cf-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 236px; padding: 14px 0 18px; border-radius: 0 0 var(--r-md) var(--r-md); background: var(--paper); }
.cf-lines { list-style: none; margin: 0; padding: 0; counter-reset: ln; font-family: var(--mono); font-size: 12.5px; }
.cf-lines li {
  counter-increment: ln; position: relative;
  height: var(--lh); line-height: var(--lh); padding: 0 12px 0 46px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2);
}
.cf-lines li::before { content: counter(ln); position: absolute; left: 0; width: 32px; text-align: right; color: var(--muted); opacity: 0.7; font-size: 11px; }
.cf-lines li.b { font-family: var(--sans); font-size: 13.5px; color: var(--ink); }
.cf-lines li.h { font-weight: 700; }
.cf-lines li.s {
  color: var(--muted);
  background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--muted) 9%, transparent) 6px 7px);
}
.cf-lines li.s1 { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ok) 70%, transparent); }
.cf-lines li.s2 { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ruri) 70%, transparent); }
.cf-lines li.c { color: color-mix(in srgb, var(--muted) 80%, transparent); }

.cf-marks { position: relative; }
.cf-marks > span { position: absolute; top: calc((var(--from) - 1) * var(--lh)); height: calc((var(--to) - var(--from) + 1) * var(--lh)); }
.br { border: 2px solid currentColor; border-left: 0; border-radius: 0 4px 4px 0; width: 12px; }
.br em { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 0.74rem; line-height: 1.35; white-space: nowrap; }
.br em b { font-family: var(--mono); font-weight: 600; }
.br1 { --from: 1; --to: 5; left: 4px; color: var(--ok); }
.br1 em { left: 20px; }
.br2 { --from: 1; --to: 11; left: 4px; width: 128px; color: var(--ruri-text); }
.br2 em { left: 136px; white-space: normal; width: 86px; }
.hid { --from: 7; --to: 16; left: 22px; right: 0; display: grid; place-items: center start; }
.hid em { font-style: normal; font-size: 0.72rem; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-xs); padding: 2px 8px; background: var(--paper); margin-top: calc(var(--lh) * 2.2); }
.chain-fig .seal { right: 22px; bottom: -34px; }
.chain-fig figcaption { margin: 50px 0 0; max-width: 46em; }
@media (max-width: 640px) {
  .cf-body { grid-template-columns: minmax(0, 1fr); }
  .cf-marks { display: none; }
}

/* ------------------------------------------------------------------ terminals */
.start-grid { border: 0; border-radius: 0; background: none; gap: 18px; overflow: visible; }
.start-grid > div + div { border-left: 0; }
.term { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; background: #0d1117; color: #d7dde4; box-shadow: var(--shadow); }
.term-bar { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 0 0 14px; background: #161b22; border-bottom: 1px solid #262c35; }
.term-bar .dots i { background: #3a414b; }
.term-title { font-family: var(--mono); font-size: 0.74rem; color: #8b949e; white-space: nowrap; }
.term-tabs { display: flex; margin-left: auto; align-self: stretch; overflow-x: auto; }
.term-tabs [role="tab"] { border: 0; border-left: 1px solid #262c35; border-radius: 0; background: transparent; color: #8b949e; font-size: 0.78rem; padding: 0 14px; }
.term-tabs [role="tab"][aria-selected="true"] { color: #f0f3f6; background: #0d1117; box-shadow: inset 0 -2px 0 #8fb1ee; }
.term-body { flex: 1; padding: 6px 0 10px; display: grid; align-content: start; }
.term-pane[hidden] { display: none; }
.tblock { position: relative; padding: 8px 18px; }
.tblock + .tblock, .term-common .tblock:first-child { border-top: 1px solid #1d232b; }
.tblock pre { margin: 0; padding: 0; border: 0; background: none; color: inherit; font-size: 0.8rem; line-height: 1.75; white-space: pre; overflow-x: auto; padding-right: 64px; }
.tblock .cmd { display: block; color: #e6edf3; }
.tblock .cmd::before { content: "$ "; color: #7ee2a8; user-select: none; }
.tblock .cmt { display: block; color: #8b949e; }
.tblock.code pre { color: #c9d1d9; }
.tcopy {
  position: absolute; top: 8px; right: 12px;
  font: inherit; font-size: 0.72rem; line-height: 1; padding: 6px 9px;
  border: 1px solid #30363d; border-radius: var(--r-xs); background: #161b22; color: #c9d1d9; cursor: pointer;
}
.tcopy:hover { border-color: #8b949e; }
.tcopy.done { color: #7ee2a8; border-color: #2f6f4c; }
.tblock:not(.code) pre { white-space: normal; }
.tblock:not(.code) .cmd, .tblock:not(.code) .cmt { white-space: pre; }
.term-bar { flex-wrap: wrap; padding: 0; gap: 0; }
.term-bar .dots { padding-left: 14px; }
.term-bar .term-title { padding: 0 12px; min-height: 40px; display: inline-flex; align-items: center; }
.term-tabs { order: 3; width: 100%; margin-left: 0; border-top: 1px solid #262c35; }
.term-tabs [role="tab"] { min-height: 36px; }
.term-tabs [role="tab"]:first-child { border-left: 0; }
.hero-texture { opacity: 0.1; }
.term-body { grid-template-columns: minmax(0, 1fr); }
.term-body > *, .term-pane, .term-common, .tblock { min-width: 0; }

/* ------------------------------------------------------------------ icon copy buttons */
.icon-copy { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; }
.icon-copy .lucide { width: 15px; height: 15px; grid-area: 1 / 1; }
.icon-copy .lucide-check { visibility: hidden; }
.icon-copy.done .lucide-copy { visibility: hidden; }
.icon-copy.done .lucide-check { visibility: visible; }
.cta-row .icon-copy { position: static; border: 1px solid var(--line-strong); border-radius: var(--r-xs); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.cta-row .icon-copy.done { color: var(--ok); border-color: var(--ok); }
.nav-cta.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.nav-cta.secondary:hover { opacity: 1; border-color: var(--ink); }


/* ------------------------------------------------------------------ verification tab indicator */
#tab-sigs { display: inline-flex; align-items: center; gap: 8px; }
#tab-sigs::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line-strong); }
#tab-sigs[data-state="ok"]::before { background: var(--ok); }
#tab-sigs[data-state="bad"]::before { background: var(--bad); }

/* ------------------------------------------------------------------ signing key creation */
.signer-create { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.signer-create > label { max-width: 360px; }
.signer-create .mk-pane { display: grid; gap: 12px; justify-items: start; border: 0; padding: 0; }
.signer-create .mk-pane[hidden] { display: none; }
.signer-create .mk-pane > * { max-width: 100%; }
.signer-create .mk-pane label, .signer-create .mk-pane .row { width: 100%; }
#panel-create .signer-create { border-top: 0; padding-top: 0; }

/* ------------------------------------------------------------------ why */
.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.why-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: clamp(14px, 2.2vh, 22px) clamp(14px, 2vw, 28px) clamp(14px, 2.2vh, 22px) 0; border-bottom: 1px solid var(--line); }
.why-list li:nth-child(even) { padding-left: clamp(14px, 2vw, 28px); border-left: 1px solid var(--line); }
.why-list .lucide { width: 22px; height: 22px; color: var(--ruri-text); margin-top: 2px; }
.why-list h3 { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.why-list p { font-size: 0.88rem; line-height: 1.7; color: var(--ink-2); }
.why-note { margin-top: 8px; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 860px) {
  .why-list { grid-template-columns: minmax(0, 1fr); }
  .why-list li:nth-child(even) { padding-left: 0; border-left: 0; }
}
.why.slide { padding-top: clamp(12px, 2vh, 52px) !important; padding-bottom: clamp(12px, 2vh, 52px) !important; }
.why .section-head { margin-bottom: clamp(10px, 1.2vh, 22px); }
.why-list li { padding-top: clamp(10px, 1.6vh, 18px); padding-bottom: clamp(10px, 1.6vh, 18px); }

@media (min-width: 1200px) {
  .why-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .why-list li, .why-list li:nth-child(even) { padding-left: clamp(14px, 1.6vw, 24px); border-left: 1px solid var(--line); }
  .why-list li:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
}
@media (min-width: 1200px) { .why-list li:last-child:nth-child(3n + 2) { grid-column: span 2; } }
.why-list p { font-size: 0.85rem; line-height: 1.65; }
.why-list li { padding-top: clamp(6px, 0.9vh, 16px); padding-bottom: clamp(6px, 0.9vh, 16px); }
.why-list h3 { margin-bottom: 2px; }
