/* tac-nav.com — marketing site.
   Tokens mirror the app (lib/theme.ts) and the previous Figma site:
   #1a1a1a ground, topographic linework, one accent (#5BE978), Space
   Grotesk for display/body, JetBrains Mono for UI labels. */

:root {
  --bg: #1a1a1a;
  --ink: #ffffff;
  --muted: #8e908b;
  --line: #2c2d2b;
  --line-strong: #4e4e4e;
  --accent: #5be978;
  --tile: #000000;
  --shadow: 0 4px 44px rgba(0, 0, 0, 0.65);
  --gutter: 80px;
  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background: the app's home-screen Lottie rebuilt as vector (bg.js) —
   a green sweep under a #1a1a1a sheet with the contour lines cut out. The
   ground colour shows until the script has drawn it. */
#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#bg.ready {
  opacity: 1;
}

/* Long-form pages: keep the contour sweep, but quieter behind the text. */
body.reading #bg.ready {
  opacity: 0.4;
}

/* Contour backgrounds confined to one part of a page (homepage: the hero
   fold and the closing section + footer). Full-bleed, behind the content,
   with a soft fade where they meet the plain sections. */
.bg-contour {
  position: absolute;
  z-index: -1;
  left: calc(50% - 50vw);
  width: 100vw;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.bg-contour.ready {
  opacity: 1;
}

/* Hero fold: from the very top of the page (above the header) to the
   bottom of the hero, fading out at the bottom. --fold-top = the page's top
   padding (24) + the header (48) that sit above the hero box. */
.hero {
  position: relative;
  --fold-top: 72px;
}

.bg-fold-top {
  top: calc(-1 * var(--fold-top));
  bottom: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}

/* Closing section + footer, to the bottom of the page, fading in at the top. */
.fold-end {
  position: relative;
  isolation: isolate;
}

.bg-fold-end {
  top: 0;
  bottom: -40px;
  -webkit-mask-image: linear-gradient(to top, #000 70%, transparent);
  mask-image: linear-gradient(to top, #000 70%, transparent);
}

.bg-layer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The static sheet gets its own layer so only the sweep repaints. */
.bg-layer .bg-top {
  will-change: transform;
}

/* The Lottie's pass is 7.7083 s (370 frames at 48 fps) over a travel of
   (2077.895, 2168.421), but on any screen shape the green is only on screen
   between ~15% and ~70% of it, which left ~3 s of empty background per loop.
   So only that stretch is played, at the same speed (55% of 7.7083 s), with
   a short fade at each end so nothing pops at the loop point. */
.bg-layer .bg-sweep {
  animation: sweep 4.2396s linear infinite;
  /* The green that lights the contour lines, kept subtle (peak opacity in
     the keyframes). */
  opacity: 0.5;
}

.bg-paused .bg-sweep {
  animation-play-state: paused;
}

@keyframes sweep {
  0% {
    transform: translate(311.684px, 325.263px);
    opacity: 0;
  }
  6% {
    opacity: 0.5;
  }
  94% {
    opacity: 0.5;
  }
  100% {
    transform: translate(1454.527px, 1517.895px);
    opacity: 0;
  }
}

a {
  color: inherit;
}

img,
video,
svg {
  display: block;
}

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter) 40px;
  max-width: 1600px;
  margin: 0 auto;
}

/* ------------------------------------------------------------ header */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  width: fit-content;
}

.brand-tile {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--tile);
  display: grid;
  place-items: center;
}

