/* Page: Methodology — unique components only. */

/* === PAGE HEAD (same as about but with version badge) === */
.page-head {
  text-align: center;
  padding: 56px 0 40px;
  max-width: 820px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.page-head h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.page-head h1 em { color: var(--carmine); font-style: italic; }
.page-head .lede {
  font-family: 'Fraunces', serif;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 auto 20px;
}
.version-badge {
  display: inline-block;
  padding: 8px 18px;
  background: var(--ink);
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

/* === TOC === */
.toc {
  background: var(--accent-bg);
  border: 1px solid var(--rule);
  padding: 28px 32px;
  margin: 48px 0;
  position: relative;
}
.toc::before {
  content: 'CONTENTS';
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--paper);
  padding: 2px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  border: 1px solid var(--ink);
}
.toc ol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 32px;
  list-style: none;
  padding: 0;
  counter-reset: toc;
  margin: 0;
}
.toc li {
  counter-increment: toc;
  padding: 8px 0 8px 38px;
  position: relative;
  font-size: 14px;
}
.toc li::before {
  content: '§ ' counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--carmine);
  font-weight: 700;
}
.toc a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.toc a:hover { border-bottom-color: var(--carmine); color: var(--carmine); }

/* === PROTOCOL STEPS === */
.protocol {
  display: grid;
  gap: 14px;
  margin: 32px 0;
}
.proto-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--carmine);
  padding: 22px 26px;
  align-items: start;
}
.proto-num {
  font-family: 'Fraunces', serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--carmine);
  line-height: 1;
}
.proto-body h4 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.proto-body p {
  font-size: 14px !important;
  line-height: 1.65 !important;
  color: var(--ink-soft) !important;
  margin: 0 !important;
}

/* === RUBRIC TABLE === */
.rubric-wrap {
  border: 2px solid var(--ink);
  margin: 32px 0;
}
.rubric {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rubric thead {
  background: var(--ink);
  color: var(--paper);
}
.rubric thead th {
  padding: 16px 18px;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  border-right: 1px solid rgba(244, 241, 234, 0.15);
}
.rubric thead th:last-child { text-align: right; border-right: none; }
.rubric tbody td {
  padding: 20px 18px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.rubric tbody tr:last-child td { border-bottom: none; }
.rubric tbody tr:nth-child(even) { background: var(--accent-bg); }
.rubric .criterion {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  width: 24%;
}
.rubric .weight {
  text-align: right;
  width: 12%;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
}
.rubric .desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.rubric tfoot {
  background: var(--ink);
  color: var(--paper);
}
.rubric tfoot td {
  padding: 16px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.rubric tfoot td:last-child {
  text-align: right;
  font-family: 'Fraunces', serif;
  font-size: 24px;
  color: var(--gold);
}

/* === EXAMPLE CALC === */
.example-calc {
  background: var(--ink);
  color: var(--paper);
  padding: 44px 42px;
  margin: 40px 0;
  position: relative;
}
.example-calc::before {
  content: 'WORKED EXAMPLE — ROCKETPLAY';
  position: absolute;
  top: -11px;
  left: 28px;
  background: var(--paper);
  color: var(--ink);
  padding: 3px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  border: 1px solid var(--ink);
}
.example-calc h4 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 22px;
  font-style: italic;
}
.calc-rows { display: grid; gap: 0; }
.calc-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(244, 241, 234, 0.2);
  align-items: center;
  font-size: 14px;
}
.calc-row:first-child { border-top: 1px solid rgba(244, 241, 234, 0.4); }
.calc-row.total {
  border-top: 2px solid var(--gold);
  padding-top: 22px;
  margin-top: 8px;
}
.calc-row.header {
  border-top: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding-bottom: 8px;
}
.calc-label { color: var(--paper-dark); }
.calc-row.total .calc-label { font-family: 'Fraunces', serif; font-size: 18px; color: var(--paper); font-weight: 500; }
.calc-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--paper);
  text-align: right;
}
.calc-row.total .calc-num:last-child {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  color: var(--gold);
}

/* === TIMING TABLE === */
.timing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
  border: 1px solid var(--ink);
}
.timing-table th {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 16px;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.timing-table td {
  padding: 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.timing-table tbody tr:last-child td { border-bottom: none; }
.timing-table tbody tr:nth-child(even) { background: var(--accent-bg); }
.timing-table .phase {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
}
.timing-table .code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--carmine);
  font-weight: 700;
}

/* === LIMITATIONS BOX === */
.limitations {
  background: linear-gradient(135deg, #fdf6f0 0%, #f9ebe1 100%);
  border: 2px solid var(--carmine);
  border-left-width: 8px;
  padding: 36px 42px;
  margin: 40px 0;
  position: relative;
}
.limitations::before {
  content: '!';
  position: absolute;
  top: 20px;
  right: 32px;
  font-family: 'Fraunces', serif;
  font-size: 80px;
  color: var(--carmine);
  opacity: 0.15;
  line-height: 1;
  font-weight: 700;
}
.limitations .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--carmine);
  font-weight: 700;
  margin-bottom: 14px;
}
.limitations h4 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 16px;
}
.limitations ul {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}
.limitations li {
  padding: 10px 0 10px 24px;
  position: relative;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  border-top: 1px dashed var(--carmine);
}
.limitations li:first-child { border-top: 1px solid var(--carmine); }
.limitations li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--carmine);
  font-weight: 700;
}
.limitations li strong { color: var(--ink); }

/* === CHANGELOG === */
.changelog {
  margin: 36px 0;
}
.cl-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.cl-entry:first-child { border-top: 2px solid var(--ink); }
.cl-entry:last-child { border-bottom: 2px solid var(--ink); }
.cl-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--carmine);
}
.cl-version small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
}
.cl-body h5 {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
.cl-body p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .toc ol { grid-template-columns: 1fr; }
  .rubric tbody td { padding: 14px 12px; font-size: 13px; }
  .example-calc { padding: 32px 24px; }
  .calc-row { grid-template-columns: 2fr 1fr; gap: 12px; font-size: 13px; }
  .calc-row .calc-num:nth-child(3),
  .calc-row .calc-num:nth-child(4) { display: none; }
  .proto-step { grid-template-columns: 50px 1fr; gap: 18px; padding: 18px 20px; }
  .proto-num { font-size: 34px; }
  .limitations { padding: 28px 24px; }
  .cl-entry { grid-template-columns: 90px 1fr; gap: 18px; }
}
