:root{
  --ink:#202936;
  --text:#2b3645;
  --muted:#5c6b7c;
  --blue:#003a70;
  --blue-deep:#003a70;
  --blue-dark:#003a70;
  --sky:#8bd5ff;
  --gray:#212529;
  --gray-dark:#212529;
  --gold:#d4a13e;
  --gold-dark:#a47a1f;
  --panel:rgba(255,255,255,.9);
  --line:rgba(32,41,54,.14);
  --shadow-soft:0 10px 24px rgba(7,59,142,.10);
  --shadow-card:0 16px 40px rgba(7,59,142,.18);
  --radius:22px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:#003a70;
  min-height:100vh;
}
a{color:var(--blue-deep);font-weight:750;text-decoration:none}
a:hover{text-decoration:underline}

/* ── Header / nav ───────────────────────────────────────────────────────── */
.site-header{position:sticky;top:0;z-index:10;backdrop-filter:blur(18px);background:rgba(255,255,255,.84);border-bottom:1px solid rgba(32,41,54,.08)}
.nav{max-width:1180px;margin:0 auto;padding:12px 22px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.brand{display:flex;align-items:center;gap:12px;color:var(--ink)}
.brand img{width:46px;height:46px;border-radius:10px;box-shadow:none;object-fit:cover}
.brand span{font-size:1.05rem;font-weight:900;letter-spacing:.01em}
.nav-links{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.nav-links a{color:var(--ink);padding:8px 12px;border-radius:8px;font-size:.92rem;font-weight:800}
.nav-links a:hover,.nav-links a.active{background:rgba(13,110,253,.12);text-decoration:none;color:var(--blue-dark)}
.menu-toggle{display:none;background:transparent;border:1px solid var(--line);color:var(--ink);width:40px;height:40px;border-radius:10px;font-size:1.2rem;cursor:pointer;align-items:center;justify-content:center;line-height:1;padding:0}
.menu-toggle:hover{background:rgba(13,110,253,.08)}
.menu-toggle:focus-visible{outline:2px solid var(--blue-deep);outline-offset:2px}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero{max-width:1180px;margin:0 auto;padding:54px 22px 28px;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr);gap:42px;align-items:center}
.hero-card{background:rgba(255,255,255,.92);border:1px solid rgba(32,41,54,.08);border-radius:28px;box-shadow:var(--shadow-soft);padding:clamp(26px,4vw,48px);position:relative;overflow:hidden;align-self:stretch}
.eyebrow{display:inline-flex;align-items:center;background:rgba(13,110,253,.11);color:var(--blue-dark);border:1px solid rgba(13,110,253,.18);border-radius:999px;padding:8px 13px;font-weight:900;font-size:.82rem;letter-spacing:.04em;text-transform:uppercase}
h1{font-size:clamp(2.35rem,7vw,5.4rem);line-height:.94;margin:18px 0;letter-spacing:-.06em}
.hero-card p{font-size:clamp(1.05rem,2vw,1.28rem);color:var(--text);line-height:1.65}
/* Right grid column wrapper — holds the image (with its white-frame
   backing) plus any sibling text + CTAs that should stack beneath it.
   align-self:stretch makes the column fill the grid row height; the
   gap evenly spaces the children below the image. */
.hero-column{display:flex;flex-direction:column;align-items:center;width:100%;align-self:stretch;gap:22px}
.hero-art{width:100%}
.hero-art img{width:100%;border-radius:24px;box-shadow:var(--shadow-soft);display:block}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.cta-row{display:flex;gap:14px;flex-wrap:wrap;margin-top:28px}
.button{display:inline-flex;align-items:center;gap:8px;border-radius:10px;padding:12px 18px;font-weight:850;text-decoration:none;box-shadow:none;border:1px solid transparent;line-height:1.2;transition:transform .12s ease,filter .12s ease}
.button.primary{color:#fff;background:var(--blue-deep);border-color:var(--blue-dark)}
.button.secondary{color:#fff;background:var(--gray);border-color:var(--gray-dark)}
.button.invite{color:#fff;background-color:#3ba55d;font-size:1.3em;width:100%;text-align:center;display:block;}
main .button.invite{width:auto;display:inline-flex;font-size:1em;}
.button.premium{color:#fff;background:var(--gold);border-color:var(--gold-dark);box-shadow:0 6px 16px rgba(212,161,62,.28)}
.button.premium:hover{filter:brightness(1.05)}
.button.outline{color:var(--ink);background:#fff;border-color:var(--line)}
.button:hover{transform:translateY(-1px);text-decoration:none;filter:brightness(.96)}

/* Two side-by-side buttons that each take 50% of the row width.
   Used on the homepage hero under the full-width Invite button so
   Setup + Upgrade share an even line. */
.cta-pair{display:flex;gap:14px;width:100%}
.cta-pair .button{flex:1;justify-content:center;text-align:center}

/* ── Alliance count badge — populated by assets/stats.json, which the
       bot publishes daily via stats_publisher.py. Lives inside .hero-art
       directly under the image; stays hidden until alliances >= 1. */
/* Alliance-count badge. Now lives directly in .hero-column on the dark
   page background (no longer over the image's white frame), so it uses
   white text instead of brand blue. */
.hero-column .alliance-count{color:#fff;text-align:center;font-size:.98rem;letter-spacing:.02em;opacity:.94}
.hero-column .alliance-count strong{color:#fff;font-weight:900;font-size:1.08rem}

/* Thin community-server CTA. Sibling of .hero-art inside .hero-column,
   sits on the dark page background. White-on-blue styling so it reads
   cleanly; spacing handled by the parent .hero-column's gap. */
.hero-column .community-cta{display:inline-flex;align-items:center;gap:6px;padding:9px 18px;border-radius:8px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.32);color:#fff;font-weight:800;font-size:.94rem;letter-spacing:.01em;text-decoration:none;transition:background .12s ease,transform .12s ease,border-color .12s ease}
.hero-column .community-cta:hover{background:rgba(255,255,255,.20);border-color:rgba(255,255,255,.5);text-decoration:none;transform:translateY(-1px);color:#fff}

/* ── Layout / content cards ─────────────────────────────────────────────── */
.container{max-width:1180px;margin:0 auto;padding:26px 22px 68px}
.content-card{background:var(--panel);border:1px solid rgba(32,41,54,.08);border-radius:var(--radius);box-shadow:var(--shadow-soft);padding:clamp(22px,4vw,46px);backdrop-filter:blur(10px)}
.content-card h1{font-size:clamp(2.1rem,5vw,4rem);margin-top:0}
/* h2 spacing: dropped the 1.4em top margin (too airy) and snugged the
   bottom to 0.5em so headings sit closer to their following paragraph. */
.content-card h2{margin-bottom:.5em;padding-top:.2em;font-size:clamp(1.45rem,2.6vw,2rem);letter-spacing:-.02em;color:var(--ink)}
.content-card h3{margin-top:1.1em;font-size:1.18rem;color:var(--ink)}
p,li{color:var(--text);line-height:1.72;font-size:1.02rem}
/* When a paragraph leads directly into a list, drop the gap between
   them so the list reads as a continuation. Modern :has() — fine for
   our 2026 audience. */
p:has(+ ul),p:has(+ ol){margin-bottom:0}
hr{border:0;height:1px;background:rgba(7,59,142,.22);margin:28px 0}
strong{color:var(--ink)}
blockquote{margin:22px 0;padding:18px 20px;border-left:5px solid var(--blue-deep);background:rgba(13,110,253,.07);border-radius:14px}

/* Inline command tokens — never wrap mid-command. */
code{background:rgba(7,59,142,.08);color:#073b8e;border:1px solid rgba(7,59,142,.14);padding:.18em .42em;border-radius:8px;font-weight:750;white-space:nowrap;word-break:keep-all}

/* Tables — preserve nowrap for code in cells, but allow long descriptions
   to wrap normally. */
table{width:100%;border-collapse:separate;border-spacing:0;overflow:hidden;border-radius:16px;border:1px solid var(--line);margin:24px 0;background:#fff}
th,td{padding:13px 15px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
th{background:rgba(13,110,253,.22);color:var(--ink);font-weight:950}
tr:last-child td{border-bottom:0}
ul,ol{padding-left:1.35rem}

/* ── Pricing page ───────────────────────────────────────────────────────── */
/* "Why Premium?" — a clean white card with a soft popout shadow, matching
   the hero-art treatment on the home page rather than the gold/blue
   gradient that fought with the body copy. */
.why-premium{margin:12px 0 56px;padding:24px 28px;border-radius:18px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-soft);display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.why-premium-item{display:flex;flex-direction:column;gap:4px}
.why-premium-item strong{display:block;font-size:1rem;color:var(--ink);font-weight:900}
.why-premium-item p{margin:0;color:var(--text);font-size:.95rem;line-height:1.55}
.plans{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:22px;margin:18px 0 36px}
.plan{position:relative;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-soft);padding:30px 28px;display:flex;flex-direction:column;gap:18px}
.plan.featured{border-color:rgba(212,161,62,.55);box-shadow:var(--shadow-card)}
.plan.featured:before{content:"Most Popular";position:absolute;top:-13px;left:50%;transform:translateX(-50%);background:var(--gold);color:#fff;font-size:.78rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;padding:6px 14px;border-radius:999px;box-shadow:0 4px 12px rgba(212,161,62,.36)}
/* Bigger plan icon. -18px bottom margin fully cancels the .plan flex
   gap so the tier name sits flush with the icon — easier to scan. */
.plan-icon{width:96px;height:96px;border-radius:16px;object-fit:cover;align-self:flex-start;margin-bottom:-18px}
.plan-name{font-size:1.4rem;font-weight:900;color:var(--ink);margin:0;letter-spacing:-.01em}
.plan-tagline{color:var(--muted);font-size:.98rem;margin:4px 0 0}
.plan-price{display:flex;align-items:baseline;gap:8px;margin:6px 0 0;color:var(--ink)}
.plan-price .amount{font-size:2.5rem;font-weight:900;letter-spacing:-.02em}
.plan-price .per{font-size:1rem;color:var(--muted);font-weight:700}
.plan-price-alt{font-size:.92rem;color:var(--muted);margin:-4px 0 0}
.plan-features{list-style:none;padding:0;margin:6px 0;display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--line);padding-top:18px}
.plan-features li{position:relative;padding-left:28px;color:var(--text);font-size:.97rem;line-height:1.55}
.plan-features li:before{content:"";position:absolute;left:0;top:.4em;width:18px;height:18px;border-radius:50%;background:rgba(59,165,93,.16);box-shadow:inset 0 0 0 2px #3ba55d}
.plan-features li:after{content:"";position:absolute;left:5px;top:.65em;width:8px;height:5px;border-left:2px solid #3ba55d;border-bottom:2px solid #3ba55d;transform:rotate(-45deg)}
.plan-features li.disabled{color:var(--muted)}
.plan-features li.disabled:before{background:rgba(184,184,184,.18);box-shadow:inset 0 0 0 2px #b8b8b8}
.plan-features li.disabled:after{display:none}
.plan-cta{margin-top:auto}
.plan-cta .button{width:100%;justify-content:center}

/* Compact comparison-table heading on the pricing page */
.comparison-intro{margin-top:38px}

/* Pricing FAQ: question (h3) flows straight into its answer (p)
   without a visible gap. Scoped to #faq so other h3+p pairs are
   unaffected. */
#faq h3{margin-bottom:0}
#faq h3+p{margin-top:0}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer{max-width:1180px;margin:0 auto;padding:28px 22px 48px;color:#fff;text-align:center}
.footer-links{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;margin-bottom:12px;}
.footer-links a{color:#fff!important;}

/* ── Release info block ──────────────────────────────────────────────────
   Compact "Latest Release" + changelog/roadmap links. Lives inside
   .hero-column under the Community CTA — signals the bot is actively
   shipping without needing a full-width strip. Update the version line
   inline with each release. Spacing handled by parent .hero-column gap. */
.hero-column .release-info{color:#fff;font-size:.9rem;text-align:center;letter-spacing:.01em;opacity:.95;line-height:1.6}
.hero-column .release-info strong{color:#fff;font-weight:900}
.hero-column .release-info a{color:#8bd5ff;font-weight:800}
.hero-column .release-info a:hover{color:#fff;text-decoration:underline}

/* ── Screenshots ────────────────────────────────────────────────────────── */
/* Pinterest-style column flow for the "What It Does" feature shots on
   index.html. Each image keeps its natural aspect ratio; items flow into
   2 columns at desktop (1 on small screens) so mixed aspect ratios stop
   fighting each other. */
.feature-screenshots{column-count:2;column-gap:22px;margin:28px 0 8px}
.feature-screenshots figure{break-inside:avoid;margin:0 0 22px;display:block}
.feature-screenshots figcaption{margin-top:10px;font-size:.92rem;color:var(--muted);font-style:italic;text-align:center;line-height:1.45}
@media(max-width:540px){.feature-screenshots{column-count:1}}

/* Single inline screenshot, used for setup/commands/pricing pages. */
figure.screenshot{margin:1.8em auto;text-align:center;max-width:600px}
/* `.wide` is for the data-ownership centerpiece on index — fills the full
   content-card width since the parent already constrains it. */
figure.screenshot.wide{max-width:none}
figure.screenshot figcaption{margin-top:10px;font-size:.95rem;color:var(--muted);font-style:italic;line-height:1.5}

/* Click-to-enlarge — every screenshot img is wrapped in an anchor. The
   anchor's href opens the full-resolution file as a fallback; nav.js
   intercepts left-clicks to open an in-page lightbox overlay instead so
   users keep their context. Cursor cue + subtle hover lift signal
   interactivity. */
a.screenshot-link{display:block;cursor:zoom-in;line-height:0;text-align:center}
/* `width:auto;max-width:100%` so small images render at native size and
   stay sharp instead of upscaling to fill the column and going blurry. */
a.screenshot-link img{width:auto;max-width:100%;height:auto;border-radius:12px;box-shadow:var(--shadow-soft);background:rgba(255,255,255,.4);transition:transform .15s ease,box-shadow .15s ease;display:inline-block;margin:0 auto}
a.screenshot-link:hover img{transform:translateY(-2px);box-shadow:var(--shadow-card)}

/* In-page lightbox using the native <dialog> element. Pattern follows
   Imgur / PhotoSwipe / Twitter Media Viewer:
   - Dialog fills the full viewport (no transform — that would break the
     close button's position:fixed)
   - Image centered with `margin:auto` inside a flex container, which
     handles both "fits screen" centering AND "overflows when zoomed"
     scrolling cleanly
   - Close button anchored to viewport top-right
   - Click image to toggle native-resolution zoom; cursor signals state
   ALL layout rules scoped to [open] so the dialog stays display:none
   when closed — otherwise display:flex would override the browser's
   default and the invisible dialog would intercept page clicks. */
dialog.lightbox:not([open]){display:none}
dialog.lightbox[open]{position:fixed;inset:0;width:100vw;height:100vh;max-width:100vw;max-height:100vh;margin:0;border:none;padding:0;background:transparent;display:flex;overflow:auto}
dialog.lightbox::backdrop{background:rgba(0,0,0,.88);backdrop-filter:blur(4px)}
dialog.lightbox .lightbox-img{margin:auto;max-width:92vw;max-height:92vh;width:auto;height:auto;border-radius:8px;box-shadow:0 20px 50px rgba(0,0,0,.5);cursor:zoom-in;display:block}
dialog.lightbox .lightbox-img.zoomed{max-width:none;max-height:none;cursor:zoom-out}
dialog.lightbox .lightbox-close{position:fixed;top:18px;right:18px;z-index:10;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.28);color:#fff;font-size:22px;cursor:pointer;line-height:1;padding:6px 14px;border-radius:8px;font-weight:800;backdrop-filter:blur(8px)}
dialog.lightbox .lightbox-close:hover{background:rgba(255,255,255,.24)}

/* Side-by-side pair, used on setup.html for the setup-edit + view-config
   shots so they balance each other instead of dominating vertically. */
.screenshot-pair{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:1.8em auto;max-width:900px}
.screenshot-pair figure.screenshot{margin:0;max-width:none}
@media(max-width:720px){.screenshot-pair{grid-template-columns:1fr}}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media(max-width:820px){
  .hero{grid-template-columns:1fr;padding-top:28px}
  .nav{flex-wrap:wrap}
  .menu-toggle{display:inline-flex}
  .nav-links{display:none;width:100%;flex-direction:column;align-items:stretch;gap:6px;padding-top:8px;border-top:1px solid var(--line);margin-top:6px}
  .nav-links.open{display:flex}
  .nav-links a{padding:10px 14px}
  .plan{padding:26px 22px}
}
