/* ==========================================================
   Michael Tot, portfolio
   Palette comes from the LinkedIn banner: a warm dusk on the
   left (building worlds), cool signal blue on the right
   (defending systems). Edit the variables below to retheme.
   ========================================================== */

:root {
  --ink: #11153a;          /* page background */
  --ink-raised: #181d4d;   /* raised surfaces */
  --ink-deep: #0d1131;     /* terminal, footer */
  --code-bg: #0c0f26;      /* code excerpts: darker than the page, still in the navy family */
  --violet: #3a2468;       /* dusk sky */
  --ember: #f2995a;        /* game systems, primary action */
  --rose: #d96a8c;        /* the blend between the two */
  --signal: #5cd6ea;       /* security and infrastructure */
  --text: #ece8f6;
  --muted: #aeabcc;
  --line: rgba(236, 232, 246, 0.14);

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0 0 1em; max-width: 64ch; }
a { color: var(--signal); text-underline-offset: 0.2em; }
a:hover { color: #9ae8f4; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--ember);
  color: #1a1033;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark:hover { color: #fff; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--ember); }
.nav .nav-cta {
  border: 1px solid rgba(236, 232, 246, 0.45);
  padding: 7px 16px;
  border-radius: 999px;
}
.nav .nav-cta:hover { border-color: var(--ember); }

/* EN / DE switch. Both are links to the same page in the other language. */
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.nav .lang-link { font-size: 0.85rem; letter-spacing: 0.04em; }
.nav .lang-link[aria-current="true"] { color: var(--ember); }

/* ---------- Scene (the banner) ---------- */

.scene {
  position: relative;
  height: clamp(360px, 40vw, 560px);
  overflow: hidden;
  background: linear-gradient(90deg, #52307f 0%, #2d2a6b 42%, #1a2a5e 58%, #12334f 100%);
}
.scene::before {
  /* sky: deeper at the top, warmer toward the horizon */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 12, 40, 0.65), rgba(10, 12, 40, 0) 55%);
}
.scene::after {
  /* melt the bottom edge into the page */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to bottom, rgba(17, 21, 58, 0), var(--ink));
}

.scene-art {
  position: absolute;
  bottom: 0;
  height: 100%;
  width: 54%;
}
.scene-left {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000 72%, transparent);
  mask-image: linear-gradient(to right, #000 72%, transparent);
}
.scene-right {
  right: 0;
  -webkit-mask-image: linear-gradient(to left, #000 72%, transparent);
  mask-image: linear-gradient(to left, #000 72%, transparent);
}

.lockup {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  text-align: center;
  text-shadow: 0 2px 18px rgba(10, 12, 40, 0.8);
}
.lockup p { max-width: none; margin: 0; }
.lockup-top,
.lockup-bottom {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: clamp(0.62rem, 1.1vw, 0.8rem);
  font-weight: 500;
  color: #f4effc;
}
.lockup-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 18px 0;
  color: #f4effc;
}
.lockup-divider { width: 1px; height: 46px; background: rgba(244, 239, 252, 0.5); }

/* ---------- Intro ---------- */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  padding-block: 8px clamp(56px, 8vw, 104px);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 4.8vw, 4rem);
  line-height: 1.06;
  max-width: 16ch;
  margin-bottom: 0.55em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.12;
  margin-bottom: 0.7em;
  text-wrap: balance;
}

h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 0.4em; }

.lede { font-size: 1.2rem; line-height: 1.55; color: #f4effc; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ember); color: #1a1033; }
.btn-primary:hover { background: #f7ab72; color: #1a1033; }
.btn-ghost { border-color: rgba(236, 232, 246, 0.4); color: var(--text); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }

/* ---------- Terminal ---------- */

.terminal {
  background: var(--ink-deep);
  border: 1px solid rgba(92, 214, 234, 0.28);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
}
.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(92, 214, 234, 0.16);
}
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(236, 232, 246, 0.2); }
.terminal-body {
  margin: 0;
  padding: 18px 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}
