/* Brackle website design system.
   One stylesheet for every page. Two themes: light and dark. With no saved choice the visitor's system setting
   decides; the toggle in the header saves a choice (html[data-theme]). Spacing is on a 4 px base. */

/* ---------- Theme: light (default) ---------- */
:root {
  --ink: #14162b;
  --text: #3a3d55;
  --muted: #64687f;
  --faint: #8a8ea3;
  --accent: #5b5bd6;
  --accent-hover: #4a4ac4;
  --accent-soft: #eeeefc;
  --accent-line: #d6d5f6;
  --on-accent: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f3f3f9;
  --line: #e7e8f0;
  --line-strong: #d6d8e5;
  --grid: rgba(20, 22, 43, 0.045);
  --band-bg: #14162b;
  --band-text: #c9ccdc;
  --band-ink: #f4f5fa;
  --good: #1f8a5b;
  --danger: #ae2e24;
  --shadow-sm: 0 1px 2px rgba(20, 22, 43, 0.06);
  --shadow-md: 0 1px 2px rgba(20, 22, 43, 0.05), 0 8px 24px -8px rgba(20, 22, 43, 0.12);
  --shadow-lg: 0 2px 4px rgba(20, 22, 43, 0.04), 0 24px 56px -16px rgba(20, 22, 43, 0.22);
  color-scheme: light;

  /* Spacing: 4 px base */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  /* Radius */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  /* Widths */
  --w-page: 1120px; --w-read: 760px;
  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- Theme: dark ---------- */
:root[data-theme="dark"] {
  --ink: #f4f5fa;
  --text: #c9ccdc;
  --muted: #9a9eb6;
  --faint: #7a7e96;
  --accent: #8e8cf7;
  --accent-hover: #a9a7ff;
  --accent-soft: #202346;
  --accent-line: #34386a;
  --on-accent: #0e1019;
  --bg: #0e1019;
  --bg-soft: #121524;
  --surface: #151829;
  --surface-2: #1b1f33;
  --line: #242840;
  --line-strong: #323754;
  --grid: rgba(244, 245, 250, 0.04);
  --band-bg: #151829;
  --band-text: #b4b8cc;
  --band-ink: #f4f5fa;
  --good: #4cc38a;
  --danger: #ff8f73;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 56px -16px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* One logo per theme */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
:root[data-theme="dark"] .only-dark { display: inline-block !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
::selection { background: var(--accent-soft); color: var(--ink); }

h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.06; letter-spacing: -0.032em; }
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -0.024em; }
h3 { font-size: 19px; line-height: 1.35; letter-spacing: -0.01em; }
h4 { font-size: 16px; line-height: 1.4; }
p { margin: 0; }
p + p { margin-top: var(--s-4); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: var(--r-sm); color: var(--ink); }
kbd { font-family: var(--mono); font-size: 0.85em; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: var(--r-sm); padding: 0 6px; background: var(--surface); color: var(--ink); }

.wrap { max-width: var(--w-page); margin: 0 auto; padding: 0 var(--s-5); }
.wrap-read { max-width: var(--w-read); margin: 0 auto; padding: 0 var(--s-5); }

.skip { position: absolute; left: var(--s-4); top: -64px; z-index: 100; background: var(--ink); color: var(--bg);
  padding: var(--s-2) var(--s-4); border-radius: var(--r-md); text-decoration: none; }
.skip:focus { top: var(--s-3); color: var(--bg); }

.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-4); }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px;
  padding: 0 var(--s-5); border-radius: var(--r-pill); font: 600 15px/1 var(--font); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s;
  white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--faint); color: var(--ink); }
