/* ============================================================
   KG91 - shared design tokens + bottombar
   This file is the single source of truth for nav/status styling.
   Per-page CSS stays in each page for page-specific layout (drink
   cards, vim panes, recipes prose, etc).
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --fg: #e8e8e8;
  --muted: #888;
  --accent: #d4b894;
  --rule: #222;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

/* Leave room for the fixed bottombar so content isn't hidden. */
body { padding-bottom: calc(2.6rem + env(safe-area-inset-bottom, 0px)); }

/* ============================================================
   .bottombar - identical on every page.
   Fixed at the bottom, monospace, nav links on the left,
   :kg91:<page> status with blinking cursor on the right.
   ============================================================ */
/* Defensive: force every bottombar descendant to the same typography.
   The font stack is intentionally explicit for cross-platform parity:
   `ui-monospace` is a newer CSS keyword that resolves on iOS/macOS but
   not on all Android Chrome versions, so we list real font names too. */
.bottombar,
.bottombar * {
  font-family: ui-monospace, "SF Mono", "Roboto Mono", "Cascadia Mono", "Source Code Pro", Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

.bottombar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: #000;
  border-top: 1px solid #222;
  /* mobile safe-area: respect home-indicator / gesture bar */
  padding: 0.5rem 1rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  color: #888;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  white-space: nowrap;
}

.bottombar__nav a {
  color: #888;
  text-decoration: none;
}
.bottombar__nav a:hover { color: #fff; }
.bottombar__nav a + a::before {
  content: "·";
  margin: 0 0.55em;
  opacity: 0.5;
}
.bottombar__nav a[aria-current="page"] {
  color: #fff;
  font-weight: 600;
}
/* Blinking cursor sits on the active nav link, vim-buffer style. */
.bottombar__nav a[aria-current="page"]::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  background: currentColor;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: bottombar-blink 1s steps(1) infinite;
}

.bottombar__status {
  color: #888;
  flex-shrink: 0;
}
/* On narrow phones the full nav + :kg91:<page> overflows horizontally
   and the right-side cursor gets clipped. Hide status, give nav the
   space; the active-link cursor still lives in view. */
@media (max-width: 600px) {
  .bottombar { gap: 0.5rem; padding-left: 0.75rem; padding-right: 0.75rem; }
  .bottombar__status { display: none; }
  .bottombar__nav a + a::before { margin: 0 0.4em; }
}
.bottombar__cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  background: #ccc;
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: bottombar-blink 1s steps(1) infinite;
}
@keyframes bottombar-blink { 50% { opacity: 0; } }

/* Reusable blinking cursor for anywhere on the site.
   Inherits color via currentColor, so on a muted label it blinks muted,
   on an accent label it blinks gold. Drop a <span class="cursor"></span>
   wherever you want the terminal-prompt feel. */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  background: currentColor;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: bottombar-blink 1s steps(1) infinite;
}
