/* lineupugc.com. Tokens follow the app's light palette (apps/lineup-mobile/src/ui/theme.ts). */
:root {
  --bg: #FBFAF7;
  --surface: #F3F2EE;
  --ink: #1E1E1C;
  --ink-2: #5F5E5A;
  --ink-3: #8C8B86;
  --line: rgba(30, 30, 28, 0.1);
  --link: #0B63CE;
  --focus: #0B63CE;
  --ok: #1A7633;
  --ok-bg: #E4F3E8;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --gutter: 16px;
  --measure: 680px;
  --wide: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  /* Brand logos are one-colour, tinted to the ink like the app's BRAND_LOGO_TINT. */
  --logo-filter: brightness(0);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --surface: #1C1C1A;
    --ink: #F2F1EC;
    --ink-2: #A9A8A2;
    --ink-3: #7D7C77;
    --line: rgba(242, 241, 236, 0.12);
    --link: #6AA8FF;
    --focus: #6AA8FF;
    --ok: #6BD38A;
    --ok-bg: rgba(107, 211, 138, 0.14);
    --logo-filter: brightness(0) invert(1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211;
  --surface: #1C1C1A;
  --ink: #F2F1EC;
  --ink-2: #A9A8A2;
  --ink-3: #7D7C77;
  --line: rgba(242, 241, 236, 0.12);
  --link: #6AA8FF;
  --focus: #6AA8FF;
  --ok: #6BD38A;
  --ok-bg: rgba(107, 211, 138, 0.14);
  --logo-filter: brightness(0) invert(1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: var(--gutter); top: -48px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-left)); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.wordmark { color: var(--ink); font-weight: 700; font-size: 21px; letter-spacing: -0.03em; text-decoration: none; padding: 10px 0; }
.site-header nav { display: flex; gap: 4px; }
.site-header nav a {
  color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 11px 10px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center;
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); }

/* Documents */
main.doc { max-width: var(--measure); margin: 0 auto; padding: 56px max(var(--gutter), env(safe-area-inset-left)) 80px; }
.eyebrow { color: var(--ink-3); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-size: clamp(2.125rem, 7vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 16px; }
h2 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin: 56px 0 12px; }
h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 650; margin: 32px 0 8px; }
p, ul, ol, table { margin: 0 0 16px; }
ul, ol { padding-left: 1.25em; }
li { margin: 0 0 8px; }
li::marker { color: var(--ink-3); }
strong { font-weight: 650; }
.lede { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); margin-bottom: 24px; }
.meta { color: var(--ink-3); font-size: 15px; margin-bottom: 32px; }
.muted { color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

.toc { background: var(--surface); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 8px; }
.toc p { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 240px; column-gap: 32px; }
.toc li { margin: 0 0 6px; break-inside: avoid; font-size: 15px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }

.card { background: var(--surface); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 14px; min-height: 28px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums;
}

.table-scroll { overflow-x: auto; margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--ink-2); font-size: 13px; letter-spacing: 0.02em; }
td:first-child { font-weight: 550; min-width: 140px; }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; position: relative; min-height: 44px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font-size: 22px; font-weight: 400; color: var(--ink-3); }
details[open] summary::after { content: "\2212"; }
details > :not(summary) { margin-top: 0; }
details > :last-child { padding-bottom: 8px; }

