/* =============================================================
   asicverif.ai — stylesheet
   Warm paper + red/gold accents. Utilitarian editorial aesthetic.
   ============================================================= */

:root {
  --paper:      #faf6ed;
  --paper-2:    #f3ede0;
  --paper-3:    #ece4d0;
  --ink:        #1a1816;
  --ink-soft:   #4a4540;
  --ink-faint:  #8b8377;
  --rule:       #c8bfa8;
  --rule-soft:  #ded5c1;
  --red:        #a8322a;
  --red-soft:   #c45b51;
  --red-tint:   rgba(168, 50, 42, 0.08);
  --blue:       #2c4a6e;
  --gold:       #b8893a;
  --sage:       #6b8068;

  /* Code surface — warm paper tone, ink text */
  --code-bg:    #f3ede0;
  --code-bg-2:  #ece4d0;
  --code-fg:    #1a1816;
  --code-muted: #8b8377;
  --code-rule:  #c8bfa8;

  /* Syntax colors — warm palette on paper */
  --syn-keyword: #a8322a;   /* red — module, class, function, task */
  --syn-type:    #2c4a6e;   /* blue — logic, int, bit, uvm_driver */
  --syn-string:  #6b8068;   /* sage — "strings" */
  --syn-number:  #b8893a;   /* gold — numerics */
  --syn-comment: #8b8377;   /* ink-faint — italic */

  --display: 'Inter', system-ui, sans-serif;
  --body:    'Inter', system-ui, sans-serif;
  --mono:    'Fira Code', ui-monospace, monospace;

  --max-w: 1160px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  font-feature-settings: "cv11", "ss01", "ss03";
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.06 0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

a { color: var(--red); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--red-soft); }
em, i { font-style: italic; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* =============================================================
   NAV
   ============================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 237, 0.92);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 22px;
  height: 22px;
  background: var(--red);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.tabs {
  display: flex;
  gap: 2px;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}
.tabs a {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 7px 12px;
  border-radius: 6px;
  transition: all 0.15s;
  letter-spacing: -0.005em;
}
.tabs a:hover { color: var(--ink); background: var(--paper-2); }
.tabs a.active { color: var(--red); background: var(--red-tint); }

.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: all 0.15s;
}
.nav-cta:hover { background: var(--red); color: var(--paper); }

/* =============================================================
   HERO (asymmetric, left-aligned)
   ============================================================= */
.hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--rule);
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 72px;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 500;
}
.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--red);
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 3px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 5.6vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 640px;
}
.hero h1 .accent { color: var(--red); }
.hero-lede {
  font-size: 19px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 36px;
  max-width: 560px;
  letter-spacing: -0.005em;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-meta {
  display: flex;
  gap: 18px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  flex-wrap: wrap;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta span::before { content: "›"; color: var(--red); font-weight: 700; }

/* Hero right — a "preview" code callout */
.hero-preview {
  background: var(--code-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(26, 24, 22, 0.12);
  transform: rotate(0.4deg);
  border: 1px solid var(--rule);
}
.hero-preview-head {
  padding: 10px 16px;
  background: var(--code-bg-2);
  border-bottom: 1px solid var(--code-rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.hero-preview-head .dots { display: flex; gap: 5px; }
.hero-preview-head .dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rule);
}
.hero-preview-head .dots span:first-child { background: var(--red-soft); }
.hero-preview-head .dots span:nth-child(2) { background: var(--gold); }
.hero-preview-head .dots span:nth-child(3) { background: var(--sage); }

.hero-preview-body {
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--code-fg);
  font-variant-ligatures: contextual;
  font-feature-settings: "calt", "ss01";
  letter-spacing: 0;
  white-space: pre;
  overflow-x: auto;
}
.hero-preview-body .kw { color: var(--syn-keyword); font-weight: 600; }   /* keyword */
.hero-preview-body .tp { color: var(--syn-type); }      /* type */
.hero-preview-body .st { color: var(--syn-string); }    /* string */
.hero-preview-body .nm { color: var(--syn-number); }    /* number */
.hero-preview-body .cm { color: var(--syn-comment); font-style: italic; }

@media (max-width: 900px) {
  .hero { padding: 56px 0 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
}

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(168, 50, 42, 0.22);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-block { width: 100%; }

.btn-primary:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.spinner {
  width: 12px; height: 12px;
  border: 2px solid rgba(250, 246, 237, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   GENERATOR PANEL
   ============================================================= */
.generator {
  padding: 72px 0 40px;
}
.panel {
  max-width: 920px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 1px 0 var(--paper-3);
  overflow: hidden;
}
.panel-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper-2);
}
.panel-head .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.panel-head .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.panel-body { padding: 32px 28px; }

/* Protocol pill tabs */
.protocols {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 32px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  flex-wrap: wrap;
}
.protocol {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  padding: 7px 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.protocol:hover:not(:disabled) { color: var(--ink); background: var(--paper); }
.protocol.active {
  color: var(--red);
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(26, 24, 22, 0.05);
  font-weight: 600;
}
.protocol:disabled { opacity: 0.5; cursor: not-allowed; }
.protocol .soon {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--gold);
  margin-left: 5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }

.label {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.hint {
  font-family: var(--mono);
  color: var(--ink-faint);
  font-weight: 400;
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0;
}

.input, .select, .textarea {
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-feature-settings: "liga" 0;
}
.select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5l3 3 3-3' stroke='%234a4540' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.textarea {
  font-family: var(--body);
  font-size: 14px;
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-tint);
}

/* Check chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  border-radius: 100px;
  letter-spacing: -0.005em;
}
.chip:hover { border-color: var(--ink-soft); color: var(--ink); }
.chip input { display: none; }
.chip.checked {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

/* Output */
.output { margin-top: 28px; display: none; }
.output.visible { display: block; }
.status {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  margin-bottom: 16px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
}
.status.success {
  border-color: var(--sage);
  color: var(--sage);
  background: rgba(107, 128, 104, 0.06);
}
.status.success::before { content: "✓"; font-weight: 700; }
.status .spinner { border-color: var(--rule-soft); border-top-color: var(--ink); }

.error {
  padding: 14px 18px;
  background: rgba(168, 50, 42, 0.06);
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 14px;
  border-radius: 6px;
}

/* Code viewer (paper tone) */
.files {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26, 24, 22, 0.06);
}
.file-tabs {
  display: flex;
  overflow-x: auto;
  background: var(--code-bg-2);
  border-bottom: 1px solid var(--code-rule);
}
.file-tabs::-webkit-scrollbar { height: 2px; }
.file-tab {
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-faint);
  background: transparent;
  border: none;
  border-right: 1px solid var(--code-rule);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
  font-feature-settings: "liga" 0;
  letter-spacing: 0;
}
.file-tab:hover { color: var(--ink); }
.file-tab.active {
  background: var(--code-bg);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--red);
}
.code {
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--code-fg);
  overflow-x: auto;
  max-height: 520px;
  white-space: pre;
  background: var(--code-bg);
  font-variant-ligatures: contextual;
  font-feature-settings: "calt", "ss01";
  letter-spacing: 0;
  tab-size: 2;
}
.code::-webkit-scrollbar { height: 8px; width: 8px; }
.code::-webkit-scrollbar-track { background: var(--code-bg); }
.code::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }

.output-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.tip {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-radius: 6px;
}
.tip strong {
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}
.btn-donate {
  background: var(--gold);
  color: var(--paper);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--gold);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-donate:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

/* Inline code in prose */
code, .inline-code {
  font-family: var(--mono);
  background: var(--paper-2);
  padding: 1px 6px;
  color: var(--blue);
  font-size: 0.88em;
  border: 1px solid var(--rule-soft);
  border-radius: 3px;
  font-weight: 500;
  font-feature-settings: "liga" 0;
  letter-spacing: 0;
}
.code code, .hero-preview-body code {
  background: transparent; padding: 0; color: inherit;
  border: none; font-size: inherit; font-weight: inherit;
}

/* =============================================================
   STEPS (3 up, horizontal)
   ============================================================= */
.steps {
  padding: 80px 0 40px;
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
}
.section-h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--ink);
  max-width: 640px;
}
.section-h2 .accent { color: var(--red); }
.section-lede {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 560px;
  margin-bottom: 48px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.step-grid::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 32px;
  right: 32px;
  height: 1px;
  background: var(--rule);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  background: var(--paper);
  padding-right: 12px;
}
.step-num {
  width: 36px; height: 36px;
  border: 1px solid var(--red);
  background: var(--paper);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 18px;
  letter-spacing: 0;
}
.step h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.step p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  letter-spacing: -0.005em;
}
@media (max-width: 720px) {
  .step-grid { grid-template-columns: 1fr; gap: 28px; }
  .step-grid::before { display: none; }
}

