/* ============================================================
   Rokin — document pages
   Shared stylesheet for the five content/legal pages:
     about.html · contact.html · help.html · privacy.html · terms.html

   These are Rokin-native pages, written fresh rather than carried
   over, so they do NOT repeat the inline-<style> duplication that
   the 15 migrated pages still carry (Plan.md §13.9, "known gaps").
   One sheet, five pages.

   Load order (README "Architecture rules" §1):
     tokens.css  →  brand.css  →  doc.css  →  mobile.css
   `mobile.css` is linked at the BOTTOM of <body> so its responsive
   rules win at equal specificity without !important.

   NOT linked: css/base.css. It is register.html-only — its
   `.nav-links` is absolutely positioned and would break this nav.

   Class names here are prefixed `doc-` on purpose. `.hero`,
   `.hero-stat` and friends are shared across the migrated pages
   with DIFFERENT display types per page, and writing a rule for a
   shared name is how the mobile bugs in Plan.md §13.12/§13.13
   happened. New names cannot collide.
   ============================================================ */

/* ── Reset / base ───────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Archivo', sans-serif;
  color: var(--text-primary);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Typography weights, matching the site-wide rule carried on every page. */
h1 { font-weight: 400; }
h2, h3, h4 { font-weight: 500; }
body, p, li, td, th, span, label { font-weight: 400; }

/* ── Nav ───────────────────────────────────────────────────
   Deliberately empty. The nav lives in `css/nav.css`, linked before
   this file on every page that has one. Redefining `nav`, `.logo`,
   `.nav-links` or the CTA here would silently win on these six pages
   and put the drift straight back. */

/* ── Page hero ─────────────────────────────────────────────── */
.doc-hero {
  background: var(--navy);
  color: var(--white);
  padding: 68px 2.5rem;
  text-align: center;
}

