:root {
  --accent: #5B4FE9;
  --accent-ink: #4338CA;
  --accent-soft: #EEF0FF;
  --ink: #0F172A;
  --body: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --soft: #F8FAFC;
  --bg: #FFFFFF;
  --profit: #16A34A;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #8B83F5;
    --accent-ink: #A8A2F8;
    --accent-soft: #1E1B3A;
    --ink: #F1F5F9;
    --body: #CBD5E1;
    --muted: #94A3B8;
    --line: #1E293B;
    --soft: #0B1220;
    --bg: #020617;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 24px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }

/* Type */
h1, h2, h3 { color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: clamp(32px, 5vw, 44px); margin: 0 0 16px; font-weight: 700; }
h2 { font-size: 22px; margin: 48px 0 12px; font-weight: 650; }
h3 { font-size: 17px; margin: 28px 0 6px; font-weight: 650; }
p { margin: 0 0 16px; }
.lede { font-size: 19px; color: var(--muted); max-width: 600px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

main { padding: 72px 0 96px; }
main.doc { padding-top: 56px; }

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.ticks { padding: 0; margin: 0 0 16px; list-style: none; }
ul.ticks li { position: relative; padding-left: 28px; margin: 10px 0; }
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%235B4FE9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  transform: translateY(-2px);
}
.doc ul:not(.clean):not(.ticks) { padding-left: 22px; }
.doc li { margin: 6px 0; }

/* Pills, buttons */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 550;
  padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.pill.neutral { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 12px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); text-decoration: none; color: #fff; }
.btn.ghost { border-color: var(--line); color: var(--ink); background: var(--bg); }
.btn.ghost:hover { background: var(--soft); text-decoration: none; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.card {
  display: block; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); box-shadow: var(--shadow); color: var(--body);
  transition: transform .18s ease, border-color .18s ease;
}
a.card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; color: var(--body); }
.card h3 { margin: 12px 0 6px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
.card .icon { width: 36px; height: 36px; }

.principles { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 16px; }
.principles h3 { margin: 0 0 4px; }
.principles p { margin: 0; font-size: 15px; color: var(--muted); }

.callout {
  margin: 28px 0; padding: 18px 20px; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--ink); font-size: 15px;
}
.callout strong { color: var(--ink); }

.meta { font-size: 14px; color: var(--muted); margin-bottom: 32px; }

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; color: var(--ink); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 16px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { margin-top: 16px; font-size: 13px; }

@media (max-width: 560px) {
  .nav { gap: 16px; font-size: 14px; }
  main { padding: 48px 0 72px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
