/* ==========================================================================
   Silent Scripts — global stylesheet
   Single file, no build step. Sections:
   1. Tokens  2. Reset  3. Layout  4. Header/Footer  5. Components
   6. Page blocks  7. Docs  8. Responsive
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  --bg:            #07080b;
  --bg-soft:       #0b0d12;
  --surface:       #101218;
  --surface-2:     #14171f;
  --border:        #1e222c;
  --border-soft:   #171a22;

  --text:          #e7e9ef;
  --text-dim:      #a2a9b8;
  --text-faint:    #6d7484;

  --accent:        #7c5cff;
  --accent-soft:   #9a83ff;
  --accent-2:      #2fe0c0;
  --warn:          #ffb648;
  --danger:        #ff6b6b;

  --radius:        14px;
  --radius-sm:     9px;
  --radius-lg:     22px;

  --shadow:        0 18px 50px -20px rgba(0, 0, 0, .85);
  --glow:          0 0 60px -12px rgba(124, 92, 255, .55);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Consolas, monospace;

  --maxw: 1180px;
  --header-h: 68px;
}

/* 2. Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.02em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1em; color: var(--text-dim); }
ul, ol { color: var(--text-dim); }
code, kbd { font-family: var(--mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }
::selection { background: rgba(124, 92, 255, .35); }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23262f; border-radius: 20px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #32363f; }

/* 3. Layout ------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { font-size: 1.02rem; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.center { text-align: center; margin-inline: auto; }

/* 4. Header ------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(7, 8, 11, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header__inner { display: flex; align-items: center; gap: 28px; width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.02em; font-size: 1.02rem; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #4a2fd6 60%, #1d1240);
  box-shadow: 0 0 22px -6px rgba(124, 92, 255, .8);
}
.brand__mark svg { width: 17px; height: 17px; }
.brand__sub { color: var(--text-faint); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 13px; border-radius: 8px; font-size: .93rem;
  color: var(--text-dim); transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--text); background: var(--surface-2); }
.nav__cta { margin-left: 10px; }

.burger {
  display: none; margin-left: auto; width: 40px; height: 36px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; cursor: pointer; color: var(--text);
  align-items: center; justify-content: center;
}
.burger span { display: block; width: 16px; height: 1.6px; background: currentColor; position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.6px; background: currentColor; }
.burger span::before { top: -5px; } .burger span::after { top: 5px; }

/* 5. Components --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px;
  font-size: .94rem; font-weight: 550; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 32px -14px rgba(124, 92, 255, .95); }
.btn--primary:hover { background: var(--accent-soft); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: #333846; background: var(--surface-2); }
.btn--sm { padding: 8px 14px; font-size: .87rem; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 550; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
  white-space: nowrap; flex: none;
}
.badge--accent { color: var(--accent-soft); border-color: rgba(124, 92, 255, .4); background: rgba(124, 92, 255, .1); }
.badge--live   { color: var(--accent-2); border-color: rgba(47, 224, 192, .35); background: rgba(47, 224, 192, .1); }
.badge--soon   { color: var(--warn); border-color: rgba(255, 182, 72, .35); background: rgba(255, 182, 72, .1); }
.badge--plan   { color: var(--text-faint); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .18s, transform .18s, background .18s;
}
.card:hover { border-color: #2c3140; }
.card__icon {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: rgba(124, 92, 255, .12); color: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, .22);
}
.card__icon svg { width: 18px; height: 18px; }
.card h3 { margin-bottom: .4em; }
.card p { font-size: .93rem; margin: 0; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-soft); margin-bottom: 14px;
}
.lead { font-size: 1.08rem; color: var(--text-dim); max-width: 62ch; }
.muted { color: var(--text-faint); }
.mono { font-family: var(--mono); }

/* Code blocks */
pre {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
  overflow-x: auto; margin: 0 0 1.2em; position: relative;
  font-size: .86rem; line-height: 1.7;
}
pre code { color: #cfd4e0; }
:not(pre) > code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; color: #c9c2ff;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-faint);
  border-radius: 6px; padding: 3px 9px; font-size: .74rem; cursor: pointer;
  opacity: 0; transition: opacity .15s, color .15s;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); }
.copy-btn.is-done { color: var(--accent-2); }

