:root {
    --uab-green: #008539;
    --uab-green-deep: #0e5f33;
    --uab-green-pale: #eef5f0;
    --uab-mist: #f7faf8;
    --ink-strong: #182722;
    --ink-soft: #51615a;
    --line-soft: rgba(217, 228, 220, 0.56);
    --line-mid: rgba(191, 208, 196, 0.82);
    --panel: rgba(238, 245, 240, 0.72);
    --panel-solid: rgba(255, 255, 255, 0.91);
    --space-shadow: 0 24px 56px rgba(3, 12, 18, 0.32);
    --mono: "Cascadia Mono", "Consolas", "Courier New", monospace;
    --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    color: var(--ink-strong);
    background:
        radial-gradient(circle at 14% 16%, rgba(0, 133, 57, 0.18), transparent 0 22rem),
        radial-gradient(circle at 84% 12%, rgba(31, 133, 169, 0.16), transparent 0 20rem),
        radial-gradient(circle at 58% 74%, rgba(9, 73, 100, 0.2), transparent 0 28rem),
        linear-gradient(180deg, #02080e 0%, #06131e 38%, #07111a 72%, #02070c 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    opacity: 1;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.4px) 18px 24px / 150px 150px,
        radial-gradient(circle, rgba(183, 235, 216, 0.82) 0 1px, transparent 1.5px) 88px 112px / 210px 210px,
        radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 1px, transparent 1.5px) 32px 78px / 280px 280px,
        radial-gradient(circle at 6% 18%, rgba(255, 255, 255, 0.96) 0 1px, transparent 1.7px),
        radial-gradient(circle at 12% 66%, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.7px),
        radial-gradient(circle at 18% 42%, rgba(204, 242, 229, 0.82) 0 1px, transparent 1.7px),
        radial-gradient(circle at 27% 14%, rgba(255, 255, 255, 0.78) 0 1px, transparent 1.7px),
        radial-gradient(circle at 34% 58%, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.7px),
        radial-gradient(circle at 46% 24%, rgba(255, 255, 255, 0.92) 0 1px, transparent 1.8px),
        radial-gradient(circle at 52% 74%, rgba(182, 232, 214, 0.72) 0 1px, transparent 1.8px),
        radial-gradient(circle at 61% 36%, rgba(255, 255, 255, 0.86) 0 1px, transparent 1.8px),
        radial-gradient(circle at 69% 68%, rgba(255, 255, 255, 0.76) 0 1px, transparent 1.8px),
        radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.84) 0 1px, transparent 1.8px),
        radial-gradient(circle at 86% 48%, rgba(205, 241, 230, 0.72) 0 1px, transparent 1.8px),
        radial-gradient(circle at 92% 78%, rgba(255, 255, 255, 0.88) 0 1px, transparent 1.9px);
}

body::after {
    opacity: 1;
    background:
        radial-gradient(circle at 18% 82%, transparent 0 12rem, rgba(157, 224, 192, 0.2) 12rem 12.08rem, transparent 12.08rem 100%),
        radial-gradient(circle at 78% 18%, transparent 0 15rem, rgba(132, 218, 201, 0.18) 15rem 15.08rem, transparent 15.08rem 100%),
        radial-gradient(circle at 64% 58%, transparent 0 18rem, rgba(108, 180, 212, 0.15) 18rem 18.08rem, transparent 18.08rem 100%),
        linear-gradient(115deg, transparent 0%, rgba(168, 221, 201, 0.08) 48%, transparent 76%);
}

.orbital-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.92;
    background:
        radial-gradient(circle at 12% 78%, transparent 0 13rem, rgba(197, 231, 217, 0.18) 13rem 13.05rem, transparent 13.05rem 100%),
        radial-gradient(circle at 84% 18%, transparent 0 10rem, rgba(187, 229, 215, 0.16) 10rem 10.05rem, transparent 10.05rem 100%),
        linear-gradient(rgba(226, 241, 233, 0.085) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 241, 233, 0.085) 1px, transparent 1px);
    background-size: auto, auto, 48px 48px, 48px 48px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 92%);
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    padding: 0.12rem 0.38rem;
    border: 1px solid rgba(0, 133, 57, 0.12);
    border-radius: 0.4rem;
    background: rgba(0, 133, 57, 0.05);
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.92em;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(192, 231, 216, 0.2);
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.6px),
        radial-gradient(circle at 55% 72%, rgba(182, 232, 214, 0.68) 0 1px, transparent 1.6px),
        radial-gradient(circle at 84% 28%, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.5px),
        radial-gradient(circle at 76% 18%, transparent 0 10rem, rgba(153, 223, 200, 0.14) 10rem 10.06rem, transparent 10.06rem 100%),
        linear-gradient(180deg, rgba(3, 14, 22, 0.78), rgba(7, 23, 33, 0.62));
    backdrop-filter: blur(14px) saturate(1.12);
    color: #eef8f3;
}

.header-shell,
.page-shell {
    width: min(1460px, calc(100% - 2rem));
    margin: 0 auto;
}

.header-shell {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.72rem 0 0.68rem;
}

.brand-kicker,
.section-kicker,
.hero-label {
    margin: 0 0 0.45rem;
    color: var(--uab-green-deep);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-family: var(--mono);
}

