/* 5 Squirrel. Warm and hand-drawn: a scratchy handwriting face for headings,
   orange for anything you can press, dark brown text, hairline rules. */

/* One hand for the whole site. Caveat is the pick: it reads as handwriting at
   headline size and stays legible in body copy. Variable 400-700 so bold is
   real. Rock Salt is kept as 'Squirrel Display' only so /fonts.html still
   renders the alternates; swapping back is one line in :root. */
@font-face {
  font-family: 'Squirrel Hand';
  src: url('/fonts/caveat.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Squirrel Display';
  src: url('/fonts/rock-salt.woff2') format('woff2');
  font-display: swap;
}
@font-face { font-family: 'Alt Marker'; src: url('/fonts/permanent-marker.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Alt Caveat'; src: url('/fonts/caveat.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Alt Shadows'; src: url('/fonts/shadows-into-light.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Alt Patrick'; src: url('/fonts/patrick-hand.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #FDFBF7;
  --surface: #FFFFFF;
  --ink: #241A12;
  --muted: #6E6259;
  --line: #E7DFD5;
  --orange: #E4742C;
  --orange-dark: #C75F1C;
  --orange-soft: #FBEDE2;
  --green: #2E4536;
  --radius: 6px;
  --wrap: 940px;
  --font-head: 'Squirrel Hand', cursive;
  --font-body: 'Squirrel Hand', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--orange-dark); }

h1, h2 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .5em;
}
/* small headings stay in the body face, where handwriting would tire the eye */
h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .4em; }
/* Caveat runs visually small, so the headings are set larger than a sans would be. */
h1 { font-size: clamp(2.1rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.3rem); }

p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.muted { color: var(--muted); }
.fineprint { font-size: .85rem; color: var(--muted); }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

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

/* ---------- nav ---------- */

.nav { border-bottom: 1px solid var(--line); background: var(--orange-soft); }

.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; gap: 16px;
}

.logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.7rem;
  color: var(--ink); text-decoration: none;
}
.logo img { width: 30px; height: 30px; }

.nav-links {
  display: flex; align-items: center; gap: 20px;
  margin-left: auto; list-style: none; padding: 0;
}
.nav-links a {
  color: var(--ink); text-decoration: none; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.nav-links a:hover { color: var(--orange-dark); }
.nav-links a[aria-current="page"] { color: var(--orange-dark); }

.nav-toggle {
  margin-left: auto; display: none;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px 0; }
.nav-toggle span:first-child { margin-top: 0; }
.nav-toggle span:last-child { margin-bottom: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; padding: 10px 18px;
  border: 1px solid var(--orange); border-radius: var(--radius);
  background: var(--orange); color: #fff;
  font: inherit; font-size: .95rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }

.btn-ghost { background: none; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: none; border-color: var(--ink); color: var(--ink); }

.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .5; cursor: default; }

.link-arrow { color: var(--orange-dark); text-decoration: none; margin-left: 18px; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- layout ---------- */

section { padding: 44px 0; }
section[id] { scroll-margin-top: 70px; }
section + section { border-top: 1px solid var(--line); }

.page-head { padding: 40px 0 0; }
.page-head p { color: var(--muted); max-width: 60ch; }
.crumb { font-size: .88rem; color: var(--muted); margin-bottom: 6px; }

/* ---------- hero ---------- */

/* padding-block, not the shorthand: .hero also carries .wrap, and a shorthand
   here would wipe the wrap's horizontal padding and run text to the screen edge. */
.hero { padding-block: 56px 60px; display: grid; grid-template-columns: 1.3fr .7fr;
        gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.8vw, 2.9rem); margin-bottom: .3em; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 44ch; }
.hero-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-mark { justify-self: center; }
.hero-mark img { width: min(100%, 300px); }

/* the orange swash behind the tail of the headline */
.hl {
  background: var(--orange-soft);
  border-radius: 4px;
  padding: 0 .1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.slogan { color: var(--orange-dark); }

/* ---------- runs ---------- */

.runs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.runs-note { font-size: .88rem; color: var(--muted); }

.runs-list { border-top: 1px solid var(--line); margin-top: 12px; }
.run-card {
  display: flex; align-items: center; gap: 14px 16px; flex-wrap: wrap;
  padding: 16px 0 18px; border-bottom: 1px solid var(--line);
}
.run-card-when { font-weight: 600; min-width: 190px; }
.run-card-shop { color: var(--muted); }
.run-card-spots { color: var(--muted); font-size: .9rem; margin-left: auto; }
.run-card .btn { flex: 0 0 auto; }

/* ---------- steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step-num { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; color: var(--orange-dark); line-height: 1; }
.step h3 { margin-top: 12px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- cost ---------- */

.cost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.fee-list { list-style: none; margin: 0; padding: 0; }
.fee-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 18px;
  align-items: baseline; line-height: 1.5;
  padding: 11px 0 12px; border-bottom: 1px solid var(--line);
}
.fee-list li:last-child { border-bottom: 0; }
.fee-list b { font-weight: 600; white-space: nowrap; }
.compare-lines { margin: 0; padding: 0; list-style: none; }
.compare-lines li { padding: 11px 0 12px; line-height: 1.55; border-bottom: 1px solid var(--line); color: var(--muted); }
.compare-lines li:last-child { border-bottom: 0; }
.compare-lines strong { color: var(--ink); font-weight: 600; }

/* ---------- forms ---------- */

