:root {
  color-scheme: dark;
  --bg: #081629;
  --surface: #101f35;
  --line: #233650;
  --text: #f4f8ff;
  --muted: #a6b4c8;
  --blue: #127cfa;
  --cyan: #17c9e7;
  --violet: #9f5aff;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
textarea,
summary {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 1.13;
  font-weight: 600;
  letter-spacing: -1.8px;
}
h2 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 14px;
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #74dce9;
  font-weight: 500;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  font-size: 19px;
  letter-spacing: 1px;
}
.brand small {
  display: block;
  font-size: 7px;
  letter-spacing: 3px;
  font-weight: 500;
  line-height: 1;
}
.mark {
  font-size: 42px;
  line-height: 1;
  font-style: italic;
  letter-spacing: -7px;
  padding-right: 6px;
  color: var(--cyan);
  text-shadow: 5px 0 var(--violet);
}
.primary,
.secondary,
.danger {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: 43px;
  padding: 10px 17px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 550;
}
.primary {
  background: #0969d5;
  color: white;
  border-color: #0969d5;
}
.primary:hover {
  background: #127cfa;
}
.secondary {
  background: transparent;
  color: var(--text);
}
.secondary:hover {
  background: #1a2d47;
}
.danger {
  color: #ffb3bd;
  background: transparent;
  border-color: #794352;
}
.quiet-link {
  font-size: 13px;
  color: var(--muted);
}
.footnote {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  padding: 7vw;
  gap: 9vw;
  background: radial-gradient(ellipse at 10% 80%, #12325166, transparent 55%);
}
.login-story .brand {
  margin-bottom: 110px;
}
.login-story h1 {
  font-size: clamp(38px, 4.2vw, 64px);
  margin: 24px 0;
}
.login-story > p:not(.eyebrow) {
  max-width: 430px;
  color: var(--muted);
  font-size: 17px;
}
.story-line {
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), transparent);
  margin: 50px 0 20px;
}
.login-card {
  max-width: 440px;
  width: 100%;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.login-card h2 {
  font-size: 32px;
  margin: 18px 0 6px;
}
label {
  display: block;
  font-size: 12px;
  color: #c1cddd;
  margin: 18px 0 7px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  color: var(--text);
  background: #09172b;
  border: 1px solid #344861;
  border-radius: 5px;
  padding: 11px 12px;
  min-height: 43px;
}
input::placeholder {
  color: #8b9aaf;
}
textarea {
  resize: vertical;
}
.login-card .primary {
  width: 100%;
  justify-content: space-between;
  margin: 24px 0 0;
}
.error {
  color: #ffb3bd;
  font-size: 13px;
  margin: 12px 0 0;
}
.sidebar {
  width: 230px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 36px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: #0a182b;
}
.sidebar .brand {
  font-size: 17px;
}
.nav-label {
  margin: 54px 0 15px;
  font-size: 9px;
  color: #8b9aaf;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 12px;
  border-radius: 6px;
  text-align: left;
  margin: 6px 0;
}
.nav-item > span:first-child {
  font-size: 20px;
  line-height: 1;
}
.nav-item.active {
  color: var(--text);
  background: #132c49;
  border-color: #244768;
}
.pill {
  background: #1a3e60;
  font-size: 10px;
  border-radius: 4px;
  margin-left: auto;
  padding: 0 5px;
  color: #9fe5f0;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 18px;
  font-size: 12px;
}
.sidebar-bottom small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.work-area {
  margin-left: 230px;
}
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  font-size: 12px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  margin-right: 10px;
}
.content {
  padding: 46px 42px;
  max-width: 1540px;
  margin: auto;
  min-height: calc(100vh - 140px);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 35px;
}
.page-heading .eyebrow {
  margin-bottom: 20px;
}
.page-heading h1 {
  margin-bottom: 18px;
}
.range-label {
  width: 150px;
  flex-shrink: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 23px;
}
.stat span {
  font-size: 12px;
  color: #c2cedf;
}
.stat strong {
  display: block;
  font-size: 36px;
  font-weight: 550;
  letter-spacing: -1px;
  margin: 10px 0 5px;
}
.stat small {
  color: var(--muted);
  font-size: 10px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 22px;
  min-width: 0;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}
