:root {
    color-scheme: light;
    --bg: #f0eadb;
    --bg-deep: #dcd2bd;
    --shell: #10261f;
    --shell-2: #17362d;
    --shell-3: #21463b;
    --surface: rgba(250, 246, 237, 0.86);
    --surface-2: rgba(245, 239, 226, 0.92);
    --surface-3: rgba(255, 252, 246, 0.96);
    --surface-ink: rgba(15, 28, 23, 0.08);
    --ink: #13211c;
    --ink-soft: #40524b;
    --ink-faint: #697970;
    --line: rgba(19, 33, 28, 0.14);
    --line-strong: rgba(19, 33, 28, 0.24);
    --shell-line: rgba(255, 244, 219, 0.14);
    --accent: #184b3b;
    --accent-2: #286654;
    --accent-3: #75ab96;
    --signal: #eba93f;
    --signal-soft: rgba(235, 169, 63, 0.14);
    --warn: #996021;
    --warn-soft: rgba(153, 96, 33, 0.12);
    --danger: #a23c2f;
    --danger-soft: rgba(162, 60, 47, 0.12);
    --success: #2f7556;
    --success-soft: rgba(47, 117, 86, 0.12);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-shell: 0 26px 72px rgba(7, 16, 13, 0.26);
    --shadow-surface: 0 16px 40px rgba(18, 28, 25, 0.08);
    --shadow-thin: 0 10px 24px rgba(18, 28, 25, 0.05);
    --title-font: "Bahnschrift SemiCondensed", "Aptos Display", "Segoe UI Variable Display", "Microsoft YaHei", sans-serif;
    --body-font: "Aptos", "Segoe UI Variable Text", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--body-font);
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 0%, rgba(117, 171, 150, 0.22), transparent 24%),
        radial-gradient(circle at 88% 6%, rgba(235, 169, 63, 0.18), transparent 18%),
        linear-gradient(180deg, #f7f2e8 0%, var(--bg) 56%, var(--bg-deep) 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(19, 33, 28, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(19, 33, 28, 0.026) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.64), transparent 78%);
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

code {
    font-family: "Consolas", "Cascadia Mono", "SFMono-Regular", monospace;
}

#app {
    min-height: 100vh;
}

.app-shell {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100vh;
    max-height: 100vh;
    padding: 22px 18px 20px;
    overflow: auto;
    color: #f6f1e4;
    background:
        radial-gradient(circle at top left, rgba(235, 169, 63, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(17, 35, 29, 0.99), rgba(11, 23, 20, 0.99));
    border-right: 1px solid rgba(255, 244, 219, 0.08);
    box-shadow: var(--shadow-shell);
}

.sidebar::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.mini-table-wrap::-webkit-scrollbar,
.trace-log-stream::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.sidebar::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.mini-table-wrap::-webkit-scrollbar-thumb,
.trace-log-stream::-webkit-scrollbar-thumb {
    background: rgba(107, 145, 130, 0.42);
    border-radius: 999px;
}

.sidebar-head {
    padding: 0 4px 6px;
    border-bottom: 1px solid rgba(255, 244, 219, 0.08);
}

.brand-kicker,
.eyebrow,
.meta-kicker,
.summary-label,
.signal-row-label,
.sidebar-band-label,
.footer-label,
.quick-link-label,
.nav-group-title,
.route-bar-label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
}

.brand-kicker,
.eyebrow {
    margin: 0 0 10px;
    color: #e7c277;
}

