/*
 * OurPactGame design system.
 *
 * Palette and type come from the game's PDFs: dark-brown serif text on a
 * cream-to-blush ground with one muted gold hairline. The PDFs' background
 * image is not used here; the ground is drawn with CSS gradients.
 * Mobile first. No framework, no build step.
 */

@font-face {
  font-family: "OPG Serif";
  src: url("../fonts/dejavu-serif-latin.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+2010-2011, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+20AC, U+2122, U+2190, U+2192, U+2212;
}

@font-face {
  font-family: "OPG Serif";
  src: url("../fonts/dejavu-serif-bold-latin.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+2010-2011, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+20AC, U+2122, U+2190, U+2192, U+2212;
}

:root {
  /* From the PDFs */
  --ink: #2c1810;
  --heading: #4a3728;
  --brown: #5c4033;
  --taupe: #8b7355;
  --gold: #c9a96e;
  /* Paper tones measured from the printed pages */
  --cream: #fbefe4;
  --cream-light: #fdf6ee;
  --blush: #f3dccf;
  --blush-deep: #eecfc2;
  --rose: #e2bbae;
  --paper: #fffaf4;
  /* Derived */
  --taupe-text: #75604a;
  --gold-line: rgba(201, 169, 110, 0.55);
  --dark: #3a2a20;
  --error: #9c3524;
  --shadow: 0 1px 2px rgba(74, 55, 40, 0.07), 0 10px 28px rgba(74, 55, 40, 0.1);
  --shadow-lift: 0 2px 4px rgba(74, 55, 40, 0.08), 0 18px 44px rgba(74, 55, 40, 0.16);
  --radius: 6px;
  --wrap: 1120px;
  --serif: "OPG Serif", "DejaVu Serif", Georgia, "Times New Roman", serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(90% 55% at 12% 0%, rgba(255, 252, 247, 0.95) 0%, rgba(255, 252, 247, 0) 70%),
    radial-gradient(70% 50% at 100% 100%, rgba(226, 187, 174, 0.55) 0%, rgba(226, 187, 174, 0) 70%),
    linear-gradient(165deg, #fbefe4 0%, #f8e9dc 40%, #f3dccf 75%, #eecfc2 100%);
  background-attachment: fixed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

img,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  color: var(--heading);
  font-weight: 700;
  line-height: 1.22;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 6.2vw, 2.6rem);
}

h2 {
  font-size: clamp(1.45rem, 4.6vw, 2.05rem);
}

h3 {
  font-size: 1.08rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: var(--brown);
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 700;
}

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

.narrow {
  width: min(100% - 2.5rem, 760px);
  margin-inline: auto;
}

.center {
  text-align: center;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--heading);
  color: var(--cream);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe-text);
}

.lead {
  font-size: 1.08rem;
  color: var(--heading);
}

.fine {
  font-size: 0.84rem;
  color: var(--taupe-text);
}

/* Something the owner still has to decide or supply. */
mark.tbd {
  padding: 0.05em 0.35em;
  background: #fff1bf;
  color: var(--ink);
  border: 1px dashed #b08a3c;
  border-radius: 3px;
  font-weight: 400;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ------------------------------------------------------------------ */
/* Buttons and chips                                                   */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--heading);
  border-radius: 4px;
  background: var(--heading);
  color: var(--cream-light);
  font: inherit;
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 0 rgba(44, 24, 16, 0.25);
}

.btn:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-lg {
  padding: 1rem 1.9rem;
  font-size: 1.04rem;
}

.btn-small {
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: #d8bb84;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  border-color: var(--gold);
  color: var(--brown);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(201, 169, 110, 0.16);
  color: var(--ink);
}

.btn-quiet {
  padding: 0.4rem 0.2rem;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--taupe-text);
  font-weight: 400;
  font-size: 0.86rem;
  text-decoration: underline;
  text-decoration-color: var(--gold);
}

.btn-quiet:hover {
  background: none;
  color: var(--ink);
  transform: none;
}

.link-arrow {
  display: inline-block;
  padding: 0.6rem 0.2rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.link-arrow::after {
  content: " \2192";
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.7);
  color: var(--brown);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  white-space: nowrap;
}

