/* Full Lock: shared styles for fulllock.club.
   A car magazine look: black masthead, racing red, white story tiles, real photography,
   condensed italic headlines. Every page uses this file. Design rules: site/DESIGN.md.
   The magazine components are at the end, under "magazine". */

/* Self-hosted fonts (SIL Open Font Licence; texts in /fonts/). No requests to Google. */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("/fonts/ibm-plex-sans.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 100 700; font-display: swap; src: url("/fonts/ibm-plex-sans-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }

:root {
  --black: #0d0e10;
  --graphite: #1a1c20;
  --graphite-2: #26292e;
  --red: #d7141c;
  --red-deep: #a90e14;
  --red-ink: #ffffff;
  --paper: #f3f3f1;
  --white: #ffffff;
  --ink: #111316;
  --muted: #5b6168;
  --muted-dark: #a7adb4;
  --rule: #dfdfdc;
  --rule-strong: #9aa0a6;
  --gold: #d9a520;
  --error: #b3221a;
  --error-bg: #fbeceb;
  --ok: #18733f;
  --ok-bg: #e8f4ec;
  --wa-bg: #e9e3d8;
  --wa-in: #ffffff;
  --wa-out: #d9fdd3;

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius: 4px;
  --gutter: 16px;
  --max: 1200px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

a { color: var(--red-deep); text-underline-offset: 2px; }
a:hover { color: var(--red); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 9vw, 5rem); text-transform: uppercase; font-style: italic; line-height: 0.9; }
h2 { font-size: clamp(1.9rem, 5.5vw, 2.8rem); text-transform: uppercase; font-style: italic; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-deep);
  margin: 0 0 0.4em;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }

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

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--red); color: var(--white);
  padding: 10px 14px; font-weight: 600; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

[hidden] { display: none !important; }

/* ---------- masthead ---------- */
.site-header {
  z-index: 50;
  background: var(--black);
  color: var(--white);
  border-bottom: 3px solid var(--red);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 62px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--white); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-style: italic;
  font-size: 1.7rem; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1;
}
.brand:hover { color: var(--white); }
.brand svg { flex-shrink: 0; }
.brand span span {
  font-style: normal; font-size: 0.62rem; letter-spacing: 0.18em; font-weight: 700;
  background: var(--red); color: var(--white); padding: 3px 5px 2px; margin-left: 4px;
  vertical-align: 0.35em; border-radius: 2px;
}
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a {
  color: var(--white); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.site-nav a:not(.btn):hover { color: var(--white); box-shadow: inset 0 -3px 0 var(--red); }
.site-nav .nav-extra { display: none; }
@media (min-width: 900px) { .site-nav .nav-extra { display: inline; } }

/* the red strip under the masthead */
.ticker { background: var(--graphite); color: var(--muted-dark); font-size: 0.85rem; border-bottom: 1px solid #000; }
.ticker .wrap { display: flex; gap: 8px 18px; flex-wrap: wrap; padding-top: 7px; padding-bottom: 7px; }
.ticker b { color: var(--white); font-weight: 600; }
.ticker .live { color: var(--white); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.ticker .live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 7px; vertical-align: 0.05em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: var(--radius);
  font: 700 1.05rem/1.1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-deep); color: var(--white); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--graphite-2); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: var(--white); border-color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-small { min-height: 44px; padding: 8px 14px; font-size: 0.98rem; }
/* Focus ring that shows on red buttons and on both light and dark backgrounds: white ring, black halo. */
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 7px var(--black); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.65; cursor: progress; }
.btn-block { width: 100%; }