.brand-title,
.page-title,
.page-hero h3,
.panel-header h3,
.summary-card strong,
.signal-row strong,
.meta-cluster strong,
.sidebar-band strong,
.quick-link-card strong,
.top-signal-chip strong,
.route-command-primary strong,
.route-command-cell strong {
    font-family: var(--title-font);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-title {
    margin: 0;
    font-size: clamp(1.72rem, 2vw, 2.3rem);
    line-height: 0.98;
}

.brand-copy,
.hero-copy,
.topbar-copy,
.summary-copy,
.panel-subtitle,
.muted-copy,
.detail-row span,
.detail-list,
.metric-bullet-row p,
.stack-list-row p,
.toolbar-copy,
.trace-log-message,
.table-secondary,
.nav-group-copy,
.nav-link-desc,
.nav-link-meta,
.signal-row p,
.meta-cluster p,
.sidebar-band p,
.top-signal-chip p,
.route-command-primary p {
    line-height: 1.55;
}

.brand-copy {
    margin: 10px 0 0;
    color: rgba(246, 241, 228, 0.76);
}

.sidebar-band {
    display: grid;
    gap: 6px;
    padding: 12px 0 14px;
    border-top: 1px solid rgba(255, 244, 219, 0.08);
}

.sidebar-band strong {
    font-size: 1.08rem;
}

.sidebar-band-label {
    color: rgba(246, 241, 228, 0.54);
}

.sidebar-band p {
    margin: 0;
    color: rgba(246, 241, 228, 0.72);
}

.accent-band strong {
    color: #ffd995;
}

.signal-board,
.command-dock,
.sidebar-nav,
.sidebar-footer {
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 244, 219, 0.08);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: rgba(246, 241, 228, 0.78);
}

.section-heading span {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading strong,
.nav-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 244, 219, 0.12);
    background: rgba(255, 244, 219, 0.06);
    color: #fff0cc;
    font-size: 0.76rem;
}

.signal-grid {
    display: grid;
    gap: 10px;
}

.signal-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 80px) 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255, 244, 219, 0.1);
}

.signal-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.signal-row-label {
    color: rgba(246, 241, 228, 0.54);
}

.signal-row strong {
    font-size: 1rem;
    color: #fff2d6;
}

.signal-row p {
    margin: 0;
    color: rgba(246, 241, 228, 0.74);
    font-size: 0.84rem;
}

.signal-row.tone-warn strong,
.top-signal-chip.tone-warn strong,
.top-signal-chip.tone-warning strong {
    color: #f7c56a;
}

.signal-row.tone-danger strong,
.signal-row.tone-bad strong,
.top-signal-chip.tone-danger strong,
.top-signal-chip.tone-bad strong {
    color: #ff9384;
}

.signal-row.tone-good strong,
.signal-row.tone-success strong,
.top-signal-chip.tone-good strong,
.top-signal-chip.tone-success strong {
    color: #83d0a7;
}

.command-dock {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.command-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 244, 219, 0.12);
    background: rgba(255, 244, 219, 0.05);
    color: #fff0cf;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.command-pill:hover,
.command-pill:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(235, 169, 63, 0.46);
    background: rgba(235, 169, 63, 0.12);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-group[data-collapsed="true"] .nav-group-title::after {
    content: " legacy";
    color: rgba(246, 241, 228, 0.38);
}

.nav-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.nav-group-title {
    color: rgba(246, 241, 228, 0.6);
}

.nav-group-copy {
    margin: 6px 0 0;
    color: rgba(246, 241, 228, 0.48);
    font-size: 0.82rem;
}

.nav-group-links {
    display: grid;
    gap: 6px;
}

.nav-link {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 10px 0 12px;
    border-bottom: 1px dashed rgba(255, 244, 219, 0.1);
    text-decoration: none;
    transition: transform 160ms ease, opacity 160ms ease;
}

.nav-link:last-child {
    border-bottom: 0;
}

.nav-link:hover,
.nav-link:focus-visible {
    transform: translateX(4px);
}

.nav-link.active .nav-link-index {
    border-color: rgba(235, 169, 63, 0.5);
    color: #ffd995;
    background: rgba(235, 169, 63, 0.12);
}

.nav-link-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255, 244, 219, 0.12);
    color: rgba(246, 241, 228, 0.54);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
}

.nav-link-copy {
    display: grid;
    gap: 4px;
}

.nav-link-title {
    display: block;
    font-family: var(--title-font);
    font-size: 1rem;
    font-weight: 700;
    color: #f8f2e3;
}

.nav-link-desc {
    display: block;
    color: rgba(246, 241, 228, 0.82);
    font-size: 0.88rem;
}

.nav-link-meta {
    display: block;
    color: rgba(246, 241, 228, 0.48);
    font-size: 0.76rem;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-label {
    color: rgba(246, 241, 228, 0.54);
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    color: rgba(246, 241, 228, 0.84);
    text-decoration: none;
}

.ghost-link:hover,
.ghost-link:focus-visible {
    color: #fff2d6;
}

.workspace-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px 24px 28px;
}

