/*
 * pages.css — the teaser's inner pages: /corrections (the public right-of-reply
 * form) and /methodology. Loaded AFTER styles.css and builds on its tokens and
 * components (.signup-section, .signup-box, .field-row, .form-msg, footer).
 * No inline styles anywhere — CSP stays `style-src 'self'`.
 */

/* A hidden panel stays hidden even when its class sets display (.form-msg is flex). */
[hidden] { display: none !important }

/* ── corrections form ── */
.page-form { min-height: calc(100vh - 64px) }
.signup-box.box-wide { max-width: 640px }
.signup-head h1 { color: #fff; font-size: clamp(26px, 4.5vw, 36px); margin-bottom: 10px }
.form-stack { display: flex; flex-direction: column; gap: 16px }

.field-row select,
.field-row textarea {
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(243,230,200,.25);
  border-radius: 8px; padding: 11px 14px; min-height: 48px;
  font-size: 16px; color: #f4e4e4; /* >=16px: no iOS focus zoom */
  font-family: inherit; width: 100%;
  transition: border-color .15s, background .15s;
}
.field-row textarea { resize: vertical; line-height: 1.5 }
.field-row select option { color: #2a1a1a; background: #fff }
.field-row textarea::placeholder { color: rgba(240,200,200,.5) }
.field-row select:focus,
.field-row textarea:focus {
  border-color: rgba(243,230,200,.6);
  background: rgba(255,255,255,.14);
}
select:focus-visible, textarea:focus-visible {
  outline: 2px solid #f5d0d0;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #2a1010;
}
.field-row select[aria-invalid="true"],
.field-row textarea[aria-invalid="true"] { border-color: #f4a0a0 }

.field-hint { margin: 0; font-size: 13px; color: #d8b8b8 }
.ts-widget { min-height: 65px }
.form-msg:focus { outline: 2px solid #f5d0d0; outline-offset: 2px }
.box-foot { margin: 24px 0 0; font-size: 14px; color: #e0c4c4; text-align: center }
.box-foot a { color: var(--cream) }

/* ── methodology (long-form document) ── */
.doc { padding: 48px 0 72px }
.doc-wrap { max-width: 820px }
.doc h1 { font-size: clamp(28px, 5vw, 42px); margin-bottom: 16px }
.doc h2 {
  font-size: clamp(21px, 3.4vw, 27px); margin: 44px 0 14px;
  padding-top: 12px; border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.doc p, .doc li { font-size: 16.5px }
.doc .lede { font-size: 18px }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 4px;
  overflow-wrap: anywhere;
}
.doc .muted, .muted { color: var(--ink-soft) }
.doc .tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--gold-ink);
  border: 1px solid var(--gold); border-radius: 20px; padding: 0 7px; margin-left: 4px;
}

.bands { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px 18px }
.bands li { display: flex; align-items: center; gap: 7px; font-size: 15px }
.band { display: inline-block; width: 14px; height: 14px; border-radius: 3px }
.band-none { background: #4f8f63 }
.band-mild { background: #93b740 }
.band-moderate { background: #e6b23a }
.band-high { background: #e8742c }
.band-severe { background: #e23b3b }

.toc {
  display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 24px 0 8px;
  padding: 14px 16px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; font-size: 14.5px;
}

.formula {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; overflow-x: auto; font-size: 14px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.table-scroll { overflow-x: auto; margin: 0 0 8px; -webkit-overflow-scrolling: touch }
.doc table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); font-size: 15px;
}
.doc caption {
  caption-side: top; text-align: left; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); padding: 0 0 6px;
}
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line) }
.doc th { background: var(--surface-2); font-size: 13.5px }
.doc td:first-child { white-space: nowrap }

.notice {
  background: var(--surface-2); border-left: 4px solid var(--gold);
  border-radius: 6px; padding: 14px 16px;
}

@media (max-width: 640px) {
  .doc { padding: 32px 0 56px }
  .doc-wrap { padding: 0 16px }
  .doc td:first-child { white-space: normal }
  .doc th, .doc td { padding: 8px }
}