.brand-lockup h1 {
    margin: 0;
    color: #f3fbf6;
    font-size: clamp(1.8rem, 2.8vw, 2.45rem);
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
}

.brand-subtitle {
    margin: 0.42rem 0 0;
    color: rgba(228, 241, 234, 0.78);
    font-size: 0.88rem;
    font-family: var(--mono);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-end;
}

.site-nav a {
    padding: 0.5rem 0.78rem;
    border: 1px solid rgba(213, 238, 225, 0.08);
    border-radius: 999px;
    color: rgba(228, 241, 234, 0.76);
    font-size: 0.9rem;
    font-weight: 600;
}

.site-nav a:hover,
.site-nav a.is-active {
    border-color: rgba(132, 220, 182, 0.34);
    background: rgba(0, 133, 57, 0.22);
    color: #f7fff9;
    box-shadow: 0 0 24px rgba(0, 133, 57, 0.18);
}

.page-shell {
    display: grid;
    gap: 1.8rem;
    padding: 1.55rem 0 2.4rem;
    position: relative;
    z-index: 1;
}

.hero-card,
.content-card {
    border: 1px solid var(--line-soft);
    border-radius: 1.35rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(226, 238, 231, 0.1)),
        var(--panel);
    backdrop-filter: blur(12px) saturate(1.08);
    box-shadow: var(--space-shadow);
    min-width: 0;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(270px, 0.85fr);
    gap: 1.2rem;
    padding: 1.55rem;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 24%, rgba(0, 133, 57, 0.1), transparent 0 12rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 50%);
    pointer-events: none;
}

.hero-copy-block,
.telemetry-panel {
    position: relative;
    z-index: 1;
}

.hero-card h2,
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.hero-copy,
.section-copy,
.text-grid p,
.hero-panel-note,
.field-help,
.empty-state,
.section-summary {
    color: var(--ink-soft);
    line-height: 1.62;
}

.system-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.2rem;
}

.system-node {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.58rem 0.8rem;
    border: 1px solid rgba(0, 133, 57, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.84rem;
}

.system-node:not(:last-child)::after {
    content: "\2192";
    margin-left: 0.55rem;
    color: rgba(81, 97, 90, 0.85);
}

.hero-panel {
    align-self: stretch;
    padding: 1.1rem 1.1rem 1rem;
    border: 1px solid rgba(14, 95, 51, 0.12);
    border-radius: 1.2rem;
    background:
        linear-gradient(180deg, rgba(20, 34, 29, 0.965), rgba(26, 43, 36, 0.965));
    color: #f6fbf7;
}

.hero-panel-label {
    margin: 0;
    color: rgba(226, 240, 231, 0.7);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: var(--mono);
}

.hero-panel-value {
    margin: 0.48rem 0 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}

.telemetry-list {
    display: grid;
    gap: 0.8rem;
    margin: 1rem 0 0;
}

.telemetry-list div {
    display: grid;
    gap: 0.18rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(226, 240, 231, 0.12);
}

.telemetry-list dt {
    color: rgba(226, 240, 231, 0.62);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-family: var(--mono);
}

.telemetry-list dd {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.45;
}

.content-card {
    padding: 1.45rem;
}

.simulator-shell,
.architecture-shell,
.phase-workspace {
    display: grid;
    gap: 1rem;
}

.simulator-shell,
.architecture-shell {
    grid-template-columns: minmax(0, 1.95fr) minmax(290px, 0.72fr);
    align-items: start;
}

.phase-workspace {
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
    align-items: start;
}

.phase-main-column {
    display: grid;
    gap: 1rem;
}

.compact-heading {
    align-items: start;
}

.system-map {
    padding: 1.55rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.82rem;
    border: 1px solid rgba(0, 133, 57, 0.14);
    border-radius: 999px;
    background: rgba(0, 133, 57, 0.05);
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.header-control-stack {
    display: grid;
    gap: 0.7rem;
    align-items: start;
    justify-items: end;
}

.preset-form {
    justify-content: flex-end;
}

.phase-track {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) 56px
        minmax(0, 1fr) 56px
        minmax(0, 1fr) 56px
        minmax(0, 1fr);
    gap: 0.75rem;
    margin-top: 1.15rem;
    align-items: stretch;
}

.phase-module {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: 1rem 1rem 1.05rem;
    border: 1px solid rgba(191, 208, 196, 0.78);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(243, 247, 244, 0.95));
}

.phase-module::before,
.phase-schematic::before,
.phase-editor::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 1rem 0 0 1rem;
    background: linear-gradient(180deg, rgba(0, 133, 57, 0.14), rgba(0, 133, 57, 0.5));
}

.phase-source::before,
.section-source::before {
    background: linear-gradient(180deg, rgba(0, 133, 57, 0.18), rgba(0, 133, 57, 0.56));
}

.phase-channel::before,
.section-channel::before {
    background: linear-gradient(180deg, rgba(8, 121, 84, 0.18), rgba(8, 121, 84, 0.52));
}

.phase-receiver::before,
.section-receiver::before {
    background: linear-gradient(180deg, rgba(27, 104, 81, 0.18), rgba(27, 104, 81, 0.5));
}

