/* =========================================================
   Agent Room Shield — law.agentroom.cloud
   Design tokens + docs-style landing (v0.3 — refined)
   ========================================================= */

:root {
  /* brand — navy-led */
  --navy-900: #0b1d3a;
  --navy-800: #142a52;
  --navy-700: #1e3a6b;
  --navy-600: #2a4a85;
  --navy-300: #6f86b8;
  --accent: #2f9e7f;
  --accent-soft: #d8efe6;

  /* light theme (default) */
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --border: #e3e7f0;
  --border-strong: #cfd5e3;
  --text: #0d1426;
  --text-soft: #3f475c;
  --text-muted: #6c748a;
  --primary: var(--navy-800);
  --primary-hover: var(--navy-900);
  --primary-soft: rgba(20, 42, 82, 0.08);
  --link: var(--navy-700);
  --code-bg: #f3f4f9;
  --code-text: #1d2545;
  --shadow-sm: 0 1px 2px rgba(11, 29, 58, 0.06), 0 1px 3px rgba(11, 29, 58, 0.05);
  --shadow-md: 0 8px 24px rgba(11, 29, 58, 0.09);
  --shadow-lg: 0 18px 48px rgba(11, 29, 58, 0.16);
  --dot-color: rgba(11, 29, 58, 0.06);

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --content-w: 760px;
  --header-h: 64px;

  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-soft: #111827;
  --bg-elev: #131c2c;
  --surface: #131c2c;
  --border: #1f2a3d;
  --border-strong: #2c3a52;
  --text: #e9ecf3;
  --text-soft: #b3bccd;
  --text-muted: #828aa0;
  --primary: #7891ff;
  --primary-hover: #95a8ff;
  --primary-soft: rgba(120, 145, 255, 0.14);
  --link: #95a8ff;
  --code-bg: #161f31;
  --code-text: #d6def0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --dot-color: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.22; letter-spacing: -0.025em; font-weight: 750; }

/* SVG icons — sized via parent context */
svg { display: inline-block; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
              color 0.18s var(--ease);
  white-space: nowrap;
  position: relative;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-lg .btn-icon, .btn-xl .btn-icon { width: 20px; height: 20px; }

.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(11, 29, 58, 0.18);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(11, 29, 58, 0.22);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(11, 29, 58, 0.18); }

.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--primary); }

.btn-invert {
  background: #fff; color: var(--navy-900);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.btn-invert:hover {
  background: #fff;
  color: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}
.btn-invert:active { transform: translateY(0); }

.btn-sm { padding: 7px 13px; font-size: 0.9rem; }
.btn-sm .btn-icon { width: 15px; height: 15px; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-xl { padding: 18px 32px; font-size: 1.08rem; gap: 10px; }

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--bg-soft); color: var(--text); border-color: var(--border-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); height: 100%;
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  color: var(--text); font-weight: 750; font-size: 1.08rem;
  letter-spacing: -0.025em;
  display: inline-flex; align-items: center; gap: 8px;
}
.brand b { color: var(--primary); font-weight: 750; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; color: var(--primary); }
.header-nav { display: flex; gap: 28px; }
.header-nav a { color: var(--text-soft); font-size: 0.94rem; font-weight: 500; }
.header-nav a:hover { color: var(--text); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 460px at 88% -10%, var(--primary-soft), transparent 65%),
    radial-gradient(700px 360px at 8% 110%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(circle at 1px 1px, var(--dot-color) 1px, transparent 0);
  background-size: auto, auto, 22px 22px;
  background-position: 0 0, 0 0, 0 0;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: 100px 24px 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}
.hero-text { min-width: 0; }
.eyebrow {
  display: inline-block;
  color: var(--primary); font-weight: 600; font-size: 0.86rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  margin: 0 0 18px;
  padding: 5px 11px;
  background: var(--primary-soft);
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 3.8rem);
  margin: 0 0 22px;
  letter-spacing: -0.03em;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--text-soft);
  max-width: 560px; margin: 0 0 34px;
  line-height: 1.7;
}
.hero-sub b { color: var(--text); font-weight: 700; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.trust-bar {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 10px 24px;
}
.trust-bar li {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-soft); font-weight: 500; font-size: 0.95rem;
}
.trust-bar svg { width: 17px; height: 17px; color: var(--primary); }

