/* ===========================================================================
   Mirage panel. Same language as the launcher: dusk over sand, one accent,
   hairlines instead of cards, Fraunces for anything that is a statement and
   JetBrains Mono for anything the server is telling you.

   Rules kept deliberately: no rounded corners, no drop shadows on content,
   no gradients on controls, no icon font, no second accent colour.
   =========================================================================== */

@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces144pt-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces144pt-LightItalic.ttf") format("truetype"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces144pt-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces144pt-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --bg:        #070812;
  --bg-lift:   #0C0D17;
  --ink:       #F4EEE4;
  --muted:     #8B879B;
  --faint:     #5A576A;
  --line:      rgba(244, 238, 228, 0.10);
  --line-mid:  rgba(244, 238, 228, 0.18);
  --line-hard: rgba(244, 238, 228, 0.30);
  --amber:     #F2A85C;
  --amber-hi:  #FFC07A;
  --ember:     #E2542E;
  --oasis:     #5ED3C1;
  --danger:    #E86A5C;

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: 28px;
  --col:    1120px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The one gradient on the site: a horizon sitting behind the masthead. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 420px;
  background:
    radial-gradient(900px 300px at 78% 100%, rgba(242, 168, 92, 0.13), transparent 70%),
    linear-gradient(to bottom, #05060F 0%, #0B0A1B 55%, var(--bg) 100%);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ layout */

.wrap { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.rule--hard { background: var(--line-mid); }

/* A rule that bleeds past the content column, the way a printed page does. */
.bleed { position: relative; }
.bleed::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 100vw; height: 1px;
  background: var(--line);
}

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

.masthead { padding: 26px 0 0; }
.masthead__inner { display: flex; align-items: baseline; gap: 20px; }

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 27px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.wordmark em { font-style: normal; color: var(--amber); }

.masthead__dash { width: 30px; height: 1px; background: var(--amber); flex: none; transform: translateY(-7px); }

.masthead__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .12s linear, border-color .12s linear;
}
.nav a:hover { color: var(--ink); }
.nav a.is-current { color: var(--ink); border-bottom-color: var(--amber); }
.nav__sep { width: 1px; height: 13px; background: var(--line-mid); }

.masthead__rule { margin-top: 22px; }

/* ------------------------------------------------------------------ page head */

.page { padding: 40px 0 0; }

.kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 12px;
}

h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
h1 em { font-style: italic; }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.2;
  margin: 0 0 12px;
}

h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}

.lede { color: var(--muted); font-size: 16px; max-width: 58ch; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Section label: mono caps with a rule running to the right edge. */
.label {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 38px 0 16px;
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------------ split */

.split { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 52px; align-items: start; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }

@media (max-width: 880px) {
  .split, .split--even { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  h1 { font-size: 34px; }
  :root { --gutter: 18px; }
}

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

/* Big number with a mono label above it, separated by hairlines. No cards. */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.figure { padding: 18px 20px 20px 0; border-right: 1px solid var(--line); }
.figure:last-child { border-right: 0; }
.figure__label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.figure__value { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.figure__value--amber { color: var(--amber); }
.figure__note { font-size: 12px; color: var(--faint); margin-top: 2px; }

@media (max-width: 620px) {
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure:nth-child(2) { border-right: 0; }
}

/* ------------------------------------------------------------------ status */

.status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.status__dot { width: 6px; height: 6px; background: var(--oasis); flex: none; }
.status--down .status__dot { background: var(--danger); }
.status b { color: var(--ink); font-weight: 500; }

/* ------------------------------------------------------------------ chart */

.chart { width: 100%; height: 120px; display: block; margin: 6px 0 0; }
.chart__line { fill: none; stroke: var(--amber); stroke-width: 1.5; }
.chart__area { fill: rgba(242, 168, 92, 0.10); stroke: none; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__label { font-family: var(--mono); font-size: 9px; fill: var(--faint); letter-spacing: 0.1em; }

/* ------------------------------------------------------------------ tables */

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

thead th {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  text-align: left;
  padding: 0 10px 9px 0;
  border-bottom: 1px solid var(--line-mid);
}
thead th.num, td.num { text-align: right; padding-right: 0; }

tbody td {
  padding: 11px 10px 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
tbody tr:hover td { background: rgba(244, 238, 228, 0.022); }

.num { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rank { font-family: var(--mono); font-size: 12px; color: var(--faint); width: 44px; }
.rank--top { color: var(--amber); }

.cname { font-family: var(--sans); font-weight: 500; font-size: 15px; }
.cname:hover { color: var(--amber); }
tbody tr:first-child .cname { font-size: 17px; }

.tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-mid);
  padding: 2px 6px;
  white-space: nowrap;
}
.tag--amber { color: var(--amber); border-color: rgba(242, 168, 92, 0.38); }
.tag--staff { color: var(--oasis); border-color: rgba(94, 211, 193, 0.38); }

/* ------------------------------------------------------------------ tabs */

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-mid); margin-bottom: 4px; }
.tabs a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 16px 10px 0;
  margin-right: 8px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a.is-current { color: var(--ink); border-bottom-color: var(--amber); }

/* ------------------------------------------------------------------ news */

.news__row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.news__date { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--amber); }
.news__title { font-weight: 500; font-size: 15px; }
.news__kind { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

/* ------------------------------------------------------------------ forms */

.form { max-width: 380px; }
.form--wide { max-width: 560px; }

.field { margin-bottom: 22px; }
.field > label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"], input[type="password"], input[type="email"], input[type="search"], select, textarea {
  width: 100%;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  border: 0;
  border-bottom: 1px solid var(--line-hard);
  border-radius: 0;
  padding: 8px 0;
  transition: border-color .12s linear;
}
input::placeholder, textarea::placeholder { color: rgba(139, 135, 155, 0.5); }
input:focus, select:focus, textarea:focus { border-bottom-color: var(--amber); outline: none; }
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
select { appearance: none; padding-right: 20px; }
select option { background: var(--bg-lift); color: var(--ink); }

.field__hint { font-size: 12px; color: var(--faint); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--amber);
  color: #1A1208;
  border: 1px solid var(--amber);
  border-radius: 0;
  padding: 13px 26px;
  cursor: pointer;
  transition: background .12s linear, border-color .12s linear;
}
.btn:hover { background: var(--amber-hi); border-color: var(--amber-hi); }
.btn:active { background: #C97A2E; border-color: #C97A2E; }
.btn[disabled] { opacity: .45; cursor: default; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-hard); }
.btn--ghost:hover { background: rgba(244, 238, 228, 0.05); border-color: var(--ink); }

.btn--wide { width: 100%; }

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

/* ------------------------------------------------------------------ messages */

.msg { border-left: 2px solid var(--line-hard); padding: 12px 0 12px 16px; margin: 0 0 22px; font-size: 14px; }
.msg--error { border-left-color: var(--danger); color: var(--ink); }
.msg--ok { border-left-color: var(--oasis); }
.msg--info { border-left-color: var(--amber); color: var(--muted); }

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

/* A bordered block used sparingly: the account sidebar and the download box. */
.block { border: 1px solid var(--line); padding: 22px 22px 24px; }
.block + .block { margin-top: 20px; }
.block__label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13.5px; }
.kv dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ profile */