.phase-security::before,
.section-security::before {
    background: linear-gradient(180deg, rgba(58, 98, 82, 0.18), rgba(58, 98, 82, 0.48));
}

.phase-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.phase-link span {
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(81, 97, 90, 0.2), rgba(81, 97, 90, 0.58), rgba(81, 97, 90, 0.2));
}

.phase-link span:last-child {
    width: 0.8rem;
    height: 0.8rem;
    border-top: 1px solid rgba(81, 97, 90, 0.58);
    border-right: 1px solid rgba(81, 97, 90, 0.58);
    background: none;
    transform: rotate(45deg);
    margin-left: -0.15rem;
}

.phase-module-head,
.phase-module-foot {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
}

.phase-legend {
    display: grid;
    gap: 0.22rem;
}

.phase-index,
.phase-name,
.phase-signal {
    font-family: var(--mono);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.phase-module .phase-index {
    display: inline-flex;
    min-width: 2.2rem;
    min-height: 2.2rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(0, 133, 57, 0.14);
    background: rgba(0, 133, 57, 0.05);
    color: var(--uab-green-deep);
}

.phase-module .phase-name {
    color: var(--ink-soft);
}

.phase-signal {
    color: var(--uab-green-deep);
}

.phase-module-body {
    display: grid;
    gap: 0.82rem;
}

.phase-module h3 {
    margin: 0;
    font-size: 1.06rem;
}

.phase-module p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.58;
    font-size: 0.94rem;
}

.component-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.component-list li {
    padding: 0.56rem 0.7rem;
    border: 1px solid rgba(191, 208, 196, 0.68);
    border-radius: 0.78rem;
    background: rgba(255, 255, 255, 0.68);
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.component-list-compact li {
    padding: 0.5rem 0.65rem;
}

.module-meta {
    display: grid;
    gap: 0.28rem;
}

.module-meta span {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.module-meta strong {
    color: var(--uab-green-deep);
    font-size: 0.88rem;
    line-height: 1.4;
}

.command-deck {
    position: sticky;
    top: 6.5rem;
}

.command-list {
    display: grid;
    gap: 0.85rem;
    margin: 1.15rem 0 0;
}

.command-list div {
    display: grid;
    gap: 0.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(191, 208, 196, 0.72);
}

.command-list dt {
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.command-list dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.command-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.button-block {
    width: 100%;
}

.phase-schematic,
.phase-editor {
    position: relative;
}

.phase-editor-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.phase-schematic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.schematic-block {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border: 1px solid rgba(191, 208, 196, 0.72);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
}

.schematic-label {
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.schematic-block strong,
.phase-side-telemetry strong {
    font-size: 1rem;
    line-height: 1.4;
}

.schematic-block p,
.phase-side-telemetry p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.phase-editor {
    display: grid;
    gap: 1rem;
}

.phase-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.save-banner {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(0, 133, 57, 0.15);
    border-radius: 0.92rem;
    background: rgba(0, 133, 57, 0.06);
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.88rem;
}

.phase-mini-map {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.phase-mini-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid rgba(191, 208, 196, 0.7);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.78);
}

.phase-mini-card div {
    display: grid;
    gap: 0.18rem;
}

.phase-mini-card strong {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.phase-mini-card span:last-child {
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.4;
}

.phase-mini-card.is-current {
    border-color: rgba(0, 133, 57, 0.24);
    background: rgba(0, 133, 57, 0.06);
}

.phase-nav-actions {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.phase-side-telemetry {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.phase-side-telemetry div {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem;
    border: 1px solid rgba(191, 208, 196, 0.7);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.78);
}

.technical-notes {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 246, 0.92));
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.stack-lg {
    display: grid;
    gap: 1rem;
}

.form-section {
    position: relative;
    padding: 1.2rem 1.2rem 1.1rem;
    border: 1px solid var(--line-soft);
    border-radius: 1.2rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 250, 248, 0.92));
    overflow: hidden;
}

.form-section::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, rgba(0, 133, 57, 0.18), rgba(0, 133, 57, 0.5));
}

.section-source::before {
    background: linear-gradient(180deg, rgba(0, 133, 57, 0.18), rgba(0, 133, 57, 0.55));
}

.section-channel::before {
    background: linear-gradient(180deg, rgba(13, 111, 79, 0.18), rgba(13, 111, 79, 0.5));
}

.section-receiver::before {
    background: linear-gradient(180deg, rgba(56, 122, 94, 0.18), rgba(56, 122, 94, 0.48));
}

.section-security::before {
    background: linear-gradient(180deg, rgba(72, 99, 86, 0.18), rgba(72, 99, 86, 0.46));
}

.form-section-header {
    display: grid;
    gap: 0.38rem;
    margin-bottom: 1rem;
}

