:root,
html[data-theme="azure"] {
    color-scheme: dark;
    --bg: #0b0f14;
    --bg-elev-1: #10161d;
    --bg-elev-2: #151d26;
    --bg-elev-3: #1a2430;
    --panel: #0f141b;
    --panel-2: #131a22;
    --panel-3: #18212c;
    --border: #2a3645;
    --border-strong: #405268;
    --border-accent: #4d6b8a;
    --text: #d7e0ea;
    --text-soft: #a3b1c1;
    --text-dim: #7b8a9a;
    --accent: #8fd3ff;
    --accent-2: #72f0c4;
    --warn: #ffd580;
    --danger: #ff8f8f;
    --accent-rgb: 143, 211, 255;
    --accent-2-rgb: 114, 240, 196;
    --shadow: 0 0 0 1px rgba(143, 211, 255, 0.03), 0 8px 30px rgba(0, 0, 0, 0.35);
    --loader-color: #8fd3ff;
    --loader-glow: rgba(143, 211, 255, 0.75);
    --header-h: 3rem;
    --utility-h: 2.8rem;
    --sidebar-w: 18rem;
    --sidebar-collapsed-w: 2.75rem;
    --content-max: 1200px;
    --font-ui: "Segoe UI", "Inter", system-ui, sans-serif;
    --font-mono: "Cascadia Code", "Consolas", "SFMono-Regular", "Courier New", monospace;
    --line: 1.45;
}

html[data-theme="grey"] {
    --bg: #121416;
    --bg-elev-1: #181b1e;
    --bg-elev-2: #202429;
    --bg-elev-3: #272d34;
    --panel: #171a1d;
    --panel-2: #1d2125;
    --panel-3: #242a31;
    --border: #3a4147;
    --border-strong: #59616a;
    --border-accent: #78818a;
    --text: #e3e6e8;
    --text-soft: #c0c5ca;
    --text-dim: #90979e;
    --accent: #d5d9dd;
    --accent-2: #aeb5bc;
    --warn: #ded5c3;
    --danger: #dba9a9;
    --accent-rgb: 213, 217, 221;
    --accent-2-rgb: 174, 181, 188;
    --shadow: 0 0 0 1px rgba(213, 217, 221, 0.02), 0 10px 26px rgba(0, 0, 0, 0.38);
    --loader-color: #d5d9dd;
    --loader-glow: rgba(213, 217, 221, 0.45);
}

html[data-theme="orange"] {
    --bg: #110904;
    --bg-elev-1: #1b0f08;
    --bg-elev-2: #25150c;
    --bg-elev-3: #301b10;
    --panel: #170d08;
    --panel-2: #21120b;
    --panel-3: #2c180f;
    --border: #5d3520;
    --border-strong: #8f4c28;
    --border-accent: #d86d22;
    --text: #f3ddd0;
    --text-soft: #e2beaa;
    --text-dim: #b88d73;
    --accent: #fd7000;
    --accent-2: #ffbf66;
    --warn: #ffd27a;
    --danger: #ff9a73;
    --accent-rgb: 253, 112, 0;
    --accent-2-rgb: 255, 191, 102;
    --shadow: 0 0 0 1px rgba(253, 112, 0, 0.08), 0 0 28px rgba(253, 112, 0, 0.12), 0 14px 36px rgba(0, 0, 0, 0.45);
    --loader-color: #fd7000;
    --loader-glow: rgba(253, 112, 0, 0.85);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    line-height: var(--line);
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 24px 24px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

code,
pre,
kbd,
.tui-mono {
    font-family: var(--font-mono);
}

h1:focus {
    outline: none;
}

#app {
    min-height: 100vh;
}

.tui-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: var(--header-h) minmax(0, 1fr);
    background:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.04), transparent 30%),
        radial-gradient(circle at top right, rgba(var(--accent-2-rgb), 0.03), transparent 25%),
        var(--bg);
}

.tui-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: stretch;
    border-bottom: 1px solid var(--border-strong);
    background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev-1));
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 30;
}

.tui-brand {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-right: 1px solid var(--border);
    font-family: var(--font-mono);
    color: var(--accent-2);
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.tui-brand:hover {
    text-decoration: none;
    color: var(--accent);
}

.tui-topnav {
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
}

.tui-topnav a {
    border-right: 1px solid var(--border);
    background: transparent;
    color: var(--text-soft);
    padding: 0 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.tui-topnav a:hover {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text);
    text-decoration: none;
}

.tui-topnav a.active {
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.08));
    color: var(--accent);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.tui-header-side {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 1rem;
    border-left: 1px solid var(--border);
    font-family: var(--font-mono);
    color: var(--text-soft);
    white-space: nowrap;
}

.tui-status-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    flex: 0 0 auto;
    background: #72f0a8;
    box-shadow: 0 0 0.75rem rgba(114, 240, 168, 0.45);
}

.tui-settings {
    position: relative;
}

.tui-settings > summary {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    color: var(--text-soft);
    font: 1.35rem "Segoe UI Symbol", sans-serif;
    list-style: none;
    cursor: pointer;
}

.tui-settings > summary::-webkit-details-marker { display: none; }
.tui-settings > summary:hover,
.tui-settings[open] > summary {
    border-color: var(--border-accent);
    color: var(--accent);
    background: var(--bg-elev-2);
}

.tui-settings > summary:focus-visible,
.tui-section-tabs a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.tui-settings-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    z-index: 40;
    display: grid;
    gap: 0.75rem;
    width: min(15rem, calc(100vw - 2rem));
    padding: 1rem;
    border: 1px solid var(--border-strong);
    border-radius: 0.35rem;
    background: var(--bg-elev-1);
    box-shadow: var(--shadow);
}

