/* 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;
  --gutter: 16px;
  --measure: 680px;
  --wide: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  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);
    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);
  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; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.button:hover { text-decoration: none; opacity: 0.88; }
.button.secondary { background: var(--surface); color: var(--ink); }

/* Landing */
main.home { padding: 0 0 96px; }
.hero { max-width: var(--wide); margin: 0 auto; padding: 88px max(var(--gutter), env(safe-area-inset-left)) 72px; }
.hero h1 { font-size: clamp(2.75rem, 10vw, 5rem); line-height: 1.02; letter-spacing: -0.045em; max-width: 12ch; margin-bottom: 24px; }
.hero .lede { font-size: clamp(1.1875rem, 2.6vw, 1.375rem); max-width: 34ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface); padding: 6px 12px; border-radius: 999px; margin-bottom: 24px; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.features { max-width: var(--wide); margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-left)); display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { background: var(--surface); border-radius: var(--radius); padding: 28px 24px; }
.feature .num { font-size: 13px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.feature h2 { margin: 12px 0 8px; font-size: 1.25rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: 16px; }
.links { max-width: var(--wide); margin: 72px auto 0; padding: 0 max(var(--gutter), env(safe-area-inset-left)); }
.links h2 { margin: 0 0 16px; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.link-list li { margin: 0; border-bottom: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; min-height: 56px; color: var(--ink); text-decoration: none; font-weight: 550; }
.link-list a span { color: var(--ink-3); font-weight: 400; font-size: 15px; }
.link-list a:hover { color: var(--link); }

/* 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; }
  .hero { padding-top: 56px; padding-bottom: 48px; }
  .card, .toc, .status { padding: 18px; }
}
@media print {
  .site-header, .site-footer, .skip, .toc { display: none; }
  body { background: #fff; color: #000; }
}