.section-tag-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.section-code,
.section-slug {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.8rem;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-code {
    min-width: 2.1rem;
    padding: 0 0.55rem;
    border: 1px solid rgba(0, 133, 57, 0.14);
    background: rgba(0, 133, 57, 0.05);
    color: var(--uab-green-deep);
}

.section-slug {
    padding: 0 0.72rem;
    border: 1px solid rgba(81, 97, 90, 0.12);
    background: rgba(81, 97, 90, 0.04);
    color: var(--ink-soft);
}

.form-section-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.section-summary {
    margin: 0;
    max-width: 48rem;
    font-size: 0.95rem;
}

.form-grid,
.metric-grid,
.gallery-grid,
.text-grid {
    display: grid;
    gap: 0.95rem;
}

.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.gallery-grid-extended {
    grid-template-columns: 1fr;
}

.text-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-field {
    display: grid;
    gap: 0.4rem;
    padding: 0.92rem;
    border: 1px solid rgba(191, 208, 196, 0.62);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
}

.form-field-inline {
    min-width: min(100%, 340px);
}

.field-label {
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.field-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    padding: 0 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 133, 57, 0.14);
    background: rgba(0, 133, 57, 0.06);
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.field-help {
    font-size: 0.88rem;
}

.field-unit-hint {
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.4;
}

input,
select {
    width: 100%;
    padding: 0.78rem 0.86rem;
    border: 1px solid var(--line-mid);
    border-radius: 0.82rem;
    font: inherit;
    color: var(--ink-strong);
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: rgba(0, 133, 57, 0.44);
    box-shadow: 0 0 0 4px rgba(0, 133, 57, 0.1);
    transform: translateY(-1px);
}

input.has-error,
select.has-error {
    border-color: #bf3f3f;
    box-shadow: 0 0 0 4px rgba(191, 63, 63, 0.12);
}

.field-error,
.form-alert {
    color: #9d2020;
    font-size: 0.92rem;
}

.form-alert {
    padding: 0.92rem 1rem;
    border: 1px solid rgba(157, 32, 32, 0.18);
    border-radius: 0.92rem;
    background: #fff6f6;
}

.button-row,
.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.84rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 133, 57, 0.2);
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #f9fcfa;
    background: linear-gradient(135deg, var(--uab-green-deep), #1f6d43);
}

.button-secondary {
    color: var(--uab-green-deep);
    background: rgba(255, 255, 255, 0.9);
}

.metric-card {
    padding: 1rem 1rem 0.95rem;
    border: 1px solid rgba(191, 208, 196, 0.72);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 246, 0.96));
}

.telemetry-grid .metric-card {
    position: relative;
    overflow: hidden;
}

.telemetry-grid .metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(0, 133, 57, 0.18), rgba(0, 133, 57, 0.7), rgba(0, 133, 57, 0.18));
}

.metric-label {
    margin: 0;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-value {
    margin: 0.58rem 0 0;
    font-size: 1.36rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.figure-frame,
.gallery-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    background: var(--panel-solid);
}

.gallery-card-extended {
    display: grid;
    gap: 0;
}

.figure-disclosure {
    display: block;
}

.figure-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
}

.figure-summary::-webkit-details-marker {
    display: none;
}

.figure-summary::before {
    content: "+";
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(0, 133, 57, 0.22);
    border-radius: 999px;
    background: rgba(0, 133, 57, 0.08);
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-weight: 800;
}

.figure-disclosure[open] .figure-summary::before {
    content: "-";
}

.figure-summary h3 {
    flex: 1 1 auto;
    margin: 0;
}

.figure-summary .button-row {
    flex: 0 0 auto;
}

.figure-control-panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid rgba(217, 228, 220, 0.9);
    background: rgba(251, 252, 251, 0.9);
}

.figure-control-panel.is-loading {
    opacity: 0.92;
}

.figure-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.8rem;
}

.figure-loading-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(0, 133, 57, 0.16);
    border-radius: 0.92rem;
    background: rgba(0, 133, 57, 0.06);
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.86rem;
}

.figure-loading-status {
    margin-bottom: 0;
}

.figure-loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0, 133, 57, 0.18);
    border-top-color: var(--uab-green-deep);
    border-radius: 50%;
    animation: qdl-spin 0.8s linear infinite;
}

@keyframes qdl-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.gallery-interactive {
    padding: 1rem;
    border-top: 1px solid rgba(217, 228, 220, 0.9);
    background: rgba(247, 250, 248, 0.8);
}

.reference-scenario-card {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(191, 208, 196, 0.74);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.76);
}

.dashboard-status-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1rem;
}

.dashboard-status-row .section-copy {
    margin: 0;
}

.dashboard-hero-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 18%, rgba(31, 133, 169, 0.18), transparent 0 15rem),
        radial-gradient(circle at 82% 22%, rgba(0, 133, 57, 0.18), transparent 0 18rem),
        linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(226, 238, 231, 0.1)),
        var(--panel);
}

.dashboard-hero-card::after {
    content: "";
    position: absolute;
    inset: auto -8rem -8rem auto;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    border: 1px solid rgba(162, 215, 189, 0.22);
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
    gap: 1.1rem;
    align-items: start;
}

.dashboard-hero-copy {
    display: grid;
    gap: 0.9rem;
    align-content: start;
}

.dashboard-hero-copy h2 {
    margin: 0;
    font-size: clamp(1.9rem, 3.6vw, 2.95rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.dashboard-hero-copy .section-copy {
    max-width: 50rem;
}

.dashboard-orbit-card {
    display: grid;
    gap: 1rem;
    padding: 1.05rem;
    border: 1px solid rgba(191, 208, 196, 0.74);
    border-radius: 1.3rem;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.94), rgba(244, 249, 246, 0.9));
    box-shadow: 0 18px 36px rgba(3, 12, 18, 0.08);
}