/* Tables */
.table-scroll { overflow-x: auto; margin-bottom: 1.4em; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 480px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border-soft); }
th { color: var(--text); font-weight: 600; background: var(--surface); font-size: .85rem; letter-spacing: .02em; }
td { color: var(--text-dim); }
tr:last-child td { border-bottom: 0; }

/* 6. Page blocks -------------------------------------------------------- */
.hero { position: relative; padding: 110px 0 90px; overflow: hidden; }
.hero__glow {
  position: absolute; inset: -40% 0 auto 50%; transform: translateX(-50%);
  width: min(1100px, 130vw); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(124, 92, 255, .17), rgba(124, 92, 255, 0) 62%);
  pointer-events: none;
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero__inner { position: relative; text-align: center; max-width: 820px; margin-inline: auto; }
.hero h1 span { background: linear-gradient(100deg, #fff 20%, var(--accent-soft) 75%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-inline: auto; font-size: 1.14rem; }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 46px; margin-top: 58px; }
.stat__num { font-size: 1.7rem; font-weight: 650; letter-spacing: -.03em; }
.stat__label { font-size: .82rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .1em; }

/* Terminal mock */
.terminal {
  max-width: 760px; margin: 60px auto 0;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow), var(--glow); overflow: hidden;
  text-align: left;
}
.terminal__bar { display: flex; align-items: center; gap: 7px; padding: 11px 15px; border-bottom: 1px solid var(--border); background: var(--surface); }
.terminal__dot { width: 10px; height: 10px; border-radius: 50%; background: #2a2e39; }
.terminal__title { margin-left: 10px; font-size: .78rem; color: var(--text-faint); font-family: var(--mono); }
.terminal__body { padding: 18px 20px; font-family: var(--mono); font-size: .84rem; line-height: 1.85; }
.terminal__body .c-ok  { color: var(--accent-2); }
.terminal__body .c-key { color: var(--accent-soft); }
.terminal__body .c-dim { color: var(--text-faint); }

/* Script cards */
.script-card { display: flex; flex-direction: column; gap: 14px; }
.script-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.script-card__top > div:first-child { min-width: 0; }
.script-card__name { font-size: 1.22rem; font-weight: 650; letter-spacing: -.02em; }
.script-card__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-size: .74rem; padding: 3px 9px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-faint);
  font-family: var(--mono);
}
.script-card__foot { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; }
.feature-list { list-style: none; padding: 0; margin: 0; font-size: .92rem; display: grid; gap: 7px; }
.feature-list li { position: relative; padding-left: 20px; }
.feature-list li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 6px; height: 6px; border-radius: 2px; background: var(--accent); opacity: .8;
}

/* News / timeline */
.news-item {
  display: grid; grid-template-columns: 132px 1fr; gap: 26px;
  padding: 26px 0; border-bottom: 1px solid var(--border-soft);
}
.news-item:last-child { border-bottom: 0; }
.news-item__meta { font-size: .84rem; color: var(--text-faint); font-family: var(--mono); padding-top: 3px; }
.news-item__title { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.news-item__body { font-size: .95rem; color: var(--text-dim); }
.news-item__body ul { margin: .6em 0 0; padding-left: 18px; }
.news-item__body li { margin-bottom: 4px; }

/* Roadmap */
.roadmap { display: grid; gap: 18px; }
.roadmap__col > h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.roadmap-card { border-left: 2px solid var(--accent); }
.roadmap-card--soon { border-left-color: var(--warn); }
.roadmap-card--plan { border-left-color: #2c3140; }
.progress { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 14px; }
.progress__bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.progress__label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-faint); margin-top: 7px; font-family: var(--mono); }

/* CTA band */
.cta {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface), var(--bg-soft));
  padding: 54px 40px; text-align: center; position: relative; overflow: hidden;
}
.cta::after {
  content: ""; position: absolute; inset: auto -20% -80% -20%; height: 260px;
  background: radial-gradient(ellipse at center, rgba(124, 92, 255, .18), transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; }

/* Footer */
.footer { border-top: 1px solid var(--border-soft); padding: 54px 0 34px; margin-top: 40px; background: var(--bg-soft); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .92rem; }
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--text); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border-soft);
  font-size: .86rem; color: var(--text-faint);
}

/* 7. Docs --------------------------------------------------------------- */
.docs { display: grid; grid-template-columns: 244px minmax(0, 1fr) 200px; gap: 44px; padding: 44px 0 90px; align-items: start; }

