/* Tokyo Night, Omarchy's default theme: the colours the README's pictures wear.
   Green and red mean up and down only; blue, the accent, means selected. */
:root {
  --bg: #1a1b26;
  --bg-deep: #13141c;
  --surface: #1f2130;
  --raise: #292e42;
  --line: #2f334d;
  --fg: #c0caf5;
  --text: #a9b1d6;
  --muted: #737aa2;
  --faint: #565f89;
  --up: #9ece6a;
  --down: #f7768e;
  --accent: #7aa2f7;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --shadow: 6px 6px 0 var(--bg-deep);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 56px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fg); text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: var(--mono); color: var(--fg); font-size: 0.92em; overflow-wrap: anywhere; }
kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0 0.35em;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  background: var(--surface);
  color: var(--fg);
  font: 700 0.85em/1.5 var(--mono);
  text-align: center;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nw { white-space: nowrap; }
button { font: inherit; color: inherit; }

/* Block cells: each lit cell a pixel short of the next, unlit slots faint. */
.blocks { display: inline-block; line-height: 0; }
.blocks svg { display: block; shape-rendering: crispEdges; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.06em;
  box-shadow: 4px 4px 0 var(--bg-deep);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--bg-deep); }
.btn-small { padding: 4px 12px; font-size: 13px; }

/* The top bar, the height and ground of Omarchy's. */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 20px; gap: 16px;
  background: rgba(19, 20, 28, 0.94);
  border-bottom: 1px solid var(--line);
  font-size: 13px; letter-spacing: 0.12em;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; }
.topbar nav { display: flex; align-items: center; gap: 20px; }
.topbar nav a:not(.btn) { text-decoration: none; color: var(--text); }
.topbar nav a:not(.btn):hover { color: var(--fg); }
.mark svg { display: block; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 24px 0; }
.scatter { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner {
  position: relative;
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 64px; align-items: start;
}
.hero-copy { padding-top: 40px; }
.eyebrow, .stage-label, .not-title, .sheet-title {
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow { margin: 0 0 28px; }
.wordmark { margin: 0 0 32px; }
.wordmark .blocks svg { width: min(100%, 556px); height: auto; }
.lead { font-size: 26px; line-height: 1.35; color: var(--fg); font-weight: 700; margin: 0 0 18px; letter-spacing: -0.01em; }
.hero-copy > p { max-width: 34em; }
.answer { color: var(--text); }
.fine { font-size: 13px; color: var(--muted); }
.center { text-align: center; }

.term {
  margin: 28px 0 18px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 640px;
}
.term-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line);
  font-size: 12px; letter-spacing: 0.14em; color: var(--muted);
}
.copy {
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  padding: 2px 12px; font-size: 12px; letter-spacing: 0.1em; cursor: pointer;
}
.copy:hover { border-color: var(--accent); }
.term pre { margin: 0; padding: 14px; white-space: pre-wrap; overflow-wrap: break-word; font-size: 13px; line-height: 1.6; }
.term code { color: var(--fg); font-size: 13px; overflow-wrap: break-word; }
.prompt { color: var(--faint); user-select: none; }
.cursor { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 4px; vertical-align: -0.2em; background: var(--fg); }
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

.skyline { display: block; width: 100%; height: 120px; margin-top: 64px; }

