/* Quire Route | style.css
   Palette: six colors, declared once on :root and used only through var().
   Type: one monospace stack for headings, body, controls, and figures.
   Visual style: a ruled ledger. Hairline rules, numbered passes, square
   controls, and one dark readout for the timer. No gradients, no shadows. */

:root {
  --paper: #EFF6EE;
  --ink: #162414;
  --moss: #26671E;
  --sage: #425A3F;
  --lime: #B5EBAD;
  --deep: #182D16;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  --gutter: 16px;
  --wrap: 72rem;
  --measure: 46rem;
  color-scheme: light;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 32px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.65;
  font-variant-ligatures: none;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
  outline: none;
}

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

h1,
h2,
h3 {
  font-family: var(--mono);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3.25rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.3rem, 1.05rem + 1vw, 2rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.2rem);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

strong {
  font-weight: 700;
}

a {
  color: var(--moss);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
}

.timer-face :focus-visible {
  outline-color: var(--lime);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background-color: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--gutter);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  border-bottom: 1px solid var(--ink);
}

.band > .wrap {
  padding-block: clamp(2rem, 5vw, 3.75rem);
}

.band-steps > .wrap {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* Header and navigation */

.site-header {
  border-bottom: 2px solid var(--ink);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.6rem;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--paper);
}

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

.site-nav a[aria-current="page"] {
  background-color: var(--lime);
  border-color: var(--ink);
  font-weight: 700;
}

/* Footer */

.site-footer {
  border-top: 2px solid var(--ink);
  padding-block: 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  gap: 0.75rem;
}

.site-footer p {
  margin: 0;
  max-width: none;
  overflow-wrap: anywhere;
}

/* Shared type and blocks */