.tui-settings-title { font-size: 0.8rem; color: var(--text-soft); }
.tui-settings-panel .tui-theme-switch {
    display: grid;
    gap: 0.45rem;
    justify-content: stretch;
    padding: 0;
    border: 0;
    min-height: 0;
}
.tui-settings-panel .tui-theme-button { text-align: left; padding: 0.6rem 0.75rem; }
.tui-settings-admin { border-top: 1px solid var(--border); padding-top: 0.75rem; font-size: 0.8rem; }
.tui-section-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.2rem; }
.tui-section-tabs a {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border);
    color: var(--text-soft);
    font: 0.86rem var(--font-mono);
    text-decoration: none;
}
.tui-section-tabs a:hover,
.tui-section-tabs a[aria-current="page"] {
    border-color: var(--border-accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.09);
}
.layout-about .tui-content-wrap { width: 100%; max-width: 72rem; margin-inline: auto; }
.layout-about .tui-article p,
.layout-about .tui-article li { max-width: 78ch; line-height: 1.75; }
.pathwright-blazor-module-frame__toolbar > summary { cursor: pointer; color: var(--text-soft); }

.tui-utilitybar {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: var(--content-max);
    min-width: 0;
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
}

.tui-utility-widget,
.tui-utility-marquee,
.tui-theme-switch {
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0 0.85rem;
    border-right: 1px solid var(--border);
    min-height: var(--utility-h);
}

.tui-utility-widget {
    gap: 0.6rem;
}

.tui-utility-label {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tui-utility-value,
.tui-utility-marquee {
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.tui-utility-marquee {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tui-theme-switch {
    gap: 0.45rem;
    justify-content: flex-end;
    border-right: 0;
}

.tui-theme-button {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-soft);
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.tui-theme-button:hover {
    border-color: var(--border-accent);
    color: var(--text);
    background: rgba(var(--accent-rgb), 0.08);
}

.tui-theme-button.active {
    color: var(--accent);
    border-color: var(--border-accent);
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.06));
    box-shadow: inset 0 -2px 0 var(--accent), 0 0 18px rgba(var(--accent-rgb), 0.12);
}

.tui-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
}

.tui-shell[data-has-sidebar="true"] > .tui-main {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

.tui-shell[data-has-sidebar="true"][data-sidebar-collapsed="true"] > .tui-main {
    grid-template-columns: var(--sidebar-collapsed-w) minmax(0, 1fr);
}

.tui-sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-strong);
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    min-height: calc(100vh - var(--header-h));
    overflow: auto;
}

.tui-shell[data-has-sidebar="false"] .tui-sidebar {
    display: none;
}

.tui-sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 2.35rem;
    padding: 0.45rem 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    background: rgba(var(--accent-rgb), 0.025);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
}

.tui-sidebar-toggle:hover,
.tui-sidebar-toggle:focus-visible {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.09);
    outline: none;
}

.tui-sidebar-toggle:focus-visible {
    box-shadow: inset 0 0 0 1px var(--border-accent);
}

.tui-sidebar-toggle-glyph {
    color: var(--accent);
    font-size: 1.15rem;
    line-height: 1;
}

.tui-sidebar-body {
    min-width: var(--sidebar-w);
}

.tui-sidebar[data-collapsed="true"] {
    overflow: hidden;
}

.tui-sidebar[data-collapsed="true"] .tui-sidebar-toggle {
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    min-height: calc(100vh - var(--header-h));
    padding: 0.75rem 0.35rem;
    border-bottom: 0;
}

.tui-sidebar[data-collapsed="true"] .tui-sidebar-toggle-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
}

.tui-sidebar[data-collapsed="true"] .tui-sidebar-body {
    display: none;
}

.tui-sidebar-section {
    border-bottom: 1px solid var(--border);
}

.tui-sidebar-title {
    display: flex;
    align-items: center;
    padding: 0.8rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.05em;
}

.tui-sidebar-copy {
    padding: 0.85rem 0.9rem 1rem;
}

