/* 2Sides — public website
   Palette
     mist     #EEF1F4  page background
     navy     #13233A  text, primary buttons
     verified #127A5A  facts that come from a neutral source
     amber    #E8A317  star ratings only
     paper    #FFFFFF  the ticket
   Signature: a two-part "ticket" split by a perforated tear line —
   the claim on one side, the record on the other. */

:root {
  --mist: #eef1f4;
  --navy: #13233a;
  --navy-soft: #3c4c63;
  --verified: #127a5a;
  --verified-tint: #e3f2ec;
  --amber: #e8a317;
  --paper: #ffffff;
  --line: #c9d2dc;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
  --step-4: clamp(2.4rem, 1.6rem + 3vw, 3.9rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--navy);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow > * { max-width: 46rem; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--navy); color: #fff; padding: 0.5rem 0.75rem; border-radius: 6px; z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0 1.3rem;
  background: var(--navy); color: #fff;
  border-radius: 999px; text-decoration: none; font-weight: 700;
  transition: background-color 0.15s ease;
}
.btn:hover { background: #22395a; }
.btn-quiet { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn-quiet:hover { background: rgba(19, 35, 58, 0.06); }
.btn-small { min-height: 2.3rem; padding: 0 1rem; font-size: var(--step--1); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--verified-tint); }

/* ---------- header ---------- */
.site-header { padding: 1.1rem 0; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--navy); text-decoration: none; }
.logo-mark { height: 2.1rem; width: auto; }
.logo-word { height: 1.05rem; width: auto; }
.site-header nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; font-size: var(--step--1); }
.site-header nav a:not(.btn) { text-decoration: none; color: var(--navy-soft); }
.site-header nav a:not(.btn):hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- hero ---------- */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 64rem) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.hero-copy { max-width: 36rem; }
.lede { margin-top: 1.4rem; font-size: var(--step-1); line-height: 1.5; color: var(--navy-soft); max-width: 34rem; }
.hero-actions { margin-top: 2rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* the ticket */
.example { margin: 0; }
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden; /* clips the notches into half-circle cut-outs */
  box-shadow: 0 1px 0 rgba(19, 35, 58, 0.08), 0 24px 48px -28px rgba(19, 35, 58, 0.45);
}
@media (min-width: 40rem) { .ticket { grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr); } }

.ticket-half { padding: clamp(1.25rem, 3vw, 1.9rem); }
.ticket-heading { font-family: var(--display); font-weight: 700; font-size: var(--step--1); color: var(--navy-soft); margin-bottom: 0.9rem; }
.ticket-title { font-family: var(--display); font-weight: 700; font-size: var(--step-1); line-height: 1.2; margin-top: 0.35rem; }
.ticket-body { margin-top: 0.4rem; color: var(--navy-soft); }
.ticket-meta { margin-top: 0.7rem; font-size: var(--step--1); color: var(--navy-soft); }
.stars { color: var(--amber); font-size: 1.35rem; letter-spacing: 0.06em; line-height: 1; }
.stars span { color: #d6dde5; }

.reply { margin-top: 1.2rem; padding: 0.8rem 0.95rem; background: var(--mist); border-radius: 10px; font-size: var(--step--1); }
.reply-from { font-weight: 700; margin-bottom: 0.2rem; }

/* perforated tear line, with half-circle notches at each end */
.perforation { position: relative; border-top: 2px dashed var(--line); margin: 0 1.2rem; }
.perforation::before,
.perforation::after {
  content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; background: var(--mist);
  top: -14px;
}
.perforation::before { left: -2.05rem; }
.perforation::after { right: -2.05rem; }
@media (min-width: 40rem) {
  .perforation { border-top: 0; border-left: 2px dashed var(--line); margin: 1.2rem 0; }
  .perforation::before, .perforation::after { left: -14px; right: auto; }
  .perforation::before { top: -2.05rem; }
  .perforation::after { top: auto; bottom: -2.05rem; }
}

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: var(--step--1); }
.facts li { display: flex; gap: 0.55rem; align-items: baseline; color: var(--navy-soft); }
.facts .fact-strong { color: var(--navy); font-weight: 700; font-size: var(--step-0); }
.check { color: var(--verified); font-weight: 700; }

.photo { margin-top: 1rem; }
.photo svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.photo p { margin-top: 0.4rem; font-size: var(--step--1); color: var(--navy-soft); }

