@font-face {
  font-family: "STIX Two Text";
  src: url(assets/fonts/stix-two-text.woff2) format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --reader-paper: #f7f8fa;
  --reader-ink: #1c222b;
  --reader-soft: #515c69;
  --reader-line: #d3d9df;
  --reader-navy: #101c30;
  --reader-blue: #2464a6;
  --reader-bright: #65bbfa;
  --reader-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --reader-serif: "STIX Two Text", Georgia, serif;
}

:root,
.journal-page,
.research-page {
  background: var(--reader-paper);
}
/* The page and its overscroll canvas share a surface behind the demo and results. */
.demo-home {
  background: #091222;
}
body.session-page {
  --desk-top: #0d1a30;
  --desk-bottom: #091222;
  --desk-edge: #192e4e;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--desk-bottom);
  background:
    radial-gradient(ellipse 95vw 95svh at 78% 0, var(--desk-edge), transparent 77%),
    linear-gradient(140deg, var(--desk-top), var(--desk-bottom) 76%) top / 100% 105svh no-repeat,
    var(--desk-bottom);
}
.session-page :is(.results, .related, footer) {
  --reader-ink: #edf2fb;
  --reader-soft: #b2bfd1;
  --reader-line: #34425a;
  --reader-blue: #96c8ff;
}

.journal-page main,
.research-page main,
.session-page :is(.results, .related),
body > footer {
  --ink: var(--reader-ink);
  --muted: var(--reader-soft);
  --line: var(--reader-line);
  --good: var(--reader-blue);
  color: var(--reader-ink);
  font-family: var(--reader-ui);
}

.journal-page .wrap,
.research-page .wrap,
.session-page :is(.results.wrap, .related.wrap, footer.wrap) {
  width: min(calc(100% - 2 * var(--site-gutter)), var(--site-width));
}

.journal-page .story-title,
.research-page .masthead {
  color: var(--reader-ink);
  background: transparent;
}

.journal-page h1,
.journal-page h2,
.research-page h1,
.research-page h2,
.session-page :is(.results h2, .related a) {
  font-family: var(--reader-ui);
  font-weight: 550;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.journal-page .story-title .kicker,
.research-page .kicker,
.results .kicker {
  color: var(--reader-soft);
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.018em;
}

.journal-page .story-title .kicker,
.research-page .masthead .kicker {
  margin-bottom: 13px;
}

.journal-page main a,
.research-page main a,
.session-page .results a {
  color: var(--reader-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.journal-page main a:hover,
.research-page main a:hover {
  color: #173e69;
  text-decoration: underline;
}

.journal-page main :focus-visible,
.research-page main :focus-visible,
.session-page .results :focus-visible {
  outline: 2px solid var(--reader-blue);
  outline-offset: 3px;
}

.journal-page .story-title {
  padding: clamp(34px, 4.55vw, 68px) 0;
  border-bottom: 1px solid var(--reader-line);
}

.journal-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6.2vw, 94px);
}

.journal-page .story-title h1 {
  max-width: 13.5ch;
  font-family: var(--reader-ui);
  font-size: clamp(3.25rem, 6.2vw, 6.15rem);
  letter-spacing: -0.063em;
  line-height: 0.99;
}

.journal-page .journal-intro > p:not(.kicker):not(.byline) {
  max-width: 35ch;
  margin: 20px 0 22px;
  color: var(--reader-soft);
  font: 400 clamp(1.025rem, 1.42vw, 1.24rem)/1.45 var(--reader-ui);
}

.journal-intro a,
.article-links a,
.research-page .outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 0.9rem/1.35 var(--reader-ui);
  text-decoration: none;
}

.journal-intro a::after,
.article-links a::after,
.research-page .outline::after {
  flex: none;
  content: "";
  width: 5px;
  height: 5px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}

/* The frame is the product tab captured during the November 24 run. */
.journal-page .journal-intro .byline {
  margin: 22px 0 0;
  color: var(--reader-soft);
  font: 500 0.81rem/1.5 var(--reader-ui);
}

.byline span {
  padding-inline: 4px;
}

.price-figure {
  margin: 0;
}

