/* CSCI 40 — Introduction to AI Tools
   Single shared stylesheet. Design tokens up top. */

:root {
  --ink: #22252b;
  --ink-soft: #565b66;
  --paper: #fdfcfa;
  --card: #ffffff;
  --line: #e6e2dc;
  --accent: #7d2335;        /* deep maroon */
  --accent-dark: #5e1a28;
  --accent-wash: #f7eef0;
  --max: 60rem;
  --radius: 10px;
  font-size: 17px;
}

* { box-sizing: border-box; }

.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;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: 2.1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; margin-top: 2.2em; }
h3 { font-size: 1.1rem; margin-top: 1.6em; }

p { margin: 0.4em 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- interview-context notice ---------- */

.notice-bar {
  background: #2a2d34;
  color: #d8d5cf;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.notice-bar strong { color: #fff; }

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.brand .accent { color: var(--accent); }
.site-nav a {
  margin-left: 1.4rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--accent-wash), var(--paper));
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0 2.75rem;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero .kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.hero h1 { max-width: 34ch; }
.hero .lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 58ch;
}
.hero .meta {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hero .meta span { white-space: nowrap; }
.hero .meta span + span::before { content: "·"; margin: 0 0.6em; color: var(--line); }

/* ---------- main content ---------- */

main { padding: 2.5rem 0 4rem; }

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}
.lesson-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lesson-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(125, 35, 53, 0.08);
}
.lesson-card .num {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.lesson-card h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.lesson-card h3 a { color: var(--ink); text-decoration: none; }
.lesson-card h3 a::after { content: ""; position: absolute; inset: 0; }
.lesson-card { position: relative; }
.lesson-card p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- focus / dimmed states ---------- */

.badge {
  display: inline-block;
  float: right;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
  margin: 0.1rem 0 0.4rem 0.75rem;
}
.badge.badge-quiet {
  color: var(--accent);
  background: var(--accent-wash);
}

.card-focus {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-wash), var(--card) 55%);
  box-shadow: 0 2px 12px rgba(125, 35, 53, 0.1);
}

.dimmed {
  opacity: 0.5;
  filter: grayscale(0.7);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.dimmed:hover { opacity: 0.85; filter: grayscale(0.2); }

.schedule tr.focus-row td {
  background: var(--accent-wash);
  border-bottom-color: var(--accent);
}
.schedule tr.focus-row td:first-child { color: var(--accent); font-weight: 600; }

.hub-link {
  border-left: 1px solid var(--line);
  padding-left: 1.4rem;
}

/* ---------- schedule table ---------- */

.schedule {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.schedule th, .schedule td {
  text-align: left;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.schedule th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--line);
}
.schedule td:first-child { white-space: nowrap; color: var(--ink-soft); }
.schedule .note td { color: var(--ink-soft); font-style: italic; }

.table-scroll { overflow-x: auto; }

/* ---------- lesson pages ---------- */

.lesson-header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding: 2.5rem 0 2rem;
}
.lesson-header .kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.lesson-header .meta { color: var(--ink-soft); font-size: 0.95rem; }

.objectives, .materials {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.4rem;
  margin: 1rem 0 1.5rem;
}
.objectives ul, .materials ul { margin: 0.3rem 0 0.2rem; padding-left: 1.2rem; }
.objectives li, .materials li { margin: 0.3rem 0; }

.agenda { list-style: none; margin: 1rem 0 1.5rem; padding: 0; }
.agenda li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid var(--line);
}
.agenda .time {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.agenda strong { display: block; }
.agenda p { margin: 0.15rem 0 0; font-size: 0.92rem; color: var(--ink-soft); }

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.placeholder {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink-soft);
  padding: 1rem 1.4rem;
  font-size: 0.95rem;
}

/* ---------- mini-lesson (teach-from-page) ---------- */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 100;
}