.btn-light { background: var(--band-ink); color: #14162b; }
.btn-light:hover { background: #ffffff; color: #14162b; }
.btn-outline-light { color: var(--band-ink); border-color: rgba(244, 245, 250, 0.28); }
.btn-outline-light:hover { color: var(--band-ink); border-color: rgba(244, 245, 250, 0.6); }
.btn-sm { min-height: 36px; padding: 0 var(--s-4); font-size: 14px; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: var(--s-1); align-items: center; }
.link-arrow:hover { text-decoration: underline; }

.badge { display: inline-flex; align-items: center; gap: var(--s-2); height: 28px; padding: 0 var(--s-3);
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Header ---------- */
header.site { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: var(--s-5); height: 68px; }
header.site .brand { display: inline-flex; align-items: center; flex: none; }
header.site .brand img { height: 30px; width: auto; display: block; }
nav.primary { display: flex; gap: var(--s-1); margin-left: auto; }
nav.primary a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-pill); }
nav.primary a:hover { color: var(--ink); background: var(--surface-2); }
nav.primary a[aria-current="page"] { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); }
.theme-toggle { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0; }
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: var(--s-9) 0; }
.section-tight { padding: var(--s-8) 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: var(--s-7); }
.section-head p { margin-top: var(--s-4); color: var(--muted); font-size: 18px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Hero: left-aligned, with the brand's two folded bands and a faint table grid behind it */
.hero { position: relative; overflow: hidden; padding: var(--s-9) 0 var(--s-8); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 30%, transparent 75%); }
.hero .wrap { position: relative; }
.hero h1 { max-width: 820px; margin-top: var(--s-5); }
.hero .lead { margin-top: var(--s-5); }
.hero::after { content: ""; position: absolute; pointer-events: none; top: -240px; right: -160px; width: 760px; height: 560px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent); filter: blur(8px); }
.hero-split { display: grid; grid-template-columns: 1fr; gap: var(--s-7); }

.page-head { padding: var(--s-8) 0 var(--s-7); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.page-head .wrap, .page-head .wrap-read { position: relative; }
.page-head h1 { font-size: clamp(34px, 4.4vw, 48px); }
.page-head .lead { margin-top: var(--s-4); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: var(--s-4); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ---------- Screenshot frame ---------- */
.frame { border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--surface);
  box-shadow: var(--shadow-lg); overflow: hidden; margin: 0; }
.frame-bar { height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 var(--s-4);
  border-bottom: 1px solid var(--line); background: var(--surface-2); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); display: block; }
.frame img { display: block; width: 100%; height: auto; }
.frame-caption { font-size: 14px; color: var(--muted); margin-top: var(--s-3); }
.hero-shot { margin-top: var(--s-8); }

/* ---------- Grids, cards, features ---------- */
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6);
  box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: var(--s-2); }
.card p { color: var(--muted); }
a.card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.icon { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: var(--s-4); border: 1px solid var(--accent-line); }
.icon svg { width: 20px; height: 20px; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.fact { padding: var(--s-5); display: flex; gap: var(--s-3); align-items: flex-start; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
.fact strong { display: block; color: var(--ink); font-size: 15px; }
.fact span { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 2px; }

/* App card (home and apps pages) */
.app-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-7); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-7);
  box-shadow: var(--shadow-md); }
.app-title { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-4); }
.app-title img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.app-title small { display: block; color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.app-card .frame { box-shadow: var(--shadow-md); }
.ticks { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: var(--s-2); }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%235b5bd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }

/* Feature rows (product page): text and screenshot side by side, alternating */
.feature-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); align-items: center; }
.feature-row + .feature-row { margin-top: var(--s-9); }
.feature-row.flip > :first-child { order: 2; }
.feature-row h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: var(--s-4); }
.feature-row p { color: var(--muted); }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.step { position: relative; padding-top: var(--s-7); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 32px; height: 32px;
  border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line); }
.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { color: var(--ink); background: var(--surface-2); font-weight: 600; font-size: 14px; }
td strong { color: var(--ink); }

/* Pricing */
.price-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.price-big { font-size: 44px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; line-height: 1; }
.price-big small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: var(--s-5) 0; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; gap: var(--s-4); align-items: center; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details > div { padding: 0 0 var(--s-5); color: var(--muted); max-width: 680px; }

/* Callouts */
.note { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5); color: var(--text); margin: var(--s-5) 0; }
.note strong { color: var(--ink); }

