/* Red Stet — shared stylesheet for the three documentation HUBS.
 *
 *   /help/     — how to use the tool
 *   /science/  — methodology
 *   /policy/   — posture (privacy, security, FERPA)
 *
 * Loaded after /landing.css (site chrome) and /tokens.css (the single
 * token definition). Declares no custom properties, same as its two
 * siblings /landing.css and /static.css.
 *
 * PROVENANCE: every rule down to the "hub additions" divider was
 * extracted VERBATIM from the inline <style> block in help/index.html
 * on 2026-08-07, when /science/ and /policy/ were rebuilt onto the same
 * interaction (peer cards that jump down the page, category sections,
 * audience chips). The alternative was a second and third copy of 265
 * lines of card CSS; this repo has a standing rule against that.
 *
 * /static.css is the sibling sheet for ARTICLE pages (.help-doc). This
 * one is for the hub shells (.help-hub). A page loads one or the other,
 * never both.
 *
 * Change a rule here and you change three pages.
 */

/* ─── Help hub layout ─────────────────────────────────────────── */

.help-hub {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

.hub-head {
  max-width: 760px;
  margin: 0 auto 40px;
}
.hub-head .eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: 14px;
}
.hub-head h1 {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 14px;
}
.hub-head .lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 28px;
}
.hub-head .back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--ink-2);
}

/* ─── Persona filter chips ────────────────────────────────────── */

.persona-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 6px;
  background: rgba(0,0,0,0.04);
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
}
.persona-chip {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.persona-chip:hover {
  color: var(--ink);
}
.persona-chip.is-active {
  background: var(--red);
  color: var(--paper);
}
.persona-chip.is-active:hover {
  color: var(--paper);
}

/* ─── Documentation peers — Help / Methodology / Policy ──────── */
/* Three category cards above the persona filter, surfacing the
   /science/ methodology site and the policy posture pages as
   first-class peers to the existing how-to-use docs. */
.doc-peers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 8px;
}
@media (max-width: 760px) {
  .doc-peers { grid-template-columns: 1fr; }
}
.peer-card {
  display: block;
  padding: 22px 24px;
  background: white;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 120ms ease, transform 120ms ease;
}
.peer-card:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.peer-card-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.peer-card-title {
  font-family: var(--display);
  font-size: 19px;
  margin: 0 0 6px;
  line-height: 1.25;
}
.peer-card-sub {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 10px;
}
.peer-card-arrow {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
}
.peer-card-help     { background: white; }
.peer-card-science  { background: #faf8f2; }
.peer-card-policy   { background: #f6efe1; }

/* ─── Doc sections + cards ────────────────────────────────────── */

.doc-section {
  margin-top: 56px;
}
.doc-section[hidden] {
  display: none;
}
.doc-section-head {
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.doc-section-head h2 {
  font-family: var(--display);
  font-size: 24px;
  margin: 0;
  line-height: 1.2;
}
.doc-section-head .section-hint {
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 0;
}
.doc-section-divider {
  height: 1px;
  background: rgba(0,0,0,0.10);
  margin: 14px 0 22px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 18px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  background: var(--paper-2);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  position: relative;
}
.doc-card[hidden] { display: none; }
.doc-card:hover {
  border-color: var(--red);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.doc-card.is-soon {
  cursor: default;
  opacity: 0.65;
}
.doc-card.is-soon:hover {
  border-color: rgba(0,0,0,0.10);
  transform: none;
  box-shadow: none;
}
.doc-card h3 {
  font-size: 16.5px;
  margin: 0;
  line-height: 1.25;
  font-weight: 600;
}
.doc-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
}
.doc-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  font-weight: 600;
}
.doc-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.doc-status.is-ready {
  background: var(--red);
  color: var(--paper);
}
.doc-status.is-soon {
  background: rgba(0,0,0,0.10);
  color: var(--ink-2);
}
.doc-audiences {
  color: var(--ink-2);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11.5px;
}

/* ─── Empty state for a persona with no docs yet ─────────────── */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-2);
  border: 1px dashed rgba(0,0,0,0.15);
  border-radius: 8px;
  margin-top: 32px;
}
.empty-state[hidden] { display: none; }
.empty-state h2 {
  font-family: var(--display);
  font-size: 22px;
  margin: 0 0 8px;
}
.empty-state p {
  margin: 0;
  font-size: 14.5px;
}

/* ═══════════════════════════════════════════════════════════════════
 * HUB ADDITIONS — not in the help original.
 *
 * Three rules, added when /science/ and /policy/ adopted this shell.
 * ═══════════════════════════════════════════════════════════════════ */

/* The "pops down the page" heading each peer card anchors to. This was
   an inline style attribute on help's <h2 id="help-tier-1">, copied
   nowhere because there was one hub. There are three now. */
.hub-tier-h {
  font-family: var(--display);
  font-size: 26px;
  margin: 56px 0 6px;
  scroll-margin-top: 24px;
}
.hub-tier-lede {
  margin-top: 4px;
}

/* Orientation prose that belongs to a section rather than to a card —
   the "Start here" framing on /science/ and /policy/. Same left-rule
   treatment the methodology page has always used for its intro. */
.hub-callout {
  background: rgba(0,0,0,0.03);
  border-left: 3px solid var(--ink);
  padding: 22px 26px;
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  border-radius: 0 8px 8px 0;
}
.hub-callout[hidden] { display: none; }
.hub-callout p { margin: 0 0 14px; }
.hub-callout p:last-child { margin-bottom: 0; }

/* Confidence tiers on /science/ cards, and the neutral "method" pill.
   These reuse the .doc-status pill geometry above rather than the
   .science-card-conf shape they replace.

   The five .conf-* rules these supersede carried PRIVATE HEX COPIES of
   the tone palette — #2c7d4d, #c98a1a, #b83829 — declared in
   science/index.html and nowhere else. The amber was 2.62:1, the worst
   contrast on the site, on the labels that tell a reader how much to
   trust a claim. They point at the tokens now, which is why
   scripts/check-contrast.mjs can see them. */
.doc-status.is-well       { background: var(--tone-good-wash);   color: var(--tone-good); }
.doc-status.is-moderate,
.doc-status.is-emerging,
.doc-status.is-mixed      { background: var(--tone-warn-wash);   color: var(--tone-warn); }
.doc-status.is-experimental { background: var(--tone-danger-wash); color: var(--tone-danger); }
.doc-status.is-method,
.doc-status.is-doc        { background: rgba(0,0,0,0.10);        color: var(--ink-2); }

/* Closing framing block — sits outside the filtered sections, so it is
   the one thing on a hub that every chip leaves in place. */
.hub-closing {
  max-width: 760px;
  margin: 64px auto 0;
}
