/* F*ckDeck website. Same palette and font as the app.
   DM Sans is served from our own domain (SIL Open Font License, see /fonts/OFL-DM-Sans.txt). */
@font-face {
  font-family: "DM Sans"; font-style: normal; font-display: swap; font-weight: 100 1000;
  src: url("/fonts/dm-sans-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #FFF6EC; --surface: #FFFFFF; --sunk: #F6EBDD; --line: #EADFD2; --line-2: #DDCFBF;
  --ink: #22172E; --muted: #61576B; --on-ink-muted: #C9C0D4;
  --grape: #6B3DF4; --grape-ink: #4F25D6; --grape-soft: #EEE8FF;
  --lime: #C6F36B; --butter: #FFD54A; --tomato: #FF4B33; --tomato-ink: #C42A14;
  --r: 14px; --wrap: 1080px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--grape-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; border-radius: 4px; }
.on-ink :focus-visible { outline-color: var(--lime); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 850; letter-spacing: -.035em; }
h2 { font-size: clamp(26px, 3.6vw, 34px); font-weight: 820; margin-top: 0; }
h3 { font-size: 19px; font-weight: 780; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin: .3em 0; }
kbd {
  font: 600 .82em/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 6px; border-radius: 6px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink); white-space: nowrap;
}
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sunk); padding: 1px 5px; border-radius: 5px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* ---------- skip link ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; font-size: 19px; letter-spacing: -.015em; color: var(--ink); text-decoration: none; }
.logo {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--grape) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M5 20c4-10 7-10 11 0s7 10 11 0' stroke='%23C6F36B' stroke-width='3.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav li { margin: 0; }
.site-nav a { display: inline-block; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; }
.site-nav a:hover { color: var(--ink); background: var(--sunk); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.nav-app { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: var(--grape); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; }
.nav-app:hover { background: var(--grape-ink); }
.site-nav { margin-left: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px;
  border-radius: 999px; font-weight: 750; font-size: 16px; text-decoration: none; border: 1px solid transparent; line-height: 1.2;
}
.btn-primary { background: var(--grape); color: #fff; }
.btn-primary:hover { background: var(--grape-ink); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #B4E654; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-ink { background: transparent; color: #fff; border-color: #5A4C69; }
.btn-ghost-ink:hover { border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: #fff; padding: 64px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero h1 .hl { color: var(--lime); }
.hero .lede { font-size: 20px; color: var(--on-ink-muted); max-width: 34ch; }
.hero .fine { font-size: 14.5px; color: var(--on-ink-muted); margin-top: 18px; }
.hero a:not(.btn) { color: var(--lime); }
.badge { display: inline-block; font-size: 13px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; background: #3A2C4A; color: var(--lime); margin-bottom: 18px; }

/* mini player illustration */
.mock { background: #2E2140; border: 1px solid #45365A; border-radius: 20px; padding: 22px; box-shadow: 0 30px 60px -30px #000; }
.mock-wave { display: block; width: 100%; height: auto; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.mock-label { font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--on-ink-muted); }
.mock-speed { font-size: 40px; font-weight: 850; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.mock-speed small { font-size: 15px; font-weight: 600; color: var(--on-ink-muted); margin-left: 2px; }
.mock-meter { position: relative; height: 10px; border-radius: 5px; background: #45365A; margin-top: 14px; }
.mock-meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 38%; border-radius: 5px; background: var(--lime); }
.mock-meter b { position: absolute; top: -5px; bottom: -5px; left: 60%; width: 4px; border-radius: 2px; background: var(--butter); }
.mock-stop { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 112px; height: 56px; border-radius: 14px; background: var(--tomato); color: #fff; font-weight: 900; font-size: 20px; letter-spacing: .05em; line-height: 1; }
.mock-stop small { font-size: 11px; font-weight: 700; letter-spacing: .04em; opacity: .9; margin-top: 4px; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--sunk); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 18px; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--grape-ink); margin-bottom: 10px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .ico { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--grape-soft); color: var(--grape-ink); margin-bottom: 14px; }
.card .ico svg { display: block; }

/* safety band */
.safety-band { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--tomato); border-radius: var(--r); padding: 28px; }
.safety-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.safety-list li { margin: 0; padding-left: 30px; position: relative; }
.safety-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); box-shadow: inset 0 0 0 4px var(--ink); }
.free-note { display: inline-block; margin-top: 20px; font-weight: 750; background: var(--lime); color: var(--ink); padding: 6px 12px; border-radius: 999px; font-size: 15px; }

/* packs */
.price { font-size: 15px; font-weight: 750; color: var(--grape-ink); margin-bottom: 8px; }
.card.feature { border-color: var(--grape); box-shadow: 0 0 0 1px var(--grape); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
caption { text-align: left; padding: 14px 16px 6px; font-weight: 700; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
tr:last-child td { border-bottom: 0; }
td.id { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.tag { display: inline-block; font-size: 13px; font-weight: 750; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.tag-ok { background: #E6F9D0; color: #2A5E00; }
.tag-should { background: var(--grape-soft); color: var(--grape-ink); }
.tag-partial { background: #FFF1C9; color: #5E4900; }
.tag-blocked { background: #FFE1DC; color: #A3220F; }

/* ---------- doc pages ---------- */
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); }
.page-head p { font-size: 19px; color: var(--muted); max-width: 60ch; }
.doc { padding: 16px 0 72px; }
.doc .layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 20px; font-size: 15px; }
.toc p { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--grape); }
.prose { max-width: 720px; }
.prose section { padding-top: 8px; margin-bottom: 40px; }
.prose h2 { font-size: 28px; margin-bottom: .55em; }
.prose h3 { margin-top: 1.4em; }
.prose li::marker { color: var(--grape); }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 1.2em; }
.callout p:last-child { margin: 0; }
.callout.warn { border-left: 5px solid var(--tomato); }
.callout.tip { border-left: 5px solid var(--grape); }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 46px; margin: 0 0 18px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--lime); font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.keys { width: 100%; }
.keys td:first-child { white-space: nowrap; width: 1%; }
.updated { font-size: 15px; color: var(--muted); }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; }
.faq summary { cursor: pointer; padding: 15px 48px 15px 18px; font-weight: 720; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 500; color: var(--grape); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 16px; }
.faq details > div p:last-child, .faq details > div ul:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: var(--on-ink-muted); padding: 44px 0 36px; font-size: 15px; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-foot .brand { color: #fff; margin-bottom: 12px; }
.site-foot h2 { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink-muted); margin-bottom: 10px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 0 0 6px; }
.foot-fine { border-top: 1px solid #3A2C4A; margin-top: 32px; padding-top: 20px; font-size: 14px; }
.foot-fine p { margin: 0 0 .4em; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc .layout { grid-template-columns: 1fr; gap: 8px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
  .toc ol { columns: 2; column-gap: 16px; border-left: 0; }
  .toc a { padding: 4px 0; border-left: 0; margin: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 18px; }
  .site-head .wrap { padding-top: 12px; padding-bottom: 10px; gap: 8px; }
  .site-nav { order: 3; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px 2px; width: calc(100% + 36px); }
  .nav-app { min-height: 38px; padding: 7px 14px; font-size: 14.5px; }
  .site-nav ul { flex-wrap: nowrap; }
  .site-nav a { padding: 7px 11px; font-size: 14.5px; white-space: nowrap; }
  .hero { padding: 44px 0 52px; }
  .hero .lede { font-size: 18px; }
  .section { padding: 48px 0; }
  .grid-3, .grid-2, .safety-list { grid-template-columns: 1fr; }
  .safety-band { padding: 22px 18px; }
  .actions .btn { flex: 1 1 100%; }
  .toc ol { columns: 1; }
  th, td { padding: 10px 12px; }
  .steps > li { padding-left: 42px; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- small utilities ---------- */
.mt { margin-top: 16px; }
.h-card { font-size: 26px; }
.actions-tight { margin-top: 8px; }
.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qa h3 { font-size: 18px; }
@media (max-width: 640px) { .qa { grid-template-columns: 1fr; } }
