:root {
  --bg: #090b09;
  --ink: #ece9e1;
  --muted: #9b9d95;
  --line: #262824;
  --amber: #e2a31c;
  --card: #111311;
  --orange: #f0a000;
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-x: clip;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 0.9rem 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand img { display: block; width: 2rem; height: 2rem; }

.bar nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 1.1rem; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover { color: var(--ink); }

.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--ink);
}

.bar nav a.nav-cart,
.bar nav a.nav-cart:hover { color: var(--ink); }

.nav-cart-icon { width: 1.15rem; height: 1.15rem; flex: none; }

.nav-cart [data-cart-sum] { color: var(--amber); }

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 6.5rem 1.25rem 4.5rem;
  overflow: hidden;
  text-align: center;
}

.hero-map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-map svg { display: block; width: 100%; height: 100%; }

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(9, 11, 9, 0.98) 0%, rgba(9, 11, 9, 0.94) 26%, rgba(9, 11, 9, 0.62) 48%, rgba(9, 11, 9, 0.18) 74%, rgba(9, 11, 9, 0.04) 100%);
  pointer-events: none;
}

.centre {
  position: relative;
  z-index: 2;
  width: min(46rem, 100%);
  padding: 1.75rem 1.25rem 1.25rem;
}

.centre::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -0.4rem -1.75rem;
  background: rgba(9, 11, 9, 0.92);
  filter: blur(18px);
  border-radius: 48px;
}

.lockup {
  display: block;
  width: min(28rem, 86%);
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.6rem;
}