.chip-alpha {
  background: var(--heading);
  border-color: var(--heading);
  color: var(--cream-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.chip-dev {
  border-style: dashed;
  border-color: var(--taupe);
  color: var(--taupe-text);
}

.chip-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ------------------------------------------------------------------ */
/* Demo banner, header, footer                                         */
/* ------------------------------------------------------------------ */

.demo-banner {
  padding: 0.45rem 1rem;
  background: var(--heading);
  color: var(--cream-light);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 239, 228, 0.93);
  border-bottom: 1px solid var(--gold-line);
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .site-header {
    background: rgba(251, 239, 228, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.6rem;
}

.wordmark {
  margin: 0 auto 0 0;
  color: var(--brown);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

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

.site-nav {
  display: none;
  gap: 1.3rem;
  font-size: 0.86rem;
}

.site-nav a {
  color: var(--heading);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold);
}

.lang-switch {
  display: flex;
  gap: 0.1rem;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.lang-switch a {
  padding: 0.35rem 0.42rem;
  border-radius: 3px;
  color: var(--taupe-text);
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--ink);
  background: rgba(201, 169, 110, 0.18);
}

.lang-switch a[aria-current] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--gold);
}

.header-cta {
  display: none;
}

.site-footer {
  margin-top: 3rem;
  padding: 2.2rem 0 2.6rem;
  border-top: 1px solid var(--gold-line);
  background: rgba(255, 250, 244, 0.55);
  font-size: 0.86rem;
  color: var(--taupe-text);
}

.footer-inner {
  display: grid;
  gap: 1.2rem;
}

.wordmark-footer {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.footer-line,
.footer-status,
.footer-copy {
  margin: 0 0 0.35rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.3rem;
}

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

.section {
  padding: 3.4rem 0;
}

.section-paper {
  background: rgba(255, 250, 244, 0.62);
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
}

.section-dark {
  background: var(--dark);
  background-image: radial-gradient(80% 60% at 85% 0%, rgba(201, 169, 110, 0.16) 0%, rgba(201, 169, 110, 0) 70%);
  color: #f3e3d5;
}

.section-dark h2,
.section-dark h3 {
  color: var(--cream-light);
}

.section-dark .eyebrow {
  color: var(--gold);
}

.section-head {
  max-width: 46rem;
  margin: 0 auto 2.2rem;
  text-align: center;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 1px;
  margin: 0.9rem auto 0;
  background: var(--gold);
}

.section-intro {
  margin: 0;
  color: var(--heading);
}

.section-dark .section-intro {
  color: #f3e3d5;
}

.grid {
  display: grid;
  gap: 1.1rem;
}

.card {
  padding: 1.4rem 1.4rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card > :last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
  padding: 2.4rem 0 3rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 2.2rem;
  align-items: center;
}

.hero-title {
  margin: 0 0 0.5rem;
  color: var(--brown);
  font-size: clamp(2.15rem, 10.5vw, 4rem);
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.hero-title::after {
  content: "";
  display: block;
  width: 100%;
  max-width: 26rem;
  height: 1px;
  margin-top: 1.1rem;
  background: var(--gold);
}

.hero-promise {
  margin: 1.2rem 0 0.8rem;
  color: var(--heading);
  font-size: clamp(1.15rem, 4.4vw, 1.5rem);
  line-height: 1.4;
}

.hero-sub {
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  margin-bottom: 1.5rem;
}

.hero-visual {
  min-width: 0;
}

.sheet-stack {
  position: relative;
  width: min(100%, 25rem);
  aspect-ratio: 1 / 1.06;
  margin: 0 auto;
}

.sheet {
  position: absolute;
  top: 9%;
  width: 58%;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-lift);
}

.sheet img {
  width: 100%;
}

.sheet-left {
  left: 3%;
  transform: rotate(-9deg);
}

.sheet-right {
  right: 3%;
  transform: rotate(8deg);
}

.sheet-front {
  top: 3%;
  left: 19%;
  width: 62%;
  transform: rotate(-1deg);
}

.visual-note {
  margin: 0.4rem 0 0;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* What it is                                                          */
/* ------------------------------------------------------------------ */

.point h3 {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--gold-line);
}

.principles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.principles li {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.7);
  font-size: 0.86rem;
  color: var(--heading);
}

.principles-title {
  margin: 2.2rem 0 0;
  text-align: center;
}

.principles-title + .principles {
  margin-top: 0.8rem;
}

/* ------------------------------------------------------------------ */
/* How it works                                                        */
/* ------------------------------------------------------------------ */

.steps {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 3.4rem;
  padding: 1rem 1.1rem 1rem 4.2rem;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 0.85rem;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--cream-light);
  color: var(--brown);
  font-weight: 700;
  line-height: 2.25rem;
  text-align: center;
}

