/* Demo site styles. Two layers:
   1) .demo-shell  — the marketing/demo wrapper (header, CTAs, callouts).
   2) .sample-site — a realistic fake magazine article that the extension
      restyles live. Reading mode targets <main>, so the wrapper dims away. */

:root {
  --ink: #14181f;
  --muted: #5b6675;
  --line: #e4e8ef;
  --bg: #f6f7f9;
  --brand: #2563eb;
  --brand-ink: #1d4ed8;
  --accent: #f43f5e;
  --paper: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--brand-ink); }

img { max-width: 100%; display: block; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ── Demo shell / header ─────────────────────────────────────────── */
.demo-shell {
  background: linear-gradient(160deg, #0b1220 0%, #111c33 55%, #0e2a4d 100%);
  color: #eef2f8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.demo-shell .wrap { padding-top: 26px; padding-bottom: 30px; }

.demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup img { width: 40px; height: 40px; border-radius: 9px; }
.brand-lockup b { font-size: 17px; letter-spacing: -0.01em; }
.brand-lockup span { display: block; font-size: 12px; color: #9fb3cd; font-weight: 500; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
  background: rgba(37, 99, 235, 0.18);
  color: #cfe0ff;
  border: 1px solid rgba(120, 165, 255, 0.35);
  padding: 5px 11px; border-radius: 999px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18); }

.demo-hero { margin-top: 26px; max-width: 720px; }
.demo-hero h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.08; margin: 0 0 12px; letter-spacing: -0.02em; }
.demo-hero p { font-size: 17px; color: #c3d0e2; margin: 0 0 22px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 12px 18px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4); }
.btn-primary:hover { background: #1e57e0; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: #eaf0fb; border-color: rgba(255, 255, 255, 0.18); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.callout {
  margin-top: 26px;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(160, 190, 230, 0.4);
  border-radius: 12px; padding: 12px 16px;
  font-size: 14px; color: #d6e2f2;
}
.callout .arrow { font-size: 20px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ── Presets bar ─────────────────────────────────────────────────── */
.presets-bar { background: #0d1526; border-bottom: 1px solid var(--line); }
.presets-bar .wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px; }
.presets-bar .lab { font-size: 13px; font-weight: 600; color: #9fb3cd; margin-right: 4px; }
.preset-btn {
  font: inherit; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.07); color: #e7eefb;
  border: 1px solid rgba(255,255,255,0.16);
  padding: 8px 13px; border-radius: 999px; cursor: pointer;
}
.preset-btn:hover { background: rgba(255,255,255,0.14); }
.preset-btn.reset { color: #fca5a5; border-color: rgba(252,165,165,0.4); }

/* ── Sample site (the fake magazine) ─────────────────────────────── */
.sample-site { background: var(--bg); padding: 40px 0 80px; }

.masthead {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 3px solid var(--ink); padding-bottom: 12px; margin-bottom: 8px;
}
.masthead .logo { font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.masthead nav { display: flex; gap: 18px; font-size: 14px; font-weight: 600; }
.masthead nav a { color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); }

.kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin: 22px 0 6px; }
article h1.headline { font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 5vw, 48px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -0.01em; }
.byline { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.byline .avatar { width: 38px; height: 38px; border-radius: 50%; }
.byline .live { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; }
.byline .live .blip { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.6); } }

.hero-figure { margin: 0 0 26px; }
.hero-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }

article { font-size: 18px; }
article p { margin: 0 0 20px; }
article h2 { font-family: Georgia, serif; font-size: 26px; margin: 36px 0 12px; letter-spacing: -0.01em; }
article h3 { font-size: 20px; margin: 28px 0 8px; }
article ul, article ol { margin: 0 0 20px; padding-left: 24px; }
article li { margin: 6px 0; }

.pullquote {
  font-family: Georgia, serif; font-size: 26px; line-height: 1.4;
  border-left: 4px solid var(--brand); margin: 30px 0; padding: 6px 0 6px 22px;
  color: var(--ink);
}
.inline-figure { margin: 28px 0; }
.inline-figure img { width: 100%; border-radius: var(--radius); }

table.data { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
table.data caption { text-align: left; font-weight: 700; margin-bottom: 8px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.data thead th { background: #eef2f8; }

.newsletter {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 34px 0; box-shadow: var(--shadow);
}
.newsletter h3 { margin: 0 0 6px; }
.newsletter p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input {
  flex: 1; min-width: 220px; font: inherit; font-size: 15px;
  padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 10px;
}
.newsletter button {
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  background: var(--brand); color: #fff; border: none; border-radius: 10px; padding: 11px 20px;
}

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 30px 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card img { width: 100%; height: 120px; object-fit: cover; }
.card .card-body { padding: 14px 16px; }
.card h4 { margin: 0 0 6px; font-size: 16px; }
.card a { text-decoration: none; }
.card p { font-size: 14px; color: var(--muted); margin: 0; }

.site-foot { background: #0d1526; color: #aebfd6; padding: 40px 0; font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: #cdddf2; }

/* ── Video section ───────────────────────────────────────────────── */
.video-section { background: #0b1220; color: #eef2f8; padding: 56px 0; }
.video-section h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.01em; }
.video-section p { color: #b9c7dc; margin: 0 0 24px; }
.video-frame { border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08); background:#000; }
.video-frame video { width: 100%; display: block; }
.video-missing { padding: 60px 20px; text-align: center; color: #93a4bd; border: 1px dashed rgba(255,255,255,0.2); border-radius: var(--radius); }

/* ── Tour captions overlay ───────────────────────────────────────── */
#a11y-tour-caption {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%) translateY(-14px);
  z-index: 2147483600;
  max-width: min(680px, calc(100vw - 40px));
  background: rgba(8, 13, 24, 0.95);
  color: #f4f8ff;
  border: 1px solid rgba(120, 165, 255, 0.4);
  border-radius: 14px;
  padding: 14px 22px;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 17px; line-height: 1.45;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
#a11y-tour-caption.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#a11y-tour-caption .step { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7fa8ff; margin-bottom: 5px; }
#a11y-tour-caption b { color: #fff; }

/* A soft spotlight ring the tour can move onto an element */
#a11y-tour-spot {
  position: fixed; z-index: 2147483590; pointer-events: none;
  border: 3px solid #4ade80; border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25), 0 0 30px rgba(74,222,128,0.4);
  opacity: 0; transition: opacity .3s ease, all .45s cubic-bezier(.4,0,.2,1);
}
#a11y-tour-spot.show { opacity: 1; }

@media (max-width: 640px) {
  .masthead nav { display: none; }
  .demo-hero h1 { font-size: 30px; }
}
