/* QA2 Labs: site stylesheet, v2.1 (doc layout, nav/footer parity, a11y fixes) */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
}

/* ---- ROOT TOKENS ------------------------------------------ */
:root {
  --bg:           #F5F0E8;
  --bg-2:         #EDE7D8;
  --bg-card:      #FFFFFF;
  --bg-hl:        #E6E0D0;
  --text:         #111111;
  --text-dim:     #444444;
  --text-muted:   #666666;
  --accent:       #5E3D9A;
  --accent-l:     #6F52B0;
  --accent-pale:  rgba(94,61,154,0.07);
  --green:        #1A7A5A;
  --green-pale:   rgba(26,122,90,0.08);
  --red:          #B33124;
  --red-pale:     rgba(179,49,36,0.08);
  --border:       rgba(0,0,0,0.09);
  --border-mid:   rgba(0,0,0,0.16);
  --font-serif:   'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ---- RESET ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
fieldset { border: none; }

/* ---- SKIP LINK -------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: .6rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  border-radius: 6px;
  z-index: 9999;
  transition: top .15s;
}
.skip-link:focus { top: 1rem; outline: 2px solid rgba(255,255,255,.4); outline-offset: 2px; }

/* ---- FOCUS ------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent-l);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- BASE -------------------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: var(--accent-l); text-decoration: none; transition: color .15s; }
a:hover { color: var(--text); }

/* ---- CONTAINERS ------------------------------------------- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- TYPOGRAPHY ------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--text);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); line-height: 1.3; }

h2 em, h1 em {
  font-style: italic;
  color: var(--accent-l);
}

p {
  color: var(--text-dim);
}
p + p { margin-top: 1.1rem; }

/* ---- NAV --------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo-img { height: 26px; width: auto; }

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}
.nav-links a {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--text-dim);
  display: block;
  border-radius: 2px;
  transition: all .2s;
}

/* ---- SECTION BASE ----------------------------------------- */
section { padding: 6rem 0; }

.bg-2 { background: var(--bg-2); }

/* ---- SECTION LABELS --------------------------------------- */
.label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 1.25rem;
}

/* ---- BUTTONS ---------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: .7rem 1.6rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.btn-primary:hover { background: #4B2E7F; color: #fff; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: .7rem 1.6rem;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 500;
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--accent-l); color: var(--text); }

.btn-text {
  color: var(--accent-l);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: gap .15s, color .15s;
}
.btn-text:hover { gap: .55rem; color: var(--text); }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85rem;
}

/* ---- HERO -------------------------------------------------- */
.hero {
  padding: 9rem 0 6rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-l);
  display: block;
  margin-bottom: 1.5rem;
}
.hero h1 {
  margin-bottom: 1.25rem;
}
.hero-desc {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 56ch;
  margin-bottom: 2.25rem;
}

/* code block in hero (dark, regardless of theme) */
.hero-code {
  background: #0D1225;
  border: 1px solid rgba(110,82,176,0.25);
  border-radius: 10px;
  overflow: hidden;
}
.hero-code__bar {
  background: #07091A;
  border-bottom: 1px solid rgba(110,82,176,0.15);
  padding: .65rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.hero-code__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.hero-code__title {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: rgba(255,255,255,0.30);
  letter-spacing: .05em;
  margin-left: .25rem;
}
.hero-code__body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.8;
  color: #8AABCF;
  overflow-x: auto;
}
.c-kw  { color: #93c5fd; }   /* keyword: blue */
.c-fn  { color: var(--accent-l); }  /* function: indigo */
.c-str { color: #86efac; }   /* string: green */
.c-num { color: #C9A876; }   /* numeric literal: tan */
.c-cm  { color: var(--text-muted); font-style: italic; } /* comment */
.c-out { color: var(--green); }   /* output */

/* ---- COMPAT STRIP ----------------------------------------- */
.compat-strip {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}
.compat-strip-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.compat-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.compat-names {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.compat-name {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: .015em;
}

/* ---- PROSE SECTIONS --------------------------------------- */
.prose p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-dim);
}
.prose p + p { margin-top: 1.2rem; }

/* ---- PRODUCT ROWS ----------------------------------------- */
.product-row {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 5rem;
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
  align-items: start;
}
.product-row:first-of-type { border-top: none; }

.product-row__name {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--text);
  margin-bottom: .65rem;
}
.product-row__tag {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1rem;
  padding: .22rem .7rem;
  border-radius: 4px;
}
.product-row__tag--trial {
  color: var(--accent);
  background: var(--accent-pale);
  border: 1px solid rgba(94,61,154,.2);
}
.product-row__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 1.75rem;
  max-width: 50ch;
}
.product-row__cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.product-specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.product-specs li {
  position: relative;
  padding-left: 1.15rem;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--text-dim);
}
.product-specs li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--border-mid);
  font-family: var(--font-sans);
  line-height: 1.5;
}