.tui-sidebar-copy p {
    margin: 0 0 0.75rem;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.tui-sidebar-copy p:last-child {
    margin-bottom: 0;
}

.tui-tree {
    --tree-rail-x: 0.1rem;
    --tree-glyph-x: 1.0rem;
    --tree-label-x: 2.2rem;
    --tree-row-min-h: 2rem;
    --tree-glyph-font: Consolas, "Courier New", monospace;
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
}

.tui-tree li {
    margin: 0;
    padding: 0;
}

.tui-tree .tree-group-label,
.tui-tree .tree-branch-label,
.tui-tree .tree-item > a,
.tui-tree .tree-group-route,
.tui-tree .tree-branch-route {
    display: flex;
    align-items: center;
    min-height: var(--tree-row-min-h);
    color: var(--text-soft);
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.tui-tree .tree-group-header,
.tui-tree .tree-branch-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.tui-tree .tree-group-label,
.tui-tree .tree-branch-label {
    width: 100%;
    gap: 0.55rem;
    font-family: var(--font-mono);
    color: var(--text);
    line-height: 1.1rem;
}

.tui-tree .tree-group-label {
    padding: 0.45rem 0.4rem 0.35rem 0.85rem;
}

.tui-tree .tree-branch-label {
    padding: 0.35rem 0.4rem 0.35rem var(--tree-label-x);
}

.tui-tree .tree-disclosure-glyph::before {
    content: "▸";
    color: var(--text-dim);
}

.tui-tree button[aria-expanded="true"] > .tree-disclosure-glyph::before {
    content: "▾";
    color: var(--accent);
}

.tui-tree .tree-group-route,
.tui-tree .tree-branch-route {
    justify-content: center;
    width: 2.15rem;
    padding: 0;
    border-left: 1px solid transparent;
    font-family: var(--font-mono);
    text-decoration: none;
}

.tui-tree .tree-group-route.active,
.tui-tree .tree-branch-route.active {
    color: var(--accent);
    border-left-color: var(--border);
    background: rgba(var(--accent-rgb), 0.08);
}

.tui-tree .tree-children {
    list-style: none;
    margin: 0 0 0 1rem;
    padding: 0;
}

.tui-tree .tree-item {
    position: relative;
}

.tui-tree .tree-item::before {
    content: "";
    position: absolute;
    left: var(--tree-rail-x);
    top: -0.25rem;
    bottom: -0.25rem;
    border-left: 1px dashed rgba(var(--accent-rgb), 0.26);
    pointer-events: none;
}

.tui-tree .tree-item:last-child::before {
    bottom: 50%;
}

.tui-tree .tree-item > a {
    position: relative;
    padding: 0.35rem 0.85rem 0.35rem var(--tree-label-x);
}

.tui-tree .tree-item > a::before {
    content: "├─";
    position: absolute;
    left: var(--tree-glyph-x);
    top: 50%;
    transform: translateY(-40%) scaleY(1.8);
    color: var(--text-dim);
    font-family: var(--tree-glyph-font);
    font-size: 1.05em;
    font-kerning: none;
    letter-spacing: -0.05em;
    line-height:.8;
    white-space: pre;
    transform-origin: center;
}

.tui-tree .tree-item:last-child > a::before {
    content: "└─";
}

.tui-tree .tree-item > a:hover,
.tui-tree .tree-group-label:hover,
.tui-tree .tree-branch-label:hover,
.tui-tree .tree-group-route:hover,
.tui-tree .tree-branch-route:hover {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text);
    text-decoration: none;
}

.tui-tree .tree-item > a.active {
    color: var(--accent);
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), transparent 80%);
    box-shadow: inset 2px 0 0 var(--accent);
}

.tui-tree .tree-item > a.active::before {
    color: var(--accent);
}

