/* Layout: a sticky top bar; the home page is a centered hero with the install card, the catalog page a search over cards. */
:root {
  --bg: #ffffff; --bg-2: #f7f8fa; --panel: #ffffff; --line: #e7e9ee; --line-2: #d9dde5;
  --text: #1c1e21; --text-2: #4b5260; --dim: #747b8a;
  --accent: #e5483a; --accent-hover: #c93b2e; --accent-ink: #ffffff; --accent-soft: rgba(229, 72, 58, 0.08); --glow: rgba(229, 72, 58, 0.10);
  --chip: #f1f3f6; --code: #f4f5f8; --button-2: #eceef2;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lift: 0 2px 4px rgba(16, 24, 40, 0.05), 0 16px 40px rgba(16, 24, 40, 0.10);
  --b1: #2e3a8c; --b2: #4453b8; --b3: #6272de;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12; --bg-2: #10131a; --panel: #141821; --line: #232836; --line-2: #2e3445;
    --text: #eceff4; --text-2: #b3bac7; --dim: #8b93a3;
    --accent: #ff6b57; --accent-hover: #ff8574; --accent-ink: #1a0b08; --accent-soft: rgba(255, 107, 87, 0.12); --glow: rgba(255, 107, 87, 0.12);
    --chip: #1b202b; --code: #181c26; --button-2: #1e2430;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.5);
    --b1: #8a97f0; --b2: #6272de; --b3: #4453b8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12; --bg-2: #10131a; --panel: #141821; --line: #232836; --line-2: #2e3445;
  --text: #eceff4; --text-2: #b3bac7; --dim: #8b93a3;
  --accent: #ff6b57; --accent-hover: #ff8574; --accent-ink: #1a0b08; --accent-soft: rgba(255, 107, 87, 0.12); --glow: rgba(255, 107, 87, 0.12);
  --chip: #1b202b; --code: #181c26; --button-2: #1e2430;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.5);
  --b1: #8a97f0; --b2: #6272de; --b3: #4453b8;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
/* The footer at the very bottom, however short the page: the body is a column at least as tall as the window. */
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* The top bar. */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; flex: none; }
.brand svg { width: 28px; height: 28px; }
.links { display: flex; align-items: center; gap: 20px; }
.links a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; }
.links a:hover { color: var(--accent); }
.spacer { flex: 1; }
.tools { display: flex; align-items: center; gap: 10px; }
.seg { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--bg-2); }
.seg button { font: inherit; font-size: 12px; font-weight: 700; border: 0; background: none; color: var(--dim); border-radius: 7px; padding: 0 8px; cursor: pointer; display: grid; place-items: center; min-width: 30px; height: 26px; }
.seg button:hover { color: var(--text); }
.seg button svg { width: 15px; height: 15px; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14); }
.gh { color: var(--text); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; }
.gh:hover { background: var(--chip); }
.gh svg { width: 22px; height: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; border-radius: 8px; padding: 10px 18px; text-decoration: none; cursor: pointer; border: 0; transition: background 0.15s; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--button-2); color: var(--text); }
.btn.secondary:hover { background: var(--line-2); }
.btn.small { padding: 7px 14px; font-size: 14px; }
@media (max-width: 860px) { .links { display: none; } }
@media (max-width: 600px) { .nav .btn, .brand span { display: none; } .nav .wrap { gap: 10px; } .tools { gap: 6px; } }

/* The hero. */
.hero { position: relative; text-align: center; padding-block: 84px 36px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 560px; background: radial-gradient(55% 70% at 50% 0%, var(--glow), transparent 72%); pointer-events: none; }
.hero > * { position: relative; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); padding-bottom: 6px; border-bottom: 2px solid var(--accent); }
.hero h1 { margin: 22px auto 0; max-width: 16ch; font-size: clamp(40px, 7vw, 72px); line-height: 1.02; font-weight: 900; letter-spacing: -0.045em; text-wrap: balance; }
.hero .intro { margin: 22px auto 0; max-width: 60ch; font-size: clamp(17px, 2vw, 20px); color: var(--text-2); }
.hero .intro a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.ctas .btn { font-size: 17px; padding: 12px 26px; }

