/* Text pages (topics, resources, about, contact, privacy, 404, thank-you) in
   the look of the Sep 2026 chat redesign. Loaded after styles.css on those
   pages only; the homepage's equivalents live in chat-release.css. */

/* Same palette as body.chat-release */
:root {
  --bg: #fdfdfb; --bg-soft: #f3f3f0; --bg-elev: #fff;
  --text: #252622; --text-soft: #62645e; --text-faint: #73766f;
  --accent: #5276ac; --accent-hover: #416394; --accent-soft: #edf2f8; --accent-border: #d6e0ed;
  --border: #e7e8e3; --border-strong: #d8d9d3;
}
html.dark {
  --bg: #20211f; --bg-soft: #282a27; --bg-elev: #292b28;
  --text: #eeefea; --text-soft: #b9bcb4; --text-faint: #a1a59b;
  --accent: #9ab8e2; --accent-hover: #bdd0eb; --accent-soft: #2d3845; --accent-border: #3c4a5c;
  --border: #3b3e37; --border-strong: #4a4d45;
}

/* Header: the chat's wordmark, reading-page links, and a way back to asking */
.header-inner { max-width: 1000px; padding: 12px 20px; }
.brand { gap: 0; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.brand-name .brand-ai { color: var(--text-soft); font-weight: 400; }
nav#site-nav a.active { background: var(--accent-soft); color: var(--accent); }
.ask-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 0.88rem; font-weight: 500; text-decoration: none;
  transition: background 0.15s ease;
}
.ask-btn:hover { background: var(--accent-hover); color: #fff; }
html.dark .ask-btn, html.dark .ask-btn:hover { color: var(--bg); }
.ask-btn svg { display: block; }

/* Typography: the chat's lighter, tighter headings */
main.page { line-height: 1.75; }
main.page h1 { font-weight: 600; letter-spacing: -0.035em; line-height: 1.2; }
main.page h2 { font-weight: 600; letter-spacing: -0.02em; }
main.page h3 { font-weight: 600; }
main.page a { color: var(--accent); }
main.page a:hover { color: var(--accent-hover); }
/* Buttons are links too; keep their text readable on the accent fill */
main.page a.btn-primary, main.page a.btn-primary:hover { color: #fff; text-decoration: none; }
html.dark .btn-primary, html.dark .btn-primary:hover,
html.dark main.page a.btn-primary, html.dark main.page a.btn-primary:hover { color: var(--bg); }

/* Card lists sit flush with the text column (main.page ul indents plain lists) */
main.page ul.topic-list { padding-left: 0; }
main.page .topic-list a, main.page .resource-card a { color: inherit; }
main.page .topic-list a { box-shadow: none; }
main.page .topic-list a:hover { color: var(--accent); }

/* Resources page: the whole card is the tap target (most readers are on phones),
   titles are marked as outside links, and the featured books show their covers */
.resource-card { position: relative; align-items: center; }
main.page .resource-card a.resource-link { color: var(--text); text-decoration: none; }
main.page .resource-card a.resource-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
main.page .resource-card a.resource-link strong::after { content: ' ↗'; font-weight: 400; color: var(--text-faint); }
main.page .resource-card a.resource-sub { position: relative; z-index: 1; color: var(--accent); }
.resource-card:focus-within { border-color: var(--accent); }
.resource-cover { flex-shrink: 0; width: 72px; height: auto; border-radius: 4px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.18); }
main.page .resource-card p { margin: 0; }
main.page .resource-card .resource-subtitle { color: var(--text-soft); line-height: 1.5; margin: 2px 0 6px; }
main.page .resource-card .resource-meta { font-size: 0.88rem; color: var(--text-faint); }
main.page .section-note { margin: -0.4em 0 0.8em; font-size: 0.95rem; color: var(--text-faint); }

/* Contact form: opt-in checkbox (checked by default, easy to uncheck) */
#contact-form .contact-optin { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; font-weight: 400; color: var(--text-soft); cursor: pointer; }
#contact-form .contact-optin input[type="checkbox"] { flex-shrink: 0; width: 18px; height: 18px; margin: 3px 0 0; padding: 0; accent-color: var(--accent); cursor: pointer; }

/* Stay in touch: quiet links, the sign-up form, and the thank-you page */
main.page .stay-note { margin-top: 2em; font-size: 0.92rem; color: var(--text-faint); }
.updates-form { display: flex; flex-direction: column; gap: 6px; max-width: 460px; margin-top: 8px; }
.updates-form label { font-weight: 500; font-size: 0.92rem; margin-top: 12px; color: var(--text); }
.updates-form input { padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-elev); color: var(--text); font: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.updates-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.updates-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.updates-form button { margin-top: 18px; align-self: flex-start; padding: 11px 24px; background: var(--accent); color: #fff; border: none; border-radius: 999px; font: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: background 0.15s ease; }
.updates-form button:hover { background: var(--accent-hover); }
html.dark .updates-form button { color: var(--bg); }
main.page .updates-fine { margin-top: 14px; font-size: 0.85rem; color: var(--text-faint); }
main.page .updates-error { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); }
.updates-thanks .thanks-blessing { max-width: 520px; margin: 8px auto 28px; padding: 16px 20px; border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--bg-soft); text-align: left; }
.updates-thanks .thanks-blessing p { margin: 0 0 8px; color: var(--text); line-height: 1.7; }
.updates-thanks .thanks-blessing cite { font-style: normal; font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.updates-thanks .thanks-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: center; }
.updates-thanks .thanks-secondary { color: var(--accent); }

@media (max-width: 760px) {
  .header-inner { padding: 10px 14px; gap: 8px; }
  .ask-btn { padding: 7px 12px; }
  main.page h1 { font-size: 1.75rem; }
}

/* Topic pages: "Share this page" (added by components.js), styled as a quiet link */
main.page .share-note { margin-top: 2em; font-size: 0.92rem; color: var(--text-faint); }
main.page .share-note + .stay-note { margin-top: 0.4em; }
.share-note .share-page { padding: 0; border: none; background: none; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.share-note .share-page:hover { color: var(--accent-hover); }

/* About: comparison table (scrolls sideways on narrow screens) */
main.page .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.6em 0 0.4em; }
main.page .compare-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
main.page .compare-table .col-note { display: block; font-weight: 400; font-size: 0.8em; color: var(--text-faint); }
main.page .compare-table th, main.page .compare-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: top; }
main.page .compare-table thead th { font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border-strong); }
main.page .compare-table tbody th { text-align: left; font-weight: 400; color: var(--text); }
main.page .compare-table td:nth-child(2), main.page .compare-table thead th:nth-child(2) { font-weight: 600; }
main.page ol li { margin-bottom: 0.4em; }
@media (max-width: 560px) {
  main.page .compare-table { font-size: 0.8rem; }
  main.page .compare-table th, main.page .compare-table td { padding: 7px 4px; }
  main.page .compare-table tbody th { width: 40%; }
}