/* ---- TRIAL NOTICE ------------------------------------------ */
.trial-notice {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.trial-notice__label {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-pale);
  border: 1px solid rgba(94,61,154,.18);
  padding: .3rem .8rem;
  border-radius: 4px;
  white-space: nowrap;
}
.trial-notice__text {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 40ch;
}

/* ---- RESEARCH AREAS --------------------------------------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2.75rem;
}
.research-area {
  padding-left: 1.25rem;
  border-left: 2px solid var(--border-mid);
}
.research-area h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: .75rem;
}
.research-area p {
  font-size: .9rem;
  line-height: 1.75;
  color: var(--text-dim);
}

/* ---- CONTACT ---------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-top: 2.5rem;
  align-items: start;
}

.contact-email {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  border-bottom: 1px solid var(--border-mid);
  padding-bottom: .2rem;
  transition: border-color .15s, color .15s;
}
.contact-email:hover { border-color: var(--accent-l); color: var(--accent-l); }

.contact-intents {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  margin-top: 1rem;
}
.contact-intents li {
  font-size: .875rem;
  color: var(--text-dim);
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

/* ---- FOOTER ----------------------------------------------- */
.footer {
  background: #1A1A1A;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 2.75rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logo-img { height: 22px; width: auto; opacity: .55; filter: brightness(0) invert(1); }
.footer-copy {
  font-size: .78rem;
  color: rgba(255,255,255,0.55);
}
.footer-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}
.footer-links a {
  font-size: .78rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: rgba(255,255,255,0.85); }

.footer-tm {
  font-size: .68rem;
  color: rgba(255,255,255,0.48);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1.1rem;
  margin-top: 1.1rem;
  line-height: 1.6;
}

/* ---- INNER PAGE HERO -------------------------------------- */
.hero--inner { padding: 8rem 0 4rem; }
.hero--inner h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }

/* ---- LICENSE TIERS ------------------------------------------ */
.license-tiers { margin-top: 2rem; }
.license-tier { display: flex; gap: .65rem; align-items: baseline; font-size: .875rem; color: var(--text-dim); }
.license-tier + .license-tier { margin-top: .65rem; }
.license-tier__label { font-family: var(--font-mono); font-size: .72rem; color: var(--accent-l); letter-spacing: .05em; width: 6rem; flex-shrink: 0; }

/* ---- CONTACT CTA SECTION (products.html second bg-2 separator) -- */
.contact-cta-section { border-top: 1px solid var(--border-mid); }

/* ---- CODE BLOCK ----------------------------------------------- */
.code-block {
  background: #0D1225;
  border: 1px solid rgba(110,82,176,0.20);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
}
.code-block pre {
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.75;
  color: #8AABCF;
}

/* ---- VERDICT LABELS --------------------------------------- */
.v-noise { color: var(--accent-l); font-weight: 600; }
.v-bug   { color: var(--red);      font-weight: 600; }
.v-inc   { color: var(--text-muted); font-weight: 600; }

