/* Smalltalkology — shared styles
   Change the two brand colours here and the whole site follows. */
:root {
  --accent: #4A86E8;   /* mid blue */
  --pop: #D1291F;      /* comic red */
  --ink: #141414;
  --paper: #F3EAD3;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Special Elite', 'Courier New', monospace;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--ink); }
a:hover { color: var(--pop); }
footer a:hover { color: var(--accent) !important; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--pop);
  outline-offset: 3px;
}

/* Skip link */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 16px;
  text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* Comic textures */
.dots { background-image: radial-gradient(rgba(20,20,20,.16) 1.3px, transparent 1.5px); background-size: 10px 10px; }
.dots-lt { background-image: radial-gradient(rgba(20,20,20,.08) 1.2px, transparent 1.4px); background-size: 8px 8px; }
.rays { background-image: repeating-conic-gradient(from 0deg at 50% 50%, rgba(20,20,20,.08) 0deg 8deg, transparent 8deg 16deg); }

/* Speech bubbles */
.bubble { position: relative; }
.bubble::after {
  content: ""; position: absolute; left: 34px; bottom: -15px; width: 24px; height: 24px;
  background: inherit; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: skewX(28deg) rotate(45deg);
}
.bubble.r::after { left: auto; right: 34px; transform: skewX(-28deg) rotate(45deg); }

/* Comic buttons: a little "press" on hover */
a[style*="box-shadow"], button[style*="box-shadow"] { transition: transform .12s ease, box-shadow .12s ease; }
a[style*="box-shadow"]:hover, button[style*="box-shadow"]:hover { transform: translate(-2px, -2px); }
a[style*="box-shadow"]:active, button[style*="box-shadow"]:active { transform: translate(3px, 3px); }

/* Ticker strip on the home page */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker span { display: inline-block; animation: ticker 28s linear infinite; padding-left: 24px; }

/* Script Vault filter chips */
.chip {
  cursor: pointer; font-family: 'Special Elite', monospace; font-size: 17px;
  padding: 12px 18px; min-height: 48px; border: 3px solid var(--ink);
  background: #FFFFFF; color: var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.script-card[hidden] { display: none !important; }

/* FAQ accordions */
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; font-family: Bangers, Impact, sans-serif; font-size: 28px; line-height: 1; }
details[open] summary::after { content: "–"; }

/* Form feedback */
.form-thanks {
  background: var(--accent); border: 3px solid var(--ink); padding: 16px 18px;
  font-size: 18px; box-shadow: 5px 5px 0 var(--ink);
}

/* Small screens */
@media (max-width: 720px) {
  header nav { padding: 14px 16px !important; }
  header nav > div { gap: 4px 14px !important; }
  section > div { padding-left: 16px !important; padding-right: 16px !important; }
  [style*="rotate("] { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker span { animation: none; }
  * { transition: none !important; }
}

/* ---------- Article pages ---------- */
.prose { font-size: 19px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote { margin-bottom: 0; }
.prose h2 {
  font-weight: 400; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15;
  margin: 2.2em 0 0; padding-bottom: 10px; border-bottom: 4px solid var(--ink);
}
.prose h2::before {
  content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 12px;
  background: var(--accent); border: 3px solid var(--ink); transform: rotate(45deg) translateY(-3px);
}
.prose h3 { font-weight: 400; font-size: 24px; line-height: 1.25; margin: 1.8em 0 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--pop); }
.prose strong { font-weight: 700; }
.prose a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose blockquote {
  margin-left: 0; margin-right: 0; padding: 20px 24px;
  background: var(--accent); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  font-size: 18px; line-height: 1.6;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .7em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 17px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 3px solid var(--ink); padding: 12px 14px; text-align: left; vertical-align: top; }
.prose th { background: var(--ink); color: var(--paper); font-weight: 400; letter-spacing: 1px; }
.prose td { background: #FFFFFF; }
.article-note {
  margin-top: 2.4em !important; padding: 14px 18px; border: 3px dashed var(--ink);
  font-size: 15px; line-height: 1.55;
}

/* ---------- 7-Day Challenge ---------- */
.day-card.is-done { opacity: .82; }
.day-card.is-done h2::after {
  content: " ✓ DONE"; font-family: Bangers, Impact, sans-serif; color: var(--pop); letter-spacing: 1px;
}
#finale[hidden] { display: none !important; }