/* Tabs, one per client: in the hero to add the marketplace, in an extension's card to install and use it. */
.add { max-width: 820px; margin: 48px auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 22px 22px; box-shadow: var(--shadow-lift); text-align: left; }
.tabs { display: grid; gap: 16px; min-width: 0; }
.tablist { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 4px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--dim); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab svg { width: 18px; height: 18px; flex: none; }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabpanel { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-width: 0; }
code.cmd { font-family: var(--mono); font-size: 14px; background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: inline-flex; gap: 14px; align-items: center; max-width: 100%; overflow-x: auto; white-space: nowrap; color: var(--text); }
.copy { font-family: var(--sans); font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); cursor: pointer; padding: 3px 9px; border-radius: 6px; }
.copy:hover { color: var(--accent); border-color: var(--accent); }

/* The catalog. */
.catalog { padding-block: 56px 32px; flex: 1 0 auto; }
.catalog .head { text-align: center; margin-bottom: 26px; }
body[data-page="home"] .hero { flex: 1 0 auto; }
.catalog.page { position: relative; padding-block: 64px 32px; }
.catalog.page::before { content: ""; position: absolute; inset: 0 0 auto; height: 420px; background: radial-gradient(55% 70% at 50% 0%, var(--glow), transparent 72%); pointer-events: none; }
.catalog.page > * { position: relative; }
.catalog h1, .catalog h2 { margin: 16px 0 0; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.search { display: block; width: 100%; max-width: 720px; margin: 0 auto; font: inherit; font-size: 16px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 16px auto 30px; max-width: 900px; }
.chip { font: inherit; font-size: 13px; font-weight: 500; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { text-align: left; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.card:hover, .card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); outline: none; }
.top { display: flex; gap: 14px; align-items: center; }
.logo { width: 48px; height: 48px; border-radius: 12px; flex: none; object-fit: contain; }
.logo.initial { display: grid; place-items: center; background: var(--chip); color: var(--text-2); font-weight: 800; font-size: 20px; }
.name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; } .ver { color: var(--dim); font-size: 13px; font-weight: 500; margin-left: 6px; font-family: var(--mono); }
.desc { color: var(--text-2); font-size: 15px; margin: 0; }
.card .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 4px; } .tag { font-size: 12px; color: var(--dim); background: var(--chip); border-radius: 999px; padding: 1px 9px; }
.empty { color: var(--dim); text-align: center; grid-column: 1 / -1; }

/* An extension's card, opened: what it is, then how to install, configure and use it in the chosen client. */
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--panel); color: var(--text); box-shadow: var(--shadow-lift); }
dialog::backdrop { background: rgba(5, 8, 15, 0.55); backdrop-filter: blur(2px); }
dialog .banner { width: 100%; display: block; aspect-ratio: 3 / 1; object-fit: cover; }
dialog .body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
dialog h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
dialog .links { display: flex; gap: 6px; margin-left: auto; align-self: flex-start; }
dialog .links a, dialog .x { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--chip); color: var(--text); font-size: 19px; line-height: 1; text-decoration: none; cursor: pointer; padding: 0; font-family: inherit; }
dialog .links a:hover, dialog .x:hover { border-color: var(--accent); }
dialog .links svg { width: 20px; height: 20px; }
.label { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; }
.caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.cap { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg-2); }
.cap strong { display: block; font-size: 14px; } .cap span { display: block; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.howto { border: 1px solid var(--line); border-radius: 14px; padding: 6px 18px 18px; background: var(--bg-2); }
.howto .tablist { justify-content: flex-start; }
.howto .tabpanel { display: block; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 4px 12px; counter-increment: step; }
.step::before { content: counter(step); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.step h3 { margin: 2px 0 0; font-size: 16px; font-weight: 800; }
.step .content { display: grid; gap: 8px; min-width: 0; justify-items: start; }
.step p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.step p code, .settings code, .prompt code { font-family: var(--mono); font-size: 13px; background: var(--code); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.need { font-size: 14px; color: var(--text); background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
.settings { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; width: 100%; }
.settings li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.settings strong { font-weight: 700; } .settings .key { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-left: 6px; }
.settings span.d { display: block; color: var(--text-2); font-size: 13px; }
.prompts { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; width: 100%; }
.prompt { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 8px 12px; font-size: 14.5px; }
.muted { color: var(--dim); font-size: 14px; }
footer { flex: none; text-align: center; color: var(--dim); padding: 36px 16px 44px; font-size: 14px; border-top: 1px solid var(--line); margin-top: 32px; }
