:root {
  /* Origin RP brand */
  --ink: #010203;
  --panel: #120406;
  --raise: #1C0709;
  --line: #3A0F12;
  --edge: #250A0C;
  --text: #F2E9EA;
  --muted: #9C8285;

  --brand: #F9171B;
  --brand-deep: #8B0405;

  /* Red is both the brand and the alarm, so other states stay well clear of it. */
  --live: #3FBF8F;
  --leaving: #E8A33C;
  --failing: #B98AE8;
  --gone: #F9171B;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--brand); }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #1A0507 0%, var(--ink) 100%);
  position: sticky;
  top: 0;
  z-index: 20;
}

.masthead .wrap {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.masthead .logo { height: 28px; width: auto; display: block; }

.masthead .role {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.masthead .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.masthead .meta a { color: var(--muted); text-decoration: none; }
.masthead .meta a:hover { color: var(--brand); }

/* ---------- renewal runway ---------- */

.runway {
  margin: 28px 0 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  padding: 20px 24px 12px;
}

.runway header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin: 0;
}

.runway .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.track {
  position: relative;
  height: 74px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.track .rule {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.track .week {
  position: absolute;
  top: 22px;
  width: 1px;
  height: 9px;
  background: var(--line);
}

.track .week span {
  position: absolute;
  top: 14px;
  left: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.pip {
  position: absolute;
  top: 24px;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: var(--live);
  border: 2px solid var(--ink);
  cursor: default;
  transition: transform 120ms ease;
}

.pip:hover, .pip:focus-visible { transform: scale(1.45); outline: none; }
.pip.leaving { background: var(--leaving); }
.pip.failing { background: var(--failing); }

.pip .tip {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 9px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 5;
}

.pip .tip b { font-family: var(--mono); color: var(--brand); font-weight: 500; }
.pip:hover .tip, .pip:focus-visible .tip { opacity: 1; }

.runway .empty {
  font-size: 13px;
  color: var(--muted);
  padding: 24px 0;
}

/* ---------- figures ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 32px;
}

.figure { background: var(--panel); padding: 18px 20px; }

.figure dt {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
}

.figure dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.figure .sub {
  font-family: var(--body);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- panels ---------- */

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  margin-bottom: 24px;
  overflow: hidden;
}

.panel > header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.panel > header .eyebrow { color: var(--text); }
.panel > header .count { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.panel .empty { padding: 22px 20px; color: var(--muted); font-size: 13px; }

.scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

.scroll table { min-width: 640px; }

th {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--edge);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--raise); }

.who { font-weight: 500; }
.who small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }

.num, .ref, .date { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.ref { color: var(--muted); font-size: 11px; }
.date small { display: block; color: var(--muted); font-size: 10px; }

.tag {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid;
  white-space: nowrap;
}

.tag.live { color: var(--live); border-color: rgba(63, 191, 143, 0.45); }
.tag.leaving { color: var(--leaving); border-color: rgba(232, 163, 60, 0.45); }
.tag.gone { color: var(--gone); border-color: rgba(249, 23, 27, 0.5); }
.tag.chasing { color: var(--failing); border-color: rgba(185, 138, 232, 0.45); }
.tag.quiet { color: var(--muted); border-color: var(--line); }

/* ---------- search ---------- */

.search { display: flex; gap: 8px; }

.search input {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--body);
  font-size: 13px;
  padding: 7px 11px;
  min-width: 220px;
}

.search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.search input::placeholder { color: var(--muted); }

.search button {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
}

.search button:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- sign in ---------- */

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("brand/backdrop.jpg") center / cover no-repeat;
  transform: scale(1.05);
}

.gate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(1, 2, 3, 0.32) 0%, rgba(1, 2, 3, 0.82) 66%, var(--ink) 100%);
}

.gate .card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(9, 3, 4, 0.9);
  padding: 40px 34px;
  text-align: center;
}

.gate .logo { width: 210px; max-width: 100%; height: auto; margin: 0 auto 22px; display: block; }

.gate p { color: var(--muted); margin: 0 0 26px; }

.gate .go {
  display: block;
  text-decoration: none;
  background: var(--brand);
  color: #ffffff;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 15px;
  padding: 12px;
  border-radius: 3px;
  border: 1px solid var(--brand);
}

.gate .go:hover { background: var(--brand-deep); }
.gate .go:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.gate .note {
  font-size: 12px;
  color: var(--muted);
  margin: 22px 0 0;
}

.alert {
  border: 1px solid rgba(249, 23, 27, 0.5);
  border-left-width: 3px;
  border-radius: 3px;
  background: rgba(139, 4, 5, 0.22);
  color: var(--text);
  font-size: 13px;
  padding: 11px 14px;
  margin-bottom: 22px;
  text-align: left;
}

@media (max-width: 1000px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .figures { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .wrap { padding: 0 14px 48px; }
  .figures { grid-template-columns: 1fr; }
  .masthead .logo { height: 22px; }
  .masthead .role { display: none; }
  .masthead .meta { margin-left: auto; gap: 12px; }
  .panel > header { flex-wrap: wrap; }
  .search { width: 100%; }
  .search input { min-width: 0; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