/* Closing band */
.cta-band { background: var(--band-bg); color: var(--band-text); border-radius: var(--r-lg); padding: var(--s-8);
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: var(--s-6); flex-wrap: wrap;
  border: 1px solid var(--line); }
.cta-band::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(600px 260px at 100% 0%, rgba(142,140,247,.28), transparent 70%), linear-gradient(rgba(244,245,250,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(244,245,250,.05) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px; }
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--band-ink); font-size: clamp(26px, 3vw, 34px); }
.cta-band p { margin-top: var(--s-3); max-width: 560px; }
.cta-band .btn-row { margin-top: 0; }

/* ---------- Reading pages (docs, legal) ---------- */
.prose { color: var(--text); }
.prose h2 { font-size: 26px; margin: var(--s-8) 0 var(--s-4); padding-top: var(--s-2); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: var(--s-6) 0 var(--s-2); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--s-4); }
.prose ul, .prose ol { padding-left: var(--s-5); }
.prose li { margin: var(--s-1) 0; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--ink); }
.prose .frame { margin: var(--s-5) 0 var(--s-6); box-shadow: var(--shadow-md); }
.prose .table-wrap { margin: var(--s-4) 0 var(--s-5); }

.docs-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s-8); padding: var(--s-7) 0 var(--s-9); }
.docs-nav { position: sticky; top: 92px; align-self: start; font-size: 15px; }
.docs-nav h2 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 var(--s-3); font-weight: 600; }
.docs-nav ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.docs-nav a { display: block; padding: 6px var(--s-4); margin-left: -1px; color: var(--muted); text-decoration: none; border-left: 1px solid transparent; }
.docs-nav a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.docs-nav .side-links { margin-top: var(--s-6); display: grid; gap: var(--s-2); }
.docs-nav .side-links a { padding: 0; border: 0; margin: 0; }
.reading { padding: var(--s-7) 0 var(--s-9); }
.toc { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); background: var(--bg-soft); margin-bottom: var(--s-7); }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 var(--s-3); padding: 0; }
.toc ol { margin: 0; padding-left: var(--s-5); columns: 2; column-gap: var(--s-6); font-size: 15px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); background: var(--bg-soft); padding: var(--s-8) 0 var(--s-6); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-6); }
.footer-grid h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 var(--s-4); font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); }
.footer-brand img { height: 28px; width: auto; display: block; }
.footer-brand p { color: var(--muted); margin-top: var(--s-4); max-width: 320px; }
.footer-bottom { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); display: flex;
  justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; color: var(--faint); font-size: 14px; }
.footer-bottom a { color: var(--faint); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .app-card, .feature-row, .price-card { grid-template-columns: 1fr; gap: var(--s-6); }
  .feature-row.flip > :first-child { order: 0; }
  .feature-row + .feature-row { margin-top: var(--s-8); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .docs-layout { grid-template-columns: 1fr; gap: var(--s-5); }
  .docs-nav { position: static; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); background: var(--bg-soft); }
}
@media (max-width: 720px) {
  nav.primary { display: none; }
  .header-actions { margin-left: auto; }
  .section { padding: var(--s-8) 0; }
  .hero { padding: var(--s-8) 0 var(--s-7); }
  .grid-2, .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .app-card { padding: var(--s-5); }
  .cta-band { padding: var(--s-6); }
  .toc ol { columns: 1; }
  .mobile-nav { display: flex !important; }
}
.mobile-nav { display: none; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; padding: var(--s-2) var(--s-4); border-top: 1px solid var(--line); }
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: var(--s-1) var(--s-3); border-radius: var(--r-pill); white-space: nowrap; }
.mobile-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
@media (max-width: 420px) {
  .header-actions .btn { display: none; }
}

[hidden] { display: none !important; }

