/* relay — Landing Page styles. Plain CSS, dark by default,
   light via prefers-color-scheme. Aligned with web/nextjs/app/globals.css. */

:root {
  --bg: #0d0f12;
  --bg-elev: #14171c;
  --bg-elev-2: #1b1f25;
  --bg-overlay: rgba(20, 23, 28, 0.7);
  --border: #2a2f37;
  --border-strong: #3a4049;
  --fg: #e6ebf0;
  --fg-muted: #98a0aa;
  --fg-dim: #7a828d; /* WCAG AA ≥ 4.5:1 on dark bg */
  --accent:        #e2ff6b;
  --accent-strong: #ecffa0;
  --accent-fg:     #0c1607;
  --accent-soft:   rgba(226, 255, 107, 0.12);
  --accent-ring:   rgba(226, 255, 107, 0.45);
  --warm: #f5b14c;
  --cool: #8ab4ff;
  --critical: #f47174;
  --shadow-elev: 0 8px 24px -8px rgba(0, 0, 0, 0.55);
  --shadow-pop: 0 24px 64px -16px rgba(0, 0, 0, 0.75);
  --radius: 10px;
  --radius-md: 14px;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", "SF Mono", "Menlo",
    ui-monospace, "Consolas", monospace;
  --container: 1180px;
  /* Motion tokens */
  --motion-duration-xs: 75ms;
  --motion-duration-sm: 150ms;
  --motion-duration-md: 200ms;
  --motion-duration-lg: 400ms;
  --motion-ease-out:   cubic-bezier(0, 0, 0.2, 1);
  --motion-ease-in:    cubic-bezier(0.4, 0, 1, 1);
  --motion-ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
  /* Spacing tokens */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;
  --space-16: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fcfcfd;
    --bg-elev: #f4f5f7;
    --bg-elev-2: #eaecef;
    --bg-overlay: rgba(252, 252, 253, 0.85);
    --border: #d6dae0;
    --border-strong: #aab1b9;
    --fg: #16181d;
    --fg-muted: #5b626a;
    --fg-dim: #6b7280; /* WCAG AA ≥ 4.5:1 on light bg — #6b7280 on #fcfcfd = 4.60:1 */
    --accent: #4d7c0f;
    --accent-strong: #65a30d;
    --accent-fg: #f7fff0;
    --accent-soft: rgba(77, 124, 15, 0.1);
    --accent-ring: rgba(77, 124, 15, 0.80); /* SC 2.4.13 AA: blended ~3.8:1 on light bg */
    --warm: #b45309;
    --cool: #1d4ed8;
    --critical: #be123c;
    --shadow-elev: 0 8px 24px -8px rgba(20, 24, 30, 0.18);
    --shadow-pop: 0 24px 64px -16px rgba(20, 24, 30, 0.25);
  }
  /* SC 1.4.11: non-text contrast ≥ 3:1 — btn border on light bg (#80878f on #fcfcfd = 3.54:1) */
  .btn-ghost, .btn-secondary { border-color: #80878f; }
  .btn-ghost:hover, .btn-secondary:hover { border-color: var(--border-strong); }
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark light; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, pre, kbd, samp { font-family: var(--font-mono); }
p code, li code, td code, dd code {
  font-size: 0.88em;
  padding: 0.08em 0.36em;
  border-radius: 4px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--fg);
}
img, svg { display: block; max-width: 100%; }

/* CJK-aware text wrapping.
   `word-break: keep-all` prevents Japanese text from splitting mid-phrase
   on awkward characters; `overflow-wrap: break-word` still lets long Latin
   tokens (URLs, code) wrap to avoid horizontal overflow. */
body {
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6,
.hero-title, .eyebrow,
.feature h3, .faq-q,
.compare th, .compare td,
.section-lead, .lead {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
/* Modern wrap quality hints — supported in evergreen browsers,
   gracefully ignored elsewhere. */
h1, h2, .hero-title, .final-cta h2 { text-wrap: balance; }
p, .hero-sub, .feature p, .faq-a, .lead, .section-lead { text-wrap: pretty; }

/* Keep multi-word phrases together so they don't split mid-thought.
   Use sparingly — overuse causes horizontal overflow on narrow screens. */
.phrase { white-space: nowrap; }
@media (max-width: 520px) { .phrase { white-space: normal; } }

::selection { background: var(--accent-soft); color: var(--fg); }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  padding: 8px 12px; background: var(--accent); color: var(--accent-fg);
  border-radius: 6px; font-weight: 600;
}
.skip-link:focus { left: 12px; }
.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;
}

