/* ============================================================
   AA Academy — Adobe Analytics Implementation Learning Platform
   Editorial / technical aesthetic — warm dark with amber accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Geist:wght@300..800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* color palette — warm ink */
  --ink: #0e0d0c;
  --ink-2: #15110e;
  --ink-3: #1c1814;
  --rule: #2a2520;
  --rule-soft: #1f1b17;
  --paper: #ede8df;
  --paper-2: #c8c2b5;
  --paper-3: #8a8378;
  --muted: #6b6459;

  --amber: #f4b942;
  --amber-deep: #c98c1a;
  --rust: #c34a1b;
  --moss: #6b8e4e;
  --plum: #8c5a8a;

  /* type */
  --f-display: 'Fraunces', Georgia, serif;
  --f-body: 'Geist', -apple-system, system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* layout */
  --measure: 68ch;
  --gutter: clamp(1rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(244, 185, 66, 0.04), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(195, 74, 27, 0.03), transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* film grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--paper);
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 3.5rem 0 1rem;
  font-variation-settings: "opsz" 100;
}

h3 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
  font-style: italic;
  color: var(--amber);
  font-variation-settings: "opsz" 36";
}

h4 {
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--paper-3);
  margin: 2rem 0 0.5rem;
}

p { margin: 0 0 1.1rem; max-width: var(--measure); }

p.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--paper-2);
  font-weight: 300;
  max-width: 56ch;
}

a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 185, 66, 0.3);
  transition: border-color 0.2s, color 0.2s;
}
a:hover { border-bottom-color: var(--amber); color: #ffd07a; }

em { color: var(--amber-deep); font-style: italic; }
strong { color: var(--paper); font-weight: 600; }

ul, ol { max-width: var(--measure); margin: 0 0 1.2rem 1.4rem; }
li { margin: 0.4rem 0; }

blockquote {
  border-left: 2px solid var(--amber);
  padding: 0.4rem 0 0.4rem 1.5rem;
  margin: 1.8rem 0;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--paper-2);
  max-width: 56ch;
}

/* ---------- code ---------- */

code {
  font-family: var(--f-mono);
  font-size: 0.86em;
  background: var(--ink-3);
  color: var(--amber);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--rule-soft);
}

pre {
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--paper-2);
  position: relative;
}

pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  font-family: var(--f-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--paper-3);
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* syntax tokens */
.tok-kw { color: #e6976a; }      /* keyword */
.tok-str { color: #b8c97a; }     /* string */
.tok-num { color: #e0a06b; }     /* number */
.tok-com { color: var(--muted); font-style: italic; }  /* comment */
.tok-fn  { color: #f4b942; }     /* function */
.tok-prop { color: #d5b18a; }    /* property */
.tok-op { color: var(--paper-3); }

/* ---------- layout ---------- */

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  background: rgba(14, 13, 12, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--paper);
  border: none;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.brand .mark {
  width: 10px;
  height: 10px;
  background: var(--amber);
  display: inline-block;
  transform: rotate(45deg);
}
.brand .sub {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-3);
  margin-left: 0.4rem;
}

.nav {
  display: flex;
  gap: 1.8rem;
  font-size: 0.85rem;
}
.nav a {
  color: var(--paper-2);
  border: none;
  font-weight: 400;
}
.nav a:hover { color: var(--amber); }

/* ---------- hero ---------- */

.hero {
  padding: 8rem 0 5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.hero .shell {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 4rem;
  align-items: end;
}

@media (max-width: 800px) {
  .hero .shell { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 3rem; }
}

.hero .eyebrow {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.hero .eyebrow::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--amber);
}

.hero h1 .it { font-style: italic; color: var(--amber); }
.hero h1 .small { font-size: 0.5em; font-style: italic; color: var(--paper-3); display: block; margin-top: 0.5rem;}

.hero .meta {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--paper-3);
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  display: grid;
  gap: 0.8rem;
}
.hero .meta .row { display: flex; justify-content: space-between; }
.hero .meta .row span:first-child { color: var(--muted); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.7rem;}

/* ---------- section ---------- */

section.section { padding: 5rem 0; border-bottom: 1px solid var(--rule); }

.section-label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.4rem;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: start;
}
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; gap: 1rem; } }

/* ---------- module grid ---------- */

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
@media (max-width: 800px) { .module-grid { grid-template-columns: 1fr; } }

.module-card {
  padding: 2rem 1.8rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-decoration: none;
  border-left: none;
  border-top: none;
  color: var(--paper);
  background: transparent;
  transition: background 0.2s;
  position: relative;
}
.module-card:nth-child(2n) { border-right: none; }
.module-card:hover { background: var(--ink-3); }
.module-card:hover .arrow { transform: translateX(6px); color: var(--amber);}