.brand-name {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* "Go to app" — the web command post at app.tac-nav.com. Outlined in the
   accent so it doesn't compete with the App Store badge; fills on hover. */
.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.48px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.app-btn:hover,
.app-btn:focus-visible {
  background: var(--accent);
  color: #000;
}

.app-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-btn svg {
  transition: transform 0.15s ease;
}

.app-btn:hover svg {
  transform: translateX(2px);
}

/* ------------------------------------------------------------ labels */

.label {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.label-accent {
  color: var(--accent);
}

a.label {
  text-decoration: none;
  transition: color 0.15s ease;
}

a.label:hover,
a.label:focus-visible {
  color: var(--ink);
}

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

.hero {
  flex: 1;
  display: grid;
  /* 520: "Airsoft team" at the 88px headline is 516px wide. */
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
  padding: 40px 0;
}

.headline {
  margin: 0;
  font-weight: 500;
  font-size: 88px;
  line-height: 1;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.headline span {
  display: block;
}

.headline .hl {
  color: var(--accent);
}

.lede {
  margin: 17px 0 0;
  font-size: 18px;
  line-height: 23px;
  color: var(--muted);
  max-width: 480px;
}

.store {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.store-badge {
  display: block;
  width: 135px;
  height: 40px;
  border-radius: 6px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.store-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.foot {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 101px;
}

.page > .foot {
  margin-top: 0;
}

/* ------------------------------------------------------ device stage */

/* Two real recordings: the web command post in a browser window, the
   phone app in a landscape handset overlapping its lower-left corner.
   Everything is sized in % of the stage so the overlap holds at any
   width. */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 740 / 560;
  margin: 0;
  /* cqw = 1% of the stage width — lets the phone's bezel and corner
     radii scale together with the composition. */
  container-type: inline-size;
}

.device {
  position: absolute;
  margin: 0;
  box-shadow: var(--shadow);
}

.browser {
  top: 6%;
  right: 0;
  width: 86%;
  border-radius: 10px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  overflow: hidden;
}

.browser-bar {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid #222;
  background: #111;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
}

.url {
  flex: 1;
  max-width: 280px;
  margin: 0 auto;
  height: 18px;
  border-radius: 4px;
  background: #1c1c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.url svg {
  flex: none;
}

.bar-spacer {
  width: 36px;
}

.browser video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d0d0d;
}

.phone {
  /* One bezel width on every side, corners included: the screen's radius
     is the frame's radius minus the bezel, so the curves are concentric. */
  --bezel: 1.05cqw;
  --radius: 3.9cqw;
  left: 0;
  bottom: 0;
  width: 58%;
  padding: var(--bezel);
  border-radius: var(--radius);
  background: #0a0a0a;
  outline: 1px solid rgba(255, 255, 255, 0.07);
  outline-offset: -1px;
}

/* Volume + power keys on the phone's top edge (it's in landscape). */
.phone::before,
.phone::after {
  content: '';
  position: absolute;
  top: -2px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: #1f1f1f;
}

.phone::before {
  left: 16%;
  width: 9%;
}

.phone::after {
  right: 22%;
  width: 13%;
}

.phone video {
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 646;
  border-radius: calc(var(--radius) - var(--bezel));
  object-fit: cover;
  background: #0d0d0d;
}

/* HUD captions. */
.hud {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.hud-web {
  top: 0;
  right: 0;
}

.hud-app {
  bottom: 3%;
  left: 61%;
}

.live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(91, 233, 120, 0.6);
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(91, 233, 120, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(91, 233, 120, 0);
  }
}

/* Viewfinder corners around the browser. */
.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--line-strong);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}

.corner.tl {
  top: calc(6% - 12px);
  left: calc(14% - 12px);
  border-top-width: 1px;
  border-left-width: 1px;
}

.corner.br {
  right: -12px;
  bottom: calc(22% - 12px);
  border-bottom-width: 1px;
  border-right-width: 1px;
}

/* ------------------------------------------------------ inner pages */

.doc {
  flex: 1;
  padding: 72px 0 40px;
  max-width: 640px;
}

.doc h1 {
  margin: 0 0 24px;
  font-weight: 500;
  font-size: 64px;
  line-height: 64px;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.doc p,
.doc li,
.doc td,
.doc th {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.doc p {
  margin: 0 0 14px;
}

.doc h2 {
  margin: 40px 0 12px;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.doc h3 {
  margin: 22px 0 8px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.44px;
  text-transform: uppercase;
  color: var(--ink);
}

.doc ul {
  margin: 0 0 14px;
  padding-left: 18px;
}

.doc li {
  margin: 0 0 6px;
}

.doc li::marker {
  color: var(--accent);
}

.doc strong {
  color: var(--ink);
  font-weight: 500;
}

.doc a {
  color: var(--accent);
  text-decoration: none;
}

.doc a:hover {
  text-decoration: underline;
}

.doc .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.44px;
  text-transform: uppercase;
}

.doc .email {
  font-size: 18px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 14px;
  border: 1px solid var(--line-strong);
}

.doc table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.doc th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.35);
}

.doc tr:last-child td {
  border-bottom: 0;
}

/* ---------------------------------------------------------- entrance */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 80ms);
}

