@font-face{font-family:Cinzel;src:url("cinzel.woff2") format("woff2");font-style:normal;font-weight:400 800;font-display:swap}
@font-face{font-family:"DM Sans";src:url("dm-sans.woff2") format("woff2");font-style:normal;font-weight:400 700;font-display:swap}

:root {
  color-scheme: light;
  --forest: #182c25;
  --deep: #14251f;
  --jade: #365e4c;
  --jade-dark: #265340;
  --gold: #edc488;
  --paper: #f1eee6;
  --card: #fcfaf4;
  --ink: #202c25;
  --muted: #59645b;
  --line: #dddcd0;
  --serif: Cinzel, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 .9375rem/1.5 var(--sans); }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2 { line-height: 1.13; }
h1 { font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 3.15rem); letter-spacing: -.04em; }
h2 { font-size: 1.18rem; font-weight: 700; letter-spacing: -.035em; }
p, small { color: var(--muted); }
small { font-size: .8rem; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #895823; outline-offset: 3px; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 5; inline-size: auto; block-size: auto; clip-path: none; padding: .75rem; background: white; color: var(--ink); }
.wrap { overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .84rem; }
.date { white-space: nowrap; font-variant-numeric: tabular-nums; }

.shell { display: grid; grid-template-columns: 234px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2.7rem;
  padding: 1.7rem 1rem .9rem; background: var(--deep); color: #edf0df;
  border-right: 1px solid #2a473a;
}
.brand { display: flex; gap: .8rem; align-items: center; text-decoration: none; margin-inline: .55rem; }
.brand b, .login-art-brand { display: block; font: 700 1.5rem/1.14 var(--serif); letter-spacing: .085em; }
.brand small, .sidebar-account small { display: block; margin-top: .17rem; color: #adbcab; }
.crest {
  display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; flex: 0 0 auto;
  border: 1px solid var(--gold); color: var(--gold); transform: rotate(45deg); margin: .27rem;
}
.crest::before { content: ""; width: .77rem; height: .77rem; border: 1px solid currentColor; background: #edc48833; }
.sidebar nav { display: grid; gap: .27rem; }
.sidebar nav a {
  display: flex; align-items: center; gap: .72rem; min-height: 2.8rem; padding: .55rem .75rem;
  text-decoration: none; border: 1px solid transparent; border-radius: .35rem; color: #c4d0c0; font-weight: 500;
}
.sidebar nav a:hover { background: #ffffff12; }
.sidebar nav a[aria-current="page"] { background: #334c3d; border-color: #50604b; color: #fff2d4; }
.sidebar :focus-visible, .overview-hero :focus-visible { outline-color: var(--gold); }
.nav-icon { display: inline-grid; position: relative; place-items: center; width: 1.12em; height: 1.12em; flex: 0 0 auto; }
.nav-icon::before { content: ""; display: block; width: .75em; height: .75em; border: 1.4px solid currentColor; border-radius: .08em; }
.nav-icon.overview::before { transform: rotate(45deg); width: .63em; height: .63em; box-shadow: inset 0 0 0 .15em transparent; }
.nav-icon.overview::after { content: ""; position: absolute; width: .22em; height: .22em; background: currentColor; transform: rotate(45deg); }
.nav-icon.subscribers::before { width: .94em; height: .66em; }
.nav-icon.subscribers::after { content: ""; position: absolute; width: .42em; height: .42em; transform: translateY(-.12em) rotate(45deg); border-bottom: 1px solid; border-right: 1px solid; }
.nav-icon.games::before { transform: rotate(45deg); width: .67em; height: .67em; }
.nav-icon.games::after { content: "×"; position: absolute; font-weight: 700; font-size: .74em; line-height: 1; }
.nav-icon.players::before { width: .4em; height: .4em; transform: translateY(-.25em); border-radius: 50%; }
.nav-icon.players::after { content: ""; position: absolute; width: .78em; height: .36em; border: 1.4px solid; border-radius: .6em .6em .1em .1em; bottom: .13em; }
.nav-icon.matchmaking::before { width: .91em; height: .68em; border-block: 1.4px solid; border-inline: 0; }
.nav-icon.matchmaking::after { content: ""; position: absolute; width: .64em; height: 1px; background: currentColor; left: .1em; }
.nav-icon.database::before { border-radius: 48% / 21%; }
.nav-icon.database::after { content: ""; position: absolute; width: .75em; height: .31em; border-top: 1px solid; border-bottom: 1px solid; border-radius: 50%; top: .29em; }
.sidebar-account {
  margin-top: auto; padding: .9rem .18rem .25rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: .5rem; border-top: 1px solid #ffffff22; font-size: .88rem;
}
.avatar { display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; border: 1px solid #b19061; border-radius: 50%; color: var(--gold); font-weight: 700; }
.sign-out { border: 0; background: transparent; color: #dbe4d6; padding: .37rem .18rem; font-size: .75rem; text-decoration: underline; text-underline-offset: .19em; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  min-height: 63px; padding: .75rem clamp(1rem, 3vw, 2.8rem); background: #faf8f1; border-bottom: 1px solid var(--line);
  font-size: .87rem;
}
.topbar-brand { font-weight: 700; }
.topbar-slash { color: #848d81; margin-inline: .55rem; }
.topbar a { flex-shrink: 0; color: var(--jade-dark); font-weight: 700; text-decoration: none; }
.topbar a:hover, .table-link:hover, .text-link:hover { text-decoration: underline; text-underline-offset: .19em; }
.content { width: min(100%, 1530px); min-width: 0; margin: auto; padding: clamp(1rem, 3vw, 2.8rem); }
.content > * + * { margin-top: 1.35rem; }

.overview-hero {
  position: relative; isolation: isolate; min-height: 230px; display: flex; align-items: center; padding: clamp(1.35rem, 3.5vw, 2.65rem);
  color: #fcf3e1; border: 1px solid #637759; border-radius: .55rem; overflow: hidden;
  background: linear-gradient(92deg,#162d24 3%,#182c25ed 33%,#1b2b2466 68%,#182d2429), url("frontier-at-dusk.webp") center 48% / cover;
}
.overview-hero::after { content: ""; pointer-events: none; position: absolute; inset: 7px; border: 1px solid #edc4885c; border-radius: .26rem; z-index: -1; }
.overview-hero h1 { margin-top: .6rem; }
.overview-hero p { color: #e2e8d8; margin-top: .36rem; }
.overview-hero .status { color: #f0f5e5; background: #1a2f26; border-color: #677f69; }
.overview-hero .status-warning { color: #ffe1aa; border-color: #bf9566; }
.overview-hero a { display: inline-flex; gap: .55rem; margin-top: 1.05rem; color: var(--gold); font-weight: 700; text-decoration: none; }
.overview-hero a:hover { text-decoration: underline; }

.card { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: .55rem; box-shadow: 0 1px 2px #21281e08; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .85rem; }
.metric {
  display: grid; justify-items: start; align-content: start; gap: .16rem; padding: 1rem 1.05rem 1.1rem;
  color: var(--ink); text-decoration: none;
}
.metric:hover { border-color: var(--jade); box-shadow: 0 3px 8px #182e2510; }
.metric-top { display: flex; justify-content: space-between; align-items: center; width: 100%; color: var(--jade-dark); }
.metric-icon { width: 1.8rem; height: 1.8rem; background: #e5ebdf; border-radius: .32rem; }
.metric-value { font-size: 2.25rem; line-height: 1.18; letter-spacing: -.055em; font-weight: 650; font-variant-numeric: tabular-nums; }
.metric-name { font-weight: 700; }
.metric small { line-height: 1.4; }

.overview-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: .9rem; }
.chart-card, .compact-card, .source-card, .detail-section { padding: 1.15rem 1.25rem; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem 1rem; flex-wrap: wrap; }
.section-heading p, .page-heading p { margin-top: .34rem; font-size: .87rem; }
.card-heading { padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line); }
.text-link, .table-link, .back-link { color: var(--jade-dark); text-decoration: none; font-weight: 700; }
.text-link, .back-link { font-size: .88rem; }
.back-link { display: inline-block; }
.chart {
  list-style: none; display: grid; grid-template-columns: repeat(14, minmax(0,1fr)); padding: 0 .25rem;
  margin: .95rem 0 0; gap: clamp(.075rem,.65vw,.48rem);
}
.chart li { display: grid; grid-template-rows: 105px auto; justify-items: center; }
.bar-wrap {
  height: 100%; width: 100%; display: grid; grid-template-rows: repeat(12,minmax(0,1fr)); align-items: stretch;
  background: linear-gradient(#dfe3d7 1px, transparent 1px) 0 0 / 100% 25%; border-bottom: 1px solid #b3bfae;
}
.bar { border-radius: .26rem .26rem 0 0; background: var(--jade); grid-row-end: 13; }
.bar.level-0 { align-self: end; height: 2px; background: #a3ae9d; grid-row-start: 12; }
.level-1{grid-row-start:12}.level-2{grid-row-start:11}.level-3{grid-row-start:10}.level-4{grid-row-start:9}
.level-5{grid-row-start:8}.level-6{grid-row-start:7}.level-7{grid-row-start:6}.level-8{grid-row-start:5}
.level-9{grid-row-start:4}.level-10{grid-row-start:3}.level-11{grid-row-start:2}.level-12{grid-row-start:1}
.tick { color: var(--muted); font-size: .72rem; margin-top: .22rem; font-variant-numeric: tabular-nums; }
.chart-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: .76rem; margin-top: .65rem; }
.event-list { padding: 0; margin: .7rem 0 0; list-style: none; }
.event-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .52rem 0; border-top: 1px solid var(--line); }
.event-list li div { min-width: 0; }
.event-list strong, .event-list small { display: block; overflow-wrap: anywhere; }
.event-dot { flex: 0 0 auto; width: .43rem; height: .43rem; background: #688b70; transform: rotate(45deg); margin-top: .46rem; }

.status { display: inline-flex; width: max-content; max-width: 100%; align-items: center; gap: .38rem; padding: .16rem .53rem; border: 1px solid #d8d4c9; border-radius: 99px; background: #eeece3; color: #535c52; font-size: .76rem; line-height: 1.5; font-weight: 700; white-space: nowrap; }
.status > span { width: .39rem; height: .39rem; border-radius: 50%; background: #899283; }
.status-good { background: #e4eee1; border-color: #d4e0ce; color: #2b553c; }
.status-good > span { background: #60946c; }
.status-warning { background: #f5eadb; border-color: #e8d8bc; color: #76491d; }
.status-warning > span { background: #ac7241; }
.status:focus-visible { outline-offset: .3rem; }

.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .8rem 1rem; min-width: 0; }
.table-wrap { overflow-x: auto; }
.table-wrap:focus-visible { outline-offset: -2px; }
table { border-collapse: collapse; width: 100%; text-align: left; }
thead { background: #f1f0e7; }
th, td { vertical-align: top; padding: .72rem 1.15rem; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .035em; white-space: nowrap; }
tbody th { font-weight: 650; }
tbody tr:last-child :is(th,td) { border-bottom: 0; }
tbody tr:hover { background: #f5f4eb; }
td small, th small { display: block; margin-top: .15rem; }
.filters, .pagination {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: .65rem;
  padding: .86rem 1.12rem; border-bottom: 1px solid var(--line);
}
.filters label, .login-box label { display: grid; gap: .28rem; font-weight: 650; font-size: .86rem; }
.filters label:first-child { flex: 1 1 15rem; max-width: 25rem; }
input:not([type=hidden]), select { color: var(--ink); background: #fffefa; border: 1px solid #c2c9ba; border-radius: .28rem; padding: .48rem .62rem; min-height: 2.58rem; min-width: 0; }
input::placeholder { color: #677267; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.58rem;
  border: 1px solid transparent; border-radius: .28rem; padding: .48rem .75rem; font-weight: 700; text-decoration: none; font-size: .86rem;
}
.button-primary { background: var(--jade-dark); color: white; border-color: var(--jade-dark); }
.button-primary:hover { background: #163e2d; }
.button-outline { border-color: #7d9283; color: var(--jade-dark); background: var(--card); }
.button-quiet { color: var(--jade-dark); background: transparent; }
.button-outline:hover, .button-quiet:hover { background: #e7ece2; }
.pagination { justify-content: space-between; align-items: center; border-bottom: none; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.pagination > div { display: flex; align-items: center; gap: .35rem; }
.pagination .button { min-height: 2.1rem; }
.empty { min-height: 130px; display: grid; align-content: center; justify-items: center; gap: .34rem; padding: 1.5rem .9rem; text-align: center; }
.empty-mark { display: block; width: .7rem; height: .7rem; border: 1px solid var(--jade); transform: rotate(45deg); margin-bottom: .2rem; }
.empty p, .footnote { font-size: .85rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 13rem),1fr)); gap: .9rem 1.2rem; padding-block: .9rem .5rem; }
.facts dt { font-size: .78rem; font-weight: 600; color: var(--muted); }
.facts dd { margin-top: .2rem; }
.source-card > p, .detail-section > p { margin-top: .6rem; }
.source-card > a, .detail-section > a { display: inline-block; margin-top: .45rem; }

.guest { min-height: 100vh; }
.login-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); min-height: 100vh; }
.login-art {
  position: relative; display: flex; align-items: flex-end; padding: 3.2rem; color: #fff1d8;
  background: linear-gradient(10deg,#142b21e6, #182c2512 55%), url("frontier-at-dusk.webp") center / cover;
}
.login-art::after { content: ""; pointer-events: none; position: absolute; inset: 16px; border: 1px solid #eac58978; }
.login-art-brand { display: flex; align-items: center; gap: .75rem; font-size: 2rem; }
.login-section { display: grid; place-items: center; padding: 2rem; }
.login-box { width: min(25rem,100%); }
.wordmark { display: inline-flex; gap: .45rem; align-items: baseline; font: 700 1.33rem var(--serif); color: var(--jade-dark); margin-bottom: 1.85rem; }
.wordmark small { color: var(--jade-dark); font: 650 .82rem var(--sans); }
.login-box h1 { font-size: clamp(2rem,4vw,3.2rem); margin-bottom: .6rem; }
.login-box form { display: grid; gap: .86rem; margin-block: 1.25rem; }
.login-box .button { justify-content: space-between; }
.login-back { color: var(--jade-dark); font-weight: 700; font-size: .84rem; }
.form-error { padding: .64rem; margin-top: .9rem; border: 1px solid #e3baa0; background: #fff1e9; color: #742f1e; }
.guest-error { padding: 2rem; }

@media(max-width: 1000px) {
  .shell { grid-template-columns: 190px minmax(0,1fr); }
  .sidebar-account { grid-template-columns: auto 1fr; }
  .sidebar-account form { grid-column: 2; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .7rem .72rem .5rem; }
  .brand { margin: 0; }.brand b{font-size:1.15rem}
  .brand .crest { width: 1.35rem; height: 1.35rem; }
  .sidebar-account { grid-column: 2; grid-row: 1; display: flex; padding: 0; border: 0; }
  .sidebar-account .avatar, .sidebar-account > span:nth-child(2) { display: none; }
  .sidebar nav { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: .24rem .13rem; }
  .sidebar nav a { white-space: nowrap; min-height: 2.2rem; padding: .32rem .56rem; gap: .4rem; font-size: .81rem; }
  .topbar { min-height: 44px; padding: .5rem .9rem; font-size: .78rem; }
  .topbar-brand, .topbar-slash { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .overview-hero { min-height: 185px; background-position: center, 65% 48%; }
  .content > * + * { margin-top: .92rem; }
  .login-layout { grid-template-columns: 1fr; grid-template-rows: minmax(9rem,28vh) auto; }
  .login-art { padding: 1.65rem; }
  .login-section { padding: 1.7rem; }
  .wordmark { margin-bottom: .8rem; }
}
@media(max-width: 380px) {
  .sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .content { padding-inline: .65rem; }
  .metric-grid { gap: .52rem; }
  .metric { padding: .71rem; }
  .chart-card, .compact-card, .card-heading, .source-card { padding-inline: .85rem; }
}
