:root {
  --bg: #F7F7FB;
  --surface: #FFFFFF;
  --surface-2: #F0EFFA;
  --text: #17153B;
  --muted: #5B5A78;
  --border: #E3E1F2;
  --brand: #4F46E5;
  --brand-strong: #3730A3;
  --brand-soft: #E0E7FF;
  --accent: #F43F5E;
  --ok: #059669;
  --shadow: 0 1px 2px rgba(23, 21, 59, .06), 0 12px 32px rgba(23, 21, 59, .08);
  --radius: 18px;
  --max: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0C24;
    --surface: #17143A;
    --surface-2: #1F1B4A;
    --text: #F1F0FF;
    --muted: #A9A6CC;
    --border: #2C2862;
    --brand: #8B8CFF;
    --brand-strong: #B4B5FF;
    --brand-soft: #262263;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 Manrope, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font: 500 .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
.brand span { color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 20px; font-weight: 600; font-size: .95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

/* Buttons */
.button { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.button.primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent); }
.button.primary:hover { color: #fff; transform: translateY(-1px); }
.button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.button svg { width: 20px; height: 20px; flex: none; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }
.home-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 24px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 1; }
.hero-art {
  width: 100%;
  height: auto;
  max-width: 500px;
  justify-self: end;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 817px) {
  .home-hero { padding: 56px 0 40px; }
  .home-hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { width: min(92%, 400px); justify-self: center; }
}
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.app-title { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.app-title img { width: 72px; height: 72px; }
.eyebrow { font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.meta { color: var(--muted); font-size: .9rem; margin-top: 12px; }

/* Cards and sections */
section { padding: 56px 0; }
.section-head { max-width: 60ch; margin-bottom: 32px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.card .icon { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.card .icon svg { width: 22px; height: 22px; }

.app-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; transition: transform .15s ease; }
.app-card:hover { transform: translateY(-2px); color: inherit; }
.app-card header { display: flex; align-items: center; gap: 14px; }
.app-card header img { width: 56px; height: 56px; }
.app-card .tag { font-size: .8rem; font-weight: 700; color: var(--ok); }
.app-card.placeholder { box-shadow: none; border-style: dashed; background: transparent; justify-content: center; align-items: center; text-align: center; min-height: 180px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: grid; place-items: center; }

/* App window mock */
.window { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.dots { display: flex; gap: 7px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; }
.dots i:nth-child(2) { background: #FEBC2E; }
.dots i:nth-child(3) { background: #28C840; }
.segmented { margin: 0 auto; display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 2px; font-size: .78rem; font-weight: 600; }
.segmented span { padding: 3px 10px; border-radius: 6px; color: var(--muted); }
.segmented span.on { background: var(--brand); color: #fff; }
.rows { padding: 6px 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.row + .row { border-top: 1px solid var(--border); }
.file-icon { width: 26px; height: 32px; border-radius: 4px; background: linear-gradient(#fff, #ECEBFA); border: 1px solid var(--border); position: relative; flex: none; }
.file-icon::after { content: "PDF"; position: absolute; bottom: 4px; left: 3px; right: 3px; font-size: 7px; font-weight: 800; color: #fff; background: var(--accent); border-radius: 2px; text-align: center; }
.row b { display: block; font-size: .92rem; }
.row small { color: var(--muted); font-size: .8rem; }
.row small.ok { color: var(--ok); font-weight: 600; }
.bar { height: 6px; width: 160px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; width: 62%; background: var(--brand); }
.window-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.window-foot .saved { color: var(--ok); font-weight: 600; }
.mock-cta { background: #4F46E5; color: #fff; font-weight: 700; padding: 6px 16px; border-radius: 999px; }

/* Callout */
.callout { border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius); padding: 22px 24px; }
.callout h3 { margin-bottom: .4em; }

/* FAQ */
details { border-bottom: 1px solid var(--border); padding: 16px 0; }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; color: var(--brand); font-weight: 800; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Notes app window mock */
.notes-cols { display: grid; grid-template-columns: 0.8fr 1fr 1.7fr; min-height: 300px; font-size: .78rem; }
.notes-side, .notes-list { border-right: 1px solid var(--border); padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.notes-side { background: var(--surface-2); }
.notes-side span { padding: 4px 8px; border-radius: 6px; color: var(--text); }
.notes-side span.on, .notes-list b.on { background: var(--brand-soft); color: var(--brand); }
.notes-side em { font-style: normal; color: var(--muted); float: right; }
.notes-side small { margin: 8px 8px 0; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .66rem; letter-spacing: .05em; }
.notes-side .t, .notes-doc .t { color: #C2410C; }
.notes-list b { padding: 6px 8px 0; border-radius: 6px 6px 0 0; font-weight: 700; }
.notes-list i { padding: 0 8px 6px; font-style: normal; color: var(--muted); font-size: .7rem; }
.notes-doc { padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.notes-doc h4 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 800; }
.notes-doc p { margin: 0; }
.notes-doc a { color: var(--brand); font-weight: 600; }
.notes-doc .task { display: flex; align-items: center; gap: 6px; }
.notes-doc .box { width: 13px; height: 13px; border: 2px solid var(--brand); border-radius: 4px; display: inline-grid; place-items: center; font-size: 9px; color: #fff; flex: none; }
.notes-doc .done .box { background: var(--ok); border-color: var(--ok); }
.notes-doc .done { color: var(--muted); text-decoration: line-through; }
.notes-doc .due { color: var(--brand); font-weight: 600; }
.notes-doc .refs { margin-top: auto; border-top: 1px solid var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.notes-doc .refs b { color: var(--text); }
@media (max-width: 560px) { .notes-cols { grid-template-columns: 1fr 1.6fr; } .notes-side { display: none; } }
