:root {
  --paper: #f4efe6;
  --card: #fbf8f3;
  --sand: #ddd1bd;
  --bark: #3b2a20;
  --bark-soft: #5a4637;
  --clay: #b5583a;
  --clay-ink: #9b4428;
  --olive: #6b7a4f;
  --olive-ink: #55613d;
  --olive-wash: #e4e6d6;
  --clay-wash: #f1ddd2;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
  --gap: 24px;
  --round: 10px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--bark);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
}

h3 {
  font-size: 1.3rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: var(--clay-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--clay-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--bark);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

.wrap {
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: 16px;
}

.grid8 {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--gap);
}

.masthead {
  border-bottom: 1px solid var(--sand);
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--bark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wordmark svg {
  width: 30px;
  height: 30px;
}

.menu-toggle {
  display: none;
  font: inherit;
  font-weight: 700;
  background: transparent;
  color: var(--bark);
  border: 1px solid var(--bark-soft);
  border-radius: 6px;
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.site-nav a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--bark);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--clay-wash);
}

.site-nav a[aria-current="page"] {
  background: var(--bark);
  color: var(--paper);
}

main {
  display: block;
  padding-block: 40px 64px;
}

.lede {
  font-size: 1.2rem;
  color: var(--bark-soft);
  max-width: 38em;
}

.prose {
  max-width: 40em;
}

.page-head {
  align-items: end;
  margin-bottom: 48px;
}

.page-head-text {
  grid-column: 1 / 6;
}

.page-head-figure {
  grid-column: 6 / 9;
  margin: 0;
}

.chips-only {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 420px;
  object-fit: cover;
  object-position: right center;
}

.page-head-figure img,
.hero-figure img,
.inline-figure img {
  border-radius: var(--round);
  border: 1px solid var(--sand);
}

.hero {
  align-items: center;
  margin-bottom: 56px;
}

.hero-text {
  grid-column: 1 / 5;
}

.hero-figure {
  grid-column: 5 / 9;
  margin: 0;
}

.gate-note {
  display: inline-block;
  border: 1px solid var(--clay);
  color: var(--clay-ink);
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.stairs {
  list-style: none;
  padding: 0;
  margin: 0 0 56px;
  row-gap: 12px;
}

.stairs li {
  grid-column: span 4;
}

.stairs li:nth-child(1) { grid-column: 1 / span 5; }
.stairs li:nth-child(2) { grid-column: 2 / span 5; }
.stairs li:nth-child(3) { grid-column: 3 / span 5; }
.stairs li:nth-child(4) { grid-column: 4 / span 5; }

.stairs a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: baseline;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--sand);
  border-left: 6px solid var(--olive);
  border-radius: 4px var(--round) var(--round) 4px;
  color: var(--bark);
  text-decoration: none;
}

.stairs li:last-child a {
  border-left-color: var(--clay);
}

.stairs a:hover {
  border-color: var(--bark-soft);
}

.stair-num {
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--olive-ink);
  grid-row: span 2;
}

.stair-title {
  font-weight: 700;
}

.stair-note {
  color: var(--bark-soft);
  font-size: 0.95rem;
}

.split {
  margin-bottom: 48px;
}

.split > :first-child {
  grid-column: 1 / 5;
}

.split > :last-child {
  grid-column: 5 / 9;
}

.panel {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--round);
  padding: 24px;
}

.panel > :last-child {
  margin-bottom: 0;
}

.stack > * + * {
  margin-top: var(--gap);
}

.panel-olive {
  background: var(--olive-wash);
  border-color: #c9ccb2;
}

.plain-list {
  padding-left: 1.2em;
}

.plain-list li + li {
  margin-top: 6px;
}

.route {
  align-items: start;
}

.trail {
  grid-column: 1 / 3;
  position: sticky;
  top: 16px;
}

.trail-label {
  font-weight: 700;
  margin-bottom: 8px;
}

.trail-meter {
  height: 6px;
  background: var(--sand);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}

.trail-meter span {
  display: block;
  height: 100%;
  width: var(--done, 20%);
  background: var(--olive);
  transition: width 0.3s ease;
}

.trail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--sand);
}

.trail a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--bark-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.trail a[aria-current="step"] {
  border-left-color: var(--clay);
  color: var(--bark);
  font-weight: 700;
}

.route-steps {
  grid-column: 3 / 9;
}

.step {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--round);
  margin-bottom: 24px;
}

.step > :last-child {
  margin-bottom: 0;
}

.step-count {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--olive-ink);
  font-weight: 700;
  margin-bottom: 10px;
}

.step-count .bar {
  flex: 0 0 120px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--olive) var(--fill), var(--sand) var(--fill));
}