/* Hero visual — network-absence diagram + terminal */
.hero-visual {
  position: relative;
  display: flex; flex-direction: column; gap: 22px;
  min-width: 0;
}
.net-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
}
.net-node {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-soft);
}
.net-node svg { width: 52px; height: 52px; }
.net-pc { color: var(--primary); }
.net-cloud { color: var(--text-muted); opacity: 0.55; }
.net-label { font-size: 0.84rem; font-weight: 600; letter-spacing: -0.01em; }
.net-link {
  position: relative;
  width: 78px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}
.net-link-line {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    var(--border-strong) 0 6px,
    transparent 6px 12px
  );
  transform: translateY(-50%);
}
.net-cross {
  position: relative; z-index: 1;
  width: 30px; height: 30px;
  background: var(--surface);
  border: 1.5px solid #d93b3b;
  color: #d93b3b;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px var(--surface);
}
.net-cross svg { width: 14px; height: 14px; }

.net-trace {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--code-text);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.net-trace .t-prompt { color: var(--accent); user-select: none; }
.net-trace .t-cmd { color: var(--text); }
.net-trace .t-out { color: var(--text-muted); }

/* ---------- Security highlight ---------- */
.security {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.security-inner { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px; }
.security h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  margin: 0 0 18px;
}
.security h2 .hl { color: var(--accent); }
.security-lead {
  color: var(--text-soft); font-size: 1.08rem;
  max-width: 640px; margin: 0 0 44px;
}
.security-lead b { color: var(--text); }
.security-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.sec-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
              border-color 0.22s var(--ease);
}
.sec-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.sec-card--primary {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: 0 1px 2px rgba(11, 29, 58, 0.06), 0 8px 24px rgba(20, 42, 82, 0.07);
}
.sec-card--primary::before {
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(to bottom, var(--primary), color-mix(in srgb, var(--primary) 60%, transparent));
}
.sec-icon {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  margin-bottom: 16px;
}
.sec-icon svg { width: 22px; height: 22px; }
.sec-card h3 { margin: 0 0 10px; font-size: 1.14rem; letter-spacing: -0.02em; }
.sec-card p { margin: 0; color: var(--text-soft); font-size: 0.97rem; line-height: 1.7; }

/* ---------- Docs layout ---------- */
.docs-layout {
  max-width: var(--maxw); margin: 0 auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
}
.toc-title {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); font-weight: 700; margin: 0 0 14px;
}
.toc-nav { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--border); }
.toc-nav a {
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  padding: 5px 0 5px 14px; margin-left: -1px;
  border-left: 2px solid transparent; line-height: 1.45;
  transition: color 0.18s var(--ease), border-color 0.22s var(--ease),
              padding-left 0.22s var(--ease);
}
.toc-nav a:hover { color: var(--text); text-decoration: none; padding-left: 16px; }
.toc-nav a.active {
  color: var(--primary); border-left-color: var(--primary); font-weight: 600;
  padding-left: 16px;
}

/* ---------- Markdown body ---------- */
.markdown-body { min-width: 0; max-width: var(--content-w); font-size: 1.0rem; line-height: 1.78; }
.markdown-body > :first-child { margin-top: 0; }

.markdown-body h2 {
  font-size: clamp(1.7rem, 2.6vw, 2rem);
  margin: 64px 0 20px; padding-bottom: 12px;
  position: relative;
  letter-spacing: -0.025em;
}
.markdown-body h2::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(to right, var(--border-strong) 0%, var(--border) 40%, transparent 100%);
}
.markdown-body h3 { font-size: 1.26rem; margin: 38px 0 14px; letter-spacing: -0.02em; }
.markdown-body p { margin: 0 0 18px; color: var(--text-soft); }
.markdown-body strong { color: var(--text); font-weight: 700; }
.markdown-body ul, .markdown-body ol { padding-left: 1.4em; margin: 0 0 18px; color: var(--text-soft); }
.markdown-body li { margin: 6px 0; }
.markdown-body li::marker { color: var(--text-muted); }
.markdown-body a { font-weight: 500; }

.markdown-body blockquote {
  margin: 0 0 20px; padding: 16px 20px;
  border-left: 6px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--bg));
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}
.markdown-body blockquote p { margin: 0; }
.markdown-body blockquote p + p { margin-top: 8px; }

