:root {
  --ink: #0d0f14;
  --muted: #5a6172;
  --bg: #e8ecf5;
  --paper: #fffcf8;
  --line: #cfd5e3;
  --accent: #3b2cff;
  --accent-hot: #ff2e88;
  --accent-ok: #00c489;
  --accent-sun: #ffd21f;
  --shadow: 6px 6px 0 #0d0f14;
  --shadow-lg: 10px 10px 0 #0d0f14;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --grid: 44px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(13, 15, 20, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 15, 20, 0.055) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  overflow-x: hidden;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  -webkit-tap-highlight-color: rgba(59, 44, 255, 0.18);
  touch-action: manipulation;
}
body.nav-open { overflow: hidden; }
main.wrap {
  flex: 1 0 auto;
  width: min(1140px, calc(100% - 2rem));
  margin-inline: auto;
  padding-bottom: 1.5rem;
}
a { color: var(--accent); text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-hot); }
.wrap { width: min(1140px, calc(100% - 2rem)); margin-inline: auto; }

/* ----- Header ----- */
.site-header {
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(232, 236, 245, 0.86);
  border-bottom: 3px solid var(--ink);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.95rem 0;
}
.logo {
  font-family: var(--display);
  font-size: 1.45rem; letter-spacing: -0.03em;
  color: #fff; text-decoration: none;
  background: var(--accent); padding: 0.28rem 0.7rem;
  border: 3px solid var(--ink); box-shadow: var(--shadow);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.logo:hover {
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

/* TR language suggest (EN pages, Turkey visitors) */
.lang-suggest {
  background: var(--accent-sun);
  border-bottom: 3px solid var(--ink);
  padding: 0.7rem 0;
  animation: rise 0.35s var(--ease) both;
}
.lang-suggest-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  flex-wrap: wrap;
}
.lang-suggest-copy {
  flex: 1 1 16rem;
  min-width: 0;
}
.lang-suggest-title {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  background: var(--ink);
  color: var(--accent-sun);
  padding: 0.15rem 0.45rem;
  margin-right: 0.35rem;
  border: 2px solid var(--ink);
}
.lang-suggest-copy p {
  display: inline;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.lang-suggest-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.lang-suggest-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.lang-suggest-cta:hover {
  background: var(--accent-hot);
  color: #fff !important;
}
.lang-suggest-dismiss {
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  background: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--ink);
}
.lang-suggest-dismiss:hover { background: #ffe3ef; }

.nav { display: flex; flex-wrap: wrap; gap: 0.85rem 1.2rem; align-items: center; }
.nav > a {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem;
  position: relative;
}
.nav > a::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 3px; background: var(--accent-hot);
  transition: width 0.2s var(--ease);
}
.nav > a:hover::after { width: 100%; }
.lang-switch { display: flex; gap: 0.35rem; }
.lang-switch a {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  border: 2px solid var(--ink); padding: 0.28rem 0.5rem;
  text-decoration: none; color: var(--ink); background: var(--paper);
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-switch a:hover { background: var(--accent-sun); }
.lang-switch a[aria-current="page"] { background: var(--ink); color: #fff; }

/* ----- Hero stage ----- */
.hero-stage {
  margin: 1.5rem 0 1.75rem;
  position: relative;
}

/* Compact hero for inner pages (brands, legal, lists) */
.hero {
  padding: 2rem 0 1rem;
}
.hero > h1 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.05; margin: 0.5rem 0 0.65rem;
  letter-spacing: -0.03em;
}
.hero .hero-lead { margin: 0; color: var(--muted); max-width: 40rem; }
.hero-sheet {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-chrome {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  background: #f0f2f8;
  border-bottom: 3px solid var(--ink);
}
.hero-chrome .dot {
  width: 11px; height: 11px; border: 2px solid var(--ink); border-radius: 0;
}
.hero-chrome .dot.r { background: var(--accent-hot); }
.hero-chrome .dot.y { background: var(--accent-sun); }
.hero-chrome .dot.g { background: var(--accent-ok); }
.hero-chrome .path {
  margin-left: 0.5rem;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  color: var(--muted);
}
.hero-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  min-height: 420px;
}
.hero-copy {
  padding: 2rem 1.75rem 2.1rem;
  position: relative;
  z-index: 1;
}
.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0 0 0.85rem;
  color: var(--ink);
}
.hero-brand span {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.05em 0.18em;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-1.2deg);
}
.hero-kicker {
  display: inline-block;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  background: var(--accent-sun); border: 2px solid var(--ink);
  padding: 0.28rem 0.55rem; margin-bottom: 1rem;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-2deg);
  animation: kick-in 0.55s var(--ease) both;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  line-height: 1.08; margin: 0 0 0.75rem;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.hero-lead {
  margin: 0 0 1.25rem; color: var(--muted);
  max-width: 36rem; font-size: 1.05rem;
}