/* Layout */
/* SC 2.4.11: prevent sticky header (60px) from obscuring focused anchor targets */
:target, section[id], [id] { scroll-margin-top: 72px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
.container.narrow { max-width: 760px; }
@media (max-width: 640px) { .container { padding: 0 18px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg-overlay);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: var(--space-6); height: 60px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent); font-family: var(--font-mono); font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark { color: var(--accent); }
.brand-name { font-size: 18px; color: var(--fg); }
.brand-tag {
  font-size: 11px; padding: 2px 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border); font-weight: 500;
}
.site-nav { display: none; gap: 22px; margin-left: auto; font-size: 14px; color: var(--fg-muted); } /* gap: 22px — no exact token, keep as-is */
.site-nav a { padding: 6px 2px; transition: color 0.15s ease; }
.site-nav a:hover { color: var(--fg); }
.header-cta { margin-left: auto; }
@media (min-width: 880px) {
  .site-nav { display: inline-flex; }
  .header-cta { margin-left: 0; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--bg-elev); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--bg-elev-2); }
.btn-ghost {
  background: transparent; color: var(--fg); border-color: var(--border);
  min-height: 36px; padding: 0 14px; font-size: 13px;
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--bg-elev); }

/* Hero */
.hero { position: relative; isolation: isolate; padding: 72px 0 96px; overflow: hidden; }
@media (max-width: 720px) { .hero { padding: 56px 0 72px; } }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 64px; } }

/* Hero badges */
.hero-badges {
  display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4);
}
.hero-badges img { height: 20px; width: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px;
  padding: 6px 12px; font-size: 12px; font-family: var(--font-mono);
  color: var(--fg-muted); background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 999px; letter-spacing: 0.02em;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero-title {
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.7rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.025em;
  margin: 0 0 20px; text-wrap: balance;
}
.accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  color: var(--fg-muted); margin: 0 0 28px; max-width: 56ch; line-height: 1.65;
}
.hero-sub code { color: var(--fg); }
.hero-sub strong { color: var(--fg); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0 0 var(--space-8); }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 24px 32px; list-style: none;
  padding: 0; margin: 0; border-top: 1px solid var(--border);
  padding-top: 20px; font-family: var(--font-mono); font-size: 12px;
}
.hero-meta li { display: inline-flex; flex-direction: column; gap: 2px; }
.hero-meta-k {
  color: var(--fg-dim); text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 10px;
}
.hero-meta-v { color: var(--fg); }

/* Reveal text animation */
.reveal-text {
  animation: revealFadeUp var(--motion-duration-lg) var(--motion-ease-out) both;
}
@keyframes revealFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-text { animation: none; }
}

.hero-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
}
@media (prefers-color-scheme: light) {
  .hero-grid {
    background-image:
      linear-gradient(to right, rgba(20, 24, 30, 0.05) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(20, 24, 30, 0.05) 1px, transparent 1px);
  }
}

/* Web UI Mockup */
.ui-mockup {
  position: relative; border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow-pop); overflow: hidden;
  font-family: var(--font-mono); font-size: 12px;
}
.ui-mockup::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, rgba(226, 255, 107, 0.25), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.mockup-chrome { display: flex; flex-direction: column; height: 100%; min-height: 340px; }
.mockup-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); background: var(--bg-elev-2);
  flex-shrink: 0;
}
.mockup-url {
  margin-left: 12px; color: var(--fg-dim); font-size: 11px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px;
}
.mockup-body { display: flex; flex: 1; overflow: hidden; }