h1 {
  margin: 0 auto;
  max-width: 20em;
  font-size: clamp(1.7rem, 3.2vw, 2.65rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  margin: 0;
  padding: 0.55rem 1.25rem 0.55rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  text-align: left;
}

.store .mark { width: 1.45rem; height: 1.45rem; flex: none; }

.store-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.store-name { font-size: 1rem; font-weight: 500; }
.store-meta {
  margin-top: 0.15rem;
  color: var(--amber);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store.android {
  background: var(--ink);
  color: #14140f;
}

.store.ios {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px #3a3d36;
}

a.store.android:hover { background: #fff; }
a.store.ios:hover { box-shadow: inset 0 0 0 1.5px var(--amber); }

.store.browser {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px #3a3d36;
}

a.store.browser:hover { box-shadow: inset 0 0 0 1.5px var(--amber); }

.oss {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 1.5rem auto 0;
  color: var(--ink);
  text-decoration: none;
}

.oss-kicker { color: var(--muted); }

.oss-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  font-weight: 500;
}

.oss .gh { width: 1.15rem; height: 1.15rem; }
.oss:hover .oss-row { text-decoration: underline; text-underline-offset: 4px; }
.stars { color: var(--muted); font-weight: 400; }

.track, .route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track { stroke: #3a3428; stroke-width: 5; }
.route { stroke: var(--orange); stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; }

.r1 { animation: draw 16s linear infinite; }
.r2 { animation: draw 11s linear infinite; animation-delay: -3s; }
.r3 { animation: draw 15s linear infinite; animation-delay: -6s; }
.r4 { animation: draw 13s linear infinite; animation-delay: -4s; }
.r5 { animation: draw 14s linear infinite; animation-delay: -8s; }
.r6 { animation: draw 12s linear infinite; animation-delay: -2s; }

.pin circle { fill: #1c1916; stroke: var(--orange); stroke-width: 2; }
.pin path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pin.water path, .pin.shelter path, .pin.supplies path, .pin.fuel path, .pin.shop path { fill: var(--ink); stroke: none; }

.walker, .bike, .car {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.head { fill: var(--ink); stroke: none; }
.car path { fill: var(--ink); stroke: none; }
.car circle { fill: #0c0e0c; stroke: var(--ink); stroke-width: 1.5; }

.mover { transform-box: view-box; transform-origin: 0 0; }
.m1 { animation: m1 16s linear infinite; }
.m2 { animation: m2 11s linear infinite; animation-delay: -3s; }
.m3 { animation: m3 15s linear infinite; animation-delay: -6s; }
.m4 { animation: m4 13s linear infinite; animation-delay: -4s; }
.m5 { animation: m5 14s linear infinite; animation-delay: -8s; }
.m6 { animation: m6 12s linear infinite; animation-delay: -2s; }

@keyframes draw {
  0%, 8% { stroke-dashoffset: 1; }
  88%, 100% { stroke-dashoffset: 0; }
}

@keyframes m1 {
  0%, 8% { transform: translate(360px, 820px); }
  32% { transform: translate(840px, 820px); }
  55% { transform: translate(840px, 400px); }
  78% { transform: translate(1320px, 400px); }
  88%, 100% { transform: translate(1320px, 100px); }
}

@keyframes m2 {
  0%, 10% { transform: translate(840px, 100px); }
  55% { transform: translate(360px, 100px); }
  88%, 100% { transform: translate(360px, 250px); }
}

@keyframes m3 {
  0%, 8% { transform: translate(1080px, 250px); }
  38% { transform: translate(360px, 250px); }
  68% { transform: translate(360px, 700px); }
  88%, 100% { transform: translate(120px, 700px); }
}

@keyframes m4 {
  0%, 8% { transform: translate(600px, 820px); }
  40% { transform: translate(1080px, 820px); }
  68% { transform: translate(1080px, 550px); }
  88%, 100% { transform: translate(1320px, 550px); }
}

@keyframes m5 {
  0%, 8% { transform: translate(120px, 400px); }
  40% { transform: translate(600px, 400px); }
  68% { transform: translate(600px, 820px); }
  88%, 100% { transform: translate(1080px, 820px); }
}

@keyframes m6 {
  0%, 8% { transform: translate(840px, 700px); }
  45% { transform: translate(600px, 700px); }
  88%, 100% { transform: translate(600px, 100px); }
}

@media (prefers-reduced-motion: reduce) {
  .route, .mover { animation: none; }
  .route { stroke-dashoffset: 0; }
  .m1 { transform: translate(1320px, 100px); }
  .m2 { transform: translate(360px, 250px); }
  .m3 { transform: translate(120px, 700px); }
  .m4 { transform: translate(1320px, 550px); }
  .m5 { transform: translate(1080px, 820px); }
  .m6 { transform: translate(600px, 100px); }
}

.band {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

h2 {
  margin: 0 auto 1.5rem;
  max-width: 16em;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lead, .usps p, .cards p, .actions p, .faqs p, .slots p {
  margin: 0;
  color: var(--muted);
}

.lead {
  max-width: 38rem;
  margin-inline: auto;
  font-size: 1.15rem;
}

.lead a { color: var(--ink); }

.usps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 0.5rem;
}

.usps article { display: flex; flex-direction: column; align-items: center; }
.usps p { max-width: 24rem; margin-bottom: 1.1rem; }

.phone {
  margin: 0;
  width: min(100%, 230px);
  padding: 8px;
  border: 1px solid #3a3d36;
  border-radius: 28px;
  background: #050605;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3.25rem;
  text-align: left;
}

.card {
  padding: 1.35rem 1.3rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.card-title svg {
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  color: var(--ink);
}

.card-title h3 { margin: 0; font-size: 1.2rem; }
.card p { font-size: 1rem; line-height: 1.45; }

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 960px;
  margin: 2.5rem auto 2rem;
}

.actions h3 { font-size: 1.25rem; }
.actions p { font-size: 1.05rem; }

.github-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-width: 11.5rem;
  min-height: 3.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  background: #24292f;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
}

.github-btn svg { width: 1.45rem; height: 1.45rem; }
.github-btn:hover { background: #32383f; }

.faqs {
  display: flex;
  flex-direction: column;
  max-width: 40rem;
  margin: 0 auto;
  text-align: left;
}

.faqs details { border-top: 1px solid var(--line); }
.faqs details:last-child { border-bottom: 1px solid var(--line); }
.faqs summary {
  padding: 1rem 0;
  cursor: pointer;
  font-size: 1.15rem;
}
.faqs p { padding: 0 0 1rem; }

.cta .downloads { margin-top: 1.75rem; }

.slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
  margin-top: 2rem;
}

.slot-well {
  height: 9rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, transparent, rgba(226, 163, 28, 0.05)),
    var(--card);
}

.slot {
  display: block;
  color: inherit;
  text-decoration: none;
  text-align: left;
}

.slot-art {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.slot-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #121412;
}

.slot-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.video {
  position: relative;
  margin: 0.85rem 0 0.7rem;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.slots h3 { margin-top: 0.85rem; font-size: 1.15rem; }

#guide .slot h3 { margin-top: 0; }
#guide .slot-frame { margin-top: 0.85rem; }

.slots p { margin-top: 0.35rem; }

.guide h2 { margin-top: 3rem; }

.guide h2:first-of-type { margin-top: 2.5rem; }

.empty-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
  text-align: left;
}

.empty-products article {
  padding: 0.9rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--card);
}

.empty-products p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.res-search {
  width: min(36rem, 100%);
  margin: 1.6rem auto 0;
}

.res-search input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.res-search input::placeholder { color: var(--muted); }

.res-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 1.75rem;
  align-items: start;
  margin-top: 1.75rem;
  text-align: left;
}

.res-main { min-width: 0; }

.res-picks { display: none; }

.res-side {
  position: sticky;
  top: 4.6rem;
  max-height: calc(100svh - 5.6rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0e100e;
  scrollbar-width: thin;
  scrollbar-color: #3a3d36 transparent;
}

.res-cat + .res-cat { border-top: 1px solid var(--line); }

.res-cat > button {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.res-cat > button svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  color: var(--amber);
}

.res-cat > button::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: auto;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-0.1rem) rotate(45deg);
}

.res-cat.is-open > button::after { transform: translateY(0.1rem) rotate(-135deg); }

.res-cat > button:hover,
.res-subs button:hover { background: #161816; }

.res-subs { display: none; padding: 0 0.5rem 0.55rem 2.4rem; }

.res-cat.is-open .res-subs { display: flex; flex-direction: column; gap: 0.1rem; }

.res-subs button {
  padding: 0.4rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.res-subs button[aria-current="true"] {
  background: #1c1e1c;
  color: var(--ink);
}

.res-group { margin: 0 0 2.25rem; }

.res-kicker {
  margin: 0 0 0.3rem;
  color: var(--amber);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.res-group h2 {
  margin: 0 0 1.1rem;
  max-width: none;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  text-align: left;
}

.res-clip {
  margin: 0 0 1.35rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.res-clip h3 { margin: 0 0 0.65rem; font-size: 1.12rem; }

.res-clip .video { margin: 0; }

.res-clip p { margin: 0.55rem 0 0; color: var(--muted); }

.res-clip a { color: var(--ink); }

.res-empty { margin: 0; color: var(--muted); }

@media (max-width: 800px) {
  .res-layout { grid-template-columns: 1fr; }

  .band.is-searching .res-picks { display: none; }

  .res-side { display: none; }

  .res-picks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }

  .res-picks label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .res-picks select {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    color: var(--ink);
    font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
  }
}

@media (max-width: 480px) {
  .res-picks { grid-template-columns: 1fr; }
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--amber);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-list,
[data-guides="library"] {
  width: min(52rem, 100%);
  margin: 2.25rem auto 0;
  text-align: left;
}

.featured-title,
.guide-book {
  display: grid;
  grid-template-columns: 8.75rem minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  align-items: center;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.guide-book {
  grid-template-columns: minmax(0, 13.5rem) minmax(0, 1fr);
  align-items: start;
  padding: 3rem 0;
  scroll-margin-top: 5.5rem;
}

.featured-title img,
.guide-book > img {
  width: 100%;
  height: auto;
  border-radius: 4px 12px 12px 4px;
  box-shadow: 8px 14px 28px rgba(0, 0, 0, 0.4);
}

.featured-title h3 { margin: 0; font-size: 1.45rem; }
.featured-title h3 a,
.featured-more,
.guide-example a,
.guide-sheet { color: var(--ink); text-decoration: none; }
.featured-title h3 a:hover,
.featured-more:hover,
.guide-example a:hover,
.guide-sheet:hover,
.guide-buy:hover { color: var(--amber); }

.featured-title p { margin: 0.5rem 0 0; color: var(--muted); }
.featured-more { display: inline-block; margin-top: 0.85rem; }

.guide-book h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  text-align: left;
}

.guide-book h3 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.guide-desc { margin: 0.85rem 0 0; color: var(--muted); }
.guide-meta { margin: 1.15rem 0 0; }

.guide-price {
  margin: 1.15rem 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
}

.guide-availability { margin: 0.35rem 0 0; color: var(--muted); }

.guide-buy {
  display: inline-flex;
  margin-top: 1.15rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: #14140f;
  font-weight: 500;
  text-decoration: none;
}

button.guide-buy {
  border: 0;
  font: inherit;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  max-width: 100%;
  cursor: pointer;
}

button.guide-buy:disabled { cursor: wait; opacity: 0.65; }

button.guide-buy[aria-pressed="true"] {
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: default;
}

.guide-buy:hover { background: #fff; color: #14140f; }

button.guide-buy[aria-pressed="true"]:hover {
  background: transparent;
  color: var(--muted);
}

.guide-example { margin-top: 1.35rem; }
.guide-example p { margin: 0.3rem 0 0; color: var(--muted); }

.guide-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 11rem));
  gap: 1rem;
  margin-top: 1.2rem;
}

.guide-previews figure { margin: 0; }

.guide-previews button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.guide-previews img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f1ea;
}

.guide-previews button span { display: block; margin-top: 0.45rem; }
.guide-previews figcaption { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.92rem; }

.guide-sheet { display: inline-block; margin-top: 1.2rem; }

.preview-dialog {
  width: min(48rem, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}

.preview-dialog::backdrop { background: rgba(0, 0, 0, 0.82); }

.preview-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
}

.preview-bar button {
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.preview-bar button:hover { border-color: var(--amber); }

.preview-dialog figure { margin: 0; padding: 0 1rem 2rem; }

.preview-dialog img {
  display: block;
  width: min(100%, 42rem);
  height: auto;
  margin: 0 auto;
  background: #f4f1ea;
}

.preview-dialog figcaption {
  width: min(100%, 42rem);
  margin: 0.8rem auto 0;
  color: var(--muted);
}

.section-more { margin: 1.75rem 0 0; }
.section-more a { color: var(--ink); text-decoration: none; }
.section-more a:hover { color: var(--amber); }

.book-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.15rem;
  margin-top: 2rem;
  text-align: left;
}

.book-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

a.book-cell:hover h3,
.book-cell h2 a:hover,
.book-cell h3 a:hover,
.book-cell p a:hover { color: var(--amber); }

.book-cell img {
  width: 100%;
  height: auto;
  border-radius: 4px 12px 12px 4px;
  box-shadow: 8px 14px 28px rgba(0, 0, 0, 0.4);
}

.book-cell h2,
.book-cell h3 {
  margin: 0.85rem 0 0;
  max-width: none;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: left;
}

.book-cell h2 a,
.book-cell h3 a,
.book-cell p a { color: inherit; }

.book-cell p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.book-cell p a { text-decoration: underline; text-underline-offset: 0.15em; }
.book-cell .guide-price { margin-top: 0.75rem; font-size: 1.05rem; color: var(--ink); }
.book-cell .guide-buy { margin-top: 0.85rem; }

.book-all { margin: 1.75rem 0 0; }
.book-all .guide-buy { margin-top: 0; }

.shop-deal {
  display: block;
  width: fit-content;
  max-width: min(28rem, 100%);
  margin: 1.5rem 0 0 auto;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: #16140f;
  box-shadow: inset 0 0 0 1px rgba(226, 163, 28, 0.75);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.shop-deal::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  background: rgba(226, 163, 28, 0.28);
}

.shop-deal span { position: relative; }

.shop-deal [data-state="next"] { color: var(--amber); }

.shop-deal [data-state="reached"]::after {
  content: " ✓";
  color: var(--amber);
}

.book-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.85rem;
  text-align: left;
  border-top: 1px solid var(--line);
}

.book-list .book-cell {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) auto auto;
  column-gap: 1.15rem;
  row-gap: 0.3rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.book-list .book-cover { grid-column: 1; grid-row: 1 / span 3; display: block; }

.book-list .book-cover img {
  width: 4.6rem;
  border-radius: 3px 8px 8px 3px;
  box-shadow: 4px 8px 16px rgba(0, 0, 0, 0.4);
}

.book-list h2 { grid-column: 2; grid-row: 1; margin: 0; font-size: 1.2rem; }
.book-list .book-blurb { grid-column: 2; grid-row: 2; margin: 0; }
.book-list .book-more {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.4rem;
  grid-column: 2;
  grid-row: 3;
  width: fit-content;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.book-list .book-more:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.book-list .guide-price {
  grid-column: 3;
  grid-row: 1 / span 3;
  margin: 0;
  justify-self: end;
  white-space: nowrap;
}

.book-list .guide-buy {
  grid-column: 4;
  grid-row: 1 / span 3;
  margin: 0;
  white-space: nowrap;
}

.book-page { text-align: left; }

.book-page h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  text-align: left;
}

.cart-page h1 {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.book-page .guide-book {
  width: min(52rem, 100%);
  margin: 2rem auto 0;
  border-top: 0;
  padding-top: 0;
}

.cart-panel {
  width: min(36rem, 100%);
  margin: 2rem auto 0;
  text-align: left;
}

.cart-line {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) auto auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.cart-line img {
  width: 3.1rem;
  height: auto;
  border-radius: 2px 6px 6px 2px;
  box-shadow: 3px 6px 12px rgba(0, 0, 0, 0.35);
}

.cart-line a { color: inherit; text-decoration: none; }
.cart-line a:hover { color: var(--amber); }

.cart-remove {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.cart-totals { margin-top: 0.4rem; }
.cart-sub,
.cart-discount,
.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.45rem 0 0;
}

.cart-discount { color: var(--amber); }
.cart-total {
  margin-top: 0.8rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.35rem;
}

.cart-note { margin: 0.8rem 0 0; color: var(--muted); }

.deal {
  margin: 0 0 1.35rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(226, 163, 28, 0.14), transparent 46%),
    var(--card);
}

.deal-count {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
}

.deal-meter { margin-top: 0.9rem; }

.deal-track-wrap { position: relative; }

.deal-track {
  height: 0.85rem;
  border-radius: 999px;
  background: #1c1e1a;
  box-shadow: inset 0 0 0 1px rgba(226, 163, 28, 0.45);
  overflow: hidden;
}

.deal-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #9a6b10, var(--amber));
}

