@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --ink:#0B0D10;
  --panel:#14171C;
  --panel-raised:#1B1F26;
  --hairline:#2A2F38;
  --gold:#C9A227;
  --gold-dim:#7A6420;
  --oxblood:#8C1F28;
  --legion-green:#4F7942;
  --parchment:#EDE7D9;
  --muted:#8B8F97;
  --faint:#5A5E66;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--parchment);
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.72), var(--ink) 32rem),
    radial-gradient(circle at 16% 0%, rgba(201, 162, 39, 0.14), transparent 28rem),
    var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--hairline);
  background: rgba(11, 13, 16, 0.86);
}

.topbar .shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--parchment);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  color: var(--gold);
  background: linear-gradient(145deg, var(--panel-raised), var(--panel));
  font-family: Cinzel, serif;
  font-weight: 700;
}

.brand-title,
h1,
h2,
h3 {
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.nav button,
.button,
button {
  min-height: 40px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--parchment);
  background: var(--panel);
  font: 600 0.9rem Inter, sans-serif;
  cursor: pointer;
}

.nav a.active,
.button.primary,
button.primary {
  border-color: var(--gold-dim);
  color: var(--ink);
  background: var(--gold);
}

.page {
  padding: 48px 0 64px;
}

.hero {
  min-height: 420px;
  display: grid;
  align-items: end;
  padding: 48px 0;
}

.hero h1,
.page-title {
  max-width: 880px;
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 5.4rem);
  line-height: 0.95;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.card {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.panel.raised,
.card.raised {
  background: var(--panel-raised);
}

.metric {
  font-family: "JetBrains Mono", monospace;
  color: var(--gold);
  font-size: 1.6rem;
  font-weight: 700;
}

.muted,
.help {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--parchment);
  background: rgba(255, 255, 255, 0.03);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.status.good {
  border-color: rgba(79, 121, 66, 0.8);
  color: #BDE3B3;
}

.status.warn {
  border-color: rgba(201, 162, 39, 0.7);
  color: var(--gold);
}

.status.bad {
  border-color: rgba(140, 31, 40, 0.8);
  color: #F4A6AD;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--parchment);
  background: #0F1115;
  font: 500 0.96rem Inter, sans-serif;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  border-bottom: 1px solid var(--hairline);
  padding: 12px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

.stack {
  display: grid;
  gap: 18px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notice {
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  padding: 14px;
  color: var(--parchment);
  background: rgba(201, 162, 39, 0.08);
}

.danger {
  border-color: rgba(140, 31, 40, 0.85);
  background: rgba(140, 31, 40, 0.12);
}

.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.86rem;
  background: rgba(11, 13, 16, 0.72);
}

.footer .shell {
  display: grid;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .topbar .shell {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 360px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
