/* answers.css — components for the /pt-explains/ answer library.
   Loaded AFTER css/v2.css. Extends it, never overrides its tokens.

   Every value here resolves through a v2 custom property. No hex values, no font
   stacks, no transcribed numbers (.claude/rules/repos/personal-brand.md: never
   retype a token, resolve it through a var()).

   Design-system rules this file is deliberately obeying:
   - Radius is zero. The only round thing on this site is the 999px pill, and
     nothing here is a pill.
   - Gold marks repair, not action. It appears here only as the top rule on a
     callout, which is the same "seam" role it plays elsewhere. No gold on body
     text, no gold backgrounds, no gold on a CTA.
   - Fraunces is roman only. Never italic, including in pull quotes, which is the
     one place a stylesheet is most tempted to reach for it. */

/* ---------------------------------------------------------- answer body */

.answer-short {
  margin-top: 1.5rem;
  color: var(--ink);
  font-weight: 500;
}

.answer-meta {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The section-title default is display-scale (up to 4.9rem). Inside a reading
   column that is far too loud for a subhead, so answers step it down. */
/* These four are scoped to #main-content on purpose. Unscoped, the descendant
   selector reaches <p class="credentials"> in the shared header and the footer
   paragraphs, and outranks their own class rules in v2.css. That shifted the
   brand lockup on answer pages only. Caught by pixel-diffing the header against
   a control copy, 2026-08-04. Do not remove #main-content. */
[data-page="answer"] #main-content .section-title.small {
  margin-top: 3.25rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
}

[data-page="answer"] #main-content h3 {
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
}

[data-page="answer"] #main-content p {
  margin-top: 1.15rem;
  line-height: 1.78;
}

.answer-list,
.answer-steps {
  margin-top: 1.35rem;
  padding-left: 1.35rem;
  color: var(--ink);
}

.answer-list > li,
.answer-steps > li {
  margin-top: 0.85rem;
  line-height: 1.72;
}

.answer-list::marker,
.answer-steps > li::marker {
  color: var(--blue);
}

/* Numerals are the one place the serif earns its keep in a list. */
.answer-steps > li::marker {
  font-family: var(--serif);
  font-weight: 600;
}

.answer-list.sources > li {
  margin-top: 0.6rem;
  font-size: 0.92rem;
}

/* ---------------------------------------------------------- pull quote */

/* Verbatim clinician language. It has to read as someone else's voice without
   becoming decorative, so: upright, blue rule, no italic, no quotation glyph. */
.pull {
  margin-top: 1.9rem;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--blue);
}

.pull p {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-style: normal;
  line-height: 1.72;
}

.pull cite {
  display: block;
  margin-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pull cite a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}

/* ---------------------------------------------------------- callout */

.callout {
  margin-top: 1.9rem;
  padding: 1.5rem 1.6rem;
  border-top: 2px solid var(--gold);
  background: var(--blue-mist);
}

.callout p {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.72;
}

.callout-label + p {
  margin-top: 0.6rem;
}

.callout-label {
  color: var(--blue);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------- index grid */

.answer-grid {
  display: grid;
  gap: 1px;
  margin-top: 2.5rem;
  padding-left: 0;
  list-style: none;
  background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.answer-card {
  padding: 1.9rem 1.75rem;
  background: var(--white);
}

.answer-card a {
  color: inherit;
  text-decoration: none;
}

.answer-card h3 {
  font: 600 clamp(1.18rem, 1.9vw, 1.45rem)/1.25 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Gold on the seam only. Marks the card as the repaired/active one, consistent
   with the nav underline and the footer top rule. Not a hover fill. */
.answer-card a:hover h3 {
  box-shadow: inset 0 -2px 0 0 var(--gold);
}

.answer-card p {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

.answer-card .answer-meta {
  margin-top: 1.15rem;
  font-size: 0.66rem;
}

@media (prefers-reduced-motion: no-preference) {
  .answer-card a h3 {
    transition: box-shadow 0.3s var(--ease);
  }
}

/* ---------------------------------------------------------- index topics */

/* Topics are labels inside one section, not sections of their own. Giving each
   its own .section paid full section padding per topic, which left a one-card
   topic floating in a screen of dead space. */
.topic-block + .topic-block {
  margin-top: 4rem;
}

/* .section-title is display scale (up to 4.9rem). Correct for a page statement,
   far too loud for "Compliance" sitting above two cards. */
.topic-title {
  font: 600 clamp(1.35rem, 2.2vw, 1.75rem)/1.15 var(--serif);
  letter-spacing: -0.02em;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------- answer h1 */

/* v2 scopes the display serif to `.page-hero h1`. An answer page's h1 lives in an
   <article>, so it was silently falling back to Inter while its own h2s rendered
   in Fraunces. That reads as a different site. Restore the serif, at reading-column
   scale rather than the 7rem hero scale. */
[data-page="answer"] #main-content h1 {
  max-width: 100%;
  font: 600 clamp(2.1rem, 4vw, 3.05rem)/1.08 var(--serif);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* ---------------------------------------------------------- ask a question */

/* The question box on the Straight Answers index. Spec: _notes/ASK-A-QUESTION-SPEC.md.
   Same discipline as the rest of this file: every value resolves through a v2
   custom property, radius is zero except the 999px pill on the button, and gold
   appears only as the top seam, the same repair role it plays on .callout. */

.ask-box {
  margin-top: 2rem;
  padding: 2.1rem 2rem 2.25rem;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  background: var(--white);
}

.ask-field { margin-top: 1.4rem; }
.ask-field:first-child { margin-top: 0; }

.ask-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ask-label span {
  margin-left: 0.4rem;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
}

.ask-box textarea,
.ask-box input[type="text"],
.ask-box input[type="email"] {
  display: block;
  width: 100%;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 0.97rem/1.6 var(--sans);
}

.ask-box textarea { min-height: 8.5rem; resize: vertical; }

.ask-box textarea:focus,
.ask-box input:focus {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

.ask-box ::placeholder { color: var(--ink-soft); }

.ask-row {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.ask-submit {
  margin-top: 1.6rem;
  padding: 0.82rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--blue-deep);
  color: var(--white);
  cursor: pointer;
  font: 700 0.82rem var(--sans);
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

.ask-submit:hover { background: var(--blue); transform: translateY(-1px); }

/* No max-width: the note has to align to the box edge. Capping it at 62ch left it
   visibly short of the box on desktop and read as ragged. */
.ask-note {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.65;
}

@media (max-width: 560px) {
  .ask-box { padding: 1.5rem 1.15rem 1.7rem; }
}

/* Netlify honeypot. Never shown, never announced. */
.ask-hp { position: absolute; left: -9999px; }
