/*
  Detector Dynasty: shared styles for every page of detectordynasty.com.

  - Visual identity "Midnight & Brass": a midnight navy brand ground, signal gold
    accents, a parchment light theme and a navy charcoal dark theme. The values
    follow DetectorDynasty.App/Resources/Styles/Colors.xaml and ColorsDark.xaml
    (docs/design/2026-11-11-visual-identity.md).
  - The theme follows the visitor's device (prefers-color-scheme). The header,
    heroes, bands and footer stay midnight in both themes.
  - No web fonts, no third-party assets and no inline styles anywhere in the
    HTML: the Content-Security-Policy in /_headers allows styles from this
    origin only.
*/

:root {
  color-scheme: light dark;

  /* Brand ground and accents: the same in both themes. */
  --midnight: #0b1524;
  --navy: #1c3052;
  --gold: #e4b977;
  --gold-pressed: #d3a45e;
  --on-dark: #f8f1df;
  --on-dark-muted: #c4ccda;
  --rule-on-dark: rgb(228 185 119 / 0.3);
  --bezel: #05090f;

  /* Light theme: parchment. */
  --bg: #f3ead5;
  --bg-alt: #eae0c9;
  --surface: #fffbf2;
  --heading: #121a2a;
  --text: #1d2637;
  --muted: #4a5263;
  --border: #dccfb1;
  --link: #1b2e4b;
  --accent-ink: #7b5510;
  --focus: #005fcc;
  --danger-bg: #a32438;
  --danger-bg-hover: #8e1c30;
  --danger-text: #ffffff;
  --btn-bg: #1b2e4b;
  --btn-bg-hover: #111f36;
  --btn-text: #ffffff;
  --info-rule: #2f6294;

  /* Record colours: steel for hunts, brass for finds, copper for sites. */
  --steel: #2f6294;
  --brass: #a9791c;
  --copper: #b4532a;
  --steel-wash: #e2e9f3;
  --brass-wash: #f5e8c6;
  --copper-wash: #f7e2d7;

  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 72rem;
  --radius: 0.875rem;
  --radius-lg: 1.375rem;
  --shadow: 0 1px 0 rgb(11 21 36 / 0.05), 0 18px 40px -26px rgb(11 21 36 / 0.45);
  --device-shadow: 0 34px 60px -30px rgb(0 0 0 / 0.6);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c121c;
    --bg-alt: #141c29;
    --surface: #1b2535;
    --heading: #f5efe0;
    --text: #e3ded1;
    --muted: #b7bcc7;
    --border: #2c394c;
    --link: #e4b977;
    --accent-ink: #e9c487;
    --focus: #8ccbff;
    --danger-bg: #f49aa6;
    --danger-bg-hover: #ffd3db;
    --danger-text: #0b1524;
    --btn-bg: #e4b977;
    --btn-bg-hover: #f0cc95;
    --btn-text: #0b1524;
    --info-rule: #8db8e8;

    --steel: #8db8e8;
    --brass: #e4b977;
    --copper: #f0976e;
    --steel-wash: #1d2d47;
    --brass-wash: #1d2d47;
    --copper-wash: #1d2d47;

    --shadow: 0 18px 40px -26px rgb(0 0 0 / 0.8);
  }
}

/* ---------- Base ---------- */

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

/* Scripts show and hide elements with the hidden attribute; never let a display
   rule below override it. */
[hidden] {
  display: none !important;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
}

main {
  flex: 1 0 auto;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  color: var(--heading);
  font-family: var(--sans);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

button {
  font: inherit;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: var(--gold);
  color: var(--midnight);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  outline-color: var(--on-dark);
}

/* Brand ground: the header, heroes, bands and footer stay midnight in both themes. */
.site-header,
.hero,
.page-hero,
.band,
.cta-card,
.get-card,
.site-footer {
  --heading: var(--on-dark);
  --link: var(--gold);
  --focus: var(--gold);
  --accent-ink: var(--gold);
  --muted: var(--on-dark-muted);
  color: var(--on-dark);
}

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

.kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  color: var(--accent-ink);
  font: 700 0.875rem/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule-on-dark);
  background: var(--midnight);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  color: var(--on-dark);
  font: 800 1.25rem/1.2 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand__mark {
  flex: none;
  width: 1.9rem;
  height: auto;
  color: var(--gold);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 999px;
  color: var(--on-dark);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  background: rgb(248 241 223 / 0.1);
}

.site-nav a[aria-current="page"] {
  background: rgb(248 241 223 / 0.12);
  box-shadow: inset 0 -2px 0 var(--gold);
}

@media (max-width: 39.99rem) {
  .site-nav {
    width: calc(100% + 0.8rem);
    margin-inline: -0.4rem;
  }

  .site-nav ul {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0;
  }

  .site-nav__more {
    display: none;
  }

  .site-nav a {
    padding: 0 0.4rem;
    font-size: 1rem;
  }
}