.dashboard-orbit-core {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
    border: 1px solid rgba(217, 228, 220, 0.95);
    border-radius: 1rem;
    background: rgba(248, 250, 249, 0.92);
}

.dashboard-orbit-core strong {
    font-size: 1.1rem;
    line-height: 1.35;
}

.dashboard-orbit-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.dashboard-orbit-metrics article,
.dashboard-action-tile {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(217, 228, 220, 0.95);
    border-radius: 1rem;
    background: rgba(248, 250, 249, 0.92);
}

.dashboard-orbit-metrics article {
    display: grid;
    gap: 0.22rem;
}

.dashboard-orbit-metrics span {
    color: var(--ink-soft);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-orbit-metrics strong {
    font-size: 0.95rem;
    line-height: 1.45;
}

.dashboard-actions-card,
.dashboard-structure-card,
.figures-dashboard-card {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(226, 238, 231, 0.12)),
        var(--panel);
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}

.dashboard-action-tile {
    display: grid;
    gap: 0.85rem;
    align-content: start;
}

.dashboard-action-tile strong {
    font-size: 1.1rem;
    line-height: 1.35;
}

.dashboard-action-tile p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.58;
}

.reference-scenario-card h3 {
    margin: 0 0 0.3rem;
    font-size: 1.12rem;
}

.reference-scenario-card .section-copy {
    margin: 0;
}

.reference-scenario-meta {
    display: grid;
    gap: 0.55rem;
    justify-items: end;
    text-align: right;
}

.reference-scenario-meta .section-copy {
    max-width: 18rem;
}

.plot-stage {
    display: grid;
    gap: 0.7rem;
}

.plot-stage-toolbar {
    display: flex;
    justify-content: flex-end;
}

.plot-fullscreen-button {
    min-width: 10.25rem;
}

.plot-container {
    margin: 1rem auto 0;
    padding: 1rem;
    width: 100%;
    max-width: 980px;
    overflow-x: auto;
    border: 1px solid rgba(217, 228, 220, 0.9);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.plot-container .plotly-graph-div {
    width: 100% !important;
    min-height: 380px;
}

.plot-container-compact {
    margin-top: 0;
}

.plot-stage:fullscreen,
.plot-stage.is-fullscreen {
    display: grid;
    align-content: start;
    gap: 0.85rem;
    width: 100vw;
    height: 100vh;
    padding: 1rem 1rem 1.2rem;
    background:
        radial-gradient(circle at 18% 16%, rgba(0, 133, 57, 0.16), transparent 0 18rem),
        radial-gradient(circle at 82% 18%, rgba(31, 133, 169, 0.16), transparent 0 18rem),
        linear-gradient(180deg, rgba(3, 14, 22, 0.96), rgba(5, 18, 28, 0.98));
}

.plot-stage:fullscreen .plot-stage-toolbar,
.plot-stage.is-fullscreen .plot-stage-toolbar {
    justify-content: space-between;
}

.plot-stage:fullscreen .plot-container,
.plot-stage.is-fullscreen .plot-container {
    width: 100%;
    max-width: none;
    height: calc(100vh - 5.5rem);
    margin: 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.98);
}

.plot-stage:fullscreen .plot-container .plotly-graph-div,
.plot-stage.is-fullscreen .plot-container .plotly-graph-div {
    min-height: calc(100vh - 7rem) !important;
}

.figure-frame {
    margin: 0;
    width: 100%;
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    background: var(--panel-solid);
}

.figure-frame img,
.gallery-card img {
    display: block;
    width: 100%;
    height: auto;
}

.figure-frame-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 0;
    padding: 1rem;
}

.figure-frame-preview img {
    width: 100%;
    max-width: 860px;
    height: auto;
    max-height: none;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 0.75rem;
}

.figure-frame-preview figcaption {
    width: 100%;
    max-width: 860px;
    text-align: center;
    overflow-wrap: anywhere;
}

.figure-frame figcaption,
.gallery-meta {
    padding: 0.95rem 1rem;
}

.gallery-meta h3 {
    margin: 0 0 0.78rem;
    font-size: 1rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    font-size: 0.96rem;
}

.results-table th,
.results-table td {
    padding: 0.8rem 0.92rem;
    text-align: left;
    border-bottom: 1px solid rgba(217, 228, 220, 0.9);
}

.results-table thead th {
    background: rgba(0, 133, 57, 0.055);
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.results-table tbody tr:nth-child(even) {
    background: rgba(247, 250, 248, 0.95);
}

.empty-state {
    margin: 0;
    padding: 1rem 1.1rem;
    border: 1px dashed var(--line-mid);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.64);
}

@media (max-width: 1460px) {
    .simulator-shell,
    .architecture-shell,
    .phase-workspace {
        grid-template-columns: 1fr;
    }

    .command-deck,
    .phase-sidepanel {
        position: static;
        top: auto;
    }

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

    .phase-link {
        display: none;
    }

}

