:root {
  --bg: #fff; --fg: #111318; --muted: #5b616e; --line: #e6e8ec; --card: #f6f7f9;
  --accent: #1a56db; --accent-fg: #fff; --code: #f1f3f5; --max: 72rem; --text: 44rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  font-size: 16px; line-height: 1.6; color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --fg: #e8eaf0; --muted: #9aa1b1; --line: #262a33; --card: #161a21; --accent: #7aa2ff; --accent-fg: #0b1020; --code: #1c2029; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 700; }
h2 { font-size: 1.375rem; margin-top: 2.5rem; font-weight: 650; }
h3 { font-size: 1.05rem; margin-top: 1.5rem; font-weight: 600; }
p, li { max-width: var(--text); }
.lead { font-size: 1.125rem; color: var(--muted); margin: 0 0 1rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--code); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--code); padding: 1rem; border-radius: 8px; overflow: auto; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; max-width: var(--text); margin: 1rem 0; font-size: .95rem; }
th, td { text-align: start; padding: .55rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
blockquote { margin: 1rem 0; padding: 0 1rem; border-inline-start: 3px solid var(--line); color: var(--muted); }

.top { max-width: var(--max); margin: 0 auto; padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--fg); letter-spacing: -0.02em; }
.top nav { display: flex; align-items: center; gap: 1.25rem; font-size: .95rem; }
.top nav a { color: var(--muted); }
.langs { position: relative; }
.langs summary { cursor: pointer; color: var(--muted); list-style: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs ul { position: absolute; inset-inline-end: 0; top: 1.75rem; z-index: 2; margin: 0; padding: .5rem; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); columns: 2; min-width: 20rem; max-height: 60vh; overflow: auto; }
.langs li a { display: block; padding: .3rem .6rem; border-radius: 6px; color: var(--fg); white-space: nowrap; }
.langs li a:hover { background: var(--card); text-decoration: none; }

main { max-width: var(--max); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.hero { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1rem; }
.hero img { width: 96px; height: 96px; border-radius: 22px; flex: none; }
.hero.home { margin: 1rem 0 2.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 0; }
.btn { display: inline-block; padding: .7rem 1.1rem; border-radius: 10px; border: 1px solid var(--line); color: var(--fg); font-weight: 600; }
.btn:hover { text-decoration: none; background: var(--card); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.muted { color: var(--muted); background: var(--card); cursor: default; }
.note { color: var(--muted); font-size: .9rem; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 2.75rem; margin: .75rem 0; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: .05rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: .9rem; }
.guides { list-style: none; padding: 0; }
.guides li { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; margin: .75rem 0; max-width: var(--text); }
.guides li p { margin: .25rem 0 0; color: var(--muted); }
.faq h3 { margin-top: 1.25rem; }
.faq p { margin-top: .25rem; color: var(--muted); }
.readme h3 { margin-top: 1.5rem; }

.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .75rem; }
.grid a { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; color: var(--fg); background: var(--card); height: 100%; transition: border-color .15s, transform .15s; }
.grid a:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.grid img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.grid strong { display: block; font-weight: 600; margin-bottom: .15rem; }
.grid small { color: var(--muted); font-size: .875rem; line-height: 1.45; display: block; }

.crumbs { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
.cta { display: flex; gap: 1rem; align-items: center; margin-top: 2.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); max-width: var(--text); flex-wrap: wrap; }
.cta img { width: 48px; height: 48px; border-radius: 12px; }
.cta div { flex: 1 1 14rem; }
.cta p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer p { max-width: var(--max); margin: 0 auto; padding: 1.5rem 1.25rem; }
@media (max-width: 40rem) { .hero { flex-direction: column; } .hero img { width: 72px; height: 72px; } .top { flex-wrap: wrap; } }

/* ---- landing (home + extension pages) ---- */
.hero.home { display: block; text-align: center; max-width: 52rem; margin: 2rem auto 2.5rem; }
.hero.home h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -0.02em; }
.hero.home .lead { margin: .75rem auto 1.5rem; max-width: 40rem; }
.search { max-width: 36rem; margin: 0 auto; }
.search input { width: 100%; font: inherit; font-size: 1.05rem; padding: .9rem 1.1rem; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--fg); outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.stats, .empty { color: var(--muted); font-size: .9rem; margin: 1rem auto 0; text-align: center; max-width: none; }
.cats-title { text-align: center; margin-top: 3rem; }
.cats { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .75rem 0 1rem; }
.cats a { padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); background: var(--card); font-size: .95rem; }
.cats a small { color: var(--muted); }
.cats a:hover { border-color: var(--accent); text-decoration: none; }
.cat h2, .featured h2 { margin-top: 2.5rem; }
.grid li a { position: relative; }
.grid em { position: absolute; top: .6rem; inset-inline-end: .75rem; font-style: normal; font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .5rem; background: var(--bg); }
.trust ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.trust li { padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; }
.trust li p { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; }
.pro { margin-top: 3rem; padding: 1.5rem; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--card)), var(--card)); border: 1px solid var(--line); }
.pro h2 { margin-top: 0; }
.pro .prices { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .5rem; max-width: none; }
.pro .prices span { padding: .5rem .9rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-weight: 600; }
.pro .plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.pro .plans div { padding: 1rem; background: var(--bg); border-radius: 12px; border: 1px solid var(--line); }
.pro .plans p { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; }
.badges { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; max-width: none; }
.badges li { font-size: .85rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; background: var(--card); }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-inline-start: 1.9rem; margin: .6rem 0; }
.checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.ext .btn.primary { font-size: 1.05rem; padding: .85rem 1.4rem; }
.onpage p { padding: 1rem 1.25rem; border-inline-start: 3px solid var(--accent); background: var(--card); border-radius: 0 12px 12px 0; }
.tech { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.tech summary { cursor: pointer; list-style: none; }
.tech summary::-webkit-details-marker { display: none; }
.tech summary h2 { display: inline; margin: 0; font-size: 1.1rem; color: var(--muted); }
.tech summary::after { content: " ▾"; color: var(--muted); }
.tech[open] summary::after { content: " ▴"; }
.related h2 { margin-top: 3rem; }
footer .agents { display: block; font-size: .8rem; opacity: .7; margin-top: .25rem; }

/* publication: the hub removes draft cards at serve time; sections/pills left empty disappear */
.featured:not(:has(li)),.cat:not(:has(li)),.cats a[data-empty]{display:none}
.empty.soon{display:block;margin:24px 0;padding:20px;border:1px dashed var(--line,#ccd);border-radius:12px;text-align:center}
.empty.soon[hidden]{display:none}

.hero .sub{color:var(--muted,#667);margin:-6px 0 12px}
.shot{margin:8px 0 24px}.shot img{display:block;max-width:100%;height:auto;max-height:420px;border:1px solid var(--line,#dde);border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.08)}