.module-card .num {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--paper-3);
  letter-spacing: 0.2em;
}
.module-card h3 {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-style: normal;
  color: var(--paper);
  margin: 0;
  font-weight: 400;
}
.module-card h3 em { color: var(--amber-deep);}
.module-card p {
  font-size: 0.92rem;
  color: var(--paper-2);
  line-height: 1.5;
  margin: 0;
}
.module-card .tags {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.module-card .tag {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--paper-3);
  border: 1px solid var(--rule);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}
.module-card .arrow {
  position: absolute;
  top: 2rem;
  right: 1.8rem;
  font-family: var(--f-mono);
  color: var(--paper-3);
  transition: transform 0.25s, color 0.25s;
}

/* ---------- module page ---------- */

.module-hero {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}
.module-hero .eyebrow {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}
.module-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 16ch;
  margin-bottom: 1rem;
}
.module-hero h1 em { color: var(--amber); }

.module-hero .meta-strip {
  display: flex;
  gap: 2.2rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.2rem;
  margin-top: 2.5rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--paper-3);
  flex-wrap: wrap;
}
.module-hero .meta-strip span { color: var(--paper); margin-right: 0.4rem;}

.module-body {
  padding: 4rem 0 6rem;
}
.module-body .container {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  max-width: 1100px;
  padding: 0 var(--gutter);
}
@media (max-width: 900px) {
  .module-body .container { grid-template-columns: 1fr; gap: 2rem; }
}

.toc {
  position: sticky;
  top: 90px;
  align-self: start;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  border-left: 1px solid var(--rule);
  padding-left: 1.2rem;
}
.toc-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-3);
  margin-bottom: 0.8rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0.5rem 0; }
.toc a {
  color: var(--paper-2);
  border: none;
  display: block;
  padding: 0.15rem 0;
  line-height: 1.35;
}
.toc a:hover { color: var(--amber);}

.prose {}
.prose h2:first-child { margin-top: 0; }

/* callouts */
.callout {
  border-left: 2px solid var(--amber);
  background: var(--ink-2);
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
  border-radius: 0 4px 4px 0;
}
.callout .label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
  display: block;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--rust); }
.callout.warn .label { color: var(--rust); }
.callout.tip { border-left-color: var(--moss); }
.callout.tip .label { color: var(--moss); }

/* table */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  font-family: var(--f-body);
}
th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  border-bottom: 1px solid var(--rule);
  background: var(--ink-2);
}
td code { font-size: 0.82em; }

/* lab embed */
.lab-block {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.8rem;
  margin: 2rem 0;
  background: var(--ink-2);
}
.lab-block .lab-label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.lab-block .lab-label::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--amber);
  display: inline-block;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* nav between modules */
.module-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
}
.module-nav a {
  padding: 2rem 1.5rem;
  border: none;
  display: block;
  color: var(--paper);
  font-family: var(--f-body);
}
.module-nav a:hover { background: var(--ink-3); color: var(--amber);}
.module-nav a:first-child { border-right: 1px solid var(--rule); }
.module-nav .dir {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-3);
  margin-bottom: 0.5rem;
}
.module-nav .ttl {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-style: italic;
}
.module-nav .next { text-align: right; }

/* ---------- Sandbox lab ---------- */

.sandbox {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: var(--ink-2);
  min-height: 480px;
}
@media (max-width: 800px) { .sandbox { grid-template-columns: 1fr; } }

.sb-panel {
  display: flex;
  flex-direction: column;
}
.sb-panel + .sb-panel { border-left: 1px solid var(--rule);}
@media (max-width: 800px) {
  .sb-panel + .sb-panel { border-left: none; border-top: 1px solid var(--rule); }
}

.sb-head {
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-3);
  background: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.sb-head .dots { display: flex; gap: 5px;}
.sb-head .dots span {
  width: 8px; height: 8px;
  background: var(--rule);
  border-radius: 50%;
}

.sb-code {
  flex: 1;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 1.2rem;
  resize: none;
  outline: none;
  line-height: 1.6;
  min-height: 320px;
  tab-size: 2;
}

.sb-controls {
  border-top: 1px solid var(--rule);
  padding: 0.8rem 1.2rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  background: var(--ink-3);
}

.btn {
  background: var(--amber);
  color: var(--ink);
  border: none;
  padding: 0.55rem 1.1rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: #ffd07a; }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent;
  color: var(--paper-2);
  border: 1px solid var(--rule);
}
.btn.ghost:hover { color: var(--amber); border-color: var(--amber);}

.sb-output {
  flex: 1;
  padding: 1.2rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  overflow: auto;
  background: var(--ink);
  color: var(--paper-2);
  line-height: 1.65;
}

