/* =================================================================
   V3 PAGES - the subpages in the homepage's light terminal language.
   Loads after dark-theme.css and turns every dark surface to paper,
   every accent to the house vermillion, every corner square.
   ================================================================= */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&display=swap');

:root {
  --v3-ground: #ece6da;
  --v3-panel: #f6f1e7;
  --v3-head: #efe8db;
  --v3-line: #d9cdba;
  --v3-line2: #c3b29a;
  --v3-ink: #191009;
  --v3-dim: #57493c;
  --v3-faint: #695a4d;   /* 5.16:1 on the ground - the lightest tone that still clears AA everywhere */
  --v3-ghost: #8b7c6b;   /* decorative only: rules, dividers, watermarks */
  --v3-red: #cf1812;
  --v3-red-2: #a01009;
  --v3-green: #0e7f3e;
  --v3-green-t: #0b6a33; /* the same green, dark enough to be read as text */
  --v3-mono: 'DM Mono', 'SF Mono', Consolas, monospace;
  --v3-sans: 'Inter', -apple-system, sans-serif;
}

/* ---------- ground + type ---------- */
body.dark-theme { background: var(--v3-ground) !important; color: var(--v3-ink) !important; }
body.dark-theme ::selection { background: var(--v3-red); color: #fff; }

body.dark-theme :is(h1, h2, h3):not(.mz-bc *) {
  font-family: var(--v3-sans);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--v3-ink);
}
body.dark-theme p:not(.mz-bc *) { color: var(--v3-dim); }
body.dark-theme .dt-serif { font-family: var(--v3-sans); font-style: normal; font-weight: 800; color: var(--v3-red); }

/* ---------- nav ---------- */
body.dark-theme .landing-nav { background: rgba(236, 230, 218, .92) !important; border-bottom: 1px solid var(--v3-line) !important; backdrop-filter: blur(10px); }
body.dark-theme .nav-center a { color: var(--v3-faint) !important; font-weight: 700; font-size: 10.5px; letter-spacing: .17em; text-transform: uppercase; }
body.dark-theme .nav-center a:hover { color: var(--v3-ink) !important; }
body.dark-theme .nav-center a.nav-active { background: transparent !important; color: var(--v3-red-2) !important; box-shadow: inset 0 -2px 0 var(--v3-red); border-radius: 0; }
body.dark-theme .nav-logo-text { color: var(--v3-ink) !important; letter-spacing: .28em; font-weight: 800; }
body.dark-theme .nav-logo-home .nav-logo-icon { background: var(--v3-red) !important; border-color: var(--v3-red) !important; border-radius: 0 !important; }
body.dark-theme .nav-cta, body.dark-theme .nav-enter {
  background: var(--v3-red) !important; border-color: var(--v3-red) !important; color: #fff !important;
  border-radius: 0 !important; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: 10px;
}
body.dark-theme .nav-cta:hover, body.dark-theme .nav-enter:hover { background: var(--v3-red-2) !important; }