/* The demo popup, at the shell's size. */
.demo-wrap { margin: 0; position: relative; }
.demo-tag {
  position: absolute; top: -13px; right: 18px; z-index: 2;
  padding: 2px 10px; background: var(--fg); color: var(--bg);
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
}
.popup {
  position: relative;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 18px 20px 10px;
  box-shadow: 10px 10px 0 var(--bg-deep);
  font-size: 13px;
  user-select: none;
}
.demo-wrap figcaption { margin-top: 22px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.pop-head { display: flex; align-items: center; gap: 12px; height: 30px; }
.animal { width: 40px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; flex: none; }
.animal[hidden] { display: block; visibility: hidden; }
.animal:disabled { cursor: default; }
.animal svg, .animal canvas { display: block; }
.zz { align-self: flex-start; width: 6px; margin: 0 -6px 0 -10px; color: var(--muted); font-size: 11px; line-height: 1; }
.zz:empty { visibility: hidden; }
.status { flex: 1; min-width: 0; letter-spacing: 0.14em; color: var(--text); font-size: 12px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-tools { display: flex; gap: 6px; }
.look, .help { width: 26px; height: 26px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.look:hover, .help:hover { color: var(--fg); }
.listing { margin: 10px 0 8px; letter-spacing: 0.12em; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing b { color: var(--fg); font-size: 15px; letter-spacing: 0.04em; margin-right: 6px; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; min-height: 62px; gap: 12px; }
.price { line-height: 0; color: var(--fg); }
.price .smooth-price { font: 700 52px/1 var(--mono); letter-spacing: -0.02em; display: block; }
.change { border: 0; background: none; padding: 0; font: 400 28px/1 var(--mono); cursor: pointer; white-space: nowrap; }
.change:disabled { cursor: default; }
.strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; min-height: 18px; margin: 6px 0 14px; font-size: 11px; letter-spacing: 0.14em; color: var(--muted); white-space: nowrap; }
.change-cap { margin-left: auto; }
.strip b { color: var(--fg); font-weight: 400; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

.chart { display: block; width: 100%; height: 210px; cursor: crosshair; touch-action: pan-y; }
.ranges { display: flex; justify-content: space-between; margin: 12px 0 10px; }
.ranges button {
  border: 0; background: none; padding: 3px 7px; cursor: pointer;
  color: var(--muted); font-size: 12px; letter-spacing: 0.08em;
}
.ranges button:hover { color: var(--fg); }
.ranges button[aria-pressed="true"] { background: var(--raise); color: var(--fg); }
.info { display: grid; grid-template-columns: auto auto 1fr auto; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 12px; }
.info b { color: var(--fg); font-weight: 400; }
.info canvas { width: 100%; height: 10px; display: block; }
.breadth { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.14em; color: var(--muted); margin: 4px 0 6px; }
.breadth span:first-child { color: var(--fg); }
.breadth-rule { flex: 1; height: 4px; min-width: 0; }

.rows { margin: 0 -12px; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) 72px 92px; gap: 10px; align-items: center;
  width: 100%; padding: 7px 12px; border: 0; border-left: 2px solid transparent;
  background: none; text-align: left; cursor: pointer;
}
.row:hover { background: var(--surface); }
.row[aria-current="true"] { background: var(--raise); border-left-color: var(--fg); }
.row.selected { outline: 1px dashed var(--faint); outline-offset: -1px; }
.row .who { min-width: 0; }
.row .sym { display: block; color: var(--fg); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.row .name { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .nums { text-align: right; font-size: 14px; line-height: 1.35; }
.row .nums span { display: block; color: var(--fg); }
.row canvas { width: 72px; height: 24px; display: block; }

.sheet {
  position: absolute; inset: 52px 14px auto 14px; z-index: 3;
  background: var(--surface); border: 1px solid var(--line); padding: 14px 16px;
  box-shadow: 6px 6px 0 var(--bg-deep);
}
.sheet[hidden] { display: none; }
.sheet-title { margin: 0 0 10px; }
.sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; align-items: center; }
.sheet dt { white-space: nowrap; }
.sheet dd { margin: 0; color: var(--text); }

/* A faint scanline over the demo's screen, as on a cabinet's glass. */
.popup::after {
  content: ""; position: absolute; inset: 0; border-radius: 6px; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
}

/* Stages */
.stage { max-width: 1080px; margin: 0 auto; padding: 96px 24px 24px; }
.stage-label { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.stage-label .blocks { margin-right: 6px; }
.stage-word { color: var(--faint); }
h2 { font-size: 36px; line-height: 1.15; color: var(--fg); margin: 0 0 20px; letter-spacing: -0.02em; }
.wide { max-width: 44em; font-size: 17px; }
.note { max-width: 44em; font-size: 14px; color: var(--muted); }

.bar-demo { position: relative; margin: 40px 0 18px; }
.fake-bar {
  display: flex; justify-content: space-between; align-items: center;
  height: 64px; padding: 0 22px;
  background: var(--bg-deep); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.ws { display: flex; gap: 14px; font-size: 18px; }
.ws b { color: var(--fg); }
.ws i { font-style: normal; color: var(--faint); }
.ws-right { display: flex; gap: 12px; }
.ws-right i { width: 14px; height: 14px; background: var(--line); }
.pill {
  position: absolute; left: 50%; top: 32px; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 16px; border: 0; background: none; cursor: pointer;
  font-size: 22px; white-space: nowrap; color: var(--fg);
}
.pill:hover { background: var(--raise); }
.pill canvas { display: block; }
.pill .arrow { display: inline-block; font-size: 22px; }
.forms { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 10px; }
.forms button, .chips button, .seg button {
  border: 1px solid var(--line); background: var(--surface); padding: 6px 14px; cursor: pointer;
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text);
}
.forms button:hover, .chips button:hover, .seg button:hover { color: var(--fg); border-color: var(--faint); }
.forms button[aria-pressed="true"], .chips button[aria-pressed="true"], .seg button[aria-pressed="true"] {
  border-color: var(--accent); color: var(--fg); box-shadow: inset 0 0 0 1px var(--accent);
}
.forms button[aria-pressed="true"]::before, .seg button[aria-pressed="true"]::before { content: "▶ "; color: var(--accent); }

.cart {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0;
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.label-list { list-style: none; margin: 0; padding: 26px 30px; }
.label-list li { position: relative; padding: 9px 0 9px 28px; border-bottom: 1px dashed var(--line); color: var(--fg); }
.label-list li:last-child { border-bottom: 0; }
.label-list li::before {
  content: ""; position: absolute; left: 0; top: 17px; width: 10px; height: 10px; background: var(--muted);
  box-shadow: 4px 4px 0 var(--bg-deep);
}
.not-label { padding: 30px; border-left: 2px dashed var(--line); background: var(--bg); }
.not-title { margin: 0 0 12px; }
.not-label p:last-child { color: var(--fg); margin: 0; }

/* One day: the popup held in view while the clock follows the scroll. */
.day-head { padding-bottom: 0; }
.day-track { position: relative; }
.js .day-track { height: 560vh; }
.day-sticky {
  position: sticky; top: 44px; height: calc(100svh - 44px);
  display: flex; align-items: center; justify-content: center; gap: 64px; padding: 24px;
}
.day.still .day-track { height: auto; }
.day.still .day-sticky { position: static; height: auto; padding: 40px 24px 0; }
.day.still .day-hint { display: none; }
.day-clock { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.clock-place { font-size: 13px; letter-spacing: 0.16em; color: var(--muted); }
.day-pop { position: relative; width: 470px; max-width: 100%; }
.popup.compact .chart { height: 180px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 48px; align-items: start; }
.plain-list { margin: 20px 0 0; padding: 0; list-style: none; }
.plain-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); color: var(--fg); }
.shots { display: grid; gap: 16px; }
.shots img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); background: var(--bg); }

.select { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; margin-top: 36px; align-items: start; }
.pick-title { margin: 22px 0 10px; font-size: 12px; letter-spacing: 0.16em; color: var(--muted); }
.pick-title:first-child { margin-top: 0; }
.seg { display: flex; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 12px; text-transform: none; letter-spacing: 0.04em; }
.chips button::before { content: ""; width: 10px; height: 10px; background: var(--sw); outline: 1px solid var(--faint); }
.theme-shot { margin: 0; }
.theme-ground { padding: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg); transition: background-color 160ms ease-out; }
.theme-ground img { display: block; width: 100%; height: auto; }
.theme-shot figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }
@media (hover: none) { .keys-only { display: none; } }

.moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 30px 0; }
.moves div { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 10px 8px; border-bottom: 1px dashed var(--line); transition: background-color 160ms ease-out; }
.moves div.lit { background: var(--raise); }
.moves div.lit kbd { border-color: var(--accent); }
.moves dt { display: flex; gap: 6px; }
.moves dd { margin: 0; color: var(--fg); }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 30px; }
.qa { padding: 18px 0; border-top: 1px dashed var(--line); }
.qa h3 { margin: 0 0 8px; font-size: 16px; color: var(--fg); }
.qa p { margin: 0; }