.stage .reveal {
  transform: translateY(24px);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .live {
    animation: none;
  }
  /* Hold the sweep mid-pass so the lines still read. */
  .bg-layer .bg-sweep {
    animation-play-state: paused;
    animation-delay: -2.12s;
  }
}

/* ------------------------------------------------------- breakpoints */

@media (max-width: 1180px) {
  :root {
    --gutter: 48px;
  }
  .hero {
    gap: 48px;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  }
  .headline {
    font-size: 70px;
  }
}

/* Single column: devices first (like the old site), copy below. */
@media (max-width: 960px) {
  :root {
    --gutter: 32px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding-top: 32px;
  }
  .stage {
    order: -1;
    max-width: 720px;
  }

  .copy .foot {
    margin-top: 48px;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }
  .hero {
    gap: 32px;
    padding: 24px 0 32px;
  }
  /* "Airsoft team" is the widest line: 15vw keeps it inside the gutters down to 320px. */
  .headline {
    font-size: min(60px, 15vw);
  }
  .doc h1 {
    font-size: min(48px, 14.5vw);
    line-height: 1;
  }
  .stage {
    aspect-ratio: 343 / 290;
  }
  .browser {
    top: 9%;
    width: 90%;
    border-radius: 7px;
  }
  .browser-bar {
    height: 20px;
    gap: 8px;
    padding: 0 8px;
  }
  .dots i {
    width: 5px;
    height: 5px;
  }
  .url {
    height: 12px;
    font-size: 7px;
    max-width: 150px;
  }
  .url svg {
    width: 6px;
    height: 7px;
  }
  .bar-spacer {
    width: 20px;
  }
  .phone {
    --bezel: 1.2cqw;
    --radius: 4.6cqw;
    width: 66%;
  }
  .hud-app {
    display: none;
  }
  .hud-web {
    top: 0;
    left: 10%;
    right: auto;
  }
  .corner {
    display: none;
  }
  .doc {
    padding-top: 48px;
  }
  .copy .foot {
    margin-top: 24px;
  }
}

/* ================================================================ guides */
/* Index layout per Adomas's reference: a full-width accent "featured" block
   (black type, grayscale image), then a two-column grid ruled with hairlines,
   mono uppercase titles, date bottom-left and a grayscale image bottom-right.
   Images take their colour back on hover. */

.blog {
  flex: 1;
  padding: 56px 0 72px;
}

.blog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

.blog-title,
.related-title {
  margin: 0;
  font-weight: 500;
  font-size: 64px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.related-title {
  font-size: 40px;
}

.blog-sub {
  margin: 0;
  max-width: 420px;
  font-size: 16px;
  line-height: 22px;
  color: var(--muted);
}

.view-all {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}

.view-all:hover {
  color: var(--accent);
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px;
  min-height: 560px;
  padding: 36px;
  background: var(--accent);
  color: #000;
  text-decoration: none;
  border-top: 1px solid #000;
}

.featured-text {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.post-date {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.44px;
  text-transform: uppercase;
}

.featured-title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.featured-sub {
  margin: 0;
  max-width: 460px;
  font-size: 18px;
  line-height: 24px;
}

.featured-img {
  align-self: end;
}

.featured-img img,
.post-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  transition: filter 0.35s ease;
}

.featured:hover .featured-img img,
.post:hover .post-img img {
  filter: none;
}

.featured-empty {
  min-height: 360px;
  grid-template-columns: 1fr;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.post {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 400px;
  padding: 36px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: background-color 0.2s ease;
}

.post:nth-child(odd) {
  border-right: 1px solid var(--line-strong);
}

.post:hover {
  background: rgba(0, 0, 0, 0.35);
}

.post-title {
  margin: 0;
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post:hover .post-title {
  color: var(--accent);
}

.post-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.post-foot .post-date {
  color: var(--muted);
}

.post-img {
  width: 48%;
  max-width: 260px;
}

/* ------------------------------------------------------------ article */

.guide {
  flex: 1;
  width: 100%;
  /* Article column + gap + contents sidebar, centred as one block. */
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 0 72px;
}

.crumbs {
  display: flex;
  gap: 10px;
}

.crumbs a {
  text-decoration: none;
}

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

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) 220px;
  gap: 80px;
  margin-top: 28px;
}

.guide-title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.02;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.guide-meta {
  margin-top: 18px;
}

.byline {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35);
}

