/* GENERATED by tools/sync-tour.mjs. The first part is this site's own (the
   poster, and the console's colours and small buttons inside the player); the
   rest is the console's css/tour.css, untouched. */

.tour-poster { position: relative; display: block; width: 100%; aspect-ratio: 16 / 8.2; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  border: 1px solid rgba(194, 255, 61, .35); background: radial-gradient(ellipse at 50% 30%, rgba(194, 255, 61, .16), transparent 62%), #080a07;
  color: var(--text); font: inherit; padding: 0; box-shadow: 0 30px 90px -30px rgba(194, 255, 61, .25); transition: transform .25s var(--ease), box-shadow .3s; }
.tour-poster:hover { transform: translateY(-3px); box-shadow: 0 40px 110px -30px rgba(194, 255, 61, .4); }
.tour-poster-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 22px); padding: 5%; text-align: center; }
.tour-poster-name { font: italic 800 clamp(22px, 4.6vw, 52px)/1 var(--display); letter-spacing: .03em; }
.tour-poster-name i { color: var(--lime); }
.tour-poster-go { display: inline-flex; align-items: center; justify-content: center; width: clamp(54px, 8vw, 92px); height: clamp(54px, 8vw, 92px); border-radius: 50%;
  background: var(--lime); color: #0b0e0a; box-shadow: 0 0 0 0 var(--lime-glow); animation: tour-pulse 2.4s ease-out infinite; }
.tour-poster-go svg { width: 42%; height: 42%; margin-left: 8%; }
.tour-poster-sub { font: 500 clamp(11px, 1.5vw, 15px)/1.4 var(--mono); color: var(--muted); }
@keyframes tour-pulse { 0% { box-shadow: 0 0 0 0 var(--lime-glow); } 70%, 100% { box-shadow: 0 0 0 26px rgba(194, 255, 61, 0); } }
.tour-jumps { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.tour-jumps button { font: 500 12.5px/1 var(--mono); padding: 8px 12px; border-radius: 999px; cursor: pointer; background: var(--surface-2);
  border: 1px solid var(--border-soft); color: var(--muted); transition: color .2s, border-color .2s; }
.tour-jumps button:hover { color: var(--lime); border-color: rgba(194, 255, 61, .4); }
@media (prefers-reduced-motion: reduce) { .tour-poster-go { animation: none; } .tour-poster:hover { transform: none; } }

.tour-back { --card: #0b0e0a; --surface-2: #12160f; --border: #2e3820; --border-soft: #1c2316; --text: #f2f5ea; --muted: #9ba58c; --faint: #687159;
  --accent: #c2ff3d; --accent-hi: #d6ff7a; --accent-dim: #8cbf1f; --ok: #c2ff3d; --ok-bg: #1d270b; --warn: #ff9f2e; --warn-bg: #2b1c07;
  --danger: #ff4d5e; --danger-bg: #2a0d12; --crit: #d96bff; --crit-bg: #1e0f2a; --info: #4fc3e8; --info-bg: #06202a;
  font: 400 14px/1.5 -apple-system, 'Segoe UI', system-ui, sans-serif; text-align: left; }
.tour-back h2, .tour-back h3 { font-family: inherit; letter-spacing: 0; line-height: 1.3; }
.tour-back .btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; padding: 7px 14px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; white-space: nowrap; transform: none; box-shadow: none; }
.tour-back .btn:hover { border-color: var(--accent-dim); color: var(--text); transform: none; box-shadow: none; }
.tour-back .btn-primary { background: var(--accent); color: #0b0e0a; border-color: var(--accent); }
.tour-back .btn-primary:hover { background: var(--accent-hi); color: #0b0e0a; }
.tour-back .btn-small { padding: 4px 10px; font-size: 12.5px; }
.tour-back .faint { color: var(--faint); }
.tour-back kbd { font: 600 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: var(--surface-2); }

/* The animated walkthrough (js/tour.js): a scripted "video" played on a small
   drawing of the console. Everything inside the stage is sized in em, and the
   stage's font-size follows its width, so the whole picture scales as one. */

.tour-back { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(0, 0, 0, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.tour { width: min(1180px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--card);
  border: 1px solid rgba(194, 255, 61, .4); border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .8), 0 0 60px rgba(194, 255, 61, .08); }
.tour-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.tour-head h2 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-head .tour-step { color: var(--faint); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tour-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 0; }
.tour-chapters { overflow-y: auto; padding: 8px; border-right: 1px solid var(--border-soft); background: rgba(0, 0, 0, .25); }
.tour-chap { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; font-size: 12.5px;
  color: var(--muted); background: none; border: 0; border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.tour-chap:hover { color: var(--text); background: rgba(194, 255, 61, .07); }
.tour-chap .n { flex: none; width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 700; line-height: 18px;
  text-align: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--faint); }
.tour-chap.done .n { background: var(--ok-bg); border-color: #3d5216; color: var(--ok); }
.tour-chap.on { color: var(--text); background: rgba(194, 255, 61, .13); box-shadow: inset 3px 0 0 var(--accent); }
.tour-chap.on .n { background: var(--accent); border-color: var(--accent); color: #0b0e0a; }
.tour-view { min-width: 0; display: flex; flex-direction: column; }
.tour-stage-wrap { padding: 14px 14px 0; }
.tour-caption { min-height: 66px; padding: 12px 18px 4px; font-size: 15px; line-height: 1.45; color: var(--text); }
.tour-caption b { color: var(--accent-hi); }
.tour-caption kbd { font-size: 12px; }
.tour-bar { height: 3px; background: var(--surface-2); }
.tour-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .12s linear; }
.tour-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px 12px; flex-wrap: wrap; }
.tour-foot .spacer { flex: 1; }
.tour-foot .faint { font-size: 12px; }

/* ── The stage: a small console ─────────────────────────────────────────── */
.tw-stage { position: relative; width: 100%; aspect-ratio: 16 / 8.2; overflow: hidden; border-radius: 8px; font-size: 10px;
  background: #060805; border: 1px solid var(--border); color: var(--text); user-select: none; }
.tw-stage * { box-sizing: border-box; }
.tw-shell { position: absolute; inset: 0; display: grid; grid-template-columns: 17em minmax(0, 1fr); }
.tw-side { background: linear-gradient(180deg, rgba(194, 255, 61, .07), rgba(6, 8, 5, .2) 22%), #0a0d08; border-right: 1px solid rgba(194, 255, 61, .2);
  padding: .8em .7em; display: flex; flex-direction: column; gap: .32em; overflow: hidden; }
.tw-brand { font-weight: 800; font-style: italic; letter-spacing: .06em; font-size: 1.25em; margin: 0 0 .5em .3em; }
.tw-brand i { color: var(--accent); font-style: italic; }
.tw-sbtn { display: flex; align-items: center; justify-content: space-between; gap: .5em; padding: .45em .7em; font-size: .95em;
  color: var(--muted); border: 1px solid rgba(194, 255, 61, .18); border-radius: .5em; background: rgba(242, 245, 234, .03); }
.tw-sbtn.tw-on { color: var(--accent); border-color: rgba(194, 255, 61, .6); }
.tw-grp { margin: .55em 0 .1em .3em; font-size: .78em; font-weight: 700; letter-spacing: .1em; color: var(--accent-dim); text-transform: uppercase;
  display: flex; justify-content: space-between; }
.tw-nav { position: relative; display: flex; align-items: center; gap: .5em; padding: .42em .7em; font-size: .98em; color: var(--muted);
  border-radius: .5em; background: rgba(242, 245, 234, .035); transition: background .25s, color .25s, box-shadow .25s; }
.tw-nav.tw-on { color: var(--text); background: rgba(194, 255, 61, .2); box-shadow: inset 0 0 0 1px rgba(194, 255, 61, .4); }
.tw-nav .tw-badge { margin-left: auto; font-size: .78em; font-weight: 700; padding: 0 .55em; border-radius: 1em; background: var(--danger-bg); color: var(--danger); }
.tw-nav .tw-star { margin-left: auto; color: var(--faint); transition: color .2s, transform .2s; }
.tw-nav .tw-star.tw-on { color: var(--accent); transform: scale(1.35); }
.tw-main { position: relative; padding: 1.3em 1.6em; overflow: hidden; }
.tw-h1 { font-size: 1.7em; font-weight: 700; margin: 0 0 .7em; display: flex; align-items: center; gap: .6em; }
.tw-card { border: 1px solid var(--border); border-radius: .6em; background: var(--card); padding: .8em 1em; margin-bottom: .8em; }
.tw-card h3 { margin: 0 0 .5em; font-size: 1.05em; }
.tw-row { display: flex; align-items: center; gap: .8em; padding: .5em .4em; border-bottom: 1px solid var(--border-soft); font-size: .98em;
  transition: background .2s; }
.tw-row:last-child { border-bottom: 0; }
.tw-row.tw-on { background: rgba(194, 255, 61, .1); box-shadow: inset .25em 0 0 var(--accent); }
.tw-row b { min-width: 7.5em; }
.tw-row .tw-grow { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-pill { display: inline-block; font-size: .8em; font-weight: 700; padding: .12em .7em; border-radius: 1em; border: 1px solid; white-space: nowrap; }
.tw-pill.ok { color: var(--ok); background: var(--ok-bg); border-color: #3d5216; }
.tw-pill.warn { color: var(--warn); background: var(--warn-bg); border-color: #5a3a10; }
.tw-pill.crit { color: var(--crit); background: var(--crit-bg); border-color: #4a2366; }
.tw-pill.info { color: var(--info); background: var(--info-bg); border-color: #164a5c; }
.tw-pill.muted { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.tw-btn { display: inline-flex; align-items: center; gap: .4em; font-size: .92em; font-weight: 600; padding: .38em .9em; border-radius: .5em;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
.tw-btn.pri { background: var(--accent); border-color: var(--accent); color: #0b0e0a; }
.tw-btn.tw-on { border-color: var(--accent); box-shadow: 0 0 0 .2em rgba(194, 255, 61, .25); }
.tw-ico { display: inline-flex; align-items: center; justify-content: center; width: 1.9em; height: 1.9em; border-radius: .45em; color: var(--muted);
  border: 1px solid transparent; transition: all .2s; }
.tw-ico.tw-on { color: var(--accent); border-color: rgba(194, 255, 61, .5); background: rgba(194, 255, 61, .1); }
.tw-box { display: inline-block; width: 1.15em; height: 1.15em; border-radius: .25em; border: 1px solid var(--muted); flex: none; transition: all .15s; }
.tw-box.tw-on { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 .18em #0b0e0a; }
.tw-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6em; }
.tw-tile { border: 1px solid var(--border); border-radius: .6em; padding: .6em .7em; background: var(--surface-2); transition: all .2s; }
.tw-tile .n { font-size: 1.9em; font-weight: 700; line-height: 1.1; }
.tw-tile .l { font-size: .8em; color: var(--muted); }
.tw-tile.tw-on { border-color: var(--accent); box-shadow: 0 0 0 .2em rgba(194, 255, 61, .2); }
.tw-tabs { display: flex; gap: .2em; border-bottom: 1px solid var(--border); margin-bottom: .8em; }
.tw-tab { padding: .45em 1em; font-size: .95em; font-weight: 600; color: var(--muted); border-bottom: .18em solid transparent; }
.tw-tab.tw-on { color: var(--accent-hi); border-bottom-color: var(--accent); }
.tw-bar { display: flex; align-items: center; gap: .7em; padding: .5em .9em; margin-bottom: .8em; font-size: .95em; border-radius: .5em;
  background: var(--info-bg); border: 1px solid #164a5c; color: var(--muted); }
.tw-bulk { position: absolute; left: 1.6em; right: 1.6em; bottom: 1.2em; display: flex; align-items: center; gap: .8em; padding: .6em 1em;
  border-radius: .6em; background: var(--surface-2); border: 1px solid rgba(194, 255, 61, .5); box-shadow: 0 .8em 2em rgba(0, 0, 0, .6); }
.tw-term { background: #000; border: 1px solid var(--border); border-radius: .5em; padding: .7em .9em; font-family: var(--mono); font-size: .92em;
  color: #b9f27c; min-height: 8em; white-space: pre-wrap; }
.tw-screen { border: 1px solid var(--border); border-radius: .5em; min-height: 11em; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10314a, #0a1c2c); color: #9fd0ee; font-size: 1em; }
.tw-input { display: flex; align-items: center; gap: .5em; padding: .45em .8em; border: 1px solid var(--border); border-radius: .5em;
  background: #050704; color: var(--text); min-height: 2.2em; font-size: .98em; }
.tw-input.tw-on { border-color: var(--accent); }
.tw-caret::after { content: ''; display: inline-block; width: .1em; height: 1.1em; margin-left: .1em; background: var(--accent); vertical-align: -.2em;
  animation: tw-blink 1s steps(2) infinite; }
.tw-chat { display: flex; flex-direction: column; gap: .45em; }
.tw-msg { max-width: 70%; padding: .45em .8em; border-radius: .8em; font-size: .95em; background: var(--surface-2); border: 1px solid var(--border); }
.tw-msg.me { align-self: flex-end; background: var(--ok-bg); border-color: #3d5216; }

/* Things that appear on cue. */
.tw-hide { opacity: 0; transform: translateY(.6em); pointer-events: none; }
.tw-stage [data-k] { transition: opacity .35s ease, transform .35s ease, background .25s, color .25s, border-color .25s, box-shadow .25s; }
.tw-gone { display: none !important; }

/* Overlays: palette, dialog, job panel, key caps. */
.tw-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.tw-pal { position: absolute; left: 22%; right: 22%; top: 14%; background: var(--card); border: 1px solid rgba(194, 255, 61, .45); border-radius: .8em;
  box-shadow: 0 2em 6em rgba(0, 0, 0, .8); overflow: hidden; }
.tw-pal .tw-input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 1.25em; padding: .7em 1em; }
.tw-pal .tw-row { padding: .55em 1em; }
.tw-pal .tw-foot { display: flex; gap: 1.2em; padding: .5em 1em; font-size: .78em; color: var(--faint); border-top: 1px solid var(--border); }
.tw-dlg { position: absolute; left: 30%; right: 30%; top: 24%; background: var(--card); border: 1px solid var(--border); border-radius: .8em; padding: 1.2em;
  box-shadow: 0 2em 6em rgba(0, 0, 0, .8); }
.tw-dlg h3 { margin: 0 0 .7em; font-size: 1.2em; }
.tw-dlg .tw-acts { display: flex; justify-content: flex-end; gap: .6em; margin-top: 1em; }
.tw-job { position: absolute; right: 1.2em; bottom: 1.2em; width: 30em; background: var(--card); border: 1px solid rgba(194, 255, 61, .45); border-radius: .8em;
  box-shadow: 0 1.5em 4em rgba(0, 0, 0, .7); overflow: hidden; }
.tw-job .tw-jh { padding: .6em 1em; border-bottom: 1px solid var(--border-soft); font-weight: 700; display: flex; gap: .8em; align-items: center; }
.tw-job .tw-jb { padding: .6em 1em; }
.tw-keys { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); display: flex; align-items: center; gap: .5em; padding: .6em 1em;
  border-radius: .8em; background: rgba(0, 0, 0, .82); border: 1px solid rgba(194, 255, 61, .5); font-size: 1.5em; font-weight: 700; z-index: 5;
  box-shadow: 0 .6em 2em rgba(0, 0, 0, .7); transition: opacity .25s; }
.tw-keys.tw-hide { transform: translateX(-50%) translateY(.6em); }
.tw-keys kbd { font-size: .9em; padding: .25em .6em; color: var(--accent-hi); border-color: rgba(194, 255, 61, .5); background: #12160f; }
.tw-keys span { color: var(--faint); font-size: .7em; font-weight: 600; }

/* The pointer. */
.tw-cur { position: absolute; left: 60%; top: 60%; width: 1.9em; height: 1.9em; z-index: 9; pointer-events: none;
  transition: left .7s cubic-bezier(.45, .05, .25, 1), top .7s cubic-bezier(.45, .05, .25, 1); filter: drop-shadow(0 .2em .3em rgba(0, 0, 0, .8)); }
.tw-cur svg { width: 100%; height: 100%; display: block; }
.tw-cur.tw-click::after { content: ''; position: absolute; left: -.55em; top: -.55em; width: 1.8em; height: 1.8em; border-radius: 50%;
  border: .18em solid var(--accent); animation: tw-ping .45s ease-out forwards; }
@keyframes tw-ping { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
@keyframes tw-blink { 50% { opacity: 0; } }

/* The opening and closing cards. */
.tw-title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1em; text-align: center;
  padding: 2em; background: radial-gradient(ellipse at 50% 35%, rgba(194, 255, 61, .13), transparent 60%); }
.tw-title .big { font-size: 3.4em; font-weight: 800; font-style: italic; letter-spacing: .03em; }
.tw-title .big i { color: var(--accent); font-style: italic; }
.tw-title .sub { font-size: 1.5em; color: var(--muted); max-width: 34em; }
.tw-title .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; max-width: 46em; }
.tw-title .chips span { font-size: 1.05em; padding: .35em 1em; border-radius: 2em; border: 1px solid rgba(194, 255, 61, .35); background: rgba(194, 255, 61, .06); }

@media (max-width: 860px) {
  .tour-back { padding: 0; }
  .tour { border-radius: 0; height: 100%; }
  .tour-body { grid-template-columns: 1fr; }
  .tour-chapters { display: none; }
  .tour-caption { font-size: 14px; min-height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  /* Unless the person asked for the animated version (tour.js adds .tw-move). */
  .tw-stage:not(.tw-move) .tw-cur, .tw-stage:not(.tw-move) [data-k] { transition: none; }
  .tw-stage:not(.tw-move) .tw-caret::after, .tw-stage:not(.tw-move) .tw-cur.tw-click::after { animation: none; }
}
@media print { .tour-back { display: none !important; } }
