:root {
  color-scheme: light;
  --paper: #f2efe6;
  --paper-2: #e9e5d8;
  --ink: #141414;
  --muted: #6b675d;
  --rule: #cfc9b8;
  --orange: #ff5a1f;
  --photo: #ffffff;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 2400px;
  --gutter: clamp(20px, 4vw, 64px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

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

::selection {
  background: var(--orange);
  color: var(--paper);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Dark theme: follows the system unless the visitor picked one */

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141414;
  --paper-2: #1e1d1a;
  --ink: #f2efe6;
  --muted: #a29d91;
  --rule: #3a3832;
  --photo: #ece8dd;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141414;
    --paper-2: #1e1d1a;
    --ink: #f2efe6;
    --muted: #a29d91;
    --rule: #3a3832;
    --photo: #ece8dd;
  }
}

.logo-dark {
  display: none;
}

:root[data-theme="dark"] .logo-light {
  display: none;
}

:root[data-theme="dark"] .logo-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light {
    display: none;
  }

  :root:not([data-theme="light"]) .logo-dark {
    display: block;
  }
}

.theme-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

.theme-toggle::before {
  content: "\25D0";
  display: inline-block;
  margin-right: 0.4em;
  color: var(--orange);
}

.theme-toggle:hover {
  color: var(--orange);
}

/* Frame: full-width content with even side gutters */

.frame {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Header */

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 2px solid var(--ink);
}

.logo {
  display: inline-block;
}

.logo img {
  height: 22px;
  width: auto;
}

.top nav,
.bottom nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 36px);
  font-size: 0.9rem;
}

/* Hero */

.hero {
  padding: clamp(56px, 12vh, 136px) 0 clamp(48px, 8vh, 96px);
}

h1 {
  margin: 0;
  max-width: 17em;
  font-size: clamp(2rem, 6.2vw, 6.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.reason {
  display: block;
  min-height: 2.16em; /* room for two lines, so the page does not jump */
}

mark {
  background: linear-gradient(transparent 58%, var(--orange) 58%, var(--orange) 92%, transparent 92%);
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.caret {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  margin-left: 0.08em;
  vertical-align: -0.06em;
  background: var(--ink);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  align-items: end;
  margin-top: clamp(32px, 6vh, 64px);
}

.intro {
  grid-column: 1 / span 6;
  margin: 0;
  max-width: 36rem;
  font-size: 1.1rem;
}

.facts {
  grid-column: 9 / span 4;
  margin: 0;
  font-size: 0.9rem;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}

.facts div:last-child {
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 700;
}

/* Sections: heading column on the left, content on the right */

.sec {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  padding: clamp(56px, 9vw, 120px) 0;
  border-top: 2px solid var(--ink);
}

.sec-head {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: 32px;
}

.sec-body {
  grid-column: 5 / span 8;
}

.num {
  margin: 0 0 12px;
  color: var(--orange);
  font-weight: 700;
  font-size: 0.9rem;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.aside {
  max-width: 22rem;
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

/* Origin */

.origin {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}

.log {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.log li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 5px 0;
}

.log time {
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 2px;
}

.log p {
  margin: 0;
}

.log .b p {
  color: var(--muted);
}

.log .a p::before {
  content: "> ";
  color: var(--orange);
}

.log .b p::before {
  content: "< ";
}

.log .big p {
  font-weight: 700;
  color: var(--ink);
}

.photo {
  position: relative;
  margin: 8px 0 0;
  padding: 12px 12px 16px;
  background: var(--photo);
  box-shadow: 0 1px 0 var(--rule), 0 14px 30px -16px rgba(20, 20, 20, 0.35);
  transform: rotate(1.6deg);
}

/* a strip of tape holding the photo */
.photo::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 104px;
  height: 26px;
  margin-left: -52px;
  background: rgba(255, 230, 150, 0.7);
  transform: rotate(-3deg);
}

.photo figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Rules */

.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 4vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}

.rules li {
  padding: 20px 0 28px;
  border-top: 1px solid var(--rule);
  counter-increment: rule;
}

.rules li::before {
  content: counter(rule, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  color: var(--orange);
  font-weight: 700;
  font-size: 0.9rem;
}

.rules strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

/* Status */

.status {
  margin: 0;
}

.status div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
}

/* dot leaders between label and value */
.status div::before {
  content: "";
  order: 1;
  flex: 1;
  border-bottom: 2px dotted var(--rule);
  transform: translateY(-4px);
}

.status dt {
  white-space: nowrap;
}

.status dd {
  order: 2;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  text-align: right;
}

/* Footer */

.bottom {
  padding-bottom: 40px;
}

.bottom-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  border-top: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.85rem;
}

.bottom-in p {
  margin: 0;
}

.bottom .logo img {
  height: 16px;
}

/* Medium screens: stack section heads above their content */

@media (max-width: 1000px) {
  .sec {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .sec-head,
  .sec-body {
    grid-column: 1;
  }

  .sec-head {
    position: static;
  }

  .hero-foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .intro,
  .facts {
    grid-column: 1;
  }

  .facts {
    max-width: 28rem;
  }
}

@media (max-width: 680px) {
  .origin,
  .rules {
    grid-template-columns: 1fr;
  }

  .photo {
    max-width: 420px;
    transform: rotate(1deg);
  }

  .reason {
    min-height: 3.24em;
  }

  .top nav {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .caret {
    animation: none;
  }
}