.tui-content-wrap {
    min-width: 0;
    padding: 1rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tui-content {
    max-width: var(--content-max);
    min-width: 0;
    width: 100%;
}

.tui-content-frame--landing-frame {
    max-width: min(100%, 96rem);
    margin-inline: auto;
}

.tui-content-frame--content-frame {
    max-width: var(--content-max);
}

.tui-content-frame--module-frame {
    max-width: none;
    min-height: calc(100vh - var(--header-h) - var(--utility-h) - 2rem);
}

.pathwright-template,
.pathwright-hybrid-surface {
    min-width: 0;
}

.pathwright-home {
    padding: clamp(1.25rem, 4vw, 4rem);
    border: 1px solid var(--border);
    background: var(--panel);
}

.home-intro {
    max-width: 68rem;
    padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.home-eyebrow {
    display: block;
    margin: 0 0 1.2rem;
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    text-transform: uppercase;
}

.home-intro h1 {
    margin: 0 0 1.5rem;
    color: var(--text);
}

/* Match the original panel-heading typography within the landing layout. */
.home-intro h1,
.home-section-label h2 {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: var(--line);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.home-lead {
    max-width: 54ch;
    margin: 0 0 1rem;
    color: var(--text);
}

.home-intro-copy {
    max-width: 74ch;
    margin: 0;
    color: var(--text-soft);
}

.home-entry-points {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
    border-block: 1px solid var(--border-strong);
}

.home-entry {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
    padding: 1.5rem;
    border-right: 1px solid var(--border);
}

.home-entry:last-child {
    border-right: 0;
}

.home-entry:hover {
    background: var(--panel-2);
    text-decoration: none;
}

.home-entry-number {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.home-entry-title {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.home-entry:hover .home-entry-title {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.home-entry-summary {
    color: var(--text-soft);
    font-size: 0.94rem;
}

.home-section {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    padding-block: clamp(2rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--border);
}

.home-section-label h2 {
    max-width: 22ch;
    margin: 0;
    scroll-margin-top: 12rem;
}

.home-prose {
    max-width: 72ch;
    color: var(--text-soft);
}

.home-prose p {
    margin: 0 0 1.25rem;
}

.home-prose > :last-child {
    margin-bottom: 0;
}

.home-content-kinds {
    margin: 1.5rem 0;
}

.home-content-kinds > div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 1rem;
    padding-block: 0.75rem;
    border-top: 1px solid var(--border);
}

.home-content-kinds dt {
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 600;
}

.home-content-kinds dd {
    margin: 0;
}

.home-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
}

.pathwright-home a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

@media (max-width: 1100px) {
    .home-entry-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-entry:nth-child(2) {
        border-right: 0;
    }

    .home-entry:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 640px) {
    .home-entry {
        padding: 1rem 0.75rem;
    }

    .home-section {
        grid-template-columns: 1fr;
    }

    .home-content-kinds > div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

@media (max-width: 380px) {
    .home-entry-points {
        grid-template-columns: 1fr;
    }

    .home-entry:not(:last-child) {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

.pathwright-hybrid-surface__mount:empty {
    display: none;
}

.tui-secondary-region {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: var(--content-max);
    min-width: 0;
}

.tui-secondary-region:empty {
    display: none;
}

.tui-content > *:last-child {
    margin-bottom: 0;
}

.tui-shell[data-has-utility-bar="false"] .tui-utilitybar {
    display: none;
}

.tui-panel,
.tui-window,
.tui-article {
    margin-bottom: 1rem;
}

.tui-panel {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
}

.tui-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.5rem;
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.tui-panel-title {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    color: var(--accent-2);
    text-transform: uppercase;
}

.tui-panel-meta {
    color: var(--text-dim);
    font-size: 0.88rem;
    font-family: var(--font-mono);
}

.tui-panel-body {
    padding: 1rem;
}

.tui-window {
    border: 1px solid var(--border-strong);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.tui-window-titlebar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-elev-3), var(--bg-elev-2));
    font-family: var(--font-mono);
}

.tui-window-controls {
    display: inline-flex;
    gap: 0.35rem;
    margin-right: 0.35rem;
}

.tui-window-controls > span {
    width: 0.65rem;
    height: 0.65rem;
    border: 1px solid var(--border-accent);
    display: inline-block;
    background: rgba(var(--accent-rgb), 0.12);
}

.tui-window-title {
    color: var(--text-soft);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.tui-window-body {
    padding: 1rem;
}

.tui-article {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
}

.tui-article-header {
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.tui-article-title {
    margin: 0 0 0.5rem;
    font-size: 1.55rem;
    line-height: 1.2;
    color: var(--text);
}

.tui-article-meta {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.tui-article-body {
    padding: 1rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.tui-article-body h1,
.tui-article-body h2,
.tui-article-body h3,
.tui-article-body h4,
.tui-article-body h5,
.tui-article-body h6 {
    color: var(--accent-2);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.tui-article-body p,
.tui-article-body li,
.tui-article-body dd,
.tui-article-body figcaption,
.tui-article-body td {
    color: var(--text-soft);
}

.tui-article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(var(--accent-rgb), 0.55);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

.tui-article-body a:hover,
.tui-article-body a:focus-visible {
    color: var(--accent-2);
    text-decoration-color: currentColor;
}

.tui-article-body hr {
    height: 1px;
    margin: 1.5rem 0;
    border: 0;
    background: var(--border-strong);
}

.tui-article-body figure {
    max-width: 100%;
    margin: 1.25rem 0;
}

.tui-article-body img,
.tui-article-body picture,
.tui-article-body video {
    max-width: 100%;
}

.tui-article-body img,
.tui-article-body video {
    height: auto;
}

.tui-article-body figure > img,
.tui-article-body figure > picture,
.tui-article-body figure > video {
    display: block;
    margin-inline: auto;
}

.tui-article-body figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.tui-article-body dl {
    margin: 1rem 0;
}

.tui-article-body dt {
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-weight: 600;
}

.tui-article-body dd {
    margin: 0.25rem 0 1rem 1.25rem;
}

.tui-article-body table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
    overflow-x: auto;
    border-collapse: collapse;
    border: 1px solid var(--border);
    background: var(--panel);
}

.tui-article-body caption {
    padding: 0.55rem 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-align: left;
}

.tui-article-body th,
.tui-article-body td {
    padding: 0.6rem 0.75rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.tui-article-body th {
    color: var(--accent-2);
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.025);
}

.tui-article-body tr:last-child > td {
    border-bottom: 0;
}

.tui-article-body th:last-child,
.tui-article-body td:last-child {
    border-right: 0;
}

.tui-article-body blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text-soft);
}

.tui-article-body pre {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    background: #081018;
    color: #d9f5ff;
    border: 1px solid var(--border);
    overflow: auto;
}

.tui-article-body code {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    padding: 0.08rem 0.3rem;
}

.tui-grid {
    display: grid;
    gap: 1rem;
}

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

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

.tui-card {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border);
    padding: 0.9rem;
    box-shadow: var(--shadow);
}

.tui-card:hover {
    border-color: var(--border-accent);
    background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
}

.tui-card-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: var(--text);
}

.tui-card-meta {
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.tui-card-summary {
    color: var(--text-soft);
    font-size: 0.94rem;
}

.tui-swatch {
    height: 4rem;
    margin-bottom: 0.85rem;
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tui-swatch.azure {
    background:
        radial-gradient(circle at 20% 25%, rgba(143, 211, 255, 0.34), transparent 35%),
        linear-gradient(135deg, #10161d, #1a2430 55%, #0f141b);
}

.tui-swatch.grey {
    background:
        radial-gradient(circle at 20% 25%, rgba(213, 217, 221, 0.24), transparent 35%),
        linear-gradient(135deg, #181b1e, #272d34 55%, #171a1d);
}

.tui-swatch.orange {
    background:
        radial-gradient(circle at 20% 25%, rgba(253, 112, 0, 0.36), transparent 35%),
        linear-gradient(135deg, #1b0f08, #301b10 55%, #170d08);
}

.tui-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tui-row.wrap {
    flex-wrap: wrap;
}

.tui-btn {
    border: 1px solid var(--border-accent);
    background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev-1));
    color: var(--text);
    padding: 0.55rem 0.85rem;
    font-family: var(--font-mono);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.tui-btn:hover {
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.06));
    color: var(--accent);
}

.tui-table-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    background: var(--panel);
}

.tui-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.tui-table th,
.tui-table td {
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.tui-table th {
    font-family: var(--font-mono);
    color: var(--accent-2);
    background: rgba(255, 255, 255, 0.025);
}

.tui-table tbody tr:hover td {
    background: rgba(var(--accent-rgb), 0.05);
}

.tui-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.45rem;
    border: 1px solid var(--border);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.tui-empty {
    padding: 1.25rem;
    border: 1px dashed var(--border-accent);
    color: var(--text-dim);
    font-family: var(--font-mono);
    background: rgba(var(--accent-rgb), 0.04);
}

.boot-shell-view {
    display: none;
}

html[data-route-skeleton="home"] .boot-shell-view[data-route-skeleton="home"],
html[data-route-skeleton="section-index"] .boot-shell-view[data-route-skeleton="section-index"],
html[data-route-skeleton="content-detail"] .boot-shell-view[data-route-skeleton="content-detail"],
html[data-route-skeleton="module"] .boot-shell-view[data-route-skeleton="module"] {
    display: block;
}

#blazor-error-ui {
    background: rgba(12, 12, 12, 0.96);
    color: var(--text);
    border-top: 1px solid var(--danger);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
    display: none;
    left: 0;
    padding: 0.75rem 1rem;
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-accent) var(--bg-elev-1);
}

*::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-elev-1);
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--border-accent), var(--border));
    border: 2px solid var(--bg-elev-1);
}

@media (max-width: 980px) {
    :root,
    html[data-theme="azure"],
    html[data-theme="grey"],
    html[data-theme="orange"] {
        --sidebar-w: 14rem;
    }

    .tui-grid.cols-2,
    .tui-grid.cols-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .tui-utilitybar {
        grid-template-columns: 1fr;
    }

    .tui-utility-widget,
    .tui-utility-marquee,
    .tui-theme-switch {
        border-right: 0;
        border-bottom: 1px solid var(--border);
        min-height: 2.6rem;
    }

    .tui-theme-switch {
        justify-content: flex-start;
        border-bottom: 0;
    }
}

@media (max-width: 760px) {
    .tui-shell {
        grid-template-rows: auto minmax(0, 1fr);
    }

    .tui-header {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand actions" "nav nav";
    }

    .tui-brand { grid-area: brand; font-size: 0.85rem; padding-inline: 0.75rem; }
    .tui-header-side { grid-area: actions; padding-inline: 0.5rem; gap: 0.5rem; }
    .tui-topnav { grid-area: nav; min-height: 2.8rem; }

    .tui-brand,
    .tui-header-side {
        border: 0;
        min-height: 3rem;
    }

    .tui-topnav {
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
    }

    .tui-main,
    .tui-shell[data-has-sidebar="true"] > .tui-main {
        grid-template-columns: 1fr;
    }

    .tui-shell[data-has-sidebar="true"][data-sidebar-collapsed="true"] > .tui-main {
        grid-template-columns: 1fr;
    }

    .tui-sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border-strong);
    }

    .tui-sidebar[data-collapsed="true"] .tui-sidebar-toggle {
        flex: none;
        flex-direction: row;
        min-height: var(--sidebar-collapsed-w);
        padding: 0.45rem 0.75rem;
        border-bottom: 0;
    }

    .tui-sidebar[data-collapsed="true"] .tui-sidebar-toggle-label {
        writing-mode: horizontal-tb;
        transform: none;
    }

    .tui-content-wrap {
        padding: 0.75rem;
    }
}