/* ---------- Store buttons (switched on in /site.js) ---------- */

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* As written in the page: "Coming soon", not a link, dashed outline. */
.store-btn {
  display: inline-flex;
  flex: 1 1 11rem;
  max-width: 16rem;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.55rem 1.25rem 0.55rem 1rem;
  border: 2px dashed rgb(248 241 223 / 0.55);
  border-radius: 0.9rem;
  color: var(--on-dark);
  line-height: 1.15;
  text-decoration: none;
}

.store-btn__icon {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
}

.store-btn__small {
  display: block;
  color: var(--gold);
  font: 700 0.9375rem/1.3 var(--sans);
}

.store-btn__big {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Once /site.js turns a store on: a real link, filled. */
.store-btn--live {
  border-style: solid;
  border-color: var(--on-dark);
  background: var(--on-dark);
  color: var(--midnight);
}

.store-btn--live .store-btn__small {
  color: var(--navy);
}

.store-btn--live:hover {
  border-color: var(--gold);
  background: var(--gold);
}

.store-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Device frames (for screenshots, when there are some) ---------- */

.device {
  margin: 0;
}

.device img {
  display: block;
  width: 100%;
  height: auto;
  border: 0.65rem solid var(--bezel);
  border-radius: 2.6rem;
  background: var(--bezel);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), var(--device-shadow);
}

.device--phone {
  width: min(18rem, 66vw);
}

.device--tablet {
  width: min(27rem, 100%);
}

.device--tablet img {
  border-width: 0.85rem;
  border-radius: 1.6rem;
}

.device figcaption {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.gallery {
  display: grid;
  grid-auto-columns: min(15rem, 68vw);
  grid-auto-flow: column;
  gap: 1.5rem;
  margin-inline: -1.25rem;
  padding: 0.5rem 1.25rem 1.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.25rem;
}

.gallery .device {
  width: 100%;
  scroll-snap-align: center;
}

.gallery:focus-visible {
  outline-offset: -3px;
}

@media (min-width: 64rem) {
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 13rem));
    justify-content: space-evenly;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
}

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

/* The rings are gradients, not image files. */
.hero {
  overflow: hidden;
  padding-block: clamp(2.25rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem);
  background:
    repeating-radial-gradient(circle at 76% 48%, transparent 0 4.5rem, rgb(248 241 223 / 0.055) 4.5rem calc(4.5rem + 1px)),
    radial-gradient(120% 110% at 76% 42%, var(--navy) 0, var(--midnight) 66%);
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 4.5vw + 1.2rem, 4.75rem);
  letter-spacing: -0.03em;
}

.hero__lede {
  max-width: 34rem;
  margin: 0;
  color: var(--on-dark-muted);
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem);
}

.hero__media {
  position: relative;
  justify-self: center;
  width: min(27rem, 82vw);
}