.byline p {
  margin: 0;
  font-size: 15px;
  line-height: 21px;
  color: var(--ink);
}

.byline .small {
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
}

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

.byline-tile {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #000;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
}

.guide-hero {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-top: 32px;
  border: 1px solid #2a2a2a;
}

.tldr {
  margin-top: 32px;
  padding: 24px;
  background: var(--accent);
  color: #000;
}

.tldr h2 {
  color: #000;
}

.tldr p {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 26px;
}

.takeaways {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--line-strong);
}

.takeaways ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.takeaways li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 23px;
  color: var(--ink);
}

.takeaways li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.toc-mobile {
  display: none;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
}

.toc-mobile summary {
  cursor: pointer;
}

.toc-mobile ol,
.toc-side ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.toc-mobile a,
.toc-side a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 19px;
}

.toc-side {
  position: relative;
}

.toc-side nav {
  position: sticky;
  top: 32px;
}

.toc-side ol {
  border-left: 1px solid var(--line-strong);
}

.toc-side a {
  display: block;
  margin-left: -1px;
  padding-left: 14px;
  border-left: 1px solid transparent;
}

.toc-side a:hover,
.toc-side a.on {
  color: var(--ink);
  border-left-color: var(--accent);
}

/* Long-form body: brighter than the muted UI grey for comfortable reading. */
.prose {
  margin-top: 36px;
  font-size: 18px;
  line-height: 1.7;
  color: #d9dbd6;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 20px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin: 0 0 8px;
}

.prose li::marker {
  color: var(--accent);
}

.prose h2 {
  margin: 56px 0 16px;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.15;
  color: var(--ink);
  scroll-margin-top: 24px;
}

.prose h3 {
  margin: 36px 0 12px;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink);
}

.prose strong {
  color: var(--ink);
  font-weight: 500;
}

.prose a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
}

.prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
}

.prose pre {
  padding: 16px;
  overflow-x: auto;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
}

.prose sup.cite {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 0;
  margin-left: 2px;
}

.prose sup.cite a {
  text-decoration: none;
}

.prose figure {
  margin: 36px 0;
}

.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #2a2a2a;
}

.prose figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}

.prose .stat {
  margin: 32px 0;
  padding: 20px 24px;
  border: 1px solid var(--accent);
  background: rgba(91, 233, 120, 0.06);
}

.prose .stat p {
  margin: 0;
}

.prose .stat-value {
  display: block;
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
}

.prose .stat-label {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  line-height: 22px;
}

.prose .chart-title {
  margin: 0 0 14px;
  font-weight: 500;
  color: var(--ink);
}

.prose .chart-rows {
  display: grid;
  gap: 10px;
}

.prose .chart-row {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  line-height: 18px;
}

.prose .chart-track {
  height: 10px;
  background: #0d0d0d;
}

.prose .chart-bar {
  height: 100%;
  background: var(--accent);
}

.prose .chart-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}

.prose .chart-note {
  margin-left: 6px;
  color: var(--muted);
}

.table-wrap {
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
}

.prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 21px;
}

.prose caption {
  padding: 12px 14px;
  text-align: left;
  color: var(--muted);
}

.prose caption strong {
  color: var(--ink);
}

.prose th,
.prose td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.44px;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.35);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose .references {
  margin-top: 56px;
  padding-top: 8px;
  border-top: 1px solid var(--line-strong);
}

.prose .references h2 {
  margin-top: 24px;
  font-size: 22px;
}