.status { border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; background: var(--surface); }
.status[data-state="done"] { background: var(--ok-bg); }
.status h2 { margin: 0 0 6px; font-size: 1.25rem; }
.status p { margin: 0; }
code, .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: var(--surface); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.status .code { background: transparent; padding: 0; }
.status .code-line { margin-bottom: 8px; }
.status .code-line .code { display: block; font-size: 15px; margin-top: 2px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--ink-3); font-size: 14px; }
.site-footer p { margin: 0 0 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin-bottom: 16px; }
.footer-links a { color: var(--ink-2); text-decoration: none; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.site-footer a[href^="mailto"] { color: var(--ink-2); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wordmark { font-size: 19px; }
  .site-header nav a { padding: 11px 8px; font-size: 14px; }
  main.doc { padding-top: 36px; }
  h2 { margin-top: 44px; }
  .card, .toc, .status { padding: 18px; }
}
@media print {
  .site-header, .site-footer, .skip, .toc { display: none; }
  body { background: #fff; color: #000; }
}

/* The official App Store badge on content pages (join): Apple's artwork, unaltered, 48 px tall. */
.store-badge { display: inline-block; line-height: 0; border-radius: 9px; }
.store-badge img { display: block; height: 48px; width: auto; }
.store-badge:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Referral invite (/r/<CODE>, DIT-446): a pass on paper with the code, then a card for getting the app. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.invite h1 { text-wrap: balance; }
.pass {
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 1px 2px var(--line);
  border-radius: var(--radius); padding: 28px 24px 24px; margin: 32px 0 24px; text-align: center;
}
.pass-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 20px; }
.pass-brand[hidden] { display: none; }
.pass-logo {
  width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden; flex: none;
  background: var(--ink); color: var(--bg); display: grid; place-items: center;
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
}
.pass-logo img { width: 100%; height: 100%; object-fit: cover; background: var(--bg); }
.pass-logo [hidden] { display: none; }
/* A loaded logo is the brand's whole wordmark, so it replaces the monogram tile and the name. */
.pass-brand.has-logo .pass-logo { width: auto; height: 36px; border-radius: 0; background: none; }
.pass-brand.has-logo .pass-logo img { width: auto; max-width: 200px; height: 36px; object-fit: contain; background: none; filter: var(--logo-filter); }
.pass-brand.has-logo .pass-brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.pass-brand-name { font-weight: 650; font-size: 17px; letter-spacing: -0.01em; text-align: left; }
.pass-label { color: var(--ink-2); font-size: 15px; font-weight: 500; margin: 0 0 4px; }
/* The code fills the pass at any width: the gutters, pass padding and border take 112 px; --code-len comes from r.js. */
.pass-code {
  --code-len: 8;
  font-size: min(clamp(2.125rem, 10vw, 2.75rem), calc((100vw - 112px) / var(--code-len) * 1.35));
  line-height: 1.15; font-weight: 700; letter-spacing: 0.1em; padding-left: 0.1em;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "case";
  text-transform: uppercase; white-space: nowrap; margin: 0 0 20px;
  -webkit-user-select: all; user-select: all;
}
.pass-actions { display: grid; justify-items: center; gap: 12px; }
.pass-actions [hidden] { display: none; }
.capsule {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 17px; font-weight: 600;
  min-height: 50px; min-width: 180px; padding: 12px 28px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform 120ms ease, opacity 120ms ease;
}
.capsule:active { transform: scale(0.97); opacity: 0.85; }
.capsule:disabled { cursor: default; opacity: 1; transform: none; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.capsule-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.copy-check { display: none; width: 20px; height: 20px; flex: none; }
.capsule[data-copied] .copy-check { display: block; }
/* Space for the one-line Copied note is kept, so tapping Copy moves nothing below the pass. */
.pass-note { color: var(--ink-2); font-size: 15px; line-height: 21px; min-height: 21px; margin: 12px 0 0; }
.get-app .steps { margin-top: 20px; }
.invite-foot { color: var(--ink-3); font-size: 15px; margin-top: 32px; }

/* Loading: each bone sits in the line box of the text it stands for (h1 1.08em, lede 29 px, the pass).
   A flex column, so margins add like the real text's line boxes and margins do. */
.invite-skeleton { display: flex; flex-direction: column; align-items: flex-start; }
.invite-skeleton[hidden] { display: none; }
.bone { display: block; background: var(--surface); border-radius: var(--radius-sm); }
.bone-title { font-size: clamp(2.125rem, 7vw, 3rem); height: 0.8em; margin: 0.14em 0; width: 92%; }
.bone-title.short { width: 64%; margin-bottom: calc(0.14em + 16px); }
.bone-lede { height: 19px; margin: 5px 0; width: 100%; }
.bone-lede.short { width: 72%; }
.bone.phone { display: none; }
.bone-pass { height: 302px; width: 100%; border-radius: var(--radius); margin: 32px 0 0; }
@media (max-width: 520px) { .bone.phone { display: block; } .bone-pass { height: 296px; } }
@media (prefers-reduced-motion: no-preference) {
  .bone { animation: bone-pulse 1.4s ease-in-out infinite; }
  #invite[data-state="ready"] :is(#invite-title, #invite-lede, .pass, .get-app) { animation: pass-rise 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  #invite[data-state="ready"] #invite-lede { animation-delay: 60ms; }
  #invite[data-state="ready"] .pass { animation-delay: 90ms; }
  #invite[data-state="ready"] .get-app { animation-delay: 120ms; }
  .capsule[data-copied] .copy-check { animation: check-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
@keyframes bone-pulse { 50% { opacity: 0.55; } }
@keyframes pass-rise { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
@keyframes check-in { from { transform: scale(0.4); opacity: 0; } }