.rules { margin: 30px 0 0; border-top: 2px solid var(--line); }
.rules div { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.rules dt { color: var(--muted); letter-spacing: 0.16em; font-size: 13px; padding-top: 2px; }
.rules dd { margin: 0; color: var(--fg); }

.finale { max-width: 880px; margin: 0 auto; padding: 120px 24px 40px; }
.cabinet { display: flex; align-items: center; justify-content: center; gap: 36px; margin-bottom: 36px; }
.finale-mid { text-align: center; }
.freeplay { margin: 0 0 18px; }
.freeplay .blocks svg { width: min(100%, 480px); height: auto; margin: 0 auto; }
.coin { margin: 0; color: var(--fg); letter-spacing: 0.08em; }
.sprite { image-rendering: pixelated; flex: none; }
.finale .term { margin: 0 auto 24px; }
.steps { max-width: 640px; margin: 0 auto 18px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 8px 0 8px 44px; color: var(--fg); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 7px; width: 28px; height: 28px;
  display: grid; place-items: center; background: var(--raise); color: var(--fg); font-weight: 700; font-size: 14px;
}
.finale .fine { max-width: 640px; margin: 0 auto; }

.foot { border-top: 1px solid var(--line); padding: 28px 24px 48px; text-align: center; font-size: 13px; color: var(--muted); }
.foot p { margin: 6px 0; }

@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .demo-wrap { max-width: 470px; width: 100%; margin: 0 auto; }
  .hero-copy { padding-top: 0; }
  .select, .split { grid-template-columns: 1fr; }
  .theme-shot { max-width: 470px; }
  .day-sticky { flex-direction: column; gap: 20px; }
  .day-clock { align-items: center; }
  .cart { grid-template-columns: 1fr; }
  .not-label { border-left: 0; border-top: 2px dashed var(--line); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { padding: 0 14px; letter-spacing: 0.06em; }
  .topbar nav { gap: 14px; }
  .hero { padding: 36px 16px 0; }
  .eyebrow { margin-bottom: 20px; font-size: 12px; }
  .lead { font-size: 21px; }
  .stage { padding: 72px 16px 16px; }
  h2 { font-size: 27px; }
  .wide { font-size: 15px; }
  .popup { padding: 14px 14px 8px; }
  .pop-head { gap: 8px; }
  .status { font-size: 11px; letter-spacing: 0.06em; }
  .listing { letter-spacing: 0.06em; }
  .head-tools { gap: 0; }
  .rows { margin: 0 -8px; }
  .row { padding: 7px 8px; grid-template-columns: minmax(0, 1fr) 56px 84px; gap: 8px; }
  .row canvas { width: 56px; }
  /* The longest demo figures, 1,284.54 and +427.32%, fit a 320 px screen. */
  .price .smooth-price { font-size: min(40px, 10vw); }
  .change { font-size: min(22px, 5.5vw); }
  .chart { height: 170px; }
  .ranges button { padding: 3px 3px; font-size: 11px; }
  .fake-bar { height: 52px; padding: 0 12px; }
  .ws { font-size: 14px; gap: 9px; }
  .ws-right { display: none; }
  .pill { top: 26px; font-size: 16px; height: 38px; padding: 0 10px; left: auto; right: 0; transform: translateY(-50%); }
  .pill .arrow { font-size: 16px; }
  .moves, .faq { grid-template-columns: 1fr; }
  .day-sticky { padding: 12px 12px 16px; gap: 14px; }
  .popup.compact .chart { height: 170px; }
  .theme-ground { padding: 10px; }
  .moves div { grid-template-columns: 80px 1fr; }
  .rules div { grid-template-columns: 1fr; gap: 4px; }
  .label-list { padding: 18px; }
  .not-label { padding: 18px; }
  .cabinet { gap: 14px; }
  .sprite { display: none; }
  .finale { padding-top: 88px; }
  .skyline { height: 80px; margin-top: 48px; }
}

/* The narrowest phones: the bull alone names the brand, so the links fit. */
@media (max-width: 359px) {
  .brand span { display: none; }
  /* The text form's longest, HISCORE 1,284.54 ▼0.15%, clears the workspace numbers. */
  .pill { font-size: 13px; gap: 6px; padding: 0 6px; }
  .pill .arrow { font-size: 13px; }
}

/* A short landscape screen: the clock beside the popup, the chart lower,
   so the whole day fits while it is pinned. */
@media (max-height: 600px) and (orientation: landscape) {
  .day-sticky { flex-direction: row; gap: 24px; padding: 8px 16px; }
  .day-clock { align-items: flex-start; }
  .popup.compact { padding: 10px 14px 6px; }
  .popup.compact .listing { margin: 4px 0; }
  .popup.compact .strip { margin: 2px 0 6px; }
  .popup.compact .chart { height: 96px; }
}

/* Without JavaScript: the headings' own words, and no empty demos. */
html:not(.js) .blocks + .sr { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
html:not(.js) .wordmark .sr { font-size: 56px; line-height: 1.1; color: var(--fg); }
html:not(.js) .demo-wrap, html:not(.js) .day-track, html:not(.js) .day-hint, html:not(.js) .copy,
html:not(.js) .bar-demo, html:not(.js) .forms, html:not(.js) .select { display: none; }