.masthead {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 18px;
    align-items: stretch;
}

.masthead-copy-block,
.masthead-meta-grid,
.page-hero,
.panel,
.summary-card,
.toolbar-panel,
.filter-panel,
.inline-banner,
.quick-link-card,
.trace-log-item,
.usage-instance-card,
.top-signal-chip,
.route-command-bar {
    position: relative;
    overflow: hidden;
}

.masthead-copy-block {
    padding: 22px 24px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(235, 169, 63, 0.13), transparent 30%),
        linear-gradient(180deg, rgba(255, 252, 246, 0.95), rgba(245, 239, 226, 0.92));
    box-shadow: var(--shadow-thin);
}

.page-context {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 12px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(40, 102, 84, 0.16);
    background: rgba(40, 102, 84, 0.08);
    color: var(--accent-2);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    font-size: clamp(1.88rem, 3vw, 2.9rem);
    line-height: 0.98;
}

.topbar-copy {
    margin: 10px 0 0;
    color: var(--ink-soft);
}

.masthead-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.meta-cluster {
    padding: 16px 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.94), rgba(244, 238, 227, 0.9));
    box-shadow: var(--shadow-thin);
}

.meta-kicker {
    display: block;
    color: var(--ink-faint);
}

.meta-cluster strong {
    display: block;
    margin: 9px 0 6px;
    font-size: 1.08rem;
}

.meta-cluster p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.top-signal-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.top-signal-chip {
    display: grid;
    gap: 6px;
    padding: 14px 16px 15px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.92), rgba(245, 239, 226, 0.9));
}

.top-signal-chip span {
    color: var(--ink-faint);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.top-signal-chip strong {
    font-size: 1.18rem;
}

.top-signal-chip p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.route-command-bar {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(90deg, rgba(20, 52, 43, 0.96) 0%, rgba(20, 52, 43, 0.96) 36%, rgba(250, 246, 237, 0.88) 36%, rgba(250, 246, 237, 0.88) 100%);
    box-shadow: var(--shadow-thin);
}

.route-command-primary {
    padding: 18px 20px;
    color: #f6f1e4;
}

.route-command-primary strong {
    display: block;
    margin-top: 8px;
    font-size: 1.24rem;
}

.route-command-primary p {
    margin: 8px 0 0;
    color: rgba(246, 241, 228, 0.76);
}

.route-command-secondary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-command-cell {
    display: grid;
    gap: 6px;
    padding: 18px 18px 16px;
    border-left: 1px solid rgba(19, 33, 28, 0.08);
}

.route-command-cell span {
    color: var(--ink-faint);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.route-command-cell strong {
    font-size: 0.98rem;
    line-height: 1.42;
    color: var(--ink);
}

.route-command-cell.wide strong {
    font-size: 0.9rem;
}

.workspace {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.workspace > * {
    animation: panel-enter 300ms ease both;
}

.page-hero,
.panel,
.summary-card,
.toolbar-panel,
.filter-panel,
.inline-banner,
.quick-link-card,
.usage-instance-card {
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.94), rgba(245, 239, 226, 0.9));
    box-shadow: var(--shadow-thin);
}

.page-hero,
.panel,
.summary-card,
.toolbar-panel,
.filter-panel,
.quick-link-card,
.usage-instance-card {
    border-radius: 22px;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 24px;
}

.hero-command-center {
    align-items: stretch;
}

.page-hero h3 {
    margin: 0;
    font-size: clamp(1.56rem, 2vw, 2.22rem);
    max-width: 760px;
    line-height: 1.03;
}

.hero-copy {
    margin: 10px 0 0;
    color: var(--ink-soft);
}

.hero-overview {
    background:
        linear-gradient(90deg, rgba(20, 52, 43, 0.95) 0, rgba(20, 52, 43, 0.95) 18px, rgba(255, 252, 246, 0.94) 18px, rgba(245, 239, 226, 0.9) 100%);
}

.hero-observability {
    background:
        linear-gradient(90deg, rgba(32, 91, 74, 0.95) 0, rgba(32, 91, 74, 0.95) 18px, rgba(248, 252, 249, 0.95) 18px, rgba(240, 237, 228, 0.92) 100%);
}

.hero-control-plane {
    background:
        linear-gradient(90deg, rgba(64, 102, 85, 0.92) 0, rgba(64, 102, 85, 0.92) 18px, rgba(252, 250, 243, 0.95) 18px, rgba(243, 237, 226, 0.92) 100%);
}

.hero-billing {
    background:
        linear-gradient(90deg, rgba(146, 93, 34, 0.92) 0, rgba(146, 93, 34, 0.92) 18px, rgba(255, 249, 242, 0.96) 18px, rgba(246, 239, 229, 0.92) 100%);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-content: flex-start;
    gap: 10px;
    min-width: 220px;
}

.hero-actions-stack {
    align-content: flex-start;
}

.summary-grid,
.panel-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.command-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.92fr;
    gap: 16px;
}