.prose .references ol {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

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

.faq {
  margin-top: 56px;
}

.faq h2 {
  margin: 0 0 16px;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.15;
}

.faq details {
  border-top: 1px solid var(--line-strong);
  padding: 16px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.faq summary {
  cursor: pointer;
  font-size: 18px;
  line-height: 25px;
  color: var(--ink);
}

.faq details p {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 25px;
  color: #d9dbd6;
}

.cta {
  margin-top: 56px;
  padding: 28px;
  border: 1px solid var(--accent);
  background: rgba(0, 0, 0, 0.35);
}

.cta-title {
  margin: 10px 0 0;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.cta-sub {
  margin: 10px 0 0;
  max-width: 520px;
  font-size: 16px;
  line-height: 23px;
  color: var(--muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-top: 20px;
}

.adjacent {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
  font-size: 15px;
}

.adjacent a {
  color: var(--muted);
  text-decoration: none;
}

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

.adjacent .next {
  text-align: right;
}

.related {
  margin-top: 80px;
}

.related-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}

@media (max-width: 1100px) {
  .guide {
    max-width: 760px;
  }
  .guide-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    max-width: 760px;
  }
  .toc-side {
    display: none;
  }
  .toc-mobile {
    display: block;
  }
}

@media (max-width: 860px) {
  .featured {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }
  .post-grid {
    grid-template-columns: 1fr;
  }
  .post:nth-child(odd) {
    border-right: 0;
  }
  .post {
    min-height: 0;
    padding: 28px 0;
  }
  .blog-title {
    font-size: min(48px, 14.5vw);
  }
  .related-title {
    font-size: 30px;
  }
}

@media (max-width: 600px) {
  .blog {
    padding-top: 32px;
  }
  .prose {
    font-size: 17px;
  }
  .prose h2,
  .faq h2 {
    font-size: 25px;
  }
  .cta {
    padding: 20px;
  }
  .adjacent {
    flex-direction: column;
  }
  .adjacent .next {
    text-align: left;
  }
}

/* ============================================================ home page */
/* Feature sections under the hero, after Adomas's references: use-case
   image cards, a ruled mono statement crossed by a tilted phone, a ruled
   feature grid, a full-bleed map with a light panel, and a centred closer. */

.home {
  flex: 1;
}

@media (min-width: 961px) {
  .home > .hero {
    min-height: calc(100svh - 112px);
  }
}

.js-reveal .scroll-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.js-reveal .scroll-in.in {
  opacity: 1;
  transform: none;
}

/* ---- use cases */
.uses {
  padding: 120px 0 40px;
}

.use-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.use-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #0d0d0d;
}

.use-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(0.9);
  transform: scale(1.01);
  transition: filter 0.4s ease, transform 0.6s ease;
}

.use-media::after {
  content: '';
  position: absolute;
  inset: 30% 0 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 0.55) 45%, transparent);
  pointer-events: none;
}

.use-card:hover .use-media img {
  filter: brightness(0.85) saturate(1);
  transform: scale(1.04);
}

.use-title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 1;
  margin: 0;
  font-weight: 500;
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1.08;
  color: var(--ink);
}

.use-desc {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
}

/* ---- setup: ruled statement + upright phone */
/* The phone starts two thirds across and spans the section: kicker at the
   top, copy at the bottom, and the ruled title across the full width
   (both columns), passing behind the phone. */
.setup {
  --phone-w: 320px;
  --bezel: 10px;
  --phone-r: 50px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(var(--phone-w), 1fr);
  /* Kicker, title and copy sit together, centred beside the phone; the
     outer 1fr rows take up the rest of the phone's height. */
  grid-template-rows: 1fr auto auto auto 1fr;
  padding: 120px 0;
}

.setup-kicker {
  grid-column: 1;
  grid-row: 2;
  margin: 0 0 28px;
  color: var(--ink);
  font-size: 12px;
}

.setup .ruled {
  grid-column: 1 / -1;
  grid-row: 3;
}

.setup-copy {
  grid-column: 1;
  grid-row: 4;
}

.setup-phone {
  grid-column: 2;
  grid-row: 1 / -1;
  justify-self: start;
  width: var(--phone-w);
  position: relative;
  z-index: 1;
}

