:root {
  color-scheme: light;
  --ink: #161310;
  --muted: #675f57;
  --paper: #f6f0e7;
  --paper-2: #fffaf1;
  --rule: #d8cbbc;
  --green: #138a58;
  --amber: #b76e00;
  --red: #b6362f;
  --black: #111111;
  --shadow: 0 18px 50px rgba(55, 40, 23, .16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(22, 19, 16, .045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(rgba(22, 19, 16, .04) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

a {
  color: inherit;
}

.site-header {
  min-height: 86vh;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Courier New", monospace;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-2);
  border-radius: 4px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font: 700 13px/1 "Courier New", monospace;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  border-bottom-color: var(--ink);
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: end;
  padding: 44px 0 72px;
}

.hero-copy h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(58px, 8.2vw, 112px);
  line-height: .82;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-copy p:not(.kicker) {
  max-width: 720px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.25;
}

.kicker {
  margin: 0 0 14px;
  font: 700 13px/1.2 "Courier New", monospace;
  text-transform: uppercase;
  color: var(--red);
}

.hero-panel {
  background: var(--ink);
  color: var(--paper-2);
  border-radius: 6px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.hero-panel > div {
  border: 1px solid rgba(255, 250, 241, .2);
  border-radius: 4px;
  padding: 14px;
}

.panel-label {
  display: block;
  margin-bottom: 6px;
  color: #d8cbbc;
  font: 700 12px/1 "Courier New", monospace;
  text-transform: uppercase;
}

.hero-panel strong {
  font: 700 30px/1.1 "Courier New", monospace;
}

.legend-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--rule);
}

.legend-item {
  min-height: 96px;
  padding: 18px;
  border-right: 1px solid var(--rule);
  display: grid;
  align-content: center;
  gap: 8px;
}

.legend-item:last-child {
  border-right: 0;
}

.legend-item strong {
  font-size: 22px;
}

.legend-item span {
  color: var(--muted);
  font: 700 12px/1.25 "Courier New", monospace;
  text-transform: uppercase;
}

.legend-item.buy {
  border-top: 5px solid var(--green);
}

.legend-item.neutral {
  border-top: 5px solid #68615a;
}

.legend-item.caution {
  border-top: 5px solid var(--amber);
}

.legend-item.hold {
  border-top: 5px solid var(--red);
}

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.section-shell.dark {
  width: 100%;
  padding-inline: max(16px, calc((100vw - 1180px) / 2));
  background: #171512;
  color: var(--paper-2);
  border-block: 1px solid #2d2822;
}

.section-heading {
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: .9;
}

.section-heading p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.dark .section-heading p:not(.kicker) {
  color: #bdb1a5;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lab-card {
  background: rgba(255, 250, 241, .72);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(55, 40, 23, .08);
}

.lab-card header {
  padding: 18px;
  border-top: 8px solid var(--accent);
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.lab-card h3 {
  margin: 0;
  font-size: 30px;
}

.lab-card .take {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.badge {
  align-self: start;
  min-width: 116px;
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 8px 12px;
  text-align: center;
  font: 700 12px/1 "Courier New", monospace;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.buy {
  color: var(--green);
}

.badge.neutral {
  color: #57514b;
}

.badge.caution {
  color: var(--amber);
}

.badge.hold {
  color: var(--red);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat {
  padding: 16px;
  border-right: 1px solid var(--rule);
}

.stat:last-child {
  border-right: 0;
}

.stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font: 700 11px/1.2 "Courier New", monospace;
  text-transform: uppercase;
}

.stat strong {
  font: 700 28px/1 "Courier New", monospace;
}

.track-list {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.track h4 {
  margin: 0 0 10px;
  font: 700 13px/1 "Courier New", monospace;
  text-transform: uppercase;
  color: var(--muted);
}

.model-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed rgba(103, 95, 87, .35);
}

.model-row time {
  font: 700 12px/1.25 "Courier New", monospace;
  color: var(--muted);
}

.model-row strong {
  display: block;
  font-size: 18px;
}

.model-row p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.3;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-lab {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.timeline-lab h3 {
  margin: 0;
  font-size: 20px;
}

.timeline-rail {
  position: relative;
  min-height: 74px;
  border: 1px solid #3a342d;
  border-radius: 8px;
  background: #201c18;
  overflow: hidden;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  inset: 50% 18px auto;
  height: 1px;
  background: #5a5148;
}

.dot {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .08);
}

.dot span {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: max-content;
  max-width: 150px;
  translate: -50% 0;
  color: #efe5d8;
  font: 700 11px/1.15 "Courier New", monospace;
  text-align: center;
}

.source-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 28px;
}

.source-layout h3 {
  margin: 0 0 16px;
  font-size: 26px;
}

.related-list,
.source-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-list li,
.source-list details {
  margin-bottom: 10px;
  background: rgba(255, 250, 241, .7);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 12px;
}

.related-list a,
.source-list a {
  font-weight: 700;
}

.related-list p,
.source-list p {
  margin: 6px 0 0;
  color: var(--muted);
}

.source-list summary {
  cursor: pointer;
  font-weight: 700;
}

.source-list ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

footer {
  padding: 28px 16px 46px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}

@media (max-width: 900px) {
  .hero,
  .section-heading,
  .source-layout,
  .timeline-lab {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
  }

  .hero-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .legend-band,
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    min-height: auto;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 18vw, 76px);
  }

  .hero-panel,
  .legend-band,
  .guide-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .legend-item,
  .stat {
    border-right: 0;
  }

  .lab-card header {
    flex-direction: column;
  }

  .badge {
    align-self: flex-start;
  }

  .model-row {
    grid-template-columns: 1fr;
  }

  .dot span {
    display: none;
  }
}
