/* Shared page chrome for the app pages (manage, custom-domains, report, terms,
   privacy): same header, title, section headings and footer as the homepage
   (index.html). Linked AFTER each page's inline <style>, so it wins on ties.
   Each page sets its reading column with --col on :root. */
body { display: block; min-height: 100vh; padding: var(--s5) var(--s5) var(--s6); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; }
.wrap > :not(.site-head):not(.site-foot) { max-width: var(--col, 640px); margin-left: auto; margin-right: auto; }

/* header: identical to the homepage */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin: 0; padding-bottom: var(--s5); border-bottom: 1px solid var(--border); }
.wordmark { font-family: var(--mono); font-weight: 700; letter-spacing: .06em; color: var(--text); text-decoration: none; white-space: nowrap; }
.wordmark .sl { color: var(--accent); }
.brand { font-size: 14px; }
.site-nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); justify-content: flex-end; }
.nav-link { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--text-dim); text-decoration: none; display: inline-block; padding: 10px 0; transition: color .15s; }
.nav-link:hover, .nav-link[aria-current] { color: var(--text); }

/* page title: eyebrow + sans headline, as on the homepage */
.page-head { margin-top: var(--s7); margin-bottom: var(--s6); }
.eyebrow { font-family: var(--mono); font-size: .74rem; font-weight: 400; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); margin: 0 0 var(--s3); }
h1 { font-family: var(--sans); font-size: clamp(2rem, 4.4vw, 2.75rem); font-weight: 600; line-height: 1.05; letter-spacing: -.022em; color: var(--text); margin: 0; }
.page-head .lede, .page-head .updated { margin-top: var(--s4); }

/* footer: identical to the homepage (links, then copyright + version) */
.site-foot { margin-top: var(--s8); font-family: var(--mono); font-size: .72rem; display: grid; justify-items: center; gap: var(--s2); border: 0; padding: 0; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1) var(--s5); }
.foot-links a { color: var(--text-dim); text-decoration: none; padding: 4px 0; }
.foot-links a:hover { color: var(--text); }
.foot-meta { margin: 0; color: var(--text-faint); display: flex; gap: var(--s4); }
@media (max-width: 520px) { .foot-links { column-gap: var(--s3); } }

@media (max-width: 640px) { .site-nav .opt { display: none; } }
/* Phones: same tight top as the homepage (index.html, approved 2026-11-09). */
@media (max-width: 460px) {
  body { padding: var(--s4) var(--s4) var(--s5); }
  .site-head { padding-bottom: var(--s4); }
  .page-head { margin-top: var(--s5); }
}

/* external-link arrow is dropped on the current page */
.nav-link[aria-current] .ext { display: none; }

/* docs sub-nav (partials/docs-nav.html) */
.docs-nav { display: flex; gap: 0 var(--s5); margin-top: var(--s2); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.docs-nav::-webkit-scrollbar { display: none; }
.docs-nav a { color: var(--text-dim); text-decoration: none; font-size: .9rem; padding: 12px 0 8px; border-bottom: 2px solid transparent; }
.docs-nav a:hover { color: var(--text); }
.docs-nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }

/* content pages (docs, use cases): column hugs the header's left edge instead of centring */
.wrap-left > :not(.site-head):not(.site-foot) { margin-left: 0; margin-right: 0; }
.wrap-left .hero { margin-top: var(--s7); }
@media (max-width: 460px) { .wrap-left .hero { margin-top: var(--s5); } }

/* short pages (manage): keep the footer on the bottom edge instead of floating mid-screen.
   Opt-in with <div class="wrap pin"> so long pages keep their normal block flow and margin collapsing. */
.wrap.pin { display: flex; flex-direction: column; min-height: calc(100vh - var(--s5) - var(--s6)); min-height: calc(100dvh - var(--s5) - var(--s6)); }
.wrap.pin > :not(.site-head):not(.site-foot) { width: 100%; }
.wrap.pin > .site-foot { margin-top: auto; padding-top: var(--s8); }
@media (max-width: 460px) { .wrap.pin { min-height: calc(100vh - var(--s4) - var(--s5)); min-height: calc(100dvh - var(--s4) - var(--s5)); } }

/* selects: inset chevron (the native arrow sits flush against the border) */
select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa39a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }

/* legal docs (terms, privacy): reading column + sticky "On this page" rail, aligned to the header's edges */
.wrap > div.doc-grid:not(.x):not(.y) { max-width: none; margin-left: 0; margin-right: 0; display: grid; grid-template-columns: minmax(0, 680px) 15rem; justify-content: space-between; gap: var(--s8); align-items: start; }
.toc { position: sticky; top: var(--s5); margin-top: var(--s7); font-size: .8rem; }
.toc .toc-label { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--text-faint); margin: 0 0 var(--s3); display: block; }
.toc a { display: block; color: var(--text-dim); text-decoration: none; padding: 6px 0 6px var(--s3); border-left: 1px solid var(--border); line-height: 1.4; text-wrap: pretty; }
.toc a:hover { color: var(--text); border-left-color: var(--accent); }
.doc section { scroll-margin-top: var(--s5); }
@media (max-width: 960px) { .wrap > div.doc-grid:not(.x):not(.y) { display: block; } .toc { display: none; } }