.step-text {
  display: block;
  color: var(--heading);
  font-weight: 700;
}

.step-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: var(--taupe-text);
}

.figure-signatures {
  max-width: 44rem;
  margin: 2.2rem auto 0;
}

.figure-signatures img {
  width: 100%;
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--taupe-text);
  text-align: center;
}

.closing-line {
  max-width: 40rem;
  margin: 2.2rem auto 0;
  color: var(--heading);
  font-size: 1.08rem;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* What's inside                                                       */
/* ------------------------------------------------------------------ */

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2.4rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  text-align: center;
}

.stats strong {
  display: block;
  color: var(--brown);
  font-size: 1.9rem;
  line-height: 1.1;
}

.stats span {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe-text);
}

.doc-card {
  display: flex;
  flex-direction: column;
}

.doc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.doc-meta .eyebrow {
  margin: 0;
}

.doc-card p {
  font-size: 0.93rem;
}

.doc-card .chip-row {
  margin-top: auto;
  padding-top: 0.4rem;
}

.doc-card-upcoming {
  background: rgba(255, 250, 244, 0.55);
  border-style: dashed;
  box-shadow: none;
}

.subhead {
  margin: 2.6rem 0 1rem;
  text-align: center;
}

.subhead + .fine {
  max-width: 40rem;
  margin: -0.4rem auto 1.2rem;
  text-align: center;
}

.preview-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  max-width: 40rem;
  margin: 0 auto;
}

.preview-row figure {
  margin: 0;
}

.preview-row a {
  display: block;
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.preview-row a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.preview-row img {
  width: 100%;
}

.format-note {
  max-width: 44rem;
  margin: 2rem auto 0;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Safety and consent                                                  */
/* ------------------------------------------------------------------ */

.safety-grid {
  display: grid;
  gap: 1.5rem 2.4rem;
}

.safety-item {
  padding-left: 1.1rem;
  border-left: 1px solid var(--gold);
}

.safety-item h3 {
  margin-bottom: 0.35rem;
  color: var(--gold);
}

.safety-item p {
  margin: 0;
  font-size: 0.95rem;
}

.safety-quote {
  max-width: 40rem;
  margin: 2.6rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(201, 169, 110, 0.5);
  color: var(--cream-light);
  font-size: 1.05rem;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Editions                                                            */
/* ------------------------------------------------------------------ */

.edition-grid {
  display: grid;
  gap: 1.6rem;
  max-width: 56rem;
  margin: 0 auto;
}

.edition-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.5rem 1.5rem;
}

.edition-card.is-recommended {
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-lift);
}

.edition-flag {
  position: absolute;
  top: -0.85rem;
  left: 1.4rem;
}

.edition-card h3 {
  margin-bottom: 0.3rem;
  font-size: 1.3rem;
}

.edition-tagline {
  min-height: 3em;
  font-size: 0.92rem;
  color: var(--taupe-text);
}

.price {
  margin: 0.2rem 0 0;
  color: var(--brown);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.price-note {
  margin: 0.3rem 0 1.1rem;
  font-size: 0.84rem;
  color: var(--taupe-text);
}

.ticks {
  margin: 0 0 1.3rem;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  margin-bottom: 0.55rem;
  padding-left: 1.7rem;
  font-size: 0.95rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.32em;
  width: 0.42em;
  height: 0.8em;
  border: solid #a8843f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ticks .chip {
  margin-left: 0.3rem;
  vertical-align: 0.1em;
}

.edition-status {
  margin: 0 0 1.1rem;
  padding: 0.6rem 0.8rem;
  border: 1px dashed var(--taupe);
  border-radius: 4px;
  font-size: 0.84rem;
  color: var(--heading);
}

.edition-card .btn {
  margin-top: auto;
}

.compare-wrap {
  max-width: 56rem;
  margin: 2.6rem auto 0;
  overflow-x: auto;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  font-size: 0.9rem;
}

.compare caption {
  padding: 0 0 0.7rem;
  color: var(--heading);
  font-weight: 700;
  text-align: left;
}

.compare th,
.compare td {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid rgba(201, 169, 110, 0.35);
  text-align: center;
  vertical-align: middle;
}

.compare thead th {
  color: var(--heading);
  background: rgba(201, 169, 110, 0.14);
}

.compare tbody th {
  font-weight: 400;
  text-align: left;
}

.compare .is-recommended {
  background: rgba(201, 169, 110, 0.1);
}

.compare tfoot th,
.compare tfoot td {
  border-bottom: 0;
  font-weight: 700;
}

.compare tfoot th {
  text-align: left;
}

.yes,
.no {
  display: inline-block;
}

.yes::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.85em;
  border: solid #a8843f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.no::before {
  content: "\2013";
  color: var(--taupe);
}

.edition-notes {
  max-width: 56rem;
  margin: 1.4rem auto 0;
  text-align: center;
}

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

.faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

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

.faq-item:first-child {
  border-top: 1px solid var(--gold-line);
}

.faq-item summary {
  position: relative;
  padding: 1.05rem 2.4rem 1.05rem 0;
  color: var(--heading);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  color: #a8843f;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: "\2013";
}

.faq-answer {
  padding: 0 0 1.1rem;
}

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

.cta-final {
  text-align: center;
}

.cta-final .lead {
  max-width: 38rem;
  margin: 0 auto 1.6rem;
}

/* ------------------------------------------------------------------ */
/* Forms and checkout                                                  */
/* ------------------------------------------------------------------ */

.page-head {
  padding: 2.4rem 0 0.4rem;
}

.page-head h1 {
  margin-bottom: 0.4rem;
}

.steps-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--taupe-text);
  counter-reset: bar;
}

