/*
 * getlinkup.co: shared styles for every page. Palette A from .design/sections/theme.md (the web mirror of the app's tokens),
 * light and dark. Page-specific styles live in the page (legal pages) or in home.css (the home page).
 *
 * Coral is #E8452A on the web, not the app's #FF5A3C: small white text on #FF5A3C is too faint on a web page.
 */

@font-face { font-family: Nunito; font-weight: 800; font-style: normal; font-display: swap; src: url(/fonts/nunito-800.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 900; font-style: normal; font-display: swap; src: url(/fonts/nunito-900.woff2) format('woff2'); }

:root {
  --ground: #FFFFFF; --band: #CFEFDC; --band-deep: #B6E0C8; --park: #A9DEC0; --road: #FFFFFF;
  --mist: #F1F7F3; --line: #E4EEE8; --ink: #231A33; --subtle: #6F6680;
  --coral: #E8452A; --coral-soft: #FFE1D9; --lilac-soft: #F3EAFD; --sun-soft: #FFF0C7; --sky-soft: #E6F3FF; --green-soft: #DDF7E6;
  --cta-ink: #231A33; --cta-text: #FFFFFF;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0C0912; --band: #173326; --band-deep: #1F4231; --park: #24503A; --road: rgba(255,255,255,.5);
    --mist: #1A1426; --line: rgba(255,255,255,.12); --ink: #F4F1F8; --subtle: #B3AABF;
    --coral: #FF7A60; --coral-soft: #3A1E18; --lilac-soft: #241B33; --sun-soft: #3A2F12; --sky-soft: #132433; --green-soft: #12301F;
    --cta-ink: #F4F1F8; --cta-text: #0C0912;
  }
}
:root[data-theme="dark"] {
  --ground: #0C0912; --band: #173326; --band-deep: #1F4231; --park: #24503A; --road: rgba(255,255,255,.5);
  --mist: #1A1426; --line: rgba(255,255,255,.12); --ink: #F4F1F8; --subtle: #B3AABF;
  --coral: #FF7A60; --coral-soft: #3A1E18; --lilac-soft: #241B33; --sun-soft: #3A2F12; --sky-soft: #132433; --green-soft: #12301F;
  --cta-ink: #F4F1F8; --cta-text: #0C0912;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3, h4 { font-family: Nunito, -apple-system, sans-serif; line-height: 1.25; }
a { color: var(--coral); text-underline-offset: 2px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.vhide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--ground); padding: 8px 12px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

/* The logo row: the app icon + the wordmark, linking home. */
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: Nunito, sans-serif; font-weight: 900; font-size: 18px; letter-spacing: .2px; color: var(--ink); text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }

/* The top bar: the same on every page (logo left, three links right). */
.s-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.topbar { position: relative; z-index: 2; display: flex; align-items: center; height: 64px; }
.toplinks { margin-left: auto; display: none; gap: 24px; font-weight: 600; font-size: 15px; }
.toplinks a { color: var(--ink); text-decoration: none; }
.toplinks a:hover, .toplinks a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; }
@media (min-width: 760px) { .toplinks { display: flex; } }

/* Content pages (privacy, terms, support, delete-account, 404, the invite fallback): the home page's Map Mint band
   with its faint drawn map and convex edge, then one column. */