/* =============================================================
   ABOUT STRIP
   ============================================================= */
.about {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 72px;
  align-items: start;
}
.about-grid p {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}
.about-grid strong { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0 48px;
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--body);
  font-size: 13px;
  color: var(--ink-faint);
}
.footer-inner a { color: var(--ink-soft); margin-left: 20px; }
.footer-inner a:first-of-type { margin-left: 0; }
.footer-inner a:hover { color: var(--red); }

/* =============================================================
   DOCS (SystemVerilog hub + chapters)
   ============================================================= */
.docs-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.docs-hero h1 {
  font-family: var(--display);
  font-size: clamp(36px, 4.6vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 16px;
  max-width: 720px;
}
.docs-hero h1 .accent { color: var(--red); }
.docs-hero-lede {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 640px;
  letter-spacing: -0.005em;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 56px 0 96px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}
@media (max-width: 920px) {
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
}
.docs-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 14px;
}
.docs-sidebar .group {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 10px;
  margin-top: 20px;
}
.docs-sidebar .group:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.docs-sidebar a {
  display: block;
  padding: 7px 10px;
  border-radius: 5px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: all 0.15s;
}
.docs-sidebar a:hover { background: var(--paper-2); color: var(--ink); }
.docs-sidebar a.active {
  background: var(--red-tint);
  color: var(--red);
  font-weight: 600;
}

.docs-main { max-width: 720px; }
.docs-main h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 48px 0 14px;
  line-height: 1.2;
}
.docs-main h2:first-child { margin-top: 0; }
.docs-main h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 32px 0 10px;
}
.docs-main p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}
.docs-main ul, .docs-main ol {
  margin: 0 0 16px 24px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}
.docs-main li { margin-bottom: 6px; }
.docs-main strong { color: var(--ink); font-weight: 600; }

.docs-nav-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  gap: 16px;
  flex-wrap: wrap;
}
.docs-nav-pager a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
}
.docs-nav-pager a:hover { color: var(--red); }

.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.docs-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 24px;
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--ink);
}
.docs-card:hover {
  border-color: var(--red);
  box-shadow: 0 6px 20px rgba(26, 24, 22, 0.06);
  transform: translateY(-2px);
  color: var(--ink);
}
.docs-card .tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--red);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}
.docs-card h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.25;
}
.docs-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.docs-card .meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.docs-card .meta a { color: var(--red); font-weight: 600; }

/* =============================================================
   CHAPTER PAGE EXTRAS (callouts, code plates, tables, lede)
   These apply to content inside .docs-main
   ============================================================= */
.docs-main .lede-para {
  font-size: 19px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.docs-main .plate {
  margin: 24px 0;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.docs-main .plate-head {
  padding: 10px 16px;
  background: var(--code-bg-2);
  border-bottom: 1px solid var(--code-rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}
.docs-main .plate-head .lbl { color: var(--red); font-weight: 600; }
.docs-main .plate-body {
  padding: 18px 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--code-fg);
  overflow-x: auto;
  font-variant-ligatures: contextual;
  font-feature-settings: "calt", "ss01";
  letter-spacing: 0;
  tab-size: 2;
  white-space: pre-wrap;
}
.docs-main .plate-body .kw { color: var(--syn-keyword); font-weight: 600; }
.docs-main .plate-body .tp { color: var(--syn-type); }
.docs-main .plate-body .st { color: var(--syn-string); }
.docs-main .plate-body .nm { color: var(--syn-number); }
.docs-main .plate-body .cm { color: var(--syn-comment); font-style: italic; }
.docs-main .plate-cap {
  padding: 10px 16px;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}

.docs-main .callout {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--paper-2);
  border-left: 3px solid var(--red);
  border-radius: 0 6px 6px 0;
}
.docs-main .callout-term {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 6px;
}
.docs-main .callout-body,
.docs-main .callout-body p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}

.docs-main em { color: var(--red); font-style: italic; }

.docs-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}
.docs-main th, .docs-main td {
  padding: 10px 14px;
  border: 1px solid var(--rule);
  text-align: left;
}
.docs-main th {
  background: var(--paper-2);
  font-weight: 600;
  color: var(--ink);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; }
  .tabs { gap: 0; }
  .tabs a { padding: 6px 10px; font-size: 13px; }
  .hero-inner { padding: 0 20px; }
  .panel-body { padding: 24px 20px; }
  .footer-inner { padding: 0 20px; }
  .docs-layout { padding-left: 20px; padding-right: 20px; }
}