.steps-bar li {
  counter-increment: bar;
}

.steps-bar li::before {
  content: counter(bar) ". ";
}

.steps-bar li[aria-current] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--gold);
}

.checkout-grid {
  display: grid;
  gap: 1.6rem;
  align-items: start;
  padding-bottom: 2rem;
}

.form-card h2,
.summary-card h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

fieldset {
  min-width: 0;
  margin: 0 0 1.6rem;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  margin-bottom: 0.9rem;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--gold-line);
  color: var(--heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.field {
  margin-bottom: 1rem;
}

.field label,
.field .label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--heading);
  font-weight: 700;
  font-size: 0.9rem;
}

.field .hint {
  display: block;
  margin: -0.1rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--taupe-text);
}

.optional {
  font-weight: 400;
  color: var(--taupe-text);
}

input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 1px solid #c9b29c;
  border-radius: 4px;
  background: #fffdfb;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

input:focus,
select:focus {
  border-color: #a8843f;
  outline: 3px solid rgba(201, 169, 110, 0.45);
  outline-offset: 0;
}

.field-row {
  display: grid;
  gap: 0 1rem;
}

.has-error input,
.has-error select {
  border-color: var(--error);
}

.field-error {
  margin: 0.3rem 0 0;
  color: var(--error);
  font-size: 0.85rem;
}

.alert {
  margin: 0 0 1.4rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--error);
  border-left-width: 4px;
  border-radius: 4px;
  background: #fff6f2;
  color: #6f2417;
}

.alert > :last-child {
  margin-bottom: 0;
}

.notice {
  margin: 0 0 1.4rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--gold);
  border-left-width: 4px;
  border-radius: 4px;
  background: #fff8e6;
  color: var(--ink);
  font-size: 0.93rem;
}

.notice > :last-child {
  margin-bottom: 0;
}

.options {
  display: grid;
  gap: 0.5rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #c9b29c;
  border-radius: 4px;
  background: #fffdfb;
  cursor: pointer;
}

.option.is-disabled {
  background: transparent;
  border-style: dashed;
  color: var(--taupe-text);
  cursor: not-allowed;
}

.option .chip {
  margin-left: auto;
}

.option input:checked + span {
  font-weight: 700;
}

input[type="radio"],
input[type="checkbox"] {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--heading);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
}

.check input {
  margin-top: 0.25rem;
}