.stamp {
  margin-top: 1rem; padding: 0.55rem 0.8rem;
  background: var(--verified-tint); color: var(--verified);
  border: 2px solid var(--verified); border-radius: 8px;
  font-weight: 700; font-size: var(--step--1);
  transform: rotate(-1.5deg);
  animation: stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) 0.7s both;
}
@keyframes stamp {
  from { opacity: 0; transform: rotate(-6deg) scale(1.25); }
  to { opacity: 1; transform: rotate(-1.5deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }

.ticket-caption { margin-top: 0.85rem; font-size: var(--step--1); color: #5d6b7d; text-align: center; }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section h2 { max-width: 30ch; }

.steps {
  list-style: none; counter-reset: step; margin: 2.5rem 0 0; padding: 0;
  display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; } }
.steps li { counter-increment: step; position: relative; padding-top: 3.4rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: #fff;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
}
.steps p { margin-top: 0.55rem; color: var(--navy-soft); max-width: 34ch; }
.note {
  margin-top: 2.75rem; padding-left: 1rem; border-left: 4px solid var(--verified);
  color: var(--navy-soft); max-width: 60ch;
}

.sides-section { background: var(--paper); }
.sides { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
@media (min-width: 52rem) { .sides { grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr); gap: 3.5rem; } }
.seam { border-top: 2px dashed var(--line); }
@media (min-width: 52rem) { .seam { border-top: 0; border-left: 2px dashed var(--line); } }
.plain { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1.05rem; }
.plain li { color: var(--navy-soft); max-width: 46ch; }
.plain strong { color: var(--navy); }

.nevers { margin: 1.8rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.2rem; }
.nevers li {
  font-family: var(--display); font-weight: 500; font-size: var(--step-1); line-height: 1.35;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.nevers li:last-child { border-bottom: 0; }

.faq { margin-top: 1.8rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.05rem 2rem 1.05rem 0; position: relative;
  font-family: var(--display); font-weight: 700; font-size: var(--step-0);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 500; transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 1.2rem; color: var(--navy-soft); max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

.cta-section { background: var(--navy); color: #fff; }
.cta h2 { color: #fff; }
.cta p { margin-top: 1rem; color: #c8d3df; max-width: 52ch; }
.cta .btn { margin-top: 1.75rem; }
.cta .cta-small { font-size: var(--step--1); margin-top: 1rem; }
.cta-section :focus-visible { outline-color: #7fd9b6; }

/* ---------- footer ---------- */
.site-footer { padding: 2rem 0 2.5rem; font-size: var(--step--1); color: var(--navy-soft); }
.footer-row { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.fine { max-width: 52ch; }
.footer-brand { display: flex; align-items: center; gap: 0.85rem; color: var(--navy); }
.footer-mark { height: 2.4rem; width: auto; flex: none; }
.tagline { font-family: var(--display); font-weight: 700; color: var(--navy); }

@media (max-width: 40rem) {
  .site-header nav a:not(.btn) { display: none; }
}

/* ---------- contact ---------- */
.contact-lede { margin-top: 1rem; font-size: var(--step-1); color: var(--navy-soft); }
.contact-lede a, .contact-note a, .faq a { color: var(--navy); }
.contact-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact-note { margin-top: 1.25rem; font-size: var(--step--1); color: var(--navy-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.footer-links a { color: var(--navy-soft); }
.footer-links a:hover { color: var(--navy); }

/* ---------- policy pages (built by scripts/build-legal.py) ---------- */
.legal { padding: 2.5rem 0 4rem; }
.legal-grid { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.legal-nav { position: sticky; top: 1.5rem; font-size: var(--step--1); }
.legal-nav p { font-weight: 700; margin-bottom: 0.5rem; }
.legal-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.legal-nav a { display: block; padding: 0.35rem 0.6rem; border-radius: 6px; color: var(--navy-soft); text-decoration: none; }
.legal-nav a:hover { background: rgba(19, 35, 58, 0.06); color: var(--navy); }
.legal-nav a[aria-current="page"] { background: var(--paper); color: var(--navy); font-weight: 700; box-shadow: inset 3px 0 0 var(--verified); }
.legal-doc { background: var(--paper); border-radius: 14px; padding: clamp(1.25rem, 4vw, 3rem); max-width: 48rem; }
.legal-kicker { font-size: var(--step--1); margin-bottom: 0.5rem; }
.legal-kicker a { color: var(--verified); font-weight: 700; text-decoration: none; }
.legal h1 { font-size: var(--step-3); }
.legal-date { color: var(--navy-soft); font-size: var(--step--1); margin: 0.6rem 0 1.5rem; }
.legal-doc h2 { font-size: var(--step-1); margin: 2rem 0 0.5rem; }
.legal-doc p, .legal-doc ul, .legal-doc ol { margin: 0 0 0.9rem; }
.legal-doc ul, .legal-doc ol { padding-left: 1.3rem; }
.legal-doc li { margin-bottom: 0.3rem; }
.legal-doc a { color: var(--verified); }
.legal-doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; font-size: var(--step--1); display: block; overflow-x: auto; }
.legal-doc th, .legal-doc td { text-align: left; vertical-align: top; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); }
.legal-doc th { background: var(--mist); }
.legal-contact { margin-top: 2.5rem !important; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--navy-soft); }
.legal-index { max-width: 52rem; }
.legal-lede { margin-bottom: 1.5rem; max-width: 42rem; }
.legal-lede a { color: var(--verified); }
.legal-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.legal-cards a { display: grid; align-content: start; gap: 0.35rem; height: 100%; padding: 1.2rem; background: var(--paper); border-radius: 12px; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.legal-cards a:hover { box-shadow: inset 0 0 0 2px var(--verified); }
.legal-cards strong { font-family: var(--display); font-size: var(--step-1); }
.legal-cards span { color: var(--navy-soft); font-size: var(--step--1); }
@media (max-width: 52rem) {
  .legal-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .legal-nav { position: static; }
  .legal-nav ul { display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .legal-nav a { background: rgba(19, 35, 58, 0.05); }
}