.slide {
  padding: 3rem 0 3.25rem;
  border-bottom: 1px solid var(--line);
}
.slide:last-of-type { border-bottom: none; }

.chip {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.15rem 0.7rem;
  margin-bottom: 0.8rem;
}

/* Hidden state only applies once JS is running (html.js) — content stays
   visible for no-JS readers. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.visible { opacity: 1; transform: none; }

/* cards cascade in after their section reveals */
.js .reveal .lesson-card,
.js .reveal .steps li {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .reveal.visible .lesson-card,
.js .reveal.visible .steps li { opacity: 1; transform: none; }
.js .reveal.visible .lesson-card:nth-child(2),
.js .reveal.visible .steps li:nth-child(2) { transition-delay: 0.15s; }
.js .reveal.visible .lesson-card:nth-child(3),
.js .reveal.visible .steps li:nth-child(3) { transition-delay: 0.3s; }

/* scrollspy: the current section's timing chip lights up */
.chip { transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* dark deck theme: token flip scoped to the presentation page */
body.deck {
  --ink: #e9e7e2;
  --ink-soft: #a6adb8;
  --paper: #12141a;
  --card: #1a1d25;
  --line: #2b303b;
  --accent: #d4506b;
  --accent-dark: #e79aa9;
  --accent-wash: rgba(212, 80, 107, 0.10);
  background: var(--paper);
}
body.deck .site-header,
body.deck .site-footer,
body.deck .lesson-header { background: #15171f; }
body.deck .chip.active { box-shadow: 0 0 16px rgba(212, 80, 107, 0.45); }
body.deck .lesson-card:hover { box-shadow: 0 2px 16px rgba(212, 80, 107, 0.16); }
body.deck .demo-timer { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55); }
body.deck .demo-timer.warn { color: #e8b34b; }
body.deck .demo-timer.warn.running .dot { background: #e8b34b; }
body.deck .demo-timer.crit { color: #ff7b72; border-color: #ff7b72; }
body.deck .demo-timer.crit.running .dot { background: #ff7b72; }
body.deck .td-verdict.ok { color: #7bd88a; }
body.deck .td-verdict.bad { color: #ff7b72; }
body.deck .badge { color: #fff; }

/* light "paper" interlude inside the dark deck — local token re-flip */
.slide-light {
  --ink: #22252b;
  --ink-soft: #565b66;
  --paper: #fdfcfa;
  --card: #ffffff;
  --line: #e6e2dc;
  --accent: #7d2335;
  --accent-dark: #5e1a28;
  --accent-wash: #f7eef0;
  background: var(--paper);
  color: var(--ink);
}

/* big points + side notes: presenter layout */
.slide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  align-items: start;
}
.slide-grid > .main { min-width: 0; }

.big-points { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.big-points li {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 1.1rem 0;
  padding-left: 1.8rem;
  position: relative;
}
.big-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: -apple-system, sans-serif;
}
.big-points em { color: var(--accent-dark); font-style: normal; }

.side-notes {
  position: sticky;
  top: 3rem;
  border-left: 1px solid var(--line);
  padding-left: 1.4rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.side-notes .label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
  margin-bottom: 0.7rem;
}
.side-notes ul { list-style: none; margin: 0; padding: 0; }
.side-notes li { margin: 0 0 0.85rem; line-height: 1.55; }
.side-notes strong { color: var(--ink); }

@media (max-width: 62rem) {
  .slide-grid { grid-template-columns: 1fr; }
  .side-notes {
    position: static;
    border-left: none;
    border-top: 1px dashed var(--line);
    padding: 1.1rem 0 0;
  }
}

/* "AI system = parts" component row */
.sys-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1.3rem 0;
}
.sys-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin-right: 0.3rem;
}
.sys-part {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  color: var(--ink-soft);
  background: var(--card);
}
.sys-part.hot {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-wash);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(212, 80, 107, 0.25);
}
.sys-plus { color: var(--ink-soft); opacity: 0.6; }

/* deck feel: full-height slides, centered content */
.slide {
  min-height: 86vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}
.slide > .wrap { width: 100%; }

.lesson-hero { position: relative; overflow: hidden; padding: 4.5rem 0 3.75rem; }
.lesson-hero .wrap { position: relative; z-index: 1; }
.lesson-hero h1 { font-size: 2.7rem; }
.lesson-hero .hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* dark interlude slide */
.slide-dark { background: #23262d; border-color: #2f333c; }
.slide-dark h2 { color: #f4f2ee; }
.slide-dark > .wrap > p, .slide-dark p { color: #b9bec8; }
.slide-dark .chip {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #e79aa9;
}
.slide-dark .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.slide-dark .lesson-card { background: #2a2e36; border-color: #3a3f49; box-shadow: none; }
.slide-dark .lesson-card:hover { border-color: #e79aa9; }
.slide-dark .lesson-card h3 { color: #f4f2ee; }
.slide-dark .lesson-card p { color: #aeb4bf; }
.slide-dark .story-card .moral { color: #e79aa9; border-top-color: #3a3f49; }

/* slide-position dot rail (desktop) */
.slide-rail {
  position: fixed;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.slide-rail button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--ink-soft);
  background: transparent;
  cursor: pointer;
  padding: 0;
  opacity: 0.45;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.slide-rail button:hover { opacity: 1; }
.slide-rail button.active {
  background: var(--accent);
  border-color: var(--accent);
  opacity: 1;
  transform: scale(1.35);
}
@media (max-width: 68rem) { .slide-rail { display: none; } }

/* next-word prediction demo */
.token-demo {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 1.6rem 0;
  box-shadow: 0 3px 16px rgba(34, 37, 43, 0.06);
  /* fixed, not min — reserved up front for the longest of the two demo
     sequences (text line + candidate row + verdict line) so the box never
     reflows the slide around it as content types in and cycles. */
  height: 14rem;
  overflow: hidden;
}
.token-demo .td-line { font-size: 1.02rem; color: var(--ink); min-height: 3.2em; }
.token-demo .td-verdict { min-height: 1.5rem; }
.td-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: caret-blink 1s steps(2, start) infinite;
}
.td-pick { color: var(--accent); font-weight: 700; }
.td-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin-top: 1rem;
}
.td-candidates { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.55rem; min-height: 2.1rem; }
.td-cand {
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.18rem 0.7rem;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.td-cand.show { opacity: 1; transform: none; }
.td-cand.win { background: var(--accent); border-color: var(--accent); color: #fff; }
.td-verdict { margin-top: 0.95rem; font-size: 0.92rem; font-weight: 600; opacity: 0; transition: opacity 0.4s ease; }
.td-verdict.show { opacity: 1; }
.td-verdict.ok { color: #2e7d32; }
.td-verdict.bad { color: #b3261e; }
@keyframes caret-blink { 50% { opacity: 0; } }

/* small-model "try it yourself" widget — a live terminal, same family as
   the token-demo box: dark card, monospace, glowing accents. */
.ask-widget {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1.6rem 0;
  overflow: hidden;
  box-shadow: 0 3px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 80, 107, 0.06);
}

.ask-titlebar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.ask-dots { display: inline-flex; gap: 0.35rem; }
.ask-dots i {
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: var(--line);
  display: block;
}
.ask-titlebar .ask-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0;
}
.ask-tag .live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #2e9e4f;
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 158, 79, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(46, 158, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 158, 79, 0); }
}
.ask-meter {
  margin-left: auto;
  display: inline-flex;
  gap: 0.22rem;
}
.ask-meter i {
  width: 0.85rem; height: 0.3rem;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
  transition: background 0.3s ease, opacity 0.3s ease;
}
.ask-meter i.used { background: var(--line); opacity: 0.6; }

.ask-log {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-height: 22rem;
  overflow-y: auto;
  padding: 1.1rem 1.1rem 0.2rem;
}
.ask-empty {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
}
.ask-turn { display: flex; flex-direction: column; gap: 0.4rem; }
.ask-bubble {
  max-width: 88%;
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ask-bubble.q {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-bottom-right-radius: 3px;
}
.ask-bubble.a {
  align-self: flex-start;
  background: var(--accent-wash);
  color: var(--ink);
  border: 1px solid rgba(212, 80, 107, 0.25);
  border-bottom-left-radius: 3px;
}
.ask-bubble.a.err {
  background: rgba(255, 123, 114, 0.1);
  border-color: rgba(255, 123, 114, 0.35);
  color: #ff9891;
}
.ask-bubble .err-code {
  display: block;
  margin-top: 0.4rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  opacity: 0.65;
}
.ask-bubble .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: caret-blink 0.9s steps(2, start) infinite;
}

.ask-thinking {
  align-self: flex-start;
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.6rem 0.9rem;
  background: var(--accent-wash);
  border: 1px solid rgba(212, 80, 107, 0.25);
  border-radius: 10px;
  border-bottom-left-radius: 3px;
}
.ask-thinking i {
  width: 0.4rem; height: 0.4rem;
  border-radius: 50%;
  background: var(--accent-dark);
  animation: think-bounce 1.2s infinite ease-in-out;
}
.ask-thinking i:nth-child(2) { animation-delay: 0.15s; }
.ask-thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes think-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.ask-sparks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.1rem 1rem;
}
.ask-sparks .spark {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.ask-sparks .spark:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-wash);
}
.ask-sparks .spark:disabled { opacity: 0.4; cursor: not-allowed; }

.ask-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.ask-prompt { color: var(--accent); font-weight: 700; }
.ask-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 0.3rem 0;
}
.ask-form input:focus { outline: none; }
.ask-form input::placeholder { color: var(--ink-soft); opacity: 0.7; }
.ask-form button {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 7px;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ask-form button:hover:not(:disabled) { background: var(--accent-dark); }
.ask-form button:disabled { opacity: 0.4; cursor: not-allowed; }
.ask-status {
  margin: 0;
  padding: 0 1.1rem 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  min-height: 1.1em;
}

.ask-disclaimer {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* demo countdown timer */
.demo-timer {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(34, 37, 43, 0.12);
}
.demo-timer:hover { border-color: var(--accent); }
.demo-timer .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--line);
}
.demo-timer.running .dot {
  background: var(--accent);
  animation: timer-blink 1s steps(2, start) infinite;
}
.demo-timer.warn { color: #9a6a00; }
.demo-timer.warn.running .dot { background: #d99a00; }
.demo-timer.crit { color: #b3261e; border-color: #b3261e; }
.demo-timer.crit.running { animation: timer-pulse 1s ease infinite; }
.demo-timer.crit.running .dot { background: #b3261e; }

@keyframes timer-blink { 50% { opacity: 0.25; } }
@keyframes timer-pulse {
  50% { box-shadow: 0 3px 18px rgba(179, 38, 30, 0.35); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-timer.running .dot, .demo-timer.crit.running { animation: none; }
}

.pullquote {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding: 0.4rem 0 0.4rem 1.2rem;
  margin: 1.5rem 0;
}
.pullquote .who {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}

.story-card h3 { margin-top: 0; }
.story-card .moral {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.big-idea {
  font-family: Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
  max-width: 32ch;
  margin: 2rem auto;
}
.big-idea em { color: var(--accent); font-style: normal; }

.steps { counter-reset: step; list-style: none; margin: 1.5rem 0; padding: 0; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-wash);
  border-radius: 50%;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps strong { display: block; margin-bottom: 0.15rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 1.75rem 0 2.25rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.site-footer p { margin: 0.25em 0; }

@media (max-width: 40rem) {
  :root { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .agenda li { grid-template-columns: 1fr; gap: 0.15rem; }
}
