/* ==========================================================================
   SOPMaster — flagship static design system.

   Monochrome only. The tokens below mirror the SOPMaster Chrome extension
   exactly: one neutral scale, hairline structure, no shadow effects.
   ========================================================================== */

:root {
  /* Extension-matched tokens */
  --bg-base: #0F1012;
  --bg-surface: #17191C;
  --bg-elevated: #1F2228;
  --border-subtle: #2A2D34;
  --border-strong: #343842;
  --text-primary: #F5F5F7;
  --text-secondary: #9A9EA8;
  --text-muted: #6E737E;
  --accent-primary: #FFFFFF;
  --accent-ink: #0F1012;

  /* Extension aliases used by its ghost button */
  --bg-ghost: #1B1D22;
  --border-hairline: var(--border-subtle);
  --border-elevated: var(--border-strong);

  /* Typography — exact extension stack */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Architectural rhythm */
  --container: 1180px;
  --section-y: clamp(96px, 10vw, 120px);
  --radius: 6px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-base);
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

p,
ul,
ol {
  margin: 0;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible + label {
  outline: 1px solid var(--accent-primary);
  outline-offset: 3px;
}

::selection {
  background: var(--accent-primary);
  color: var(--accent-ink);
}

img,
svg {
  display: block;
  max-width: 100%;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--accent-primary);
  color: var(--accent-ink);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

section[id],
article[id] {
  scroll-margin-top: 96px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary::after {
  content: "+";
  margin-left: 8px;
  color: var(--text-secondary);
}

.mobile-nav[open] summary::after {
  content: "−";
}

.mobile-nav-panel {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  width: 220px;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.mobile-nav-panel a {
  display: block;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  border-radius: 4px;
}

.mobile-nav-panel a:hover {
  background: var(--bg-ghost);
  color: var(--text-primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: #E6E6E8;
  border-color: #E6E6E8;
}

.btn-secondary {
  background: var(--bg-ghost);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--accent-ink);
}

.text-link {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: border-color 0.18s ease;
}

.text-link:hover {
  border-color: var(--accent-primary);
}

/* ==========================================================================
   CSS-only reveal transitions
   ========================================================================== */

.reveal {
  animation: reveal-in 720ms var(--ease) both;
}

@supports (animation-timeline: view()) {
  .reveal {
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: clamp(72px, 9vw, 112px) 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.eyebrow {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 17ch;
  margin: 22px 0 26px;
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: 1.02;
}

.hero-sub {
  max-width: 64ch;
  color: var(--text-secondary);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.install-action {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.install-caption {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.hero-note {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.system-card {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.system-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.system-card-head span:last-child {
  color: var(--text-secondary);
}

.system-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  padding: 24px 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.system-row:last-child {
  border-bottom: 0;
}

.system-index {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.system-row h2 {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.system-row p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.system-row p + p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(72px, 8vw, 104px);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.metric {
  padding: 30px 24px 32px;
  border-right: 1px solid var(--border-subtle);
  transition: background-color 0.18s ease;
}

.metric:last-child {
  border-right: 0;
}

.metric:hover {
  background: var(--bg-surface);
}

.metric-value {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-primary);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-label {
  display: block;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ==========================================================================
   Shared sections
   ========================================================================== */

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  margin-bottom: 64px;
}

.section-head h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
}

.section-head p {
  max-width: 64ch;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.75;
}

/* ==========================================================================
   Document specimens — CSS-only segmented switcher
   ========================================================================== */

.specimen-switcher {
  position: relative;
}

.specimen-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.specimen-tabs {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 32px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-elevated);
}

.specimen-tabs label {
  flex: 1;
  min-width: 220px;
  padding: 14px 20px;
  border-right: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.specimen-tabs label:last-child {
  border-right: 0;
}

.specimen-tabs label:hover {
  background: var(--bg-ghost);
  color: var(--text-primary);
}

.specimen-tabs label span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#specimen-sop:checked ~ .specimen-tabs label[for="specimen-sop"],
#specimen-checklist:checked ~ .specimen-tabs label[for="specimen-checklist"] {
  background: var(--accent-primary);
  color: var(--accent-ink);
}

#specimen-sop:checked ~ .specimen-tabs label[for="specimen-sop"] span,
#specimen-checklist:checked ~ .specimen-tabs label[for="specimen-checklist"] span {
  color: var(--accent-ink);
  opacity: 0.65;
}

#specimen-sop:focus-visible ~ .specimen-tabs label[for="specimen-sop"],
#specimen-checklist:focus-visible ~ .specimen-tabs label[for="specimen-checklist"] {
  outline: 1px solid var(--accent-primary);
  outline-offset: 3px;
}

.doc-sheet {
  display: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-base);
}

#specimen-sop:checked ~ .specimen-stage .doc-sheet[data-sheet="sop"],
#specimen-checklist:checked ~ .specimen-stage .doc-sheet[data-sheet="checklist"] {
  display: block;
  animation: sheet-in 280ms var(--ease) both;
}

.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.doc-toolbar strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.doc-page {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 60px);
}

.doc-page > h3 {
  margin-bottom: 24px;
  font-size: clamp(26px, 3.4vw, 38px);
}

.doc-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
}

.doc-meta strong {
  color: var(--text-primary);
  font-weight: 600;
}

.doc-page h4 {
  margin: 36px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.doc-page p,
.doc-page li {
  max-width: 76ch;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.doc-page ol,
.doc-page ul {
  padding-left: 22px;
  margin: 12px 0 8px;
}

.doc-page li + li {
  margin-top: 6px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 8px;
  font-size: 13px;
}

.doc-table th,
.doc-table td {
  padding: 11px 14px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-table th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.disclaimer {
  max-width: 86ch;
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 1px solid var(--text-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.disclaimer strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Comparison matrix
   ========================================================================== */

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
}

.matrix {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.matrix caption {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: left;
  text-transform: uppercase;
}

.matrix th,
.matrix td {
  padding: 20px 22px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
  vertical-align: top;
}

.matrix th:last-child,
.matrix td:last-child {
  border-right: 0;
}

.matrix tbody tr:last-child th,
.matrix tbody tr:last-child td {
  border-bottom: 0;
}

.matrix thead th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.matrix tbody th {
  width: 24%;
  color: var(--text-primary);
  font-weight: 600;
}

.matrix td:nth-child(2) {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.matrix-note {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

/* ==========================================================================
   Architecture
   ========================================================================== */

.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
}

.step-card {
  padding: 32px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.step-index {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.step-card h3 {
  margin: 20px 0 12px;
  font-size: 20px;
}

.step-card > p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.step-card ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.step-card li {
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.step-card li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.permission-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.permission-chip {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing-wrap {
  display: flex;
  justify-content: center;
}

.price-card {
  width: min(100%, 720px);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
}

.price-card-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.price-card-top h3 {
  font-size: 22px;
}

.price-card-top p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.price {
  color: var(--accent-primary);
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.price span {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.price-card-body {
  padding: 32px;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.price-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 14px;
}

.price-list li::before {
  content: "—";
  color: var(--text-secondary);
}

.seller-note {
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.seller-note strong {
  color: var(--text-primary);
  font-weight: 600;
}

.price-action {
  margin: 24px 0 0;
}

.price-action .btn-primary {
  width: 100%;
}

.price-action .install-caption {
  margin-top: 12px;
  text-align: center;
}

.price-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list {
  max-width: 920px;
  border-top: 1px solid var(--border-subtle);
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  list-style: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  max-width: 78ch;
  padding: 0 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 72px 0 32px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 56px;
}

.footer-desc {
  max-width: 34ch;
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.footer-col h2 {
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-col a,
.footer-col span {
  display: block;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.legal-page {
  padding: clamp(64px, 8vw, 104px) 0 var(--section-y);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
}

.legal-aside {
  position: sticky;
  top: 104px;
  align-self: start;
}

.legal-aside h2 {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal-aside a {
  display: block;
  padding: 8px 0 8px 14px;
  border-left: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.legal-aside a:hover {
  border-left-color: var(--accent-primary);
  color: var(--text-primary);
}

.legal-content {
  max-width: 840px;
}

.legal-content h1 {
  margin-bottom: 14px;
  font-size: clamp(38px, 5vw, 60px);
}

.legal-meta {
  margin-bottom: 48px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-content h2 {
  margin: 64px 0 16px;
  font-size: clamp(24px, 3vw, 32px);
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content h3 {
  margin: 32px 0 12px;
  font-size: 18px;
}

.legal-content p,
.legal-content li {
  max-width: 78ch;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

.legal-content p + p {
  margin-top: 14px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 22px;
  margin: 16px 0 24px;
}

.legal-content li + li {
  margin-top: 8px;
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.policy-statement {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.75;
}

.legal-callout {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 1px solid var(--text-secondary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.75;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
}

.legal-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  margin: 20px 0 32px;
  font-size: 13px;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

.legal-table tr:last-child th,
.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-table th:last-child,
.legal-table td:last-child {
  border-right: 0;
}

.legal-table thead th {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-back {
  display: inline-block;
  margin-top: 56px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .nav-links {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 20ch;
  }

  .system-card {
    max-width: 680px;
  }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-content,
  .legal-aside {
    min-width: 0;
  }

  .legal-aside {
    position: static;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 20px;
  }

  .header-right {
    gap: 14px;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border-subtle);
  }

  .specimen-tabs {
    display: flex;
    flex-direction: column;
  }

  .specimen-tabs label {
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border-strong);
  }

  .specimen-tabs label:last-child {
    border-bottom: 0;
  }

  .doc-meta {
    grid-template-columns: 1fr;
  }

  .arch-grid {
    grid-template-columns: 1fr;
  }

  .price-card-top {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 460px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .header-inner {
    gap: 10px;
  }

  .header-right {
    flex: 1;
    justify-content: flex-end;
  }

  .header-right .btn-primary {
    width: auto;
    padding: 12px 16px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .doc-page {
    padding: 22px 18px;
  }

  .doc-table {
    font-size: 12px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .header-right .btn-primary {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .doc-sheet {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