@media (max-width: 1180px) {
    .dashboard-hero-grid,
    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 950px) {
    .header-shell,
    .section-heading,
    .hero-card {
        grid-template-columns: 1fr;
        display: grid;
    }

    .header-shell {
        gap: 1rem;
    }

    .site-nav {
        justify-content: start;
    }

    .phase-schematic-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-orbit-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .site-header {
        position: static;
    }

    .header-shell {
        align-items: start;
        padding: 0.72rem 0 0.7rem;
    }

    .brand-lockup h1 {
        font-size: clamp(1.8rem, 7vw, 2.35rem);
    }

    .brand-subtitle {
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .site-nav {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: thin;
    }

    .site-nav a {
        padding: 0.48rem 0.72rem;
        white-space: nowrap;
    }

    .phase-track {
        grid-template-columns: 1fr;
    }

    .phase-module-head,
    .phase-module-foot,
    .phase-editor-header,
    .section-heading {
        align-items: start;
    }

    .phase-module-foot,
    .phase-editor-header,
    .section-heading,
    .button-row,
    .inline-form {
        flex-direction: column;
    }

    .status-stack {
        justify-items: start;
    }

    .button-row .button,
    .inline-form .button,
    .inline-form .form-field-inline {
        width: 100%;
    }

    .figure-summary {
        align-items: stretch;
    }

    .figure-summary .button-row {
        width: 100%;
    }

    .status-chip {
        width: 100%;
        justify-content: center;
    }

    .header-control-stack,
    .preset-form {
        width: 100%;
        justify-items: stretch;
        justify-content: stretch;
    }

    .sweep-selection-layout {
        grid-template-columns: 1fr;
    }

    .sweep-card-grid {
        grid-template-columns: 1fr;
    }

    .sweep-overview-card {
        position: static;
    }

    .sweep-choice-meta {
        grid-template-columns: 1fr;
    }

    .figure-control-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .header-shell,
    .page-shell {
        width: min(100% - 1rem, 1460px);
    }

    .hero-card,
    .content-card {
        padding: 1.15rem;
    }

    .system-map {
        padding: 1.15rem;
    }

    .phase-module,
    .schematic-block,
    .form-section,
    .form-field {
        padding: 0.9rem;
    }

    .phase-mini-card {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .phase-mini-card .phase-index {
        justify-self: start;
    }

    .results-table {
        min-width: 560px;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 15px;
    }

    .page-shell {
        gap: 0.9rem;
        padding: 1rem 0 1.4rem;
    }

    .brand-lockup h1 {
        letter-spacing: -0.04em;
    }

    .brand-kicker,
    .section-kicker,
    .hero-label,
    .metric-label,
    .field-label,
    .schematic-label {
        letter-spacing: 0.1em;
    }

    .metric-grid,
    .gallery-grid,
    .text-grid,
    .form-grid,
    .phase-form-grid {
        grid-template-columns: 1fr;
    }

    .command-list dd,
    .metric-value {
        word-break: break-word;
    }

    .results-table {
        min-width: 500px;
        font-size: 0.92rem;
    }
}

/* Final demo workflow refinements */
.demo-flow-card {
    padding-bottom: 1.15rem;
}

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

.workflow-strip div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(191, 208, 196, 0.75);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
}

.workflow-strip strong {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: #fff;
    background: var(--uab-green-deep);
    font-family: var(--mono);
}

.workflow-strip span {
    font-weight: 700;
    color: var(--ink-strong);
}

.simulation-form {
    display: grid;
    gap: 1rem;
}

.scenario-selector {
    margin-bottom: 1rem;
}

.scenario-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.scenario-option {
    display: grid;
    gap: 0.42rem;
    align-content: start;
    width: 100%;
    padding: 1rem 1rem 0.95rem;
    border: 1px solid rgba(191, 208, 196, 0.74);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 249, 246, 0.95));
    color: var(--ink-strong);
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    position: relative;
    overflow: hidden;
}

.scenario-option:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 133, 57, 0.24);
    box-shadow: 0 14px 28px rgba(3, 12, 18, 0.08);
}

.scenario-option.is-active {
    border-color: rgba(0, 133, 57, 0.48);
    background:
        linear-gradient(180deg, rgba(228, 247, 235, 1), rgba(244, 250, 246, 1));
    box-shadow:
        inset 0 0 0 2px rgba(0, 133, 57, 0.12),
        0 20px 36px rgba(3, 12, 18, 0.1);
    transform: translateY(-2px);
}

.scenario-option.is-active::before,
.sweep-choice-card.is-selected::before,
.sweep-choice-input:checked + .sweep-choice-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, rgba(0, 133, 57, 0.35), rgba(0, 133, 57, 0.9));
}

.scenario-option-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.scenario-option-kicker {
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.scenario-option strong {
    font-size: 1.02rem;
    line-height: 1.35;
}

.scenario-option-copy {
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.52;
}

.selection-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.6rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 133, 57, 0.18);
    background: rgba(0, 133, 57, 0.09);
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-stack {
    display: grid;
    gap: 0.25rem;
    justify-items: end;
}

.sweep-selector-form {
    display: grid;
    gap: 1rem;
}

.sweep-selection-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.sweep-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.sweep-choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sweep-choice-card,
.sweep-overview-card {
    border: 1px solid rgba(191, 208, 196, 0.74);
    border-radius: 1.15rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 246, 0.95));
    box-shadow: 0 14px 30px rgba(3, 12, 18, 0.06);
}

