:root {
  --bg: #0e1018;
  --panel: #12141e;
  --border: #323848;
  --title: #f4c430;
  --text: #e8eaef;
  --muted: #969eb0;
  --link: #82c3ff;
  --hover: #1a1e2a;
  --accent: rgba(244, 196, 48, 0.12);
  --stage: #0c0e14;
}
body.light-mode {
  --bg: #fffdf8;
  --panel: #ffffff;
  --border: #d2d6e0;
  --title: #a8760c;
  --text: #202430;
  --muted: #5a6070;
  --link: #125599;
  --hover: #f5f3ee;
  --accent: rgba(168, 118, 12, 0.1);
  --stage: #f7f4ee;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
header {
  padding: 1rem 1.5rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.site-logo { flex-shrink: 0; display: block; line-height: 0; text-decoration: none; }
.site-logo:hover { opacity: 0.88; text-decoration: none; }
.site-logo img { display: block; height: 72px; width: auto; }
.brand-copy { min-width: 0; }
.eyebrow {
  margin: 0 0 0.2rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--title);
}
header h1 {
  margin: 0 0 0.3rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--text);
}
header .lede {
  margin: 0;
  max-width: 46rem;
  font-size: 0.84rem;
  color: var(--muted);
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.7rem;
}
.header-links, .view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  align-items: center;
}
.header-links a, .view-nav a {
  display: inline-flex;
  align-items: center;
}
.view-nav {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}
.view-nav a {
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: var(--muted);
}
.view-nav a:hover { color: var(--text); text-decoration: none; background: var(--hover); }
.view-nav a.current {
  color: var(--title);
  background: var(--accent);
}
.gh-icon {
  display: inline-block;
  width: 0.92em;
  height: 0.92em;
  margin-right: 0.28em;
  vertical-align: -0.12em;
  background: currentColor;
  -webkit-mask: url("github-mark.svg") center / contain no-repeat;
  mask: url("github-mark.svg") center / contain no-repeat;
}
.theme-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  padding: 0.32rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}
.theme-btn:hover { color: var(--title); border-color: var(--title); }

.layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  min-height: calc(100vh - 11rem);
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  aside {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
    position: static;
  }
  .stage { min-height: 70vh; }
}
aside {
  padding: 1rem 0.95rem 1.5rem;
  border-right: 1px solid var(--border);
  background: var(--panel);
  overflow-y: auto;
  max-height: calc(100vh - 11rem);
  position: sticky;
  top: 0;
}
aside h2, .panel-kicker {
  margin: 0 0 0.55rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats {
  margin: 0 0 0.85rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}
.hint {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.filter-list, .hop-list, .pair-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.filter-list button, .hop-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  padding: 0.38rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}
.filter-list button:hover, .hop-list button:hover { background: var(--hover); }
.filter-list button.active, .hop-list button.active {
  background: var(--accent);
  color: var(--title);
}
.filter-list button.dim { color: var(--muted); opacity: 0.55; }
.swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-count, .count {
  margin-left: auto;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
}
.detail {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  background: var(--bg);
  margin-bottom: 0.85rem;
}
.detail h3 {
  margin: 0 0 0.25rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  font-weight: 500;
}
.detail .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  color: var(--title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}
.detail p {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.detail p:last-child { margin-bottom: 0; }
.detail .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
}
.pair-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.28rem 0;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.pair-list li:last-child { border-bottom: none; }

.stage {
  background: var(--stage);
  min-height: calc(100vh - 11rem);
  position: relative;
}
.stage svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}
.stage svg text { pointer-events: none; }
.stage-empty, .loading, .error {
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}
.error { color: #e48294; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  padding: 1.25rem 1.5rem 2.5rem;
}
.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
}
.card:hover {
  border-color: var(--title);
  text-decoration: none;
}
.card .shot {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--stage);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.card .shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.card .copy {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.45rem 1.5rem;
}
.card .kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--title);
  margin: 0 0 0.3rem;
}
.card h2 {
  margin: 0 0 0.65rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  font-weight: 500;
}
.card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
}
body.shot header,
body.shot aside {
  display: none !important;
}
body.shot .layout {
  grid-template-columns: 1fr;
  min-height: 100vh;
}
body.shot .stage {
  min-height: 100vh;
}

.trail-sentence {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--text);
}
.trail-sentence strong {
  color: var(--text);
  font-weight: 500;
}
.trail-sentence .verb {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--title);
}
.hop-list .verb {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--title);
}
.starters {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.starters button {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}
.starters button:hover { border-color: var(--title); }
.starters button.active { background: var(--accent); border-color: var(--title); }

.search {
  width: 100%;
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}
.search:focus {
  outline: 2px solid var(--title);
  outline-offset: 1px;
}
