:root{
  --bg:#0b0c10; --card:#121419; --muted:#9aa3b2; --text:#e5e7eb; --brand:#7C3AED; --accent:#06B6D4; --ok:#22c55e; --warn:#f59e0b; --err:#ef4444;
  --border:#202534;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial}
a{color:var(--brand);text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:1rem}
/* Align header logo with wider home hero container */
.site-header .container{max-width:1100px}
.site-header{position:sticky;top:0;z-index:10;background:rgba(11,12,16,.8);backdrop-filter:saturate(1.2) blur(8px);border-bottom:1px solid #1f2430}
.site-footer{border-top:1px solid #1f2430;border-bottom:none;margin-top:2rem}

/* Share page uses the same hero grid as home. Only card styling below. */
.preview-wrap{position:relative}

.config-preview {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  min-height: 240px;
  position: relative;
  z-index: 1;
}

.config-preview h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.preview-content {
  margin-bottom: 1.5rem;
}

.preview-content p {
  margin: 0;
}

/* Empty state inside preview card */
.empty-state{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem}
.empty-state .btn.cta{padding:.7rem 1rem}

.use-config {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.help-text {
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 0.875rem;
}

@media (max-width:768px){.config-preview{min-height:220px}}
.brand{margin:0;font-size:1.1rem;font-weight:700;letter-spacing:.2px}
.site-header .bar{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.logo{display:flex;align-items:center;gap:.55rem}
.logo img{display:block;width:28px;height:28px}
.logo .wordmark{font-weight:800;font-size:1.18rem}
nav{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap}
nav a{margin-right:0;opacity:.98;padding:.5rem .7rem;border-radius:10px;border:1px solid transparent;color:var(--text)}
nav a:hover{background:rgba(255,255,255,.06);border-color:#2a3444;color:#fff}
nav a:focus-visible{outline:2px solid var(--brand);outline-offset:2px;background:rgba(255,255,255,.06)}
nav a[aria-current="page"]{background:linear-gradient(90deg,rgba(124,58,237,.18),rgba(6,182,212,.16));border-color:#2a3444;color:#e5e7eb}
/* Mobile hamburger toggle (hidden by default) */
.menu-toggle{display:none;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid #2a3444;border-radius:10px;background:#111826;color:#e5e7eb;cursor:pointer}
.menu-toggle:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.hero{padding:clamp(1rem,3vw,2rem) 0}
/* Match home hero vertical rhythm for share to avoid jump */
.share-hero{padding:clamp(.75rem,2.5vw,1.6rem) 0}
.hero h1{font-size:clamp(2.25rem,6vw,4.25rem);line-height:1.12;margin:0 0 .6rem;text-wrap:balance;letter-spacing:.2px}
.hero .sub{font-size:clamp(1.05rem,2.2vw,1.35rem);margin-top:.5rem}
.gradient-text{background:linear-gradient(90deg,var(--brand),var(--accent));-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
.actions{margin-top:1rem;display:flex;gap:.75rem;flex-wrap:wrap;align-items:center}
.actions.empty{visibility:hidden}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:.62rem 1rem;border:1px solid #253042;border-radius:10px;color:var(--text);background:#111826;line-height:1;min-height:44px;cursor:pointer;transition:background .2s ease,border-color .2s ease,box-shadow .2s ease,transform .05s ease}
.btn.primary{background:linear-gradient(90deg,var(--brand),var(--accent));color:#0b0c10;border:none;background-clip:padding-box}
.btn.cta{font-size:1.15rem;font-weight:700;padding:0.9rem 1.25rem;border-radius:12px;box-shadow:0 0 0 1px rgba(255,255,255,.06) inset, 0 6px 24px rgba(124,58,237,.35)}
.btn.lg{font-size:1.15rem;padding:1rem 1.4rem;min-height:50px;border-radius:14px;box-shadow:0 10px 32px rgba(124,58,237,.35)}
.btn.cta.xl{font-size:1.35rem;padding:1.1rem 1.8rem;min-height:56px;border-radius:16px;box-shadow:0 12px 36px rgba(124,58,237,.45)}
.btn.cta.xxl{font-size:1.6rem;padding:1.35rem 2.25rem;min-height:72px;border-radius:18px;box-shadow:0 14px 40px rgba(124,58,237,.5)}
.btn .icon{width:18px;height:18px;margin-right:.5rem;display:inline-block}
.btn .icon svg{display:block;width:18px;height:18px}
.card{background:var(--card);border:1px solid var(--border);padding:1rem;border-radius:12px;margin-top:1rem}
.hidden{display:none}
.muted{color:var(--muted)}
.notice{margin-top:.75rem;color:#e5e7eb;padding:.9rem 1.1rem;border-radius:12px;border:1px solid #3a4557;background:#0f1520;font-weight:600;font-size:.95rem}
/* Reserve space when toggling notice to avoid layout jump */
.hero .hero-title .notice{min-height:48px;display:flex;align-items:center}
/* When extension is installed with params: keep only the primary CTA on right */
.share-hero .hero-copy.cta-only .kv-list,
.share-hero .hero-copy.cta-only .muted,
.share-hero .hero-copy.cta-only #tryExample{display:none}
.share-hero .hero-copy.cta-only .actions{margin-top:1.2rem}
/* Responsive notice text */
@media (max-width: 640px) {
  .notice{font-size:.9rem;padding:.8rem 1rem}
}
.notice[data-type="ok"]{color:#eafff5;background:rgba(34,197,94,.22);border-color:#22c55e}
.notice[data-type="error"]{color:#ffecec;background:rgba(239,68,68,.24);border-color:#ef4444}
.notice[data-type="info"]{color:#e5e7eb;background:rgba(125,211,252,.12);border-color:rgba(125,211,252,.5)}
.kv-list{list-style:none;padding-left:0}
.kv-list li{display:flex;justify-content:space-between;gap:1rem;border-bottom:1px dashed #283041;padding:.4rem 0}
.kv-list .k{opacity:.9}
.kv-list .v{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}

/* Variant: plain list (no dividers, no flex) */
.kv-list.plain li{display:block;border-bottom:none;padding:.35rem 0}

/* Micro hint arrow next to Use Now (SVG, subtle breathing) */
.use-now{position:relative}
.use-now::after{
  content:"";display:inline-block;width:28px;height:28px;margin-left:.5rem;vertical-align:middle;pointer-events:none;
  background:url('/assets/icons/arrow-right.svg') no-repeat center/contain;
  transform: rotate(-45deg);
  opacity:0;visibility:hidden;transition:opacity .2s ease;
}
.use-now.has-hint::after{opacity:1;visibility:visible;animation:use-now-breathe 1.8s ease-in-out infinite}
@keyframes use-now-breathe{
  0%,100%{transform:rotate(-45deg) translateX(0) scale(1);opacity:.85}
  50%{transform:rotate(-45deg) translateX(2px) scale(1.06);opacity:1}
}
@media (prefers-reduced-motion: reduce){
  .use-now.has-hint::after{animation:none}
}
/* Reduce distraction on interaction */
.use-now:hover::after, .use-now:focus-visible::after{animation-play-state:paused}

/* Utilities */
.mb-2{margin-bottom:2rem}
.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:12px;top:12px;width:auto;height:auto;z-index:1000;background:#111826;color:#fff;border:2px solid #2a3444;border-radius:8px;padding:.5rem .75rem}

/* Media */
.screenshot-wrap{background:transparent;border:none;border-radius:14px;padding:0;margin:1rem auto;width:50%;max-width:560px;position:relative}
.screenshot{display:block;max-width:100%;height:auto;border-radius:10px;border:none;box-shadow:0 10px 30px rgba(0,0,0,.35);margin:0;background:#0b0f19}

/* Home hero tweaks */
.home-hero{padding:clamp(.75rem,2.5vw,1.6rem) 0}
/* Wider container with fluid gutters for safe margins */
.home-hero .container{max-width:1100px;padding-left:1rem;padding-right:1rem}
/* Keep share hero container width identical to home to avoid jump */
.share-hero .container{max-width:1100px;padding-left:1rem;padding-right:1rem}
/* Two columns with slightly larger media column; align content to top */
.home-hero .hero-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:clamp(8px,1vw,14px);align-items:center;grid-template-areas:"title title" "copy media"}
.home-hero .hero-title{grid-area:title;text-align:center;margin-bottom:.5rem}
.home-hero .hero-title h1{margin-bottom:.35rem;padding-bottom:.05em}
.home-hero .hero-title .sub{margin:.55rem 0 0}
.home-hero .hero-copy{grid-area:copy;max-width:620px;font-size:1.1rem}
.home-hero .screenshot-wrap{grid-area:media}
.home-hero .screenshot-wrap{width:100%;max-width:clamp(576px,43vw,768px);margin:0}
/* Remove outer frame from home hero media */
.home-hero .screenshot-wrap{border:none;background:transparent;padding:0}
.home-hero .screenshot{border:none}
.home-hero .screenshot-wrap.hero-glow::before{content:"";position:absolute;inset:-10% -8% -14% -8%;background:
  radial-gradient(60% 50% at 30% 10%, rgba(124,58,237,.35), transparent 60%),
  radial-gradient(60% 50% at 80% 20%, rgba(6,182,212,.30), transparent 60%);
filter:blur(32px);z-index:0}
.home-hero .screenshot{position:relative;z-index:1;transform:perspective(1200px) rotateX(.6deg) rotateY(-1.2deg)}
.home-hero .actions{margin-top:.9rem}
.home-hero .kv-list.plain{font-size:1.125rem}
.home-hero .kv-list.plain li{padding:.3rem 0}
/* Ensure share hero list sizing matches home */
.share-hero .kv-list.plain{font-size:1.125rem}
.share-hero .kv-list.plain li{padding:.3rem 0}
.eyebrow{display:inline-block;font-weight:700;color:#cbd5e1;letter-spacing:.08em;text-transform:uppercase;font-size:.8rem;border:1px solid #2a3444;border-radius:999px;padding:.25rem .6rem;background:rgba(255,255,255,.03)}
.hero-band{background:radial-gradient(1200px 500px at 10% -20%,rgba(124,58,237,.25),transparent 60%),radial-gradient(1000px 400px at 90% -10%,rgba(6,182,212,.18),transparent 60%)}

/* Shared hero grid for non-home pages (aligns with home layout) */
.hero .hero-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:clamp(8px,1vw,14px);align-items:center;grid-template-areas:"title title" "copy media"}
.hero .hero-title{grid-area:title;text-align:center;margin-bottom:.5rem}
.hero .hero-title h1{margin-bottom:.35rem;padding-bottom:.05em}
.hero .hero-title .sub{margin:.55rem 0 0}
.hero .hero-copy{grid-area:copy;max-width:620px;font-size:1.1rem}
.hero .screenshot-wrap{grid-area:media}
.hero .hero-grid .screenshot-wrap{width:100%;max-width:clamp(576px,43vw,768px);margin:0;border:none;background:transparent;padding:0}
.hero .hero-grid .screenshot{border:none;position:relative;z-index:1;transform:perspective(1200px) rotateX(.6deg) rotateY(-1.2deg)}
.hero .screenshot-wrap.hero-glow::before{content:"";position:absolute;inset:-10% -8% -14% -8%;background:
  radial-gradient(60% 50% at 30% 10%, rgba(124,58,237,.35), transparent 60%),
  radial-gradient(60% 50% at 80% 20%, rgba(6,182,212,.30), transparent 60%);
filter:blur(32px);z-index:0}

/* Share hero: swap columns so preview is left, text is right */
.share-hero .hero-grid{grid-template-columns:1fr 1fr;grid-template-areas:"title title" "media copy";gap:clamp(20px,3vw,36px);align-items:start}

/* Option A: installed + has params → docked CTA layout */
.share-hero.installed .hero-grid{grid-template-columns:1fr minmax(360px, 560px);gap:clamp(24px,3.5vw,44px);align-items:center}
/* 2:1 ratio only on wider screens; on mobile/tablet collapse to single column */
@media (min-width: 900px){
  .share-hero.installed.has-params .hero-grid{grid-template-columns:2fr 1fr}
}
@media (max-width: 899px){
  .share-hero.installed.has-params .hero-grid{grid-template-columns:1fr}
}
.share-hero.installed .hero-copy{max-width:560px}
.share-hero.not-installed .hero-grid{align-items:stretch}
.share-hero.not-installed .hero-copy{display:flex;flex-direction:column}
.share-hero.not-installed .hero-copy .actions{margin-top:auto}
.share-hero.installed .hero-copy .actions{justify-content:center}

/* Share page layout tweaks */
.s-page .hero{padding-bottom:0}
.s-page .hero .container{padding-bottom:0}
.s-page .hero .hero-copy{grid-column:1 / -1;max-width:none}
/* Make /s hero a single-column grid so notice spans full width */
.s-page .hero .hero-grid{grid-template-columns:1fr;grid-template-areas:"title" "copy"}
/* Make the status notice full-width on /s and add breathing room */
/* Full-width notice on /s, align with container edge */
.s-page .notice{display:block;width:100%;max-width:100%;margin-bottom:.2rem}
/* Pull notice to match .container.card outer border alignment */
.s-page .hero .notice{margin-left:-1rem;margin-right:-1rem}
/* Increase spacing between the notice block and the Preview card */
/* Make notice-to-Preview gap compact */
.s-page #preview.card{margin-top:.2rem}

@media (max-width: 680px){
  .screenshot-wrap{width:100%;max-width:100%}
  .home-hero .hero-grid{grid-template-columns:1fr;grid-template-areas:"title" "copy" "media"}
  .hero .hero-grid{grid-template-columns:1fr;grid-template-areas:"title" "copy" "media"}
  .actions{gap:.6rem}
}
/* On small screens, show Preview above copy for share hero */
@media (max-width: 680px){
  .share-hero .hero-grid{grid-template-areas:"title" "media" "copy"}
}
/* Nudge columns inward toward center on tablet/desktop */
@media (min-width: 768px){
  .home-hero .hero-copy{margin-left:clamp(8px,2vw,28px)}
  .home-hero .screenshot-wrap{margin-left:clamp(-28px,-2vw,-10px)}
}
/* Mid breakpoint: make columns equal and keep reasonable gap for tablets */
@media (min-width: 681px) and (max-width: 1024px){
  .home-hero .hero-grid{grid-template-columns:1.2fr .8fr;gap:14px}
}

/* Make subtitle slightly larger like home for share hero too */
.home-hero .sub,.share-hero .sub{font-size:clamp(1.15rem,2.5vw,1.5rem)}

/* Emphasize the primary CTA on home and share hero */
.home-hero .btn.cta.lg,.share-hero .btn.cta.lg{font-size:1.2rem;padding:1.05rem 1.5rem}

/* Desktop: keep hero title on a single centered line */
@media (min-width: 900px){
  .home-hero .hero-title h1,.share-hero .hero-title h1{white-space:nowrap;margin-left:auto;margin-right:auto}
}

/* Per-page media widening (do not affect home) */
.page-wide-media .container{max-width:1200px}
.page-wide-media .screenshot-wrap{width:100%;max-width:1100px}
@media (min-width: 681px){
  .page-wide-media .grid-steps{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
  .page-wide-media .grid-steps .screenshot-wrap{width:100%;max-width:none}
}

/* How It Works vertical layout */
.steps{display:block}
.steps .step{margin:1rem 0}
.steps .label{display:inline-block;font-weight:700;color:#cbd5e1;letter-spacing:.02em;font-size:.95rem;border:1px solid #2a3444;border-radius:999px;padding:.25rem .6rem;background:rgba(255,255,255,.03);margin-bottom:.5rem}
.steps .desc{margin:.25rem 0 .75rem;color:var(--muted);padding-left:12px}
.info .steps .desc{font-size:1.1rem}
.steps .screenshot-wrap{width:100%;max-width:1000px}
.info h2{font-size:clamp(1.4rem,2.4vw,1.9rem);margin:0 0 .6rem}

/* Mobile header: hamburger menu */
@media (max-width: 680px){
  .site-header .container{padding-left:.75rem;padding-right:.75rem}
  .site-header .bar{gap:.5rem}
  .menu-toggle{display:inline-flex}
  .site-header nav{display:none;position:absolute;top:100%;left:0;right:0;background:#111826;border-top:1px solid #2a3444;padding:.5rem;flex-direction:column;gap:.25rem}
  .site-header nav a{padding:.6rem .7rem;border-radius:8px}
  body.menu-open .site-header nav{display:flex}
  /* Backdrop */
  body.menu-open::before{content:"";position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9}
  .site-header{z-index:10}
}

/* Interactive states */
.btn:hover{transform:none}
.btn:active{transform:none}
.btn:focus-visible{outline:2px solid var(--brand);outline-offset:3px}

/* Simple table styles for comparison blocks */
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:12px;margin:1rem 0}
.table{width:100%;border-collapse:collapse;min-width:600px}
.table th,.table td{padding:.6rem .8rem;border-bottom:1px solid #243049;text-align:left}
.table thead th{background:#0f1520;color:#cbd5e1;font-weight:700}
.table tbody tr:nth-child(odd){background:rgba(255,255,255,.03)}
.table tbody tr:hover{background:rgba(124,58,237,.08)}

/* Small banner for home switch intent */
.ribbon{margin-top:.6rem;padding:.6rem .8rem;border:1px solid #2a3444;border-radius:10px;background:linear-gradient(90deg,rgba(124,58,237,.12),rgba(6,182,212,.1));font-weight:600}
.ribbon a{color:#fff;text-decoration:underline}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4rem;
  padding: 3rem 0 2rem;
}

.footer-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 3rem;
  margin: 0 0 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.footer-grid h4 {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin: 0.5rem 0;
}

.footer-grid a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.15s ease;
  line-height: 1.5;
}

.footer-grid a:hover {
  color: #e2e8f0;
}

.footer-meta {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-meta small {
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 400;
}

/* Enhanced footer copy for share value */
.footer-meta .share-value {
  color: #94a3b8;
  font-weight: 500;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 4rem;
  }
  
  .footer-cta {
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2rem;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
  }
  
  .footer-cta {
    margin-bottom: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
}