.price-figure a {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--reader-line);
  border-radius: 6px;
  background: #fff;
}

.price-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.figure-action {
  position: absolute;
  bottom: 11px;
  right: 11px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #fff;
  border-radius: 4px;
  background: #17283e;
  font: 550 0.81rem/1.3 var(--reader-ui);
}

.figure-action::before {
  width: 0;
  height: 0;
  content: "";
  border-block: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.price-figure a:hover .figure-action,
.price-figure a:focus-visible .figure-action {
  background: #234b76;
}

.price-figure figcaption {
  padding-block: 9px 0;
  color: var(--reader-soft);
  font: 400 0.79rem/1.48 var(--reader-ui);
}

.journal-page .article-grid {
  display: grid;
  grid-template-columns: minmax(155px, 0.65fr) minmax(0, 62ch) minmax(0, 0.3fr);
  gap: clamp(24px, 4.4vw, 70px);
  padding-block: clamp(36px, 4.7vw, 72px) clamp(55px, 6vw, 96px);
}

.article-grid nav {
  gap: 5px;
  padding: 13px 0;
  border-top: 1px solid var(--reader-line);
}

.article-grid nav p {
  margin: 0 0 7px;
  color: var(--reader-ink);
  font: 600 0.85rem/1.35 var(--reader-ui);
}

.journal-page .article-grid nav a {
  padding: 3px 0;
  color: var(--reader-soft);
  font-size: 0.9rem;
  text-decoration: none;
}

.article-grid .lede {
  font: 400 clamp(1.46rem, 2.2vw, 2.02rem)/1.32 var(--reader-serif);
  letter-spacing: -0.027em;
}

.article-grid p + p {
  margin-top: 0.85em;
}

.article-grid p {
  color: #343c46;
  font-size: 1.015rem;
  line-height: 1.68;
}

.journal-page .article-grid h2 {
  margin: 1.38em 0 0.38em;
  font-size: clamp(1.6rem, 2.35vw, 2.35rem);
  scroll-margin: 28px;
}

.article-grid .article-links {
  gap: 12px 28px;
  padding-top: 18px;
  border-top: 1px solid var(--reader-line);
}

.article-grid .article-links a,
.research-page .outline {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}


/* Field notes keep the recorded observation and its supporting evidence together. */
.journal-page .article-grid.field-note {
  grid-template-columns: minmax(0, 60ch) minmax(0, 31ch);
  justify-content: center;
  align-items: start;
  column-gap: clamp(42px, 8vw, 117px);
}

.journal-page .field-note h2:first-child {
  margin-top: 0;
}

.note-evidence {
  padding-inline-start: clamp(18px, 2vw, 31px);
  border-inline-start: 1px solid var(--reader-line);
}

.journal-page .note-evidence h2 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.note-evidence .article-links {
  display: grid;
  justify-items: start;
  gap: 1px;
  margin-top: 6px;
  padding-top: 0;
  border: 0;
}

.run-details {
  margin-top: 11px;
  border-block-start: 1px solid var(--reader-line);
}

.run-details summary {
  padding-block: 12px;
  font-weight: 600;
  color: var(--reader-ink);
}

.run-details dl {
  display: grid;
  gap: 9px;
  padding: 0 0 13px;
  font-size: 0.87rem;
  line-height: 1.42;
}

.run-details dt {
  color: var(--reader-soft);
  font-size: 0.79rem;
}

.run-details dd {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  .journal-page .article-grid.field-note {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 26px;
  }
  .note-evidence {
    padding: 16px 0 0;
    border-inline-start: 0;
    border-block-start: 1px solid var(--reader-line);
  }
}

.research-page .masthead {
  padding: clamp(35px, 4.6vw, 68px) 0 clamp(22px, 3.4vw, 48px);
}

.research-page .masthead h1 {
  font-size: clamp(3rem, 6.6vw, 6.1rem);
  letter-spacing: -0.063em;
}

.research-page .page-description {
  max-width: 35ch;
  font-size: clamp(1.03rem, 1.4vw, 1.24rem);
  line-height: 1.4;
}

.research-page .calibration {
  grid-template-columns: minmax(160px, 0.47fr) minmax(0, 1fr);
  gap: clamp(25px, 4.7vw, 70px);
  align-items: center;
  padding: clamp(24px, 3vw, 46px);
  color: #f1f4f8;
  background: var(--reader-navy);
  border-radius: 3px;
}

.calibration .score {
  width: max-content;
  color: #fcfdff;
  font: 500 clamp(4.7rem, 7.25vw, 7.75rem)/0.98 var(--reader-ui);
  letter-spacing: -0.085em;
}

.calibration .score::after {
  display: block;
  height: 5px;
  margin: 12px 0 0 0.035em;
  background: repeating-linear-gradient(to right, var(--reader-bright) 0 calc(6.25% - 2px), transparent 0 6.25%);
  content: "";
}

.calibration .score span {
  margin-left: 0.045em;
  color: #a2acc0;
  font-size: 0.57em;
  letter-spacing: -0.07em;
}

.research-page .calibration .kicker {
  color: #a6b3c4;
}

.research-page .calibration h2 {
  font: 550 clamp(1.7rem, 2.7vw, 2.75rem)/1.07 var(--reader-ui);
  letter-spacing: -0.049em;
}

.calibration p {
  max-width: 65ch;
  margin-block: 10px;
  color: #c9d2dd;
  font-size: 0.99rem;
  line-height: 1.48;
}

.research-page .calibration a,
.research-page .calibration a:hover {
  color: #9bd6ff;
  text-decoration-color: #6085a9;
}

.research-page .bench {
  padding-block: clamp(35px, 4.2vw, 66px) clamp(30px, 3.9vw, 54px);
}

.research-page .bench h2,
.research-page .records h2,
.results .section-head h2 {
  font-size: clamp(2rem, 3.65vw, 3.8rem);
}

.research-page .bench .section-head + p {
  margin-block: 13px 18px;
  max-width: 72ch;
  font-size: 0.99rem;
}

.research-page .stage-filter {
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.stage-filter button {
  min-height: 38px;
  padding: 6px 8px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--reader-soft);
  background: transparent;
  font: 500 0.9rem/1.3 var(--reader-ui);
}

.research-page .stage-filter button:hover {
  color: var(--reader-blue);
}

.research-page .stage-filter [aria-pressed="true"] {
  color: var(--reader-ink);
  border-color: #287cc1;
  background: transparent;
}

.ledger {
  border-top: 1px solid #aab4c2;
}

.ledger thead th {
  color: var(--reader-soft);
  font: 550 0.81rem/1.3 var(--reader-ui);
}

.ledger td,
.ledger th {
  padding-block: 0.78rem;
  vertical-align: middle;
}

.ledger tbody tr:hover {
  background: #edf2f8;
}

.ledger .pass,
.results .pass {
  color: var(--reader-blue);
}

.ledger td[data-label="Recorded cost"] {
  font: 400 0.88rem/1.3 var(--mono);
}

.cost-bar {
  display: block;
  width: clamp(56px, 7.4vw, 94px);
  height: 3px;
  margin-top: 5px;
  background: #dce2e9;
}

.cost-bar::after {
  display: block;
  width: var(--cost-share);
  height: 100%;
  background: #4488bf;
  content: "";
}

.records details,
.method,
.source-notes {
  scroll-margin: 20px;
}

.records details[open],
.source-notes[open],
.method[open] {
  border-color: #99aec2;
}

.records details[open] summary,
.source-notes[open] summary,
.method[open] summary {
  color: var(--reader-blue);
}

.records details p,
.method p {
  max-width: 66ch;
}

.results {
  padding-block: clamp(38px, 5vw, 76px) clamp(30px, 4vw, 60px);
}

.results .rationale {
  max-width: 67ch;
  margin-top: 13px;
}

.results .outline {
  border: 1px solid #536b8a;
  border-radius: 7px;
  color: var(--reader-ink);
  font: 550 0.88rem/1.35 var(--reader-ui);
}

.results .outline:hover {
  background: #20344e;
}
.session-page :is(.results a, .related a, footer a):hover {
  color: #c7e4ff;
  text-decoration: underline;
}
.session-page .related {
  border-bottom: 0;
}
.session-page .related small {
  color: var(--reader-soft);
}


.related,
body > footer {
  border-color: var(--reader-line);
}

.related a {
  font-size: clamp(1.18rem, 2.1vw, 1.85rem);
}

body > footer {
  border-top: 1px solid var(--reader-line);
  font-size: 0.86rem;
}

@media (max-width: 850px) {
  .journal-heading {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    gap: clamp(22px, 3.5vw, 34px);
  }

  .journal-page .article-grid {
    grid-template-columns: minmax(124px, 0.45fr) minmax(0, 1.55fr);
  }


}

@media (max-width: 660px) {
  .journal-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .journal-page .story-title {
    padding-block: 26px;
  }

  .journal-page .story-title h1 {
    font-size: clamp(2.8rem, 11vw, 4.75rem);
  }

  .journal-page .story-title .kicker {
    margin-bottom: 10px;
  }

  .journal-page .journal-intro > p:not(.kicker):not(.byline) {
    max-width: 35ch;
    margin: 10px 0 11px;
    font-size: 1.01rem;
  }

  .journal-page .article-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-block: 20px 42px;
  }

  .article-grid nav {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 13px;
    border-top: 0;
    padding: 0 0 15px;
  }

  .article-grid nav p {
    width: 100%;
    margin: 0;
  }

  .journal-page .article-grid nav a {
    font-size: 0.78rem;
  }

  .research-page .masthead {
    gap: 8px;
    padding: 27px 0 23px;
  }

  .research-page .masthead .kicker {
    margin-bottom: 6px;
  }

  .research-page .calibration {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 5px 18px;
    padding: 19px 16px;
  }

  .calibration > div + div {
    display: contents;
  }

  .calibration .score {
    grid-row: 1 / span 2;
    align-self: center;
    font-size: clamp(2.65rem, 10.3vw, 4.4rem);
  }

  .calibration .score::after {
    height: 3px;
    margin-top: 5px;
  }

  .research-page .calibration h2 {
    font-size: clamp(1.28rem, 5.6vw, 1.85rem);
  }

  .research-page .calibration .kicker {
    margin: 0;
    font-size: 0.67rem;
  }

  .research-page .calibration :is(.kicker, h2) {
    grid-column: 2;
  }

  .research-page .calibration :is(p, .sources) {
    grid-column: 1 / -1;
  }

  .research-page .calibration p {
    margin: 7px 0 4px;
  }

  .calibration p,
  .calibration a {
    font-size: 0.87rem;
  }


  .ledger {
    border-top: 0;
  }

  .ledger tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 3px 12px;
    padding-block: 13px;
  }

  .ledger td {
    display: block;
    padding: 0;
  }

  .ledger td::before {
    content: none;
  }

  .ledger td[data-label="Stage"] {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
  }

  .ledger td[data-label="Attempted rows"] {
    grid-column: 1;
    grid-row: 2;
    color: var(--reader-soft);
    font-size: 0.81rem;
  }

  .ledger td[data-label="Attempted rows"]::after {
    content: " attempted rows";
  }

  .ledger td[data-label="Recorded cost"] {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    text-align: right;
  }

  .ledger td[data-label="Recorded cost"]::before {
    display: block;
    margin-bottom: 3px;
    content: attr(data-label);
    font: 400 0.72rem/1.25 var(--reader-ui);
  }

  .cost-bar {
    width: 60px;
    margin: 4px 0 0 auto;
  }

  .ledger td[data-label="Outcome"] {
    font-size: 0.84rem;
  }

  .ledger td[data-label="Run"] {
    text-align: right;
    font-size: 0.79rem;
  }


}

@media (max-width: 360px) {
  .results .section-head {
    gap: 8px;
  }

  .results .section-head h2 {
    font-size: 1.85rem;
  }

  .results .outline {
    flex: none;
    white-space: nowrap;
  }

  .research-page .bench .section-head {
    flex-direction: column;
    align-items: start;
    gap: 5px;
  }

  .research-page .bench .outline {
    min-height: 26px;
  }
}