/* Mockup sidebar */
.mockup-sidebar {
  width: 130px; flex-shrink: 0; border-right: 1px solid var(--border);
  background: var(--bg-elev-2); padding: 12px 10px;
  display: flex; flex-direction: column; gap: 16px;
}
.ms-brand {
  display: flex; align-items: center; gap: 6px;
  color: var(--accent); font-weight: 600; font-size: 12px;
}
.ms-nav { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-nav li {
  padding: 5px 8px; border-radius: 6px; font-size: 11px;
  color: var(--fg-muted); cursor: default;
}
.ms-nav li.ms-active {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.ms-footer { margin-top: auto; }
.ms-badge {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--fg-dim); font-size: 10px;
}

/* Mockup main */
.mockup-main { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.mm-header { display: flex; align-items: center; justify-content: space-between; }
.mm-title { font-size: 13px; font-weight: 600; color: var(--fg); }
.mm-count { font-size: 10px; color: var(--fg-dim); }
.mm-tasks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mm-task {
  display: grid; grid-template-columns: 8px 1fr 1fr auto; gap: 6px;
  align-items: center; padding: 6px 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; font-size: 10px;
}
.mm-prio { width: 6px; height: 6px; border-radius: 50%; }
.p-hi { background: var(--critical); }
.p-md { background: var(--warm); }
.p-lo { background: var(--fg-dim); }
.mm-repo { color: var(--fg); font-weight: 600; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-desc { color: var(--fg-muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-agent {
  font-size: 9px; padding: 1px 5px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap;
}
.mm-run-bar {
  margin-top: auto; padding: 8px 10px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 6px; display: flex; align-items: center; gap: 8px;
}
.mm-cmd { font-size: 10px; color: var(--fg); }
.mm-ok { font-size: 10px; color: var(--accent-strong); }

/* Terminal dots (shared) */
.term-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.term-dot.d-r { background: #ff5f57; }
.term-dot.d-y { background: #f7bd2e; }
.term-dot.d-g { background: #28c93f; }

/* Section primitives */
.section { padding: 88px 0; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .section { padding: 64px 0; } }
.kicker {
  margin: 0 0 var(--space-3); font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance;
}
.section-lead, .lead {
  margin: 0 0 40px; color: var(--fg-muted);
  font-size: 1.05rem; max-width: 64ch; line-height: 1.7;
}
.lead strong { color: var(--fg); }

/* Problem section */
.section-problem { background: var(--bg); }
.section-problem p { color: var(--fg-muted); margin: 0 0 18px; line-height: 1.75; }
.section-problem p strong { color: var(--fg); }
.section-problem .lead { font-size: 1.1rem; margin-bottom: 24px; }

/* Problem cards */
.problem-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 40px;
}
@media (max-width: 600px) { .problem-cards { grid-template-columns: 1fr; } }
.prob-card {
  padding: 18px 20px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.prob-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 10px;
}
.prob-card h3 { margin: 0 0 6px; font-size: 0.9rem; font-weight: 600; color: var(--fg); }
.prob-card p { margin: 0; font-size: 0.85rem; color: var(--fg-muted); line-height: 1.55; }

/* Features — strong hierarchy (accent-soft bg) */
.section-features-strong {
  background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 120px);
}

/* Features grid */
.feature-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.feature {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 22px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.feature:hover { border-color: var(--border-strong); background: var(--bg-elev-2); transform: translateY(-2px); }
.feature-new { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.feature h3 {
  margin: 0 0 8px; font-size: 1.05rem; font-weight: 600;
  letter-spacing: -0.01em; color: var(--fg);
}
.feature p { margin: 0; color: var(--fg-muted); font-size: 0.93rem; line-height: 1.65; }

/* Theme swatches */
.theme-swatches {
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.swatches-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-dim); white-space: nowrap; margin: 0;
}
.swatches-row { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch {
  width: 28px; height: 28px; border-radius: 6px; cursor: default;
  border: 1px solid var(--border);
  background: linear-gradient(
    135deg,
    var(--s1) 0%, var(--s1) 50%,
    var(--s2) 50%, var(--s2) 100%
  );
  position: relative; overflow: hidden;
  transition: transform 0.15s ease;
}
.swatch:hover { transform: scale(1.2); border-color: var(--accent); }
.swatch::after {
  content: ""; position: absolute;
  inset: 50% 0 0; background: var(--s3);
}
.swatch::before {
  content: ""; position: absolute;
  inset: 50% 50% 0 0; background: var(--s4); z-index: 1;
}

/* local-first creed banner */
.local-first-creed {
  margin: 56px auto 0; max-width: 56ch; text-align: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted);
  letter-spacing: 0.01em; line-height: 1.7;
}
.local-first-creed .accent { font-weight: 600; }
.creed-en {
  display: block; margin-top: 6px; font-size: 11px;
  color: var(--fg-dim); letter-spacing: 0.04em;
}

/* How it works section */
.section-how {
  background: linear-gradient(180deg, transparent 0%, var(--bg-elev) 35%, var(--bg-elev) 65%, transparent 100%);
}

/* Adapters grid */
.adapters-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px;
}
@media (min-width: 640px) { .adapters-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .adapters-grid { grid-template-columns: repeat(3, 1fr); } }

.adapter-cat {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.adapter-cat-output {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  background: var(--accent-soft);
}

.cat-label {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent);
}
.cat-label-out { color: var(--accent); }
.cat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
}
.cat-count {
  margin-left: auto; font-size: 10px; padding: 1px 6px;
  border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-weight: 600;
}

.adapter-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.adapter-list li {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 0.82rem;
}
.src-tag {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: -0.005em; width: max-content;
}
.src-desc { color: var(--fg-muted); font-size: 11px; line-height: 1.5; }
.src-desc code { font-size: 10px; color: var(--fg); background: transparent; border: 0; padding: 0; }

/* How-it-works flow center */
.how-flow-center {
  display: flex; justify-content: center; padding: 24px 0 0;
}
.flow-db {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px; border: 1px solid var(--accent-soft);
  border-radius: var(--radius); background: var(--bg);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-elev);
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
}
.flow-db svg { flex-shrink: 0; }

/* Comparison table — strong hierarchy */
.section-compare {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--accent-soft) 0%, transparent 60%);
}
.compare-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--bg-elev);
}
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 680px; }
.compare-table th, .compare-table td {
  padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--border);
}
.compare-table thead th {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--fg-muted); background: var(--bg-elev-2);
}
.compare-table tbody th {
  text-align: left; color: var(--fg); font-weight: 500; background: var(--bg-elev);
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: 0; }
.th-self, td.c-best { color: var(--accent); font-weight: 700; }
.th-self { background: var(--accent-soft) !important; border-bottom-color: var(--accent) !important; }
.compare-table tbody td { color: var(--fg-muted); font-family: var(--font-mono); font-size: 0.85rem; }
.c-best { background: var(--accent-soft); }
.c-mid { color: var(--warm); }
.c-no { color: var(--fg-dim); }
.compare-note { margin: 16px 0 0; color: var(--fg-dim); font-size: 0.85rem; }