.hit-card {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.9rem;
  margin-bottom: 1rem;
  background: var(--ink-2);
  font-size: 0.76rem;
  position: relative;
}
.hit-card.pageview { border-left: 3px solid var(--amber); }
.hit-card.link { border-left: 3px solid var(--moss); }
.hit-card .hit-type {
  position: absolute;
  top: 0.4rem;
  right: 0.7rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.hit-card .hit-ts {
  color: var(--paper-3);
  font-size: 0.68rem;
  margin-bottom: 0.4rem;
}
.hit-card .hit-url {
  color: var(--moss);
  word-break: break-all;
  font-size: 0.7rem;
  margin-bottom: 0.6rem;
  opacity: 0.8;
}
.hit-card table {
  width: 100%;
  margin: 0;
  font-size: 0.72rem;
}
.hit-card th, .hit-card td {
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  background: transparent;
}
.hit-card th { color: var(--amber); width: 30%;}
.hit-card td { color: var(--paper-2); }

.log-empty {
  color: var(--muted);
  font-style: italic;
  padding: 2rem;
  text-align: center;
  font-family: var(--f-display);
  font-size: 1rem;
}

/* ---------- quizzes ---------- */

.quiz {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2rem;
  margin: 2rem 0;
  background: var(--ink-2);
}
.quiz h4 {
  margin-top: 0;
  color: var(--amber);
}
.quiz .q {
  margin: 1.5rem 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.quiz .q:last-of-type { border-bottom: none; }
.quiz .q-num {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--paper-3);
  letter-spacing: 0.15em;
}
.quiz .q-text {
  font-family: var(--f-display);
  font-size: 1.15rem;
  margin: 0.5rem 0 1rem;
  color: var(--paper);
}
.quiz .opt {
  display: block;
  margin: 0.5rem 0;
  cursor: pointer;
  padding: 0.6rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: all 0.15s;
  font-size: 0.92rem;
  position: relative;
  padding-left: 2.5rem;
}
.quiz .opt:hover { border-color: var(--paper-3); }
.quiz .opt input { position: absolute; opacity: 0; pointer-events: none;}
.quiz .opt::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 1px solid var(--paper-3);
  border-radius: 50%;
  background: var(--ink);
}
.quiz .opt input:checked ~ ::before,
.quiz .opt.selected::before {
  background: var(--amber);
  border-color: var(--amber);
}
.quiz .opt.selected { border-color: var(--amber); background: rgba(244, 185, 66, 0.05);}
.quiz .opt.correct { border-color: var(--moss); background: rgba(107, 142, 78, 0.08); }
.quiz .opt.correct::before { background: var(--moss); border-color: var(--moss);}
.quiz .opt.incorrect { border-color: var(--rust); background: rgba(195, 74, 27, 0.08);}
.quiz .opt.incorrect::before { background: var(--rust); border-color: var(--rust);}

.quiz .explain {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--ink-3);
  border-left: 2px solid var(--amber);
  font-size: 0.9rem;
  color: var(--paper-2);
  display: none;
}
.quiz .explain.show { display: block; }
.quiz .explain strong { color: var(--amber);}

.quiz-result {
  margin-top: 2rem;
  padding: 1.5rem;
  text-align: center;
  font-family: var(--f-display);
  font-size: 1.4rem;
  display: none;
}
.quiz-result.show { display: block; }

/* exercise list */
.exercises {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 2rem 0;
}
@media (max-width: 800px) { .exercises { grid-template-columns: 1fr;} }
.exercise {
  padding: 1.5rem;
  border-right: 1px solid var(--rule);
}
.exercise:nth-child(2n) { border-right: none; }
.exercise .ex-label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.6rem;
}
.exercise h4 {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.15rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--paper);
  margin: 0 0 0.6rem;
  font-weight: 400;
}
.exercise p {
  font-size: 0.88rem;
  color: var(--paper-2);
  margin: 0;
}

/* footer */
.site-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--paper-3);
}
.site-footer .shell {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 800px) { .site-footer .shell { grid-template-columns: 1fr; gap: 2rem;} }
.site-footer h5 {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.8rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.4rem 0; }
.site-footer a { color: var(--paper-2); border: none;}
.site-footer a:hover { color: var(--amber);}

.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* utility */
.center { text-align: center; }
.divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

.kbd {
  font-family: var(--f-mono);
  font-size: 0.78em;
  border: 1px solid var(--rule);
  background: var(--ink-2);
  padding: 0.05em 0.4em;
  border-radius: 3px;
  color: var(--paper-2);
}

.ascii-divider {
  font-family: var(--f-mono);
  color: var(--rule);
  text-align: center;
  margin: 3rem 0;
  letter-spacing: 0.5em;
  font-size: 0.8rem;
  overflow: hidden;
  white-space: nowrap;
}

/* anchored sub-section */
.sub {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.sub-num {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 0.3rem;
}

/* number/stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2rem 0;
}
@media (max-width: 800px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat {
  padding: 1.5rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat:nth-child(4n) { border-right: none; }
.stat:last-child, .stat:nth-last-child(-n+0) { border-bottom: none; }
.stat .num {
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-style: italic;
  color: var(--amber);
  line-height: 1;
  font-weight: 400;
}
.stat .lbl {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--paper-3);
  margin-top: 0.4rem;
}
