.report-body {
  background: var(--paper);
  color: var(--ink);
}

.report-body .site-header {
  position: relative;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}

.report-body .nav-links a[aria-current="page"] {
  color: var(--green);
  font-weight: 600;
}

.report-body .nav-links .active-section {
  color: var(--green);
  font-weight: 600;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(245px, 300px) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 92px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 32px 100px;
  align-items: start;
}

.report-rail {
  position: sticky;
  top: 24px;
  min-width: 0;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px 18px 18px 0;
  scrollbar-width: thin;
}

.report-rail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.report-rail-head h2 {
  margin: 5px 0 0;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.report-count {
  font: 11px var(--mono);
  color: var(--muted);
  white-space: nowrap;
}

.report-master-link {
  display: block;
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--green) 38%, var(--line));
  background: color-mix(in srgb, var(--acid) 8%, transparent);
  color: inherit;
  text-decoration: none;
}

.report-master-link:hover,
.report-master-link[aria-current="page"] {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.report-master-link small,
.report-master-link strong,
.report-master-link span {
  display: block;
}

.report-master-link small {
  margin-bottom: 8px;
  font: 10px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-master-link strong {
  font-size: 17px;
  line-height: 1.25;
}

.report-master-link span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-master-link:hover span,
.report-master-link[aria-current="page"] span {
  color: color-mix(in srgb, var(--white) 72%, transparent);
}

.report-rail-label {
  margin: 24px 0 0;
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-list li {
  border-bottom: 1px solid var(--line);
}

.report-list a {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  padding: 20px 10px 20px 0;
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, color .2s ease;
}

.report-list a:hover {
  color: var(--green);
  transform: translateX(4px);
}

.report-list a[aria-current="page"],
.report-list a[aria-current="location"],
.report-list a[data-selected="true"] {
  color: var(--green);
}

.report-list time {
  padding-top: 3px;
  font: 10px/1.35 var(--mono);
  color: var(--muted);
  letter-spacing: .04em;
}

.report-list strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.report-list small {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.report-list small::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acid) 18%, transparent);
}

.report-main {
  min-width: 0;
  max-width: 960px;
}

.report-hero {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.report-hero h1 {
  max-width: 950px;
  margin: 24px 0 36px;
  font-size: clamp(54px, 7vw, 106px);
  line-height: .92;
  letter-spacing: -.065em;
}

.report-lead {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(20px, 2.4vw, 31px);
  line-height: 1.35;
}

.report-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 55px;
  color: var(--muted);
  font: 11px var(--mono);
  text-transform: uppercase;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.report-metrics div {
  padding: 34px 22px;
  border-right: 1px solid var(--line);
}

.report-metrics div:last-child {
  border-right: 0;
}

.report-metrics strong {
  display: block;
  font-size: 31px;
  letter-spacing: -.04em;
}

.report-metrics span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.report-context div {
  min-width: 0;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}

.report-context div:last-child {
  border-right: 0;
}

.report-context small,
.report-context strong,
.report-context span {
  display: block;
}

.report-context small {
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-context strong {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.35;
}

.report-context span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.report-note {
  margin: 34px 0;
  padding: 24px 26px;
  border-left: 3px solid var(--green);
  background: color-mix(in srgb, var(--green) 6%, transparent);
}

.report-note strong,
.report-note span {
  display: block;
}

.report-note span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.report-table-wrap {
  margin: 36px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.report-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
}

.report-table th,
.report-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.report-table th {
  background: color-mix(in srgb, var(--green) 7%, transparent);
  font: 10px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

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

.report-definition {
  display: grid;
  grid-template-columns: minmax(140px, .55fr) minmax(0, 1.45fr);
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.report-definition dt {
  font-weight: 700;
}

.report-definition dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.report-section {
  padding: 82px 0;
  border-bottom: 1px solid var(--line);
}

.report-section h2,
.report-cta h2 {
  margin: 15px 0 30px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -.05em;
}

.report-section > p:not(.eyebrow) {
  max-width: 800px;
  color: #40423f;
  font-size: 18px;
  line-height: 1.75;
}

.report-section code {
  font-family: var(--mono);
  font-size: .9em;
}

.pipeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 38px 0;
  padding: 24px;
  background: var(--green);
  color: var(--white);
}

.pipeline code {
  color: var(--acid);
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 65px;
}

.report-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-grid li {
  padding: 17px 0;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

.report-grid li::before {
  content: "→";
  margin-right: 10px;
  color: var(--green);
}

.report-cta {
  margin: 80px 0 0;
  padding: 62px;
  background: var(--green);
  color: var(--white);
}

.report-cta .eyebrow {
  color: var(--acid);
}

.report-cta .button {
  display: inline-block;
  margin-top: 14px;
}

.archive-hero {
  padding: 72px 0 60px;
  border-bottom: 1px solid var(--line);
}

.archive-hero h1 {
  max-width: 900px;
  margin: 20px 0 28px;
  font-size: clamp(58px, 8vw, 112px);
  line-height: .88;
  letter-spacing: -.07em;
}

.archive-hero p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.45;
}

.archive-intro {
  padding: clamp(58px, 8vw, 100px) 0;
  border-bottom: 1px solid var(--line);
}

.archive-intro h2 {
  max-width: 820px;
  margin: 18px 0 24px;
  font-size: clamp(38px, 5.5vw, 72px);
  line-height: 1;
  letter-spacing: -.055em;
}

.archive-intro > p:not(.eyebrow) {
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.engineering-log {
  scroll-margin-top: 30px;
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
}

.log-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  color: var(--muted);
  font: 11px var(--mono);
  text-transform: uppercase;
}

.log-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.log-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
}

.engineering-log h2 {
  max-width: 820px;
  margin: 0 0 22px;
  font-size: clamp(32px, 4.5vw, 62px);
  line-height: 1;
  letter-spacing: -.05em;
}

.engineering-log > p {
  max-width: 780px;
  color: #40423f;
  font-size: 17px;
  line-height: 1.72;
}

.log-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 34px;
  background: var(--line);
  border: 1px solid var(--line);
}

.log-facts li {
  min-height: 112px;
  padding: 20px;
  background: var(--paper);
}

.log-facts strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.log-facts span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.log-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--green);
  font-weight: 700;
}