header.band { position: relative; overflow: hidden; background: var(--band) url(/img/band-map.svg) right center / auto 100% no-repeat; padding: 0 0 52px; border-radius: 0 0 50% 50% / 0 0 30px 30px; }
header.band .wrap { position: relative; padding: 0 16px; }
header.band h1 { letter-spacing: -.02em; }
.wrap { max-width: 720px; margin: 0 auto; }
main.wrap { padding: 8px 16px 64px; }
h1 { font-weight: 900; font-size: 36px; line-height: 1.15; margin: 14px 0 8px; }
h2 { font-weight: 900; font-size: 23px; margin: 44px 0 10px; scroll-margin-top: 16px; }
h3 { font-weight: 800; font-size: 17px; margin: 24px 0 6px; }
.meta { color: var(--subtle); font-size: 15px; margin: 0; max-width: 46ch; }
p, li { max-width: 68ch; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
.card { border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; margin: 20px 0; background: var(--ground); }
.card.short { background: var(--mist); }
.card.short h2, .card h2:first-child { margin-top: 0; }
.card.short ul { margin-bottom: 0; }
nav.toc ol { columns: 2; column-gap: 24px; padding-left: 20px; margin: 0; font-size: 15px; }
nav.toc li { break-inside: avoid; }
.note { background: var(--sun-soft); border-radius: 14px; padding: 12px 16px; }
.contact a { font-weight: 600; }
.table { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); }
thead th { border-top: 0; background: var(--mist); font-weight: 700; }
td:first-child { font-weight: 600; min-width: 130px; }
@media (max-width: 560px) { nav.toc ol { columns: 1; } h1 { font-size: 29px; } }

/* A path through the app's screens: Profile → Privacy & data → … */
.path { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; font-weight: 700; margin: 4px 0 10px; }
.path span { background: var(--ground); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* Buttons. The App Store button is ink (Apple's badge colours); coral is the one primary action. */
.btn { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 18px; border-radius: 16px; background: var(--coral); color: #FFFFFF; font: 800 17px Nunito, sans-serif; text-decoration: none; }
.btn.soft { background: transparent; border: 1px solid var(--line); color: var(--ink); font-weight: 800; font-size: 16px; }
.store { display: inline-flex; align-items: center; gap: 10px; background: var(--cta-ink); color: var(--cta-text); border-radius: 14px; padding: 10px 18px 10px 14px; text-decoration: none; }
.store svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.store small { display: block; font-size: 11px; line-height: 1.1; opacity: .8; }
.store strong { display: block; font-size: 17px; line-height: 1.15; font-weight: 700; }

/* Footer: the same four links on every page. */
footer.site { border-top: 1px solid var(--line); color: var(--subtle); font-size: 14px; padding: 20px 0 40px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 6px; }
footer.site nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
footer.site nav a:hover { text-decoration: underline; }

/* Invite pages (the site's fallback and the worker's page, both drawn by apps/worker/inviteLanding.ts):
   the circle's colour dot, the two buttons, and the code to type into the app. */
header.band.invite { text-align: center; }
header.band.invite .wrap { max-width: 520px; }
.invite .dot { display: block; width: 56px; height: 56px; border-radius: 50%; margin: 10px auto 12px; border: 4px solid var(--ground); box-shadow: 0 0 0 1px var(--line); }
.invite .trio { display: block; margin: 4px auto 0; }
.invite .over { color: var(--subtle); font-size: 15px; margin: 0 0 2px; max-width: none; }
.invite h1 { overflow-wrap: anywhere; margin-top: 4px; }
.invite .meta { margin: 0 auto; }
main.invite-main { max-width: 520px; display: grid; gap: 10px; padding-top: 4px; }
main.invite-main p { margin: 0; }
.btn.is-soon { cursor: default; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 8px 0; }
.steps li { counter-increment: step; display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.steps li::before { content: counter(step); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--coral); color: #FFFFFF; font: 900 13px/24px Nunito, sans-serif; text-align: center; }
.code { font: 900 36px Nunito, sans-serif; letter-spacing: .14em; text-align: center; background: var(--ground); border: 2px dashed var(--line); border-radius: 18px; padding: 10px 0; margin: 8px 0 4px; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.hint, .small { color: var(--subtle); font-size: 13px; text-align: center; }

/* On phones the band is too narrow for the drawn map to stay clear of the title, and the invite page's centred header
   has the Linkies instead: a plain band there. */
@media (max-width: 759px) { header.band { background-image: none; } }
header.band.invite { background-image: none; }