.stats {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 0 0 1.35rem;
}
.stat {
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 0.5rem 0.75rem; font-size: 0.86rem;
  animation: rise 0.5s var(--ease) both;
}
.stat:nth-child(2) { animation-delay: 0.06s; }
.stat:nth-child(3) { animation-delay: 0.12s; }
.stat strong {
  font-family: var(--mono); font-size: 1.08rem;
  margin-right: 0.28rem; color: var(--accent);
}

.search-stack { position: relative; }
.search-analyze {
  margin-bottom: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(120deg, #fff8d6 0%, #e8e9ff 100%);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--accent);
  animation: rise 0.3s var(--ease) both;
}
.analyze-track {
  height: 10px;
  background: rgba(13, 15, 20, 0.12);
  border: 2px solid var(--ink);
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.analyze-fill {
  display: block;
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot), var(--accent-sun));
  animation: analyze-slide 1.15s var(--ease) infinite;
}
@keyframes analyze-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.analyze-text {
  margin: 0;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
}
.search-analyze.is-error {
  background: #ffe8f0;
  box-shadow: 4px 4px 0 var(--accent-hot);
}
.search-analyze.is-error .analyze-track { display: none; }

.search-box {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 0.55rem;
  animation: rise 0.55s 0.1s var(--ease) both;
}
.search-box:focus-within {
  box-shadow: 8px 8px 0 var(--accent);
}
.search-field {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.15rem;
}
.search-box input[name="q"] {
  flex: 1 1 auto; border: 0; outline: none;
  font: inherit; font-size: 1.1rem; padding: 0.8rem 0.5rem 0.8rem 0.85rem;
  background: transparent; min-width: 0;
  width: 100%;
}
.search-tools {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  padding-right: 0.2rem;
}
.search-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 0;
  padding: 0;
  box-shadow: none !important;
  transform: none !important;
}
.search-tool:hover { color: var(--accent); background: #eef0ff; }
.search-tool:active { color: var(--accent-hot); }
.search-tool.is-listening {
  color: #fff;
  background: var(--accent-hot);
  animation: pulse-mic 1s ease infinite;
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 46, 136, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(255, 46, 136, 0); }
}
.search-submit {
  border: 3px solid var(--ink);
  background: var(--accent); color: #fff;
  font-family: var(--display); font-size: 1rem;
  padding: 0.75rem 1.25rem; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s var(--ease), background 0.15s ease, box-shadow 0.15s var(--ease);
}
.search-submit:hover {
  background: var(--accent-hot);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.search-submit:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
  animation: rise 0.25s var(--ease) both;
}
.search-chip {
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  min-height: 40px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}
.search-chip:hover {
  background: var(--accent-sun);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.search-hint { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.88rem; }

/* Off-screen file input — keep in DOM so programmatic .click() works */
.sr-file {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.cam-dialog {
  border: 3px solid var(--ink);
  padding: 0;
  max-width: min(440px, calc(100vw - 1.5rem));
  width: 100%;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.cam-dialog::backdrop {
  background: rgba(13, 15, 20, 0.55);
}
.cam-dialog-inner { padding: 0.85rem; }
.cam-dialog-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.cam-dialog-hd strong {
  font-family: var(--display);
  font-size: 1.05rem;
}
.cam-dialog-x {
  width: 40px; height: 40px;
  border: 3px solid var(--ink);
  background: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}
.cam-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0d0f14;
  border: 3px solid var(--ink);
}
.cam-dialog-hint {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-hot);
}
.cam-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.cam-shot, .cam-pick {
  flex: 1 1 140px;
  min-height: 48px;
  border: 3px solid var(--ink);
  font-family: var(--font);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}
.cam-shot { background: var(--accent); color: #fff; }
.cam-pick { background: var(--accent-sun); color: var(--ink); }
.cam-shot:disabled { opacity: 0.45; cursor: not-allowed; }

/* TV / error visual */
.hero-visual {
  position: relative;
  background:
    linear-gradient(160deg, #1a1d28 0%, #0d0f14 55%, #1c1630 100%);
  border-left: 3px solid var(--ink);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: hidden;
}
.hero-visual::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
}
.tv-frame {
  position: relative; z-index: 1;
  width: min(100%, 320px);
  background: #11141c;
  border: 3px solid #fff;
  box-shadow:
    8px 8px 0 var(--accent-hot),
    0 0 0 3px var(--ink);
  padding: 1rem 1rem 1.15rem;
  animation: float-y 4.5s ease-in-out infinite;
}
.tv-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.85rem;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  color: #9aa3b8;
}
.tv-live {
  color: var(--accent-ok);
  display: flex; align-items: center; gap: 0.35rem;
}
.tv-live::before {
  content: ""; width: 8px; height: 8px; background: var(--accent-ok);
  box-shadow: 0 0 0 3px rgba(0, 196, 137, 0.25);
  animation: blink 1.4s ease-in-out infinite;
}
.tv-error {
  font-family: var(--display);
  font-size: 1.65rem; line-height: 1;
  color: #fff; margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}
.tv-code {
  display: inline-block;
  font-family: var(--mono); font-weight: 700; font-size: 0.95rem;
  background: var(--accent); color: #fff;
  border: 2px solid #fff;
  padding: 0.3rem 0.55rem;
  margin-bottom: 0.85rem;
}
.tv-msg {
  margin: 0; color: #b8c0d4; font-size: 0.86rem; line-height: 1.45;
}
.tv-bar {
  margin-top: 1rem; height: 8px; background: #2a3144;
  border: 2px solid #fff; overflow: hidden;
}
.tv-bar > i {
  display: block; height: 100%; width: 62%;
  background: var(--accent-sun);
  animation: load-bar 2.8s var(--ease) infinite;
}
.tape-corner {
  position: absolute;
  width: 86px; height: 22px;
  background: var(--accent-sun);
  border: 2px solid var(--ink);
  z-index: 2;
}
.tape-corner.tl { top: 18px; left: -12px; transform: rotate(-8deg); }
.tape-corner.br { bottom: 22px; right: -14px; transform: rotate(6deg); background: var(--accent-hot); }

/* ----- Panels ----- */
.panel {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 0;
  margin: 1.5rem 0;
  position: relative;
}
.panel-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  background: #f3f5fb;
  border-bottom: 3px solid var(--ink);
}
.panel-hd h2 {
  font-family: var(--display);
  font-size: 1.15rem; margin: 0;
  letter-spacing: -0.01em;
}
.panel-hd .tag {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  border: 2px solid var(--ink); padding: 0.15rem 0.4rem;
  background: var(--accent-sun);
}
.panel-bd { padding: 1.2rem 1.2rem 1.35rem; }
.panel > .grid-cards,
.panel > .code-list,
.panel > p:not(.crumb) {
  padding: 1.2rem;
  margin: 0;
}
.panel.tape::before {
  content: "";
  position: absolute; top: -12px; right: 36px;
  width: 88px; height: 20px;
  background: var(--accent-sun);
  border: 2px solid var(--ink);
  transform: rotate(4deg);
  z-index: 3;
}
.panel.tape-pink::before { background: var(--accent-hot); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.how-card {
  border: 3px solid var(--ink);
  padding: 1.05rem;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.how-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--accent);
}
.how-card .n {
  font-family: var(--display); font-size: 2rem;
  color: #fff; line-height: 1; margin-bottom: 0.55rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem;
  background: var(--accent);
  border: 2px solid var(--ink);
}
.how-card:nth-child(2) .n { background: var(--accent-hot); }
.how-card:nth-child(3) .n { background: var(--accent-ok); color: var(--ink); }
.how-card p { margin: 0; font-size: 0.95rem; color: var(--muted); font-weight: 500; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.75rem;
}
.card-link {
  display: block; padding: 1rem 1rem 1rem 1.15rem;
  border: 3px solid var(--ink); background: #fff;
  color: var(--ink); text-decoration: none; font-weight: 800;
  box-shadow: 4px 4px 0 transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s ease;
}
.card-link:hover {
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  background: var(--accent-sun);
}
.card-link small {
  display: block; font-weight: 600; color: var(--muted);
  margin-top: 0.3rem; font-family: var(--mono); font-size: 0.75rem;
}

.code-list { list-style: none; margin: 0; padding: 0; }
.code-list li { border-top: 2px solid var(--line); }
.code-list li:first-child { border-top: 0; }
.code-list a {
  display: flex; gap: 0.85rem; justify-content: space-between; align-items: baseline;
  padding: 0.9rem 0.2rem; text-decoration: none; color: var(--ink);
  transition: padding-left 0.15s var(--ease), color 0.15s ease;
}
.code-list a:hover { color: var(--accent); padding-left: 0.4rem; }
.code-list .code {
  font-family: var(--mono); font-weight: 700; white-space: nowrap;
  background: #eef0ff; border: 2px solid var(--ink);
  padding: 0.15rem 0.45rem;
}
.code-list a:hover .code { background: var(--accent); color: #fff; }
.code-list .meta { color: var(--muted); font-size: 0.9rem; text-align: right; }

.crumb { font-size: 0.9rem; color: var(--muted); margin: 1.35rem 0 0.65rem; }
.crumb a { color: var(--muted); font-weight: 600; }

.article-head {
  padding: 1.35rem 1.4rem 1.5rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.35rem;
  position: relative;
}
.article-head::after {
  content: "";
  position: absolute; top: -11px; left: 28px;
  width: 92px; height: 20px;
  background: var(--accent-sun);
  border: 2px solid var(--ink);
  transform: rotate(-3deg);
}
.badge-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.9rem; }
.badge {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  border: 2px solid var(--ink); padding: 0.22rem 0.5rem; background: #fff;
}
.badge.cat { background: #e4e1ff; }
.badge.brand { background: #ffd6ea; }
.article-head h1 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.3vw, 2.25rem);
  margin: 0 0 0.6rem; line-height: 1.12;
  max-width: 28ch;
}
.code-pill {
  display: inline-block; font-family: var(--mono); font-weight: 700;
  background: var(--accent); color: #fff; padding: 0.35rem 0.7rem;
  margin-bottom: 0.85rem; letter-spacing: 0.02em;
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.summary { font-size: 1.08rem; color: var(--muted); max-width: 46rem; margin: 0; }

.steps, .causes { margin: 0; padding-left: 1.35rem; }
.steps li, .causes li { margin: 0.55rem 0; padding-left: 0.2rem; }
.steps li::marker { font-weight: 800; color: var(--accent); font-family: var(--mono); }
.causes li::marker { color: var(--accent-hot); }

.faq details {
  border-top: 2px solid var(--line);
  padding: 0.85rem 0;
}
.faq details:first-of-type { border-top: 0; }
.faq summary {
  cursor: pointer; font-weight: 800; list-style: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: inline-grid; place-items: center;
  width: 1.55rem; height: 1.55rem;
  border: 2px solid var(--ink);
  background: var(--accent); color: #fff;
  font-family: var(--mono); font-weight: 700; flex: 0 0 auto;
}
.faq details[open] summary::before {
  content: "–";
  background: var(--accent-hot);
}
.faq details p { margin: 0.55rem 0 0 2.1rem; color: var(--muted); }

.ad-slot {
  border: 3px dashed var(--line);
  background: rgba(255,255,255,0.55);
  min-height: 90px;
  display: grid; place-items: center;
  color: var(--muted); font-size: 0.8rem;
  margin: 1.1rem 0;
  overflow: hidden;
}
.ad-slot.is-live {
  border-style: solid;
  border-color: var(--line);
  display: block;
  padding: 0;
  background: transparent;
}

.legal-notice {
  margin: 1.75rem 0 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 2px dashed var(--line);
  color: #8a91a3;
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 46rem;
}

.scenarios-label {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.scenario-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.scenario-list li {
  border: 2px solid var(--ink);
  background: #f7f8fc;
  padding: 0.95rem 1rem 0.95rem 1.15rem;
  font-size: 0.95rem;
  box-shadow: 3px 3px 0 var(--line);
  line-height: 1.5;
}

.site-footer {
  margin-top: auto;
  padding: 2rem 0 2.75rem;
  border-top: 3px solid var(--ink);
  color: var(--muted); font-size: 0.92rem;
  background: rgba(255,255,255,0.72);
  flex-shrink: 0;
  width: 100%;
}
.footer-row {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
  justify-content: space-between; align-items: flex-start;
}
.footer-row strong {
  font-family: var(--display); font-size: 1.15rem;
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 0.1rem 0.45rem; border: 2px solid var(--ink);
  margin-bottom: 0.55rem;
}
.footer-about { max-width: 42rem; }
.footer-blurb {
  margin: 0;
  color: #444444;
  font-size: 0.92rem;
  line-height: 1.6;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
.footer-links a { color: var(--ink); font-weight: 800; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50;
  max-width: 440px; margin-inline: auto;
  background: var(--paper); border: 3px solid var(--ink);
  box-shadow: var(--shadow-lg); padding: 1.1rem;
  animation: rise 0.4s var(--ease) both;
}
.cookie h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-family: var(--display); }
.cookie p { margin: 0 0 0.85rem; font-size: 0.88rem; color: var(--muted); }
.cookie-actions { display: flex; gap: 0.5rem; }
.cookie-actions button {
  border: 3px solid var(--ink); cursor: pointer; font-weight: 800;
  padding: 0.5rem 0.85rem; font-family: var(--font);
  box-shadow: 3px 3px 0 var(--ink);
}
.cookie-actions .yes { background: var(--accent); color: #fff; }
.cookie-actions .no { background: #fff; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes kick-in {
  from { opacity: 0; transform: rotate(-8deg) scale(0.9); }
  to { opacity: 1; transform: rotate(-2deg) scale(1); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes load-bar {
  0% { width: 18%; }
  50% { width: 78%; }
  100% { width: 42%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 0.65rem 1rem;
  font-weight: 800; border: 3px solid var(--ink);
}
.skip-link:focus { left: 1rem; top: 1rem; }

.nav-toggle {
  display: none;
  align-items: center; gap: 0.45rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  font-family: var(--font); font-weight: 800; font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  min-height: 44px;
}
.nav-toggle-bars {
  display: block; width: 18px; height: 12px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 5px / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 10px / 100% 2px no-repeat;
}
body.nav-open .nav-toggle-bars {
  background:
    linear-gradient(var(--ink), var(--ink)) 0 5px / 100% 2px no-repeat;
  transform: rotate(45deg);
  height: 12px;
}

@media (max-width: 860px) {
  .hero-body { grid-template-columns: 1fr; }
  .hero-visual {
    border-left: 0;
    border-top: 3px solid var(--ink);
    min-height: 240px;
    padding: 1.15rem;
  }
  .hero-brand { font-size: clamp(2.2rem, 12vw, 3.2rem); }
  .tv-frame { width: min(100%, 280px); }
  .hero-copy { padding: 1.35rem 1.1rem 1.5rem; }
  .search-box input[name="q"] { font-size: 16px; } /* prevent iOS zoom */
}

@media (max-width: 760px) {
  .wrap, main.wrap { width: min(1140px, calc(100% - 1.25rem)); }
  .lang-suggest-inner { align-items: stretch; }
  .lang-suggest-copy p { display: block; margin-top: 0.35rem; }
  .lang-suggest-actions { width: 100%; }
  .lang-suggest-cta { flex: 1; }
  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.65rem;
  }
  .logo { font-size: 1.2rem; padding: 0.28rem 0.55rem; }
  .nav-toggle { display: inline-flex; margin-left: auto; }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    order: 3;
    border: 3px solid var(--ink);
    background: var(--paper);
    box-shadow: var(--shadow);
  }
  body.nav-open .nav { display: flex; }
  .nav > a {
    padding: 0.95rem 1rem;
    min-height: 48px;
    display: flex; align-items: center;
    border-bottom: 2px solid var(--line);
    font-size: 1rem;
  }
  .nav > a::after { display: none; }
  .nav > a:active { background: #eef0ff; }
  .lang-switch {
    padding: 0.75rem 1rem 0.9rem;
    gap: 0.5rem;
  }
  .lang-switch a {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0.5rem;
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
  }

  .how-grid { grid-template-columns: 1fr; gap: 0.7rem; }
  .grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .card-link {
    padding: 0.95rem 0.85rem 0.95rem 1rem;
    min-height: 72px;
  }
  .code-list a {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.95rem 0.15rem;
    min-height: 52px;
  }
  .code-list .meta { text-align: left; font-size: 0.88rem; }
  .code-list .code { white-space: normal; word-break: break-word; }

  .hero-stage { margin: 1rem 0 1.25rem; }
  .hero h1 { max-width: none; font-size: clamp(1.35rem, 6.5vw, 1.85rem); }
  .hero-sheet { box-shadow: 5px 5px 0 var(--ink); }
  .stats { gap: 0.4rem; }
  .stat { font-size: 0.8rem; padding: 0.45rem 0.55rem; }

  .search-box {
    flex-direction: column;
    padding: 0.45rem;
    gap: 0.45rem;
  }
  .search-field { width: 100%; }
  .search-box input[name="q"] {
    padding: 0.9rem 0.35rem 0.9rem 0.75rem;
    font-size: 16px;
  }
  .search-submit {
    width: 100%;
    min-height: 48px;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .search-chips { gap: 0.35rem; }
  .search-chip {
    font-size: 0.72rem;
    padding: 0.4rem 0.55rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .panel { margin: 1.1rem 0; box-shadow: 4px 4px 0 var(--ink); }
  .panel-hd { padding: 0.7rem 0.9rem; flex-wrap: wrap; }
  .panel-bd { padding: 1rem 0.9rem 1.15rem; }
  .article-head { padding: 1.15rem 1rem 1.25rem; box-shadow: 5px 5px 0 var(--ink); }
  .article-head h1 { max-width: none; }
  .code-pill { font-size: 0.9rem; word-break: break-word; }

  .faq summary { min-height: 44px; }
  .steps li, .causes li { margin: 0.65rem 0; }

  .footer-row { flex-direction: column; gap: 1.25rem; }
  .footer-links a {
    min-height: 44px;
    display: inline-flex; align-items: center;
    padding: 0.25rem 0;
  }
  .footer-blurb { font-size: 0.88rem; }

  .cookie {
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    max-width: none;
  }
  .cookie-actions { flex-direction: column; }
  .cookie-actions button { width: 100%; min-height: 48px; }

  .tape-corner,
  .panel.tape::before { display: none; }
  .ad-slot { margin: 0.85rem 0; }

  .crumb {
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .grid-cards { grid-template-columns: 1fr; }
  .hero-visual { min-height: 220px; }
  .tv-error { font-size: 1.35rem; }
}
