@font-face {
  font-family: Barlow Condensed;
  src: url("assets/barlow-condensed-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --navy: #142b36;
  --ink: #172e37;
  --muted: #566971;
  --paper: #f6f5f0;
  --line: #cbd2ce;
  --orange: #ff9963;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  font:
    16px/1.52 system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body,
figure,
p,
h1,
h2,
h3 {
  margin: 0;
}
a {
  color: #174e60;
  text-underline-offset: 0.2em;
}
button,
input,
select {
  font: inherit;
}
.wrap {
  width: min(1120px, calc(100% - 72px));
  margin-inline: auto;
}
.masthead {
  background: #fffdf8;
  border-bottom: 1px solid #d6d8cf;
}
.mast,
.foot,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.mast {
  min-height: 68px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--navy);
  font: 700 30px/1 var(--display);
  letter-spacing: -0.03em;
}
.mark {
  display: flex;
  gap: 3px;
  transform: skewX(-20deg);
  align-items: center;
}
.mark i {
  display: block;
  background: #cc562a;
  width: 6px;
  height: 21px;
}
.mark i:first-child {
  height: 11px;
}
.mark i:nth-child(2) {
  height: 16px;
}
.mast nav {
  display: flex;
  gap: 26px;
}
.mast nav a,
.foot a {
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--ink);
}
.mast nav a:hover,
.foot a:hover {
  text-decoration: underline;
}
.hero {
  background: var(--navy);
  color: #fffdf5;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 28px;
  padding-block: 40px;
}
.overline,
.dateline,
.result-context,
.sources {
  font:
    600 0.73rem/1.5 ui-monospace,
    "SFMono-Regular",
    Consolas,
    monospace;
}
.overline {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.intro .overline {
  color: #ffad83;
}
.intro h1 {
  font: 700 clamp(3.6rem, 6vw, 5.55rem) / 0.99 var(--display);
  letter-spacing: -0.025em;
  margin: 0.12em 0 0.16em;
}
.lead {
  max-width: 490px;
  color: #dee6e3;
  font-size: 1.03rem;
}
.action {
  display: inline-flex;
  align-items: center;
  gap: 25px;
  border-radius: 4px;
  background: var(--orange);
  color: #1c2d33;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  padding: 10px 15px;
  margin-top: 22px;
}
.action:hover {
  background: #ffb48b;
}
.drawing {
  background-image: radial-gradient(#45616a 0.75px, transparent 0.85px);
  background-size: 15px 15px;
}
.drawing img {
  display: block;
  width: 100%;
  height: auto;
}
.section {
  margin-block: 34px 48px;
  scroll-margin: 12px;
}
.section-head {
  margin-bottom: 14px;
  align-items: baseline;
}
.section-head h2 {
  font: 700 clamp(2rem, 3.2vw, 2.65rem) / 1.1 var(--display);
  letter-spacing: -0.018em;
}
.dateline {
  color: var(--muted);
  font-weight: 500;
}
.workbench {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 18px;
  align-items: start;
}
.panel {
  padding: 23px 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffefa;
  min-width: 0;
}
.panel-title {
  font: 700 1.6rem/1.1 var(--display);
  margin: 0 0 16px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 16px;
}
.full {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 0.84rem;
  font-weight: 650;
}
select,
input {
  display: block;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font-size: 0.88rem;
  border: 1px solid #a5b2b2;
  border-radius: 4px;
  background: #fff;
  padding: 9px 8px;
  min-height: 43px;
  margin-top: 4px;
}
select {
  white-space: normal;
}
details summary {
  cursor: pointer;
  font-weight: 650;
  color: #214d5a;
}
#more {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 17px;
  font-size: 0.85rem;
}
#more label {
  margin-top: 12px;
}
.result {
  border-top: 4px solid #b35332;
  background: #edf1ed;
}
.result .overline {
  color: #445f65;
  display: flex;
  gap: 7px;
  align-items: center;
}
.pin {
  width: 9px;
  height: 9px;
  border: 2px solid #995333;
  display: inline-block;
  transform: rotate(45deg);
}
.result-context {
  margin: 12px 0 3px;
  color: #475d63;
}
.result h3 {
  font: 700 2rem/1.08 var(--display);
  letter-spacing: -0.014em;
}
.result #reason {
  margin: 9px 0 12px;
  font-size: 0.96rem;
}
.result .row,
#evidence {
  border-top: 1px solid #c4cfca;
  padding-top: 10px;
  margin-top: 10px;
}
.row p {
  margin: 6px 0;
  font-size: 0.9rem;
}
.row h4 {
  font-size: 0.96rem;
  margin: 0;
}
.row summary {
  font-size: 0.9rem;
}
#evidence a {
  display: inline-block;
  font-size: 0.8rem;
  margin-right: 0.85em;
  padding: 4px 0;
}
.section-intro {
  max-width: 760px;
  color: var(--muted);
  margin-bottom: 17px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
th,
td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
thead {
  background: #e6e9e3;
}
thead th {
  font-size: 0.8rem;
}
tbody th {
  font-weight: 650;
}
tbody td:last-child {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
small {
  display: inline-block;
  font: normal 0.8rem system-ui;
  color: var(--muted);
  margin-left: 4px;
}
.sources {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 500;
}
.note {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 14px 16px;
  margin-top: 18px;
}
.note p {
  margin-top: 10px;
  max-width: 86ch;
}
.text-button,
.case-button {
  color: #174e60;
  cursor: pointer;
  background: none;
  border: 0;
  text-align: left;
}
.text-button {
  padding: 8px 0;
  text-decoration: underline;
}
.case {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 60px;
  border-top: 1px solid var(--line);
}
.case:last-child {
  border-bottom: 1px solid var(--line);
}
.case-button {
  font-size: 1rem;
  font-weight: 650;
  padding: 12px 0;
  flex: 1;
}
.case-button:hover,
.text-button:hover {
  text-decoration: underline;
}
.case a {
  font-size: 0.8rem;
}
.foot {
  border-top: 2px solid var(--navy);
  min-height: 70px;
}
.foot strong {
  font: 700 1.4rem var(--display);
}
.foot span {
  margin-right: auto;
  font-size: 0.8rem;
  color: var(--muted);
}
.mobile-jump {
  display: none;
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  display: block;
  background: white;
  padding: 8px;
}
.result a:focus-visible,
:focus-visible {
  outline: 3px solid #a94721;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 34px);
  }
  .mast {
    min-height: 57px;
  }
  .wordmark {
    font-size: 25px;
  }
  .mast nav {
    gap: 13px;
  }
  .mast nav a {
    font-size: 0.76rem;
  }
  .hero-grid {
    padding-block: 26px;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 12px;
  }
  .intro h1 {
    font-size: 3.5rem;
  }
  .workbench {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .mobile-jump {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 0;
    font-weight: 650;
  }
  .section-head {
    flex-wrap: wrap;
    gap: 4px;
  }
  .section {
    margin-block: 25px 34px;
  }
  .foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  .drawing img {
    min-height: 80px;
  }
  .case {
    gap: 12px;
  }
  .case a {
    flex-shrink: 0;
  }
}
@media (max-width: 550px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .drawing {
    max-width: 340px;
    width: 100%;
    justify-self: center;
  }
  .intro h1 {
    font-size: 3.7rem;
  }
  .lead {
    font-size: 0.94rem;
  }
  .action {
    margin-top: 15px;
  }
  .drawing img {
    height: 126px;
    object-fit: contain;
  }
  .fields {
    gap: 10px;
  }
  .foot {
    padding-block: 12px;
  }
  .foot span {
    font-size: 0.7rem;
  }
  th,
  td {
    padding: 9px 5px;
    font-size: 0.8rem;
  }
  small {
    display: block;
    margin: 2px 0;
  }
  .section-head {
    display: block;
  }
  .dateline {
    margin-top: 4px;
  }
}
@media (max-width: 390px) {
  .wrap {
    width: calc(100% - 24px);
  }
  .mast nav {
    gap: 9px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .foot span {
    display: none;
  }
}

.result-context:empty {
  display: none;
}
.result-context:empty + h3 {
  margin-top: 12px;
}
.case-button {
  overflow-wrap: anywhere;
}
#verdict {
  scroll-margin-top: 20px;
}
.fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 390px) {
  .fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  color: var(--muted);
}
#setup-result {
  scroll-margin-top: 8px;
}
#play-comparison {
  border-top: 1px solid #c4cfca;
  padding-top: 12px;
}
#play-evidence-title {
  margin: 0;
  font-size: 1rem;
}
.evidence-scope {
  color: var(--muted);
  font-size: 0.8rem;
}
.app-findings {
  margin: 10px 0;
  font-size: 0.92rem;
}
.app-findings dt {
  font-weight: 750;
  margin-top: 10px;
}
.app-findings dd {
  margin: 2px 0 0;
}
#play-comparison .gap {
  border-left: 3px solid #a94c28;
  padding-left: 10px;
  font-size: 0.92rem;
}
.gap strong {
  display: block;
}
#ride-test {
  margin-top: 12px;
  font-size: 0.94rem;
}
#ride-test summary {
  background: #dbe5df;
  border-radius: 4px;
  padding: 12px;
  min-height: 44px;
}
#ride-test ol {
  padding-left: 24px;
}
#ride-test li,
#ride-test p {
  margin-block: 10px;
}
@media (max-width: 760px) {
  #setup input,
  #setup select {
    font-size: 1rem;
  }
  .mobile-jump {
    min-height: 44px;
  }
}