.lists {
  align-items: start;
}

.lists .checklist:nth-child(1) {
  grid-column: 1 / 5;
}

.lists .checklist:nth-child(2) {
  grid-column: 5 / 9;
}

.checklist {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--round);
  padding: 24px;
}

.checklist fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.checklist legend {
  font-family: var(--serif);
  font-size: 1.3rem;
  padding: 0;
  margin-bottom: 6px;
}

.checklist ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
}

.checklist li + li {
  border-top: 1px dashed var(--sand);
}

.checklist label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  cursor: pointer;
}

.checklist input[type="checkbox"],
.enroll-form input[type="checkbox"],
.enroll-form input[type="radio"] {
  accent-color: var(--olive-ink);
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  flex: none;
}

.checklist input:checked + span {
  color: var(--bark-soft);
  text-decoration: line-through;
  text-decoration-color: var(--olive);
}

.checklist-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tally {
  font-weight: 700;
  color: var(--olive-ink);
  font-variant-numeric: tabular-nums;
}

.btn,
.btn-quiet {
  font: inherit;
  font-weight: 700;
  border-radius: 6px;
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn {
  background: var(--bark);
  color: var(--paper);
  border: 1px solid var(--bark);
}

.btn:hover {
  background: var(--clay-ink);
  border-color: var(--clay-ink);
  color: var(--paper);
}

.btn[disabled] {
  opacity: 0.75;
  cursor: progress;
}

.btn-quiet {
  background: transparent;
  color: var(--bark);
  border: 1px solid var(--bark-soft);
}

.btn-quiet:hover {
  background: var(--clay-wash);
  color: var(--bark);
}

.table-box {
  overflow-x: auto;
  container-type: inline-size;
  border: 1px solid var(--sand);
  border-radius: var(--round);
  background: var(--card);
  margin-bottom: 32px;
}

.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.compare caption {
  text-align: left;
  padding: 18px 20px 6px;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.compare th,
.compare td {
  text-align: left;
  vertical-align: top;
  padding: 14px 20px;
  border-top: 1px solid var(--sand);
}

.compare thead th {
  font-weight: 700;
  border-top: 0;
}

.compare thead th:nth-child(2) {
  color: var(--olive-ink);
}

.compare thead th:nth-child(3) {
  color: var(--clay-ink);
}

.compare tbody th {
  font-family: var(--serif);
  font-weight: 400;
  width: 22%;
}

@container (width < 560px) {
  .compare,
  .compare caption,
  .compare thead,
  .compare tbody,
  .compare tr,
  .compare th,
  .compare td {
    display: block;
  }

  .compare thead {
    display: none;
  }

  .compare tbody th {
    width: auto;
    background: var(--paper);
  }

  .compare td {
    border-top: 0;
    padding-top: 4px;
  }

  .compare td:nth-of-type(1)::before {
    content: "What helps: ";
    font-weight: 700;
    color: var(--olive-ink);
  }

  .compare td:nth-of-type(2)::before {
    content: "What is hard: ";
    font-weight: 700;
    color: var(--clay-ink);
  }
}

.rule-deck {
  align-items: start;
  margin-bottom: 40px;
}

.rule-card {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--round);
  overflow: hidden;
}

.rule-card.wheel {
  grid-column: 1 / 6;
}

.rule-card.cards21 {
  grid-column: 6 / 9;
}

.rule-card header {
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--sand);
}

.rule-card.wheel header {
  background: var(--olive-wash);
}

.rule-card.cards21 header {
  background: var(--clay-wash);
}

.rule-card h2 {
  margin: 0;
  font-size: 1.5rem;
}

.rule-card .card-body {
  padding: 18px 22px 22px;
}

.bet-lines {
  margin: 0 0 14px;
}

.bet-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--sand);
}

.bet-lines dt {
  font-weight: 400;
}

.bet-lines dd {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

button,
a {
  touch-action: manipulation;
}

.wheel-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.wheel-pair div {
  border: 1px solid var(--sand);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--paper);
}

.wheel-pair strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.1;
}

.qa {
  margin: 0;
}

.qa div {
  padding: 22px 0;
  border-top: 1px solid var(--sand);
}

.qa dt {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.qa dd {
  margin: 0;
  max-width: 40em;
}

.qa-layout > :first-child {
  grid-column: 1 / 6;
}

.qa-layout > :last-child {
  grid-column: 6 / 9;
  position: sticky;
  top: 16px;
}

.facts {
  margin: 0;
}

.facts div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--sand);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0;
}

.inline-figure {
  margin: 0 0 32px;
}

.inline-figure figcaption,
.hero-figure figcaption {
  font-size: 0.9rem;
  color: var(--bark-soft);
  margin-top: 8px;
}