.doc-hero .doc-eyebrow {
  color: var(--accent-light);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.doc-hero h1 {
  font-size: 44px;
  line-height: 1.1;
  max-width: 760px;
  margin: 0 auto 16px;
}

.doc-hero p {
  color: #c9cae0;
  font-size: 17px;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

/* ── Shell ─────────────────────────────────────────────────── */
.doc-wrap { max-width: 1080px; margin: 0 auto; padding: 64px 2.5rem; }
.doc-wrap--narrow { max-width: 820px; }

.doc-section-eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

/* ── Placeholder notice ─────────────────────────────────────
   These pages ship with generic scaffolding text, not reviewed
   copy. The banner is deliberately loud: the legal pages must
   never be mistaken for binding terms that someone has approved.
   Delete the banner and the .doc-fill markers together, once the
   real copy lands. */
.doc-notice {
  border: 1px solid var(--warning);
  border-left-width: 3px;
  background: #fdf8ef;
  padding: 16px 20px;
  margin-bottom: 40px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.doc-notice svg { color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.doc-notice strong { display: block; font-size: 14px; color: var(--navy); margin-bottom: 4px; font-weight: 600; }
.doc-notice p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; }

/* An inline slot awaiting a real value — company entity, address,
   jurisdiction, a date. Visually obvious so none ship by accident:
   `grep -c doc-fill *.html` counts what is still outstanding. */
.doc-fill {
  background: var(--accent-tint);
  color: var(--accent);
  padding: 1px 6px;
  font-size: 0.92em;
  font-weight: 600;
  /* Must wrap. Some slots are a full sentence ("[the greater of the fees you
     paid us in the 12 months before the claim, or $X]"), and `nowrap` on
     those pushed terms.html to a 1132px document on a 390px phone. */
  overflow-wrap: break-word;
}

/* ── Prose ─────────────────────────────────────────────────── */
.doc-meta {
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.doc-prose h2 {
  font-size: 22px;
  color: var(--navy);
  margin: 44px 0 14px;
  padding-top: 8px;
  scroll-margin-top: 84px; /* clears the sticky nav on anchor jumps */
}

.doc-prose h2:first-child { margin-top: 0; }
.doc-prose h3 { font-size: 16px; color: var(--navy); margin: 24px 0 8px; font-weight: 600; }

.doc-prose p,
.doc-prose li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.doc-prose p { margin-bottom: 14px; }
.doc-prose ul, .doc-prose ol { margin: 0 0 16px 22px; }
.doc-prose li { margin-bottom: 8px; }
.doc-prose strong { color: var(--navy); font-weight: 600; }
.doc-prose a { color: var(--accent); }

/* ── Table of contents ─────────────────────────────────────── */
.doc-toc {
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 24px 26px;
  margin-bottom: 40px;
}

.doc-toc h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 14px;
}

.doc-toc ol {
  list-style: none;
  columns: 2;
  column-gap: 32px;
  margin: 0;
}

.doc-toc li { margin-bottom: 8px; break-inside: avoid; }

.doc-toc a {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.5;
}

.doc-toc a:hover { color: var(--accent); }

/* ── Card grids ────────────────────────────────────────────── */
.doc-grid { display: grid; gap: 20px; }
.doc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.doc-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.doc-card {
  border: 1px solid var(--border);
  padding: 26px;
  background: var(--white);
  transition: border-color var(--t-hover), box-shadow var(--t-hover);
}

.doc-card--link { text-decoration: none; display: block; }
.doc-card--link:hover { border-color: var(--border-hover); box-shadow: var(--card-shadow); }

.doc-card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.doc-card h3 { font-size: 17px; color: var(--navy); margin-bottom: 8px; font-weight: 600; }
.doc-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.doc-card a { color: var(--accent); text-decoration: none; font-weight: 600; }
.doc-card a:hover { text-decoration: underline; }

.doc-card-num {
  width: 34px;
  height: 34px;
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* ── Split feature row ─────────────────────────────────────── */
.doc-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
  margin-top: 56px;
}

.doc-split h2 { font-size: 30px; color: var(--navy); margin-bottom: 16px; }
.doc-split p { font-size: 15px; color: var(--text-secondary); line-height: 1.75; margin-bottom: 14px; }

.doc-panel { background: var(--cream); border: 1px solid var(--border); padding: 32px; }
.doc-panel h3 { font-size: 17px; color: var(--navy); margin-bottom: 14px; font-weight: 600; }

.doc-list { list-style: none; }
.doc-list li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 10px 0 10px 26px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.doc-list li:last-child { border-bottom: none; }
.doc-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* ── Definition rows (contact details, response times) ─────── */
.doc-rows { border: 1px solid var(--border); }
.doc-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.doc-row:last-child { border-bottom: none; }
.doc-row .k { color: var(--text-secondary); }
.doc-row .v { color: var(--navy); font-weight: 600; text-align: right; }

/* ── Forms (contact.html) ──────────────────────────────────── */
.doc-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 30px;
}

.doc-field { margin-bottom: 18px; }
.doc-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.doc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.doc-field input,
.doc-field select,
.doc-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color var(--t-focus);
}

.doc-field input:focus,
.doc-field select:focus,
.doc-field textarea:focus { outline: none; border-color: var(--accent); }

.doc-field textarea { min-height: 130px; resize: vertical; }
.doc-field .doc-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Honeypot: off-screen for humans, catches naive bots (Plan.md §5). */
.doc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.doc-form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  font-size: 13.5px;
  color: var(--navy);
  line-height: 1.6;
}

.doc-form-status.show { display: block; }
.doc-form-status a { color: var(--accent); font-weight: 600; }

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 13px 26px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--t-hover);
}
.btn-navy:hover { background: var(--navy-mid); }

.btn-outline {
  background: none;
  border: 1px solid var(--navy);
  color: var(--navy);
  padding: 13px 26px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--t-hover);
}
.btn-outline:hover { background: var(--cream); }

.btn-block { width: 100%; display: block; }

/* ── FAQ (help.html) ───────────────────────────────────────── */
.doc-faq-search { position: relative; max-width: 520px; margin: 0 auto; }

.doc-faq-search input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
}

.doc-faq-search input::placeholder { color: rgba(255,255,255,0.5); }
.doc-faq-search input:focus { outline: none; border-color: var(--accent-light); }

.doc-faq-search svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}

.doc-faq-group { margin-bottom: 40px; }

.doc-faq-group h2 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 84px;
}

.doc-faq { border: 1px solid var(--border); margin-bottom: -1px; }