.docs-side { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-right: 6px; }
.docs-search {
  width: 100%; padding: 9px 12px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-family: var(--font); font-size: .9rem;
}
.docs-search::placeholder { color: var(--text-faint); }
.docs-search:focus { outline: none; border-color: var(--accent); }
.docs-nav__group { margin-bottom: 22px; }
.docs-nav__group > span {
  display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-faint); margin-bottom: 9px; padding-left: 11px;
}
.docs-nav a {
  display: block; padding: 6px 11px; border-radius: 7px;
  font-size: .91rem; color: var(--text-dim); border-left: 2px solid transparent;
}
.docs-nav a:hover { color: var(--text); background: var(--surface); }
.docs-nav a.is-active { color: var(--accent-soft); background: rgba(124, 92, 255, .08); border-left-color: var(--accent); }
.docs-nav a.is-hidden { display: none; }

.docs-main { min-width: 0; }
.docs-main h2 {
  margin-top: 56px; padding-top: 8px; scroll-margin-top: calc(var(--header-h) + 20px);
  font-size: 1.75rem;
}
.docs-main > h2:first-of-type { margin-top: 12px; }
.docs-main h3 { margin-top: 34px; scroll-margin-top: calc(var(--header-h) + 20px); }
.docs-main ul, .docs-main ol { padding-left: 20px; }
.docs-main li { margin-bottom: 6px; }
.docs-main section { display: block; }

.docs-toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .86rem; }
.docs-toc > span { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); margin-bottom: 12px; }
.docs-toc a { display: block; padding: 4px 0 4px 12px; color: var(--text-faint); border-left: 1px solid var(--border); }
.docs-toc a:hover { color: var(--text-dim); }
.docs-toc a.is-active { color: var(--accent-soft); border-left-color: var(--accent); }

.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 0 0 1.4em;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--text); }
.callout--warn { border-left-color: var(--warn); }
.callout--danger { border-left-color: var(--danger); }

.docs-hero { padding: 54px 0 10px; border-bottom: 1px solid var(--border-soft); }

/* 8. Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
  .docs { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .section { padding: 62px 0; }
  .burger { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 14px 18px 20px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 12px; font-size: 1rem; }
  .nav__cta { margin: 8px 0 0; justify-content: center; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { gap: 30px 40px; }
  .news-item { grid-template-columns: 1fr; gap: 10px; }
  .docs { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .docs-side {
    position: static; max-height: 300px; overflow-y: auto;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; margin-bottom: 30px; background: var(--surface);
  }
  .cta { padding: 40px 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Custom pages built from Markdown (content/pages/*.md) */
.page-prose .docs-main { max-width: 820px; }
.page-prose .docs-main > h2:first-child { margin-top: 0; }
.docs-main img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 8px 0 18px; }

/* `hidden` must win over component display rules (.script-card is flex). */
[hidden] { display: none !important; }

