/* ==========================================================================
   No Burp — design system
   Editorial + warm. Brand teal/navy on warm paper, Fraunces + Atkinson
   Hyperlegible. Hairline rules over heavy shadows. No gradients.
   ========================================================================== */

/* ---- Fonts (self-hosted) ------------------------------------------------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  --paper: #fbf8f2;
  --surface: #ffffff;
  --surface-warm: #fffdf7;
  --ink: #16323d;
  --ink-soft: #33484f;
  --muted: #566a70;

  --teal: #0e6359;
  --teal-hover: #0a4f47;
  --teal-bright: #3fb8af;
  --teal-tint: #e6f2ef;

  --clay: #c2552e;
  --clay-hover: #a8431f;
  --clay-tint: #f7eae1;

  --line: #e7e0d4;
  --line-strong: #d6ccbb;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.8rem);
  --step-3: clamp(1.85rem, 1.6rem + 1.2vw, 2.4rem);
  --step-4: clamp(2.25rem, 1.8rem + 2.2vw, 3.3rem);
  --step-5: clamp(2.7rem, 2rem + 3.4vw, 4.4rem);

  --measure: 66ch;
  --wrap: 74rem;

  --radius-sm: 7px;
  --radius: 11px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(22, 50, 61, 0.06);
  --shadow: 0 6px 22px -12px rgba(22, 50, 61, 0.28);

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---- Reset & base -------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--teal-hover);
}
strong {
  font-weight: 700;
}
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 3px;
}
main {
  flex: 1 0 auto;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* ---- Typography ---------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 580;
  font-variation-settings: "opsz" 40, "SOFT" 0, "WONK" 0;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: var(--step-4);
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
  font-weight: 600;
}
p {
  margin: 0 0 1rem;
}

/* ---- Layout primitives --------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 0.6rem + 2.5vw, 2.5rem);
}
.section {
  padding-block: clamp(2.75rem, 2rem + 4vw, 5rem);
}
.section--tight {
  padding-block: clamp(2rem, 1.5rem + 2vw, 3rem);
}
.prose {
  max-width: var(--measure);
}
.prose > * + * {
  margin-top: 1.05rem;
}
.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.85rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--teal-bright);
}
.section__head {
  max-width: var(--measure);
  margin-bottom: 2rem;
}

/* ---- Skip link & utilities ---------------------------------------------- */
.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: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top 0.18s var(--ease);
}
.skip-link:focus {
  top: 0.75rem;
  color: #fff;
}
[hidden] {
  display: none !important;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  line-height: 1;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s var(--ease), background-color 0.16s var(--ease),
    border-color 0.16s var(--ease), color 0.16s var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn--primary:hover {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
  color: #fff;
}
.btn--accent {
  background: var(--clay);
  color: #fff;
  border-color: var(--clay);
}
.btn--accent:hover {
  background: var(--clay-hover);
  border-color: var(--clay-hover);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ---- Header & navigation ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  font-variation-settings: "opsz" 36;
}
.brand__sub {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.35rem;
}
.site-nav a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
}
.site-nav a:hover {
  background: var(--teal-tint);
  color: var(--teal-hover);
}
.site-nav a[aria-current="page"] {
  color: var(--teal);
  box-shadow: inset 0 -2px 0 var(--teal);
  border-radius: 0;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__box {
  position: relative;
  width: 20px;
  height: 14px;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bar {
  top: 6px;
}
.nav-toggle__bar::before {
  content: "";
  top: -6px;
}
.nav-toggle__bar::after {
  content: "";
  top: 6px;
}

@media (max-width: 48rem) {
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem clamp(1.1rem, 0.6rem + 2.5vw, 2.5rem) 1rem;
  }
  .site-nav a {
    display: block;
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .site-nav a[aria-current="page"] {
    box-shadow: none;
    color: var(--teal);
  }
  .nav-open .site-nav {
    display: block;
  }
  .nav-open .nav-toggle__bar {
    background: transparent;
  }
  .nav-open .nav-toggle__bar::before {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-open .nav-toggle__bar::after {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* ---- Masthead / hero ----------------------------------------------------- */
.masthead {
  border-bottom: 1px solid var(--line);
}
.masthead__grid {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}
@media (min-width: 56rem) {
  .masthead__grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}
.masthead h1 {
  margin-bottom: 0.6rem;
}
.masthead .lead {
  max-width: 38ch;
}
.masthead__actions {
  margin-top: 1.6rem;
}
.masthead__aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  box-shadow: var(--shadow);
}
.masthead__aside h2 {
  font-size: var(--step-1);
  margin-bottom: 0.5rem;
}
.figure-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* ---- Cards --------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.card__kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
}
.card__title {
  font-size: var(--step-1);
  margin-bottom: 0.4rem;
}
.card__meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: auto;
}
.card__link {
  margin-top: 1rem;
  font-weight: 700;
  text-decoration: none;
}
.card__link:hover {
  text-decoration: underline;
}

/* Link-card (home navigation tiles) */
.tilelink {
  position: relative;
  text-decoration: none;
  color: var(--ink);
}
.tilelink .card__title {
  color: var(--ink);
}
.tilelink:hover {
  color: var(--ink);
}
.tilelink .arrow {
  color: var(--teal);
  font-weight: 700;
  margin-top: 1rem;
}

/* ---- Feature split ------------------------------------------------------- */
.split {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 48rem) {
  .split--2 {
    grid-template-columns: 1fr 1fr;
  }
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.1rem);
}
.panel--tint {
  background: var(--teal-tint);
  border-color: color-mix(in srgb, var(--teal-bright) 35%, var(--line));
}

/* ---- Callouts ------------------------------------------------------------ */
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  background: var(--surface-warm);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
}
.callout--note {
  border-left-color: var(--clay);
}
.callout p:last-child {
  margin-bottom: 0;
}

