/* ==========================================================================
   MurderMystery2-Script.com — "case file" theme
   Role colours from the game: Murderer = red, Sheriff = blue, Innocent = green
   System fonts only (no webfont requests) for fast, layout-shift-free loading.
   ========================================================================== */
:root {
  --bg: #0a080b;
  --panel: #141016;
  --panel-2: #1b151e;
  --panel-3: #231b27;
  --line: #2f2533;
  --text: #ede8ef;
  --muted: #b0a5b7;
  --red: #e0303c;
  --red-deep: #8d111a;
  --sheriff: #4a90ff;
  --innocent: #3ecf8e;
  --amber: #f2b632;
  --code-bg: #0b090d;
  --radius: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font: 400 1rem/1.7 var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 50% -120px, rgba(224, 48, 60, 0.16), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 14px);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; }
a { color: #ff7b85; text-underline-offset: 3px; }
a:hover { color: #ffc0c5; }
:focus-visible { outline: 3px solid var(--sheriff); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--panel-3); padding: 0.1em 0.4em; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--red); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.small { font-size: 0.875rem; color: var(--muted); }

/* ---- Boxed layout ---- */
.site {
  max-width: 1080px;
  margin: 28px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.main { padding: 0 clamp(16px, 4vw, 40px) 24px; }
.section { margin: 44px 0; }

/* ---- Crime-scene tape ---- */
.tape { height: 12px; background: repeating-linear-gradient(-45deg, var(--red) 0 14px, #0a080b 14px 28px); }
.tape--thin { height: 6px; }

/* ---- Header ---- */
.site-header { background: linear-gradient(#18121b, #130e16); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 4vw, 40px); position: relative; }
.brand { display: block; line-height: 0; }
.brand img { width: 200px; height: auto; }
.primary-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
.primary-nav a { display: block; padding: 10px 14px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-radius: 8px; letter-spacing: 0.02em; }
.primary-nav a:hover { background: var(--panel-3); color: #fff; }
.primary-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--red); border-radius: 8px 8px 0 0; }
.nav-toggle { display: none; min-width: 44px; min-height: 44px; background: var(--panel-3); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: var(--text); position: relative; content: ""; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

/* ---- Hero ---- */
.hero {
  position: relative;
  margin: 0 calc(-1 * clamp(16px, 4vw, 40px));
  padding: clamp(44px, 8vw, 84px) clamp(16px, 4vw, 40px) 40px;
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% 0, rgba(224, 48, 60, 0.28), transparent 70%),
    linear-gradient(#16101a, var(--panel));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero__splat {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='260' viewBox='0 0 220 260'><g fill='%238d111a'><path d='M30 0h14l-3 58a7 7 0 1 1-8 0z'/><circle cx='37' cy='72' r='9'/><path d='M150 0h10l-2 36a5 5 0 1 1-6 0z'/><circle cx='155' cy='48' r='6'/><path d='M96 0h8l-1 22a4 4 0 1 1-5 0z'/></g></svg>") 0 0 / 220px 260px repeat-x;
  mask-image: linear-gradient(#000 20%, transparent 90%);
  -webkit-mask-image: linear-gradient(#000 20%, transparent 90%);
}
.hero > * { position: relative; }
.hero__title { margin: 0 0 16px; font: 400 clamp(2.6rem, 8vw, 5rem)/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; color: #fff; text-shadow: 0 3px 0 var(--red-deep), 0 10px 30px rgba(224, 48, 60, 0.45); }
.hero__lead { max-width: 680px; margin: 0 auto 26px; color: #d9d0dc; font-size: clamp(1rem, 2.4vw, 1.15rem); }
.hero__cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero__badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; list-style: none; padding: 0; margin: 28px auto 0; max-width: 640px; }
.hero__badge { padding: 7px 16px; font: 700 0.8rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #ffd9dc; background: rgba(224, 48, 60, 0.14); border: 1px solid rgba(224, 48, 60, 0.55); border-radius: 999px; white-space: nowrap; }
.t-murderer { color: #ff6a74; } .t-sheriff { color: var(--sheriff); } .t-innocent { color: var(--innocent); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 8px; border: 1px solid transparent; font: 700 0.95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: transform 0.12s, background 0.12s, border-color 0.12s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(#e8414d, var(--red-deep)); color: #fff; box-shadow: 0 6px 18px rgba(224, 48, 60, 0.3); }
.btn--primary:hover { background: linear-gradient(#f0515c, #a3141e); color: #fff; }
.btn--ghost { background: var(--panel-3); color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: #2d2332; color: #fff; border-color: #4a3a50; }
.btn--lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.btn--delta { background: linear-gradient(#3a82ff, #1d4fb3); color: #fff; }
.btn--delta:hover { background: linear-gradient(#5595ff, #2559c4); color: #fff; }
.btn.is-success { background: linear-gradient(#2fb67c, #1b7a52); }
.btn.is-error { background: linear-gradient(#c0392b, #7d2118); }

/* ---- TOC ---- */
.toc { margin: 36px 0 0; padding: 22px clamp(16px, 3vw, 28px); background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); }
.toc__title { margin: 0 0 14px; font: 400 1.5rem/1.2 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; }
.toc__stamp { display: inline-block; margin-right: 10px; padding: 3px 8px; font: 700 0.7rem/1 var(--font-mono); letter-spacing: 0.12em; color: var(--red); border: 2px solid var(--red); border-radius: 3px; transform: rotate(-3deg); vertical-align: middle; }
.toc__list { margin: 0; padding: 0; list-style: none; counter-reset: toc; columns: 2; column-gap: 28px; }
.toc__list li { counter-increment: toc; break-inside: avoid; margin: 0 0 4px; }
.toc__list a { display: flex; gap: 12px; align-items: baseline; padding: 7px 8px; text-decoration: none; color: var(--text); border-radius: 6px; }
.toc__list a::before { content: counter(toc, decimal-leading-zero); font: 700 0.8rem/1 var(--font-mono); color: var(--red); }
.toc__list a:hover { background: var(--panel-3); color: #fff; }

/* ---- Typography in sections ---- */
.main { counter-reset: chap; }
.sec-title { position: relative; margin: 0 0 18px; padding-top: 22px; font: 400 clamp(1.7rem, 4.4vw, 2.5rem)/1.12 var(--font-display); letter-spacing: 0.01em; text-transform: uppercase; color: #fff; }
.sec-title::before { counter-increment: chap; content: "File " counter(chap, decimal-leading-zero); position: absolute; top: 0; left: 0; font: 700 0.72rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.sec-title::after { content: ""; display: block; margin-top: 12px; width: 84px; height: 4px; background: repeating-linear-gradient(-45deg, var(--red) 0 6px, transparent 6px 12px); }
.section h3 { margin: 28px 0 10px; font-size: 1.2rem; line-height: 1.3; color: #fff; }
.section p { margin: 0 0 14px; max-width: 78ch; }
.updated-line { color: var(--muted); }
.def-list, .check-list { padding-left: 1.2rem; margin: 0 0 16px; max-width: 78ch; }
.def-list li, .check-list li { margin-bottom: 8px; }
.check-list { list-style: none; padding-left: 0; }
.check-list li { position: relative; padding-left: 28px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px; border-left: 3px solid var(--innocent); border-bottom: 3px solid var(--innocent); transform: rotate(-45deg); }

.callout { margin: 20px 0; padding: 16px 20px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); border-left: 5px solid var(--amber); max-width: 78ch; }
.callout--warn { border-left-color: var(--red); background: rgba(224, 48, 60, 0.08); }
.callout__title { margin: 0 0 6px !important; font-weight: 800; color: #fff; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.1em; }
.callout p:last-child { margin-bottom: 0; }

/* ---- Script cards ---- */
.script-stack { display: flex; flex-direction: column; gap: 22px; counter-reset: exhibit; }
.script-card { position: relative; counter-increment: exhibit; padding: 38px clamp(14px, 3vw, 24px) 20px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: var(--radius); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35); }
.script-card::before { content: "Exhibit " counter(exhibit, decimal-leading-zero); position: absolute; top: 12px; left: clamp(14px, 3vw, 24px); font: 700 0.7rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.script-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.script-card__title { margin: 0 !important; font-size: clamp(1.15rem, 3vw, 1.5rem) !important; }
.script-card__shot { margin: 0 0 14px; background: #000; border: 1px solid var(--line); border-radius: 8px; }
.script-card__shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.badge { padding: 4px 11px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; color: #f5dfe1; background: rgba(224, 48, 60, 0.13); border: 1px solid rgba(224, 48, 60, 0.4); border-radius: 6px; }
.key-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; font: 800 0.76rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.key-pill--key { color: var(--amber); background: rgba(242, 182, 50, 0.1); }
.key-pill--keyless { color: var(--innocent); background: rgba(62, 207, 142, 0.1); }
.key-pill--varies { color: var(--sheriff); background: rgba(74, 144, 255, 0.1); }

.code-viewer { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--code-bg); }
.code-viewer__bar { display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 14px; background: #120e14; border-bottom: 1px solid var(--line); font: 600 0.78rem/1 var(--font-mono); color: var(--muted); }
.code-viewer__file { color: #e7d9ea; }
.code-viewer__meta { margin-left: auto; }
.code-viewer__expand { min-height: 32px; padding: 4px 12px; font: 700 0.75rem/1 var(--font-body); color: var(--text); background: var(--panel-3); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.code-viewer__expand:hover { background: #2d2332; }
.code-viewer__pre { margin: 0; padding: 14px 16px; max-height: var(--viewer-max, 260px); overflow: auto; font: 400 0.82rem/1.6 var(--font-mono); white-space: pre; tab-size: 4; -moz-tab-size: 4; color: #e9e2ec; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.code-viewer__pre code { font: inherit; background: none; padding: 0; border-radius: 0; }
.code-viewer.is-expanded .code-viewer__pre { max-height: 75vh; }
.tk-c { color: #7f748a; font-style: italic; } .tk-s { color: #9fe0b5; } .tk-n { color: #f2b632; } .tk-k { color: #ff7b85; font-weight: 600; }
.code-viewer__pre::-webkit-scrollbar { width: 10px; height: 10px; }
.code-viewer__pre::-webkit-scrollbar-thumb { background: #3b2e41; border-radius: 6px; }

.script-card__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.copy-status { font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }
.copy-status.is-ok { color: var(--innocent); } .copy-status.is-err { color: #ff8a80; }

/* ---- Delta promo ---- */
.promo-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px clamp(14px, 3vw, 24px); background: linear-gradient(120deg, #0f2347, #162a52 55%, #101c36); border: 1px solid #2c5bb0; border-radius: var(--radius); box-shadow: 0 0 0 3px rgba(74, 144, 255, 0.12), 0 12px 30px rgba(10, 40, 100, 0.35); }
.promo-card::before { content: "Recommended executor"; position: absolute; top: -10px; left: 18px; padding: 3px 10px; font: 700 0.66rem/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; background: var(--sheriff); color: #fff; border-radius: 4px; }
.promo-card__logo { width: 72px; height: 72px; border-radius: 14px; object-fit: contain; background: rgba(255, 255, 255, 0.06); }
.promo-card__title { margin: 0 0 4px !important; font-weight: 800; font-size: 1.1rem; color: #fff; }
.promo-card__text { margin: 0 !important; color: #c8d6f2; font-size: 0.93rem; max-width: none !important; }

/* ---- Steps ---- */
.steps { list-style: none; counter-reset: step; margin: 20px 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 6px 70px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 40px; height: 40px; display: grid; place-items: center; font: 400 1.5rem/1 var(--font-display); color: #fff; background: var(--red-deep); border: 2px solid var(--red); border-radius: 50%; }
.steps h3 { margin: 0 0 6px !important; font-size: 1.05rem !important; }

/* ---- Grids ---- */
.feature-grid, .risk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 18px 0; }
.feature, .risk { padding: 16px 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.feature h3, .risk h3 { margin: 0 0 8px !important; font-size: 1.05rem !important; }
.feature p, .risk p { margin: 0 !important; color: #d6ccd9; font-size: 0.95rem; }
.feature { border-top: 3px solid var(--sheriff); }
.risk { border-top: 3px solid var(--red); }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 14px 0; }
.shot { margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.shot figcaption { padding: 8px 12px; font-size: 0.8rem; color: var(--muted); }

.exec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; margin: 18px 0; }
.exec-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.exec-card__head { display: flex; align-items: center; gap: 14px; }
.exec-card__head img { width: 64px; height: 64px; border-radius: 12px; object-fit: contain; background: rgba(255, 255, 255, 0.05); }
.exec-card h3 { margin: 0 0 6px !important; font-size: 1.15rem !important; }
.exec-card p { margin: 0 !important; font-size: 0.93rem; }
.exec-card__facts { margin: 0; display: grid; gap: 8px; }
.exec-card__facts div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: baseline; font-size: 0.9rem; }
.exec-card__facts dt { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; }
.exec-card__facts dd { margin: 0; }
.exec-card__note { color: var(--muted); font-size: 0.85rem !important; }
.exec-card .btn { align-self: flex-start; margin-top: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 2px 9px; font-size: 0.78rem; font-weight: 700; background: var(--panel-3); border: 1px solid var(--line); border-radius: 5px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.split__col { padding: 16px 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.split__col h3 { margin: 0 0 8px !important; display: flex; align-items: center; gap: 10px; }
.split__col p { margin: 0 !important; }
.split__col--key { border-top: 3px solid var(--amber); } .split__col--keyless { border-top: 3px solid var(--innocent); }
.key-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.key-dot--key { background: var(--amber); } .key-dot--keyless { background: var(--innocent); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 0.93rem; }
.data-table caption { padding: 10px 14px; text-align: left; font-size: 0.82rem; color: var(--muted); caption-side: bottom; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--panel-3); font: 700 0.76rem/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #e7d9ea; }
.data-table tbody th { font-weight: 700; color: #fff; }
.data-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }

/* ---- FAQ + issues ---- */
.faq, .issues { display: grid; gap: 10px; }
.faq__item, .issue { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.faq__item summary, .issue summary { padding: 14px 44px 14px 18px; font-weight: 700; cursor: pointer; list-style: none; position: relative; }
.faq__item summary::-webkit-details-marker, .issue summary::-webkit-details-marker { display: none; }
.faq__item summary::after, .issue summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 400 1.5rem/1 var(--font-display); color: var(--red); }
.faq__item[open] summary::after, .issue[open] summary::after { content: "–"; }
.faq__item[open], .issue[open] { border-color: #4b2c34; }
.faq__item p { margin: 0 18px 16px !important; color: #d6ccd9; }
.issue ul { margin: 0 18px 16px; padding-left: 1.2rem; color: #d6ccd9; }
.issue li { margin-bottom: 6px; }

/* ---- Inner pages ---- */
.crumbs { padding: 18px 0 0; font-size: 0.85rem; color: var(--muted); }
.crumbs ol { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #5b4c61; }
.page-title { margin: 14px 0 18px; font: 400 clamp(2rem, 6vw, 3.2rem)/1.05 var(--font-display); text-transform: uppercase; text-shadow: 0 3px 0 var(--red-deep); }
.prose h2 { margin: 32px 0 10px; font-size: 1.35rem; color: #fff; border-left: 4px solid var(--red); padding-left: 12px; }
.prose p, .prose li { max-width: 78ch; }
.prose ul { padding-left: 1.2rem; }
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; margin-top: 18px; }
.contact-side { padding: 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); align-self: start; }
.contact-side h2 { margin-top: 0; }
.contact-form { display: grid; gap: 8px; }
.contact-form label { font-weight: 700; font-size: 0.9rem; margin-top: 8px; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--text); background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--sheriff); outline: none; box-shadow: 0 0 0 3px rgba(74, 144, 255, 0.25); }
.contact-form .btn { margin-top: 12px; justify-self: start; }
.form-note { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); }
.notfound { text-align: center; padding: 60px 0; }
.notfound__code { margin: 0; font: 400 clamp(5rem, 22vw, 10rem)/1 var(--font-display); color: var(--red); text-shadow: 0 6px 0 var(--red-deep); }

/* ---- Ads (render only when enabled & filled) ---- */
.ad-slot { margin: 28px 0; text-align: center; min-height: 0; }

/* ---- Footer ---- */
.site-footer { background: #0e0b10; border-top: 1px solid var(--line); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; padding: 30px clamp(16px, 4vw, 40px) 8px; }
.footer-title { margin: 0 0 10px; font: 400 1.15rem/1.2 var(--font-display); letter-spacing: 0.05em; text-transform: uppercase; color: #fff; }
.footer-text { margin: 0; color: var(--muted); font-size: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 4px; }
.site-footer li a { display: inline-block; padding: 5px 0; color: var(--muted); text-decoration: none; }
.site-footer li a:hover { color: #fff; text-decoration: underline; }
.footer-disclaimer { margin: 14px clamp(16px, 4vw, 40px) 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }
.footer-copy a { color: inherit; text-decoration: none; }
.footer-copy a:hover { color: #fff; text-decoration: underline; }
.footer-copy { margin: 8px clamp(16px, 4vw, 40px) 0; padding-bottom: 24px; font-size: 0.8rem; color: #81758a; }

/* ---- Decorative cookie notice ---- */
.cookie-notice { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; z-index: 50; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); padding: 8px 8px 8px 16px; background: #1f1722; color: var(--text); border: 1px solid #4a3a50; border-radius: 999px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6); font-size: 0.85rem; }
.cookie-notice[hidden] { display: none; }
.cookie-notice__btn { min-height: 36px; padding: 6px 16px; font: 700 0.82rem/1 var(--font-body); color: #fff; background: var(--red-deep); border: 1px solid var(--red); border-radius: 999px; cursor: pointer; }
.cookie-notice__btn:hover { background: var(--red); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .toc__list { columns: 1; }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .site { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .nav-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20; padding: 8px clamp(16px, 4vw, 40px) 14px; background: #18121b; border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { padding: 13px 12px; }
  .brand img { width: 160px; }
  .split { grid-template-columns: 1fr; }
  .promo-card { grid-template-columns: auto 1fr; }
  .promo-card .btn { grid-column: 1 / -1; }
  .steps li { padding-left: 62px; }
  .script-card__actions .btn { flex: 1 1 100%; }
  .code-viewer__pre { font-size: 0.78rem; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .cookie-notice { left: 12px; right: 12px; transform: none; width: auto; justify-content: space-between; border-radius: 14px; }
}
