/*
  Workshop guide styles.
  Design brief: a lab manual that sits beside a terminal. White page for reading,
  dark command blocks that look like the terminal they get pasted into, JAM's
  midnight navy and moon yellow for wayfinding only. System fonts on purpose:
  no third-party requests on venue Wi-Fi. Swap the two brand values below for
  the official hex codes from JAM marketing.
*/
:root {
  --midnight: #101a3a;      /* JAM navy, approximated */
  --midnight-2: #1b2650;
  --moon: #ffc94a;          /* JAM yellow, approximated */
  --ink: #15171d;
  --muted: #586070;
  --paper: #ffffff;
  --wash: #f4f5f8;
  --rule: #dfe2e8;
  --term-bg: #0d1220;
  --term-ink: #e6e9f0;
  --done: #1d7048;
  --stuck: #a65400;
  --kiro: #6b3fd4;          /* unslop-ignore: Kiro's own brand colour, used only for the Kiro corner */
  --tbc: #c0185a;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  height: 56px; padding: 0 20px;
  background: var(--midnight); color: #fff;
  border-bottom: 3px solid var(--moon);
}
.brand { color: #fff; font-weight: 700; text-decoration: none; letter-spacing: 0.01em; }
.event { color: #c9cfe0; font-size: 14px; margin-left: auto; }
.nav-toggle { display: none; }

.draft-banner {
  background: var(--tbc); color: #fff; font-size: 14px; font-weight: 600;
  padding: 6px 20px; text-align: center;
}

/* Layout */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 56px; align-self: start;
  height: calc(100vh - 56px); overflow-y: auto;
  background: var(--wash); border-right: 1px solid var(--rule);
  padding: 20px 0 24px;
}
.content { max-width: 800px; padding: 28px 40px 80px; }

/* Sidebar navigation */
.nav-pages { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.nav-pages > li > a {
  display: grid; grid-template-columns: 1fr auto; gap: 0 8px;
  padding: 9px 20px 9px 17px; border-left: 3px solid transparent;
  color: var(--ink); text-decoration: none; font-size: 15px;
}
.nav-pages > li > a:hover { background: #e9ebf1; }
.nav-pages > li.current > a { border-left-color: var(--moon); background: #fff; font-weight: 600; }
.nav-time { grid-column: 1; font-size: 12.5px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.nav-progress { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-progress.complete { color: var(--done); font-weight: 700; }
.nav-steps { list-style: none; margin: 2px 0 10px; padding: 0 12px 0 32px; }
.nav-steps a {
  display: block; padding: 3px 8px; font-size: 13.5px; line-height: 1.35;
  color: var(--muted); text-decoration: none; border-radius: 4px;
}
.nav-steps a:hover { color: var(--ink); background: #e9ebf1; }
.nav-steps a.active { color: var(--ink); background: #fff3cf; }
.nav-steps a.done { text-decoration: line-through; text-decoration-color: #9aa1af; }
.sidebar-foot { padding: 16px 20px 0; margin: 16px 0 0; border-top: 1px solid var(--rule); }
.reset-progress {
  font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0;
  text-decoration: underline; cursor: pointer;
}

/* Type */
.page-time {
  display: inline-block; margin: 0 0 6px; padding: 2px 10px;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--midnight); color: var(--moon); border-radius: 3px;
}
h1 { font-size: 32px; line-height: 1.2; margin: 4px 0 18px; letter-spacing: -0.01em; }
h2 { font-size: 23px; line-height: 1.3; margin: 44px 0 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
h3 { font-size: 19px; line-height: 1.35; margin: 34px 0 10px; }
h4 { font-size: 16px; margin: 22px 0 6px; }
p, ul, ol, table { margin: 0 0 14px; }
li { margin: 3px 0; }
a { color: #1f4fbf; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* Step headings get a tick box from guide.js */
body[data-steps="1"] .content h3 { display: flex; align-items: baseline; gap: 12px; }
.step-check { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; }
.step-check input { width: 18px; height: 18px; accent-color: var(--done); cursor: pointer; margin: 0; position: relative; top: 2px; }
h3.is-done { color: var(--muted); }
h3.is-done .step-check { color: var(--done); }

/* Inline code and command blocks */
code { font-family: var(--mono); font-size: 0.88em; background: #eef0f4; padding: 1px 5px; border-radius: 3px; }
pre {
  position: relative; margin: 0 0 16px; padding: 14px 16px; overflow-x: auto;
  background: var(--term-bg); color: var(--term-ink); border-radius: 6px;
  font-size: 14px; line-height: 1.55;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; white-space: pre; }
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  font: 600 12px var(--sans); color: var(--term-ink);
  background: #263052; border: 1px solid #3a4673; border-radius: 4px;
  padding: 3px 10px; cursor: pointer; opacity: 0.85;
}
.copy-btn:hover, .copy-btn:focus { opacity: 1; }
.copy-btn.copied { background: var(--done); border-color: var(--done); }

/* Tables */
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
th { background: var(--wash); font-weight: 650; }
td code { white-space: nowrap; }

/* Callouts */
.admonition {
  margin: 18px 0; padding: 12px 16px 4px; border-left: 4px solid var(--muted);
  background: var(--wash); border-radius: 0 6px 6px 0;
}
.admonition-title { margin: 0 0 6px; font-weight: 700; font-size: 15px; }
.admonition.done { border-left-color: var(--done); background: #eef7f1; }
.admonition.done .admonition-title { color: var(--done); }
.admonition.stuck { border-left-color: var(--stuck); background: #fdf3e7; }
.admonition.stuck .admonition-title { color: var(--stuck); }
.admonition.kiro { border-left-color: var(--kiro); background: #f4f0fd; }
.admonition.kiro .admonition-title { color: var(--kiro); }
.admonition.hood { border-left-color: var(--midnight); background: #eef1f9; }
.admonition.learn { border-left-color: var(--midnight-2); background: #f3f5fb; }
.admonition.learn .admonition-title { color: var(--midnight); font-size: 16px; }
.admonition.learn ol { margin-top: 6px; }
.admonition.explain { border-left-color: #0f6f7c; background: #ecf6f7; }
.admonition.explain .admonition-title { color: #0f6f7c; }
.admonition small { display: block; margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.admonition small a { color: inherit; }
.admonition.story { border-left-color: var(--moon); background: #fffaf0; }
.admonition.tbc { border: 2px dashed var(--tbc); border-left-width: 4px; background: #fff0f5; }
.admonition.tbc .admonition-title { color: var(--tbc); }
.admonition pre { margin-bottom: 12px; }
.tbc { background: #ffe0ec; color: var(--tbc); font-weight: 700; padding: 0 4px; border-radius: 3px; font-family: var(--sans); }
pre .tbc { background: #5a1030; color: #ffd1e3; }

/* Tabs (pymdownx.tabbed alternate style) */
.tabbed-set { display: flex; flex-wrap: wrap; margin: 16px 0; border: 1px solid var(--rule); border-radius: 6px; }
.tabbed-set > input { position: absolute; opacity: 0; pointer-events: none; }
.tabbed-labels { display: flex; width: 100%; border-bottom: 1px solid var(--rule); background: var(--wash); border-radius: 6px 6px 0 0; }
.tabbed-labels > label { padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tabbed-content { width: 100%; padding: 14px 16px 2px; }
.tabbed-block { display: none; }
.tabbed-set > input:nth-child(1):checked ~ .tabbed-labels > :nth-child(1),
.tabbed-set > input:nth-child(2):checked ~ .tabbed-labels > :nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-labels > :nth-child(3) { color: var(--ink); border-bottom-color: var(--moon); }
.tabbed-set > input:nth-child(1):checked ~ .tabbed-content > :nth-child(1),
.tabbed-set > input:nth-child(2):checked ~ .tabbed-content > :nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-content > :nth-child(3) { display: block; }

/* Details (expandable) */
details { margin: 14px 0; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 14px; }
details > summary { cursor: pointer; font-weight: 600; }
details[open] > summary { margin-bottom: 8px; }

/* Pager */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--rule); }
.pager a { font-weight: 600; text-decoration: none; }

/* Focus */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, label:focus-visible {
  outline: 3px solid var(--moon); outline-offset: 2px;
}

/* Narrow screens */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; top: 56px; left: 0; right: 0; z-index: 15; height: calc(100vh - 56px); }
  body.nav-open .sidebar { display: block; }
  .nav-toggle {
    display: inline-block; font: 600 14px var(--sans); color: var(--midnight);
    background: var(--moon); border: 0; border-radius: 4px; padding: 5px 12px; cursor: pointer;
  }
  .event { display: none; }
  .content { padding: 22px 18px 64px; }
  body[data-steps="1"] .content h3 { flex-direction: column; gap: 4px; }
}

@media print {
  .topbar, .sidebar, .copy-btn, .pager, .step-check, .draft-banner { display: none !important; }
  .layout { display: block; }
  pre { background: #f2f2f2; color: #000; border: 1px solid #ccc; }
}

/* ==========================================================================
   Scenes, transitions and motion
   Each scenario has its own accent, taken from its story: kopi amber for
   Kopi Run, coin gold on ledger navy for Tally, scanner cyan for Intake.
   All motion is decorative and switches off with prefers-reduced-motion or
   the "Animations" button in the sidebar.
   ========================================================================== */
:root { interpolate-size: allow-keywords; --accent: var(--moon); }
body[data-scene="home"]   { --accent: #ffc94a; --hero-a: #070c22; --hero-b: #1b2756; }
body[data-scene="kopi"]   { --accent: #e0902f; --hero-a: #170e08; --hero-b: #4a2b17; }
body[data-scene="tally"]  { --accent: #e6b422; --hero-a: #0a1229; --hero-b: #1d3672; }
body[data-scene="intake"] { --accent: #39c6d9; --hero-a: #0f1116; --hero-b: #2a2e39; }

/* Hero band: scene canvas over a static SVG poster, title overlaid */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: -28px -40px 30px; height: 320px;
  background: linear-gradient(155deg, var(--hero-a), var(--hero-b));
  color: #fff;
  view-transition-name: hero;
}
.hero-poster, .hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-poster svg { display: block; width: 100%; height: 100%; }
.hero-canvas { opacity: 0; transition: opacity 0.9s ease; }
.hero.is-live .hero-canvas { opacity: 1; }
.hero-poster { transition: opacity 0.6s ease; }
.hero.is-live .hero-poster { opacity: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(4, 6, 14, 0.78) 0%, rgba(4, 6, 14, 0.35) 42%, rgba(4, 6, 14, 0) 70%);
}
.hero-text { position: absolute; left: 40px; right: 40px; bottom: 24px; z-index: 2; }
.hero-text h1 { color: #fff; margin: 8px 0 6px; max-width: 640px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45); } /* unslop-ignore: dark shadow keeps the title legible over a moving scene */
.hero-caption { margin: 0; max-width: 560px; color: #e6e9f2; font-size: 15.5px; line-height: 1.45; }
.hero .page-time { background: rgba(4, 6, 14, 0.6); color: var(--accent); margin: 0; }

/* Accent touches inside the content */
body[data-scene] .content h2 { border-top-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
body[data-scene] .step-check input { accent-color: var(--accent); }
body[data-scene] .admonition.story { border-left-color: var(--accent); }

/* Page progress bar under the top bar */
.page-progress { position: sticky; top: 56px; z-index: 19; height: 4px; background: rgba(16, 26, 58, 0.08); }
.page-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Sidebar motion toggle sits with the reset link */
.sidebar-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.motion-toggle { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 1px solid var(--rule); border-radius: 4px; padding: 3px 10px; cursor: pointer; }
.motion-toggle:hover { color: var(--ink); border-color: #b9bfcc; }

/* Smooth expand for details where the browser supports it */
details::details-content { block-size: 0; overflow-y: clip; transition: block-size 0.35s ease, content-visibility 0.35s allow-discrete; }
details[open]::details-content { block-size: auto; }
details > summary { transition: color 0.2s ease; }
details[open] > summary { color: var(--ink); }

/* Interactions */
.step-check input:checked { animation: tick-pop 0.38s cubic-bezier(0.3, 1.7, 0.5, 1); }
@keyframes tick-pop { 0% { transform: scale(0.55); } 100% { transform: scale(1); } }
.content h3 { transition: color 0.35s ease; }
.nav-pages > li > a, .nav-steps a { transition: background-color 0.2s ease, color 0.2s ease; }
.copy-btn { transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease; }
.copy-btn:active { transform: scale(0.94); }
.nav-progress.bump { animation: bump 0.45s ease; }
@keyframes bump { 40% { transform: scale(1.35); color: var(--done); } }

/* Scroll reveal: only applied by guide.js to things below the fold, so nothing flashes */
html.motion .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.motion .reveal.in { opacity: 1; transform: none; }

/* Completion toast, with a different small animation per scenario */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: 380px;
  display: flex; align-items: center; gap: 14px; padding: 14px 18px 14px 14px;
  background: var(--midnight); color: #fff; border-radius: 10px; border-left: 4px solid var(--accent);
  box-shadow: 0 12px 32px rgba(8, 12, 32, 0.35);
  transform: translateY(140%); opacity: 0; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}
.toast.show { transform: none; opacity: 1; }
.toast p { margin: 0; font-size: 15px; line-height: 1.4; }
.toast a { color: var(--accent); font-weight: 700; }
.toast-close { margin-left: 4px; align-self: flex-start; font: inherit; font-size: 18px; line-height: 1; color: #aab3cc; background: none; border: 0; cursor: pointer; }
.toast-art { flex: none; width: 48px; height: 48px; }
.toast-art .steam { animation: steam-rise 1.6s ease-in-out infinite; }
.toast-art .steam.s2 { animation-delay: 0.5s; }
.toast-art .coin { animation: coin-bounce 1.1s cubic-bezier(0.3, 1.5, 0.5, 1) infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.toast-art .stamp { animation: stamp 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both; transform-box: fill-box; transform-origin: 50% 50%; }
.toast-art .check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.6s 0.15s ease forwards; }
@keyframes steam-rise { 0% { transform: translateY(4px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-8px); opacity: 0; } }
@keyframes coin-bounce { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-10px); } }
@keyframes stamp { 0% { transform: scale(2.2) rotate(-18deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-8deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Static poster animations (used when three.js isn't loaded) */
.hero-poster .twinkle { animation: twinkle 3.2s ease-in-out infinite; }
.hero-poster .twinkle.t1 { animation-delay: 1.1s; }
.hero-poster .twinkle.t2 { animation-delay: 2.2s; }
@keyframes twinkle { 50% { opacity: 0.25; } }
.hero-poster .spin { animation: spin linear infinite; }
.hero-poster .spin.s1 { animation-duration: 14s; }
.hero-poster .spin.s2 { animation-duration: 21s; animation-direction: reverse; }
.hero-poster .spin.s3 { animation-duration: 30s; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-poster .vm .lit { opacity: 0; animation: vm-cycle 7s ease-in-out infinite; }
.hero-poster .vm .steam { animation: steam-rise 1.8s ease-in-out infinite; }
@keyframes vm-cycle { 0%, 6% { opacity: 0; } 14%, 62% { opacity: 1; } 74%, 100% { opacity: 0; } }

.hero-poster .coin { animation: coin-pass 6s linear infinite; }
.hero-poster .coin.p2 { animation-delay: 4s; }
.hero-poster .coin.block { animation: coin-block 6s linear 2s infinite; opacity: 0; }
.hero-poster .barrier { animation: barrier-flash 6s linear 2s infinite; }
@keyframes coin-pass { 0% { transform: translateX(0); } 100% { transform: translateX(1160px); } }
@keyframes coin-block {
  0% { transform: translateX(0); opacity: 1; }
  33% { transform: translateX(653px); opacity: 1; }
  36% { transform: translateX(640px); }
  39% { transform: translateX(653px); }
  55% { transform: translateX(640px) translateY(26px); opacity: 0; }
  100% { transform: translateX(640px) translateY(26px); opacity: 0; }
}
@keyframes barrier-flash { 0%, 31% { fill: #6aa0ff; fill-opacity: 0.18; } 34% { fill: #ff4d4d; fill-opacity: 0.75; } 50%, 100% { fill: #6aa0ff; fill-opacity: 0.18; } }

.hero-poster .card { animation: card-move 12s linear infinite; }
.hero-poster .card.c2 { animation-delay: -3s; }
.hero-poster .card.c3 { animation-delay: -6s; }
.hero-poster .card.c4 { animation-delay: -9s; }
.hero-poster .card .verdict { opacity: 0; animation: verdict 12s linear infinite; }
.hero-poster .card.c2 .verdict { animation-delay: -3s; }
.hero-poster .card.c3 .verdict { animation-delay: -6s; }
.hero-poster .card.c4 .verdict { animation-delay: -9s; }
.hero-poster .card.bad { animation-name: card-move-bad; }
.hero-poster .beam { animation: beam 1.2s ease-in-out infinite; }
@keyframes card-move { from { transform: translateX(0); } to { transform: translateX(1240px); } }
@keyframes card-move-bad {
  0% { transform: translateX(0); }
  56% { transform: translateX(694px); }
  64% { transform: translateX(794px) translateY(-24px) rotate(-4deg); }
  100% { transform: translateX(1240px) translateY(-24px) rotate(-4deg); }
}
@keyframes verdict { 0%, 54% { opacity: 0; } 58%, 100% { opacity: 1; } }
@keyframes beam { 50% { fill-opacity: 0.45; } }

/* Page transitions between guide pages (Chrome, Edge and Safari 18.2+; others just navigate) */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
.sidebar { view-transition-name: sidebar; }
::view-transition-old(root) { animation: vt-out 0.18s ease both; }
::view-transition-new(root) { animation: vt-in 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 900px) {
  .hero { margin: -22px -18px 24px; height: 250px; }
  .hero-text { left: 18px; right: 18px; bottom: 16px; }
  .hero-text h1 { font-size: 26px; }
  .hero-caption { font-size: 14px; }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* Switch it all off: system setting, or the sidebar button */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  @view-transition { navigation: none; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;
}
html[data-motion="off"]::view-transition-old(root), html[data-motion="off"]::view-transition-new(root) { animation: none; }

/* Kopi poster: each session starts at a slightly different moment, like a real rush */
.hero-poster .vm.d0 .lit { animation-delay: 0.59s; }
.hero-poster .vm.d1 .lit { animation-delay: 0.73s; }
.hero-poster .vm.d2 .lit { animation-delay: 1.20s; }
.hero-poster .vm.d3 .lit { animation-delay: 0.61s; }
.hero-poster .vm.d4 .lit { animation-delay: 0.66s; }
.hero-poster .vm.d5 .lit { animation-delay: 0.76s; }
.hero-poster .vm.d6 .lit { animation-delay: 0.24s; }
.hero-poster .vm.d7 .lit { animation-delay: 0.67s; }
.hero-poster .vm.d8 .lit { animation-delay: 0.82s; }
.hero-poster .vm.d9 .lit { animation-delay: 1.03s; }
.hero-poster .vm.d10 .lit { animation-delay: 0.12s; }
.hero-poster .vm.d11 .lit { animation-delay: 0.39s; }
.hero-poster .vm.d12 .lit { animation-delay: 0.12s; }
.hero-poster .vm.d13 .lit { animation-delay: 1.05s; }
.hero-poster .vm.d14 .lit { animation-delay: 0.90s; }
.hero-poster .vm.d15 .lit { animation-delay: 0.05s; }
.hero-poster .vm.d16 .lit { animation-delay: 1.28s; }
.hero-poster .vm.d17 .lit { animation-delay: 1.25s; }
.hero-poster .vm.d18 .lit { animation-delay: 0.85s; }
.hero-poster .vm.d19 .lit { animation-delay: 0.80s; }

/* Still poster for reduced motion or animations off: a representative moment, not an empty frame */
@media (prefers-reduced-motion: reduce) {
  .hero-poster * { animation: none !important; }
  .hero-poster .vm .lit { opacity: 1; }
  .hero-poster .coin.p1 { transform: translateX(380px); }
  .hero-poster .coin.block { transform: translateX(653px); opacity: 1; }
  .hero-poster .coin.p2 { transform: translateX(880px); }
  .hero-poster .barrier { fill: #ff4d4d; fill-opacity: 0.6; }
  .hero-poster .card.c1 { transform: translateX(150px); }
  .hero-poster .card.c2 { transform: translateX(794px) translateY(-24px) rotate(-4deg); }
  .hero-poster .card.c3 { transform: translateX(420px); }
  .hero-poster .card.c4 { transform: translateX(1010px); }
  .hero-poster .card.c2 .verdict, .hero-poster .card.c4 .verdict { opacity: 1; }
}
html[data-motion="off"] .hero-poster * { animation: none !important; }
html[data-motion="off"] .hero-poster .vm .lit { opacity: 1; }
html[data-motion="off"] .hero-poster .coin.p1 { transform: translateX(380px); }
html[data-motion="off"] .hero-poster .coin.block { transform: translateX(653px); opacity: 1; }
html[data-motion="off"] .hero-poster .coin.p2 { transform: translateX(880px); }
html[data-motion="off"] .hero-poster .barrier { fill: #ff4d4d; fill-opacity: 0.6; }
html[data-motion="off"] .hero-poster .card.c1 { transform: translateX(150px); }
html[data-motion="off"] .hero-poster .card.c2 { transform: translateX(794px) translateY(-24px) rotate(-4deg); }
html[data-motion="off"] .hero-poster .card.c3 { transform: translateX(420px); }
html[data-motion="off"] .hero-poster .card.c4 { transform: translateX(1010px); }
html[data-motion="off"] .hero-poster .card.c2 .verdict, html[data-motion="off"] .hero-poster .card.c4 .verdict { opacity: 1; }


/* ==========================================================================
   Two paths: Console or Terminal. Steps that differ use tabs labelled
   "Console" and "Terminal"; guide.js keeps every tab set on the page, and
   every page, on the path the attendee picked.
   ========================================================================== */
.path-switch { display: flex; align-items: center; gap: 6px; margin: 0 20px 14px; padding: 6px; background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
.path-switch-label { font-size: 12px; font-weight: 650; color: var(--muted); margin: 0 4px 0 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.path-switch button {
  flex: 1; font: 600 13.5px var(--sans); color: var(--muted); background: none; border: 0; border-radius: 5px; padding: 5px 8px; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.path-switch button[aria-pressed="true"] { background: var(--midnight); color: var(--moon); }
.path-switch button:hover:not([aria-pressed="true"]) { background: var(--wash); color: var(--ink); }

.tabbed-set { border-color: color-mix(in srgb, var(--accent) 30%, var(--rule)); }
.tabbed-labels > label { display: inline-flex; align-items: center; gap: 7px; transition: color 0.2s ease, border-color 0.2s ease; }
.tabbed-labels > label::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; opacity: 0.85;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.tabbed-labels > label:nth-child(1) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='2' width='14' height='12' rx='2' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M1 5.5h14' stroke='black' stroke-width='1.6'/%3E%3Ccircle cx='3.5' cy='3.8' r='.7'/%3E%3Ccircle cx='5.6' cy='3.8' r='.7'/%3E%3C/svg%3E"); }
.tabbed-labels > label:nth-child(2) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='2' width='14' height='12' rx='2' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M4 6l2.5 2L4 10M8 10.5h4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.tabbed-block > :last-child { margin-bottom: 12px; }
.tabbed-block ol { padding-left: 22px; }
.tabbed-block ol > li { margin: 6px 0; }
.ui { font-weight: 650; }

.path-choice { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.path-choice button {
  font: 650 15px var(--sans); padding: 10px 16px; border-radius: 6px; cursor: pointer;
  color: var(--ink); background: #fff; border: 2px solid var(--rule);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.path-choice button:hover { border-color: var(--midnight); }
html[data-path="console"] .path-choice button[data-choose-path="console"],
html[data-path="terminal"] .path-choice button[data-choose-path="terminal"] { background: var(--midnight); color: var(--moon); border-color: var(--midnight); }

/* Console screenshots (checked in the live console, cropped to exclude account details) */
details.shot { border-color: var(--rule); background: var(--wash); padding: 6px 12px; }
details.shot > summary { font-size: 14px; color: var(--muted); }
details.shot[open] > summary { color: var(--ink); }
img.shot { display: block; max-width: 100%; height: auto; margin: 8px 0 10px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(16, 26, 58, 0.08); }
details.shot p { font-size: 14px; color: var(--muted); }

/* Inline commands that copy on click */
code.copy-inline { cursor: copy; position: relative; border-bottom: 1px dashed currentColor; }
code.copy-inline:hover, code.copy-inline:focus-visible { outline: 2px solid var(--accent, var(--midnight-2)); outline-offset: 1px; }
code.copy-inline.copied::after {
  content: "Copied"; position: absolute; left: 0; bottom: calc(100% + 4px);
  font: 600 0.72rem/1 system-ui, sans-serif; padding: 3px 6px; border-radius: 4px;
  background: var(--term-bg); color: var(--term-ink); white-space: nowrap; pointer-events: none;
}