.doc-faq summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.doc-faq summary::-webkit-details-marker { display: none; }

.doc-faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
}

.doc-faq[open] summary::after { content: "–"; }
.doc-faq summary:hover { background: var(--cream); }

.doc-faq-body { padding: 0 20px 18px; }
.doc-faq-body p { font-size: 14.5px; color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; }
.doc-faq-body p:last-child { margin-bottom: 0; }
.doc-faq-body a { color: var(--accent); }

.doc-faq-empty {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.doc-faq-empty.show { display: block; }

/* ── Blog (blog.html + blog-post.html) ─────────────────────── */

/* Category filter chips. Same client-side-filter idea as the help
   FAQ search: no backend, it just hides cards that do not match. */
.doc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }

.doc-chip {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--t-hover);
}

.doc-chip:hover { border-color: var(--border-hover); color: var(--navy); }
.doc-chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* Featured post — image left, copy right, collapsing to stacked on mobile. */
.doc-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid var(--border);
  margin-bottom: 40px;
  text-decoration: none;
  transition: border-color var(--t-hover), box-shadow var(--t-hover);
}

.doc-feature:hover { border-color: var(--border-hover); box-shadow: var(--card-shadow); }
.doc-feature-img { position: relative; min-height: 320px; overflow: hidden; }

.doc-feature-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.doc-feature-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.doc-feature-body h2 { font-size: 28px; color: var(--navy); line-height: 1.2; margin-bottom: 14px; }
.doc-feature-body p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 18px; }

/* Post cards */
.doc-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.doc-post {
  border: 1px solid var(--border);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  background: var(--white);
  transition: border-color var(--t-hover), box-shadow var(--t-hover);
}

.doc-post:hover { border-color: var(--border-hover); box-shadow: var(--card-shadow); }
.doc-post-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--cream); }
.doc-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-post-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.doc-post-body h3 { font-size: 17px; color: var(--navy); line-height: 1.35; margin-bottom: 10px; font-weight: 600; }
.doc-post-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 16px; flex: 1; }

/* Category + date line, used on cards and on the article header. */
.doc-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.doc-tag {
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
}

.doc-post-foot { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: auto; }

.doc-empty-posts {
  display: none;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 15px;
  border: 1px solid var(--border);
}

.doc-empty-posts.show { display: block; }

/* ── Article (blog-post.html) ──────────────────────────────── */
.doc-article { max-width: 720px; margin: 0 auto; }

.doc-article-head { text-align: center; margin-bottom: 36px; }
.doc-article-head h1 { font-size: 40px; color: var(--navy); line-height: 1.15; margin: 14px 0 18px; }
.doc-article-head .doc-post-meta { justify-content: center; }

.doc-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.doc-byline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.doc-byline-name { font-size: 14px; font-weight: 600; color: var(--navy); }
.doc-byline-role { font-size: 12px; color: var(--text-muted); }

.doc-article-img { margin: 0 0 36px; }
.doc-article-img img { width: 100%; height: auto; display: block; }
.doc-article-img figcaption { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; text-align: center; }

/* A lead paragraph, one step up in size from the body. */
.doc-lead { font-size: 18px !important; color: var(--navy) !important; line-height: 1.65 !important; }

.doc-pullquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin: 28px 0;
  font-size: 19px;
  color: var(--navy);
  line-height: 1.5;
}

.doc-article-foot {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.doc-back { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.doc-back:hover { text-decoration: underline; }

/* ── Closing CTA ───────────────────────────────────────────── */
.doc-cta { text-align: center; margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--border); }
.doc-cta h2 { font-size: 28px; color: var(--navy); margin-bottom: 12px; }
.doc-cta p { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }
.doc-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ─────────────────────────────────────────────────
   Same four-column footer the migrated pages carry, so these
   pages sit inside the same site rather than beside it. */
footer { background: var(--navy); color: rgba(255,255,255,0.55); padding: 3.5rem 2.5rem 2rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

.footer-tagline { font-size: 14px; line-height: 1.65; max-width: 260px; }

.footer-col-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }

.footer-links a {
  text-decoration: none;
  font-size: 13px;
  color: rgba(255,255,255,0.48);
  transition: color var(--t-hover);
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}