.situation-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(244, 238, 227, 0.92));
    box-shadow: var(--shadow-thin);
}

.pressure-strip-cell {
    display: grid;
    gap: 8px;
    padding: 18px 20px 20px;
    border-right: 1px solid rgba(19, 33, 28, 0.08);
}

.pressure-strip-cell:last-child {
    border-right: 0;
}

.pressure-strip-cell strong {
    font-family: var(--title-font);
    font-size: 1.24rem;
    line-height: 1.04;
}

.pressure-strip-cell p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.operator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 16px;
}

.summary-card {
    padding: 16px 18px 16px 22px;
    border-left: 4px solid rgba(24, 75, 59, 0.22);
}

.summary-label {
    display: block;
    margin-bottom: 10px;
    color: var(--ink-faint);
}

.summary-card strong {
    display: block;
    font-size: 1.18rem;
    line-height: 1.06;
}

.summary-copy {
    margin: 9px 0 0;
    color: var(--ink-soft);
}

.emphasis-card,
.highlight-panel {
    border-left: 4px solid rgba(235, 169, 63, 0.34);
}

.accent-panel {
    border-left: 4px solid rgba(40, 102, 84, 0.26);
}

.panel-header,
.panel-body {
    padding: 18px 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid rgba(19, 33, 28, 0.08);
}

.panel-header h3,
.panel-body p {
    margin: 0;
}

.panel-header h3 {
    font-size: 1.15rem;
}

.panel-subtitle {
    margin: 8px 0 0;
    color: var(--ink-soft);
}

.panel-body p,
.muted-copy {
    color: var(--ink-soft);
}

.quick-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 18px 18px 20px;
    border-left: 4px solid rgba(24, 75, 59, 0.22);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.quick-link-card:hover,
.quick-link-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-surface);
    border-left-color: rgba(24, 75, 59, 0.42);
}

.quick-link-card.static-card:hover,
.quick-link-card.static-card:focus-visible {
    transform: none;
}

.quick-link-label,
.quick-link-meta {
    color: var(--ink-faint);
}

.quick-link-card strong {
    font-size: 1rem;
    line-height: 1.42;
}

.risk-list,
.stack-list,
.detail-stack,
.stack-panels,
.usage-group-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-bullet-row,
.stack-list-row,
.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(19, 33, 28, 0.12);
}

.metric-bullet-row:last-child,
.stack-list-row:last-child,
.detail-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.metric-bullet-row p,
.stack-list-row p {
    margin: 6px 0 0;
}

.metric-bullet-value {
    min-width: 52px;
    text-align: right;
    font-family: var(--title-font);
    font-size: 1.14rem;
    font-weight: 700;
    color: var(--accent);
}

.auth-gate-panel {
    border-left: 4px solid rgba(153, 96, 33, 0.3);
}

.tag-rail,
.tag-collection,
.provider-type-chips,
.status-rail,
.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag,
.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
    font-size: 0.84rem;
}

.strong-tag {
    border-color: rgba(24, 75, 59, 0.22);
    background: rgba(24, 75, 59, 0.08);
}

.detail-list {
    margin: 14px 0 0;
    padding-left: 18px;
}

.pressure-strip,
.provider-band-list,
.ranked-action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evidence-callout,
.provider-band,
.ranked-action-row {
    padding: 14px 0;
    border-bottom: 1px dashed rgba(19, 33, 28, 0.12);
}