/* ---------- page hero ---------- */
body.dark-theme .page-hero { background: var(--v3-ground) !important; border-bottom: 1px solid var(--v3-line); }
body.dark-theme .page-hero::before { background: radial-gradient(ellipse, rgba(207, 24, 18, .1), transparent 70%) !important; }
body.dark-theme .page-hero-tag {
  color: var(--v3-red) !important;
  font-family: var(--v3-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
}
body.dark-theme .page-hero-tag::before { content: ''; display: inline-block; width: 22px; height: 1px; background: currentColor; opacity: .6; margin-right: 10px; vertical-align: 4px; }
body.dark-theme .page-hero-headline, body.dark-theme .page-hero h1 {
  color: var(--v3-ink) !important;
  text-transform: uppercase; line-height: 1.02;
}
body.dark-theme .page-hero-sub, body.dark-theme .page-hero p { color: var(--v3-dim) !important; }

/* ---------- sections ---------- */
body.dark-theme .pg-section.bg-white { background: var(--v3-ground) !important; color: var(--v3-ink) !important; }
body.dark-theme .pg-section.bg-light { background: var(--v3-head) !important; color: var(--v3-ink) !important; }
body.dark-theme .pg-section.bg-dark { background: var(--v3-panel) !important; color: var(--v3-ink) !important; }
body.dark-theme .pg-section.bg-dark h2, body.dark-theme .pg-section.bg-dark h3, body.dark-theme .pg-section.bg-dark p { color: inherit; }
body.dark-theme .section-headline { color: var(--v3-ink) !important; text-transform: uppercase; }
body.dark-theme .section-tag, body.dark-theme .section-label {
  color: var(--v3-red) !important;
  font-family: var(--v3-mono); font-size: 9px; letter-spacing: .26em; text-transform: uppercase;
}

/* ---------- every card becomes a panel ---------- */
body.dark-theme [class$="-card"], body.dark-theme [class*="-card "],
body.dark-theme .panel, body.dark-theme .diff-card, body.dark-theme .contact-card,
body.dark-theme .blog-card, body.dark-theme .addon-card, body.dark-theme .ao-card,
body.dark-theme .value-card, body.dark-theme .role-card, body.dark-theme .faq-item {
  background: var(--v3-panel) !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: 0 !important;
  color: var(--v3-ink);
  box-shadow: none !important;
}
body.dark-theme [class$="-card"] h3, body.dark-theme [class$="-card"] h4 { color: var(--v3-ink) !important; }
body.dark-theme [class$="-card"] p { color: var(--v3-dim) !important; }

/* ---------- tables ---------- */
body.dark-theme table { font-variant-numeric: tabular-nums; }
body.dark-theme th {
  font-family: var(--v3-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--v3-faint) !important;
  background: var(--v3-head) !important;
  border-color: var(--v3-line) !important;
}
body.dark-theme td { border-color: var(--v3-line) !important; color: var(--v3-ink); }
body.dark-theme tr:nth-child(odd) td { background: rgba(255, 252, 245, .3); }

/* ---------- buttons ---------- */
body.dark-theme .btn, body.dark-theme [class*="btn-primary"], body.dark-theme .cta-btn,
body.dark-theme a.button, body.dark-theme button[type="submit"] {
  border-radius: 0 !important;
  font-family: var(--v3-sans); font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; font-size: 10.5px;
}
body.dark-theme .btn-primary, body.dark-theme .cta-btn, body.dark-theme button[type="submit"] {
  background: var(--v3-red) !important; border: 1px solid var(--v3-red) !important; color: #fff !important;
}
body.dark-theme .btn-primary:hover, body.dark-theme .cta-btn:hover, body.dark-theme button[type="submit"]:hover {
  background: var(--v3-red-2) !important;
}
body.dark-theme .btn-outline, body.dark-theme .btn-secondary {
  background: transparent !important; border: 1px solid var(--v3-line2) !important; color: var(--v3-ink) !important;
}
body.dark-theme .btn-outline:hover, body.dark-theme .btn-secondary:hover { border-color: var(--v3-red) !important; color: var(--v3-red) !important; }

/* ---------- forms ---------- */
body.dark-theme input, body.dark-theme select, body.dark-theme textarea {
  background: #fdfaf3 !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: 0 !important;
  color: var(--v3-ink) !important;
  font-family: var(--v3-mono);
}
body.dark-theme input:focus, body.dark-theme select:focus, body.dark-theme textarea:focus {
  border-color: var(--v3-red) !important; outline: none;
}
body.dark-theme label { color: var(--v3-faint); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; font-family: var(--v3-mono); }

/* ---------- pills, tags, misc accents ---------- */
body.dark-theme .category-pill, body.dark-theme .pill, body.dark-theme .tag {
  border-radius: 0 !important; border: 1px solid var(--v3-line) !important;
  background: transparent !important; color: var(--v3-dim) !important;
  font-family: var(--v3-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
}
body.dark-theme .category-pill.active, body.dark-theme .pill.active {
  background: var(--v3-red) !important; border-color: var(--v3-red) !important; color: #fff !important;
}
body.dark-theme a:not([class]) { color: inherit; }
body.dark-theme .pg-section a:not([class]) { color: var(--v3-red); }


/* ---------- faq blocks on pages ---------- */
body.dark-theme .faq-question { color: var(--v3-ink) !important; font-family: var(--v3-sans); font-weight: 700; }
body.dark-theme .faq-answer-inner { color: var(--v3-dim) !important; }
body.dark-theme .faq-toggle { color: var(--v3-faint) !important; }
body.dark-theme .faq-item.open .faq-toggle { color: var(--v3-red) !important; }

/* ---------- the shared dark footer stays a dark plate: frame it ---------- */
body.dark-theme .mz-bc { border-top: 1px solid var(--v3-line2); margin-top: 40px; }

/* ---------- scrollbar ---------- */
body.dark-theme::-webkit-scrollbar { width: 8px; }
body.dark-theme::-webkit-scrollbar-track { background: var(--v3-ground); }
body.dark-theme::-webkit-scrollbar-thumb { background: var(--v3-line2); }
