@font-face {
  font-family: Plex;
  src: url("/static/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("/static/fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("/static/fonts/IBMPlexMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  --canvas: #fdfcfc;
  --ink: #201d1d;
  --body: #424245;
  --mute: #646262;
  --soft: #f8f7f7;
  --card: #f1eeee;
  --rule: rgba(15, 0, 0, 0.12);
  --danger: #9d2d28;
  --terminal: #201d1d;
  --on-dark: #fdfcfc;
  --on-dark-mute: #bbb6b6;
  font-family: Plex, "IBM Plex Mono", ui-monospace, monospace;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
}
strong {
  font-weight: 700;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.17;
  letter-spacing: -0.055em;
  font-weight: 700;
  max-width: 22ch;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  letter-spacing: -0.045em;
  line-height: 1.35;
  margin-bottom: 8px;
}
h3 {
  font-size: 1.05rem;
  letter-spacing: -0.025em;
  margin: 4px 0 0;
}
.muted {
  color: var(--mute);
}
.dot {
  color: var(--mute);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin: 0;
  color: var(--mute);
}
.lede {
  font-size: clamp(14px, 1.4vw, 17px);
  max-width: 64ch;
  line-height: 1.7;
  color: var(--body);
}
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  top: -100px;
  left: 12px;
  background: var(--ink);
  color: #fff;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.terminal :focus-visible {
  outline-color: #fff;
}
.shell {
  max-width: 1660px;
  padding: 0 clamp(16px, 3.8vw, 70px);
  margin: auto;
}
.masthead {
  min-height: 76px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
}
.brand {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.brand-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}
.edition {
  margin-left: auto;
  font-size: 11px;
  white-space: nowrap;
}
.logout-form {
  border-left: 1px solid var(--rule);
  padding-left: 24px;
}
.text-button {
  background: none;
  border: 0;
  color: var(--ink);
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button:hover {
  color: var(--mute);
}
.footer {
  border-top: 1px solid var(--rule);
  color: var(--mute);
  font-size: 10px;
  letter-spacing: 0.03em;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 0 36px;
  margin-top: 96px;
}
.button {
  border-radius: 4px;
  min-height: 44px;
  padding: 9px 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}
.button.primary {
  background: var(--ink);
  color: var(--canvas);
  border: 1px solid var(--ink);
}
.button.primary:hover {
  background: #0f0000;
}
.button.secondary {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.button.secondary:hover {
  background: var(--card);
  border-color: var(--mute);
}
input:not([type="hidden"]),
select {
  background: var(--soft);
  border: 1px solid #8c8585;
  border-radius: 4px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  width: 100%;
  outline: none;
  min-width: 0;
}
input:focus,
select:focus {
  border-color: var(--ink);
  background: var(--canvas);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
label,
legend {
  font-weight: 500;
  display: block;
  font-size: 14px;
  margin-bottom: 7px;
}
.notice {
  border: 1px solid var(--rule);
  background: var(--soft);
  padding: 14px 18px;
  margin: 24px 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.7;
}
.notice.error {
  border-color: var(--danger);
  color: var(--danger);
  background: #fcf7f6;
}
.notice .text-button {
  font-size: 12px;
  margin-left: 8px;
}
/* Login: editorial lead, one terminal visual, practical form */
.login-main {
  padding-top: clamp(48px, 8vw, 112px);
}
.login-intro h1 {
  margin: 20px 0 20px;
}
.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(32px, 7vw, 110px);
  align-items: stretch;
  margin-top: clamp(42px, 6vw, 80px);
}
.terminal {
  background: var(--terminal);
  color: var(--on-dark);
}
.terminal-top,
.terminal-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--on-dark-mute);
}
.terminal-top {
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.terminal-bottom {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.terminal-dots {
  letter-spacing: 3px;
  font-size: 9px;
}
.terminal-prompt {
  font-size: 12px;
  color: #d8d2d2;
  margin: 0 0 40px;
}
.terminal-content {
  padding: clamp(28px, 5vw, 64px) clamp(24px, 4vw, 56px);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.terminal-art {
  font-size: clamp(10px, 1.4vw, 17px);
  line-height: 1.35;
  white-space: nowrap;
  letter-spacing: -0.08em;
  margin-bottom: 32px;
}
.terminal-line {
  margin: 0 0 10px;
  color: #dfdada;
  font-size: 14px;
}
.terminal-line strong {
  color: #fff;
}
.terminal-dim {
  color: var(--on-dark-mute);
  margin-top: 22px;
}
.login-panel {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
.section-heading {
  border-top: 1px solid var(--rule);
  padding: 15px 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  font-size: 11px;
}
.login-panel .section-heading {
  border: 0;
  padding-top: 0;
}
.login-panel h2 {
  font-size: clamp(22px, 2.3vw, 32px);
}
.login-panel > p {
  max-width: 42ch;
  line-height: 1.7;
}
.login-panel form {
  margin-top: 28px;
}
.login-panel form input {
  margin-bottom: 20px;
}
.login-submit {
  width: 100%;
  justify-content: space-between;
  margin-top: 8px;
}
.helper {
  font-size: 11px;
  margin: 24px 0;
  color: var(--mute);
}
/* Dashboard */
.page-top {
  padding: clamp(42px, 6vw, 92px) 0 40px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
}
.page-top .eyebrow {
  margin-bottom: 19px;
}
.page-top h1 {
  margin-bottom: 10px;
}
.page-top .lede {
  margin-bottom: 0;
}
.top-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.top-actions select {
  min-width: 220px;
}
.api-key-section > .top-actions {
  margin-top: 12px;
}
.api-key-section > p {
  max-width: 95ch;
}
.demo-notice {
  margin-top: 24px;
}
.demo-notice select {
  max-width: 560px;
}
.dashboard-terminal .terminal-grid {
  padding: clamp(24px, 3vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(28px, 6vw, 100px);
}
.dashboard-terminal .terminal-prompt {
  margin: 0 0 35px;
}
.terminal-label {
  color: var(--on-dark-mute);
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}
.terminal-balance {
  font-size: clamp(40px, 6.2vw, 94px);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.terminal-gift {
  color: var(--on-dark-mute);
  font-size: 14px;
  margin: 13px 0 36px;
}
.terminal-gift strong {
  color: #fff;
}
.progress-track {
  height: 6px;
  background: #514b4b;
  border-radius: 0;
  overflow: hidden;
  max-width: 550px;
}
.progress-track span {
  display: block;
  height: 100%;
  background: #fdfcfc;
  width: 0;
  transition: width 0.4s ease;
}
.terminal-meta {
  font-size: 13px;
  color: var(--on-dark-mute);
  margin: 12px 0 0;
}
.terminal-meta #overage {
  color: #fff;
}
.terminal-side {
  padding: 0 0 0 clamp(0px, 2vw, 32px);
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}
.terminal-side .terminal-label {
  margin-bottom: 20px;
}
.terminal-detail {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.terminal-detail span {
  color: var(--on-dark-mute);
}
.terminal-detail strong {
  max-width: 22ch;
  text-align: right;
  overflow-wrap: anywhere;
}
.terminal-note {
  margin: 18px 0 0;
  color: var(--on-dark-mute);
  font-size: 13px;
  line-height: 1.65;
  max-width: 46ch;
}
.section {
  margin-top: clamp(65px, 7vw, 112px);
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin: 12px 0 30px;
}
.section-title p {
  margin-bottom: 0;
  max-width: 75ch;
  font-size: 12px;
  line-height: 1.65;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: end;
}
.filters fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.segmented {
  display: flex;
  border-bottom: 1px solid var(--rule);
}
.segmented button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--mute);
  padding: 10px 11px;
  min-height: 44px;
  font-size: 12px;
  white-space: nowrap;
}
.segmented button:hover {
  color: var(--ink);
}
.segmented button[aria-pressed="true"] {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 700;
}
.model-control select {
  min-width: 190px;
  max-width: 260px;
  font-size: 12px;
}
.metrics {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 32px 0 24px;
}
.metric {
  padding: 24px clamp(12px, 2vw, 32px) 24px 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.metric + .metric {
  border-left: 1px solid var(--rule);
  padding-left: clamp(12px, 2vw, 32px);
}
.metric-index {
  color: var(--mute);
  font-size: 10px;
  letter-spacing: 0.05em;
}
.metric-value {
  font-size: clamp(19px, 2.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.07em;
  margin-top: 18px;
  overflow-wrap: anywhere;
}
.metric-caption {
  font-size: 11px;
  color: var(--mute);
  margin-top: 5px;
}
.insights {
  font-size: 12px;
  color: var(--body);
  display: flex;
  gap: 10px 30px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  padding: 0 0 22px;
}
.insights span::before {
  content: "[+] ";
  font-weight: 700;
  color: var(--ink);
}
.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(30px, 4vw, 65px);
  margin-top: 45px;
}
.chart-panel {
  min-width: 0;
}
.chart-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
}
.chart-heading > .muted {
  font-size: 10px;
}
.chart-box {
  height: 245px;
  position: relative;
  margin: 22px 0 8px;
}
.chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.legend-button {
  font-size: 10px;
  border: 1px solid var(--rule);
  background: transparent;
  border-radius: 4px;
  padding: 7px 9px;
  min-height: 38px;
  color: var(--ink);
}
.legend-button[aria-pressed="false"] {
  color: var(--mute);
  text-decoration: line-through;
}
.legend-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: var(--ink);
  margin-right: 8px;
}
.chart-fallback {
  font-size: 12px;
  color: var(--mute);
  padding: 30px 0;
  line-height: 1.6;
}
.table-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 14px;
  font-size: 11px;
}
.table-tools input {
  width: min(340px, 80vw);
  font-size: 12px;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
  scrollbar-color: #b5b0b0 transparent;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  font-size: 11px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th {
  font-weight: 500;
  color: var(--mute);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
th button {
  color: inherit;
  background: none;
  border: 0;
  padding: 15px 12px 15px 0;
  font-size: inherit;
  min-height: 44px;
  font-weight: inherit;
  text-align: left;
}
th button:hover {
  color: var(--ink);
}
td {
  padding: 14px 14px 14px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  overflow-wrap: anywhere;
}
td:nth-child(3) {
  max-width: 250px;
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.numeric button {
  text-align: right;
  padding-right: 0;
}
.empty {
  padding: 34px 0;
  font-size: 12px;
  color: var(--mute);
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  font-size: 11px;
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.pagination .button {
  min-height: 40px;
  padding: 6px 12px;
  font-size: 11px;
}
.footnote {
  color: var(--mute);
  font-size: 11px;
  line-height: 1.65;
  margin: 28px 0 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 7vw, 110px);
}
.detail-column > .muted {
  font-size: 12px;
  line-height: 1.7;
  max-width: 64ch;
}
.limitation-list {
  margin: 24px 0;
}
.limitation-list p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--body);
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.limitation-list p::before {
  content: "[!] ";
  font-weight: 700;
}
.disclosure {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 25px;
}
.disclosure summary {
  cursor: pointer;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  min-height: 48px;
}
.disclosure summary::-webkit-details-marker {
  display: none;
}
.disclosure summary::after {
  content: "[+]";
  color: var(--mute);
}
.disclosure[open] summary::after {
  content: "[-]";
}
.disclosure-body {
  font-size: 11px;
  color: var(--body);
  padding-bottom: 20px;
}
.disclosure-body p {
  border-top: 1px solid var(--rule);
  padding-top: 9px;
  overflow-wrap: anywhere;
}
.password-form {
  padding: 10px 0 24px;
  max-width: 400px;
}
.password-form input {
  margin-bottom: 16px;
}
.password-form button {
  margin-top: 8px;
}
.password-form #password-message {
  min-height: 20px;
  font-size: 11px;
  color: var(--body);
}
.password-form #password-message[data-error="true"] {
  color: var(--danger);
}
#admin-section > p {
  font-size: 12px;
}
#admin-rows button {
  font: inherit;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  padding: 0;
  color: var(--ink);
  text-align: left;
}
@media (max-width: 1050px) {
  .section-title {
    align-items: start;
    flex-direction: column;
  }
  .chart-grid {
    gap: 28px;
  }
  .terminal-grid {
    gap: 28px !important;
  }
  .edition .muted {
    display: none;
  }
}
@media (max-width: 780px) {
  .login-grid,
  .dashboard-terminal .terminal-grid,
  .chart-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .login-grid {
    gap: 36px;
  }
  .login-terminal {
    order: 2;
  }
  .terminal-side {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding: 24px 0 0;
  }
  .page-top {
    align-items: start;
    flex-direction: column;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric:nth-child(3) {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule);
  }
  .metric:nth-child(4) {
    border-top: 1px solid var(--rule);
  }
  .chart-box {
    height: 230px;
  }
  .chart-grid {
    gap: 48px;
  }
  .login-main {
    padding-top: 56px;
  }
}
@media (max-width: 480px) {
  .table-tools {
    flex-wrap: wrap;
  }
  .table-tools input {
    width: min(100%, 340px);
  }
  .shell {
    padding: 0 16px;
  }
  .masthead {
    min-height: 65px;
    flex-wrap: wrap;
    gap: 3px 10px;
    padding: 12px 0;
  }
  .brand {
    font-size: 12px;
  }
  .brand-sub {
    display: none;
  }
  .edition {
    font-size: 9px;
  }
  .logout-form {
    padding-left: 10px;
  }
  .page-top {
    padding-top: 48px;
  }
  .page-top h1 {
    font-size: 34px;
  }
  .terminal-top,
  .terminal-bottom {
    padding: 11px 15px;
    font-size: 9px;
  }
  .terminal-dots {
    display: none;
  }
  .dashboard-terminal .terminal-grid {
    padding: 24px 18px;
  }
  .terminal-balance {
    font-size: 42px;
  }
  .terminal-detail {
    display: block;
  }
  .terminal-detail strong {
    display: block;
    text-align: left;
    margin-top: 5px;
  }
  .login-grid {
    margin-top: 42px;
  }
  .login-intro h1 {
    font-size: 34px;
  }
  .terminal-content {
    min-height: 290px;
  }
  .terminal-art {
    font-size: 10px;
  }
  .metrics .metric {
    padding-top: 18px;
    padding-bottom: 18px;
  }
  .metric-value {
    font-size: 21px;
  }
  .filters {
    width: 100%;
  }
  .period-control {
    max-width: 100%;
    overflow: auto;
  }
  .segmented button {
    font-size: 11px;
    padding: 9px 8px;
  }
  .model-control,
  .model-control select {
    width: 100%;
    max-width: 100%;
  }
  .pagination {
    align-items: start;
    flex-direction: column;
  }
  .pagination > div {
    width: 100%;
  }
  .pagination button {
    flex: 1;
  }
  .footer {
    margin-top: 64px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