.t-line { display: block; }
.t-prompt { color: var(--ember); }
.t-out .t-text { color: var(--signal); }
.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--text);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.section-lede { color: var(--muted); max-width: 62ch; margin-bottom: 2em; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.list-title { font-size: 1.15rem; margin-bottom: 0.8em; color: #f4effc; }

/* Timeline: a real sequence, so the markers earn their place */
.timeline {
  list-style: none;
  margin: 2.2em 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ember), var(--rose), var(--signal));
}
.timeline li { position: relative; padding-top: 34px; }
.timeline li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--ember);
}
.timeline li:nth-child(2)::before { border-color: #ea8a7b; }
.timeline li:nth-child(3)::before { border-color: #df7590; }
.timeline li:nth-child(4)::before { border-color: #b78bd0; }
.timeline li:nth-child(5)::before { border-color: #8ab3de; }
.timeline li:nth-child(6)::before { border-color: var(--signal); }
.timeline h3 { font-size: 1.4rem; }
.timeline p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* Capabilities: rows with dividers, not a card grid */
.caps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 88px);
}
.cap { padding: 26px 0; border-top: 1px solid var(--line); }
.cap p { color: var(--muted); margin: 0; }

.stack { margin: 36px 0 0; display: grid; gap: 14px; }
.stack > div {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 8px 24px;
  align-items: baseline;
}
.stack dt { color: var(--muted); font-weight: 500; }
.stack dd { margin: 0; color: var(--text); }

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.project {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--ember);
  padding: 24px 26px 8px;
  border-radius: 2px 8px 8px 2px;
}
.project--defense { border-left-color: var(--signal); }
.project--featured {
  grid-column: 1 / -1;
  padding: 34px 36px 14px;
  background: linear-gradient(100deg, rgba(242, 153, 90, 0.12), rgba(255, 255, 255, 0.03) 55%);
}
.project--featured h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.project--featured p:not(.status):not(.meta-line):not(.soon) { max-width: 60ch; font-size: 1.1rem; }
.project p { color: var(--muted); }
.project h3 { color: var(--text); }

.meta-line { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text) !important; margin-bottom: 0.4em; }
.soon { font-size: 0.92rem; font-style: italic; }

/* Security */
.phases { margin: 0; padding-left: 1.3em; }
.phases li { margin-bottom: 0.9em; color: var(--muted); padding-left: 0.3em; }
.phases li::marker { color: var(--signal); font-weight: 600; }
.phases strong { color: var(--text); font-weight: 600; }

.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li {
  position: relative;
  padding: 0 0 1em 22px;
  color: var(--muted);
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 2px;
  background: linear-gradient(90deg, var(--ember), var(--signal));
}

/* Contact */
.contact { padding-bottom: clamp(72px, 10vw, 128px); }
.contact h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 14ch; }
.phone { margin-top: 24px; color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--ember), var(--rose), var(--signal)) 1;
  background: var(--ink-deep);
  padding-block: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-inner p { margin: 0; }
.footer-inner .footer-privacy { flex-basis: 100%; max-width: none; font-size: 0.85em; opacity: 0.85; }

/* ---------- Responsive ---------- */

/* The six-step timeline turns vertical before its columns get too narrow. */
@media (max-width: 1100px) {
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-left: 4px; max-width: 640px; }
  .timeline::before { top: 8px; bottom: 8px; left: 11px; right: auto; width: 2px; height: auto; /* centre of the dots: 4px padding + 8px − 1px */
    background: linear-gradient(180deg, var(--ember), var(--rose), var(--signal)); }
  .timeline li { padding: 0 0 0 38px; }
  .timeline li::before { top: 4px; }
}

@media (max-width: 960px) {
  .intro, .split { grid-template-columns: minmax(0, 1fr); }
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-left: 4px; }
  .timeline::before { top: 8px; bottom: 8px; left: 11px; right: auto; width: 2px; height: auto; /* centre of the dots: 4px padding + 8px − 1px */
    background: linear-gradient(180deg, var(--ember), var(--rose), var(--signal)); }
  .timeline li { padding: 0 0 0 38px; }
  .timeline li::before { top: 4px; }
}