.sweep-choice-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1rem 0.95rem;
    cursor: pointer;
    min-height: 100%;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.sweep-choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 133, 57, 0.22);
    box-shadow: 0 18px 34px rgba(3, 12, 18, 0.08);
}

.sweep-choice-input:checked + .sweep-choice-card {
    border-color: rgba(0, 133, 57, 0.48);
    background:
        linear-gradient(180deg, rgba(228, 247, 235, 1), rgba(245, 250, 247, 1));
    box-shadow:
        inset 0 0 0 2px rgba(0, 133, 57, 0.12),
        0 22px 38px rgba(3, 12, 18, 0.11);
    transform: translateY(-2px);
}

.sweep-choice-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sweep-choice-head .phase-index {
    flex: 0 0 auto;
}

.sweep-choice-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.sweep-choice-kicker {
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sweep-choice-card > strong {
    font-size: 1.08rem;
    line-height: 1.35;
}

.sweep-choice-copy {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.94rem;
    line-height: 1.58;
}

.sweep-choice-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding-top: 0.2rem;
}

.sweep-choice-meta span {
    display: grid;
    gap: 0.2rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.9rem;
    background: rgba(248, 250, 249, 0.92);
    border: 1px solid rgba(217, 228, 220, 0.95);
}

.sweep-choice-meta small {
    color: var(--ink-soft);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sweep-choice-meta strong {
    font-size: 0.9rem;
    line-height: 1.45;
}

.sweep-overview-card {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    position: sticky;
    top: 1rem;
}

.sweep-overview-card h3 {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.2;
}

.sweep-overview-metrics {
    display: grid;
    gap: 0.75rem;
}

.sweep-overview-metrics article {
    display: grid;
    gap: 0.22rem;
    padding: 0.85rem 0.9rem;
    border-radius: 0.95rem;
    background: rgba(248, 250, 249, 0.92);
    border: 1px solid rgba(217, 228, 220, 0.95);
}

.sweep-overview-metrics span {
    color: var(--ink-soft);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sweep-overview-metrics strong {
    font-size: 0.98rem;
    line-height: 1.45;
}

.parameter-section {
    border: 1px solid rgba(191, 208, 196, 0.74);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.68);
    padding: 0.95rem;
}

.parameter-section summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
}

.parameter-section summary::-webkit-details-marker {
    display: none;
}

.parameter-section summary::after {
    content: "";
    width: 0.72rem;
    height: 0.72rem;
    justify-self: end;
    border-right: 2px solid rgba(14, 95, 51, 0.88);
    border-bottom: 2px solid rgba(14, 95, 51, 0.88);
    transform: rotate(45deg);
    transition: transform 0.18s ease, opacity 0.18s ease;
    opacity: 0.88;
}

.parameter-section[open] summary::after {
    transform: rotate(225deg);
}

.parameter-section summary strong {
    display: block;
    font-size: 1.04rem;
}

