:root {
  --paper: #f3eee5;
  --paper-light: #faf7f1;
  --ink: #39281f;
  --muted: #6f5e51;
  --copper: #b76530;
  --copper-deep: #8f4a21;
  --line: #d9cbb9;
  --shadow: 0 14px 34px rgba(57, 40, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.1rem);
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
}

h3 {
  font-size: 1.16rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--copper-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol, dl {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.91em;
  background: #ece2d4;
  border-radius: 0.35rem;
  padding: 0.12em 0.42em;
}

pre {
  overflow-x: auto;
  margin: 1rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--paper-light);
}

pre code {
  padding: 0;
  background: none;
}

.wrap {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 241, 0.9);
}

.header-inner {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 190px;
  max-width: 100%;
}

.site-nav ul,
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.site-nav a,
.footer-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.footer-nav a:hover {
  color: var(--copper-deep);
}

main {
  display: block;
}

.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--copper-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.23rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  color: var(--copper-deep);
  font-weight: 700;
  text-decoration: none;
}

.text-link::after {
  content: " →";
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--copper);
  color: #fffaf4;
  font-weight: 700;
  text-decoration: none;
}

.action-link:hover {
  background: var(--copper-deep);
  color: #fffaf4;
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  padding: 0.55rem 0.2rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.record-card,
.panel,
.step,
.note-box {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.record-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.card-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-title {
  margin: 0.2rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.25;
}

.pill {
  display: inline-block;
  flex: none;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--copper);
  border-radius: 999px;
  color: var(--copper-deep);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem 1rem;
  margin: 1.15rem 0;
  font-size: 0.92rem;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
}

.mini-readout {
  padding: 1rem;
  border-radius: 0.9rem;
  background: #ece1d2;
}

.mini-readout strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  line-height: 1.1;
}

.mini-readout span {
  color: var(--muted);
  font-size: 0.86rem;
}

.section {
  padding: clamp(2.6rem, 5vw, 4.4rem) 0;
  border-top: 1px solid var(--line);
}

.section-intro {
  max-width: 70ch;
  margin-bottom: 2rem;
}

.section-intro > p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.step {
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
}

.panel p:last-child,
.step p:last-child {
  margin-bottom: 0;
}

.index-number {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--copper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1;
}

.flow {
  counter-reset: flow-step;
  display: grid;
  gap: 1rem;
}

.flow li {
  counter-increment: flow-step;
  position: relative;
  padding: 1rem 1rem 1rem 3.6rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper-light);
}

.flow li::before {
  content: counter(flow-step, decimal-leading-zero);
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--copper-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.flow strong {
  display: block;
  margin-bottom: 0.25rem;
}

.note-box {
  margin-top: 1.5rem;
  padding: 1.15rem 1.35rem;
  border-left: 4px solid var(--copper);
}

.note-box p:last-child {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.doc-list {
  display: grid;
  gap: 0.8rem;
}

.doc-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--paper-light);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.doc-list a:hover {
  border-color: var(--copper);
}

.doc-list small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-weight: 400;
}

.doc-list .arrow {
  color: var(--copper-deep);
  flex: none;
}

.pitch-panel {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.pitch-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fffdf9;
}

.pitch-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pitch-table th,
.pitch-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.pitch-table thead th {
  background: #ece2d5;
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pitch-table tbody tr:last-child td {
  border-bottom: 0;
}

.pitch-table tbody tr:nth-child(even) {
  background: #fbf7f0;
}

.note-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.deviation-cell {
  min-width: 190px;
}

.dev-value {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.dev-track {
  position: relative;
  display: block;
  width: 128px;
  height: 14px;
  margin-top: 0.3rem;
  border-radius: 999px;
  background: #ede3d5;
}

.dev-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  bottom: 1px;
  width: 1px;
  background: var(--muted);
}

.dev-bar {
  position: absolute;
  top: 3px;
  height: 8px;
  border-radius: 999px;
}

.dev-bar.high {
  left: 50%;
  background: var(--copper);
}

.dev-bar.low {
  right: 50%;
  background: var(--ink);
}

.w02 { width: 4%; }
.w03 { width: 6%; }
.w04 { width: 8%; }
.w05 { width: 10%; }
.w06 { width: 12%; }
.w08 { width: 16%; }
.w09 { width: 18%; }
.w10 { width: 20%; }
.w11 { width: 22%; }
.w12 { width: 24%; }
.w14 { width: 28%; }
.w16 { width: 32%; }

.result {
  color: var(--copper-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.example-box {
  padding: clamp(1rem, 2.5vw, 1.6rem);
  border: 1px dashed var(--line);
  border-radius: 1.15rem;
  background: var(--paper-light);
}

.example-box h3 {
  margin-bottom: 1rem;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #eee6da;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem;
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 1.5rem, 1120px);
  }

  .header-inner {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .brand img {
    width: 168px;
  }

  .site-nav ul,
  .footer-nav ul {
    gap: 0.25rem 0.9rem;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .detail-list {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .detail-list dd {
    margin-bottom: 0.55rem;
  }

  .doc-list a {
    align-items: flex-start;
  }

  .flow li {
    padding-left: 3.1rem;
  }
}
