/* Landing page: hero, sections, cards, schematics, tables, tabs. Loaded by index.html only. */
.hero { padding: 40px 0 40px; background: radial-gradient(1000px 420px at 85% -10%, var(--accent-soft), transparent 70%); }
.hero .wrap > * { min-width: 0; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px 56px; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; }
.hero h1 .arrow { color: var(--accent-text); }
.hero .lede { margin: 20px 0 0; font-size: 1.2rem; color: var(--ink-2); max-width: 36em; }
.cmd { margin: 28px 0 0; padding: 12px 16px; border-radius: 10px; background: var(--code-bg); color: var(--code-ink); font-size: 15px; overflow-x: auto; }
.cmd .p { color: #8b93c9; user-select: none; }
.shot { margin: 0; }
.shot .paper { display: block; padding: 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.shot .paper svg { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .hero { padding-top: 28px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .shot .paper { padding: 12px; }
  .shot { max-width: 560px; width: 100%; margin-inline: auto; }
}

.notice { grid-column: 1 / -1; margin: 0; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--bg-soft); color: var(--ink-2); font-size: 15px; }
.notice p { margin: 4px 0 0; }
.notice strong { color: var(--ink); font-size: 16px; }

/* Sections */
section.block { padding: 84px 0 0; }
section.block:last-of-type { padding-bottom: 96px; }
@media (max-width: 620px) { section.block { padding-top: 64px; } }
.kicker { margin: 0 0 8px; color: var(--accent-text); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -.025em; }
.intro { margin: 14px 0 0; max-width: 46em; color: var(--ink-2); font-size: 1.08rem; }
h3 { margin: 0; font-size: 1.12rem; letter-spacing: -.01em; }

.grid { display: grid; gap: 18px; margin-top: 36px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-6 > .card { grid-column: span 2; }
.grid-6 > .card:nth-child(n+4) { grid-column: span 3; }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 > .card, .grid-6 > .card:nth-child(n+4) { grid-column: auto; }
  .grid-6 > .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) { .grid-3, .grid-2, .grid-6 { grid-template-columns: 1fr; } .grid-6 > .card:last-child { grid-column: auto; } }

.card { min-width: 0; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card p { margin: 8px 0 0; color: var(--ink-2); font-size: 15.5px; }
.card ul { margin: 10px 0 0; padding-left: 1.15em; color: var(--ink-2); font-size: 15.5px; }
.card li + li { margin-top: 8px; }
.card .more { margin: 14px 0 0; font-size: 14.5px; font-weight: 600; }
.icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.icon svg { width: 22px; height: 22px; }

/* Module cards with schematics */
.module .fig { margin: 0 0 18px; padding: 6px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); }
.module .fig svg { display: block; width: 100%; max-width: 420px; height: auto; margin-inline: auto; }
.module .fig figcaption { margin-top: 6px; text-align: center; font-size: 13px; color: var(--muted); }

/* Schematic drawing classes (inline SVG) */
.hero-art path, .fig path, .arch path { fill: none; }
.s-line { stroke: var(--line); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s-ink { stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s-accent { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s-onaccent { stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.s-dash { stroke-dasharray: 5 4; }
.f-surface { fill: var(--surface); } .f-bg { fill: var(--bg-soft); } .f-accent { fill: var(--accent); }
.f-soft { fill: var(--accent-soft); } .f-mute { fill: var(--muted); } .f-none { fill: none; } .f-line { fill: var(--line); }
.t { font: 600 13px var(--font); fill: var(--ink); }
.t-m { font: 12px var(--font); fill: var(--muted); }
.t-a { font: 700 13px var(--font); fill: var(--accent-ink); }
.t-ac { font: 650 13px var(--font); fill: var(--accent-text); }
.lbl { font: 700 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); }
.hero-art .t, .hero-art .t-a, .hero-art .t-ac { font-size: 14px; }
.hero-art .t-m { font-size: 13px; }
.mid { text-anchor: middle; }

.arch { margin-top: 36px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.arch svg { display: block; width: 100%; height: auto; min-width: 640px; }
.arch .t, .arch .t-a { font-size: 13px; } .arch .t-m { font-size: 12px; }
.fig .t, .fig .t-a { font-size: 14px; } .fig .t-m { font-size: 13px; }

/* Tables */
.table-wrap { margin-top: 36px; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 16px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
tbody th { font-weight: 600; color: var(--ink); width: 24%; }
td { color: var(--ink-2); }
td.us { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); font-weight: 500; color: var(--ink); }
@media (max-width: 620px) {
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table, tbody, tr, th, td { display: block; width: 100%; }
  tbody th { width: 100%; padding: 14px 16px 4px; border-top: 1px solid var(--line); }
  tbody tr:first-child th { border-top: 0; }
  td { padding: 4px 16px 10px; border-top: 0; }
  td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
  td.us { padding-bottom: 14px; }
}
.note-block { margin: 20px 0 0; max-width: 46em; color: var(--ink-2); }

/* Tabs without JavaScript: radio inputs + labels */
.quick { margin-top: 28px; }
.quick > input { position: absolute; opacity: 0; pointer-events: none; }
.cmp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cmp-tabs label { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 15px; font-weight: 600; cursor: pointer; }
.cmp-tabs label:hover { border-color: var(--accent); color: var(--accent-text); }
.qs-panel { display: none; }
.qs-panel > p { margin: 0 0 12px; color: var(--ink-2); }
#qs-sqlite:checked ~ .qs-panels #qs-panel-sqlite, #qs-pg:checked ~ .qs-panels #qs-panel-pg, #qs-proxy:checked ~ .qs-panels #qs-panel-proxy { display: block; }
#qs-sqlite:checked ~ .cmp-tabs label[for=qs-sqlite], #qs-pg:checked ~ .cmp-tabs label[for=qs-pg], #qs-proxy:checked ~ .cmp-tabs label[for=qs-proxy] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#qs-sqlite:focus-visible ~ .cmp-tabs label[for=qs-sqlite], #qs-pg:focus-visible ~ .cmp-tabs label[for=qs-pg], #qs-proxy:focus-visible ~ .cmp-tabs label[for=qs-proxy] { outline: 2px solid var(--accent); outline-offset: 2px; }
pre.code { margin: 0; padding: 18px 20px; border-radius: 12px; background: var(--code-bg); color: var(--code-ink); overflow-x: auto; font-size: 14.5px; line-height: 1.65; }
pre.code .c { color: #8b93c9; }
.qs-notes { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 52em; color: var(--ink-2); font-size: 15.5px; }

/* Checks (public surface) */
.checks { margin: 14px 0 0; padding: 0 !important; list-style: none; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.checks li { display: flex; gap: 8px; margin: 0 !important; }
.checks svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--good); }

/* Documentation links */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.doc-grid a { display: block; height: 100%; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 15px; }
.doc-grid a:hover { border-color: var(--accent); }
.doc-grid b { display: block; margin-bottom: 2px; color: var(--accent-text); font: 650 14px var(--mono); overflow-wrap: anywhere; }
.sub { margin: 36px 0 0; }
@media (max-width: 900px) { .doc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .doc-grid { grid-template-columns: 1fr; } }

.card .note { margin-top: 14px; }
.qs-panel .note { margin-top: 12px; }
.checks span { min-width: 0; }
@media print { section.block { padding-top: 24pt; } }