.panel-title h2 {
  margin-bottom: 0;
  font-size: 17px;
}
.panel-title .muted {
  font-size: 11px;
}
.panel-title .eyebrow {
  margin-bottom: 9px;
}
.legend {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.legend i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  margin-right: 7px;
  border-radius: 50%;
}
.chart {
  display: flex;
  gap: 4px;
  align-items: end;
  height: 180px;
  padding-top: 20px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.chart-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 7px;
}
.chart meter {
  width: 100%;
  height: 138px;
  writing-mode: vertical-lr;
  direction: rtl;
  appearance: none;
}
.chart meter::-webkit-meter-bar {
  background: #172d46;
  border: 0;
  border-radius: 3px;
}
.chart meter::-webkit-meter-optimum-value {
  background: linear-gradient(var(--cyan), #126fbe);
  border-radius: 3px;
}
.chart-col small {
  font-size: 8px;
  color: var(--muted);
  height: 14px;
}
.chart-col b {
  font-weight: 400;
  font-size: 9px;
  color: #bce5ec;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  margin-top: 16px;
}
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}
.rank {
  margin: 14px 0;
}
.rank-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 7px;
  font-size: 12px;
}
.rank-line span {
  overflow-wrap: anywhere;
}
.rank progress {
  display: block;
  width: 100%;
  height: 4px;
  appearance: none;
  border: 0;
}
.rank progress::-webkit-progress-bar {
  background: #1b324e;
  border-radius: 3px;
}
.rank progress::-webkit-progress-value {
  background: var(--blue);
  border-radius: 3px;
}
.empty {
  color: var(--muted);
  padding: 24px 0;
  font-size: 13px;
}
.filters {
  display: flex;
  align-items: end;
  gap: 15px;
  margin-bottom: 24px;
}
.filters label {
  margin: 0;
  min-width: 160px;
}
.filters label:first-child {
  flex: 1;
}
.filters input,
.filters select {
  margin-top: 7px;
}
.table-scroll {
  overflow-x: auto;
  position: relative;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 16px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.status-badge {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #1b3a53;
  color: #91deec;
  white-space: nowrap;
}
.status-badge.new {
  background: #1c3e62;
  color: #a1caff;
}
.status-badge.failed {
  background: #503043;
  color: #ffb7c3;
}
.status-badge.closed,
.status-badge.accepted {
  background: #153f3b;
  color: #99e2cb;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  font-size: 12px;
}
.pagination button {
  font-size: 11px;
}
.notice {
  border: 1px solid #376574;
  background: #12303e;
  border-radius: 6px;
  color: #b9eff5;
  padding: 12px 16px;
  margin-bottom: 22px;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 42px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #415773;
  border-radius: 10px;
  width: min(680px, calc(100% - 30px));
  max-height: 90vh;
  padding: 28px;
}
dialog::backdrop {
  background: #020a17bb;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.icon-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: white;
  font-size: 22px;
  width: 33px;
  line-height: 1;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.dialog-actions > * {
  font-size: 12px;
}
.message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 5px;
}
dl {
  font-size: 12px;
}
dt {
  color: var(--muted);
  margin-top: 14px;
}
dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}
.audit-row {
  font-size: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.audit-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.sr-only,
.skip:not(:focus) {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  position: fixed;
  z-index: 9;
  padding: 14px;
  background: var(--surface);
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
    padding: 28px 18px;
  }
  .work-area {
    margin-left: 200px;
  }
  .content {
    padding: 32px 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .stat {
    padding: 18px 14px;
  }
  .stat strong {
    font-size: 30px;
  }
  .stat small {
    font-size: 9px;
  }
  .panel {
    padding: 20px;
  }
  .legend {
    white-space: normal;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 16px;
  }
  .sidebar nav {
    display: flex;
    gap: 6px;
    margin-top: 15px;
  }
  .nav-label {
    display: none;
  }
  .sidebar-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
  }
  .sidebar-bottom small {
    display: none;
  }
  .sidebar-bottom .secondary {
    margin-left: auto;
    min-height: 32px;
    padding: 5px 12px;
    font-size: 11px;
  }
  .nav-item {
    font-size: 11px;
    padding: 10px 8px;
    margin: 0;
  }
  .nav-item > span:first-child {
    display: none;
  }
  .work-area {
    margin-left: 0;
  }
  .topbar {
    height: 56px;
    padding: 0 18px;
    font-size: 10px;
  }
  .content {
    padding: 28px 18px;
  }
  .page-heading {
    align-items: start;
  }
  .page-heading h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .page-heading p.muted {
    font-size: 12px;
  }
  .range-label {
    width: 115px;
    font-size: 10px;
    margin-top: 0;
  }
  .range-label select {
    font-size: 11px;
    padding: 8px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .insight-grid {
    grid-template-columns: 1fr;
  }
  .panel-title {
    align-items: start;
  }
  .panel-title h2 {
    font-size: 16px;
  }
  .legend {
    max-width: 95px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters label:first-child {
    flex-basis: 100%;
  }
  .filters label {
    min-width: 100px;
    flex: 1;
  }
  .filters button {
    height: 43px;
  }
  .login-shell {
    display: block;
    padding: 24px;
    min-height: 100vh;
  }
  .login-story {
    padding: 18px 0 32px;
  }
  .login-story .brand {
    margin-bottom: 30px;
  }
  .login-story h1 {
    font-size: 34px;
    margin: 18px 0;
  }
  .login-story > p:not(.eyebrow),
  .story-line,
  .login-story > .muted {
    display: none;
  }
  .login-story .eyebrow {
    font-size: 8px;
  }
  .login-card {
    max-width: none;
    padding: 26px;
  }
  .chart {
    gap: 2px;
  }
  .chart-col small {
    font-size: 7px;
  }
  .chart-col b {
    font-size: 8px;
  }
  footer {
    padding: 18px;
    gap: 12px;
  }
  .page-heading > .secondary {
    font-size: 10px;
    padding: 8px;
  }
  .dialog-actions > * {
    flex: 1 1 40%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