/* Pathwright DesignSystem loader primitive: recovered themed arrow loader.
   This is intentionally not wired to route navigation by default. */
.pathwright-themed-arrow-loader {
    --pathwright-themed-arrow-loader-size: 12px;
    --pathwright-themed-arrow-loader-time: 1s;
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    color: var(--accent, var(--accent-color, #fd7000));
    font-family: var(--font-mono, "Cascadia Code", "Consolas", monospace);
}

.pathwright-themed-arrow-loader--centered {
    justify-content: center;
}

.pathwright-themed-arrow-loader[data-loader-size="small"] {
    --pathwright-themed-arrow-loader-size: 8px;
}

.pathwright-themed-arrow-loader[data-loader-size="large"] {
    --pathwright-themed-arrow-loader-size: 16px;
}

.pathwright-themed-arrow-loader__mesh {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 calc(var(--pathwright-themed-arrow-loader-size) * 1.5) currentColor);
    gap: calc(var(--pathwright-themed-arrow-loader-size) * 0.2);
}

.pathwright-themed-arrow-loader__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: calc(var(--pathwright-themed-arrow-loader-size) * 1.7);
}

.pathwright-themed-arrow-loader__arrow {
    width: 0;
    height: 0;
    margin: 0 calc(var(--pathwright-themed-arrow-loader-size) / -2);
    border-left: var(--pathwright-themed-arrow-loader-size) solid transparent;
    border-right: var(--pathwright-themed-arrow-loader-size) solid transparent;
    border-bottom: calc(var(--pathwright-themed-arrow-loader-size) * 1.8) solid currentColor;
    opacity: 0.1;
    animation: pathwright-themed-arrow-loader-blink var(--pathwright-themed-arrow-loader-time) infinite ease-in-out;
    animation-delay: var(--pathwright-arrow-delay, 0ms);
}

.pathwright-themed-arrow-loader__arrow--down {
    transform: rotate(180deg);
}