/* Quickstart */
.qs-tldr {
  display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px; padding: 20px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: var(--radius-md);
}
.qs-tldr-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
  padding-top: 6px; white-space: nowrap;
}
.qs-tldr-note { margin: 6px 0 0; font-size: 0.85rem; color: var(--fg-muted); }
.codeblock-inline { margin: 0; flex: 1; min-width: 200px; }

/* Code block (Quickstart) */
.codeblock {
  position: relative; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-elev);
  overflow: hidden; box-shadow: var(--shadow-elev);
}
.codeblock-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.codeblock-lang {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim);
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; font-size: 12px; font-family: var(--font-mono);
  background: transparent; color: var(--fg-muted);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.copy-btn:hover { color: var(--fg); border-color: var(--border-strong); background: var(--bg); }
.copy-btn.is-copied { color: var(--accent); border-color: var(--accent); }
.codeblock pre {
  margin: 0; padding: 20px 22px; overflow-x: auto;
  font-size: 13px; line-height: 1.7; color: var(--fg);
}
.c-cmt { color: var(--fg-dim); font-style: italic; }
.qs-foot { margin: 20px 0 0; color: var(--fg-muted); font-size: 0.9rem; }
.qs-foot a {
  color: var(--accent); text-decoration: underline;
  text-decoration-color: var(--accent-soft); text-underline-offset: 3px;
}
.qs-foot a:hover { text-decoration-color: var(--accent); }