.profile__name { font-family: var(--serif); font-weight: 300; font-size: 52px; line-height: 1; letter-spacing: -0.02em; margin: 0 0 12px; }
.profile__meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); margin-top: 8px; }
.stat { padding: 14px 12px 16px 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat__value { font-family: var(--serif); font-size: 26px; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }

@media (max-width: 620px) { .stats { grid-template-columns: repeat(3, 1fr); } }

/* ------------------------------------------------------------------ ticket thread */

.thread { border-top: 1px solid var(--line); }
.message { padding: 18px 0; border-bottom: 1px solid var(--line); }
.message__head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.message__who { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.message__who--staff { color: var(--amber); }
.message__when { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-left: auto; }
.message__body { white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; }

/* ------------------------------------------------------------------ footer */

.footer { margin-top: 72px; padding: 22px 0 46px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }
.footer__right { margin-left: auto; }

/* ------------------------------------------------------------------ misc */

.skip {
  position: absolute; left: -9999px;
}
.skip:focus { left: 16px; top: 12px; background: var(--amber); color: #1A1208; padding: 8px 14px; z-index: 10; }

.empty { color: var(--faint); font-size: 14px; padding: 22px 0; }

.spread { display: flex; align-items: baseline; gap: 16px; }
.spread > :last-child { margin-left: auto; }

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

/* Sign-out sits in the nav but must be a form post, so the button is styled as a link. */
.nav__logout { margin: 0; display: inline-flex; }
.nav__logout-btn {
  background: none; border: 0; padding: 0 0 3px; cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid transparent;
}
.nav__logout-btn:hover { color: var(--ink); }

/* Numbered steps on the download page: mono counters, hairline separators. */
.steps { list-style: none; counter-reset: s; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line); }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 13px 0 13px 42px;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 13px;
  font-family: var(--mono); font-size: 11px; color: var(--amber);
}
.steps em { font-style: normal; font-family: var(--mono); font-size: 13px; }

/* ------------------------------------------------------------------ fixes */

/* Stacked button groups need air between them. */
.actions + .actions { margin-top: 12px; }

/* Monospace cell that stays left aligned, unlike .num which is for figures. */
.mono-cell { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* Give data tables sensible column rhythm instead of letting content collide. */
td, th { padding-right: 18px; }
td:last-child, th:last-child { padding-right: 0; }

/* News inside the narrow rail stacks: date and kind on one line, headline below. */
.block .news__row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; }
.block .news__row:last-child { border-bottom: 0; padding-bottom: 0; }
.block .news__title { grid-column: 1 / -1; line-height: 1.4; }
.block .news__kind { text-align: right; }

/* A compact list for the rail: name on the left, one figure on the right. */
.mini { width: 100%; }
.mini td { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mini tr:last-child td { border-bottom: 0; }
.mini td:last-child { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.actions form { width: 100%; margin: 0; }

/* ------------------------------------------------------------------ activity */

.chart--tall { height: 150px; }
.chart__bar { fill: var(--amber); opacity: .65; }
.chart__bar:hover { opacity: 1; }

.daylist { margin-top: 14px; border-top: 1px solid var(--line); }
.daylist__row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.daylist__day { color: var(--ink); letter-spacing: .04em; }
.daylist__n { text-align: right; font-variant-numeric: tabular-nums; }

/* A live dot that breathes, used only where something is genuinely current. */
.pulse { position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border: 1px solid var(--oasis);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { opacity: .7; transform: scale(.6); }
  100% { opacity: 0;  transform: scale(1.6); }
}

/* Secondary filter row under the tabs. */
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px 0 2px; }
.filters a {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.filters a:hover { color: var(--ink); }
.filters a.is-current { color: var(--amber); border-bottom-color: var(--amber); }

/* Raw event rows in the staff area: dense, monospace, no decoration. */
.raw { font-family: var(--mono); font-size: 11px; }
.raw td { padding: 6px 14px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.raw .t { color: var(--amber); }