.log-link::after {
  content: "↗";
}

.report-body .footer {
  max-width: 1440px;
  margin: 0 auto;
}

/*
 * InkTyper report standard:
 * - desktop and tablet: persistent timeline rail on the left
 * - phone only: timeline becomes a horizontal strip above the article
 */
@media (min-width: 761px) and (max-width: 1100px) {
  .report-layout {
    grid-template-columns: minmax(200px, 220px) minmax(0, 1fr);
    gap: 24px;
    padding-inline: 24px;
  }

  .report-rail {
    padding-right: 12px;
  }
}

@media (max-width: 760px) {
  .report-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 24px;
    width: 100%;
  }

  .report-rail {
    position: relative;
    top: auto;
    max-height: none;
    overflow: hidden;
    padding: 0;
    width: 100%;
  }

  .report-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 72vw);
    overflow-x: auto;
    width: 100%;
    min-width: 0;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
  }

  .report-list li {
    border-right: 1px solid var(--line);
    scroll-snap-align: start;
  }

  .report-list a {
    min-height: 108px;
    padding-right: 18px;
  }
}

@media (max-width: 760px) {
  .report-layout {
    padding: 18px 20px 70px;
  }

  .report-hero,
  .archive-hero {
    padding: 58px 0 48px;
  }

  .report-meta {
    flex-direction: column;
  }

  .report-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .report-metrics div:nth-child(2) {
    border-right: 0;
  }

  .report-context {
    grid-template-columns: 1fr;
  }

  .report-context div,
  .report-context div:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .report-context div:last-child {
    border-bottom: 0;
  }

  .report-grid,
  .log-facts {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .report-cta {
    padding: 38px 26px;
  }

  .pipeline {
    gap: 9px;
  }

  .report-definition {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .report-section {
    padding: 58px 0;
  }
}