.enroll {
  align-items: start;
}

.enroll-info {
  grid-column: 1 / 4;
}

.enroll-form {
  grid-column: 4 / 9;
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--round);
  padding: 28px;
}

.field {
  margin-bottom: 20px;
}

.field > label:not(.choice),
.field legend {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}

.field fieldset,
fieldset.field {
  border: 0;
  margin: 0 0 20px;
  padding: 0;
}

.field input[type="text"] {
  width: 100%;
  font: inherit;
  color: var(--bark);
  background: #fff;
  border: 1px solid #a8977f;
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 46px;
}

.field input[aria-invalid="true"] {
  border-color: var(--clay-ink);
  box-shadow: 0 0 0 1px var(--clay-ink);
}

.hint {
  font-size: 0.92rem;
  color: var(--bark-soft);
  margin: 4px 0 0;
}

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  cursor: pointer;
}

.error {
  color: var(--clay-ink);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 6px 0 0;
}

.error::before {
  content: "\26A0\FE0E  ";
}

.error[hidden] {
  display: none;
}

.req-note {
  font-size: 0.92rem;
  color: var(--bark-soft);
}

dialog {
  border: 1px solid var(--sand);
  border-radius: var(--round);
  background: var(--card);
  color: var(--bark);
  padding: 28px;
  max-width: min(32rem, calc(100vw - 32px));
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgb(59 42 32 / 0.6);
  overflow: hidden;
  overscroll-behavior: contain;
}

dialog h2 {
  font-size: 1.5rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.age-gate::backdrop {
  background: var(--paper);
}

.age-gate:modal {
  max-width: 100vw;
  max-height: 100dvh;
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  margin: 0;
  display: grid;
  place-items: center;
  background: var(--paper);
}

.age-box {
  max-width: 30rem;
  border: 1px solid var(--sand);
  border-top: 6px solid var(--clay);
  border-radius: var(--round);
  background: var(--card);
  padding: 32px 28px;
}

.age-box .age-mark {
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--clay-ink);
  margin-bottom: 12px;
}

.src-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.src-table caption {
  text-align: left;
  padding: 18px 20px 6px;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.src-table th,
.src-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 20px;
  border-top: 1px solid var(--sand);
}

.src-table td:first-child {
  white-space: nowrap;
}

@container (width < 640px) {
  .src-table,
  .src-table caption,
  .src-table thead,
  .src-table tbody,
  .src-table tr,
  .src-table td {
    display: block;
  }

  .src-table thead {
    display: none;
  }

  .src-table tr {
    border-top: 1px solid var(--sand);
    padding: 10px 0;
  }

  .src-table td {
    border-top: 0;
    padding: 2px 20px;
  }

  .src-table td:first-child {
    font-weight: 700;
    white-space: normal;
  }

  .src-table td:nth-child(2)::before {
    content: "Author: ";
    color: var(--bark-soft);
  }

  .src-table td:nth-child(3)::before {
    content: "Source: ";
    color: var(--bark-soft);
  }

  .src-table td:nth-child(4)::before {
    content: "Terms: ";
    color: var(--bark-soft);
  }
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-left: 2px solid var(--sand);
}

.timeline li {
  position: relative;
  padding: 0 0 18px 22px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--olive);
}

.timeline li:last-child::before {
  background: var(--clay);
  border-color: var(--clay);
}

.timeline strong {
  display: block;
}

.section {
  margin-bottom: 56px;
}

.site-foot {
  border-top: 1px solid var(--sand);
  padding-block: 32px 40px;
  font-size: 0.95rem;
  color: var(--bark-soft);
}

.site-foot .age-line {
  color: var(--bark);
  font-weight: 700;
}

.foot-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

@media (width < 60rem) {
  .rule-card.wheel,
  .rule-card.cards21 {
    grid-column: 1 / -1;
  }
}

@media (width < 48rem) {
  :root {
    --gap: 16px;
  }

  .grid8 > :nth-child(n) {
    grid-column: 1 / -1;
  }

  .stairs li:nth-child(n) {
    grid-column: 1 / -1;
  }

  .stairs li:nth-child(2) { margin-left: 10px; }
  .stairs li:nth-child(3) { margin-left: 20px; }
  .stairs li:nth-child(4) { margin-left: 30px; }

  .lists .checklist:nth-child(n) {
    grid-column: 1 / -1;
  }

  .trail,
  .qa-layout > :last-child {
    position: static;
  }

  .trail ol {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav[data-open="false"] {
    display: none;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .site-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .step,
  .enroll-form,
  .panel,
  .checklist {
    padding: 20px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .trail-meter span {
    transition: none;
  }
}