.deal-gate {
  position: absolute;
  top: -0.2rem;
  bottom: -0.2rem;
  left: 37.5%;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ink);
}

.deal-gate.is-reached { background: #fff; }

.deal-scale {
  position: relative;
  height: 1.45rem;
  margin-top: 0.4rem;
  font-size: 0.98rem;
}

.deal-scale span {
  position: absolute;
  top: 0;
  color: var(--muted);
  white-space: nowrap;
}

.deal-scale .at-fifteen { left: 37.5%; transform: translateX(-50%); }
.deal-scale .at-fifty { right: 0; }

.deal-scale span[data-state="next"],
.deal-scale span[data-state="reached"] {
  color: var(--amber);
  font-weight: 500;
}

.download-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.download-list .guide-buy { margin-top: 0; }

.reel {
  display: grid;
  grid-template-columns: auto minmax(0, 42rem) auto;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.reel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  text-align: left;
}

.reel-track::-webkit-scrollbar { display: none; }

.reel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.reel-slide h3 { margin: 0; font-size: 1.2rem; }
.reel-slide p { margin: 0.35rem 0 0; }
.reel-slide .video { margin: 0.75rem 0 0.55rem; }
.reel-slide a { color: var(--ink); }

.reel-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.reel-btn:hover { border-color: var(--muted); }

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

.foot {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.foot img { width: 2rem; height: 2rem; }
.foot p { margin: 0.8rem auto; max-width: 28rem; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.foot nav a { color: var(--ink); }

@media (max-width: 900px) {
  .usps, .cards, .actions, .slots, .empty-products, .book-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .featured-title,
  .guide-book { grid-template-columns: 1fr; }
  .featured-title img,
  .guide-book > img { width: min(11rem, 52%); }
  .book-page .guide-book > img { width: min(16rem, 72%); }
}

@media (max-width: 640px) {
  .bar, .band, .foot { width: min(1120px, calc(100% - 2rem)); }
  .bar { flex-wrap: wrap; }
  .bar nav { min-width: 0; justify-content: flex-end; gap: 0.65rem 0.9rem; }
  .book-list .book-cell {
    grid-template-columns: 4.4rem minmax(0, 1fr);
    align-items: start;
  }
  .book-list .book-cover { grid-row: 1 / span 5; }
  .book-list .book-cover img { width: 4.4rem; }
  .book-list h2,
  .book-list .book-blurb,
  .book-list .book-more,
  .book-list .guide-price,
  .book-list .guide-buy { grid-column: 2; }
  .book-list h2 { grid-row: 1; }
  .book-list .book-blurb { grid-row: 2; }
  .book-list .book-more { grid-row: 3; }
  .book-list .guide-price { grid-row: 4; justify-self: start; }
  .book-list .guide-buy { grid-row: 5; justify-self: start; white-space: normal; }
  .shop-deal { max-width: 100%; }
  .cart-line {
    grid-template-columns: 3.1rem minmax(0, 1fr) auto;
    grid-template-areas:
      "cover title title"
      "cover price remove";
  }
  .cart-line img { grid-area: cover; }
  .cart-line a { grid-area: title; }
  .cart-line > span { grid-area: price; }
  .cart-remove { grid-area: remove; justify-self: end; }
  .hero { padding: 5.5rem 1rem 3.5rem; }
  .downloads { width: 100%; }
  .store { flex: 1 1 16rem; justify-content: center; }
  .usps, .cards, .actions, .slots, .empty-products, .book-row { grid-template-columns: 1fr; }
}