/* Quickstart details */
.qs-details {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); margin-bottom: 20px; overflow: hidden;
}
.qs-details summary {
  list-style: none; padding: 14px 18px; cursor: pointer;
  font-size: 0.9rem; font-weight: 500; color: var(--fg-muted);
  transition: color 0.15s ease;
}
.qs-details summary::-webkit-details-marker { display: none; }
.qs-details summary:hover { color: var(--fg); }
.qs-details .codeblock {
  border-radius: 0; border: 0; border-top: 1px solid var(--border);
  box-shadow: none;
}

/* Architecture stack grid */
.stack-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 640px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .stack-grid { grid-template-columns: repeat(3, 1fr); } }
.stack-card {
  padding: 18px 20px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-elev);
  transition: border-color 0.2s ease;
}
.stack-card:hover { border-color: var(--border-strong); }
.stack-card h3 {
  margin: 0 0 6px; font-size: 0.95rem;
  font-family: var(--font-mono); font-weight: 600;
  color: var(--accent); letter-spacing: -0.01em;
}
.stack-card p { margin: 0; color: var(--fg-muted); font-size: 0.88rem; line-height: 1.6; }

/* FAQ */
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); margin-bottom: 10px; overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--border-strong); background: var(--bg-elev-2); }
.faq-item summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 20px; cursor: pointer;
  font-weight: 500; font-size: 1rem; color: var(--fg);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-chev { display: inline-flex; color: var(--fg-muted); transition: transform 0.2s ease, color 0.2s ease; flex-shrink: 0; }
.faq-item[open] .faq-chev { transform: rotate(180deg); color: var(--accent); }
.faq-body { padding: 0 20px 18px; color: var(--fg-muted); font-size: 0.95rem; line-height: 1.7; }
.faq-body p { margin: 0; }

/* Final CTA — strong hierarchy */
.section-final {
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--accent-soft) 0%, transparent 70%);
}
.final-cta { text-align: center; max-width: 720px; }
.final-cta h2 { text-wrap: balance; }
.final-cta p { color: var(--fg-muted); margin: 0 0 28px; }
.final-actions { justify-content: center; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 60px; background: var(--bg); }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 720px) { .footer-inner { grid-template-columns: auto 1fr auto; } }
.foot-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--fg); font-family: var(--font-mono); font-weight: 600;
}
.foot-brand .brand-mark { color: var(--accent); }
.foot-meta { margin-left: 6px; font-size: 12px; color: var(--fg-dim); font-weight: 500; }
.foot-nav {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: 13px; color: var(--fg-muted); justify-self: center;
}
@media (min-width: 720px) { .foot-nav { justify-self: end; } }
.foot-nav a { transition: color 0.15s ease; }
.foot-nav a:hover { color: var(--accent); }
.foot-fineprint { margin: 0; color: var(--fg-dim); font-size: 12px; font-family: var(--font-mono); }
@media (min-width: 720px) {
  .foot-fineprint {
    grid-column: 1 / -1; padding-top: 16px;
    border-top: 1px solid var(--border); text-align: center;
  }
}

/* TL;DR block (Hero → Problem の間) */
.tldr-block {
  max-width: 70ch;
  margin: 0 auto 0;
  padding: 16px 20px 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-muted);
}
.tldr-block code {
  color: var(--accent);
  background: transparent;
  font-size: inherit;
}
@media (min-width: 720px) {
  .tldr-block { padding: 20px 28px 20px 24px; font-size: 15px; }
}

/* Static badge (shields.io 置き換え) */
.static-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 20px;
}
.badge-label {
  padding: 0 6px;
  background: var(--bg-elev-2);
  color: var(--fg-muted);
}
.badge-value {
  padding: 0 6px;
  background: var(--bg-elev-2);
  color: var(--accent);
  border-left: 1px solid var(--border);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  :root {
    --motion-duration-xs: 0.01ms;
    --motion-duration-sm: 0.01ms;
    --motion-duration-md: 0.01ms;
    --motion-duration-lg: 0.01ms;
  }
  .feature:hover { transform: none; }
}
