@font-face {
  font-family: Archivo;
  src: url("/assets/brand/archivo-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --bg-2: #101014;
  --surface: #17171d;
  --text: #f4f4f6;
  --muted: #a6a6b2;
  --line: rgba(255,255,255,.09);
  --control-line: #5d5d68;
  --orange: #ff5517;
  --amber: #ff8a1f;
  --grad: linear-gradient(100deg,#ff5517 0%,#ff8a1f 55%,#ffb347 100%);
  --radius: 18px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --font: Archivo,system-ui,-apple-system,"Segoe UI Variable","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse 760px 430px at 88% -130px,#351609 15%,transparent 86%),var(--bg);
  color: var(--text);
  font: 400 .94rem/1.5 var(--font);
}
.signed-in { display: grid; grid-template-columns: 220px minmax(0,1fr); min-height: 100vh; }
.main { width: 100%; max-width: 1540px; margin: 0 auto; padding: 38px clamp(18px,3vw,46px) 60px; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 3; transform: translateY(-200%); background: var(--surface); padding: 10px; }
.skip:focus { transform: none; }
a { color: var(--amber); text-decoration-thickness: .075em; text-underline-offset: .23em; }
a:hover { color: #ffb347; }
:focus-visible { outline: 2px solid #ffb347; outline-offset: 3px; }
svg { inline-size: 19px; block-size: 19px; flex: none; vertical-align: middle; }
h1,h2,h3,p,dl { margin: 0; }
h1 { font-size: clamp(2rem,4vw,3.55rem); font-weight: 900; line-height: 1.05; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: 1.08rem; line-height: 1.23; font-weight: 850; }
h3 { font-size: .99rem; font-weight: 750; }
small,.muted { color: var(--muted); }
small { display: block; font-size: .8rem; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 23px 15px; border-right: 1px solid var(--line); background: var(--bg-2); z-index: 1; }
.brand { display: inline-flex; gap: 10px; align-items: center; padding: 2px 6px; color: var(--text); text-decoration: none; line-height: 1.1; }
.brand img { display: block; object-fit: contain; }
.brand strong { display: block; font-size: 1.18rem; font-weight: 900; letter-spacing: -.02em; }
.brand small { color: var(--amber); font-size: .67rem; font-weight: 800; letter-spacing: .16em; margin-top: 4px; }
nav { display: grid; gap: 5px; margin-top: 34px; }
nav a,.nav-button { display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 12px; min-height: 44px; padding: 10px 12px; color: var(--muted); background: transparent; text-decoration: none; text-align: left; }
nav a:hover,.nav-button:hover { color: var(--text); background: var(--surface); }
nav a[aria-current] { color: #ffad68; border-color: #833921; background: #28170f; }
.logout { margin-top: auto; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 0 0 26px; }
.page-heading p { color: var(--muted); margin-top: 8px; }
.panel,.tile { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.panel { padding: clamp(16px,2.1vw,25px); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-heading a { flex-shrink: 0; font-size: .84rem; }
.panel-heading a svg { width: 15px; }
.summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(168px,1fr)); gap: 12px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; align-items: start; gap: 4px; padding: 15px; text-decoration: none; color: var(--muted); transition: border-color .2s var(--ease),transform .2s var(--ease); }
.tile:hover { border-color: #b3532a; transform: translateY(-2px); color: var(--text); }
.tile strong { color: var(--text); font-size: 1.8rem; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1.3; }
.metric-icon { display: grid; place-items: center; background: #361c12; color: #ffab66; border-radius: 9px; width: 34px; height: 34px; margin-bottom: 4px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.detail-grid { grid-template-columns: minmax(0,1.55fr) minmax(260px,1fr); align-items: start; }
.settings-grid { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); align-items: start; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; overflow-wrap: anywhere; }
.rows li:first-child { border-top: 0; }
.rows li:last-child { padding-bottom: 0; }
.badge { display: inline-block; padding: 3px 8px; border: 1px solid var(--control-line); border-radius: 99px; color: var(--muted); font-size: .75rem; white-space: normal; flex-shrink: 0; max-width: 190px; }
.badge.hot { color: #ffb376; border-color: #ac5429; background: #341f16; }
.badge.good { color: #9ce0b1; border-color: #4c8260; }
.badge.bad { color: #ffaaa1; border-color: #a55a54; }
.empty { display: grid; place-items: center; text-align: center; min-height: 144px; align-content: center; gap: 9px; color: var(--muted); }
.empty svg { color: var(--amber); width: 26px; height: 26px; }
.trend { height: 114px; display: flex; gap: 3px; padding: 6px 1px 3px; background: repeating-linear-gradient(to top,transparent 0,transparent 26px,var(--line) 27px,transparent 28px); }
.trend meter { flex: 1; inline-size: 0; min-inline-size: 0; block-size: 100%; writing-mode: vertical-lr; direction: rtl; }
meter::-webkit-meter-bar { background: #292931; border: 0; }
meter::-webkit-meter-optimum-value { background: var(--grad); }
meter::-moz-meter-bar { background: var(--amber); }
.chart-caption { color: var(--muted); display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 14px; font-size: .78rem; }
.bands { display: grid; gap: 9px; }
.bands div,.score-breakdown { display: grid; grid-template-columns: 64px minmax(0,1fr) 34px; align-items: center; gap: 9px; font-size: .85rem; }
.score-breakdown { grid-template-columns: minmax(76px,1fr) minmax(58px,2fr) 55px; margin-top: 12px; }
progress,meter { width: 100%; accent-color: var(--amber); }
.section-gap { margin-top: 22px; }
button,.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--bg-2); border: 1px solid var(--control-line); border-radius: 999px;
  text-decoration: none; font: 750 .88rem/1.2 var(--font); padding: 10px 16px; min-height: 43px;
  color: var(--text); cursor: pointer; transition: background-color .18s,border-color .18s,filter .18s;
}
button:hover,.button:hover { border-color: var(--amber); color: var(--text); }
.primary,.primary:hover { color: var(--bg); background: var(--grad); border-color: transparent; font-weight: 850; }
.primary:hover { filter: brightness(1.09); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack { display: grid; align-content: start; gap: 14px; min-width: 0; }
.stack .panel-heading { margin-bottom: 0; }
label { display: grid; align-content: start; gap: 5px; font-size: .84rem; font-weight: 650; min-width: 0; }
input,select,textarea { width: 100%; min-width: 0; border: 1px solid var(--control-line); border-radius: 10px; background: var(--bg-2); color: var(--text); font: inherit; padding: 9px 10px; min-height: 43px; }
textarea { resize: vertical; }
input[type=checkbox] { width: 19px; height: 19px; min-height: 0; flex: none; accent-color: var(--amber); }
.check,.source-option { display: flex; gap: 8px; align-items: center; min-height: 42px; }
.source-option small { margin-top: 2px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 12px; }
details { border-top: 1px solid var(--line); padding-top: 10px; min-width: 0; }
details summary { width: fit-content; min-height: 36px; cursor: pointer; color: var(--amber); font-weight: 650; }
.filters { display: grid; gap: 14px; margin-bottom: 16px; }
.table-panel { padding: 0; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
td,th { padding: 13px 15px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .78rem; letter-spacing: .04em; }
td a { font-weight: 750; }
td small { margin-top: 3px; }
tbody tr:hover { background: #1d1d24; }
tbody tr:last-child td { border-bottom: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; }
.back { display: inline-block; margin-bottom: 10px; }
.facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
dt { color: var(--muted); font-size: .81rem; }
dd { margin: 0; overflow-wrap: anywhere; }
.long-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.note { padding: 10px 0; border-bottom: 1px solid var(--line); }
.notice { padding: 12px; margin-bottom: 12px; background: #183125; color: #c9efda; border-radius: 10px; }
.notice.error { background: #401d1a; color: #ffd2cb; }
.signed-out .main { display: grid; place-items: center; min-height: 100dvh; }
.login { width: min(100%,430px); display: grid; gap: 15px; }
.login h1 { font-size: 2.45rem; margin-top: 7px; }
.login .brand { padding: 0; width: fit-content; }
@media (max-width: 1050px) {
  .signed-in { grid-template-columns: 175px minmax(0,1fr); }
  .summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .signed-in { display: block; }
  .sidebar { height: auto; position: static; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 15px; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { grid-row: 2; grid-column: 1/-1; display: flex; flex-wrap: wrap; margin-top: 0; }
  .logout { margin: 0; align-self: center; }
  .main { padding-top: 23px; }
}
@media (max-width: 600px) {
  .main { padding-inline: 13px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-heading { align-items: start; flex-direction: column; gap: 12px; }
  nav a { padding-inline: 7px; font-size: .81rem; gap: 5px; }
  nav a svg { width: 15px; }
  .panel { padding: 14px; }
  .table-panel { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { transition: none !important; scroll-behavior: auto !important; }
  .tile:hover { transform: none; }
}

