/* The static pages (About, Privacy, Terms, Refunds, Contact): one readable column on the map's own tokens, so they
   follow its colours and dark mode (app.css :root). No scripts. The server-rendered pages (pricing, account, tools,
   skills) share the same header and footer (docHeader / docFooter in server/pricing-page.js). */

/* app.css locks the page itself on wide screens (the map is a fixed app shell where only the panel scrolls). These
   pages are ordinary documents: they scroll. */
html.doc-root, html.doc-root body { height: auto; overflow: visible; }

.doc-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

.doc-head, .doc, .doc-foot { box-sizing: border-box; width: 100%; max-width: 760px; margin: 0 auto; padding-inline: var(--space-4); }
/* The header and footer are as wide on every page (the pricing page's width), whatever the column between them, so
   the name, the links and the account menu sit in the same places everywhere. */
.doc-head, .doc-foot { max-width: 1120px; }

.doc-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4);
  padding-top: var(--space-4);
}
.doc-brand {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hit);
  color: var(--ink); font-size: var(--text-lg); font-weight: var(--weight-semibold); text-decoration: none;
}
.doc-nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); }
.doc-nav { margin-left: auto; } /* with the account menu after it, the links still sit at the right */
/* The account menu on the pricing and account pages (signed in only). On a phone it stays beside the name, and the
   links take the row under them. */
.doc-account { position: relative; display: flex; }
.doc-account[hidden] { display: none; }
@media (max-width: 640px) {
  .doc-account { margin-left: auto; }
  .doc-head:has(> .doc-account:not([hidden])) .doc-nav { order: 1; flex-basis: 100%; margin-left: 0; }
}
.doc-nav a {
  display: inline-flex; align-items: center; min-height: var(--hit);
  color: var(--ink-2); font-size: var(--text-md); text-decoration: none;
}
.doc-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.doc-nav a[aria-current="page"] { color: var(--ink); font-weight: var(--weight-semibold); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

.doc { flex: 1; padding-top: var(--space-6); padding-bottom: var(--space-7); }
.doc h1 { margin: 0 0 var(--space-1); color: var(--ink); font-size: var(--text-3xl); line-height: var(--leading-tight); font-weight: var(--weight-bold); }
.doc h2 { margin: var(--space-6) 0 var(--space-2); color: var(--ink); font-size: var(--text-xl); line-height: var(--leading-snug); font-weight: var(--weight-semibold); }
.doc h3 { margin: var(--space-4) 0 var(--space-1); color: var(--ink); font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.doc p, .doc li, .doc dd { color: var(--ink-2); font-size: var(--text-lg); line-height: 1.6; }
.doc p { margin: 0 0 var(--space-3); }
.doc ul { margin: 0 0 var(--space-3); padding-left: var(--space-4); }
.doc li + li { margin-top: var(--space-1); }
.doc strong { color: var(--ink); font-weight: var(--weight-semibold); }
.doc a { color: var(--accent-text); text-underline-offset: 3px; }
.doc .lede { color: var(--ink); font-size: var(--text-xl); line-height: 1.5; }
.doc-meta { margin: 0 0 var(--space-5) !important; color: var(--muted) !important; font-size: var(--text-sm) !important; }

/* "In short" box at the top of the legal pages. */
.doc .summary {
  margin: 0 0 var(--space-5); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--surface-edge);
}
.doc .summary h2 { margin-top: 0; font-size: var(--text-lg); }
.doc .summary ul { margin-bottom: 0; }

/* The author's note on the About page: a neutral card (tint + hairline, no side bar: docs/LAYOUT.md §3), 24px from
   the lede like a page’s first card and from what follows, 24px inside (16px on a phone), the name 16px under. */
.doc .author-note {
  margin: var(--space-4) 0; padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--surface-edge);
}
.doc .author-note blockquote { margin: 0; }
.doc .author-note p { margin: 0; color: var(--ink); }
.doc .author-note figcaption { margin-top: var(--space-3); color: var(--ink-2); font-size: var(--text-md); font-style: italic; }
@media (max-width: 520px) { .doc .author-note { padding: var(--space-3); } }

/* The walkthrough video on the About page: the column's full width at 16:9 (width/height on the element keep the space
   before it loads), rounded like the cards; its caption and transcript 16px under it. The captions are in the picture,
   so the transcript is there for screen readers, search and anyone who'd rather read. */
.doc .about-video { margin: var(--space-4) 0; }
.doc .about-video video { display: block; width: 100%; height: auto; border-radius: var(--radius-md); background: var(--surface-2); }
.doc .about-video figcaption { margin-top: var(--space-3); color: var(--ink-2); font-size: var(--text-md); }
.doc .transcript { margin-top: var(--space-2); }
.doc .transcript summary { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--accent-text); font-size: var(--text-md); cursor: pointer; }
.doc .transcript p { margin: var(--space-2) 0 0; font-size: var(--text-md); }
@media (max-width: 820px) { .doc .transcript summary { min-height: var(--hit-touch); } }

/* Tables scroll sideways on a phone instead of squeezing the page. */
.table-wrap { overflow-x: auto; margin: 0 0 var(--space-3); }
.doc table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--text-md); }
.doc th, .doc td { padding: var(--space-2) var(--space-3) var(--space-2) 0; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: top; line-height: var(--leading-body); }
.doc th { color: var(--ink); font-weight: var(--weight-semibold); }
.doc td { color: var(--ink-2); }
.doc code { font-size: 0.92em; }

/* Contact: label / value pairs. */
.doc dl.contact { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-4); }
.doc dl.contact dt { color: var(--ink); font-weight: var(--weight-semibold); font-size: var(--text-lg); line-height: 1.6; }
.doc dl.contact dd { margin: 0; }
@media (max-width: 520px) {
  .doc dl.contact { grid-template-columns: 1fr; gap: 0; }
  .doc dl.contact dd { margin-bottom: var(--space-3); }
  .doc h1 { font-size: var(--text-2xl); }
}

.doc-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4);
  padding-top: var(--space-3); padding-bottom: var(--space-5); border-top: 1px solid var(--divider);
  color: var(--muted); font-size: var(--text-sm);
}
.doc-foot a { color: var(--ink-2); }
/* Pricing and the pages about UX Status, on every page (the header keeps the map, tools, skills and pricing). */
.foot-nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.foot-nav a { display: inline-flex; align-items: center; min-height: 24px; text-decoration: none; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-nav a[aria-current="page"] { color: var(--ink); font-weight: var(--weight-semibold); }
