:root {
  color-scheme: light;
  --paper: #F4EFE2;
  --paper-deep: #EDE6D4;
  --card: #FFFDF6;
  --grid: #E4DCC8;
  --ink: #1E2B3A;
  --ink-2: #43546A;
  --green: #247C65;
  --green-text: #1F6E59;
  --gold: #8A5E1B;
  --red: #B0432F;
  --blue: #2F5F9E;
  --violet: #6B4BA1;
  --night: #173338;
  --water: #6BADAC;
  --grass: #BFD08D;
  --road: #68736F;
  --white: #FFFFFF;

  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max-width: 1120px;
  --section-gap: 96px;
}

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

[hidden] {
  display: none !important;
}

html {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 100;
  padding: 12px 16px;
  background-color: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}

.skip-link:focus {
  top: 16px;
}

/* Typography */
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.25;
}

p,
li {
  max-width: 66ch;
}

p {
  margin: 0 0 16px;
}

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

a {
  color: var(--green-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 58ch;
}

.muted {
  color: var(--ink-2);
}

/* Layout containers */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

main {
  flex: 1 0 auto;
}

.site-main {
  padding-top: 48px;
  padding-bottom: 80px;
}

.page-section {
  margin-top: var(--section-gap);
}

.page-section:first-child {
  margin-top: 0;
}

/* Masthead double rule under section titles */
.section-head {
  margin-bottom: 32px;
}

.section-head h2,
.section-head h1 {
  margin-bottom: 12px;
}

.masthead-rule {
  height: 7px;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* Header */
.site-header {
  background-color: var(--paper-deep);
  border-bottom: 2px solid var(--ink);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.brand-link {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.brand-link:hover {
  color: var(--green-text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 4px;
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--green-text);
  border-bottom-color: var(--green-text);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 20;
  background-color: var(--paper-deep);
  border-top: 2px solid var(--ink);
  padding: 32px 0 40px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 12px;
  color: var(--ink);
}

.footer-sep {
  color: var(--ink-2);
  user-select: none;
}

.footer-legal {
  margin: 0;
  max-width: none;
  color: var(--ink-2);
  font-size: 0.875rem;
}

/* Cards */
.card {
  background-color: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 24px;
}

.card-dashed {
  background-color: var(--paper-deep);
  border: 2px dashed var(--ink);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  color: var(--ink);
}

.card-dashed p {
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  background-color: var(--green);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.btn:hover {
  color: var(--white);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-secondary {
  background-color: var(--card);
  color: var(--ink);
}

.btn-secondary:hover {
  color: var(--ink);
}

.btn[aria-disabled="true"] {
  background-color: var(--paper-deep);
  color: var(--ink-2);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: default;
}

.btn[aria-disabled="true"]:hover,
.btn[aria-disabled="true"]:active {
  transform: none;
  box-shadow: 2px 2px 0 var(--ink);
}

/* Rubber stamp (round double ring, uppercase, -8deg) */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 96px;
  height: 96px;
  padding: 10px;
  border-radius: 50%;
  border: 3px solid var(--red);
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px var(--red);
  background-color: var(--card);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-8deg);
  flex: 0 0 auto;
}

.stamp--win {
  border-color: var(--green-text);
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px var(--green-text);
  color: var(--green-text);
}

/* Artwork frames */
.phone-frame {
  display: block;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  border: 3px solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
  background-color: var(--night);
}

.phone-frame img,
.ipad-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.ipad-frame {
  display: block;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
  background-color: var(--card);
}

.game-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  border: 2px solid var(--ink);
  display: block;
  flex: 0 0 auto;
}

/* Home Hero + Building Street */
.hero {
  padding-top: 16px;
}

.hero h1 {
  max-width: 16ch;
}

.hero-street {
  margin-top: 40px;
  pointer-events: none;
}

.hero-street-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 1120px;
  margin: 0 auto;
}

.street-building-body {
  transform: translateY(0);
}

/* Only animate & pin on wide screens when JS is active and motion is allowed */
@media (min-width: 1001px) {
  html.js-street {
    scroll-padding-bottom: 84px;
  }

  html.js-street .hero {
    min-height: min(680px, calc(100vh - 156px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 32px;
    padding-bottom: 72px;
  }

  html.js-street .site-main--home {
    padding-bottom: 112px;
  }

  html.js-street .hero-street {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    margin-top: 0;
    padding: 4px 24px 0;
    background-color: var(--paper);
    border-top: 2px solid var(--ink);
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: opacity 200ms ease;
  }

  html.js-street .hero-street.is-footer-clear {
    opacity: 0;
  }

  html.js-street .hero-street-svg {
    height: 58px;
    width: auto;
    max-width: 100%;
  }

  html.js-street .street-building .street-building-body {
    transform: translateY(112px);
  }

  html.js-street-ready .street-building .street-building-body {
    transition: transform 280ms ease-out;
  }

  html.js-street .street-building.is-built .street-building-body {
    transform: translateY(0);
  }
}

/* Home: On the table now */
.feature-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 32px;
  align-items: center;
}

.card-game-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card-game-id {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.card-game-id h3 {
  margin: 0;
  font-size: 1.75rem;
}

/* Home: What we care about */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.pillars-grid h3 {
  margin-bottom: 8px;
}

/* Home: Street plan workshop link */
.street-plan {
  list-style: none;
  margin: 0;
  padding: 24px 0 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  position: relative;
}

.street-plan::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 48px;
  height: 4px;
  background-color: var(--ink);
  z-index: 0;
}

.street-plan li {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: none;
}

.street-plan a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.125rem;
  padding: 8px 12px;
  background-color: var(--card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  min-width: 112px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.street-plan a:hover {
  color: var(--green-text);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.plan-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-2);
}

/* Home closing line */
.closing-band {
  margin-top: var(--section-gap);
  padding: 24px;
  background-color: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.closing-band p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
}

.closing-band a {
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  font-weight: 700;
}

/* ==========================================
   Eight Lots Street Puzzle
   ========================================== */
.puzzle-card {
  padding: 24px;
}

.puzzle-noscript {
  margin: 0;
  padding: 16px;
  background-color: var(--paper-deep);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-weight: 600;
}

.puzzle-hud {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hud-box {
  background-color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.hud-day {
  background-color: var(--ink);
  color: var(--white);
  min-width: 140px;
  text-align: center;
}

.hud-day .hud-label {
  color: var(--paper);
}

.hud-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hud-values {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
  border: 2px solid var(--ink);
  flex: 0 0 auto;
}

.owner-badge--player {
  background-color: var(--green);
  color: var(--white);
}

.owner-badge--rusty {
  background-color: var(--red);
  color: var(--white);
}

/* Puzzle Street Grid: Desktop (4 cols x 3 rows, horizontal road) */
.puzzle-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto 44px auto;
  grid-template-areas:
    "lot-0 lot-1 lot-2 lot-3"
    "pair-0 pair-1 pair-2 pair-3"
    "lot-4 lot-5 lot-6 lot-7";
  gap: 0 12px;
  position: relative;
}

.lot-0 { grid-area: lot-0; }
.lot-1 { grid-area: lot-1; }
.lot-2 { grid-area: lot-2; }
.lot-3 { grid-area: lot-3; }
.lot-4 { grid-area: lot-4; }
.lot-5 { grid-area: lot-5; }
.lot-6 { grid-area: lot-6; }
.lot-7 { grid-area: lot-7; }
.pair-0 { grid-area: pair-0; }
.pair-1 { grid-area: pair-1; }
.pair-2 { grid-area: pair-2; }
.pair-3 { grid-area: pair-3; }

.puzzle-road-cell {
  background-color: var(--road);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  margin: 0 -6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pair-0 {
  margin-left: 0;
  border-left: 3px solid var(--ink);
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.pair-3 {
  margin-right: 0;
  border-right: 3px solid var(--ink);
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* Road lane dashes */
.puzzle-road-cell::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background-color: var(--card);
  border-radius: 2px;
}

/* Completed pair connector across the road */
.pair-link {
  display: none;
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.puzzle-road-cell.is-paired .pair-link {
  display: flex;
}

.pair-link::before {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 6px;
  margin-left: -3px;
  background-color: var(--green);
}

.puzzle-road-cell.is-paired-rusty .pair-link::before {
  background-color: var(--red);
}

.pair-pill {
  position: relative;
  z-index: 3;
  background-color: var(--card);
  color: var(--green-text);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.2;
}

.puzzle-road-cell.is-paired-rusty .pair-pill {
  color: var(--red);
}

/* Lot button */
.lot-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px 10px 12px;
  margin: 8px 0;
  background-color: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.lot-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.lot-btn[aria-disabled="true"] {
  background-color: var(--paper-deep);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: default;
}

.lot-btn[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: 2px 2px 0 var(--ink);
}

.lot-btn.is-player {
  background-color: var(--card);
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green), 4px 4px 0 var(--ink);
}

.lot-btn.is-rusty {
  background-color: var(--card);
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red), 4px 4px 0 var(--ink);
}

.lot-owner-tag {
  position: absolute;
  top: 8px;
  right: 8px;
}

.lot-svg {
  width: 72px;
  height: 67px;
  flex: 0 0 auto;
}

.lot-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.lot-meta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 10px;
}

.lot-pay {
  color: var(--green-text);
}

.lot-status {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-2);
  min-height: 1.2em;
}

.lot-btn.is-player .lot-status {
  color: var(--green-text);
}

.lot-btn.is-rusty .lot-status {
  color: var(--red);
}

.puzzle-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.puzzle-log {
  margin-top: 16px;
  padding: 12px 16px;
  background-color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 1rem;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.puzzle-end {
  margin-top: 20px;
  padding: 24px;
  background-color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
}

.puzzle-end[hidden] {
  display: none;
}

.puzzle-end-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.puzzle-end-score {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.puzzle-end-verdict {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0;
}

/* ==========================================
   Games page
   ========================================== */
.games-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 32px;
}

/* ==========================================
   Buy the Block page
   ========================================== */
.game-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.game-hero-id {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-line {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  background-color: var(--paper-deep);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-block;
  max-width: none;
  margin-top: 16px;
}

.feature-rows {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 48px;
  align-items: center;
}

.feature-row--reverse .feature-media {
  order: -1;
}

.plain-list {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-table-wrap {
  overflow-x: auto;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--card);
  border: 2px solid var(--ink);
}

.price-table th,
.price-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink);
  text-align: left;
}

.price-table thead th {
  background-color: var(--paper-deep);
  border-bottom: 2px solid var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
}

.price-table td:last-child,
.price-table th:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.price-note {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 1rem;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 24px;
  font-weight: 700;
}

/* ==========================================
   Workshop page
   ========================================== */
.workshop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workshop-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  max-width: none;
}

.workshop-svg {
  width: 96px;
  height: 96px;
  display: block;
}

.step-kicker {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--green-text);
  margin-bottom: 4px;
}

/* ==========================================
   About & Contact pages
   ========================================== */
.prose-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.details-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 12px 24px;
}