.evidence-callout:last-child,
.provider-band:last-child,
.ranked-action-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.evidence-callout strong,
.provider-band strong,
.ranked-action-row strong {
    display: block;
    font-family: var(--title-font);
    font-size: 1.02rem;
}

.evidence-callout p,
.provider-band p,
.ranked-action-row p {
    margin: 8px 0 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.ranked-action-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) minmax(180px, 0.7fr);
    gap: 14px;
    align-items: start;
    text-decoration: none;
    transition: transform 160ms ease, opacity 160ms ease;
}

.ranked-action-row:hover,
.ranked-action-row:focus-visible {
    transform: translateX(4px);
}

.ranked-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(24, 75, 59, 0.16);
    background: rgba(24, 75, 59, 0.06);
    color: var(--accent);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
}

.ranked-meta {
    color: var(--ink-faint);
    font-size: 0.84rem;
    line-height: 1.55;
}

.compact-list {
    margin-top: 0;
}

.detail-row span {
    color: var(--ink-faint);
}

.toolbar-panel,
.filter-panel {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
}

.toolbar-panel-warn,
.inline-banner.warn {
    border-left: 4px solid rgba(153, 96, 33, 0.36);
    background: linear-gradient(180deg, rgba(254, 248, 238, 0.96), rgba(248, 237, 219, 0.92));
}

.toolbar-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.filter-field span,
.filter-check span {
    color: var(--ink-faint);
    font-size: 0.84rem;
    letter-spacing: 0.03em;
}

.filter-field input,
.filter-field select {
    min-height: 46px;
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: rgba(24, 75, 59, 0.44);
    box-shadow: 0 0 0 3px rgba(24, 75, 59, 0.12);
    background: #ffffff;
}

.filter-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--ink);
}

.filter-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-2);
}

.action-button,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fbf7ed;
    cursor: pointer;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.action-button:hover,
.link-button:hover,
.action-button:focus-visible,
.link-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(24, 75, 59, 0.16);
}

.action-button.secondary,
.link-button.secondary {
    background: transparent;
    color: var(--accent);
}

.action-button.danger {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff7f5;
}

.inline-banner {
    padding: 12px 14px 12px 18px;
    border-left: 4px solid rgba(24, 75, 59, 0.24);
}

.small-banner,
.small-copy {
    font-size: 0.86rem;
}

.provider-type-header {
    align-items: center;
}

.table-wrap,
.mini-table-wrap {
    overflow: auto;
}

.trace-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.trace-table th,
.trace-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(19, 33, 28, 0.08);
    text-align: left;
    vertical-align: top;
}

.trace-table th {
    position: sticky;
    top: 0;
    background: rgba(247, 243, 236, 0.98);
    z-index: 1;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.trace-table tbody tr:hover {
    background: rgba(24, 75, 59, 0.03);
}

.table-primary {
    font-weight: 700;
}

.table-secondary {
    margin-top: 4px;
    color: var(--ink-faint);
    font-size: 0.8rem;
}

.terminal-state-cell {
    display: grid;
    gap: 4px;
    min-width: 220px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-badge.ok {
    color: var(--success);
    background: var(--success-soft);
}

.status-badge.warn {
    color: var(--warn);
    background: var(--warn-soft);
}

.status-badge.danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.trace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trace-span-2 {
    grid-column: span 2;
}

.trace-log-stream {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow: auto;
}

.dense-log-stream {
    max-height: 500px;
}

.trace-log-item {
    display: grid;
    grid-template-columns: 76px 96px 1fr;
    gap: 10px;
    padding: 11px 12px 11px 14px;
    border: 1px solid var(--line);
    border-left: 4px solid rgba(24, 75, 59, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
}

.trace-log-level {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-2);
}

.trace-log-time {
    color: var(--ink-faint);
}

.trace-log-message {
    white-space: pre-wrap;
    word-break: break-word;
}

.signal-item[data-kind="warn"],
.signal-item[data-kind="quota"],
.signal-item[data-kind="tail-flush"] {
    border-left-color: rgba(153, 96, 33, 0.42);
}

.signal-item[data-kind="error"],
.signal-item[data-kind="transient"],
.signal-item[data-kind="incomplete"] {
    border-left-color: rgba(162, 60, 47, 0.44);
}

.signal-item[data-kind="completed"],
.signal-item[data-kind="synthetic-complete"] {
    border-left-color: rgba(47, 117, 86, 0.42);
}

.usage-card-grid,
.provider-highlight-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provider-highlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.usage-instance-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 16px 16px 20px;
    border-left: 4px solid rgba(24, 75, 59, 0.22);
}

.usage-instance-card.success {
    border-left-color: rgba(47, 117, 86, 0.36);
}

.usage-instance-card.error {
    border-left-color: rgba(162, 60, 47, 0.36);
}

.usage-instance-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.usage-instance-name,
.usage-instance-meta {
    margin: 0;
}

.usage-instance-name {
    font-weight: 700;
}

.usage-instance-meta {
    margin-top: 6px;
    color: var(--ink-faint);
    font-size: 0.84rem;
    word-break: break-word;
}

.usage-progress-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-progress-track {
    position: relative;
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(19, 33, 28, 0.08);
}

.usage-progress-fill {
    height: 100%;
}

.usage-progress-fill.ok {
    background: linear-gradient(90deg, rgba(47, 117, 86, 0.76), rgba(117, 171, 150, 0.96));
}

.usage-progress-fill.warn {
    background: linear-gradient(90deg, rgba(153, 96, 33, 0.8), rgba(235, 169, 63, 0.96));
}

.usage-progress-fill.danger {
    background: linear-gradient(90deg, rgba(162, 60, 47, 0.82), rgba(224, 111, 96, 0.96));
}

.usage-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink-faint);
    font-size: 0.86rem;
}