/* ---------- Forms (idea box) ---------- */
.field { display: grid; gap: var(--s-2); }
.field + .field { margin-top: var(--s-5); }
.field label, .field .label { font-weight: 600; color: var(--ink); font-size: 15px; }
.field .hint { font-size: 13px; color: var(--faint); font-weight: 400; }
.input, .textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: var(--s-3) var(--s-4); }
.textarea { min-height: 128px; resize: vertical; line-height: 1.55; }
.input:focus, .textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); padding: 6px 14px; cursor: pointer; }
.chip:hover { border-color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.chip.ghost { border-style: dashed; color: var(--muted); }
.count { font-size: 13px; color: var(--faint); text-align: right; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-6); }
.form-foot .small { color: var(--faint); max-width: 300px; }
.form-error { color: var(--danger); font-size: 14px; margin-top: var(--s-3); min-height: 1em; }
.done-tick { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: var(--s-4); font-weight: 700; }
.idea-grid { display: grid; grid-template-columns: 5fr 6fr; gap: var(--s-8); align-items: start; }
.idea-card { padding: var(--s-7); }
.next-list { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-5); }
.next-list li { display: grid; grid-template-columns: 32px 1fr; gap: var(--s-3); }
.next-list .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; font-style: normal; }
.next-list b { display: block; color: var(--ink); }
.next-list span { color: var(--muted); }

/* ---------- Live demo ---------- */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); align-items: stretch; }
.demo .card { padding: var(--s-5); }
.demo > *, .idea-grid > * { min-width: 0; }
.demo-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.demo-table th, .demo-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; }
.demo-table th { background: var(--bg-soft); color: var(--ink); }
.lozenge { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; letter-spacing: .02em; white-space: nowrap; }
.lz-done { background: #dcfff1; color: #216e4e; }
.lz-prog { background: #e9f2ff; color: #0055cc; }
.lz-risk { background: #ffeceb; color: #ae2e24; }
.demo-out { font-family: var(--mono); font-size: 13px; white-space: pre; overflow: auto; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-4); min-height: 210px; color: var(--text); margin: 0; }
.xl { width: 100%; border-collapse: collapse; font-size: 13px; }
.xl td, .xl th { border: 1px solid var(--line); padding: 5px 8px; white-space: nowrap; }
.xl th { background: var(--bg-soft); color: var(--faint); font-weight: 500; text-align: center; width: 32px; }
.xl tr:nth-child(2) td { font-weight: 700; color: var(--ink); }
.xl-wrap { overflow-x: auto; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--bg-soft); border: 1px solid var(--line); margin-bottom: var(--s-4); }
.tabs button { font: inherit; font-size: 14px; border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: var(--r-pill); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
@media (max-width: 860px) { .idea-grid, .demo { grid-template-columns: 1fr; } .idea-card { padding: var(--s-5); } }
@media (max-width: 420px) {
  .mobile-nav { justify-content: space-between; padding-left: var(--s-3); padding-right: var(--s-3); gap: 0; }
  .mobile-nav a { padding: var(--s-1) 7px; }
}

/* ---------- Home: ways we help, linked cards ---------- */
.paths { margin-top: var(--s-8); }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.card-link h3 { color: var(--ink); }
.card-link .more { display: inline-flex; gap: var(--s-2); margin-top: var(--s-4); color: var(--accent); font-weight: 600; font-size: 15px; }
.demo-block { margin-top: var(--s-9); scroll-margin-top: 96px; }
#apps, #custom, #ideas { scroll-margin-top: 72px; }

/* ---------- Work with us: idea or custom work ---------- */
.anchor { display: block; position: relative; top: -72px; visibility: hidden; }
.mode-cards { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
.mode-card { font: inherit; text-align: left; display: grid; gap: var(--s-1); background: var(--surface); color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); cursor: pointer; font-size: 15px; line-height: 1.5; }
.mode-card:hover { border-color: var(--faint); }
.mode-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.mode-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.mode-top b { color: var(--ink); font-size: 16px; }
.mode-tag { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--good); }
.mode-tag.paid { color: var(--accent); }

/* ---------- Work with us: choice row + one combined card ---------- */
.mode-row { grid-template-columns: 1fr 1fr; margin-top: 0; margin-bottom: var(--s-5); }
.mode-row .mode-card { padding: var(--s-5) var(--s-6); }
.work-box { display: grid; grid-template-columns: 3fr 2fr; padding: 0; overflow: hidden; align-items: stretch; }
.work-form { padding: var(--s-7); min-width: 0; }
.work-steps { padding: var(--s-7); background: var(--bg-soft); border-left: 1px solid var(--line); }
.work-steps .next-list { margin-top: var(--s-5); }
.work-box .form-foot { flex-wrap: nowrap; }
.work-box .form-foot .small { flex: 1; max-width: none; }
.work-box .form-foot .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 860px) {
  .mode-row { grid-template-columns: 1fr; }
  .work-box { grid-template-columns: 1fr; }
  .work-form, .work-steps { padding: var(--s-5); }
  .work-steps { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .work-box .form-foot { flex-wrap: wrap; }
  .work-box .form-foot .btn { width: 100%; }
}

/* ---------- Breadcrumbs: one trail, current page last and not a link ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-2); }
.crumbs li { display: inline-flex; align-items: center; gap: var(--s-2); }
.crumbs li + li::before { content: "/"; color: var(--faint); }
.crumbs [aria-current="page"] { color: var(--text); }
@media (max-width: 720px) {
  /* Phones: no wrapping; show only the step before, as a back link */
  .crumbs li { display: none; }
  .crumbs li:nth-last-child(2) { display: inline-flex; }
  .crumbs li:nth-last-child(2)::before { content: none; }
  .crumbs li:nth-last-child(2) a { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 44px; }
  .crumbs li:nth-last-child(2) a::before { content: "‹"; font-size: 18px; line-height: 1; }
  .page-head .crumbs { margin: calc(var(--s-3) * -1) 0 var(--s-2); }
}