.form-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: start; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .92rem; margin-bottom: 5px; }
.field .req { color: var(--orange-dark); }
.field .help { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: .95rem;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }
textarea { min-height: 110px; resize: vertical; }

.note { font-size: .92rem; margin: 12px 0; }
.note:empty { display: none; }
.note.err { color: #A33A1E; }
.note.ok { color: var(--green); }
.note.warn { color: var(--muted); }

.success { text-align: center; padding: 30px 0; }
.success img { width: 64px; margin: 0 auto 14px; }

.aside-card h3:first-child { margin-top: 0; }
.aside-card p { color: var(--muted); }
.aside-art { width: 120px; margin: 0 0 16px; }
ul.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
ul.ticks li { padding-left: 18px; position: relative; margin-bottom: 7px; color: var(--muted); }
ul.ticks li::before { content: "·"; position: absolute; left: 4px; color: var(--orange-dark); font-weight: 700; }

/* ---------- order page ---------- */

.order-grid { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.order-step { margin-bottom: 34px; }
.order-step h2 { display: flex; align-items: baseline; gap: 10px; font-size: 1.25rem; }
.step-pip { color: var(--orange-dark); font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1; }

.run-picker { border-top: 1px solid var(--line); }
.run-choice {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  width: 100%; text-align: left; padding: 12px 0;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  font: inherit; color: inherit; cursor: pointer;
}
.run-choice:hover, .run-choice.selected { color: var(--orange-dark); }
.run-choice-when { font-weight: 600; min-width: 180px; }
.run-choice-shop { color: var(--muted); }
.run-choice-spots { margin-left: auto; font-size: .88rem; color: var(--muted); }

.category-tabs { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 14px; }
.cat-tab {
  background: none; border: 0; padding: 0 0 3px; font: inherit; font-size: .92rem;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
}
.cat-tab.active { color: var(--ink); border-bottom-color: var(--orange); }

.item-list { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item-info { flex: 1; }
.item-name { font-weight: 600; }
.item-desc { font-size: .88rem; color: var(--muted); }
.item-price { color: var(--muted); font-variant-numeric: tabular-nums; }

.tag-heavy { font-size: .78rem; color: var(--muted); }

.qty-btn {
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 11px; font: inherit; font-size: .88rem; color: var(--ink); cursor: pointer;
}
.qty-btn:hover { border-color: var(--orange); color: var(--orange-dark); }

.cart { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--surface); }
.cart h2 { font-size: 1.05rem; }
.cart-items { margin-bottom: 14px; }
.cart-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px;
  align-items: center; padding: 9px 0 10px; font-size: .92rem; line-height: 1.45;
}
.cart-row-name { min-width: 0; }
.cart-qty { display: flex; align-items: center; gap: 7px; }
.cart-row-price { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }

.cart-total { border-top: 1px solid var(--line); padding-top: 12px; }
.fee-line { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: .92rem; line-height: 1.45; }
.fee-line span { min-width: 0; }
.fee-line b { white-space: nowrap; }
.fee-line.sub { color: var(--muted); font-size: .86rem; }
.fee-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 9px; font-weight: 600; }
.fee-line.runner { color: var(--muted); font-size: .86rem; }
.pay-note { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.pay-note strong { display: block; color: var(--ink); font-weight: 600; }

.receipt { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; text-align: left; }
.receipt-head { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 14px; }
.receipt-label { display: block; font-size: .78rem; color: var(--muted); }
.receipt-lines { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 10px; }
.receipt-line { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: .92rem; line-height: 1.45; }
.receipt-line span { min-width: 0; }
.receipt-line b { white-space: nowrap; }
.receipt-line.total { font-weight: 600; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

/* ---------- communities ---------- */

.finder { max-width: 520px; }
.suggestions { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.suggestions button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 11px 0; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.suggestions button:hover { color: var(--orange-dark); }
.suggestions .where { color: var(--muted); font-size: .88rem; margin-left: auto; }
.badge { font-size: .8rem; color: var(--muted); }

.verify-panel { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.verify-panel .hint { color: var(--muted); font-size: .9rem; }

/* ---------- admin ---------- */

.admin-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.admin-bar .field { margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: .9rem;
}
.admin-table th { font-size: .78rem; color: var(--muted); font-weight: 600; }
.admin-table input[type="number"] { width: 90px; }
.admin-table input[type="text"] { width: 100%; }
.src { font-size: .8rem; color: var(--muted); }

/* ---------- footer ---------- */

footer {
  background: var(--green); color: rgba(255, 255, 255, .78);
  margin-top: 50px; padding: 22px 0;
}
.footer-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: .88rem;
}
.footer-line .logo { color: #fff; font-size: 1.15rem; }
.footer-line .logo img { width: 26px; height: 26px; }

/* ---------- 404 ---------- */

.notfound { text-align: center; padding: 60px 0; }
.notfound-logo { width: 120px; margin: 0 auto 20px; }

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  h1 { font-size: 2rem; }
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .hero-mark { order: -1; justify-self: start; }
  .hero-mark img { width: 160px; }
  .steps, .cost-grid, .form-layout, .order-grid { grid-template-columns: 1fr; gap: 30px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-inner { position: relative; flex-wrap: wrap; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 22px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; border-bottom: 0; }
  .run-card-when, .run-choice-when { min-width: 0; }
  .run-card-spots, .run-choice-spots { margin-left: 0; }
  section { padding: 34px 0; }
}

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