/* ---- VERDICT CARDS ---------------------------------------- */
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.verdict-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}
.verdict-card__type {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.verdict-card__type--noise { color: var(--accent-l); }
.verdict-card__type--bug   { color: var(--red); }
.verdict-card__type--inc   { color: var(--text-muted); }
.verdict-card p {
  font-size: .875rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ---- COMPARE TABLE ---------------------------------------- */
.compare-wrap { overflow-x: auto; margin-top: 2rem; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  white-space: nowrap;
}
.compare-table th {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-mid);
}
.compare-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  white-space: normal;
}
.compare-table td:first-child { color: var(--text); font-size: .85rem; }
.compare-table .yes { color: var(--green); }
.compare-table .no  { color: var(--text-muted); }
.compare-table .plan { color: var(--accent-l); }

/* ---- FRAMEWORK GRID --------------------------------------- */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.framework-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}
.framework-card--enterprise { border-color: rgba(94,61,154,.25); }
.framework-card__name {
  font-weight: 500;
  font-size: .875rem;
  color: var(--text);
  margin-bottom: .4rem;
}
.framework-card__import {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-muted);
}
.framework-card__import--tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- NEWS LIST (news page, single-column editorial) ------- */
.news-list {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}
.news-list__item {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-mid);
}
.news-list__item:last-child { border-bottom: 1px solid var(--border-mid); }
.news-list__date {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: .75rem;
}
.news-list__title {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--text);
  line-height: 1.2;
  margin-bottom: .85rem;
}
.news-list__excerpt {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dim);
  max-width: 62ch;
  margin-bottom: 1.25rem;
}

/* ---- NEWS GRID -------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 3rem;
  margin-top: 2.5rem;
}
.news-card {
  padding: 2rem 0;
  border-top: 1px solid var(--border-mid);
}
.news-card__date {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: .75rem;
}
.news-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: .65rem;
  line-height: 1.3;
}
.news-card p {
  font-size: .875rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

/* ---- MOBILE ----------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-code { display: none; }
  .product-row { grid-template-columns: 1fr; gap: 2rem; }
  .research-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .verdict-grid { grid-template-columns: 1fr; }
  .framework-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding: 4rem 0; }
  .hero { padding: 7rem 0 4rem; }
  .hero--inner { padding: 7rem 0 3rem; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: var(--bg-2);
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    z-index: 199;
  }
  .nav-links.nav-open { display: flex; }
  .nav-toggle { display: flex; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .framework-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DOC PAGE LAYOUT
   ============================================================ */

.doc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.doc-header__left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}
.doc-back {
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
  white-space: nowrap;
}
.doc-back:hover { color: var(--accent); }
.doc-header__logo { height: 22px; width: auto; display: block; }
.doc-header__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.doc-header__links a {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .15s;
  white-space: nowrap;
}
.doc-header__links a:hover { color: var(--text); }

.doc-layout {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  min-height: calc(100vh - 52px);
}