.kicker {
  margin: 0 0 1rem;
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead {
  max-width: 40rem;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
}

.section-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.section-head p {
  margin: 0;
}

.section-index {
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hint {
  margin: 0.4rem 0 0;
  color: var(--sage);
  font-size: 0.85rem;
  max-width: none;
}

.note {
  max-width: var(--measure);
  margin: 1.5rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--moss);
  background-color: var(--lime);
  color: var(--ink);
}

.note p:last-child {
  margin-bottom: 0;
}

.checklist,
.plain-list,
.cycle-list {
  max-width: var(--measure);
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.checklist {
  list-style: square;
}

.checklist li,
.plain-list li,
.cycle-list li {
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

.checklist li::marker,
.cycle-list li::marker {
  color: var(--moss);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  max-width: 100%;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background-color: var(--moss);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.btn-ghost {
  background-color: var(--paper);
  color: var(--ink);
}

.btn-ghost:hover {
  background-color: var(--lime);
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Home: hero and pass list */

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.hero-figure {
  margin: 0;
}

.hero-figure svg {
  width: 100%;
}

.hero-figure figcaption {
  max-width: 36rem;
  margin-top: 0.75rem;
  color: var(--sage);
  font-size: 0.85rem;
}

.track {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
}

.node {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 3;
}

.node.is-final {
  fill: var(--lime);
}

.node-num {
  fill: var(--ink);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  text-anchor: middle;
}

.node-label {
  fill: var(--sage);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-anchor: middle;
}

.columns {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.column {
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}

.column p:last-child {
  margin-bottom: 0;
}

.pass-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.pass-list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--sage);
}

.pass-list h3 {
  margin-bottom: 0.35rem;
}

.pass-list p {
  margin: 0;
}

.pass-num {
  color: var(--moss);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Journey: stepper across the top, one pass at a time */

.stepper {
  margin: 0 0 1.25rem;
}

.stepper-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.stepper-list li {
  min-width: 0;
}

.stepper-list a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  height: 100%;
  min-height: 44px;
  padding: 0.75rem 0.4rem 0.6rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 4px solid var(--paper);
}

.stepper-list a:hover {
  background-color: var(--lime);
  text-decoration: none;
}

.stepper-list a[aria-current="step"] {
  background-color: var(--lime);
  border-bottom-color: var(--moss);
}

.step-num {
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
  font-weight: 700;
  line-height: 1;
}

.step-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.step-status {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  color: var(--sage);
  font-size: 0.9rem;
}

.step-status:empty {
  min-height: 0;
  margin: 0;
}

.step {
  padding-block: 1.5rem 1rem;
  border-top: 1px solid var(--ink);
}

.step:focus {
  outline: none;
}

.step h2 {
  margin-top: 0.25rem;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--sage);
}

.pager .btn {
  flex: 0 1 auto;
}

/* Stepper JavaScript mode: only the active pass is shown */

.js .step {
  display: none;
}

.js .step.is-active {
  display: block;
  animation: step-in 0.35s ease-out both;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Focus timer */

.no-js-note {
  display: block;
}

.js .no-js-note {
  display: none;
}

.timer-app {
  display: none;
}

.js .timer-app {
  display: block;
}

.settings {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 40rem) {
  .settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.field select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  font: inherit;
  color: var(--ink);
  background-color: var(--paper);
  border: 2px solid var(--sage);
  border-radius: 0;
}

.timer-face {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 2px solid var(--ink);
  background-color: var(--deep);
  color: var(--paper);
}

.phase-label {
  margin: 0 0 0.5rem;
  color: var(--lime);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.clock {
  max-width: none;
  margin: 0;
  color: var(--paper);
  font-size: clamp(3.5rem, 2.2rem + 7vw, 7.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.timer-progress {
  display: block;
  width: 100%;
  height: 14px;
  margin: 1.5rem 0 1.25rem;
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid var(--lime);
  border-radius: 0;
  background-color: var(--deep);
}

.timer-progress::-webkit-progress-bar {
  background-color: var(--deep);
}

.timer-progress::-webkit-progress-value {
  background-color: var(--lime);
}

.timer-progress::-moz-progress-bar {
  background-color: var(--lime);
}

.rounds-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
}

.rounds {
  display: flex;
  gap: 0.5rem;
}

.rounds span {
  width: 18px;
  height: 18px;
  border: 2px solid var(--lime);
}

.rounds span.is-done {
  background-color: var(--lime);
}

.rounds-text {
  margin: 0;
  color: var(--paper);
  font-size: 0.9rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.timer-face .btn {
  border-color: var(--lime);
  background-color: var(--lime);
  color: var(--ink);
}

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

.timer-face .btn-ghost {
  border-color: var(--paper);
  background-color: var(--deep);
  color: var(--paper);
}

.timer-face .btn-ghost:hover {
  border-color: var(--lime);
  background-color: var(--lime);
  color: var(--ink);
}

.timer-status {
  min-height: 1.6em;
  margin: 1rem 0 0;
  font-weight: 700;
}

.log {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}

.log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.log-head h2 {
  margin: 0;
}

.log-summary {
  margin: 0.75rem 0 0;
  font-weight: 700;
}

.log-empty {
  margin: 1rem 0 0;
}

.log-table {
  width: 100%;
  margin: 1rem 0 0.75rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.log-table caption {
  padding-bottom: 0.6rem;
  text-align: left;
  font-weight: 700;
}

.log-table th,
.log-table td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--sage);
}

.log-table th {
  border-bottom: 2px solid var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 39.99rem) {
  .log-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .log-table,
  .log-table tbody {
    display: block;
    width: 100%;
  }

  .log-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--sage);
  }

  .log-table td {
    display: block;
    padding: 0;
    border: 0;
  }

  .log-table td::before {
    display: block;
    content: attr(data-label);
    color: var(--sage);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

/* Cycle list and glossary */

.cycle-list {
  list-style: decimal;
}

.glossary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 0 2rem;
}

.glossary dt {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--sage);
  font-weight: 700;
}

.glossary dd {
  margin: 0.35rem 0 0;
  padding-bottom: 1.25rem;
  max-width: var(--measure);
}

@media (min-width: 48rem) {
  .glossary {
    grid-template-columns: 14rem minmax(0, 1fr);
    column-gap: 2rem;
  }

  .glossary dd {
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--sage);
  }
}

/* Contact */

.contact-box {
  max-width: var(--measure);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 2px solid var(--ink);
}

.contact-box p:last-child {
  margin-bottom: 0;
}

/* Motion: transitions and animations exist only when motion is allowed */

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .site-nav a,
  .stepper-list a {
    transition: background-color 0.15s linear, color 0.15s linear, border-color 0.15s linear;
  }

  .timer-progress::-webkit-progress-value {
    transition: width 0.25s linear;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .step.is-active {
    animation: none;
  }
}
