/* Swap site. Plain CSS, no fonts or files from other servers. Colours follow src/theme/tokens.ts
   (accent #FF6A3D). Text and link colours are deeper oranges so they pass WCAG AA contrast. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f6f6fb;
  --ink: #0b0b0f;
  --ink-2: #5b5b66;
  --line: rgba(60, 60, 67, 0.16);
  --accent: #ff6a3d;
  --accent-strong: #d63a0a; /* white text on this is 4.7:1 */
  --link: #c2410c; /* 5.2:1 on white */
  --note-bg: #fff1e6;
  --note-line: #fed7aa;
  --note-ink: #9a3412;
  --ph-bg: #fff3bf;
  --ph-ink: #5c4300;
  --card: #ffffff;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0f;
    --bg-soft: #17171c;
    --ink: #f2f2f7;
    --ink-2: #a4a4b0;
    --line: rgba(235, 235, 245, 0.16);
    --link: #ff8a63;
    --note-bg: #2a1710;
    --note-line: #5a2f1c;
    --note-ink: #ffd9c7;
    --ph-bg: #4a3b00;
    --ph-ink: #ffe98a;
    --card: #17171c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.prose { max-width: 760px; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; margin: 1.6rem 0 0.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 2.2rem 0 0.6rem; scroll-margin-top: 80px; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-soft); padding: 0.1em 0.35em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 46rem; }
.muted { color: var(--ink-2); }
.small { font-size: 0.9rem; }
.eyebrow { font-weight: 700; color: var(--link); margin: 0 0 0.4rem; letter-spacing: 0.01em; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--accent-strong); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 8px; }

.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a, .lang { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .lang:hover { background: var(--bg-soft); }
.nav a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.lang { border: 1px solid var(--line); font-weight: 600; }

.hero { padding: 40px 0 24px; background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.hero h1 { margin-top: 0.4rem; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.4rem 0 0.6rem; }
.badge { display: inline-flex; flex-direction: column; justify-content: center; min-width: 168px; padding: 10px 18px; border-radius: 14px; border: 2px dashed var(--line); color: var(--ink-2); line-height: 1.2; }
.badge small { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.badge strong { font-size: 1.15rem; color: var(--ink); }

.audiences { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h2 { margin-top: 0; }
.features { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
.features li { background: var(--bg-soft); border-radius: var(--radius); padding: 18px; margin: 0; }
.features h3 { margin-top: 0; }
.features p { margin: 0; color: var(--ink-2); }
.linklist { padding-left: 1.2rem; }

.note { background: var(--note-bg); border: 1px solid var(--note-line); color: var(--note-ink); border-radius: 14px; padding: 14px 18px; margin: 1.2rem 0; }
.note p:last-child, .note h2 { margin-bottom: 0; }
.note h2 { margin-top: 0; font-size: 1.2rem; }
.note a { color: inherit; }
.note.draft { border-style: dashed; }
mark.ph { background: var(--ph-bg); color: var(--ph-ink); padding: 0.05em 0.3em; border-radius: 6px; }

.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 0.97rem; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); }

.search label { display: block; font-weight: 700; margin-bottom: 6px; }
.search input { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); min-height: 48px; }
.search input:focus { border-color: var(--accent); }
.toc ul { columns: 2; padding-left: 1.2rem; }
.toc h2 { font-size: 1.1rem; }
.topic h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.qa { border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; background: var(--card); }
.qa summary { cursor: pointer; padding: 14px 16px; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; font-weight: 650; list-style: none; min-height: 48px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-weight: 700; color: var(--link); margin-left: 4px; }
.qa[open] summary::after { content: "\2212"; }
.qa .q { flex: 1; }
.qa .a { padding: 0 16px 8px; }
.qa:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.chip { font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); color: var(--ink-2); align-self: center; }
.chip-app { background: #e3f6e8; color: #14532d; border-color: #b6e3c3; }
.chip-demo { background: #fff1cc; color: #7a4a00; border-color: #f0d58a; }
.chip-soon { background: #e8edff; color: #26358f; border-color: #c4cdf7; }
@media (prefers-color-scheme: dark) {
  .chip-app { background: #12301c; color: #9be3b2; border-color: #1f5a33; }
  .chip-demo { background: #3a2c07; color: #ffd98a; border-color: #6b4f10; }
  .chip-soon { background: #1a2144; color: #b9c4ff; border-color: #34408a; }
}

.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--bg-soft); padding: 32px 0; font-size: 0.97rem; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
.site-footer h2 { font-size: 1rem; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-block; padding: 6px 0; }
.brand-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.brand-line img { border-radius: 7px; }
.copy { margin-top: 24px; color: var(--ink-2); }

@media (min-width: 720px) {
  .audiences { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .site-footer .cols { grid-template-columns: 2fr 1fr 1fr; }
  .wrap { padding: 0 24px; }
}
@media (max-width: 520px) {
  .toc ul { columns: 1; }
  .nav { margin-left: 0; width: 100%; order: 3; }
  .lang { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .search, .skip { display: none; }
  .qa .a { display: block; }
}
.claim-card {
  max-width: 36rem;
  margin: 3rem auto;
  padding: clamp(1.25rem, 5vw, 2.5rem);
  border: 1px solid var(--line, #dedee3);
  border-radius: 1.5rem;
  background: var(--surface, #fff);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 8%);
}
.claim-avatar {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 1.25rem 0;
  border-radius: 50%;
  color: #fff;
  background: #ff6937;
  font-size: 1.5rem;
  font-weight: 700;
}
.claim-amount { font-size: clamp(2rem, 8vw, 3.25rem); font-weight: 750; letter-spacing: -.04em; }
.claim-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.claim-message { margin: 1rem 0; }
.claim-card .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: .5rem .5rem .5rem 0;
  padding: .8rem 1.1rem;
  border: 0;
  border-radius: .75rem;
  color: #fff;
  background: var(--accent-strong, #d63a0a);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.claim-card .button:focus-visible { outline: 3px solid var(--link, #c2410c); outline-offset: 3px; }
.claim-app { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line, #dedee3); }
.claim-badges { display: flex; flex-wrap: wrap; gap: .75rem; }
.claim-badges span { padding: .75rem 1rem; border: 1px solid var(--line, #dedee3); border-radius: .75rem; }
.claim-badges small { display: block; color: var(--muted, #666); }
@media (prefers-color-scheme: dark) {
  .claim-card { background: #15151a; border-color: #34343a; }
  .claim-badges span { border-color: #34343a; }
}

/* Landing page */
.hero-grid { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
.hero-logo { border-radius: 36px; justify-self: start; box-shadow: 0 16px 40px rgb(255 106 61 / 28%); }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); letter-spacing: -0.02em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.2rem 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px; background: var(--accent-strong); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid var(--accent-strong); }
.button:hover { filter: brightness(1.08); }
.button:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.steps { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: none; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; }
.steps h3 { margin: 0.6rem 0 0.3rem; }
.steps p { margin: 0; color: var(--ink-2); }
.step { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-strong); color: #fff; font-weight: 800; }
.feat-status { margin-top: 10px !important; font-size: 0.8rem; font-weight: 700; color: var(--link) !important; text-transform: uppercase; letter-spacing: 0.04em; }
.features.sec li { background: var(--card); border: 1px solid var(--line); }
.get { text-align: left; }
@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1fr auto; }
  .hero-logo { justify-self: end; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .features.sec { grid-template-columns: repeat(2, 1fr); }
}