@media (max-width: 720px) {
  .nav a:not(.nav-cta):not(.lang-link) { display: none; }
  .caps, .projects { grid-template-columns: minmax(0, 1fr); }
  .project--featured { padding: 26px 24px 10px; }
  .stack > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lockup { bottom: 16%; }
  .lockup-top, .lockup-bottom { letter-spacing: 0.2em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .btn { transition: none; }
}

/* ==========================================================
   Case study pages, statuses and media placeholders
   ========================================================== */

.site-header--solid {
  position: sticky;
  top: 0;
  background: rgba(17, 21, 58, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

/* Status tags */
.status { font-size: 0.85rem; font-weight: 600; margin: 0 0 0.6em; }
.project .status { margin-bottom: 0.6em; }
.status.status--live { color: var(--signal); }
.status.status--testing { color: var(--ember); }
.status.status--progress { color: var(--rose); }
.status.status--retired,
.status.status--earlier { color: var(--muted); }

/* Project cards link to their case studies */
.project h3 a { color: var(--text); text-decoration: none; }
.project h3 a::after { content: ""; position: absolute; inset: 0; }
.project h3 a:hover { color: #fff; }
.project { position: relative; transition: background-color 0.15s; }
.project:hover { background: rgba(255, 255, 255, 0.06); }
.project:focus-within { outline: 2px solid var(--signal); outline-offset: 3px; }
.project h3 a:focus-visible { outline: none; }
.subhead { font-size: 1.3rem; margin: 2.4em 0 1em; color: #f4effc; }

/* Case study layout */
.case { padding-block: clamp(32px, 6vw, 64px) clamp(56px, 8vw, 96px); max-width: calc(820px + var(--gutter) * 2); }
.crumb { font-size: 0.95rem; margin-bottom: 2em; }
.case h1 { max-width: 20ch; margin-bottom: 0.4em; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.case .lede { max-width: 62ch; }
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
  margin: 2em 0 1em;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dd { margin: 2px 0 0; }
.case-section { padding-top: clamp(32px, 5vw, 56px); }
.case-section h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.case-section h3 { font-size: 1.2rem; margin-top: 1.6em; }
.case-section p { color: #dcd8ee; }
.case-list { margin: 0 0 1.2em; padding-left: 1.2em; max-width: 66ch; }
.case-list li { margin-bottom: 0.7em; color: #dcd8ee; padding-left: 0.2em; }
.case-list li::marker { color: var(--signal); }
.case--world .case-list li::marker { color: var(--ember); }
.case-list strong { color: var(--text); }

.case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.case-nav a { text-decoration: none; color: var(--text); font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; }
.case-nav a:hover { color: var(--signal); }
.case-nav span { display: block; font-family: var(--font-body); font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
.case-nav-next { text-align: right; }

/* Media slots: placeholder until the file exists, then the real thing */
.slot, .excerpt, .diagram { margin: 28px 0 32px; }
.slot figcaption, .excerpt figcaption, .diagram figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
.slot-frame {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(236, 232, 246, 0.24);
  display: flex;
}
.slot--image .slot-frame { aspect-ratio: auto; min-height: 220px; }
.slot.is-filled .slot-frame { border: 1px solid var(--line); background: #0b0e27; aspect-ratio: auto; min-height: 0; display: block; }
.slot-frame img, .slot-frame video { display: block; width: 100%; height: auto; }
.slot-placeholder {
  margin: auto;
  padding: 24px clamp(20px, 5vw, 48px);
  text-align: center;
  max-width: 54ch;
}
.slot-placeholder p { margin: 0 auto 0.5em; color: var(--muted); }
.slot-placeholder .slot-type { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.case--world .slot-type { color: var(--ember); }
.case--defense .slot-type { color: var(--signal); }
.slot-placeholder .slot-desc { font-size: 0.98rem; }
.slot-file { display: none; font-family: var(--font-mono); font-size: 0.78rem; overflow-wrap: anywhere; }
.dev .slot-file { display: block; }
/* Screenshots shown at their natural size (never upscaled), shrinking to fit narrow screens */
.slot--fit.is-filled .slot-frame { width: fit-content; max-width: 100%; }
.slot--fit .slot-frame img { width: auto; max-width: 100%; }
.media-note { font-size: 0.9rem; color: var(--muted); margin-top: -0.4em; }

.excerpt-frame {
  border-radius: 8px;
  border: 1px dashed rgba(236, 232, 246, 0.24);
  background: rgba(255, 255, 255, 0.025);
  min-height: 160px;
  display: flex;
}
.excerpt.is-filled .excerpt-frame { display: block; border: 1px solid rgba(92, 214, 234, 0.22); background: var(--code-bg); min-height: 0; }
.excerpt pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text);
  tab-size: 4;
}

/* Wrapped code: each line hangs at its own indent, continuations sit 4ch deeper */
.excerpt code.is-wrapped { display: block; white-space: normal; }
.excerpt code.is-wrapped .ind { font-size: 0; }
.excerpt code.is-wrapped .line::after { content: "\200b"; }  /* keeps blank lines one line tall */
.excerpt code.is-wrapped .line {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding-left: calc(var(--indent, 0ch) + 4ch);
  text-indent: -4ch;
}

@media (max-width: 600px) {
  .excerpt pre { font-size: 0.76rem; padding: 16px 14px; }
}

/* Syntax colours for code excerpts (highlight.js classes), from the site palette */
.excerpt code { font-family: inherit; }
.hljs-comment, .hljs-quote { color: #8784ad; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal { color: var(--ember); }
.hljs-string, .hljs-regexp, .hljs-char.escape_ { color: #f0b8c9; }
.hljs-number, .hljs-symbol { color: #ffcf9e; }
.hljs-title, .hljs-title.function_, .hljs-section { color: var(--signal); }
.hljs-title.class_, .hljs-type, .hljs-built_in { color: #9fe6f1; }
.hljs-meta, .hljs-attr, .hljs-attribute, .hljs-params { color: var(--rose); }
.hljs-variable, .hljs-template-variable, .hljs-property { color: var(--text); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 600; }

/* Inline diagrams */
.diagram-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.02); padding: 16px; }
.diagram svg { display: block; width: 100%; min-width: 560px; height: auto; }
.dg-box rect { fill: var(--ink-raised); stroke: rgba(236, 232, 246, 0.28); stroke-width: 1.2; }
.dg-world rect { stroke: var(--ember); }
.dg-defense rect { stroke: var(--signal); }
.dg-warn rect { stroke: var(--rose); stroke-dasharray: 5 4; }
.dg-box text { fill: var(--text); font-family: var(--font-body); font-size: 15px; text-anchor: middle; }
.dg-line path { fill: none; stroke: rgba(236, 232, 246, 0.5); stroke-width: 1.5; }
.dg-fail path { stroke: var(--rose); stroke-dasharray: 5 4; }
.dg-arrowhead { fill: rgba(236, 232, 246, 0.7); }
.dg-note { fill: var(--muted); font-family: var(--font-body); font-size: 14px; text-anchor: middle; font-style: italic; }

@media (max-width: 720px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .case-nav { grid-template-columns: minmax(0, 1fr); }
  .case-nav-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .project { transition: none; }
}

/* YouTube slots */
.slot.is-youtube .slot-frame { aspect-ratio: 16 / 9; display: block; position: relative; }
.yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.15s; }
.yt-facade:hover img, .yt-facade:focus-visible img { opacity: 1; }
.yt-play {
  position: absolute; left: 50%; top: 50%;
  width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(17, 21, 58, 0.85);
  border: 2px solid var(--ember);
}
.yt-play::after {
  content: ""; position: absolute; left: 29px; top: 22px;
  border-style: solid; border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--ember);
}
.slot.is-youtube iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) { .yt-facade img { transition: none; } }

/* Off-screen note for AI agents (see index.html). Hidden from sighted users and screen readers alike. */
.agent-note {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Contact form */
.contact .split { align-items: start; }
.contact-form {
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(20px, 3vw, 32px);
}
.contact-form label { font-weight: 500; font-size: 0.95rem; margin-top: 8px; }
.contact-form .optional { color: var(--muted); font-weight: 400; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--ink-deep);
  border: 1px solid rgba(236, 232, 246, 0.22);
  border-radius: 6px;
  padding: 10px 12px;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: transparent; }
.contact-form .btn { justify-self: start; margin-top: 12px; cursor: pointer; font-family: inherit; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: wait; }
.sender { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.sender legend { font-weight: 500; font-size: 0.95rem; margin-bottom: 6px; padding: 0; }
.sender label { margin-top: 0; font-weight: 400; display: inline-flex; gap: 8px; align-items: center; }
.sender input { accent-color: var(--ember); width: 18px; height: 18px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 4px 0 0; min-height: 1.5em; }
.form-status.is-ok { color: var(--signal); }
.form-status.is-error { color: #ff9db0; }
.form-note { margin: 0; font-size: 0.9rem; color: var(--muted); }
.contact-stats { margin-top: 28px; color: var(--muted); font-size: 0.95rem; }

/* Interactive playgrounds (e.g. the brewing aging graph) */
.playground { margin: 28px 0 32px; }
.playground figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
.playground-frame { border: 1px solid var(--line); border-radius: 8px; background: var(--code-bg); padding: 18px; }
.pg-chart svg { display: block; width: 100%; height: auto; touch-action: none; cursor: ew-resize; }
.pg-grid-lines line { stroke: rgba(236, 232, 246, 0.08); }
.pg-tick { fill: var(--muted); font-family: var(--font-mono); font-size: 13px; }
@media (max-width: 600px) { .pg-tick { font-size: 22px; } .playground-frame { padding: 14px; } }
.pg-marker { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 4; }
.pg-time { display: grid; gap: 6px; margin: 10px 0 18px; }
.pg-time label, .pg-tune label { font-size: 0.9rem; color: var(--muted); display: grid; gap: 4px; }
.pg-time output, .pg-tune output { color: var(--text); font-family: var(--font-mono); margin-left: 6px; }
.playground input[type="range"] { width: 100%; accent-color: var(--ember); }
.pg-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
@media (max-width: 700px) { .pg-grid { grid-template-columns: 1fr; } }
.pg-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.pg-row { display: grid; grid-template-columns: 7.5em 1fr 3em auto; align-items: center; gap: 10px; margin: 6px 0; font-size: 0.9rem; }
.pg-name { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pg-name i, .pg-chips i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.pg-bar { height: 8px; border-radius: 4px; background: rgba(236, 232, 246, 0.08); overflow: hidden; }
.pg-bar span { display: block; height: 100%; }
.pg-pct, .pg-tally { font-family: var(--font-mono); font-size: 0.85rem; text-align: right; }
.pg-tally { color: var(--muted); min-width: 2.5em; }
.pg-note { font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; }
.pg-tune { display: grid; gap: 12px; align-content: start; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-chips button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.8rem; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.pg-chips button[aria-checked="true"] { border-color: var(--text); background: rgba(236, 232, 246, 0.08); }
.pg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.pg-actions .btn { cursor: pointer; font-family: inherit; }
.pg-result { margin: 0 0 0 6px; font-size: 0.95rem; }
.pg-actions .btn-ghost { background: transparent; }

/* Shipment race demo */
.sr-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: 18px; }
.sr-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.sr-toggle label { display: inline-flex; align-items: center; padding: 6px 14px; font-size: 0.9rem; cursor: pointer; }
.sr-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.sr-toggle label:has(input:checked) { background: rgba(236, 232, 246, 0.12); }
.sr-toggle label:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: -2px; }
.sr-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.sr-check input { accent-color: var(--ember); }
.sr-lag { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); min-width: 180px; flex: 1 1 180px; }
.sr-lag output { color: var(--text); font-family: var(--font-mono); margin-left: 6px; }
.sr-board { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .sr-board { grid-template-columns: 1fr; } }
.sr-box { border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-width: 0; }
.sr-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 40px; }
.sr-slot { width: 36px; height: 36px; border-radius: 6px; border: 1px dashed rgba(236, 232, 246, 0.22); }
.sr-slot.is-item { border: 1px solid var(--ember); background: rgba(242, 153, 90, 0.22); }
.sr-slot.is-item.is-dupe { border-color: var(--rose); background: rgba(217, 106, 140, 0.3); }
.sr-lock { font-family: var(--font-mono); font-size: 0.75rem; color: var(--signal); border: 1px solid var(--signal); border-radius: 999px; padding: 2px 8px; }
.sr-count { margin: 10px 0 0; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.sr-count.is-bad { color: var(--rose); }
.sr-verdict { min-height: 1.6em; margin: 14px 0 0; font-weight: 600; }
.sr-verdict.is-bad { color: var(--rose); }
.sr-verdict.is-good { color: var(--signal); }
.sr-log { list-style: none; margin: 12px 0 0; padding: 12px 14px; border-radius: 6px; background: rgba(0, 0, 0, 0.2); font-family: var(--font-mono); font-size: 0.8rem; display: grid; gap: 4px; min-height: 9em; }
.sr-log li { color: var(--muted); }
.sr-log li span { display: inline-block; min-width: 4.5em; color: rgba(174, 171, 204, 0.6); font-variant-numeric: tabular-nums; }
.sr-log li.bad { color: var(--rose); }
.sr-log li.good { color: var(--signal); }

/* Trunk migration step-through */
.tm-board { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .tm-board { grid-template-columns: 1fr; } }
.tm-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.tm-col .sr-box.is-current { border-color: var(--ember); }
.tm-items { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.tm-item { font-family: var(--font-mono); font-size: 0.78rem; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--ember); background: rgba(242, 153, 90, 0.16); transition: transform 0.2s; }
.tm-item.is-active { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--ember); }
.tm-item.is-stranded { border-color: var(--rose); background: rgba(217, 106, 140, 0.22); }
.tm-item.is-limbo { border-style: dashed; border-color: var(--rose); background: transparent; }
.tm-empty { font-size: 0.8rem; color: var(--muted); }
.tm-row { margin-left: 8px; font-size: 0.68rem; text-transform: none; letter-spacing: 0; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.tm-row.is-shared { border-color: var(--signal); color: var(--signal); }
.tm-cap { margin-left: 6px; color: var(--text); }
.tm-lost { border-color: var(--rose); }
.tm-col .pg-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.playground .btn:disabled { opacity: 0.45; cursor: default; }

/* Promise IOU explainer */
.pi-pick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.pi-pick select { font: inherit; color: var(--text); background: rgba(236, 232, 246, 0.06); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; max-width: 100%; color-scheme: dark; }
.pi-pick select option { color: var(--text); background: var(--code-bg); }
.pi-cards { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 10px; }
@media (max-width: 620px) { .pi-cards { grid-template-columns: 1fr; } .pi-arrow { transform: rotate(90deg); justify-self: center; } }
.pi-arrow { align-self: center; color: var(--muted); font-size: 1.2rem; }
.pi-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; transition: border-color 0.2s, background 0.2s; }
.pi-card.is-empty { opacity: 0.45; }
.pi-card.is-wait { border-color: rgba(236, 232, 246, 0.35); }
.pi-card.is-good { border-color: var(--signal); background: rgba(92, 214, 234, 0.08); }
.pi-card.is-bad { border-color: var(--rose); background: rgba(217, 106, 140, 0.1); }
.pi-state { margin: 0; font-family: var(--font-mono); font-size: 0.95rem; }
.pi-card.is-good .pi-state { color: var(--signal); }
.pi-card.is-bad .pi-state { color: var(--rose); }
.pi-list { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); }
.pi-say { margin: 16px 0 12px; min-height: 3em; font-size: 1rem; }
.pi-say.is-bad { color: var(--rose); }
.pi-say.is-good { color: var(--signal); }
.pi-code { margin: 0; padding: 12px 14px; border-radius: 6px; background: rgba(0, 0, 0, 0.22); font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.55; overflow-x: auto; color: var(--muted); }
.pi-line { display: inline-block; min-width: 100%; padding: 0 6px; margin: 0 -6px; border-radius: 3px; }
.pi-line.is-on { background: rgba(236, 232, 246, 0.12); color: var(--text); }
.pi-line.is-on.is-bad { background: rgba(217, 106, 140, 0.22); }
.pi-line.is-on.is-good { background: rgba(92, 214, 234, 0.16); }
.pi-line.is-fix { color: var(--signal); }
.pi-count { margin-left: auto; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

/* Speed stacker */
.ss-effects { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ss-effect { font: inherit; font-size: 0.88rem; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.ss-effect span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-left: 4px; }
.ss-effect[aria-pressed="true"] { border-color: var(--ember); background: rgba(242, 153, 90, 0.16); }
.ss-effect:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.ss-bar { position: relative; height: 18px; border-radius: 9px; background: rgba(236, 232, 246, 0.08); }
.ss-fill { position: absolute; inset: 0 auto 0 0; border-radius: 9px; background: var(--signal); transition: width 0.25s, background 0.25s; }
.ss-fill.is-bad { background: var(--rose); }
.ss-should { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--text); transition: left 0.25s; }
.ss-nums { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--font-mono); font-size: 0.85rem; }
.ss-target { color: var(--muted); }

/* Records tamper demo */
.rt-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.rt-board > * { min-width: 0; }
.rt-records, .rt-dbchar { display: grid; gap: 6px; }
.rt-row { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 6px 8px; border-radius: 6px; font-size: 0.88rem; transition: background 0.25s; }
.rt-row.is-hit-ok { background: rgba(92, 214, 234, 0.12); }
.rt-row.is-hit-bad { background: rgba(217, 106, 140, 0.2); }
.rt-id { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); min-width: 3em; }
.rt-what { min-width: 0; overflow-wrap: anywhere; }
.rt-records .rt-row { grid-template-columns: 3em minmax(0, 1fr) auto auto; }
@media (max-width: 520px) { .rt-records .rt-row { grid-template-columns: 3em minmax(0, 1fr) auto; } .rt-records .rt-btn { grid-column: 2 / -1; justify-self: start; } }
.rt-tag { font-family: var(--font-mono); font-size: 0.72rem; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.rt-tag.is-felony { border-color: var(--rose); color: var(--rose); }
.rt-btn { padding: 3px 10px; font-size: 0.78rem; font-family: inherit; cursor: pointer; background: transparent; color: var(--text); border: 1px solid var(--line); }
.rt-btn:hover { border-color: var(--text); }
.rt-forge { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 12px 16px; align-content: start; }
.rt-forge > .pg-label, .rt-forge > .rt-note { grid-column: 1 / -1; }
.rt-forge > label:not(.sr-check) { display: grid; gap: 4px; min-width: 0; font-size: 0.85rem; color: var(--muted); }
.rt-forge > .sr-check { align-self: center; }
.rt-forge > .btn { justify-self: start; max-width: 100%; white-space: normal; }
.rt-forge select { font: inherit; color: var(--text); background: rgba(236, 232, 246, 0.06); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; color-scheme: dark; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; text-overflow: ellipsis; }
.rt-forge select option { color: var(--text); background: var(--code-bg); }
.rt-forge select:disabled { opacity: 0.4; }
.rt-note { margin: 0; font-size: 0.78rem; color: var(--muted); }
.rt-db { margin-top: 16px; display: grid; gap: 12px; }
.rt-db > div { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .rt-db > div { grid-template-columns: 1fr; } }
.rt-dbname { margin: 0 0 4px; font-size: 0.9rem; }
.rt-dbname span { color: var(--muted); font-size: 0.8rem; }

/* Sound toggle on autoplaying clips */
.slot-frame { position: relative; }
.slot-sound { position: absolute; right: 0.6rem; bottom: 0.6rem; padding: 0.35em 0.7em; font: inherit; font-size: 0.85rem; color: #fff; background: rgba(0,0,0,0.62); border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; cursor: pointer; }
.slot-sound:hover, .slot-sound:focus-visible { background: rgba(0,0,0,0.82); }

/* ==========================================================
   Modes (the look switch next to EN / DE)
   Castle is this file. Other modes live in /skins/<mode>.css and only
   load when picked (lang.js). Every skin rule starts with
   :root[data-mode="<mode>"], so a skin can't leak into Castle.
   ========================================================== */

.mode-hero { display: none; }
:root[data-mode] .scene { display: none; }
:root[data-mode] .mode-hero { display: block; }
.mh-inner p, .mh-tags { max-width: none; margin: 0; }
.mh-tags { list-style: none; padding: 0; }
/* The hero holds every mode's pieces; each skin shows the ones it uses. */
.mh-kicker > span, .mh-role, .mh-tags, .mh-scope, .mh-stamp, .mh-quest { display: none; }

.mode-toggle { position: relative; display: inline-flex; }
.mode-button {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 0.85rem; letter-spacing: 0.02em;
  color: var(--text); background: rgba(127, 127, 127, 0.10); cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--text) 40%, transparent); border-radius: 999px; padding: 5px 11px;
}
.mode-button:hover, .mode-button[aria-expanded="true"] { color: var(--ember); border-color: var(--ember); }
.mode-caret { font-size: 0.7rem; opacity: 0.8; }
.mode-icon { font-size: 0.95rem; line-height: 1; }
.mode-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  display: grid; min-width: 150px; padding: 6px;
  background: var(--ink-raised); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
}
.mode-menu[hidden] { display: none; }
.mode-menu button {
  font: inherit; font-size: 0.9rem; text-align: left; color: var(--text);
  background: none; border: 0; border-radius: 5px; padding: 7px 10px; cursor: pointer;
}
.mode-menu button:hover { background: rgba(127, 127, 127, 0.14); }
.mode-menu button[aria-pressed="true"] { color: var(--ember); }
.mode-menu button[aria-pressed="true"]::before { content: "● "; }
@media (max-width: 480px) {
  .mode-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mode-button { padding: 4px 8px; }
  .nav { gap: 10px; }
  .wordmark { white-space: nowrap; }
  .nav .nav-cta { padding: 6px 12px; }
  .site-header { gap: 12px; }
}

/* ---------- The front-page hook: one real clip, one line, a link ---------- */

.intro:has(.hook) { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }
.hook { margin: 0; min-width: 0; }
.hook-frame {
  position: relative; overflow: hidden; border-radius: 12px; padding: 2px;
  background: linear-gradient(120deg, var(--ember), var(--rose) 45%, var(--signal));
  box-shadow: 0 24px 60px -24px rgba(242, 153, 90, 0.45);
}
.hook-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #000; }
.hook-badge {
  position: absolute; right: 12px; top: 12px;
  font-size: 0.72rem; letter-spacing: 0.04em; padding: 3px 8px;
  background: rgba(0, 0, 0, 0.6); color: #fff; border-radius: 4px;
}
.hook figcaption { margin-top: 14px; }
.hook figcaption p { margin: 0 0 0.5em; max-width: none; }
.hook-kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ember); }
.hook-line { font-size: 1.02rem; line-height: 1.5; color: var(--text); }
.hook-link { font-weight: 600; text-decoration: none; }
.hook-link:hover { text-decoration: underline; }
@media (max-width: 960px) { .intro:has(.hook) { grid-template-columns: minmax(0, 1fr); } }

/* ---------- The one-time "try a look" chat bubble (built by lang.js) ----------
   A game-launcher style toast with its own colours, so it stands out on every mode's background. */

.mode-hint {
  --toast-bg: #1c2029; --toast-bg-2: #252b37; --toast-text: #f2f4f8; --toast-muted: #9aa3b2;
  --toast-accent: #ff9f43; --toast-accent-2: #5cd6ea;
  position: fixed; z-index: 40; right: 20px; bottom: 20px; width: min(350px, calc(100vw - 32px));
  padding: 12px 14px 14px 18px; border-radius: 8px; overflow: hidden;
  background: linear-gradient(160deg, var(--toast-bg-2), var(--toast-bg));
  color: var(--toast-text); border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 18px -8px rgba(255, 159, 67, 0.30), 0 22px 50px -12px rgba(0, 0, 0, 0.85);
  font: 400 0.95rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  animation: mode-hint-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2), mode-hint-glow 2.4s ease-in-out 0.5s infinite;
}
.mode-hint::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--toast-accent), var(--toast-accent-2));
}
@keyframes mode-hint-in { from { opacity: 0; transform: translateX(120%); } to { opacity: 1; transform: none; } }
@keyframes mode-hint-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 14px -8px rgba(255, 159, 67, 0.22), 0 22px 50px -12px rgba(0, 0, 0, 0.85); }
  50% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(255, 159, 67, 0.38), 0 22px 50px -12px rgba(0, 0, 0, 0.85); }
}
.mode-hint-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mode-hint-avatar {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--toast-accent), var(--toast-accent-2)); color: #12141a;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.02em;
}
.mode-hint-avatar::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: #3ddc84; border: 2px solid var(--toast-bg-2);
}
.mode-hint-from { font-weight: 700; color: var(--toast-text); }
.mode-hint-time { color: var(--toast-muted); font-size: 0.78rem; }
.mode-hint-close {
  margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: none; color: var(--toast-muted); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.mode-hint-close:hover { color: var(--toast-text); background: rgba(255, 255, 255, 0.10); }
.mode-hint-text { margin: 0 0 10px; max-width: none; color: var(--toast-text); }
.mode-hint-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.mode-hint-picks button {
  font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--toast-text); cursor: pointer;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 4px; padding: 5px 12px;
}
.mode-hint-picks button:hover { background: var(--toast-accent); border-color: var(--toast-accent); color: #12141a; }
.mode-hint-picks button[aria-pressed="true"] { border-color: var(--toast-accent); color: var(--toast-accent); }
.mode-hint-picks button[aria-pressed="true"]:hover { color: #12141a; }
.mode-hint :focus-visible { outline: 2px solid var(--toast-accent-2); outline-offset: 2px; }

/* The switch pulses while the bubble is open */
.mode-button--hint .mode-icon { animation: mode-pulse 1.6s ease-in-out infinite; color: var(--ember); }
@keyframes mode-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.6; } }