.parameter-section summary small {
    display: block;
    margin-top: 0.18rem;
    color: var(--uab-green-deep);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.parameter-section .section-summary {
    margin: 0.85rem 0 0.9rem;
}

.sticky-run-panel {
    position: sticky;
    bottom: 1rem;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(0, 133, 57, 0.18);
    border-radius: 1.1rem;
    background: rgba(246, 250, 247, 0.94);
    box-shadow: 0 18px 38px rgba(3, 12, 18, 0.18);
    backdrop-filter: blur(10px);
}

.sticky-run-panel strong {
    display: block;
    line-height: 1.45;
}

.result-anchor {
    border-color: rgba(0, 133, 57, 0.28);
}

.login-shell {
    width: min(520px, 100%);
    margin: 4rem auto;
}

.nav-logout-form {
    margin: 0;
}

.nav-logout-form button {
    padding: 0.5rem 0.78rem;
    border: 1px solid rgba(213, 238, 225, 0.08);
    border-radius: 999px;
    color: rgba(228, 241, 234, 0.76);
    background: rgba(255, 255, 255, 0.02);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-logout-form button:hover {
    border-color: rgba(132, 220, 182, 0.34);
    background: rgba(0, 133, 57, 0.22);
    color: #f7fff9;
}

@media (max-width: 900px) {
    .workflow-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scenario-selector-grid {
        grid-template-columns: 1fr;
    }

    .sticky-run-panel {
        position: static;
        display: grid;
    }

    .reference-scenario-card {
        flex-direction: column;
    }

    .reference-scenario-meta {
        width: 100%;
        justify-items: start;
        text-align: left;
    }

    .dashboard-status-row {
        flex-direction: column;
        align-items: start;
    }
}

@media (max-width: 640px) {
    .workflow-strip {
        grid-template-columns: 1fr;
    }
}

/* Final demo polish */
.login-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1.5rem;
    align-items: stretch;
    max-width: 1080px;
    margin: 2rem auto;
}
.login-intro,
.login-shell {
    min-height: 360px;
}
.login-points {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 2rem;
}
.login-points span,
.user-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: .45rem .75rem;
    background: rgba(255,255,255,.08);
    font-size: .86rem;
}
.user-pill {
    color: #fff;
    background: rgba(8, 89, 74, .28);
}
.login-form input {
    font-size: 1rem;
}
.definition-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.definition-grid article {
    border: 1px solid rgba(24,39,34,.12);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,.72);
}
.definition-grid strong {
    display:block;
    margin-bottom:.35rem;
}
.definition-grid span {
    color: var(--muted-text, #5c6964);
    font-size: .92rem;
}
@media (max-width: 900px) {
    .login-hero,
    .definition-grid {
        grid-template-columns: 1fr;
    }
}

/* Public login state */
.site-header-public {
    position: relative;
    background:
        radial-gradient(circle at 20% 22%, rgba(170, 235, 205, 0.12), transparent 0 14rem),
        radial-gradient(circle at 82% 18%, rgba(112, 194, 226, 0.1), transparent 0 16rem),
        linear-gradient(180deg, rgba(3, 14, 22, 0.88), rgba(6, 18, 28, 0.82));
}

.site-header-public .header-shell {
    align-items: center;
    padding: 1rem 0 0.95rem;
}

.access-state-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.72rem 1.15rem;
    border: 1px solid rgba(175, 229, 203, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(238, 248, 243, 0.88);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.page-shell-login {
    min-height: calc(100vh - 10rem);
    align-items: center;
    padding-top: 2.1rem;
    padding-bottom: 2.8rem;
}

.login-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: min(78vh, 860px);
}

.login-constellation {
    position: absolute;
    inset: 6% 7% auto;
    height: 72%;
    pointer-events: none;
    opacity: 0.8;
}

.login-constellation span {
    position: absolute;
    display: block;
    border-radius: 999px;
    border: 1px solid rgba(170, 234, 207, 0.12);
}

.login-constellation span:nth-child(1) {
    inset: 0 12% auto 12%;
    height: 100%;
}

.login-constellation span:nth-child(2) {
    inset: 10% 28% auto 28%;
    height: 80%;
}

.login-constellation span:nth-child(3) {
    inset: 24% 39% auto 39%;
    height: 52%;
}

.login-shell-centered {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    min-height: auto;
    margin: 0 auto;
    padding: 1.7rem 1.7rem 1.55rem;
    border-color: rgba(199, 224, 210, 0.48);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(239, 246, 242, 0.8)),
        rgba(244, 249, 246, 0.9);
    box-shadow:
        0 32px 72px rgba(2, 10, 16, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.login-shell-centered::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1.35rem;
    pointer-events: none;
    background:
        radial-gradient(circle at top right, rgba(0, 133, 57, 0.08), transparent 0 13rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 42%);
}

.login-shell-topline,
.login-shell-copy,
.login-points-centered,
.login-form-centered,
.login-shell-centered .form-alert {
    position: relative;
    z-index: 1;
}

.login-shell-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.login-shell-topline .section-kicker {
    margin-bottom: 0;
}

.login-shell-copy {
    display: grid;
    gap: 0.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.login-shell-copy h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.3rem);
    line-height: 1.04;
}

.login-shell-copy .section-copy {
    margin: 0 auto;
    max-width: 34rem;
}

.login-points-centered {
    justify-content: center;
    margin-top: 0;
    margin-bottom: 1.2rem;
}

.login-points-centered span {
    border-color: rgba(0, 133, 57, 0.14);
    background: rgba(255, 255, 255, 0.76);
    color: var(--uab-green-deep);
}

.login-form-centered {
    width: 100%;
}

.login-form-centered .form-field {
    background: rgba(255, 255, 255, 0.82);
}

.is-locked .brand-subtitle {
    color: rgba(228, 241, 234, 0.88);
}

.is-locked .site-nav {
    display: none;
}

.is-authenticated .user-pill {
    color: #f7fff9;
    border-color: rgba(166, 228, 198, 0.16);
    background: rgba(0, 133, 57, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-logout-form {
    margin: 0;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.55rem;
    padding: 0.56rem 1rem;
    border: 1px solid rgba(206, 233, 220, 0.18);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
        rgba(6, 24, 34, 0.34);
    color: #f1fbf4;
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.logout-button::before {
    content: "\2190";
    display: inline-block;
    font-size: 0.92rem;
}

.logout-button:hover {
    transform: translateY(-1px);
    border-color: rgba(143, 224, 184, 0.36);
    background:
        linear-gradient(135deg, rgba(0, 133, 57, 0.24), rgba(14, 95, 51, 0.28)),
        rgba(6, 24, 34, 0.42);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

@media (max-width: 900px) {
    .login-shell-topline {
        align-items: start;
        flex-direction: column;
    }

    .access-state-pill,
    .login-shell-topline .status-chip {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .page-shell-login {
        min-height: auto;
        padding-top: 1rem;
    }

    .login-stage {
        min-height: auto;
    }

    .login-shell-centered {
        padding: 1.2rem 1.1rem 1.15rem;
    }
}

.model-intro-card .definition-grid article span {
    min-height: 2.4rem;
}

.model-best-for {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(0, 133, 57, 0.16);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.58);
}

.result-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1rem;
}

.result-group-card {
    padding: 1rem;
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.62);
}

.result-group-card h3 {
    margin: 0 0 0.35rem;
}

.table-wrap-compact {
    margin-top: 0.8rem;
}

.sweep-range-panel {
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(0, 133, 57, 0.14);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.58);
}

.sweep-range-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.7rem;
}

.sweep-range-field input {
    width: 100%;
}