.pathwright-themed-arrow-loader__copy {
    display: grid;
    gap: 0.25rem;
    color: var(--text-soft, #eaeaea);
}

.pathwright-themed-arrow-loader__label {
    color: currentColor;
    font-size: 0.86rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pathwright-themed-arrow-loader__detail {
    color: var(--text-dim, #90979e);
    font-size: 0.74rem;
    letter-spacing: 0.02em;
}

@keyframes pathwright-themed-arrow-loader-blink {
    0% { opacity: 0.1; }
    30% { opacity: 1; }
    100% { opacity: 0.1; }
}

@media (prefers-reduced-motion: reduce) {
    .pathwright-themed-arrow-loader__arrow {
        animation: none;
        opacity: 0.8;
    }
}

/* Pathwright DesignSystem element primitive: single chevron rail.
   This is intentionally visual-only and is not wired to route navigation by default. */
.pathwright-chevron-rail {
    --pathwright-chevron-rail-size: 0.7rem;
    --pathwright-chevron-rail-stroke: 2px;
    --pathwright-chevron-rail-gap: 0.18rem;
    --pathwright-chevron-rail-time: 1.05s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--pathwright-chevron-rail-gap);
    color: var(--accent, var(--accent-color, #fd7000));
    filter: drop-shadow(0 0 0.55rem currentColor);
}

.pathwright-chevron-rail[data-chevron-size="small"] {
    --pathwright-chevron-rail-size: 0.5rem;
    --pathwright-chevron-rail-stroke: 1.5px;
    --pathwright-chevron-rail-gap: 0.12rem;
}

.pathwright-chevron-rail[data-chevron-size="large"] {
    --pathwright-chevron-rail-size: 0.95rem;
    --pathwright-chevron-rail-stroke: 2.5px;
    --pathwright-chevron-rail-gap: 0.24rem;
}

.pathwright-chevron-rail__chevron {
    width: var(--pathwright-chevron-rail-size);
    height: var(--pathwright-chevron-rail-size);
    border-right: var(--pathwright-chevron-rail-stroke) solid currentColor;
    border-bottom: var(--pathwright-chevron-rail-stroke) solid currentColor;
    opacity: 0.18;
    transform: rotate(-45deg);
}

.pathwright-chevron-rail[data-chevron-direction="left"] .pathwright-chevron-rail__chevron {
    transform: rotate(135deg);
}

.pathwright-chevron-rail[data-chevron-direction="up"] .pathwright-chevron-rail__chevron {
    transform: rotate(-135deg);
}

.pathwright-chevron-rail[data-chevron-direction="down"] .pathwright-chevron-rail__chevron {
    transform: rotate(45deg);
}

.pathwright-chevron-rail[data-chevron-animated="true"] .pathwright-chevron-rail__chevron {
    animation: pathwright-chevron-rail-pulse var(--pathwright-chevron-rail-time) infinite ease-in-out;
    animation-delay: calc(var(--pathwright-chevron-index) * 85ms);
}

.pathwright-single-rail-chevron-loader {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--accent, var(--accent-color, #fd7000));
    font-family: var(--font-mono, "Cascadia Code", "Consolas", monospace);
}

.pathwright-single-rail-chevron-loader--centered {
    justify-content: center;
}

.pathwright-single-rail-chevron-loader__copy {
    display: grid;
    gap: 0.25rem;
    color: var(--text-soft, #eaeaea);
}

.pathwright-single-rail-chevron-loader__label {
    color: currentColor;
    font-size: 0.86rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pathwright-single-rail-chevron-loader__detail {
    color: var(--text-dim, #90979e);
    font-size: 0.74rem;
    letter-spacing: 0.02em;
}

@keyframes pathwright-chevron-rail-pulse {
    0% { opacity: 0.18; }
    35% { opacity: 1; }
    100% { opacity: 0.18; }
}

@media (prefers-reduced-motion: reduce) {
    .pathwright-chevron-rail__chevron {
        animation: none !important;
        opacity: 0.8;
    }
}

/* External module app frame */
.pathwright-external-app-frame {
    display: grid;
    grid-template-rows: auto minmax(28rem, 1fr);
    gap: 0.75rem;
    min-height: min(72vh, 52rem);
}

.pathwright-external-app-frame__toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.pathwright-external-app-frame__title {
    font-family: var(--font-mono);
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pathwright-external-app-frame__summary {
    margin-top: 0.25rem;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.pathwright-external-app-frame__viewport {
    position: relative;
    min-height: 28rem;
    border: 1px solid var(--border-strong);
    background: var(--panel);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.pathwright-external-app-frame__iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 28rem;
    border: 0;
    background: var(--bg);
}

.pathwright-external-app-frame[data-module-load-state="loading"] .pathwright-external-app-frame__iframe {
    opacity: 0.24;
}

.pathwright-external-app-frame[data-module-load-state="ready"] .pathwright-external-app-frame__iframe {
    opacity: 1;
    transition: opacity 180ms ease-out;
}

.pathwright-external-app-frame__loader {
    position: absolute;
    inset: 1rem auto auto 50%;
    transform: translateX(-50%);
    z-index: 2;
    min-width: min(32rem, calc(100% - 2rem));
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-accent);
    background: color-mix(in srgb, var(--panel-2) 90%, transparent);
    box-shadow: var(--shadow), 0 0 18px rgba(var(--accent-rgb), 0.14);
    backdrop-filter: blur(8px);
}

.pathwright-blazor-module-frame {
    display: grid;
    gap: 0.85rem;
}

.pathwright-blazor-module-frame__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--border);
    background: rgba(var(--accent-rgb), 0.035);
    padding: 0.85rem;
}

.pathwright-blazor-module-frame__title {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.pathwright-blazor-module-frame__summary {
    color: var(--text-soft);
    font-size: 0.92rem;
    margin-top: 0.25rem;
}

.pathwright-blazor-module-frame__viewport {
    position: relative;
    min-height: 28rem;
    border: 1px solid var(--border-strong);
    background: rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.pathwright-blazor-module-frame__loader {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 2;
    background:
        radial-gradient(circle at center, rgba(var(--accent-rgb), 0.08), transparent 42%),
        rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(2px);
}



/* Vehicle Decision native module component */
.vehicle-decision-module {
    color: #e5e7eb;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;
    padding: 1.25rem;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}

.vehicle-decision-module .vdm-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.vehicle-decision-module .eyebrow {
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    margin: 0;
}

.vehicle-decision-module .vdm-header h2 {
    margin: 0.15rem 0;
    font-size: 1.45rem;
}

.vehicle-decision-module .subtle,
.vehicle-decision-module .caveat {
    color: #94a3b8;
}

.vehicle-decision-module .vdm-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
}

.vehicle-decision-module .vdm-controls label {
    display: grid;
    gap: 0.3rem;
    color: #cbd5e1;
    font-size: 0.85rem;
}

.vehicle-decision-module .vdm-controls input,
.vehicle-decision-module .vdm-controls select {
    background: #020617;
    border: 1px solid #475569;
    border-radius: 10px;
    color: #f8fafc;
    padding: 0.5rem 0.65rem;
}

.vehicle-decision-module .vdm-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.vehicle-decision-module .vdm-kpis div {
    background: #111827;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 0.75rem;
}

.vehicle-decision-module .vdm-kpis strong {
    display: block;
    font-size: 1.35rem;
}

.vehicle-decision-module .vdm-kpis span {
    color: #94a3b8;
    font-size: 0.8rem;
}

.vehicle-decision-module .vdm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 0.9rem;
}

.vehicle-decision-module .vdm-card {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 1rem;
}

.vehicle-decision-module .vdm-card-title {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: start;
}

.vehicle-decision-module .vdm-card-title h3 {
    margin: 0 0 0.65rem 0;
    font-size: 1rem;
}

.vehicle-decision-module .band {
    border: 1px solid #64748b;
    border-radius: 999px;
    color: #cbd5e1;
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
    white-space: nowrap;
}

.vehicle-decision-module .band-good { border-color: #22c55e; color: #86efac; }
.vehicle-decision-module .band-ok { border-color: #38bdf8; color: #7dd3fc; }
.vehicle-decision-module .band-warn { border-color: #f59e0b; color: #fcd34d; }
.vehicle-decision-module .band-bad { border-color: #ef4444; color: #fca5a5; }

.vehicle-decision-module .score-row {
    display: grid;
    grid-template-columns: 74px 1fr 46px;
    gap: 0.5rem;
    align-items: center;
    margin: 0.35rem 0;
    font-size: 0.84rem;
}

.vehicle-decision-module .score-row meter {
    width: 100%;
}

.vehicle-decision-module .tow-gate {
    color: #bfdbfe;
    margin: 0.7rem 0 0.2rem;
}

.vehicle-decision-module .vdm-alert {
    border: 1px solid #ef4444;
    background: #450a0a;
    color: #fecaca;
    padding: 0.75rem;
    border-radius: 12px;
}

.vehicle-decision-module .vdm-loading {
    color: #bfdbfe;
    display: grid;
    min-height: 18rem;
    place-items: center;
}

.vehicle-decision-module .vdm-section-title {
    margin: 1.2rem 0 0.65rem;
    color: #e2e8f0;
    font-size: 1rem;
}

.vehicle-decision-module .vdm-table-wrap {
    overflow-x: auto;
    border: 1px solid #334155;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.vehicle-decision-module .vdm-table {
    width: 100%;
    border-collapse: collapse;
    background: #020617;
}

.vehicle-decision-module .vdm-table th,
.vehicle-decision-module .vdm-table td {
    padding: 0.65rem;
    border-bottom: 1px solid #1e293b;
    text-align: left;
    vertical-align: top;
    font-size: 0.82rem;
}

.vehicle-decision-module .vdm-table th {
    color: #93c5fd;
    background: #0f172a;
    position: sticky;
    top: 0;
}

.vehicle-decision-module .vdm-table span,
.vehicle-decision-module .vdm-detail-row td {
    color: #94a3b8;
}

.vehicle-decision-module .gate {
    display: inline-block;
    border: 1px solid #64748b;
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
    color: #cbd5e1;
    white-space: nowrap;
}

.vehicle-decision-module .gate-pass { border-color: #22c55e; color: #86efac; }
.vehicle-decision-module .gate-review { border-color: #f59e0b; color: #fcd34d; }
.vehicle-decision-module .gate-data { border-color: #38bdf8; color: #7dd3fc; }
.vehicle-decision-module .gate-reject { border-color: #ef4444; color: #fca5a5; }

@media (max-width: 920px) {
    .vehicle-decision-module .vdm-header {
        grid-template-columns: 1fr;
    }

    .vehicle-decision-module .vdm-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.vehicle-decision-module .vdm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 1rem;
}

.vehicle-decision-module .vdm-tab {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 999px;
    color: #cbd5e1;
    cursor: pointer;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.45rem 0.7rem;
}

.vehicle-decision-module .vdm-tab span {
    color: #7dd3fc;
    font-size: 0.76rem;
}

.vehicle-decision-module .vdm-tab-active {
    border-color: #38bdf8;
    color: #f8fafc;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.32), 0 0 24px rgba(56, 189, 248, 0.14);
}

.vehicle-decision-module .vdm-tab-panel {
    display: grid;
    gap: 1rem;
}

.vehicle-decision-module .vdm-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(18rem, 1fr);
    gap: 1rem;
}

.vehicle-decision-module .vdm-score-stack {
    display: grid;
    gap: 0.55rem;
}

.vehicle-decision-module .vdm-score-stack-row {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #e5e7eb;
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(7rem, 1fr) 3.5rem;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem;
    text-align: left;
}

.vehicle-decision-module .vdm-score-stack-row strong,
.vehicle-decision-module .vdm-score-stack-row em {
    display: block;
}

.vehicle-decision-module .vdm-score-stack-row em {
    color: #94a3b8;
    font-size: 0.78rem;
    font-style: normal;
}

.vehicle-decision-module .vdm-score-stack-row meter {
    width: 100%;
}

.vehicle-decision-module .vdm-score-stack-row-active {
    border-color: #38bdf8;
    background: rgba(14, 116, 144, 0.20);
}

.vehicle-decision-module .vdm-selected-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: start;
}

.vehicle-decision-module .vdm-selected-grid h3 {
    margin: 0.15rem 0;
}

.vehicle-decision-module .vdm-mini-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: 0.55rem;
    margin: 0.8rem 0;
}

.vehicle-decision-module .vdm-mini-metrics div {
    border: 1px solid #334155;
    border-radius: 12px;
    background: #020617;
    padding: 0.6rem;
}

.vehicle-decision-module .vdm-mini-metrics span {
    color: #94a3b8;
    display: block;
    font-size: 0.76rem;
}

.vehicle-decision-module .vdm-mini-metrics strong {
    display: block;
    margin-top: 0.2rem;
}

.vehicle-decision-module .vdm-filter-bar,
.vehicle-decision-module .vdm-table-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.vehicle-decision-module .vdm-filter-bar label {
    color: #cbd5e1;
    display: grid;
    font-size: 0.82rem;
    gap: 0.3rem;
}

.vehicle-decision-module .vdm-filter-bar select {
    background: #020617;
    border: 1px solid #475569;
    border-radius: 10px;
    color: #f8fafc;
    padding: 0.45rem 0.6rem;
}

.vehicle-decision-module .vdm-table-toolbar {
    color: #94a3b8;
    font-size: 0.84rem;
}

.vehicle-decision-module .vdm-pager {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.vehicle-decision-module .vdm-pager button,
.vehicle-decision-module .vdm-interactive-table th button {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #bfdbfe;
    cursor: pointer;
    padding: 0.35rem 0.55rem;
}

.vehicle-decision-module .vdm-pager button:disabled {
    color: #64748b;
    cursor: default;
    opacity: 0.55;
}

.vehicle-decision-module .vdm-interactive-table tbody tr {
    cursor: pointer;
}

.vehicle-decision-module .vdm-interactive-table tbody tr:hover {
    background: rgba(14, 116, 144, 0.13);
}

.vehicle-decision-module .vdm-selected-row {
    background: rgba(14, 116, 144, 0.22);
}

.vehicle-decision-module .vdm-verification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 0.9rem;
}

.vehicle-decision-module .vdm-verification-card ul {
    margin: 0.75rem 0;
    padding-left: 1.2rem;
}

.vehicle-decision-module .vdm-verification-card li {
    color: #cbd5e1;
    margin: 0.25rem 0;
}

@media (max-width: 980px) {
    .vehicle-decision-module .vdm-dashboard-grid,
    .vehicle-decision-module .vdm-selected-grid,
    .vehicle-decision-module .vdm-score-stack-row {
        grid-template-columns: 1fr;
    }
}

.route-manager-shell {
    display: grid;
    gap: 1rem;
}

.route-manager-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.route-manager-kpis div {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    padding: 0.75rem;
}

.route-manager-kpis strong {
    display: block;
    color: var(--text);
    font-size: 1.35rem;
}

.route-manager-kpis span,
.route-manager-detail span,
.route-manager-table td span {
    color: var(--text-dim);
}

.route-manager-controls {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) repeat(3, minmax(8rem, 0.45fr));
    gap: 0.75rem;
    margin-top: 1rem;
    align-items: end;
}

.route-manager-controls label {
    display: grid;
    gap: 0.3rem;
    color: var(--text-dim);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.route-manager-controls input,
.route-manager-controls select {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    color: var(--text);
    padding: 0.45rem 0.55rem;
    font-family: var(--font-mono);
}

.route-manager-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.7fr);
    gap: 1rem;
    align-items: start;
}

.route-manager-table-wrap {
    overflow: auto;
    max-height: 44rem;
}

.route-manager-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
}

.route-manager-table th,
.route-manager-table td {
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.16);
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: top;
    font-size: 0.78rem;
}

.route-manager-table th {
    position: sticky;
    top: 0;
    background: var(--panel);
    color: var(--accent);
    z-index: 1;
}

.route-manager-table tr {
    cursor: pointer;
}

.route-manager-table tr:hover,
.route-manager-table tr.selected {
    background: rgba(var(--accent-rgb), 0.08);
}

.route-manager-table a {
    color: var(--accent);
    text-decoration: none;
}

.route-manager-table strong,
.route-manager-table span,
.route-manager-table code {
    display: block;
}

.route-manager-table code,
.route-manager-detail code,
.route-manager-diagnostic code {
    color: var(--text-dim);
    font-size: 0.74rem;
}

.route-manager-detail {
    display: grid;
    gap: 0.8rem;
}

.route-manager-detail div {
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.16);
    padding-bottom: 0.65rem;
}

.route-manager-detail strong {
    color: var(--text);
}

.route-manager-diagnostics {
    display: grid;
    gap: 0.65rem;
}

.route-manager-diagnostic {
    border: 1px solid rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.08);
    padding: 0.65rem;
}

.route-manager-diagnostic strong,
.route-manager-diagnostic span,
.route-manager-diagnostic code {
    display: inline-block;
    margin-right: 0.55rem;
}

.route-manager-diagnostic p {
    margin: 0.45rem 0 0;
}

@media (max-width: 1100px) {
    .route-manager-controls,
    .route-manager-grid,
    .route-manager-kpis {
        grid-template-columns: 1fr;
    }
}



