/* The answer library (/library and its 26 answer pages), built by scripts/build-library.mjs.
   Same look as the live funnel pages (public/review.html): white top bar, soft green wash,
   Playfair Display headings, DM Sans text, deep green, grey-green footer. Light only, like them. */
:root {
  --ink: #14201c; --ink-soft: #4a5652; --ink-3: #5f6b67;
  --page: #ffffff; --wash: #f7f9f8; --rule: #e3e8e6; --foot: #eef2f0;
  --deep: #14533f; --deep-2: #0f4434; --mint: #e8f3ed; --note: #fbf6ea; --note-rule: #eadfc4; --note-ink: #6b5418;
  --font: "DM Sans", "Helvetica Neue", Arial, sans-serif; --serif: "Playfair Display", Georgia, serif;
  --radius: 14px;
}
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 17px/1.6 var(--font) }
img { max-width: 100%; height: auto; display: block }
a { color: var(--deep) }
a:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 6px }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
.wrap--read { max-width: 720px }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }

/* Top bar, as on /quiz and the homepage */
.topbar { background: #fff; border-bottom: 1px solid var(--rule) }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px }
.logo img { width: 164px; height: auto }
.topcall { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--deep); border-radius: 999px; padding: 8px 16px; color: var(--deep); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums }
.topcall:hover { background: var(--deep); color: #fff }
@media (max-width: 480px) {
  .topbar .wrap { padding-block: 10px }
  .logo img { width: 136px }
  .topcall { padding: 7px 12px; font-size: .84rem }
}

/* Hero */
.hero { background: var(--wash); border-bottom: 1px solid var(--rule) }
.hero .wrap { padding-block: 36px 32px }
.kicker { margin: 0 0 10px; font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--deep) }
.kicker a { color: inherit; text-decoration: none }
.kicker a:hover { text-decoration: underline }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 7vw, 3.1rem); line-height: 1.14; letter-spacing: -.005em; margin: 0 0 14px; text-wrap: balance }
.lede { margin: 0; max-width: 46ch; font-size: 1.12rem; color: var(--ink-soft) }
h2, h3 { font-family: var(--serif); font-weight: 600; text-wrap: balance }

/* Topic shortcuts */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none }
.jump a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); font-size: .92rem; font-weight: 600; text-decoration: none }
.jump a:hover { border-color: var(--deep); color: var(--deep) }
.jump b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--mint); color: var(--deep); font-size: .78rem; text-align: center; font-variant-numeric: tabular-nums }

/* A topic: photo and title, then one card per question */
.topic { padding-block: 44px 8px; scroll-margin-top: 8px }
.topic-head { display: grid; gap: 18px; align-items: center; margin-bottom: 22px }
.topic-head img { width: 100%; aspect-ratio: 3 / 2; max-height: 220px; object-fit: cover; border-radius: var(--radius) }
.topic-head h2 { margin: 0 0 6px; font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.2 }
.topic-head p { margin: 0; color: var(--ink-soft) }
.topic-head .count { margin-top: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3) }
@media (min-width: 720px) {
  .topic-head { grid-template-columns: 300px 1fr; gap: 28px }
  .topic-head img { max-height: none }
}
.cards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr } }
.card { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 18px 18px 18px 20px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s }
.card:hover { border-color: var(--deep); box-shadow: 0 8px 22px rgba(20, 32, 28, .08) }
.card > span { flex: 1; min-width: 0 }
.card strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.14rem; line-height: 1.3; margin-bottom: 6px }
.card em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; font-size: .95rem; line-height: 1.5; color: var(--ink-soft) }
.card .icon { margin-top: 4px; color: var(--deep) }
@media (prefers-reduced-motion: reduce) { .card { transition: none } }

/* Answer page */
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: .95rem; font-weight: 600; text-decoration: none }
.back .icon { transform: rotate(180deg); width: 16px; height: 16px }
.back:hover { text-decoration: underline }
.answer-hero .wrap { display: grid; gap: 22px }
.answer-hero img { width: 100%; aspect-ratio: 3 / 2; max-height: 150px; object-fit: cover; border-radius: var(--radius) }
@media (min-width: 860px) {
  .answer-hero .wrap { grid-template-columns: 1fr 300px; align-items: center; gap: 40px; max-width: 980px }
  .answer-hero img { max-height: none }
}
.short { margin: 20px 0 0; padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--rule) }
.short p { margin: 0; font-size: 1.12rem; line-height: 1.55 }
.short .label, .part .label { display: block; margin-bottom: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--deep) }
.body { padding-block: 34px 8px }
.part { margin: 0 0 30px }
.part h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 1.45rem; line-height: 1.25 }
.part h2 .dot { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--mint); color: var(--deep) }
.part p { margin: 0 0 14px }
.part p:last-child { margin-bottom: 0 }
.part--note, .part--review { padding: 20px; border-radius: var(--radius) }
.part--note { background: var(--note); border: 1px solid var(--note-rule) }
.part--note h2 .dot { background: #fff; color: var(--note-ink) }
.part--review { background: var(--mint) }
.part--review h2 .dot { background: #fff }
.more { padding-block: 10px 8px }
.more h2 { margin: 0 0 14px; font-size: 1.35rem }
.next { margin: 0 0 30px }
.next .card { background: var(--wash) }
.next .label { display: block; margin-bottom: 4px; font-family: var(--font); font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--deep) }
.more .cards { grid-template-columns: 1fr }
.all { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 12px 20px; border-radius: 999px; background: var(--deep); color: #fff; font-weight: 700; text-decoration: none }
.all:hover { background: var(--deep-2) }

/* Call or text Ted */
.ted { display: flex; gap: 16px; align-items: flex-start; margin: 44px 0 0; padding: 22px; border-radius: var(--radius); background: var(--deep); color: #fff }
.ted .dot { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .14) }
.ted .dot .icon { width: 20px; height: 20px }
.ted h2 { margin: 0 0 4px; font-size: 1.35rem; color: #fff }
.ted p { margin: 0; color: rgba(255, 255, 255, .88) }
.ted a { color: #fff; font-weight: 700; white-space: nowrap }

/* Footer, as on /quiz */
.foot { margin-top: 56px; background: var(--foot); border-top: 1px solid #dde4e0; color: #4a5551 }
.foot .wrap { padding-block: 34px 40px }
.foot .logo img { width: 160px }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 18px 0; padding: 12px 0; border-top: 1px solid #d6dfda; border-bottom: 1px solid #d6dfda }
.foot nav a { color: #2f3a37; font-size: .88rem; font-weight: 600; text-decoration: none }
.foot nav a:hover { text-decoration: underline }
.foot p { margin: 0; font-size: .82rem; line-height: 1.6 }
