/* Steady — design tokens & base styles.
 * Lifted from design/steady/styles.css (the design exploration). Kept in sync by
 * hand for now; the server-rendered templates use these tokens directly so the
 * shipped UI matches the design source of truth. */

:root {
  /* Light mode (default) */
  --bg: oklch(98% 0.008 80);
  --bg-sunken: oklch(96% 0.008 80);
  --surface: #ffffff;
  --surface-2: oklch(99% 0.005 80);
  --ink: oklch(20% 0.01 60);
  --ink-2: oklch(35% 0.01 60);
  --ink-muted: oklch(52% 0.01 60);
  --ink-faint: oklch(68% 0.008 60);
  --border: oklch(91% 0.006 80);
  --border-strong: oklch(85% 0.006 80);
  --hairline: oklch(94% 0.005 80);

  --accent: oklch(68% 0.16 145);          /* up / green */
  --accent-ink: oklch(35% 0.13 145);
  --accent-soft: oklch(94% 0.05 145);
  --down: oklch(62% 0.22 25);             /* down / red */
  --down-soft: oklch(94% 0.05 25);
  --warn: oklch(78% 0.16 75);             /* degraded / amber */
  --warn-soft: oklch(95% 0.06 75);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
}

[data-theme="dark"] {
  --bg: oklch(16% 0.008 60);
  --bg-sunken: oklch(13% 0.008 60);
  --surface: oklch(20% 0.008 60);
  --surface-2: oklch(23% 0.008 60);
  --ink: oklch(95% 0.005 80);
  --ink-2: oklch(82% 0.006 80);
  --ink-muted: oklch(65% 0.006 80);
  --ink-faint: oklch(48% 0.006 80);
  --border: oklch(28% 0.008 60);
  --border-strong: oklch(35% 0.008 60);
  --hairline: oklch(24% 0.008 60);

  --accent: oklch(75% 0.18 145);
  --accent-ink: oklch(85% 0.16 145);
  --accent-soft: oklch(30% 0.08 145);
  --down: oklch(70% 0.22 25);
  --down-soft: oklch(32% 0.1 25);
  --warn: oklch(82% 0.16 75);
  --warn-soft: oklch(32% 0.08 75);
}

html, body { margin: 0; padding: 0; min-height: 100%; }

.steady {
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
.steady * { box-sizing: border-box; }
.steady .mono { font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; }
.steady .serif { font-family: "Instrument Serif", "Iowan Old Style", Georgia, serif; font-style: normal; letter-spacing: -0.015em; }
.steady .display { font-family: "Instrument Serif", serif; font-weight: 400; letter-spacing: -0.02em; line-height: 1.02; }

/* Pulse animation for live status dot */
@keyframes steady-pulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}
.steady .pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.steady .pulse-dot::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: steady-pulse 2.2s ease-out infinite;
}
.steady .pulse-dot.down { background: var(--down); }
.steady .pulse-dot.down::after { background: var(--down); }
.steady .pulse-dot.warn { background: var(--warn); }
.steady .pulse-dot.warn::after { background: var(--warn); }

/* Sticker / chip */
.steady .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
  background: var(--bg-sunken); color: var(--ink-2);
  border: 1px solid var(--border);
}
.steady .chip.up    { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.steady .chip.down  { background: var(--down-soft);   color: var(--down);       border-color: transparent; }
.steady .chip.warn  { background: var(--warn-soft);   color: oklch(45% 0.14 65); border-color: transparent; }

.steady .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background .12s;
  text-decoration: none;
}
.steady .btn:hover { background: var(--bg-sunken); }
.steady .btn.primary {
  background: var(--ink); color: var(--bg);
  border-color: var(--ink);
}
.steady .btn.primary:hover { background: var(--ink-2); }
.steady .btn.ghost { background: transparent; border-color: transparent; }
.steady .btn.ghost:hover { background: var(--bg-sunken); }
.steady .btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }

.steady .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.steady a { color: inherit; text-decoration: none; }
.steady a.link { border-bottom: 1px solid var(--border-strong); }
.steady a.link:hover { border-bottom-color: var(--ink); }

.steady ::selection { background: oklch(68% 0.16 145 / 0.3); }

/* Tiny icon style consistent across screens */
.steady .ico {
  width: 16px; height: 16px; flex-shrink: 0;
  stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.steady .ico.lg { width: 20px; height: 20px; stroke-width: 1.5; }
.steady .ico.sm { width: 13px; height: 13px; }

/* Django messages framework — rendered as a stack of chips under the nav. */
.steady .messages { list-style: none; margin: 0; padding: 12px 64px 0; display: flex; flex-direction: column; gap: 8px; }
.steady .messages li { align-self: flex-start; }

/* Responsive: the landing uses generous desktop padding; tighten on narrow. */
@media (max-width: 720px) {
  .steady .messages { padding-left: 24px; padding-right: 24px; }
}