/* ---------- Hubs: apps grouped by platform ---------- */
.platform + .platform { margin-top: var(--s-8); }
.platform-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.platform-head h2 { font-size: clamp(24px, 2.6vw, 30px); }
.platform-head p { color: var(--muted); margin-top: var(--s-2); }
.app-tile { display: flex; flex-direction: column; }
.app-tile .app-title h3 { margin: 0; }
.app-tile .badge { align-self: flex-start; height: auto; min-height: 28px; padding-top: 3px; padding-bottom: 3px; line-height: 1.35; }
.app-tile > p { margin-top: var(--s-4); }
.app-tile-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: auto; padding-top: var(--s-5); font-size: 15px; }
.app-tile-links a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 500; }
.app-tile-links a:not(.btn):hover { color: var(--ink); text-decoration: underline; }

/* ---------- Security: report card ---------- */
.report-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); padding: var(--s-7); box-shadow: var(--shadow-md); }
.report-card h2 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: var(--s-3); }
.report-card > div > p { color: var(--text); }
.report-card .ticks { margin-top: var(--s-3); }
.report-card .note { margin-bottom: 0; }
@media (max-width: 860px) { .report-card { grid-template-columns: 1fr; gap: var(--s-5); padding: var(--s-5); } }

/* ---------- Footer: five columns, legal grouped by app ---------- */
.footer-grid { grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); }
.footer-app { color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.4; margin: 0 0 var(--s-2); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Help button (bottom-right corner of every page; a plain link to the help center) ---------- */
.help-fab { position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: 50; display: inline-flex; align-items: center;
  gap: var(--s-2); min-height: 44px; padding: 0 var(--s-5) 0 var(--s-4); border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent); font: 600 15px/1 var(--font); text-decoration: none;
  box-shadow: var(--shadow-md); transition: background .15s, transform .15s; }
.help-fab:hover { background: var(--accent-hover); color: var(--on-accent); transform: translateY(-1px); }
.help-fab:focus-visible { outline-offset: 3px; border-radius: var(--r-pill); }
.help-fab svg { width: 20px; height: 20px; flex-shrink: 0; }
@media (max-width: 640px) { .help-fab { right: var(--s-4); bottom: var(--s-4); } }
@media print { .help-fab { display: none; } }
/* Room under the footer so the Help button never covers its last line. */
footer.site .footer-bottom { padding-bottom: var(--s-8); }