/* ---------- hero (photo) ---------- */
.hero {
  position: relative; isolation: isolate;
  background: var(--black) center / cover no-repeat;
  color: var(--white);
  min-height: min(78vh, 680px);
  display: flex; align-items: flex-end;
  padding: 120px 0 44px;
  overflow: hidden;
}
.hero-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; }
/* On a phone the frame is tall and narrow: keep the car in it, not the buildings. */
@media (max-width: 619px) { .hero-photo { object-position: 74% 70%; } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 35%, rgba(0,0,0,0.88) 100%),
              linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 60%);
}
.hero .wrap { position: relative; }
.hero .eyebrow { color: var(--white); }
.hero .eyebrow::before { content: ""; display: inline-block; width: 28px; height: 4px; background: var(--red); margin-right: 10px; vertical-align: 0.25em; }
.hero h1 { max-width: 13em; margin-bottom: 0.25em; text-shadow: 0 2px 24px rgba(0,0,0,0.35); }
/* A brighter red than the buttons, with a shadow, so it holds up over the light trails in the photo. */
.hero h1 em { color: #ff3a42; font-style: italic; text-shadow: 0 2px 18px rgba(0,0,0,0.75), 0 0 2px rgba(0,0,0,0.6); }
.hero .lede {
  font-size: clamp(1.05rem, 2.6vw, 1.25rem); max-width: 34em; color: #e8e9ea; margin-bottom: 0.6em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 12px; }
.hero-note { font-size: 0.9rem; color: #c9ccd0 !important; margin: 0; }
.photo-credit {
  position: absolute; right: 10px; bottom: 8px; z-index: 1;
  font-size: 0.7rem; color: rgba(255,255,255,0.75); margin: 0; max-width: 60%; text-align: right;
}
.photo-credit a { color: inherit; }
.countdown-pill {
  display: inline-block; margin-top: 10px;
  padding: 6px 12px; border-left: 4px solid var(--red);
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 1rem; color: var(--white); background: rgba(0,0,0,0.55);
}

/* ---------- section titles, magazine style ---------- */
.section { padding: 52px 0; }
@media (min-width: 900px) { .section { padding: 76px 0; } }
.section-alt { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-dark { background: var(--black); color: var(--white); }
.section-dark .eyebrow { color: #ff5c61; }
.section-dark a { color: var(--white); }
.section-intro { max-width: 42em; color: var(--muted); font-size: 1.06rem; }
.section-dark .section-intro { color: #c9ccd0; }

.rule-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 3px solid var(--ink); padding-bottom: 8px; margin-bottom: 22px;
}
.rule-head h2 { margin: 0; position: relative; padding-left: 16px; }
.rule-head h2::before { content: ""; position: absolute; left: 0; top: 0.08em; bottom: 0.1em; width: 6px; background: var(--red); transform: skewX(-12deg); }
.rule-head a { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.rule-head a:hover { color: var(--red); }
.section-dark .rule-head { border-color: var(--white); }
.section-dark .rule-head a { color: var(--white); }

/* ---------- story tiles (the box) ---------- */
/* Phones: one swipeable row, so eight cars do not make a 3,000 px scroll. Wider screens: a grid. */
.tiles {
  display: grid; gap: 14px; grid-auto-flow: column; grid-auto-columns: 80%;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px; scroll-padding: 0 var(--gutter);
}
.tiles > .tile { scroll-snap-align: start; }
.swipe-hint { font-size: 0.85rem; color: var(--muted); margin: -6px 0 12px; }
@media (min-width: 620px) {
  .tiles { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, 1fr); gap: 18px; overflow: visible; margin: 0; padding: 0; }
  .swipe-hint { display: none; }
}
@media (min-width: 980px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.tile-media { position: relative; aspect-ratio: 16 / 10; background: var(--graphite); overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.tile:hover .tile-media img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .tile:hover .tile-media img { transform: none; } }
.tag {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 8px 3px; border-radius: 2px;
  background: var(--red); color: var(--white);
}
.tile-media .tag { position: absolute; left: 10px; top: 10px; }
.tag-common { background: #5d676d; }
.tag-uncommon { background: #1d7a52; }
.tag-rare { background: #1f4fa8; }
.tag-legendary { background: var(--gold); color: var(--black); }
.tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile-body h3 { font-size: 1.35rem; margin: 0; text-transform: uppercase; }
.tile-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile-stats { list-style: none; padding: 10px 0 0; margin: auto 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.tile-stats li { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tile-stats b { display: block; font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0; color: var(--ink); text-transform: none; line-height: 1.1; }
.tile-media .photo-credit { left: 0; right: 0; bottom: 0; max-width: none; padding: 16px 8px 5px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.85) 55%); font-size: 0.74rem; color: #fff; }

/* lead story: one big tile beside the grid */
.lead-grid { display: grid; gap: 18px; }
@media (min-width: 980px) { .lead-grid { grid-template-columns: 1.35fr 1fr; } }
.lead {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--black); color: var(--white);
  min-height: 360px; display: flex; align-items: flex-end;
}
.lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.9) 100%); }
.lead-body { position: relative; z-index: 1; padding: 22px; }
.lead-body h3 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); text-transform: uppercase; font-style: italic; margin: 8px 0 6px; }
.lead-body p { color: #e1e3e5; margin: 0; max-width: 34em; }
.lead .photo-credit { top: 8px; bottom: auto; }
.side-tiles { display: grid; gap: 18px; }
@media (min-width: 620px) and (max-width: 979px) { .side-tiles { grid-template-columns: 1fr 1fr; } }

/* ---------- the stat card showcase ---------- */
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.card-fan { position: relative; display: flex; justify-content: center; padding: 10px 0 20px; }
.card-fan img { width: 58%; max-width: 300px; border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.card-fan img:first-child { transform: rotate(-6deg) translateX(14%); }
.card-fan img:last-child { transform: rotate(5deg) translateX(-14%) translateY(18px); }
.big-stats { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.big-stats li { background: var(--graphite); padding: 14px 12px; }
.big-stats b { display: block; font-family: var(--font-display); font-style: italic; font-size: 2.4rem; line-height: 1; color: var(--white); }
.big-stats span { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-dark); }

/* ---------- league table mock ---------- */
.league {
  background: var(--white); color: var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 14px 34px rgba(0,0,0,0.25);
}
.league-head { background: var(--red); color: var(--white); padding: 12px 16px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.league-head strong { font-family: var(--font-display); font-size: 1.35rem; text-transform: uppercase; font-style: italic; }
.league-head span { font-size: 0.85rem; opacity: 0.9; align-self: center; }
.league table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.league th, .league td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rule); }
.league th { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.league td:first-child { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; width: 2.5em; }
.league th:last-child { text-align: right; }
.league td:last-child { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.league tr:first-child td:first-child { color: var(--red); }
.league caption { caption-side: bottom; text-align: left; font-size: 0.8rem; color: var(--muted); padding: 10px 14px; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 2px; counter-reset: none; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--white); border: 1px solid var(--rule); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.section-dark .steps li { background: var(--graphite); border-color: #000; }
.step-num { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--red); }
.steps h3 { margin: 4px 0 2px; font-size: 1.35rem; text-transform: uppercase; }
.steps p { margin: 0; color: var(--muted); }
.section-dark .steps p { color: #c9ccd0; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
.cmd {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.88em;
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px; padding: 1px 6px;
  white-space: nowrap;
}
.section-dark .cmd { background: #000; color: var(--white); border-color: #3a3e44; }

/* ---------- sample door (sample page) ---------- */
.sample { display: grid; gap: 24px; margin-top: 28px; }
@media (min-width: 900px) { .sample { grid-template-columns: 1fr 1fr; align-items: start; } }
.door-card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.door-card-head { background: var(--black); color: var(--white); padding: 18px 20px; border-bottom: 4px solid var(--red); }
.door-card-head .eyebrow { color: #ff5c61; margin: 0 0 4px; }
.door-card-head h3 { margin: 0; font-size: 2rem; text-transform: uppercase; font-style: italic; }
.door-card-head p { margin: 2px 0 0; color: #d0d3d6; font-style: italic; }
.door-card-body { padding: 20px; }
.door-card-body .fact { background: var(--paper); border-left: 4px solid var(--red); padding: 12px 14px; }
.quiz { margin-top: 16px; }
.quiz p { font-weight: 600; margin-bottom: 8px; }
.quiz ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.quiz li { border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 10px 14px; background: var(--white); }
.quiz details { margin-top: 12px; }
.quiz summary { cursor: pointer; color: var(--red-deep); font-weight: 600; }

/* ---------- lists of features ---------- */
.ticks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 0.25em;
  width: 7px; height: 13px; border: solid var(--red); border-width: 0 3px 3px 0; transform: rotate(45deg);
}

.features { display: grid; gap: 22px; margin-top: 28px; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { border-top: 4px solid var(--ink); padding-top: 12px; }
.feature h3 { font-size: 1.35rem; margin-bottom: 4px; text-transform: uppercase; }
.feature p { color: var(--muted); margin: 0; }
.section-dark .feature { border-color: var(--red); }
.section-dark .feature p { color: #c9ccd0; }

/* ---------- products ---------- */
.products { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 900px) { .products { grid-template-columns: 1fr 1fr; } }
.product { background: var(--white); border: 1px solid var(--rule); border-top: 5px solid var(--ink); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.product-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.product h3 { font-size: 1.9rem; text-transform: uppercase; font-style: italic; margin: 0; }
.price { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--red); }
.price small { display: block; font-family: var(--font-body); font-style: normal; font-weight: 400; font-size: 0.8rem; color: var(--muted); text-align: right; margin-top: 4px; }
.product .ticks { margin-top: 16px; }
.product form { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); }
.product-closed { margin-top: auto; padding: 14px; background: var(--paper); border-radius: var(--radius); }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; font-size: 0.88rem; color: var(--muted); margin: -2px 0 6px; font-weight: 400; }
.section-dark .field .hint { color: var(--muted-dark); }
input[type="text"], input[type="email"], input[type="number"], textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
  font: 400 1rem/1.4 var(--font-body);
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 1px; border-color: var(--ink); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-error { display: block; color: var(--error); font-weight: 600; font-size: 0.92rem; margin-top: 6px; }
.section-dark .field-error { color: #ffc2bd; }
.section-dark input[aria-invalid="true"] { border-color: #ffb3a6; }

.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.qty button { width: 48px; min-height: 48px; border: 0; background: var(--paper); color: var(--ink); font: 700 1.4rem/1 var(--font-body); cursor: pointer; }
.qty button:hover { background: var(--rule); }
.qty input { width: 64px; border: 0; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); border-radius: 0; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.total { font-weight: 600; }

.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--red); }
.check label { font-weight: 400; margin: 0; font-size: 0.94rem; }

.counter { font-size: 0.85rem; color: var(--muted); display: block; text-align: right; margin-top: 4px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 12px; }
.form-status:empty { display: none; }
.notice { padding: 12px 14px; border-radius: var(--radius); border: 1px solid; font-size: 0.95rem; }
.notice-error { background: var(--error-bg); border-color: #e5b4ae; color: #5e140c; }
.notice-ok { background: var(--ok-bg); border-color: #a9cdb6; color: #0d3d22; }
.notice-info { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.notice a { color: inherit; font-weight: 600; }

/* friend link banner (shown by app.js) */
.ref-banner { background: var(--red); color: var(--white); }
.ref-banner[hidden] { display: none; }
.ref-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.ref-banner p { margin: 0; font-weight: 600; }
.ref-banner .code { font-family: var(--font-mono); font-weight: 700; }
.small { font-size: 0.88rem; color: var(--muted); }
.section-dark .small { color: var(--muted-dark); }

.inline-form { display: grid; gap: 0 16px; }
@media (min-width: 700px) { .inline-form { grid-template-columns: 1fr 1fr; } .inline-form .span-2 { grid-column: 1 / -1; } }

.list-box { margin-top: 28px; background: var(--white); border: 1px solid var(--rule); border-left: 6px solid var(--red); border-radius: var(--radius); padding: 22px; }
.list-box h3 { margin-bottom: 4px; text-transform: uppercase; }

/* ---------- dates ---------- */
.dates { list-style: none; padding: 0; margin: 28px 0 0; display: grid; border-top: 1px solid #33373d; }
.dates li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid #33373d; }
@media (min-width: 700px) { .dates li { grid-template-columns: 11rem 1fr; } }
.dates time, .dates .when { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.35rem; color: #ff5c61; line-height: 1.2; text-transform: uppercase; }
.draw-line { margin-top: 24px; font-size: 1.05rem; }

/* ---------- business ---------- */
.biz { display: grid; gap: 28px; margin-top: 8px; }
@media (min-width: 900px) { .biz { grid-template-columns: 1fr 1fr; align-items: start; } }
.biz-form { background: var(--black); color: var(--white); border-top: 5px solid var(--red); border-radius: var(--radius); padding: 22px; }
.biz-form h3 { color: var(--white); text-transform: uppercase; }
.biz-form a { color: var(--white); }
.biz-form .small, .biz-form .hint { color: var(--muted-dark); }
.biz-form .field-error { color: #ffc2bd; }
.biz-form input[aria-invalid="true"] { border-color: #ffb3a6; }
.pricing { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.pricing li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--rule-strong); padding-bottom: 8px; }
.pricing strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq { margin-top: 24px; border-top: 3px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; position: relative; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 700 1.5rem/1 var(--font-body); color: var(--red); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--red-deep); }
.faq .answer { padding: 0 0 16px; color: var(--ink); max-width: 46em; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--black); color: #c3c7cc; padding: 44px 0 28px; font-size: 0.94rem; border-top: 4px solid var(--red); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: #ff5c61; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h2 { font-size: 1.15rem; color: var(--white); margin-bottom: 8px; letter-spacing: 0.08em; font-style: normal; }
.footer-grid .footer-brand { font-size: 1.9rem; font-style: italic; letter-spacing: 0.02em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid #2b2f34; display: grid; gap: 4px; font-size: 0.85rem; color: #9aa0a6; }
.footer-legal strong { color: var(--white); }

/* ---------- simple pages ---------- */
.page-head { background: var(--black); color: var(--white); padding: 44px 0 34px; border-bottom: 4px solid var(--red); }
.page-head h1 { font-size: clamp(2.3rem, 8vw, 3.8rem); margin: 0; }
.page-head p { color: #c9ccd0; margin: 10px 0 0; }
.prose { padding: 32px 0 64px; }
.prose h2 { font-size: 1.8rem; margin-top: 1.6em; text-transform: none; font-style: normal; }
.prose h3 { font-size: 1.3rem; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--rule); }
.prose th { background: var(--white); }
.ph { background: #fff3d6; border: 1px dashed #c58a1a; border-radius: 3px; padding: 0 4px; font-family: var(--font-mono); font-size: 0.88em; }

.legal-banner { background: var(--gold); color: var(--black); text-align: center; padding: 12px var(--gutter); font-weight: 700; letter-spacing: 0.02em; }

.status-card { background: var(--white); border: 1px solid var(--rule); border-top: 5px solid var(--red); border-radius: var(--radius); padding: 24px; margin: 32px 0; }
.status-card h2 { text-transform: none; font-style: normal; font-size: 1.8rem; }

/* ---------- WhatsApp mock (sample page) ---------- */
.phone { max-width: 420px; margin: 0 auto; border-radius: 22px; overflow: hidden; border: 8px solid var(--black); background: var(--wa-bg); box-shadow: 0 14px 40px rgba(0,0,0,0.25); }
.phone-bar { background: var(--black); color: var(--white); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.phone-bar .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--red); display: grid; place-items: center; flex-shrink: 0; }
.phone-bar strong { display: block; line-height: 1.2; }
.phone-bar span { font-size: 0.8rem; color: var(--muted-dark); }
.chat { list-style: none; margin: 0; padding: 14px 10px 18px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; padding: 8px 10px 6px; border-radius: 8px; font-size: 0.93rem; line-height: 1.42; box-shadow: 0 1px 1px rgba(0,0,0,0.08); white-space: pre-line; }
.msg.in { background: var(--wa-in); align-self: flex-start; border-top-left-radius: 2px; }
.msg.out { background: var(--wa-out); align-self: flex-end; border-top-right-radius: 2px; }
.msg .meta { display: block; text-align: right; font-size: 0.72rem; color: #667781; margin-top: 2px; }
.msg-buttons { align-self: flex-start; max-width: 86%; width: 86%; display: grid; gap: 4px; margin-top: -4px; }
.msg-buttons span { display: block; text-align: center; background: var(--wa-in); color: #027eb5; padding: 8px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; box-shadow: 0 1px 1px rgba(0,0,0,0.08); }
.chat-day { align-self: center; background: #fff8e1; color: #54656f; font-size: 0.78rem; padding: 4px 10px; border-radius: 6px; }

/* legacy door grid (404 page) */
.door-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 360px; margin: 0 auto; padding: 14px; background: var(--black); list-style: none; border-radius: var(--radius); }
.door-grid li { aspect-ratio: 1; display: grid; place-items: center; background: var(--graphite-2); color: #d0d3d6; font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: clamp(1.1rem, 5vw, 1.5rem); background-image: repeating-linear-gradient(180deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 7px); }
.door-grid li.open { background: var(--white); color: var(--ink); }
.door-grid li.finale { background: var(--red); color: var(--white); background-image: none; }
.door-caption { text-align: center; color: var(--muted-dark); font-size: 0.85rem; margin-top: 10px; }

.center { text-align: center; }
.mt { margin-top: 24px; }

/* =====================================================================================
   magazine: masthead navigation, cards, article page, front page, pillar pages.
   Rules in site/DESIGN.md. No uppercase headlines here; kickers and labels only.
   ===================================================================================== */

/* ---------- masthead navigation (every page) ---------- */
.site-header { position: relative; }
.site-header .wrap { min-height: 58px; }
.m-nav { display: none; align-items: center; gap: 22px; }
.m-nav a, .m-nav .nav-soon, .m-menu nav a, .m-menu nav .nav-soon {
  color: var(--white); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: 0.04em;
}
.m-nav a { padding: 18px 0 15px; border-bottom: 3px solid transparent; }
.m-nav a:hover, .m-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--red); }
.m-nav .nav-advent { color: #ff7a7f; }
.m-nav .nav-soon, .m-menu .nav-soon { color: var(--muted-dark); cursor: default; }
.nav-soon small { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; border: 1px solid #5a6068; border-radius: 2px; padding: 1px 4px; margin-left: 2px; vertical-align: 0.15em; }
.m-menu { position: relative; }
.m-menu summary {
  list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: 9px;
  padding: 0 12px; border: 2px solid #3a3e44; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white);
}
.m-menu summary::-webkit-details-marker { display: none; }
.m-menu summary::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
.m-menu[open] summary { border-color: var(--red); }
.m-menu summary:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.m-menu nav {
  position: absolute; right: 0; top: calc(100% + 9px); z-index: 60; width: min(86vw, 320px);
  background: var(--black); border: 1px solid #2b2f34; border-top: 3px solid var(--red);
  display: grid; padding: 6px 0;
}
.m-menu nav a, .m-menu nav .nav-soon { display: flex; align-items: center; min-height: 48px; padding: 0 18px; border-bottom: 1px solid #1f2226; font-size: 1.25rem; }
.m-menu nav a:hover, .m-menu nav a[aria-current="page"] { background: var(--graphite); color: var(--white); box-shadow: inset 4px 0 0 var(--red); }
.m-menu nav .nav-advent { color: #ff7a7f; }
@media (min-width: 1024px) { .m-nav { display: flex; } .m-menu { display: none; } }

/* Ticker: the red strip under the masthead */
.m-ticker { background: var(--red); color: var(--white); border-bottom: 0; font-size: 0.86rem; }
.m-ticker .wrap { gap: 4px 16px; padding-top: 6px; padding-bottom: 6px; }
.m-ticker b { color: var(--white); }
.m-ticker a { color: var(--white); font-weight: 600; }
.m-ticker .live { font-size: 0.82rem; }
.m-ticker .live::before { background: var(--white); }
@media (max-width: 1023px) {
  .m-ticker .wrap { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .m-ticker .wrap::-webkit-scrollbar { display: none; }
}
.m-ticker a:focus-visible { outline-color: var(--white); }

/* The Advent shop's own section links, under the masthead on its pages */
.shop-nav { background: var(--graphite); border-bottom: 1px solid #000; position: sticky; top: 0; z-index: 40; }
.shop-nav .wrap { display: flex; align-items: center; gap: 18px; overflow-x: auto; scrollbar-width: none; min-height: 52px; }
.shop-nav .wrap::-webkit-scrollbar { display: none; }
.shop-nav a:not(.btn) { color: var(--white); text-decoration: none; white-space: nowrap; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.05em; font-size: 1rem; padding: 12px 0; }
.shop-nav a:not(.btn):hover { box-shadow: inset 0 -3px 0 var(--red); }
.shop-nav .btn { margin-left: auto; white-space: nowrap; }

/* ---------- magazine pages: base ---------- */
.m-page main h1, .m-page main h2, .m-page main h3 { text-transform: none; }
.m-kicker {
  font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--red); text-decoration: none;
}
a.m-kicker { color: var(--red-deep); }
a.m-kicker:hover { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; }
.m-read, .m-meta time, .m-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0; }
.m-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.m-meta-top { display: flex; gap: 10px; align-items: center; margin: 0 0 6px; }
.m-sample-tag { font-family: var(--font-mono); font-size: 0.68rem; border: 1px solid currentColor; color: var(--muted); padding: 0 5px; border-radius: 2px; }
.m-empty { color: var(--muted); padding: 24px 0; }

/* cards: the whole card is one link; headlines underline in red on hover and focus */
.m-cardlink { display: block; color: inherit; text-decoration: none; height: 100%; }
.m-cardlink:hover, .m-cardlink:focus-visible { color: inherit; }
.m-cardlink:hover .m-headline, .m-cardlink:focus-visible .m-headline { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.m-cardlink:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.m-headline { font-family: var(--font-display); font-weight: 700; line-height: 1.04; letter-spacing: 0; margin: 0 0 8px; color: var(--ink); }

.m-media { position: relative; overflow: hidden; background: var(--graphite); }
.m-media-169 { aspect-ratio: 16 / 9; }
.m-media-32 { aspect-ratio: 3 / 2; }
.m-media picture, .m-media img { width: 100%; height: 100%; }
.m-media img { object-fit: cover; }
.m-credit {
  position: absolute; right: 0; bottom: 0; max-width: 100%;
  background: rgba(13, 14, 16, 0.8); color: #e6e7e8; font-size: 0.66rem; line-height: 1.3; padding: 3px 6px;
}

/* typographic card: no photo. The red slash is a hard-edged stripe, not a gradient fade. */
.m-type {
  position: absolute; inset: 0; background: var(--black); color: var(--white);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 16px 18px;
  background-image: linear-gradient(115deg, transparent 0 62%, var(--red) 62% 64%, transparent 64%);
}
.m-type-kicker { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: #ff7a7f; }
.m-type-head { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: clamp(1.5rem, 6vw, 2.4rem); line-height: 0.95; max-width: 14em; }

.m-card { background: var(--white); border-top: 4px solid var(--ink); height: 100%; }
.m-card-body { padding: 12px 14px 16px; }
.m-card .m-headline { font-size: clamp(1.3rem, 4.6vw, 1.5rem); }
.m-card .m-type-head { font-size: clamp(1.4rem, 5vw, 1.9rem); }

.m-lead { background: var(--white); border-top: 5px solid var(--red); }
.m-lead-body { padding: 14px 16px 18px; }
.m-lead .m-headline { font-size: clamp(2.2rem, 8.4vw, 3.3rem); font-style: italic; line-height: 0.96; margin-bottom: 10px; }
.m-standfirst-sm { font-size: 1.06rem; line-height: 1.45; color: #2b3036; margin: 0 0 10px; max-width: 40em; }

.m-compact .m-cardlink { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.m-thumb { width: 96px; height: 96px; overflow: hidden; background: var(--graphite); }
.m-thumb picture, .m-thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-thumb-type { background: var(--black); display: grid; place-items: end start; padding: 8px; background-image: linear-gradient(115deg, transparent 0 60%, var(--red) 60% 64%, transparent 64%); }
.m-thumb-type span { color: var(--white); font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.15rem; line-height: 1; }
.m-compact .m-headline { font-size: 1.18rem; margin-bottom: 4px; }
.m-compact .m-meta-top { margin-bottom: 3px; }

.m-rule { margin-bottom: 16px; padding-bottom: 6px; }
.m-rule h2 { font-size: clamp(1.7rem, 6vw, 2.2rem); font-style: italic; }

.m-grid3 { display: grid; gap: 18px; }
@media (min-width: 700px) { .m-grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .m-grid3 { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

/* ---------- front page ---------- */
.m-top { padding-top: 16px; }
.m-top-grid { display: grid; gap: 4px; }
.m-side-label { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; font-size: 0.86rem; margin: 14px 0 0; padding-bottom: 6px; border-bottom: 3px solid var(--ink); }
@media (max-width: 699px) { .m-top { padding: 0; } .m-top-side { padding: 0 var(--gutter); } }
@media (min-width: 1024px) {
  .m-top { padding-top: 28px; }
  .m-top-grid { grid-template-columns: repeat(12, 1fr); gap: 28px; }
  .m-top-lead { grid-column: span 8; }
  .m-top-side { grid-column: span 4; }
  .m-side-label { margin-top: 0; }
  .m-lead-body { padding: 18px 22px 22px; }
}

.m-advent { background: var(--red); color: var(--white); margin: 36px 0 0; padding: 30px 0; }
.m-advent-grid { display: grid; gap: 20px; align-items: center; grid-template-columns: 110px 1fr; }
.m-advent-card img { width: 110px; height: auto; border: 3px solid var(--white); transform: rotate(-4deg); }
.m-advent h2 { font-size: clamp(2.1rem, 8vw, 3.4rem); font-style: italic; line-height: 0.95; margin: 0 0 8px; color: var(--white); }
.m-advent p { margin: 0 0 10px; max-width: 38em; }
.m-advent-kicker { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; font-size: 0.86rem; }
.m-advent-price { font-family: var(--font-mono); font-size: 0.82rem; }
.m-advent .btn { margin-top: 6px; }
@media (max-width: 519px) { .m-advent-grid { grid-template-columns: 1fr; } .m-advent-card { display: none; } }
@media (min-width: 900px) { .m-advent-grid { grid-template-columns: 200px 1fr; gap: 40px; } .m-advent-card img { width: 200px; } }

.m-latest-wrap { padding-top: 36px; padding-bottom: 12px; }
.m-latest-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .m-latest-grid { grid-template-columns: repeat(12, 1fr); gap: 28px; }
  .m-latest-grid > div { grid-column: span 8; }
  .m-latest-grid > .m-rail { grid-column: span 4; }
  .m-grid-latest { grid-template-columns: repeat(2, 1fr); }
}

.m-whatson { background: var(--black); color: var(--white); padding: 18px 18px 14px; border-top: 5px solid var(--red); }
.m-whatson-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px solid #33373d; padding-bottom: 8px; margin-bottom: 4px; }
.m-whatson-head h2, .m-whatson-head h3 { margin: 0; color: var(--white); font-size: 1.8rem; font-style: italic; }
.m-whatson-head a { color: var(--white); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; font-size: 0.9rem; min-height: 44px; display: inline-flex; align-items: center; }
.m-whatson-head a:hover { color: #ff7a7f; }
.m-whatson ol { list-style: none; margin: 0; padding: 0; }
.m-whatson li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid #2b2f34; }
.m-whatson time { font-family: var(--font-mono); font-size: 0.8rem; color: #ff8a8e; }
.m-wo-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.1; }
.m-wo-name a { color: var(--white); text-decoration-color: var(--red); }
.m-wo-name a:hover { color: var(--white); text-decoration-thickness: 3px; }
.m-ext { font-family: var(--font-body); font-weight: 400; font-size: 0.75rem; color: var(--muted-dark); }
.m-wo-venue { font-size: 0.88rem; color: #c3c7cc; }
.m-wo-until { font-family: var(--font-mono); font-size: 0.75rem; color: var(--white); background: #2b2f34; padding: 1px 5px; border-radius: 2px; margin-left: 4px; }
.m-wo-note { font-size: 0.78rem; color: var(--muted-dark); margin: 10px 0 0; }
.m-whatson .small { color: var(--muted-dark); }

.m-row { padding-top: 32px; }
.m-row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 12px; scroll-padding: 0 var(--gutter);
}
.m-row-scroll > * { scroll-snap-align: start; }
@media (min-width: 700px) { .m-row-scroll { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; gap: 22px; } }
.m-page-front main { padding-bottom: 48px; }

/* ---------- pillar and simple magazine pages ---------- */
.m-section-head { background: var(--black); color: var(--white); padding: 30px 0 26px; border-bottom: 5px solid var(--red); }
.m-section-head h1 { font-size: clamp(2.8rem, 12vw, 5rem); font-style: italic; line-height: 0.92; margin: 0 0 10px; color: var(--white); }
.m-section-head p { color: #c9ccd0; max-width: 40em; margin: 0; font-size: 1.05rem; }
.m-section-head a { color: var(--white); }
.m-section-head .m-section-kicker { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; font-size: 0.86rem; color: #ff8a8e; margin: 0 0 6px; }
.m-section-body { padding-top: 24px; padding-bottom: 56px; display: grid; gap: 26px; }
@media (min-width: 1024px) { .m-section-lead .m-lead .m-cardlink { display: grid; grid-template-columns: 7fr 5fr; } .m-section-lead .m-lead-body { padding: 24px 26px; } }
.m-pager ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0 0; }
.m-pager a, .m-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 2px solid var(--ink); font-family: var(--font-mono); text-decoration: none; color: var(--ink); }
.m-pager span[aria-current] { background: var(--ink); color: var(--white); }
.m-pager a:hover { background: var(--red); border-color: var(--red); color: var(--white); }

.m-about { padding-top: 28px; padding-bottom: 56px; display: grid; gap: 34px; max-width: 900px; }
.m-about-intro { display: grid; gap: 22px; }
.m-about-intro img { width: 100%; max-width: 420px; height: auto; border-radius: var(--radius); }
@media (min-width: 700px) { .m-about-intro { grid-template-columns: 320px 1fr; align-items: start; } .m-about-intro img { width: 320px; } }
.m-avatar { border-radius: 50%; object-fit: cover; }
.m-steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 2px; }
.m-steps li { counter-increment: step; background: var(--white); border-left: 5px solid var(--ink); padding: 14px 16px 14px 60px; position: relative; font-size: 1.04rem; }
.m-steps li::before { content: counter(step); position: absolute; left: 16px; top: 8px; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 2.1rem; color: var(--red); }
.m-h2 { font-size: 1.9rem; font-style: italic; margin-top: 1.2em; }
.m-about p { max-width: 65ch; font-size: 1.06rem; }

.m-corr-list { padding-top: 24px; padding-bottom: 56px; max-width: 820px; }
.m-corr-list ul { list-style: none; padding: 0; margin: 0; }
.m-corr-list li { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.m-corr-list .m-headline { font-size: 1.6rem; }
.m-corr-list .m-headline a { color: var(--ink); text-decoration-color: var(--red); }
.m-corr-list time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

.m-404 { padding-top: 24px; padding-bottom: 56px; display: grid; gap: 24px; }
.m-404-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.m-404-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.m-404-links a:hover { background: var(--ink); color: var(--white); }

/* ---------- article page ---------- */
.m-sample { background: #fff3d6; border-bottom: 1px solid #c58a1a; color: #4a3200; font-size: 0.86rem; padding: 6px 0; }
.m-article { background: var(--white); padding-bottom: 32px; }
.m-article-head { padding-top: 18px; padding-bottom: 14px; }
.m-article-head > * { max-width: 900px; }
.m-kicker-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 8px; }
.m-chip { display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 0.8rem; background: var(--black); color: var(--white); padding: 3px 8px; border-radius: 2px; }
.m-chip span { color: #ff8a8e; }
.m-title { font-size: clamp(2.3rem, 9.6vw, 4.1rem); font-style: italic; line-height: 0.95; letter-spacing: -0.005em; margin: 0 0 12px; color: var(--ink); }
.m-standfirst { font-size: clamp(1.14rem, 3.6vw, 1.4rem); line-height: 1.4; color: #2b3036; margin: 0 0 14px; max-width: 38em; }
.m-byline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 10px; }
.m-avatar { width: 44px; height: 44px; flex-shrink: 0; }
.m-avatar-initials { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--red); color: var(--white); font: italic 700 1.05rem/1 var(--font-display); letter-spacing: 0.02em; }
.m-byline-text { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); align-items: baseline; flex: 1; min-width: 200px; }
.m-by { font-family: var(--font-body); font-size: 0.95rem; color: var(--ink); width: 100%; }
.m-by a { color: var(--ink); font-weight: 600; text-decoration-color: var(--red); }
.m-share { min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); font: 700 0.95rem/1 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; border-radius: var(--radius); }
.m-share:hover { background: var(--ink); color: var(--white); }
.m-disclosure { margin: 8px 0 0; font-size: 0.8rem; line-height: 1.4; }
.m-disclosure a { color: var(--muted); text-decoration-color: var(--rule-strong); }
.m-disclosure a:hover { color: var(--red-deep); }

.m-hero { margin: 0 auto; max-width: 1200px; }
.m-hero-media { aspect-ratio: 16 / 9; background: var(--graphite); overflow: hidden; }
.m-hero-media picture, .m-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.m-hero figcaption { font-size: 0.74rem; color: var(--muted); padding-top: 5px; padding-bottom: 2px; }
.m-hero figcaption a { color: var(--muted); }
.m-hero-type { background: var(--black); color: var(--white); padding: 34px 0 30px; background-image: linear-gradient(115deg, transparent 0 70%, var(--red) 70% 71.5%, transparent 71.5%); }
.m-hero-type .wrap { display: grid; gap: 6px; }
.m-hero-type .m-type-head { font-size: clamp(2rem, 9vw, 3.6rem); }

.m-article-grid { max-width: 900px; padding-top: 4px; }
.m-verdict { background: var(--black); color: var(--white); padding: 14px 16px 16px; margin: 10px 0 22px; border-left: 6px solid var(--red); }
.m-verdict-label { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; font-size: 0.82rem; color: #ff8a8e; margin: 0 0 4px; }
.m-verdict-text { font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: clamp(1.5rem, 5.6vw, 2.1rem); line-height: 1.04; margin: 0; }
.m-note { border: 2px solid var(--ink); padding: 12px 14px; margin: 0 0 22px; background: var(--paper); }
.m-note-label { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; font-size: 0.8rem; margin: 0 0 4px; }
.m-note p:last-child { margin: 0; }

.m-body { font-size: 1.0625rem; line-height: 1.62; }
@media (min-width: 700px) { .m-body { font-size: 1.125rem; } }
.m-body p { max-width: 65ch; }
.m-body h2 { font-size: 1.75rem; font-style: italic; line-height: 1.04; margin: 1.3em 0 0.4em; color: var(--ink); }
.m-body a { color: var(--red-deep); }

.m-specs { margin: 6px 0 24px; }
.m-specs table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.35; }
.m-specs caption { caption-side: top; text-align: left; background: var(--black); color: var(--white); padding: 9px 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; border-top: 4px solid var(--red); }
.m-specs th, .m-specs td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.m-specs th { font-weight: 500; color: var(--muted); width: 42%; }
.m-specs td { color: var(--ink); }
.m-specs tr:nth-child(even) th, .m-specs tr:nth-child(even) td { background: #f0f0ee; }
@media (min-width: 1024px) {
  .m-article-grid { max-width: var(--max); }
  .m-article-main { max-width: 760px; }
  .m-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 40px; width: calc(100% + 340px); }
  .m-body > * { grid-column: 1; }
  .m-body > .m-specs { grid-column: 2; grid-row: 1 / span 40; align-self: start; margin-top: 0.4em; }
}

.m-corrections { border-top: 3px solid var(--ink); padding-top: 10px; margin-top: 26px; }
.m-corrections h2 { font-size: 1.5rem; font-style: italic; margin-bottom: 6px; }
.m-corrections ul { padding-left: 1.1em; margin: 0; }
.m-corrections time { font-family: var(--font-mono); font-size: 0.85rem; }
.m-sources { margin-top: 22px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.m-sources summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.m-sources summary:hover { color: var(--red-deep); }
.m-sources ul { margin: 0 0 14px; padding-left: 1.1em; display: grid; gap: 6px; }
.m-kind { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); border: 1px solid var(--rule-strong); padding: 0 4px; border-radius: 2px; }
.m-footerline { font-size: 0.85rem; color: var(--muted); margin-top: 18px; }
.m-more { padding: 32px 0 48px; }
.m-card .m-headline, .m-compact .m-headline { font-style: normal; }
@media (min-width: 1024px) { .m-hero-media { aspect-ratio: 21 / 9; } }

/* Deals (/deals/): Sienna's Deal of the Day. Every card is labelled Ad. */
.m-deals-note p { margin: 0 0 6px; } .m-deals-note p:last-child { margin: 0; }
.m-deal-by { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); margin: 0 0 14px; }
.m-deal { border-top: 4px solid var(--ink); padding: 12px 0 18px; }
.m-deal-lead { border-top-color: var(--red); margin-bottom: 22px; }
.m-deal-lead .m-headline { font-size: clamp(1.7rem, 6vw, 2.5rem); }
.m-deal-top { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; }
.m-deal-ad { font: 700 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1.5px solid var(--ink); padding: 3px 6px; border-radius: 2px; }
.m-deal-cat { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.8rem; color: var(--red); }
.m-deal-price { margin: 6px 0; } .m-deal-price b { font-family: var(--font-display); font-size: 1.6rem; font-style: italic; }
.m-deal-price span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.m-deal-verdict { margin: 0 0 8px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.m-deal-call { background: var(--black); color: var(--white); font: italic 700 1.05rem/1 var(--font-display); padding: 6px 10px; border-left: 5px solid var(--red); }
.m-deal-haggle { font-family: var(--font-mono); font-size: 0.85rem; }
.m-deal-catch { background: var(--paper); border-left: 4px solid var(--red); padding: 8px 12px; }
.m-deal-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 10px 0 0; }
.m-deal-guide { font-weight: 600; text-decoration-color: var(--red); }

/* Presenter video under the standfirst (scripts/magazine/templates.mjs videoBlock) */
.m-video { margin: 4px 0 18px; display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.m-video-frame { width: min(100%, 300px); aspect-ratio: 9 / 16; background: #111; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 22px rgba(0,0,0,.18); }
.m-video-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.m-video figcaption { flex: 1 1 220px; max-width: 30em; font-size: .95rem; color: #2b3036; }
.m-video-by { margin: 0 0 8px; }
.m-video-label { display: inline-block; background: #d7141c; color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; padding: 2px 7px; margin-right: 4px; }
.m-video-transcript summary { cursor: pointer; font-weight: 600; }
.m-video-transcript p { margin: 8px 0 0; line-height: 1.5; }
.m-video-credit { margin: 10px 0 0; font-size: .74rem; color: var(--muted); }
.m-video-credit a { color: var(--muted); }

/* Drawn figures inside an article body, and the series panel (templates.mjs). */
.m-figure { margin: 22px 0 24px; }
.m-figure img { width: 100%; height: auto; display: block; background: #fbf8f1; border: 1px solid var(--rule); }
.m-figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.m-series { border: 2px solid var(--ink); padding: 12px 16px 10px; margin: 0 0 22px; background: var(--white); }
.m-series-head { margin: 0 0 6px; font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.m-series-head span { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-style: italic; text-transform: none; letter-spacing: 0; color: var(--red); margin-right: 6px; }
.m-series ol { margin: 0; padding-left: 1.4em; }
.m-series li { margin: 3px 0; }
.m-series-more { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

/* Section filters (Car Control: Drift, Track, Fast driving). */
.m-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.m-filters a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 2px solid currentColor; border-radius: 999px; font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; text-decoration: none; color: inherit; }
.m-filters a span { font-family: var(--font-mono); font-weight: 400; font-size: .78rem; opacity: .75; }
.m-filters a[aria-current="page"] { background: var(--red); border-color: var(--red); color: #fff; }

/* Video gallery (/videos/). */
.m-vgrid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.m-vcard { background: var(--white); border-top: 4px solid var(--ink); display: flex; flex-direction: column; }
.m-vcard-frame { aspect-ratio: 9 / 16; background: #111; }
.m-vcard-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.m-vcard-body { padding: 12px 14px 14px; }
.m-vcard .m-headline { font-size: 1.3rem; }
.m-vcard .m-headline a { color: inherit; text-decoration: none; }
.m-vcard-meta { margin: 0 0 6px; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.m-vcard-read { font-weight: 700; }

/* Front page bands: today's build, the newsroom, what's on, and the video row. */
.m-band { display: grid; gap: 18px; margin-top: 26px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .m-band { grid-template-columns: 3fr 2fr; } .m-band-events { grid-template-columns: 1fr; } }
.m-today { background: var(--black); color: var(--white); padding: 18px 20px; border-top: 5px solid var(--red); }
.m-today .m-headline { color: var(--white); font-size: clamp(1.8rem, 6vw, 2.4rem); font-style: italic; }
.m-today .m-kicker { color: #ff8a8e; }
.m-today p { margin: 0 0 10px; }
.m-today-best { font-family: var(--font-mono); font-size: .9rem; color: #d9dde1; }
.m-newsroom { display: grid; gap: 10px; align-content: start; }
.m-nr-person { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--white); border-left: 4px solid var(--red); text-decoration: none; color: var(--ink); }
.m-nr-person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.m-nr-person b { display: block; font-family: var(--font-display); font-size: 1.2rem; font-style: italic; }
.m-watch { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.m-watch-item { flex: 0 0 150px; scroll-snap-align: start; text-decoration: none; color: var(--ink); position: relative; display: grid; gap: 4px; }
.m-watch-item img { width: 150px; height: 266px; object-fit: cover; display: block; background: #111; }
.m-watch-play { position: absolute; left: 50%; top: 133px; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(215, 20, 28, .92); }
.m-watch-play::after { content: ""; position: absolute; left: 17px; top: 13px; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.m-watch-title { font-family: var(--font-display); font-weight: 700; line-height: 1.1; }
.m-watch-meta { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }
/* Article: WhatsApp share and the next-read card. */
.m-share-wa { display: inline-flex; align-items: center; text-decoration: none; margin-left: 8px; }
.m-next { margin-top: 26px; padding: 14px 16px; border: 2px solid var(--ink); background: var(--white); }
.m-next .m-kicker { margin: 0 0 8px; }
/* Section rows on the front page: a swipeable strip on phones, three columns on wider screens. */
.m-row-compact { display: grid; gap: 12px; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.m-row-compact > * { scroll-snap-align: start; min-width: 0; }
@media (min-width: 820px) { .m-row-compact { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; gap: 4px 22px; } }
.m-vcard-desc { margin: 0 0 8px; font-size: .95rem; }