.markdown-body code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--code-bg); color: var(--code-text);
  padding: 0.16em 0.42em; border-radius: 5px;
  border: 1px solid var(--border);
}
.markdown-body pre {
  position: relative;
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin: 0 0 20px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.markdown-body pre code {
  background: none; border: none; padding: 0; font-size: 0.9rem;
  color: var(--code-text); line-height: 1.7;
}

.markdown-body table {
  width: 100%; border-collapse: collapse; margin: 0 0 22px;
  font-size: 0.94rem; display: block; overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.markdown-body th, .markdown-body td {
  border-bottom: 1px solid var(--border);
  padding: 11px 14px; text-align: left;
  vertical-align: top;
}
.markdown-body th {
  background: color-mix(in srgb, var(--bg-soft) 60%, var(--bg));
  font-weight: 700; color: var(--text); white-space: nowrap;
  border-bottom: 1px solid var(--border-strong);
}
.markdown-body td { color: var(--text-soft); }
.markdown-body td:first-child { color: var(--text); font-weight: 600; }
.markdown-body tr:last-child td { border-bottom: none; }
.markdown-body tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-soft) 35%, var(--bg)); }

.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 44px 0; }

/* copy button injected into <pre> */
.pre-copy {
  position: absolute; top: 10px; right: 10px;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-soft); border-radius: 6px;
  font-size: 0.74rem; padding: 4px 10px; cursor: pointer;
  opacity: 0; transition: opacity 0.18s var(--ease), color 0.18s var(--ease),
                          border-color 0.18s var(--ease);
}
.markdown-body pre:hover .pre-copy, .pre-copy:focus-visible { opacity: 1; }
.pre-copy:hover { color: var(--text); }
.pre-copy.copied { color: var(--accent); border-color: var(--accent); }

/* ---------- Download ---------- */
.download {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.download-inner { max-width: 820px; margin: 0 auto; padding: 88px 24px; }

.download-card {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 240px at 100% 0%, rgba(120, 145, 255, 0.22), transparent 60%),
    radial-gradient(500px 220px at 0% 100%, rgba(47, 158, 127, 0.18), transparent 60%),
    linear-gradient(155deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: #fff;
  border-radius: 22px;
  padding: 56px 48px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.download-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: 0.5;
}
.download-card > * { position: relative; }
.download-eyebrow {
  display: inline-block;
  color: #cdd6ff; font-weight: 600; font-size: 0.84rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  margin: 0 0 16px;
}
.download-card h2 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}
.download-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
  margin: 0 0 32px;
}
.download-url-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.86rem;
  margin: 14px 0 0;
}
.download-url-note code {
  font-family: var(--font-mono); font-size: 0.86em;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2px 8px; border-radius: 5px;
  word-break: break-all;
}

.checksum {
  margin-top: 36px; text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
}
.checksum-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; margin: 0 0 14px; color: #fff;
}
.checksum-ico { width: 18px; height: 18px; color: var(--accent-soft); }
.checksum-hint { color: rgba(255, 255, 255, 0.66); font-size: 0.9rem; margin: 16px 0 8px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row code {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 0.84rem;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: #e8ecff; overflow-x: auto; white-space: nowrap;
  display: flex; align-items: center;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff; border-radius: var(--radius-sm);
  padding: 0 14px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.3); }
.copy-btn.copied {
  background: color-mix(in srgb, var(--accent) 40%, transparent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 44px 24px;
  display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center;
  justify-content: space-between;
}
.footer-brand {
  font-weight: 750; margin: 0 0 4px;
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-brand b { color: var(--primary); }
.footer-brand .brand-mark { width: 20px; height: 20px; color: var(--primary); }
.footer-muted { color: var(--text-muted); font-size: 0.88rem; margin: 0; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-soft); font-size: 0.92rem; }
.footer-copy { color: var(--text-muted); font-size: 0.85rem; margin: 0; width: 100%; }

/* ---------- To-top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
              background 0.18s var(--ease);
}
.to-top svg { width: 18px; height: 18px; }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { text-decoration: none; background: var(--bg-soft); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 84px 24px 72px;
  }
  .hero-visual { max-width: 520px; }
}

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding-top: 48px; }
  .toc {
    position: static; max-height: none; margin-bottom: 28px;
    padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-soft);
  }
  .markdown-body { max-width: none; }
  .download-card { padding: 44px 28px; }
}

@media (max-width: 720px) {
  .header-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px; display: none;
  }
  .header-nav.open { display: flex; }
  .header-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-sm { display: none; }
  .hero-inner { padding: 64px 22px 56px; }
  .hero-cta .btn { flex: 1; justify-content: center; }
  .net-diagram { padding: 22px 18px; }
  .net-node svg { width: 44px; height: 44px; }
  .net-link { width: 56px; }
  .download-inner { padding: 64px 16px; }
  .download-card { padding: 40px 22px; border-radius: 18px; }
  .copy-row { flex-direction: column; }
  .copy-btn { padding: 10px 14px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .to-top, .sec-card, .toc-nav a { transition: none; }
}