/* ---- Tags / pills -------------------------------------------------------- */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--teal-tint);
  color: var(--teal-hover);
}
.tag--clay {
  background: var(--clay-tint);
  color: var(--clay-hover);
}

/* ---- Self-check quiz ----------------------------------------------------- */
.quiz {
  max-width: 44rem;
}
.progress {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: var(--progress, 0%);
  background: var(--teal);
  border-radius: 999px;
  transition: width 0.25s var(--ease);
}
.progress__text {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.quiz__q {
  border: 0;
  margin: 0;
  padding: 0;
}
.quiz__q legend {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 560;
  line-height: 1.2;
  padding: 0;
  margin-bottom: 1.25rem;
}
.quiz__hint {
  margin: -0.75rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.options {
  display: grid;
  gap: 0.6rem;
}
.option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease);
}
.option:hover {
  border-color: var(--teal-bright);
}
.option input {
  accent-color: var(--teal);
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}
.option:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-tint);
}
.option:has(input:focus-visible) {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
.quiz__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
}
.quiz__result {
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 1rem + 1.5vw, 2rem);
}
.quiz__score {
  font-family: var(--font-display);
  font-size: var(--step-2);
  margin-bottom: 0.5rem;
}
.band {
  display: inline-block;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.band--high {
  background: var(--clay-tint);
  color: var(--clay-hover);
}
.band--mod {
  background: #f6efda;
  color: #8a6a16;
}
.band--low {
  background: var(--teal-tint);
  color: var(--teal-hover);
}

/* ---- FAQ (native details) ----------------------------------------------- */
.faq {
  max-width: var(--measure);
  border-top: 1px solid var(--line);
}
.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.25rem;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: var(--step-1);
  color: var(--ink);
}
.faq__q::-webkit-details-marker {
  display: none;
}
.faq__q::after {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.faq__item[open] .faq__q::after {
  transform: rotate(-135deg);
}
.faq__a {
  padding: 0 0.25rem 1.3rem;
  color: var(--ink-soft);
}
.faq__a > * + * {
  margin-top: 0.8rem;
}
.faq__figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.faq__figures img {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* ---- Doctor finder ------------------------------------------------------- */
.finder__controls {
  position: sticky;
  top: 4.5rem;
  z-index: 10;
  background: var(--paper);
  padding-block: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.finder__field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.finder__search {
  width: 100%;
  max-width: 32rem;
  font-family: var(--font-body);
  font-size: var(--step-0);
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.finder__search:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.finder__count {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
}
.doctor-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.doctor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.doctor__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}
.doctor__clinic {
  font-weight: 700;
  color: var(--ink-soft);
}
.doctor__meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.doctor__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.doctor__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.6rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.92rem;
}
.finder__empty {
  padding: 2rem 0;
  color: var(--muted);
}

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  flex-shrink: 0;
  margin-top: 3rem;
  background: var(--ink);
  color: #cdd9dd;
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.site-footer a {
  color: #cdd9dd;
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
@media (min-width: 44rem) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.site-footer__brand .brand__name {
  color: #fff;
  font-size: 1.4rem;
}
.site-footer__brand p {
  margin: 0.6rem 0 0.9rem;
  max-width: 34ch;
  font-size: 0.95rem;
}
.reddit-link {
  font-weight: 700;
  color: var(--teal-bright) !important;
}
.site-footer__nav h2 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.8rem;
}
.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.site-footer__disclaimer {
  font-size: 0.85rem;
  color: #9fb0b5;
  margin: 1.5rem 0 0;
  max-width: 70ch;
}
.site-footer__legal {
  font-size: 0.8rem;
  color: #8499a0;
  margin: 0.8rem 0 0;
}
.site-footer__legal a {
  color: #9fb0b5;
}

/* ---- Page head (interior pages) ----------------------------------------- */
.page-head {
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin-bottom: 0.5rem;
}

/* ---- Motion preferences -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