.log-entry {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 6px;
  font-weight: 700;
}
.journal {
  max-width: 700px;
}
.journal-setup,
.log-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.journal select,
.journal input,
.journal textarea {
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  width: 100%;
}
.journal textarea {
  display: block;
  padding: 9px;
  margin-top: 5px;
  border: 1px solid #a5b2b2;
  border-radius: 4px;
  resize: vertical;
}
.log-notes,
#log-review {
  margin-block: 8px;
}
.journal summary {
  padding-block: 10px;
  min-height: 44px;
}
.log-progress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 3px 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
#log-save,
#log-missing {
  font-size: 0.83rem;
  color: var(--muted);
}
#log-instruction,
#log-review p {
  font-size: 0.9rem;
  margin: 10px 0;
}
#log-missing {
  margin: 12px 0 8px;
}
.journal-nav {
  display: flex;
  gap: 8px;
}
.journal-nav button {
  min-height: 46px;
  cursor: pointer;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}
.journal-nav button:disabled {
  opacity: 0.55;
}
#log-next {
  background: var(--navy);
  color: white;
  font-weight: 650;
  flex: 1;
}
#log-results table {
  table-layout: fixed;
  margin-top: 10px;
}
#log-results caption {
  text-align: left;
  font-weight: 700;
  padding: 5px 0;
}
#log-results th,
#log-results td {
  font: inherit;
  font-size: 0.83rem;
  padding: 7px 3px;
  overflow-wrap: anywhere;
}

#extra-models .fit-detail td {
  font:
    400 0.9rem/1.5 system-ui,
    sans-serif;
  background: #f0f2ec;
  padding: 0.55rem 0.9rem 0.8rem;
}
.fit-detail .ride-limit,
.fit-detail .sources {
  margin-top: 0.35rem;
  font-size: 0.8rem;
}
.fit-detail .model-observation {
  margin-top: 0.35rem;
}
.rider-case {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.rider-case h3 {
  font-size: 1rem;
}
.rider-case p {
  margin: 4px 0;
  max-width: 78ch;
}
.rider-case .case-button {
  margin-left: 12px;
  font-size: 0.9rem;
}
.diagnosis {
  max-width: 780px;
  padding-block: 2.5rem;
}
.diagnosis h1 {
  font: 700 clamp(2.5rem, 6vw, 4.1rem) / 1.04 var(--display);
  margin: 0.5rem 0 1rem;
}
.diagnosis .guide-lead {
  font-size: 1.12rem;
}
.diagnosis section {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.diagnosis h2 {
  font: 700 1.8rem/1.16 var(--display);
}
.diagnosis section p,
.diagnosis li {
  margin-top: 0.65rem;
}
.diagnosis ol {
  padding-left: 1.4rem;
}