/* A parchment plate in a brass rim, like the app's medallions. */
.plate {
  margin: 0;
  padding: 0.45rem;
  border-radius: 2rem;
  background: linear-gradient(145deg, #f0cc95, var(--gold) 38%, var(--gold-pressed));
  box-shadow: var(--device-shadow);
}

.plate__face {
  display: block;
  padding: 1.25rem 1rem 0.75rem;
  border-radius: 1.6rem;
  background: radial-gradient(circle at 50% 38%, #fffbf2 0, #f3ead5 62%, #eae0c9 100%);
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
}

.stamp {
  position: absolute;
  top: -1.5rem;
  left: -2.25rem;
  display: grid;
  place-content: center;
  width: 7rem;
  aspect-ratio: 1;
  margin: 0;
  padding: 0.6rem;
  border-radius: 50%;
  background: var(--midnight);
  box-shadow: 0 0 0 3px var(--gold), 0 12px 24px -12px rgb(0 0 0 / 0.7);
  color: var(--gold);
  font: 700 0.875rem/1.25 var(--sans);
  text-align: center;
  transform: rotate(-8deg);
}

@media (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

@media (max-width: 30rem) {
  .stamp {
    left: -0.75rem;
    width: 6rem;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--alt {
  background: var(--bg-alt);
}

.band {
  background: linear-gradient(160deg, var(--navy), var(--midnight) 70%);
}

.section__head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 2.4vw + 1.2rem, 3rem);
}

.section__head p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- The three records ---------- */

.records {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
}

.record {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.record__art {
  display: grid;
  place-items: center;
  padding: 1.75rem;
  background: var(--wash);
  color: var(--tab);
}

.record__art svg {
  width: 4.5rem;
  height: 4.5rem;
}

.record__body {
  flex: 1;
  padding: 1.35rem 1.5rem 1.6rem;
  border-top: 6px solid var(--tab);
}

.record--hunts {
  --tab: var(--steel);
  --label: var(--steel);
  --wash: var(--steel-wash);
}

/* Brass is a graphic colour; the label uses the darker brass ink. */
.record--finds {
  --tab: var(--brass);
  --label: var(--accent-ink);
  --wash: var(--brass-wash);
}

.record--sites {
  --tab: var(--copper);
  --label: var(--copper);
  --wash: var(--copper-wash);
}

.record__label {
  margin: 0 0 0.35rem;
  color: var(--label);
  font: 700 0.875rem/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.record h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.record p:last-child {
  margin: 0;
  color: var(--muted);
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.9rem;
  border-radius: 0.8rem;
  background: var(--midnight);
  color: var(--gold);
}

.feature__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Privacy band ---------- */

.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promise {
  padding: 0.2rem 0 0.2rem 1.15rem;
  border-left: 3px solid var(--gold);
}

.promise h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.promise p {
  margin: 0;
  color: var(--muted);
}

.band__more {
  margin: 2.25rem 0 0;
  font-weight: 700;
}

.band__more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- FAQ ---------- */

.faq-layout {
  display: grid;
  gap: 0.5rem 3rem;
}

@media (min-width: 60rem) {
  .faq-layout {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }
}

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

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

.faq summary {
  position: relative;
  min-height: 44px;
  padding: 1.1rem 2.75rem 1.1rem 0;
  color: var(--heading);
  font-size: 1.1rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  content: "+" / "";
  position: absolute;
  top: 50%;
  right: 0.35rem;
  color: var(--accent-ink);
  font: 400 1.75rem/1 var(--sans);
  transform: translateY(-50%);
}

.faq details[open] summary::after {
  content: "\2212";
  content: "\2212" / "";
}

.faq details p {
  max-width: 42rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

/* ---------- Closing call to action ---------- */

.section--tight {
  padding-top: 0;
}

.cta-card {
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 3rem);
  border-radius: var(--radius-lg);
  background:
    repeating-radial-gradient(circle at 50% 120%, transparent 0 4.5rem, rgb(248 241 223 / 0.05) 4.5rem calc(4.5rem + 1px)),
    radial-gradient(120% 140% at 50% 110%, var(--navy) 0, var(--midnight) 70%);
  text-align: center;
}

.cta-card h1,
.cta-card h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 2.4vw + 1.2rem, 3rem);
}

.cta-card p:not(.kicker) {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.cta-card .kicker,
.cta-card .store-row {
  justify-content: center;
}

.cta-card p.store-note {
  margin-top: 1rem;
  font-size: 1rem;
}

.cta-card p.cta-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.75rem;
  margin: 1.25rem auto 0;
  font-weight: 700;
}

.cta-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Inner pages ---------- */

.page-hero {
  padding-block: clamp(1.75rem, 5vw, 3.25rem) clamp(2.25rem, 5vw, 3.75rem);
  background:
    repeating-radial-gradient(circle at 88% 30%, transparent 0 4.5rem, rgb(248 241 223 / 0.045) 4.5rem calc(4.5rem + 1px)),
    radial-gradient(110% 160% at 88% 20%, var(--navy) 0, var(--midnight) 64%);
}

.page-hero h1 {
  max-width: 44rem;
  margin: 0;
  font-size: clamp(2.1rem, 3vw + 1.2rem, 3.25rem);
}

.page-hero__lede {
  max-width: 42rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.page-hero__meta {
  margin: 0.75rem 0 0;
  color: var(--on-dark);
  font-size: 1.0625rem;
  font-weight: 700;
}

.page-body {
  padding-block: clamp(2.25rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem);
}

.page-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 60rem) {
  .page-layout {
    grid-template-columns: minmax(0, 44rem) minmax(15rem, 19rem);
    justify-content: space-between;
    align-items: start;
  }

  .aside-card {
    position: sticky;
    top: 1.5rem;
  }
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin: 2.4rem 0 0.6rem;
  font-size: 1.65rem;
}

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

.prose p {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.aside-card {
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-top: 6px solid var(--brass);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.aside-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.aside-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.aside-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aside-card li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.aside-card a[aria-current="page"] {
  color: var(--heading);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Panels, buttons and notices (account deletion, watch link, tag) ---------- */

.panel {
  max-width: 44rem;
  padding: clamp(1.4rem, 4vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel > p {
  margin: 0 0 1rem;
}

.panel > h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.45rem;
}

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

.panel > ol,
.panel > ul {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.panel li {
  margin-bottom: 0.5rem;
}

.panel + .panel {
  margin-top: 1.5rem;
}

.signin-slot {
  min-height: 44px;
  margin: 1.5rem 0 0.75rem;
}

.status {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--info-rule);
  border-radius: 0.6rem;
  background: var(--bg-alt);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
}

.btn--primary:hover {
  background: var(--btn-bg-hover);
}

.btn--danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.btn--danger:hover {
  background: var(--danger-bg-hover);
}

.notice {
  display: block;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--brass);
  border-radius: 0.6rem;
  background: var(--bg-alt);
}

.panel__help {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* The code a watch shows, read from the address by /link/link.js. */
.watch-code {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.25rem 1.25rem;
  border: 2px solid var(--brass);
  border-radius: var(--radius);
  background: var(--bg-alt);
  text-align: center;
}

.watch-code__label {
  color: var(--muted);
  font-weight: 600;
}

.watch-code__value {
  color: var(--heading);
  font: 700 clamp(2.25rem, 9vw, 3.25rem)/1.1 var(--mono);
  letter-spacing: 0.12em;
}

/* ---------- Guide ---------- */

.guide-top {
  padding-block: clamp(2rem, 5vw, 3rem) 0.5rem;
}

.contents {
  padding: 1.25rem 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-top: 6px solid var(--brass);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.contents h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.toc {
  margin: 0;
  padding-left: 2.1rem;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 600;
}

@media (min-width: 48rem) {
  .toc {
    columns: 2;
    column-gap: 3rem;
  }

  .toc li {
    break-inside: avoid;
  }
}

.guide-section {
  max-width: 50rem;
  padding-block: clamp(2rem, 5vw, 3.25rem);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 0.5rem;
}

.guide-section:last-of-type {
  border-bottom: 0;
}

.guide-section > h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 2vw + 1.3rem, 2.6rem);
}

.guide-section h3 {
  margin: 2rem 0 0.6rem;
  font-size: 1.5rem;
}

.guide-section p {
  margin: 0 0 1rem;
}

/* A step list beside a screenshot. Without the figure the text takes the full width. */
.step-block {
  display: grid;
  gap: 1.75rem;
  align-items: start;
  margin-top: 1.25rem;
}

.step-block > div > h3:first-child {
  margin-top: 0;
}

@media (min-width: 52rem) {
  .step-block:has(> figure) {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 3rem;
  }
}

.steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 2.5rem;
  margin-bottom: 1rem;
  padding: 0.2rem 0 0 3.25rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
}

.plain {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.plain li {
  margin-bottom: 0.65rem;
}

.terms {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.terms dt {
  color: var(--heading);
  font-weight: 700;
}

.terms dd {
  margin: 0;
}

.note {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-left: 5px solid var(--brass);
  border-radius: 0.6rem;
  background: var(--bg-alt);
}

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

.note h3 {
  margin: 0 0 0.4rem;
  font-size: 1.375rem;
}

.two-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem 2.5rem;
}

.two-lists h3 {
  margin-top: 0.5rem;
}

.to-contents {
  margin: 1.5rem 0 0;
}

.to-contents a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.get-card {
  padding: clamp(1.25rem, 5vw, 2rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--navy), var(--midnight) 70%);
}

.get-card .store-row {
  margin-top: 0;
}

.get-card .store-note {
  margin: 1rem 0 0;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: 3px solid var(--gold);
  background: var(--midnight);
}

.site-footer__inner {
  display: grid;
  gap: 2rem;
  padding-block: 2.25rem 3rem;
}

@media (min-width: 48rem) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.footer-tagline {
  max-width: 26rem;
  margin: 0.75rem 0 1rem;
  color: var(--on-dark-muted);
}

.footer-meta {
  margin: 0;
  color: var(--on-dark-muted);
  font-size: 0.95rem;
}

.footer-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-nav h2 {
  margin: 0 0 0.25rem;
  color: var(--gold);
  font: 700 0.875rem/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-nav ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-dark);
}

/* ---------- Motion and print ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .site-nav a,
  .store-btn,
  .btn {
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }
}

@media print {
  :root {
    color-scheme: light;
    --bg: #fff;
    --bg-alt: #fff;
    --surface: #fff;
    --heading: #000;
    --text: #000;
    --muted: #333;
    --border: #999;
    --link: #000;
    --accent-ink: #000;
  }

  .skip-link,
  .site-nav,
  .store-row,
  .stamp,
  .hero__media,
  .to-contents,
  .footer-nav {
    display: none;
  }

  .site-header,
  .hero,
  .page-hero,
  .band,
  .cta-card,
  .get-card,
  .site-footer {
    --heading: #000;
    --link: #000;
    --muted: #333;
    --accent-ink: #000;
    border-color: #999;
    background: none;
    color: #000;
  }

  .brand,
  .brand__mark,
  .footer-tagline,
  .footer-meta {
    color: #000;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  .steps,
  .note,
  .terms {
    break-inside: avoid;
  }

  .steps li::before {
    border: 1.5pt solid #000;
    background: none;
    color: #000;
  }
}
