/* Geode's own palette (geode/ui/themes.css), light and dark. */
:root {
  color-scheme: light dark;
  --ink: #17232e; --muted: #5f6d79; --line: #d5dce1; --canvas: #fafbfc; --surface: #fff; --subtle: #f3f5f7;
  --accent: #2d6cdf; --accent-deep: #204fa9; --hover: #e7ecf1; --focus: #5587d3; --on-accent: #fff; --shadow: #17232e14;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e4e8ed; --muted: #a4adb9; --line: #343b45; --canvas: #171b21; --surface: #222831; --subtle: #1b2027;
    --accent: #78a8f5; --accent-deep: #a4c5ff; --hover: #272f3b; --focus: #78a8f5; --on-accent: #10161d; --shadow: #0006;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--subtle); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 2; }
.skip:focus { left: 8px; }

.top, main, .foot { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 24px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 17px; letter-spacing: -0.01em; }
.brand b { font-weight: 650; }
.brand-mark { width: 30px; height: 30px; display: block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.top nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; padding: 7px 11px; border-radius: 8px; }
.top nav a:hover { color: var(--ink); background: var(--hover); }
.top nav .nav-cta { color: var(--ink); border: 1px solid var(--line); background: var(--surface); margin-left: 6px; }

main { flex: 1; padding-bottom: 64px; }
.hero { padding: 44px 0 30px; max-width: 720px; }
h1 { font-size: clamp(28px, 4.6vw, 40px); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 12px; font-weight: 680; text-wrap: balance; }
.hero p { margin: 0; color: var(--muted); font-size: 18px; text-wrap: pretty; }
.search { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.search input {
  flex: 1 1 280px; min-width: 0; height: 46px; padding: 0 16px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px var(--shadow);
}
.search input::placeholder { color: var(--muted); }
.filters { display: inline-flex; padding: 3px; gap: 2px; background: var(--subtle); border: 1px solid var(--line); border-radius: 12px; }
.filters button { font: inherit; font-size: 14.5px; color: var(--muted); background: none; border: 0; padding: 8px 13px; border-radius: 9px; cursor: pointer; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px var(--shadow); }

.group { margin-top: 34px; scroll-margin-top: 16px; }
.group-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
h2 { font-size: 20px; letter-spacing: -0.015em; margin: 0; font-weight: 650; }
.count { color: var(--muted); font-weight: 500; font-size: 15px; margin-left: 4px; }
.group-head p { margin: 0; color: var(--muted); font-size: 15px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.card a {
  height: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 12px 14px; padding: 16px;
  color: inherit; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.card a:hover { border-color: var(--accent); box-shadow: 0 6px 18px var(--shadow); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .card a { transition: none; } .card a:hover { transform: none; } }
.icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; flex: none; background: #fff; border: 1px solid var(--line); color: #17232e; }
.icon img { width: 28px; height: 28px; object-fit: contain; display: block; }
.icon-plain { background: var(--subtle); color: var(--accent); }
.icon-plain svg { width: 24px; height: 24px; }
.card-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-text strong { font-weight: 620; font-size: 16.5px; letter-spacing: -0.01em; }
.card-text span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.card-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.card-meta span, .tag { font-size: 12.5px; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.tag { font-weight: 500; vertical-align: middle; margin-left: 6px; }
.tag-muted { border-style: dashed; }
.empty { margin-top: 34px; color: var(--muted); }
[hidden] { display: none !important; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14.5px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }
.detail { max-width: 760px; }
.detail-head { display: flex; gap: 18px; align-items: flex-start; padding: 26px 0 22px; }
.detail-head .icon { width: 60px; height: 60px; border-radius: 15px; }
.detail-head .icon img { width: 38px; height: 38px; }
.detail-head .icon-plain svg { width: 32px; height: 32px; }
.detail-head h1 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 6px; }
.detail-head p { margin: 0; color: var(--muted); font-size: 17.5px; }
.install, .what { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.install p, .what p { margin: 8px 0 0; }
.note { color: var(--muted); font-size: 15px; }
h3 { font-size: 15.5px; margin: 16px 0 0; font-weight: 620; }
.endpoint + .endpoint { border-top: 1px solid var(--line); margin-top: 16px; }
.endpoint h3:first-child { margin-top: 14px; }
.what > .endpoint:first-of-type h3:first-child { margin-top: 10px; }
.inputs { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.inputs li { font-size: 15px; }
.inputs li > span:last-child:not(.tag) { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.facts { margin: 18px 0 0; display: grid; }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.foot { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 22px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }
@media (max-width: 560px) {
  .top, main, .foot { padding-inline: 16px; }
  .hero { padding-top: 26px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .top nav .nav-cta { margin-left: 0; }
}
