/* Kitchen Brigade — midnight kitchen theme */
:root {
  --bg: #101014;
  --surface: #17181d;
  --surface-2: #1d1e25;
  --border: #26272e;
  --text: #f2ede4;
  --muted: #a8a29a;
  --accent: #e0992f;
  --accent-soft: rgba(224, 153, 47, 0.12);
  --green: #4ade80;
  --red: #f87171;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem 2rem;
  background: rgba(16, 16, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: var(--accent); color: #101014;
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem;
  display: grid; place-items: center; line-height: 1;
}
.brand-name { font-weight: 600; letter-spacing: 0.01em; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.3rem 0.85rem; color: var(--muted);
  white-space: nowrap;
}
.status-pill .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--muted); }
.status-pill.ok { color: var(--green); border-color: rgba(74, 222, 128, 0.35); }
.status-pill.ok .dot { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, 0.8); }
.status-pill.down { color: var(--red); border-color: rgba(248, 113, 113, 0.35); }
.status-pill.down .dot { background: var(--red); }

/* ---------- layout ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0 1rem; }
.eyebrow {
  color: var(--accent); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.8rem;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 2.4rem; margin-bottom: 0.7rem; }
.section-sub { color: var(--muted); max-width: 620px; margin-bottom: 2.5rem; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { padding: 6rem 0 4rem; }
.hero h1 { font-size: clamp(3rem, 7vw, 5rem); margin: 0.6rem 0 1.4rem; }
.lede { font-size: 1.25rem; color: var(--muted); max-width: 640px; }
.lede strong { color: var(--accent); }
.hero-cta { display: flex; gap: 1rem; margin: 2.2rem 0 3.5rem; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 0.8rem 1.6rem; border-radius: 0.6rem; font-size: 1rem;
}
.btn-primary { background: var(--accent); color: #101014; }
.btn-primary:hover { background: #f0aa45; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  border-top: 1px solid var(--border); padding-top: 2rem;
}
.stats div { display: flex; flex-direction: column; gap: 0.25rem; }
.stats dt { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; order: 2; }
.stats dd { font-family: var(--serif); font-size: 2rem; font-weight: 600; order: 1; }
.stats dd.accent { color: var(--accent); }

/* ---------- crew cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 1rem; padding: 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(224, 153, 47, 0.45); transform: translateY(-2px); }
.card-role { color: var(--accent); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.card h3 { font-size: 1.6rem; margin-bottom: 0.7rem; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card-foot { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
.card-foot::before { content: "◆ "; color: var(--accent); font-size: 0.7rem; }

/* ---------- timeline ---------- */
.timeline { list-style: none; border-left: 2px solid var(--border); margin-left: 0.5rem; }
.timeline li { position: relative; padding: 0 0 2.2rem 2.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: -0.55rem; top: 0.35rem;
  width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline li:last-child::before { background: var(--accent); }
.t-time {
  font-family: var(--mono); font-size: 0.85rem; color: var(--accent);
  display: inline-block; margin-bottom: 0.3rem;
}
.timeline h4 { font-size: 1.25rem; margin-bottom: 0.35rem; font-family: var(--sans); font-weight: 600; }
.timeline p { color: var(--muted); max-width: 640px; }

/* ---------- brief ---------- */
.brief-date { color: var(--accent); font-size: 1.4rem; }
.brief-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 1rem; padding: 2.5rem; overflow-x: auto;
}
.brief-body h1 { font-size: 1.5rem; margin-bottom: 1.2rem; }
.brief-body h2 { font-size: 1.3rem; margin: 1.8rem 0 0.9rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.brief-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.brief-body p, .brief-body li { color: #d8d2c6; font-size: 0.98rem; }
.brief-body ol, .brief-body ul { padding-left: 1.4rem; margin: 0.6rem 0 1rem; }
.brief-body li { margin-bottom: 0.9rem; }
.brief-body a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted rgba(224,153,47,.5); }
.brief-body a:hover { border-bottom-style: solid; }
.brief-body em { color: var(--muted); }
.brief-body table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.92rem; }
.brief-body th, .brief-body td { text-align: left; padding: 0.7rem 0.9rem; border: 1px solid var(--border); vertical-align: top; }
.brief-body th { background: var(--surface-2); font-weight: 600; }
.brief-body td { color: #d8d2c6; }
.loading { color: var(--muted); font-style: italic; }

/* ---------- stack ---------- */
.stack-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.stack-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.stack-table th, .stack-table td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
.stack-table th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stack-table td.num, .stack-table th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.stack-table tr.total td { border-bottom: none; font-weight: 700; font-size: 1.05rem; }
.stack-table tr.total td.num { color: var(--accent); font-size: 1.2rem; }

.ops h4 { font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 0.9rem; }
.ops h4:not(:first-child) { margin-top: 2rem; }
.ops ul { list-style: none; }
.ops ul li { padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; color: var(--muted); }
.ops ul li strong { color: var(--text); font-weight: 600; }
.ops code { font-family: var(--mono); font-size: 0.85rem; background: var(--surface-2); padding: 0.15rem 0.45rem; border-radius: 0.3rem; color: var(--accent); }
.live div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.live dt { color: var(--muted); }
.live dd { font-weight: 600; text-align: right; }
.live dd.up { color: var(--green); }
.live dd.down { color: var(--red); }

/* ---------- footer ---------- */
footer {
  max-width: 1080px; margin: 5rem auto 0; padding: 2.5rem 2rem 3rem;
  border-top: 1px solid var(--border); font-size: 0.95rem;
}
footer .muted { color: var(--muted); margin-top: 0.4rem; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .status-pill { margin-left: auto; }
  .cards, .stack-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .brief-card { padding: 1.4rem; }
  main { padding: 0 1.25rem; }
  .section { padding: 3.5rem 0 0.5rem; }
}
