/* Self-hosted so no page makes a third-party request. Both are variable fonts,
   so one file per subset covers every weight we use. See fonts/LICENSE.txt. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: oklch(22% 0.02 60);
  --ink-soft: oklch(46% 0.02 60);
  --paper: oklch(98% 0.006 85);
  --paper-raised: oklch(100% 0 0);
  --paper-band: oklch(96.5% 0.009 85);
  --line: oklch(89% 0.015 80);
  --rust: oklch(58% 0.14 40);
  --rust-deep: oklch(48% 0.15 40);
  --mustard: oklch(80% 0.12 85);
  --mustard-block: oklch(90% 0.07 85);
  --font-sans: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0 0 0.5em; }

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
}
/* The removed ad slots used to space these apart. */
main > section { margin-top: 2.75rem; }

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-nav {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}

.site-nav .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.logo-mark {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 3px;
  padding: 5px;
  background: var(--paper-raised);
  border: 2px solid var(--ink);
  border-radius: 7px;
  flex: none;
}
.logo-mark span { border-radius: 2px; }
.logo-mark span:nth-child(1) { background: var(--rust); }
.logo-mark span:nth-child(2) { background: var(--ink); }
.logo-mark span:nth-child(3) { background: var(--mustard); }
.logo-mark span:nth-child(4) { background: var(--rust); }

.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:not(.logo) { padding-bottom: 4px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active {
  color: var(--rust-deep);
  font-weight: 700;
  border-bottom-color: var(--rust-deep);
}

.brand-stripe {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  padding: 0 1.5rem;
}
.brand-stripe > div { height: 100%; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.site-footer a { color: var(--ink-soft); margin: 0 0.5rem; }
.site-footer a:hover { color: var(--ink); }

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.btn-primary {
  background: var(--rust);
  color: var(--paper);
  border-color: var(--rust);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
}
.card h2, .card h3 { font-size: 1.1rem; }
.card p { color: var(--ink-soft); }

/* Whole card is the target. Guide cards are a real <a> (so focus, middle-click
   and open-in-new-tab work); test cards keep their heading and get a real
   <button> stretched over the card instead. */
.card-clickable {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card-clickable h2 { margin: 0; }
.card-clickable p { margin: 0; }
.card-clickable:hover {
  border-color: var(--ink);
  box-shadow: 0 8px 24px -16px oklch(22% 0.02 60 / 0.45);
}
.card-clickable:has(.card-hit:focus-visible),
.card-clickable:focus-visible {
  outline: 2px solid var(--rust-deep);
  outline-offset: 3px;
}

.card-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}
.card-hit:focus { outline: none; }

.hero {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 1.5rem 0 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--mustard-block);
}
.hero-copy {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 3.5rem 2.5rem;
}
.hero-copy h1 { font-size: 2.6rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.hero-copy h1 .accent { color: var(--rust); }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-secondary-link { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; text-decoration: none; }
.hero-secondary-link:hover { color: var(--rust); border-color: var(--rust); }

.device-mockup-wrap {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.device-mockup {
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  background: var(--paper-raised);
  border: 2px solid var(--ink);
  padding: 1rem;
}
.device-screen {
  border-radius: 8px;
  overflow: hidden;
  background: #d81e1e;
  height: 260px;
  position: relative;
}
.device-screen .corner-label {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(20, 15, 10, 0.55);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}
.swatch-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 0.75rem;
}
.swatch-strip > div { height: 22px; border-radius: 3px; }
/* In a card preview the strip fills the box, like the other mode previews. */
.mode-preview .swatch-strip > div { height: 100%; border-radius: 0; }

/* Guide articles. All text shares one measure so left and right edges line up;
   a rem value rather than ch, since ch scales with each element's font size and
   would give every heading a different width. Wide content like the policy
   table opts out and uses the full column. */
.article { --measure: 40rem; }
.article > h1,
.article > h2,
.article > p,
.article > ul,
.article > ol {
  max-width: var(--measure);
  margin-inline: auto;
}
.article > h2 {
  font-size: 1.4rem;
  line-height: 1.25;
  margin-block: 2.75rem 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.article > h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin-block: 0 0.85rem;
}
.article > p {
  margin-block: 0 1.2rem;
  text-wrap: pretty;
}
/* Lead paragraph */
.article > h1 + p {
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-block: 0 1.75rem;
}
.article > ul,
.article > ol {
  margin-block: 0 1.2rem;
  padding-left: 1.35rem;
}
.article li {
  margin-bottom: 0.55rem;
  text-wrap: pretty;
}
.article li::marker { color: var(--rust); }
.article a { text-underline-offset: 2px; }
.article .symptom-table { margin: 1.75rem 0 2rem; }
.article > p > small { color: var(--ink-soft); line-height: 1.5; display: inline-block; }

.symptom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.symptom-table th, .symptom-table td {
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
  text-align: left;
}
.symptom-table thead th { font-family: var(--font-display); background: var(--paper-raised); }
.symptom-table tbody tr:nth-child(even) { background: var(--paper-band); }
.symptom-table tbody tr:last-child td { border-bottom: none; }

.symptom-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.ad-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: 10px;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  padding: 1rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  z-index: 1000;
  box-shadow: 0 -10px 30px -20px oklch(22% 0.02 60 / 0.3);
}
.consent-banner[hidden] { display: none; }
.consent-banner p { margin: 0; color: var(--ink-soft); }

.picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}
@media (max-width: 820px) {
  .picker-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

.mode-preview {
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}

.fullscreen-stage {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.fullscreen-stage[hidden] { display: none; }

.corner-label {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font-sans);
  transition: opacity 0.5s ease;
}

/* Sits low and centered so it clears the corners (backlight bleed) and the
   middle of the screen (the warning card and the flashing square). */
.mode-guidance {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 3rem));
  box-sizing: border-box;
  background: rgba(16, 12, 8, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.mode-guidance[hidden] { display: none; }
.mode-guidance.faded { opacity: 0; }
.mode-guidance a { color: #f0d81e; font-weight: 600; pointer-events: auto; }
.mode-guidance .guidance-recall {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}