.compact-detail-stack {
    gap: 10px;
}

.compact-table {
    font-size: 0.84rem;
}

.compact-table th,
.compact-table td {
    padding: 8px 10px;
}

.error-state {
    display: grid;
    place-items: center;
    min-height: 100vh;
    gap: 16px;
    text-align: center;
    padding: 24px;
}

@keyframes panel-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1440px) {
    .app-shell {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .masthead {
        grid-template-columns: 1fr;
    }

    .masthead-meta-grid,
    .provider-highlight-grid,
    .dashboard-summary-grid,
    .top-signal-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .command-grid,
    .route-command-bar,
    .operator-grid {
        grid-template-columns: 1fr;
    }

    .route-command-secondary {
        border-top: 1px solid rgba(19, 33, 28, 0.08);
    }
}

@media (max-width: 1080px) {
    .app-shell {
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        position: static;
        min-height: auto;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 244, 219, 0.1);
        box-shadow: none;
    }

    .nav-group-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-shell {
        padding-top: 18px;
    }

    .page-hero,
    .masthead {
        flex-direction: column;
    }

    .hero-actions,
    .status-rail {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .workspace-shell,
    .sidebar {
        padding: 16px;
    }

    .signal-row,
    .nav-group-links,
    .situation-board,
    .summary-grid,
    .panel-grid,
    .trace-grid,
    .dashboard-summary-grid,
    .dashboard-panel-grid,
    .quick-link-grid,
    .masthead-meta-grid,
    .provider-highlight-grid,
    .usage-card-grid,
    .filter-grid,
    .top-signal-strip,
    .route-command-secondary {
        grid-template-columns: 1fr;
    }

    .pressure-strip-cell {
        border-right: 0;
        border-bottom: 1px solid rgba(19, 33, 28, 0.08);
    }

    .pressure-strip-cell:last-child {
        border-bottom: 0;
    }

    .trace-span-2 {
        grid-column: auto;
    }

    .trace-log-item {
        grid-template-columns: 1fr;
    }

    .detail-row,
    .usage-instance-head,
    .usage-progress-meta,
    .metric-bullet-row,
    .stack-list-row,
    .toolbar-panel,
    .signal-row,
    .ranked-action-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .signal-row {
        display: flex;
        gap: 6px;
    }

    .ranked-action-row {
        display: flex;
    }

    .metric-bullet-value {
        text-align: left;
    }

    .page-title {
        font-size: clamp(1.56rem, 6vw, 2.14rem);
    }

    .page-hero h3 {
        font-size: clamp(1.34rem, 5vw, 1.8rem);
    }

    .command-pill,
    .action-button,
    .link-button {
        width: 100%;
        justify-content: center;
    }
}