/* ---- Sidebar ---- */
.doc-sidebar {
  width: 210px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.doc-sidebar__inner {
  position: sticky;
  top: 52px;
  padding: 2rem 1.25rem;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
}
.doc-sidebar__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .67rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .9rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.doc-sidebar ul { list-style: none; }
.doc-sidebar li { margin-bottom: .05rem; }
.doc-sidebar a {
  display: block;
  font-size: .855rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: .28rem .6rem;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.doc-sidebar a:hover { color: var(--accent); background: var(--accent-pale); }
.doc-sidebar a.active { color: var(--accent); background: var(--accent-pale); font-weight: 600; }
.doc-sidebar__group {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: .85rem .6rem .2rem;
}
.doc-sidebar__child a { padding-left: 1.25rem; font-size: .82rem; }

/* ---- Content ---- */
.doc-content {
  flex: 1;
  padding: 3rem 3rem 4rem;
  max-width: 760px;
  min-width: 0;
}
.doc-content h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: .4rem;
  letter-spacing: -.01em;
}
.doc-intro {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.doc-notice {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-pale);
  border: 1px solid rgba(94,61,154,.18);
  padding: .3rem .8rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

/* ---- Sections ---- */
.doc-section {
  padding-top: 2.25rem;
  margin-bottom: 0;
  border-top: 1px solid var(--border);
}
.doc-section:first-of-type { border-top: none; }
.doc-section h2 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .9rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.doc-section h3 {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 1.75rem 0 .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.doc-section p {
  font-size: .96rem;
  color: var(--text-dim);
  line-height: 1.78;
  margin-bottom: .85rem;
}
.doc-section ul {
  margin: .5rem 0 .85rem 1.25rem;
}
.doc-section li {
  font-size: .96rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: .3rem;
}
.doc-section code {
  font-family: var(--font-mono);
  font-size: .8em;
  background: var(--bg-hl);
  color: var(--accent);
  padding: .1em .38em;
  border-radius: 3px;
}

/* ---- Code blocks ---- */
.doc-code {
  background: #0D1225;
  border: 1px solid rgba(110,82,176,.20);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  margin: .85rem 0 1.1rem;
  overflow-x: auto;
}
.doc-code pre {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: #8AABCF;
  line-height: 1.72;
  margin: 0;
}

/* ---- Result table ---- */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  margin: .85rem 0 1.1rem;
}
.doc-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border-mid);
}
.doc-table td {
  padding: .6rem .75rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.65;
}
.doc-table td:first-child {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  white-space: nowrap;
}
.doc-table td:nth-child(2) {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---- Doc footer ---- */
.doc-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  font-size: .8rem;
  color: var(--text-muted);
  max-width: 1100px;
  margin: 0 auto;
}
.doc-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.doc-footer__logo { height: 20px; width: auto; opacity: .7; }
.doc-footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.doc-footer__links a { color: var(--text-muted); text-decoration: none; font-size: .8rem; }
.doc-footer__links a:hover { color: var(--accent); }
.doc-footer a { color: var(--text-muted); text-decoration: none; }
.doc-footer a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .doc-layout { flex-direction: column; }
  .doc-header__links { display: none; }
  .doc-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .doc-sidebar__inner {
    position: static;
    max-height: none;
    padding: 1.25rem 1.5rem;
  }
  .doc-content { padding: 2rem 1.25rem 3rem; }
  .doc-footer { padding: 1.25rem; }
}

/* ============================================================
   FORMS (contact.html, license.html)
   ============================================================ */

.form-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 2.25rem;
}
.form-group {
  margin-bottom: 1.4rem;
}
.form-group:last-of-type { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}
.form-label.form-legend { width: 100%; }
.form-label .req {
  color: var(--red);
  margin-left: .2rem;
}
.form-hint {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .35rem;
  line-height: 1.5;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: .65rem .8rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-l);
  box-shadow: 0 0 0 3px var(--accent-pale);
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23666666'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 1.1rem;
  padding-right: 2.2rem;
}
.form-checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem .75rem;
}
.form-checkbox {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: var(--text-dim);
  cursor: pointer;
}
.form-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-submit {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
  padding: .8rem 2rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .95rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}
.form-submit:hover { background: #4B2E7F; }
.form-submit:disabled { opacity: .6; cursor: default; }
.form-fallback {
  margin-top: 1.5rem;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}
.form-fallback a { color: var(--accent-l); text-decoration: none; }
.form-error {
  display: none;
  margin-top: 1rem;
  padding: .75rem 1rem;
  background: var(--red-pale);
  border: 1px solid rgba(179,49,36,.2);
  border-radius: 6px;
  font-size: .85rem;
  color: var(--red);
}
.form-error.is-visible { display: block; }

.form-success {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}
.form-success.is-visible { display: block; }
.form-success__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.form-success h2 {
  font-size: 1.5rem;
  margin-bottom: .6rem;
}
.form-success p {
  color: var(--text-dim);
  font-size: .95rem;
}

@media (max-width: 640px) {
  .form-card { padding: 1.5rem; }
  .form-checkbox-group { grid-template-columns: 1fr; }
}