/* Honeypot: off-screen for people, visible to form-filling bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.summary-card h3 {
  margin-bottom: 0.2rem;
  font-size: 1.15rem;
}

.summary-lines {
  margin: 1rem 0 0;
}

.summary-lines div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
}

.summary-lines dt {
  color: var(--heading);
}

.summary-lines dd {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.summary-lines .total {
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--gold);
  font-size: 1.2rem;
  font-weight: 700;
}

.summary-card .ticks {
  margin: 1rem 0 0;
}

.summary-card .ticks li {
  font-size: 0.86rem;
}

.switch-edition {
  margin: 1rem 0 0;
  font-size: 0.86rem;
}

.demo-pay {
  border: 2px dashed var(--gold);
  background: #fffdf8;
}

.demo-stamp {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.2rem 0.7rem;
  border: 2px solid var(--brown);
  border-radius: 4px;
  color: var(--brown);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.pay-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.details {
  margin: 0;
}

.details div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 32%) 1fr;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(201, 169, 110, 0.3);
}

.details div:last-child {
  border-bottom: 0;
}

.details dt {
  color: var(--taupe-text);
  font-size: 0.88rem;
}

.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ */
/* Confirmation                                                        */
/* ------------------------------------------------------------------ */

.confirm-head {
  padding: 2.6rem 0 1.4rem;
  text-align: center;
}

.confirm-mark {
  position: relative;
  width: 3.6rem;
  height: 3.6rem;
  margin: 0 auto 1.1rem;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--paper);
}

.confirm-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0.75rem;
  height: 1.45rem;
  border: solid var(--brown);
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.confirm-grid {
  display: grid;
  gap: 1.6rem;
  align-items: start;
  padding-bottom: 2rem;
}

.email-preview {
  padding: 0;
  overflow: hidden;
}

.email-head {
  margin: 0;
  padding: 1rem 1.4rem;
  background: rgba(201, 169, 110, 0.14);
  border-bottom: 1px solid var(--gold-line);
  font-size: 0.86rem;
}

.email-head div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.6rem;
}

.email-head dt {
  color: var(--taupe-text);
}

.email-head dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.email-body {
  padding: 1.3rem 1.4rem;
  font-size: 0.93rem;
}

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

.download-card .btn {
  margin: 0.4rem 0 0.8rem;
}

/* ------------------------------------------------------------------ */
/* Legal pages, age gate, error page                                   */
/* ------------------------------------------------------------------ */

.legal {
  padding: 2.6rem 0 1rem;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal ul {
  padding-left: 1.3rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 2.4rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--gold-line);
  font-size: 0.9rem;
}

.gate {
  display: grid;
  place-items: center;
  min-height: 72vh;
  padding: 2.4rem 0;
}

.gate-card {
  width: min(100% - 2.5rem, 33rem);
  padding: 2.2rem 1.6rem 1.8rem;
  text-align: center;
}

.gate-age {
  display: inline-grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  margin: 0 auto 1.2rem;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--brown);
  font-size: 1.35rem;
  font-weight: 700;
}

.gate-actions {
  display: grid;
  gap: 0.7rem;
  margin: 1.6rem 0 1.2rem;
}

.gate-actions form {
  margin: 0;
}

.error-page {
  padding: 4.5rem 0;
}

.error-page .eyebrow {
  color: var(--brown);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ------------------------------------------------------------------ */
/* Wider screens                                                       */
/* ------------------------------------------------------------------ */

@media (min-width: 40rem) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .doc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .safety-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .field-row.postal {
    grid-template-columns: 11rem 1fr;
  }

  .gate-card {
    padding: 2.8rem 2.6rem 2.2rem;
  }

  .pay-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 48rem) {
  body {
    font-size: 1.04rem;
  }

  .section {
    padding: 5rem 0;
  }

  .header-cta {
    display: inline-block;
  }

  .edition-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

@media (min-width: 60rem) {
  .site-nav {
    display: flex;
  }

  .hero {
    padding: 4.5rem 0 5rem;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }

  .sheet-stack {
    width: min(100%, 30rem);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .doc-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .safety-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .checkout-grid {
    grid-template-columns: 1.45fr 1fr;
    gap: 2.2rem;
  }

  .checkout-grid .summary-card {
    position: sticky;
    top: 5rem;
    order: 2;
  }

  .confirm-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.2rem;
  }
}

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

  * {
    transition: none !important;
  }
}

@media print {
  .demo-banner,
  .site-header,
  .site-footer,
  .btn {
    display: none;
  }

  body {
    background: #fff;
  }
}

/* Late additions */
.card h2 {
  font-size: 1.2rem;
}

.notice.narrow {
  margin-inline: auto;
}