/* 9. Catalogue filters & docs hub -------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: .86rem; cursor: pointer;
  padding: 7px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  transition: border-color .15s, color .15s, background .15s;
}
.chip span { color: var(--text-faint); font-family: var(--mono); font-size: .78rem; margin-left: 3px; }
.chip:hover { color: var(--text); border-color: #2c3140; }
.chip.is-active { color: #fff; background: rgba(124, 92, 255, .16); border-color: rgba(124, 92, 255, .55); }
.chip.is-active span { color: var(--accent-soft); }
.filter-search {
  min-width: 260px; flex: 0 1 320px;
  padding: 9px 13px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font: inherit; font-size: .9rem;
}
.filter-search:focus { outline: none; border-color: var(--accent); }
.filter-empty { margin-top: 20px; }
.script-card__cat { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 4px; }

.docs-group { margin-bottom: 44px; }
.docs-group__title {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-faint); margin-bottom: 16px; font-weight: 600;
}
.doc-card { display: flex; flex-direction: column; gap: 10px; }
.doc-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.doc-card__top h3 { margin: 0; }
.doc-card p { flex: 1; }
.doc-card__go { font-size: .86rem; color: var(--accent-soft); }
div.doc-card .doc-card__go { color: var(--text-faint); }
a.doc-card:hover { border-color: rgba(124, 92, 255, .45); }

/* 10. Ads & partners ---------------------------------------------------- */
.ad {
  --ad-accent: var(--accent);
  position: relative; display: flex; align-items: center; gap: 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background:
    radial-gradient(ellipse 60% 120% at 0% 0%, color-mix(in srgb, var(--ad-accent) 18%, transparent), transparent 70%),
    linear-gradient(160deg, var(--surface), var(--bg-soft));
  color: var(--text); overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.ad:hover { border-color: color-mix(in srgb, var(--ad-accent) 55%, var(--border)); }
.ad__label {
  position: absolute; top: 8px; right: 10px;
  font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint); background: rgba(7, 8, 11, .72);
  padding: 2px 7px; border-radius: 5px;
}
.ad__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad--image { padding: 0; }
.ad__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 220px; }
.ad__name { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ad-accent); }
.ad__title { font-size: 1.12rem; font-weight: 650; letter-spacing: -.01em; }
.ad__text { font-size: .9rem; color: var(--text-dim); }
.ad__cta {
  flex: none; padding: 9px 16px; border-radius: 9px; font-size: .88rem; font-weight: 550;
  background: var(--ad-accent); color: #0a0a0f;
}
.ad-mono {
  --ad-accent: var(--accent);
  flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px;
  font-weight: 700; font-size: 1.35rem; color: #fff;
  background: linear-gradient(140deg, var(--ad-accent), color-mix(in srgb, var(--ad-accent) 40%, #0b0d12));
}

/* banner: 1200 × 240 */
.ad--banner { aspect-ratio: 5 / 1; padding: 0 34px; }
.ad--banner:not(.ad--image) { aspect-ratio: auto; min-height: 150px; padding: 28px 34px; }
/* strip: 970 × 90 */
.ad--strip { max-width: 970px; margin-inline: auto; min-height: 90px; padding: 14px 22px; }
.ad--strip.ad--image { aspect-ratio: 970 / 90; min-height: 0; }
.ad--strip .ad-mono { width: 40px; height: 40px; font-size: 1.05rem; border-radius: 11px; }
.ad--strip .ad__title { font-size: .98rem; }
/* box: 300 × 250 */
.ad--box { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; margin-top: 22px; }
.ad--box.ad--image { aspect-ratio: 300 / 250; padding: 0; }
.ad--box .ad__title { font-size: 1rem; }
.ad--box .ad__cta { align-self: stretch; text-align: center; }

.ad-slot-strip { padding-top: 0; padding-bottom: 36px; }
.ad-slot-strip:empty { display: none; }

/* partner wall (logos) */
.partner-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.partner {
  --ad-accent: var(--accent);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 22px 16px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .18s, transform .18s;
}
.partner:hover { border-color: color-mix(in srgb, var(--ad-accent) 55%, var(--border)); transform: translateY(-2px); }
.partner__logo { display: grid; place-items: center; width: 84px; height: 84px; }
.partner__logo img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.partner__logo .ad-mono { width: 72px; height: 72px; font-size: 1.8rem; border-radius: 18px; }
.partner__meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.partner__name { font-size: .98rem; }

/* partner list (partners page) */
.partner-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.partner--list { flex-direction: row; align-items: flex-start; text-align: left; gap: 20px; padding: 24px; }
.partner--list .partner__logo { width: 96px; height: 96px; flex: none; }
.partner--list .partner__name { font-size: 1.15rem; }
.partner__title { color: var(--text); font-size: .95rem; }
.partner__text { color: var(--text-dim); font-size: .9rem; }
.partner__cta { color: var(--ad-accent); font-size: .88rem; margin-top: 6px; }

.placement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.placement { display: flex; flex-direction: column; gap: 8px; }
.placement__size { font-family: var(--mono); font-size: .8rem; color: var(--accent-soft); }
.placement__shape {
  border: 1px dashed #2c3140; border-radius: 8px; background: var(--bg-soft);
  display: grid; place-items: center; color: var(--text-faint); font-family: var(--mono); font-size: .74rem;
  margin: 6px 0 4px;
}

@media (max-width: 760px) {
  .filter-search { min-width: 0; flex: 1 1 100%; }
  .ad--banner:not(.ad--image) { flex-direction: column; align-items: flex-start; padding: 24px; }
  .ad--banner:not(.ad--image) .ad__body { flex: none; width: 100%; }
  .hero .badge { white-space: normal; text-align: center; line-height: 1.4; }
  .ad--banner.ad--image { aspect-ratio: 5 / 2; }
  .ad--strip { flex-wrap: wrap; }
  .partner-list, .placement-grid { grid-template-columns: 1fr; }
  .partner--list { flex-direction: column; }
}