.details-list dt {
  font-weight: 700;
  color: var(--ink-2);
}

.details-list dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.contact-email {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
}

/* ==========================================
   Support & Privacy (plain & readable)
   ========================================== */
.legal-card {
  max-width: 74ch;
}

.legal-card h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

.legal-card h2 {
  font-size: 1.375rem;
  line-height: 1.25;
  margin-top: 32px;
  margin-bottom: 10px;
}

/* ==========================================
   404 page
   ========================================== */
.not-found-card {
  max-width: 560px;
  margin: 24px auto;
  text-align: left;
}

/* ==========================================
   Responsive breakpoints
   ========================================== */
@media (max-width: 900px) {
  .feature-split,
  .games-card,
  .feature-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-row--reverse .feature-media {
    order: 0;
  }

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

  .street-plan {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .street-plan::before {
    display: none;
  }

  .street-plan a {
    width: 100%;
  }
}

@media (max-width: 767px) {
  :root {
    --section-gap: 64px;
  }

  .wrap {
    padding: 0 16px;
  }

  .site-main {
    padding-top: 32px;
    padding-bottom: 56px;
  }

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

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

  .hud-day {
    text-align: left;
  }

  .workshop-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .details-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .details-list dd {
    margin-bottom: 12px;
  }
}

/* Phone header: 4 links in one row under the name, no hamburger */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .site-nav a {
    font-size: 0.9375rem;
  }

  .card {
    padding: 18px;
  }

  .puzzle-card {
    padding: 16px;
  }

  /* Puzzle on phone: 4 rows of 2 facing lots across a vertical road */
  .puzzle-board {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    grid-template-rows: repeat(4, auto);
    grid-template-areas:
      "lot-0 pair-0 lot-4"
      "lot-1 pair-1 lot-5"
      "lot-2 pair-2 lot-6"
      "lot-3 pair-3 lot-7";
    gap: 10px 0;
  }

  .lot-btn {
    margin: 0;
    padding: 10px 6px;
  }

  .lot-svg {
    width: 56px;
    height: 52px;
  }

  .lot-name {
    font-size: 0.9375rem;
  }

  .lot-meta {
    font-size: 0.8125rem;
  }

  .puzzle-road-cell {
    margin: -5px 0;
    border-top: 0;
    border-bottom: 0;
    border-left: 3px solid var(--ink);
    border-right: 3px solid var(--ink);
    border-radius: 0;
  }

  .pair-0 {
    margin-top: 0;
    border-top: 3px solid var(--ink);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-bottom-left-radius: 0;
  }

  .pair-3 {
    margin-bottom: 0;
    border-bottom: 3px solid var(--ink);
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    border-top-right-radius: 0;
  }

  .puzzle-road-cell::before {
    left: 50%;
    right: auto;
    top: 16%;
    bottom: 16%;
    width: 4px;
    height: auto;
    margin-top: 0;
    margin-left: -2px;
  }

  .pair-link::before {
    left: -3px;
    right: -3px;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 6px;
    margin-left: 0;
    margin-top: -3px;
  }

  .pair-pill {
    padding: 2px 4px;
    font-size: 0.75rem;
  }
}

/* Reduced motion: all motion off, all 8 buildings stand in hero */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .street-plan a,
  .lot-btn,
  .street-building .street-building-body {
    transition: none;
  }

  .btn:hover,
  .btn:active,
  .street-plan a:hover,
  .lot-btn:hover {
    transform: none;
  }

  html.js-street .hero {
    min-height: 0;
    display: block;
    padding-top: 16px;
    padding-bottom: 0;
  }

  html.js-street .site-main--home {
    padding-bottom: 80px;
  }

  html.js-street .hero-street {
    position: static;
    height: auto;
    padding: 0;
    margin-top: 40px;
    background-color: transparent;
    border-top: 0;
    opacity: 1;
  }

  html.js-street .hero-street-svg {
    height: auto;
    width: 100%;
  }

  html.js-street .street-building .street-building-body {
    transform: translateY(0);
  }
}

/* Print */
@media print {
  body {
    background: #FFFFFF;
    color: #000000;
  }

  .skip-link,
  .hero-street,
  .puzzle-controls {
    display: none;
  }

  .card,
  .phone-frame,
  .ipad-frame {
    box-shadow: none;
  }
}
