/* ============================================================
   info.css — Phase 5 static / informational pages.

   Five surfaces share this file: /about, /faq, /termsofuse,
   /error, /guides, /rivers, /contact. Prose-heavy pages needed
   one new layout pattern (an authored-text column at a reading
   measure) but the rest — headings, buttons, banners — reuse
   the alerts + components vocabulary.

   Intentional constraints:
   - No new colors. Every value here is a token.css reference.
   - No new spacing. Token scale only.
   - Prose body size sits between alerts-form body (15px) and
     dense-data rows (13.5px). 16px is a reading-comfortable size
     without needing a dedicated type ramp.
   ============================================================ */

.info-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-5) var(--space-10);
}

.info-hero {
  margin-bottom: var(--space-7);
}
.info-hero h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}
.info-hero p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

/* Shared prose column. Reading measure capped at ~65ch via the
   wrap width above; line-height tuned for long-form over
   data-dense. */
.info-prose {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
}
.info-prose h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: var(--space-8) 0 var(--space-4);
  color: var(--text-primary);
}
.info-prose h2:first-child {
  margin-top: 0;
}
.info-prose h3 {
  font-size: 17px;
  font-weight: 600;
  margin: var(--space-6) 0 var(--space-3);
  color: var(--text-primary);
}
.info-prose p {
  margin: 0 0 var(--space-5);
}
.info-prose p:last-child {
  margin-bottom: 0;
}
.info-prose a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.info-prose a:hover {
  color: var(--link-hover);
}
.info-prose ul,
.info-prose ol {
  margin: 0 0 var(--space-5);
  padding-left: var(--space-7);
}
.info-prose li {
  margin-bottom: var(--space-2);
}
.info-prose li:last-child {
  margin-bottom: 0;
}
.info-prose strong {
  font-weight: 600;
}
.info-prose em {
  font-style: italic;
  color: var(--text-primary);
}
.info-prose code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  white-space: nowrap;
}

/* Cookie inventory table on /termsofuse#cookies. Standard prose
   table — readable column widths, subtle dividers, monospace
   for the cookie name column. The 4-column layout has a
   min-content width ~576px (verbose PURPOSE copy), so the
   table is wrapped in `.info-cookie-table-wrap` which
   overflow-scrolls horizontally on narrow viewports rather
   than blowing out the page width. Closure S4 R1 fix. */
.info-cookie-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 var(--space-5);
}
.info-cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
}
.info-cookie-table th,
.info-cookie-table td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.info-cookie-table th {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.info-cookie-table td code {
  font-size: 13px;
}
.info-cookie-table tbody tr:last-child td {
  border-bottom: none;
}

/* Success banner on /contact?sent=1. Uses the status-good palette
   since a successful send is the affirmative equivalent of a
   good-flow pill. */
.info-banner-success {
  background: var(--status-good-bg);
  color: var(--status-good-fg);
  border: 1px solid color-mix(in srgb, var(--status-good-dot) 30%, transparent);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  font-size: 14px;
  line-height: 1.4;
}

/* --- /error ---------------------------------------------------
   Centered block; minimal chrome. Doubles as 404. */
.info-error {
  text-align: center;
  padding-top: var(--space-10);
}
.info-error h1 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
}
.info-error p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 var(--space-7);
}
.info-error-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- /guides --------------------------------------------------
   Card-list pattern — one row per PDF, each with its region
   label. Reuses the alerts-row grid shape but owns its own
   class so the alerts-wrap padding rules don't bleed in. */
.guides-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.guides-row {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-1);
  padding: var(--space-5);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: center;
}
.guides-row-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.guides-row-region {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.guides-row-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.guides-row-title a {
  color: inherit;
  text-decoration: none;
}
.guides-row-title a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guides-row-meta {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 2px;
}
.guides-intro {
  margin: 0 0 var(--space-7);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

/* --- /rivers --------------------------------------------------
   Alphabetical index. Each bucket has a large letter header
   followed by a fluid-columned name list. Columns collapse to
   one on narrow viewports. */
.rivers-intro {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0 0 var(--space-7);
}
.rivers-jump {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-1);
}
.rivers-jump a {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}
.rivers-jump a:hover {
  background: var(--brand-050);
  color: var(--link-hover);
}
.rivers-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.rivers-group h2 {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-2);
}
.rivers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-2) var(--space-5);
}
.rivers-list li {
  margin: 0;
}
.rivers-list a {
  display: block;
  padding: var(--space-2) 0;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
}
.rivers-list a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- /contact -------------------------------------------------
   Uses the alerts-form primitives. Only the textarea needs its
   own height rule — alerts.css input styles don't cover it.

   The form sits below an `.info-prose` block; its bottom margin
   is collapsed by the trailing `<p>:last-child` rule, leaving
   the form flush against the prose. Restore visible breathing
   room by pushing the form down by --space-7. */
.info-contact .alerts-form {
  margin-top: var(--space-7);
}
.info-contact textarea {
  font: inherit;
  font-size: 15px;
  min-height: 160px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-raised);
  color: var(--text-primary);
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.5;
}
.info-contact textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--brand-500) 50%, transparent);
  outline-offset: 1px;
  border-color: var(--brand-500);
}

@media (max-width: 559.98px) {
  .info-wrap {
    padding: var(--space-5) var(--space-4) calc(var(--tabbar-height) + var(--space-7));
  }
  .info-hero h1 {
    font-size: 26px;
  }
  .info-prose {
    font-size: 15.5px;
  }
  .guides-row {
    grid-template-columns: 1fr;
  }
  .rivers-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .info-contact textarea {
    font-size: 16px; /* iOS zoom guard */
  }
}