@media (max-width: 480px) { .mode-hint { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .mode-hint { animation: none; }
  .mode-button--hint .mode-icon { animation: none; }
}

/* On wide screens the two halves of the banner art kept scaling with the width, so the
   constellation climbed behind the menu. Cap them at the size they have on a 1500 px screen. */
@media (min-width: 1500px) {
  .scene-art { width: min(54%, 810px); }
}

/* The switch flashes, and an arrow draws itself to it, when the bubble appears or is closed */
.mode-button--flash { animation: mode-flash 0.6s ease-in-out 3; }
@keyframes mode-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 159, 67, 0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 159, 67, 0.55); background: rgba(255, 159, 67, 0.35); color: #fff; border-color: #ff9f43; }
}
.mode-arrow { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 39; pointer-events: none; overflow: visible; }
.mode-arrow path { fill: none; stroke: #ff9f43; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255, 159, 67, 0.7)); }
/* pathLength="100": the dash is the whole line; sliding it draws the line in, then pulls the tail after the head */
.mode-arrow-path { stroke-dasharray: 100 100; stroke-dashoffset: 100; animation: mode-comet 1.6s cubic-bezier(0.45, 0, 0.25, 1) var(--loops, 3); }
.mode-arrow-head { opacity: 0; animation: mode-comet-head 1.6s ease-out var(--loops, 3); }
@keyframes mode-comet { 0% { stroke-dashoffset: 100; } 45% { stroke-dashoffset: 0; } 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@keyframes mode-comet-head { 0%, 38% { opacity: 0; } 45%, 70% { opacity: 1; } 95%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .mode-button--flash { animation: none; }
}

/* Footer easter egg: the word "Honk" swaps to a small bike horn on hover or keyboard focus.
   The horn is laid over the word, which keeps its place, so nothing in the footer moves. */
.footer-honk { position: relative; display: inline-block; text-decoration: none; opacity: 0.75; }
.footer-honk:hover, .footer-honk:focus-visible { opacity: 1; }
.footer-honk-word { text-decoration: underline; text-underline-offset: 0.2em; }
.footer-honk-horn { position: absolute; left: 50%; top: 50%; width: 2.1em; height: 1em; margin: -0.5em 0 0 -1.05em; opacity: 0; pointer-events: none; transform-origin: 22% 50%; }
.footer-honk:hover .footer-honk-word, .footer-honk:focus-visible .footer-honk-word { opacity: 0; }
.footer-honk:hover .footer-honk-horn, .footer-honk:focus-visible .footer-honk-horn { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .footer-honk:hover .footer-honk-horn, .footer-honk:focus-visible .footer-honk-horn { animation: footer-honk-wiggle 0.55s ease-in-out; }
}
@keyframes footer-honk-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 70% { transform: rotate(-5deg); } 85% { transform: rotate(3deg); } }
