@font-face {
  font-family: Geist;
  src: url('/geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #090909;
  --rail: #101010;
  --surface: #141414;
  --raised: #232323;
  --line: #303030;
  --text: #f5f5f5;
  --muted: #ababab;
  --gold: #d7b777;
  --gold-bg: #30291d;
  --neutral: #dedede;
  --neutral-bg: #242424;
  --warn: #e2c58e;
  --warn-bg: #30291d;
  font-family: Geist, system-ui, sans-serif;
  background: var(--canvas);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
.metric:hover, .security-status:hover, tbody tr:hover { background: var(--raised); }
.metric > strong, .channel strong, td, dd { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
h1, h2, p, ul, dl, dd { margin: 0; }
svg { width: 1.15rem; height: 1.15rem; display: inline-block; flex: none; }
small { font-size: .83rem; }
.skip { position: absolute; z-index: 3; top: .5rem; left: .5rem; transform: translateY(-160%); background: var(--gold); color: var(--canvas); padding: .5rem; }
.skip:focus { transform: translateY(0); }
.brand { display: inline-flex; align-items: center; gap: .6rem; width: max-content; max-width: 100%; color: var(--text); white-space: nowrap; }
.brand > span { font-size: 1.0625rem; line-height: 1; font-weight: 650; letter-spacing: .3em; text-transform: uppercase; }
.brand small { padding-left: .68rem; margin-left: .2rem; border-left: 1px solid var(--line); font-size: .83rem; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: .4rem; padding: 0; color: var(--gold); background: transparent; border: 0; font-size: .875rem; font-weight: 590; text-underline-offset: .24em; }
.text-link:hover { text-decoration: underline; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.75rem; border: 1px solid var(--line); border-radius: .55rem; padding: .62rem .95rem; font-size: .9rem; font-weight: 660; text-align: center; background: var(--surface); }
.button:hover { border-color: var(--gold); color: var(--text); }
.button.primary { background: var(--gold); border-color: var(--gold); color: #231d12; }
.button.primary:hover { background: #ecd4a5; color: #151515; }
.badge { display: inline-flex; align-items: center; white-space: normal; border-radius: .32rem; color: var(--muted); background: var(--raised); padding: .16rem .45rem; font-size: .78rem; font-weight: 650; line-height: 1.4; }
.badge.gold { background: var(--gold-bg); color: var(--gold); }
.badge.good { background: transparent; color: var(--neutral); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

.access-header, .access-footer { width: min(76rem, calc(100% - 3.5rem)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem 1.2rem; }
.access-header { min-height: 4.5rem; border-bottom: 1px solid var(--line); }
.access-footer { padding: 1.25rem 0 1.75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.access-main { display: grid; place-items: center; padding: clamp(2rem, 5vw, 5rem) 1.1rem; min-height: calc(100svh - 10rem); background: radial-gradient(ellipse at 50% 10%, #181818 0%, var(--canvas) 62%); }
.access-card { width: min(32rem, 100%); padding: clamp(1.2rem, 4vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: .95rem; }
.access-icon { width: 2.65rem; height: 2.65rem; display: grid; place-items: center; border: 1px solid #664f29; border-radius: .55rem; color: var(--gold); background: var(--gold-bg); margin-bottom: 1rem; }
h1 { font-weight: 560; font-size: clamp(2rem, 3.4vw, 3.1rem); line-height: 1.08; letter-spacing: -.045em; }
.access-card h1 { font-size: clamp(1.9rem, 3.5vw, 2.45rem); }
.intro { color: var(--muted); margin-top: .6rem; margin-bottom: 1.3rem; }
.auth-method { display: grid; grid-template-columns: 1.3rem 1fr; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.auth-method svg { color: var(--gold); margin-top: .15rem; }
.auth-method p, .service-note, .prototype-entry p { color: var(--muted); font-size: .87rem; }
.service-note { padding: .7rem 0 .3rem; }
.prototype-entry { display: grid; justify-items: start; gap: .25rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.prototype-entry .button { margin-top: .5rem; }
.demo-account { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; padding: .75rem; border: 1px solid var(--line); border-radius: .6rem; }
.demo-account > div { min-width: 0; overflow-wrap: anywhere; }
.demo-account div span { display: block; font-size: .83rem; color: var(--muted); }
.demo-account .badge { margin-left: auto; }
.auth-actions, .form-stack { display: grid; gap: .65rem; margin-block: 1rem; }
.form-stack label { font-weight: 620; }
.form-stack input { min-height: 2.75rem; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--canvas); letter-spacing: .25em; }
.form-error { color: var(--warn); font-size: .9rem; }
.demo-code { color: var(--muted); font-size: .9rem; }
.demo-code strong { color: var(--gold); letter-spacing: .12em; margin-left: .35rem; }

.console-shell { min-height: 100vh; display: grid; grid-template-columns: 14rem minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 1.35rem; padding: 1.2rem .9rem .9rem; border-right: 1px solid var(--line); background: var(--rail); }
.sidebar .brand { display: grid; grid-template-columns: 25px auto; gap: .15rem .7rem; margin-left: .4rem; }
.sidebar .brand img { grid-row: span 2; }
.sidebar .brand small { grid-column: 2; padding: 0; margin: 0; border: 0; font-size: .78rem; }
.organization { display: flex; align-items: center; gap: .65rem; padding: .66rem; border-block: 1px solid var(--line); }
.organization small, .sidebar-footer small { display: block; color: var(--muted); }
.org-mark { display: grid; place-items: center; width: 2.05rem; height: 2.05rem; flex: none; border-radius: .42rem; background: var(--neutral-bg); color: var(--neutral); font-size: 1.15rem; font-weight: 650; }
.sidebar nav { display: grid; gap: .24rem; }
.nav-link { display: flex; align-items: center; gap: .62rem; padding: .55rem .65rem; border: 1px solid transparent; border-radius: .52rem; color: var(--muted); font-size: .91rem; font-weight: 550; }
.nav-link:hover { background: var(--raised); }
.nav-link.selected { border-color: var(--line); background: var(--raised); color: var(--text); }
.nav-link.selected svg { color: var(--gold); }
.sidebar-footer { display: flex; align-items: center; gap: .6rem; margin-top: auto; padding: .85rem .42rem 0; border-top: 1px solid var(--line); font-size: .88rem; }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: 50%; background: var(--neutral-bg); color: var(--neutral); font-size: .74rem; font-weight: 700; }
.main-pane { min-width: 0; }
.toolbar { min-height: 3.7rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1rem; padding: .65rem clamp(1rem, 4vw, 2.2rem); border-bottom: 1px solid var(--line); }
.breadcrumb, .toolbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .48rem; color: var(--muted); font-size: .85rem; }
.breadcrumb strong { color: var(--text); font-weight: 600; }
.breadcrumb svg { width: .8rem; height: .8rem; }
.toolbar-actions { gap: .85rem; }
.toolbar-actions form { line-height: 1; }
.toolbar-actions button { color: var(--muted); }
.toolbar-actions button:hover { color: var(--gold); }
.page { display: grid; gap: 1rem; padding: clamp(1.1rem, 3.2vw, 2.1rem); max-width: 97rem; margin-inline: auto; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: .75rem; }
.page-header p { color: var(--muted); margin-top: .45rem; }
.filters { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.filters label { display: grid; gap: .24rem; color: var(--muted); font-size: .85rem; }
.filters select { appearance: none; width: 100%; min-width: 9.5rem; min-height: 2.55rem; border: 1px solid var(--line); border-radius: .48rem; color: var(--text); padding: .4rem 1.65rem .4rem .65rem; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ababab' stroke-width='1.5' d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right .5rem center / .9rem; }
.filters .button { min-height: 2.55rem; padding-block: .35rem; }
.filters .reset { align-self: center; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.metric { min-width: 0; display: flex; flex-direction: column; padding: .75rem clamp(.65rem, 1.45vw, 1rem); overflow-wrap: anywhere; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric > span { color: var(--muted); font-size: .88rem; font-weight: 650; }
.metric > strong { font-size: clamp(1.65rem, 2.8vw, 2.55rem); line-height: 1.36; font-weight: 630; letter-spacing: -.05em; }
.metric > small { color: var(--muted); }
.security-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-block: 1px solid var(--line); }
.security-status { display: flex; flex-wrap: wrap; align-items: center; gap: .28rem .5rem; padding: .75rem; background: var(--canvas); }
.security-status > span:nth-child(2) { flex: 1; min-width: 6.8rem; }
.security-status strong { display: block; font-size: .86rem; }
.security-status small { display: block; color: var(--muted); font-size: .79rem; }
.status-dot { width: .44rem; height: .44rem; border-radius: 50%; flex: none; background: var(--neutral); }
.status-dot.warn { background: var(--warn); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.43fr) minmax(0, 1fr); gap: .9rem; align-items: start; }
.stack { display: grid; gap: .9rem; min-width: 0; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: .73rem; background: var(--surface); }
.panel-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem .65rem; padding: .95rem; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 1.08rem; font-weight: 680; }
.panel-header > div { flex: 1 1 10rem; }
.panel-header p { color: var(--muted); font-size: .84rem; }
.panel-body { padding: .75rem .87rem; }
.stage-list, .attention-list { padding: 0; list-style: none; }
.stage-list a { display: grid; grid-template-columns: minmax(5.4rem, .8fr) minmax(2rem, 1fr) 1.6rem minmax(3.1rem, auto); gap: .45rem; align-items: center; padding: .7rem .95rem; font-size: .87rem; }
.stage-list li + li, .attention-list li + li { border-top: 1px solid var(--line); }
.stage-list a:hover { background: var(--raised); }
.stage-list a strong, .stage-list a small { text-align: right; font-variant-numeric: tabular-nums; }
.stage-list a small { color: var(--muted); }
meter { display: block; width: 100%; height: .48rem; appearance: none; }
meter::-webkit-meter-bar { background: #2c2c2c; border: 0; border-radius: .25rem; height: .48rem; }
meter::-webkit-meter-optimum-value { background: var(--gold); border-radius: .25rem; }
meter::-moz-meter-bar { background: var(--gold); border-radius: .25rem; }
.adoption-meter::-webkit-meter-optimum-value { background: var(--neutral); }
.adoption-meter::-moz-meter-bar { background: var(--neutral); }
.channel-list { display: grid; gap: .8rem; }
.channel { display: grid; gap: .2rem; }
.channel > div { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-size: .87rem; }
.channel > div span { color: var(--muted); white-space: nowrap; }
.channel > div span strong { color: var(--text); }
.channel small, .attention-list small { color: var(--muted); }
.attention-list li { display: flex; justify-content: space-between; align-items: center; gap: .55rem; padding: .63rem .87rem; font-size: .9rem; }
.attention-list small { display: block; margin-top: .1rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
th, td { padding: .52rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--muted); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
td:nth-last-child(2) { white-space: nowrap; }
.list-summary { color: var(--muted); font-size: .86rem; }
.key-values { display: grid; gap: .5rem; }
.key-values div { display: flex; justify-content: space-between; gap: .55rem; }
.key-values dt { color: var(--muted); }
.key-values dd { font-weight: 650; }

@media (max-width: 68rem) {
  .console-shell { grid-template-columns: 14rem minmax(0, 1fr); }
  .sidebar { padding-inline: .65rem; }
}
@media (max-width: 54rem) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 43rem) {
  .console-shell { display: block; }
  .sidebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .6rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin-block: .5rem; }
  .sidebar nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .19rem; }
  .nav-link { font-size: .83rem; gap: .33rem; padding: .38rem .45rem; }
  .nav-link svg { width: .9rem; height: .9rem; }
  .sidebar-footer { display: none; }
  .organization { padding: .45rem; }
  .organization small { font-size: .72rem; }
  .security-strip { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
}
@media (max-width: 26rem) {
  .access-header, .access-footer { width: calc(100% - 2rem); }
  .brand small { display: none; }
  .page { padding-inline: .65rem; }
  .filters { align-items: stretch; }
  .filters label { width: calc(50% - .35rem); }
  .filters select { min-width: 0; }
  .stage-list a { grid-template-columns: minmax(4.5rem, .8fr) minmax(1.5rem, 1fr) 1.2rem minmax(2.7rem, auto); gap: .33rem; padding-inline: .5rem; }
  .attention-list li { align-items: start; }
}

@media (pointer: coarse) {
  .nav-link, .text-link, .filters select, .filters .button { min-height: 2.75rem; }
}