.ruled {
  margin: 0;
  font-weight: 500;
  font-size: clamp(40px, 6.6vw, 108px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.ruled span {
  display: block;
  padding: 0.38em 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.ruled span:last-child {
  color: #5c5d5b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.setup-copy {
  margin: 32px 32px 0 0;
  max-width: 640px;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.45;
  color: #d9dbd6;
}

/* Portrait phone: one bezel width all round, screen radius = frame radius
   minus the bezel so the corners stay concentric. */
.setup-phone-frame {
  position: relative;
  padding: var(--bezel);
  border-radius: var(--phone-r);
  background: #0a0a0a;
  outline: 1px solid rgba(255, 255, 255, 0.08);
  outline-offset: -1px;
  box-shadow: var(--shadow);
}

/* Side keys: volume on the left edge, power on the right. */
.setup-phone-frame::before,
.setup-phone-frame::after {
  content: '';
  position: absolute;
  width: 3px;
  background: #1f1f1f;
}

.setup-phone-frame::before {
  left: -2px;
  top: 20%;
  height: 11%;
  border-radius: 2px 0 0 2px;
}

.setup-phone-frame::after {
  right: -2px;
  top: 26%;
  height: 14%;
  border-radius: 0 2px 2px 0;
}

.setup-phone-frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1300;
  object-fit: cover;
  border-radius: calc(var(--phone-r) - var(--bezel));
  background: #0d0d0d;
}

/* ---- ruled feature grid */
.features {
  padding: 120px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

.section-title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* Rules only between cells (cell borders, set per column count below), and
   viewfinder brackets on the four outer corners. */
.feature-grid {
  --rule: 1px solid var(--line-strong);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  --c: linear-gradient(var(--line-strong), var(--line-strong));
  background:
    var(--c) top left / 24px 1px,
    var(--c) top left / 1px 16px,
    var(--c) top right / 24px 1px,
    var(--c) top right / 1px 16px,
    var(--c) bottom left / 24px 1px,
    var(--c) bottom left / 1px 16px,
    var(--c) bottom right / 24px 1px,
    var(--c) bottom right / 1px 16px;
  background-repeat: no-repeat;
}

.feature {
  padding: 48px 32px;
}

.feature:not(:nth-child(3n)) {
  border-right: var(--rule);
}

.feature:nth-child(-n + 6) {
  border-bottom: var(--rule);
}

.feature h3 {
  margin: 0 0 14px;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: var(--accent);
}

.feature p {
  margin: 0;
  max-width: 360px;
  font-size: 18px;
  line-height: 1.1;
  color: var(--muted);
}

/* ---- offline: full-bleed map + light panel */
.offline {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 640px;
  display: flex;
  align-items: center;
  padding: 96px var(--gutter);
  overflow: hidden;
}

/* 20% taller than the section on each side, for the parallax drift
   (index.html moves it ±20% of the section height as it scrolls). */
.offline-bg {
  position: absolute;
  left: 0;
  top: -20%;
  width: 100%;
  height: 140%;
  object-fit: cover;
  will-change: transform;
  /* Light desert photo: dimmed a little so the light panel still separates. */
  filter: brightness(0.8);
}

/* Same content width as .page (max 1600 minus the gutters), so the panel's
   left edge lines up with every other section even though the map bleeds. */
.offline-inner {
  position: relative;
  width: 100%;
  max-width: calc(1600px - 2 * var(--gutter));
  margin: 0 auto;
}

.offline-panel {
  position: relative;
  max-width: 660px;
  padding: 56px;
  background: #f1f0eb;
  color: #111;
}

.offline-panel h2 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.offline-panel p {
  margin: 22px 0 32px;
  max-width: 480px;
  font-size: 18px;
  line-height: 26px;
  color: #333;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 20px 28px;
  background: var(--accent);
  color: #000;
  font-weight: 500;
  font-size: 17px;
  text-decoration: none;
  transition: filter 0.15s ease;
}

.btn-accent:hover {
  filter: brightness(1.08);
}

.btn-accent svg {
  transition: transform 0.15s ease;
}

.btn-accent:hover svg {
  transform: translateX(3px);
}

.offline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Equal halves side by side; full-width stacked when the panel is narrow. */
.offline-actions .btn-accent {
  flex: 1 1 0;
  min-width: 240px;
  justify-content: space-between;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---- latest guides */
.home-guides {
  padding: 120px 0 40px;
}

/* ---- closer */
.closer {
  position: relative;
  padding: 120px 0 150px;
  text-align: center;
}

.closer-line {
  display: block;
  width: 1px;
  height: 84px;
  margin: 0 auto 32px;
  background: rgba(255, 255, 255, 0.6);
}

.closer-kicker {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.32em;
}

.closer-title {
  max-width: 1100px;
  margin: 18px auto 0;
  font-weight: 500;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.02;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.closer-sub {
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 18px;
  line-height: 26px;
  color: var(--muted);
}

.closer-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

/* Same 40px height as the store badges beside it. */
.closer-actions .btn-outline {
  box-sizing: border-box;
  height: 40px;
  padding: 0 24px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--ink);
  color: #000;
}

/* ---- footer */
.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line-strong);
}

.site-foot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.site-foot-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-foot-store img {
  width: auto;
  height: 36px;
}

@media (max-width: 1100px) {
  .setup {
    --phone-w: 280px;
    --bezel: 9px;
    --phone-r: 44px;
  }
  .use-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Two-column feature grid: re-rule for 2 columns (the single column below
   600px has its own). */
@media (min-width: 601px) and (max-width: 1100px) {
  .feature:nth-child(n) {
    border-right: 0;
    border-bottom: 0;
  }
  .feature:nth-child(odd):not(:last-child) {
    border-right: var(--rule);
  }
  .feature:nth-child(-n + 8) {
    border-bottom: var(--rule);
  }
}

@media (max-width: 860px) {
  .setup {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 32px;
  }
  .setup-kicker,
  .setup .ruled,
  .setup-copy,
  .setup-phone {
    grid-column: 1;
    grid-row: auto;
  }
  .setup-kicker {
    margin-bottom: 0;
  }
  .setup-copy {
    margin: 0;
  }
  .setup-phone {
    justify-self: center;
    width: min(280px, 72%);
    margin-top: 8px;
    --bezel: 9px;
    --phone-r: 44px;
  }
  .offline {
    min-height: 0;
    padding: 64px var(--gutter);
  }
  .offline-panel {
    padding: 32px;
  }
}

@media (max-width: 600px) {
  .uses {
    padding-top: 72px;
  }
  .use-cards {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature:nth-child(n) {
    border-right: 0;
    border-bottom: var(--rule);
  }
  .feature:last-child {
    border-bottom: 0;
  }
  .feature {
    padding: 32px 24px;
  }
  .feature h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }
  .feature p {
    font-size: 16px;
    line-height: 1.2;
  }
  .setup,
  .features {
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .ruled {
    font-size: min(40px, 11vw);
  }
  .closer {
    padding: 72px 0 96px;
  }
  .site-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- invite page (/join?code=…) */
.join .join-code {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 32px 0;
}

.join-code-value {
  font-family: var(--mono);
  font-size: 32px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.join .join-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 36px;
}

.join .join-note {
  max-width: 460px;
  margin: 0;
  font-size: 14px;
}

.join .label,
.join p.label {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
}

.join a.btn-accent {
  color: #000;
  text-decoration: none;
}

.join a.btn-outline {
  color: var(--ink);
  text-decoration: none;
}

.join a.btn-outline:hover,
.join a.btn-outline:focus-visible {
  color: #000;
}

/* ---- organisers page (/organisers) */
.org-kicker {
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 12px;
}

.org-actions {
  margin-top: 32px;
}

/* Six-cell grids: only the first row(s) get a bottom rule. */
@media (min-width: 1101px) {
  .feature-grid.six .feature:nth-child(n + 4) {
    border-bottom: 0;
  }
}

@media (min-width: 601px) and (max-width: 1100px) {
  .feature-grid.six .feature:nth-child(n + 5) {
    border-bottom: 0;
  }
}

/* Same 40px height as the outline button beside it. */
.closer-actions .btn-accent {
  box-sizing: border-box;
  height: 40px;
  padding: 0 20px;
  gap: 12px;
  font-size: 15px;
}

/* ---- FAQ (organisers page): sticky heading beside a ruled accordion */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 64px;
  padding: 120px 0;
}

.faq-head {
  position: sticky;
  top: 40px;
  align-self: start;
}

.faq-kicker {
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 12px;
}

.faq-sub {
  margin: 24px 0 0;
  max-width: 360px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--muted);
}

.faq-sub a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-sub a:hover {
  color: var(--accent);
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

.faq-item {
  border-bottom: 1px solid var(--line-strong);
}

.faq-item summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: baseline;
  gap: 16px;
  padding: 28px 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.faq-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.faq-q {
  font-size: 24px;
  line-height: 1.25;
  color: #d9dbd6;
  transition: color 0.15s ease;
}

.faq-item summary:hover .faq-q,
.faq-item[open] .faq-q {
  color: var(--ink);
}

/* Plus that turns into a cross when open. */
.faq-icon {
  position: relative;
  align-self: center;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  margin: -8px 0 0;
  padding: 0 36px 32px 64px;
  max-width: 720px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 960px) {
  .faq {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .faq-head {
    position: static;
  }
}

@media (max-width: 600px) {
  .faq {
    padding: 72px 0;
  }
  .faq-item summary {
    grid-template-columns: 32px minmax(0, 1fr) 20px;
    gap: 12px;
    padding: 22px 0;
  }
  .faq-q {
    font-size: 19px;
  }
  .faq-a {
    padding: 0 0 24px 44px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-icon {
    transition: none;
  }
}

/* ---- inquiry popup (organisers page): light panel like .offline-panel */
html.dialog-open {
  overflow: hidden;
}

.inquiry {
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  overflow: visible;
}

.inquiry::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.inquiry[open] .inquiry-panel {
  animation: inquiry-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes inquiry-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.inquiry-panel {
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 48px;
  background: #f1f0eb;
  box-shadow: var(--shadow);
}

.inquiry-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.inquiry-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.inquiry .label {
  color: #5c5d5b;
}

.inquiry-kicker {
  margin: 0 0 16px;
  font-size: 12px;
}

.inquiry-title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.inquiry-lede {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.4;
  color: #333;
}

.inquiry-lede a,
.inquiry-direct a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inquiry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  margin-top: 32px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field .label em {
  font-style: normal;
  color: #8e908b;
}

.field input,
.field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #c9c7bf;
  border-radius: 0;
  background: #fff;
  color: #111;
  font: 16px/1.4 var(--display);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9a9b96;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

/* Honeypot: off-screen, never seen or tabbed to by people. */
.inquiry-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.inquiry-error {
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: #b3261e;
}

.inquiry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.inquiry-actions .btn-accent {
  border: 0;
  cursor: pointer;
  font-family: var(--display);
}

.inquiry-actions .btn-accent:disabled {
  opacity: 0.6;
  cursor: progress;
}

.inquiry-direct {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: #5c5d5b;
}

.inquiry-done .btn-outline {
  margin-top: 28px;
  border-color: #111;
  color: #111;
  background: transparent;
  cursor: pointer;
}

.inquiry-done .btn-outline:hover {
  background: #111;
  color: #fff;
}

@media (max-width: 600px) {
  .inquiry {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .inquiry-panel {
    max-height: calc(100dvh - 16px);
    padding: 32px 20px 24px;
  }
  .inquiry-grid {
    gap: 14px 12px;
    margin-top: 24px;
  }
  /* Name and email full width; date and players stay side by side. */
  .field-solo {
    grid-column: 1 / -1;
  }
  .field textarea {
    min-height: 100px;
  }
  .inquiry-lede {
    font-size: 16px;
  }
  .inquiry-actions .btn-accent {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inquiry[open] .inquiry-panel {
    animation: none;
  }
}

/* ---- header links (For organisers, Support) beside "Go to app" */
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0 16px 0 auto;
}

.site-nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.48px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-nav a[aria-current='page'] {
  color: var(--accent);
}

/* Phones: the links get their own row under the logo and button. */
@media (max-width: 600px) {
  .site-header {
    flex-wrap: wrap;
  }
  .site-nav {
    order: 3;
    width: 100%;
    gap: 24px;
    margin: 4px 0 0;
  }
}
