:root {
    color-scheme: light;
    --bg: #e9f0f6;
    --surface: #ffffff;
    --surface-soft: #f4f8fc;
    --surface-strong: #1e4268;
    --surface-stronger: #163350;
    --ink: #1c2735;
    --muted: #6b7d92;
    --muted-strong: #4f6279;
    --line: #d5e0eb;
    --line-strong: #b9cadc;
    --brand: #1597a8;
    --brand-strong: #087f91;
    --blue: #1e4268;
    --green: #2d7a4f;
    --red: #b03a2e;
    --amber: #c27a13;
    --shadow: 0 10px 26px rgba(26, 58, 92, 0.12);
    --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

body.theme-dark {
    color-scheme: dark;
    --bg: #1a3a5c;
    --surface: #1f4a74;
    --surface-soft: #163350;
    --surface-strong: #1e4268;
    --surface-stronger: #102946;
    --ink: #eaf5fb;
    --muted: #a8d4e8;
    --muted-strong: #c1e4f2;
    --line: rgba(191, 221, 236, 0.18);
    --line-strong: rgba(191, 221, 236, 0.28);
    --brand: #27c8d9;
    --brand-strong: #22a9ba;
    --blue: #78b7e6;
    --green: #52e1a0;
    --red: #ff8f85;
    --amber: #ffb84d;
    --shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

button,
input,
select {
    font: inherit;
}

.page-shell {
    width: min(1320px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 10px 0 52px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
    background: var(--surface-strong);
    color: #fff;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 8px 8px;
    margin-bottom: 18px;
    box-shadow: 0 8px 22px rgba(15, 35, 58, 0.18);
}

.brand-lockup {
    text-decoration: none;
    display: flex;
    align-items: center;
    min-width: 0;
    background: #fff;
    border-radius: 8px;
    padding: 3px 8px 3px 3px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.app-logo {
    width: 190px;
    max-width: 46vw;
    height: 52px;
    display: block;
    object-fit: contain;
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.standard-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(39, 200, 217, 0.5);
    border-radius: 6px;
    padding: 5px 11px;
    color: #e5fbff;
    background: rgba(21, 151, 168, 0.18);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-toggle,
.print-button,
.tools-button,
.primary-button {
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    padding: 8px 13px;
    font-weight: 800;
    cursor: pointer;
}

.theme-toggle,
.print-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.tools-button {
    color: #ffffff;
    background: var(--brand);
    border: 1px solid rgba(39, 200, 217, 0.6);
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(21, 151, 168, 0.22);
}

.tools-button:hover {
    background: var(--brand-strong);
}

.primary-button {
    width: 100%;
    min-height: 48px;
    background: var(--brand);
    color: #fff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(21, 151, 168, 0.2);
}

.primary-button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.tool-layout,
.result-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 18px;
    align-items: start;
}

.input-stack,
.result-main {
    min-width: 0;
}

.visual-rail {
    position: sticky;
    top: 82px;
    display: grid;
    gap: 14px;
    align-self: start;
}

.panel,
.results,
.result-table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 20px;
    margin-bottom: 16px;
}

.results {
    padding: 20px;
}

.result-table-card {
    padding: 18px;
    margin-top: 16px;
}

.panel-title,
.result-header,
.table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-title {
    justify-content: flex-start;
}

.section-accent {
    width: 3px;
    height: 24px;
    border-radius: 999px;
    background: var(--brand);
    flex: 0 0 auto;
}

.section-accent.warning {
    background: var(--amber);
}

.section-accent.pale {
    background: var(--line-strong);
}

.section-kicker {
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h2,
h3 {
    margin: 0;
    letter-spacing: 0;
}

h2 {
    font-size: 1.12rem;
}

h3 {
    font-size: 1rem;
}

.form-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.form-grid.one {
    grid-template-columns: 1fr;
}

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

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

.form-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field-control,
input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--surface-soft);
    outline: none;
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: 0;
}

input[type="number"] {
    text-align: right;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.field-control:focus,
input:focus,
select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(21, 151, 168, 0.14);
}

.field-control:disabled,
input:disabled,
select:disabled {
    color: color-mix(in srgb, var(--muted), transparent 12%);
    background: color-mix(in srgb, var(--surface-soft), transparent 20%);
    border-color: var(--line);
    cursor: not-allowed;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: auto;
    accent-color: var(--brand);
}

label.optional-disabled {
    color: color-mix(in srgb, var(--muted), transparent 25%);
}

.choice-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin: 12px 0;
}

.choice-row > span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-top: 9px;
}

.choice-row > div,
.choice-row ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.choice-row > div > div,
.choice-row li {
    min-width: 0;
}

.choice-row label {
    position: relative;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-size: 0.79rem;
    font-weight: 800;
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
    padding: 8px 10px;
}

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

.choice-row label:has(input:checked) {
    color: var(--brand-strong);
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand), var(--surface) 88%);
}

.choice-row label.option-disabled {
    color: color-mix(in srgb, var(--muted), transparent 18%);
    background: color-mix(in srgb, var(--surface-soft), transparent 8%);
    border-color: color-mix(in srgb, var(--line), transparent 10%);
    cursor: not-allowed;
    opacity: 0.56;
}

.choice-row label.option-disabled:has(input:checked) {
    color: var(--muted);
    border-color: var(--line);
    background: var(--surface-soft);
}

body.theme-dark .choice-row label:has(input:checked) {
    color: #e8ffff;
    background: rgba(39, 200, 217, 0.16);
}

.load-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.load-token {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-size: 0.8rem;
    font-weight: 800;
}

.load-token span {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-block;
    background: var(--brand);
    box-shadow: inset 0 -6px 0 rgba(255, 255, 255, 0.18);
}

.load-token.wind span {
    clip-path: polygon(0 42%, 78% 42%, 60% 21%, 100% 50%, 60% 79%, 78% 58%, 0 58%);
}

.load-token.snow span {
    border-radius: 999px;
    background: #6aaee8;
}

.load-token.live span {
    background: var(--green);
}

.load-token.maintenance span {
    background: var(--amber);
}

.load-group {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 4px;
}

.load-group h3 {
    margin-bottom: 12px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    margin: 12px 0;
    background: var(--surface-soft);
    color: var(--ink);
}

.check-row label {
    display: inline;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
}

.sub-fields {
    border-left: 3px solid color-mix(in srgb, var(--brand), var(--line) 55%);
    padding-left: 12px;
}

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

.pane-card {
    border: 1px solid color-mix(in srgb, var(--brand), var(--line) 58%);
    border-radius: 8px;
    padding: 16px;
    background:
        radial-gradient(circle at 14% 0%, rgba(17, 143, 160, 0.18), transparent 34%),
        radial-gradient(circle at 88% 10%, rgba(109, 106, 167, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(237, 249, 252, 0.86));
    box-shadow: 0 12px 28px rgba(27, 64, 92, 0.14);
}

.pane-card h3 {
    color: var(--ink);
    margin-bottom: 12px;
    font-weight: 900;
}

.muted {
    color: var(--muted);
}

.muted-text {
    margin: 0;
    color: var(--muted);
}

.actions {
    margin: 0;
}

.analyzer-form.is-hidden-after-result {
    display: none;
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.alert-error {
    color: #8f2430;
    background: #fff1f2;
    border: 1px solid #f3bdc3;
}

body.theme-dark .alert-error {
    color: #ffd2d7;
    background: rgba(176, 58, 46, 0.18);
    border-color: rgba(255, 143, 133, 0.32);
}

.method-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.report-method-note {
    max-width: 980px;
    margin: 8px auto 0;
    font-size: 0.68rem;
}

.diagram-panel {
    overflow: hidden;
}

.diagram-canvas {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.glass-diagram {
    display: block;
    width: 100%;
    height: auto;
}

.glass-diagram.is-gd3d-hidden {
    display: none;
}

.gd3d-canvas {
    display: block;
    width: 100%;
    height: 420px;
    min-height: 420px;
    cursor: grab;
    background: linear-gradient(160deg, color-mix(in srgb, var(--surface-soft), #ffffff 22%), color-mix(in srgb, var(--surface-soft), var(--brand) 5%));
}

.gd3d-canvas:active {
    cursor: grabbing;
}

.gd3d-view-tabs,
.fem-view-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(21, 151, 168, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.12);
    backdrop-filter: blur(10px);
}

.gd3d-view-tabs {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
}

.fem-view-tabs {
    position: relative;
    z-index: 4;
    align-self: flex-start;
    width: fit-content;
    margin: 0 0 10px;
}

.gd3d-view-tabs button,
.fem-view-tabs button {
    min-width: 0;
    border: 0;
    border-radius: 6px;
    padding: 6px 9px;
    color: var(--muted);
    background: transparent;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.gd3d-view-tabs button.is-active,
.fem-view-tabs button.is-active {
    color: #ffffff;
    background: var(--brand);
}

.fem-heatmap {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.fem-heatmap.is-active {
    display: block;
}

.fem-readout {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 3;
    max-width: calc(100% - 24px);
    padding: 9px 11px;
    border: 1px solid rgba(21, 151, 168, 0.18);
    border-radius: 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.12);
    backdrop-filter: blur(10px);
    font-size: 0.78rem;
    font-weight: 800;
}

.fem-readout strong {
    color: var(--brand-strong);
}

.gd3d-info-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: min(248px, calc(48% - 10px));
    max-height: calc(100% - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    border: 1px solid rgba(21, 151, 168, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.12);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 98, 121, 0.5) transparent;
}

.gd3d-info-panel::-webkit-scrollbar {
    width: 6px;
}

.gd3d-info-panel::-webkit-scrollbar-track {
    background: transparent;
}

.gd3d-info-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(79, 98, 121, 0.38);
}

.gd3d-info-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 98, 121, 0.58);
}

body.theme-dark .gd3d-info-panel {
    background: rgba(9, 22, 38, 0.82);
    border-color: rgba(34, 211, 238, 0.18);
}

.gd3d-info-section + .gd3d-info-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.gd3d-info-panel h3 {
    margin: 0 0 6px;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.gd3d-stack {
    display: grid;
    gap: 4px;
}

.gd3d-stack-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 8px;
    background: color-mix(in srgb, var(--surface-soft), transparent 8%);
}

.gd3d-stack-bar {
    width: 22px;
    border-radius: 4px;
    border: 1px solid rgba(21, 151, 168, 0.36);
    background: rgba(21, 151, 168, 0.48);
}

.gd3d-stack-row.is-pvb .gd3d-stack-bar {
    border-color: rgba(217, 119, 6, 0.42);
    background: rgba(224, 173, 19, 0.78);
}

.gd3d-stack-row.is-gap .gd3d-stack-bar {
    border-style: dashed;
    border-color: rgba(90, 169, 230, 0.44);
    background: rgba(165, 216, 238, 0.24);
}

.gd3d-stack-copy {
    min-width: 0;
}

.gd3d-stack-copy strong,
.gd3d-stack-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gd3d-stack-copy strong {
    color: var(--brand-strong);
    font-size: 0.74rem;
    line-height: 1.1;
}

.gd3d-stack-copy small {
    color: var(--muted);
    font-size: 0.64rem;
    line-height: 1.15;
}

.gd3d-stack-row em {
    color: var(--muted-strong);
    font-style: normal;
    font-size: 0.66rem;
    font-weight: 800;
    white-space: nowrap;
}

.gd3d-info-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 28%);
    font-size: 0.72rem;
}

.gd3d-info-row:last-child {
    border-bottom: 0;
}

.gd3d-info-row span {
    color: var(--muted);
}

.gd3d-info-row strong {
    color: var(--ink);
    text-align: right;
    overflow-wrap: anywhere;
}

.gd3d-info-result.is-pass .gd3d-info-row strong {
    color: var(--green);
}

.gd3d-info-result.is-fail .gd3d-info-row strong {
    color: var(--red);
}

.diagram-bg {
    fill: color-mix(in srgb, var(--surface-stronger), var(--surface-soft) 45%);
    stroke: var(--line);
}

.diagram-shadow {
    fill: rgba(30, 66, 104, 0.12);
}

.grid-line {
    stroke: rgba(21, 151, 168, 0.28);
    stroke-width: 1;
}

.glass-panel {
    fill: rgba(205, 240, 246, 0.82);
    stroke: var(--brand);
    stroke-width: 2.5;
    filter: drop-shadow(0 0 8px rgba(21, 151, 168, 0.38));
}

.glass-panel.secondary {
    fill: rgba(205, 240, 246, 0.34);
    stroke: rgba(21, 151, 168, 0.52);
    stroke-width: 1.4;
    filter: none;
}

.glass-side {
    fill: rgba(72, 190, 206, 0.38);
    stroke: var(--brand);
    stroke-width: 1;
}

.glass-top {
    fill: rgba(139, 216, 229, 0.52);
    stroke: var(--brand);
    stroke-width: 1;
}

.glass-highlight {
    fill: rgba(255, 255, 255, 0.26);
    stroke: none;
}

.dim-line {
    stroke: var(--muted);
    stroke-width: 1.2;
}

.dim-text,
.diagram-legend text,
.diagram-note,
.load-label {
    fill: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

.diagram-note {
    fill: var(--brand-strong);
    font-size: 10px;
    font-weight: 800;
}

.load-label {
    fill: #d97706;
    font-size: 10px;
    font-weight: 800;
}

.diagram-center {
    fill: var(--green);
    font-size: 13px;
    font-weight: 900;
    text-anchor: middle;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.load-arrow {
    fill: var(--amber);
    stroke: var(--amber);
}

.support-arrow {
    fill: var(--brand);
    stroke: var(--brand);
}

.diagram-legend rect:first-child {
    fill: var(--amber);
}

.diagram-legend rect:nth-of-type(2) {
    fill: var(--brand);
}

.diagram-legend rect:nth-of-type(3) {
    fill: var(--green);
}

.diagram-legend,
.diagram-center {
    display: none;
}

.gd3d-pane-shadow {
    fill: rgba(15, 35, 58, 0.08);
}

.gd3d-pane {
    fill: rgba(184, 232, 242, 0.46);
    stroke: var(--brand);
    stroke-width: 2.5;
    filter: drop-shadow(0 8px 18px rgba(21, 151, 168, 0.16));
}

.gd3d-pane-side {
    fill: rgba(72, 190, 206, 0.24);
    stroke: var(--brand);
    stroke-width: 1.2;
}

.gd3d-pane-grid {
    stroke: rgba(21, 151, 168, 0.18);
    stroke-width: 1;
}

.gd3d-dim {
    fill: var(--muted-strong);
    font-size: 13px;
    font-weight: 800;
}

.gd3d-load rect,
.gd3d-load circle {
    opacity: 0.92;
}

.gd3d-load text,
.gd3d-load-label {
    fill: var(--muted-strong);
    font-size: 12px;
    font-weight: 900;
}

.gd3d-load-wind rect,
.gd3d-load-wind circle {
    fill: #d97706;
}

.gd3d-load-snow rect,
.gd3d-load-snow circle {
    fill: #5aa9e6;
}

.gd3d-load-live rect,
.gd3d-load-live circle {
    fill: #1e8a5e;
}

.gd3d-load {
    animation: gd3d-pulse 1.8s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.gd3d-area rect {
    stroke-width: 2;
}

.gd3d-area-maintenance rect {
    fill: rgba(217, 119, 6, 0.16);
    stroke: #d97706;
}

.gd3d-area-barrier rect {
    fill: rgba(217, 119, 6, 0.13);
    stroke: #d97706;
}

.gd3d-point rect {
    fill: rgba(201, 64, 64, 0.14);
    stroke: #c94040;
}

.gd3d-point-core {
    fill: #c94040;
    stroke: #ffffff;
    stroke-width: 2;
}

.gd3d-barrier-line {
    stroke: #d97706;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 10 7;
}

.gd3d-result-strip {
    position: absolute;
    left: 14px;
    right: min(270px, 52%);
    top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    pointer-events: none;
}

.gd3d-result-strip div {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface), transparent 7%);
    padding: 8px 10px;
    box-shadow: 0 6px 18px rgba(23, 32, 51, 0.08);
}

.gd3d-result-strip span {
    display: block;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gd3d-result-strip strong {
    display: block;
    margin-top: 2px;
    color: var(--brand-strong);
    font-size: 0.92rem;
}

.gd3d-result-strip.is-fail div {
    border-color: rgba(176, 58, 46, 0.35);
    background: color-mix(in srgb, #fff5f5, var(--surface) 45%);
}

.gd3d-result-strip.is-fail strong {
    color: var(--red);
}

.gd3d-result-strip.is-pass strong {
    color: var(--brand-strong);
}

@media (max-width: 700px) {
    .diagram-canvas {
        overflow: visible;
    }

    .gd3d-canvas {
        height: 430px;
        min-height: 430px;
    }

    .gd3d-view-tabs,
    .fem-view-tabs {
        width: 100%;
        justify-content: space-between;
        gap: 4px;
    }

    .gd3d-view-tabs {
        left: 8px;
        right: 8px;
        top: 8px;
        width: auto;
    }

    .gd3d-view-tabs button,
    .fem-view-tabs button {
        flex: 1 1 0;
        padding: 8px 6px;
        font-size: 0.62rem;
        letter-spacing: 0.04em;
    }

    .gd3d-info-panel {
        position: static;
        width: auto;
        max-height: none;
        margin: 10px;
        overflow: visible;
        backdrop-filter: blur(8px);
    }

    .gd3d-result-strip {
        left: 10px;
        right: 10px;
        top: 54px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gd3d-result-strip div {
        padding: 9px 10px;
    }

    .gd3d-result-strip strong {
        font-size: 1.1rem;
    }
}

@media print {
    .gd3d-info-panel {
        display: none;
    }
}

@keyframes gd3d-pulse {
    0%,
    100% {
        opacity: 0.82;
    }
    50% {
        opacity: 1;
    }
}

.diagram-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.diagram-facts > div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    background: var(--surface-soft);
}

.diagram-facts span,
.result-summary-strip span,
.method-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.diagram-facts strong {
    display: block;
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.86rem;
}

.result-actions button {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--brand-strong);
    font-weight: 800;
    font: inherit;
    text-decoration: none;
    padding: 0;
}

.result-actions button:hover {
    text-decoration: underline;
}

.result-summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    border-left: 4px solid var(--brand);
    background: color-mix(in srgb, var(--brand), var(--surface) 91%);
    border-radius: 8px;
    padding: 14px;
}

body.theme-dark .result-summary-strip {
    background: rgba(39, 200, 217, 0.12);
}

.result-summary-strip strong,
.method-summary strong {
    display: block;
    margin-top: 4px;
    font-size: 0.92rem;
}

.method-summary {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr 1.4fr;
    gap: 12px;
    margin: -4px 0 16px;
    border: 1px solid color-mix(in srgb, var(--brand), var(--line) 50%);
    border-left: 4px solid var(--steel);
    border-radius: 8px;
    padding: 12px 14px;
    background: color-mix(in srgb, var(--surface-soft), var(--brand) 5%);
}

body.theme-dark .method-summary {
    background: rgba(18, 44, 70, 0.58);
    border-color: rgba(134, 186, 214, 0.24);
}

.pane-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 14px;
}

.mini-card h3 {
    margin-bottom: 12px;
}

dl {
    margin: 0;
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 7px 10px;
    font-size: 0.83rem;
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
    font-weight: 800;
}

.action-properties {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.action-properties h4 {
    margin: 0 0 8px;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.action-value-list {
    display: grid;
    gap: 10px;
}

.action-value-row {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.action-value-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.action-value-title {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 0.82rem;
    line-height: 1.25;
}

.action-value-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px 12px;
}

.action-value-facts div {
    min-width: 0;
}

.action-value-facts span {
    display: block;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.action-value-facts b {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.74rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    table-layout: fixed;
}

.data-table .col-combination {
    width: 30%;
}

.data-table .col-governing {
    width: 16%;
}

.data-table .col-fd,
.data-table .col-number {
    width: 13%;
}

.data-table .col-ratio {
    width: 12%;
}

.data-table .col-method {
    width: 14%;
}

.data-table .col-result {
    width: 8%;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 8px 9px;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.data-table th:not(:first-child):not(:last-child) {
    text-align: right;
}

.data-table th.method-heading {
    text-align: center !important;
}

.data-table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--surface-soft), transparent 28%);
}

.data-table .num {
    text-align: right;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.data-table td[data-label="Method"] {
    text-align: center;
}

.data-table th:last-child,
.data-table td:last-child {
    text-align: center;
}

.data-table .row-fail td {
    background: color-mix(in srgb, var(--red), var(--surface) 90%);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.68rem;
    font-weight: 900;
}

.pill.pass {
    background: color-mix(in srgb, var(--green), transparent 78%);
    color: var(--green);
}

.pill.fail {
    background: color-mix(in srgb, var(--red), transparent 78%);
    color: var(--red);
}

.pill.neutral {
    background: color-mix(in srgb, var(--muted), transparent 80%);
    color: var(--muted-strong);
}

.method-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    border-radius: 999px;
    padding: 3px 8px;
    color: var(--muted-strong);
    background: color-mix(in srgb, var(--muted), transparent 84%);
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: normal;
}

.method-tag.linear {
    color: #0f7585;
    background: rgba(21, 151, 168, 0.14);
}

.method-tag.nonlinear,
.method-tag.auto {
    color: #6c5d13;
    background: rgba(217, 164, 27, 0.18);
}

.method-tag.roark {
    color: #6f3f11;
    background: rgba(194, 109, 32, 0.16);
}

.method-tag.mixed {
    color: #365477;
    background: rgba(104, 135, 166, 0.18);
}

body.theme-dark .method-tag.linear {
    color: #9eeffc;
}

body.theme-dark .method-tag.nonlinear,
body.theme-dark .method-tag.auto {
    color: #ffe7a3;
}

body.theme-dark .method-tag.roark {
    color: #ffd1a1;
}

body.theme-dark .method-tag.mixed {
    color: #d2e5fb;
}

@media (max-width: 700px) {
    .table-wrap {
        overflow-x: visible;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table {
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0;
        font-size: 0.86rem;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px 10px;
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .data-table tbody tr:last-child {
        border-bottom: 0;
    }

    .data-table th,
    .data-table td {
        border-bottom: 0;
        padding: 0;
        background: transparent !important;
        text-align: left !important;
        min-width: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: 0.62rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .single-table td:nth-child(1),
    .dgu-table td:nth-child(1) {
        grid-column: 1 / -1;
    }

    .data-table .num {
        text-align: left !important;
        white-space: normal;
    }

    .data-table td:last-child {
        align-self: end;
    }

    .pill {
        min-width: 64px;
        padding: 5px 10px;
    }
}

.is-hidden {
    display: none !important;
}

.app-footer {
    width: min(1320px, calc(100vw - 32px));
    margin: -28px auto 24px;
    min-height: 40px;
    display: grid;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    background: color-mix(in srgb, var(--surface), var(--bg) 22%);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.68rem;
    line-height: 1.35;
    text-align: center;
}

@media (max-width: 1100px) {
    .tool-layout,
    .result-layout {
        grid-template-columns: 1fr;
    }

    .visual-rail {
        position: static;
    }

    .result-rail {
        order: -1;
    }
}

@media (max-width: 820px) {
    .page-shell {
        width: min(100% - 20px, 1320px);
        padding-top: 0;
    }

    .app-header {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 0 0 8px 8px;
    }

    .app-logo {
        width: 172px;
        max-width: 80vw;
    }

    .top-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .form-grid.two,
    .form-grid.three,
    .form-grid.four,
    .pane-pair,
    .pane-results,
    .result-summary-strip,
    .project-report-strip,
    .load-overview {
        grid-template-columns: 1fr;
    }

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

    .choice-row > span {
        padding-top: 0;
    }

    .panel,
    .results,
    .result-table-card {
        padding: 14px;
    }

    .app-footer {
        width: min(100% - 20px, 1320px);
        margin-bottom: 18px;
    }
}

@media print {
    @page {
        margin: 12mm;
    }

    body {
        background: #fff;
        color: #111827;
    }

    .analyzer-form,
    .theme-toggle,
    .print-button,
    .top-actions,
    .report-toolbar,
    .result-actions {
        display: none;
    }

    .page-shell {
        width: 100%;
        padding: 0;
    }

    .results {
        padding: 0;
        border: 0;
    }

    .app-header {
        position: static;
        box-shadow: none;
        border-radius: 0;
        margin-bottom: 10px;
        background: #fff;
        border: 0;
    }

    .brand-lockup {
        box-shadow: none;
        border: 1px solid #d0d7de;
    }

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

    .result-rail {
        display: none;
    }

    .panel,
    .results,
    .result-table-card {
        box-shadow: none;
        border-color: #d0d7de;
    }

    .project-report-strip,
    .compliance-banner,
    .util-card,
    .result-summary-strip,
    .mini-card,
    .result-table-card {
        margin-bottom: 8px;
    }

    .project-report-strip,
    .compliance-banner,
    .util-card,
    .result-summary-strip,
    .mini-card,
    .result-table-card,
    .data-table th,
    .data-table td {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .panel,
    .project-report-strip,
    .compliance-banner,
    .util-card,
    .result-summary-strip,
    .mini-card,
    .pane-results,
    .diagram-panel,
    .result-table-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .data-table thead {
        display: table-header-group;
    }

    .data-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .pane-results {
        grid-template-columns: 1fr 1fr;
    }

    .mini-card {
        display: block;
        min-height: 0;
    }

    .data-table {
        font-size: 8.5pt;
        table-layout: fixed;
    }

    .data-table th {
        font-size: 7.5pt;
    }

    .app-footer {
        width: 100%;
        margin: 10px 0 0;
        color: #6b7280;
        background: #fff;
        border: 0;
        font-size: 8px;
    }
}

/* Final Claude reference alignment overrides. */
:root {
    --bg: #edf4f7;
    --surface: #ffffff;
    --surface-soft: #f6fbff;
    --surface-strong: #1e4268;
    --surface-stronger: #eef7fb;
    --ink: #172033;
    --muted: #5f7184;
    --muted-strong: #435a70;
    --line: #cfdde8;
    --line-strong: #adc4d5;
    --brand: #118fa0;
    --brand-strong: #087486;
    --green: #16845f;
    --red: #c94040;
    --amber: #d97706;
    --mint: #16a085;
    --steel: #5b7086;
    --violet: #6d6aa7;
    --shadow: 0 1px 4px rgba(23, 32, 51, 0.07), 0 4px 16px rgba(23, 32, 51, 0.04);
    --font-head: "Rajdhani", Inter, sans-serif;
    --mono: "Inter", ui-sans-serif, system-ui, sans-serif;
}

body:not(.theme-dark) {
    background:
        radial-gradient(circle at 10% 0%, rgba(17, 143, 160, 0.1), transparent 32%),
        radial-gradient(circle at 84% 8%, rgba(109, 106, 167, 0.08), transparent 26%),
        linear-gradient(180deg, #f6fbfd 0%, var(--bg) 42%, #e9f1f5 100%);
}

body.theme-dark {
    --bg: #1a3a5c;
    --surface: #1f4a74;
    --surface-soft: #163350;
    --surface-strong: #1e4268;
    --surface-stronger: #163350;
    --ink: #e8f4f8;
    --muted: #a8d4e8;
    --muted-strong: #d2eef8;
    --line: rgba(34, 211, 238, 0.14);
    --line-strong: rgba(34, 211, 238, 0.24);
    --brand: #22d3ee;
    --brand-strong: #22d3ee;
    --green: #4ade9a;
    --red: #ff8f85;
    --amber: #f59e0b;
    --shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.page-shell,
.app-footer {
    width: min(840px, calc(100vw - 48px));
}

@media (min-width: 1180px) {
    .page-shell,
    .app-footer {
        width: min(1180px, calc(100vw - 96px));
    }

    .tool-layout {
        grid-template-columns: minmax(0, 1fr) 390px;
        align-items: start;
    }

    .visual-rail {
        position: sticky;
        top: 92px;
    }

    .result-layout {
        grid-template-columns: minmax(0, 1fr) 390px;
        align-items: start;
    }
}

.page-shell {
    padding: 0 0 52px;
}

.app-header {
    min-height: 68px;
    margin: 0 0 28px;
    padding: 8px 18px;
    border: 0;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(23, 32, 51, 0.18);
}

.brand-lockup {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    padding: 4px 12px 4px 6px;
    box-shadow: 0 1px 4px rgba(23, 32, 51, 0.08);
}

.app-logo {
    width: 214px;
    height: 54px;
}

.tool-layout,
.result-layout {
    grid-template-columns: 1fr;
    gap: 16px;
}

.input-stack {
    display: flex;
    flex-direction: column;
}

.settings-panel {
    order: 2;
    border-color: rgba(91, 112, 134, 0.28);
    background:
        radial-gradient(circle at 12% 0%, rgba(17, 143, 160, 0.16), transparent 32%),
        radial-gradient(circle at 88% 12%, rgba(109, 106, 167, 0.12), transparent 30%),
        linear-gradient(135deg, rgba(252, 254, 255, 0.98), rgba(233, 243, 248, 0.94) 52%, rgba(247, 251, 253, 0.98));
}

.settings-panel .section-accent {
    background: linear-gradient(180deg, var(--brand), var(--steel));
}

.config-panel {
    order: 3;
}

.load-panel {
    order: 4;
}

.load-panel {
    border-color: rgba(22, 163, 144, 0.34);
    background:
        radial-gradient(circle at 14% 0%, rgba(22, 163, 144, 0.2), transparent 34%),
        radial-gradient(circle at 86% 4%, rgba(30, 66, 104, 0.08), transparent 30%),
        linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(243, 249, 251, 0.9) 55%, rgba(232, 248, 243, 0.92));
}

.load-panel .section-accent.warning {
    background: linear-gradient(180deg, var(--mint), #2d7a4f);
}

.project-panel {
    order: 1;
}

.visual-rail {
    position: static;
}

.panel,
.results,
.result-table-card,
.mini-card,
.pane-card {
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.config-panel {
    background:
        radial-gradient(circle at 16% 0%, rgba(17, 143, 160, 0.1), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.94));
}

.diagram-panel {
    border-color: rgba(91, 112, 134, 0.22);
    background:
        radial-gradient(circle at 15% 0%, rgba(17, 143, 160, 0.1), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.95));
}

.panel,
.results,
.result-table-card {
    padding: 22px 24px;
    margin-bottom: 16px;
}

.section-kicker {
    display: none;
}

.panel-title h2,
.table-heading h3 {
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-accent {
    width: 3px;
    height: 15px;
    border-radius: 2px;
}

label {
    color: color-mix(in srgb, var(--muted), transparent 12%);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
}

.field-control,
input,
select {
    min-height: 41px;
    border-radius: 8px;
    background: var(--surface-soft);
    border-color: var(--line);
    padding: 10px 13px;
}

.choice-row {
    grid-template-columns: 1fr;
    gap: 8px;
}

.choice-row > span {
    padding: 0;
}

.choice-row label {
    min-height: 44px;
    border-radius: 8px;
    border-width: 1.5px;
}

.load-overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.load-token {
    min-height: 82px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    text-align: center;
    border-width: 1.5px;
    appearance: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
    opacity: 0.58;
}

.load-token:hover {
    transform: translateY(-1px);
    border-color: var(--brand);
    opacity: 0.82;
}

.load-token.is-active {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand), var(--surface) 88%);
    box-shadow: 0 0 0 3px rgba(21, 151, 168, 0.1);
    opacity: 1;
}

.load-panel .load-token.is-active {
    border-color: #128672;
    background:
        linear-gradient(180deg, rgba(22, 163, 144, 0.2), rgba(255, 255, 255, 0.86)),
        #effcf9;
    box-shadow: 0 0 0 3px rgba(22, 163, 144, 0.14), 0 12px 24px rgba(20, 128, 109, 0.14);
}

.load-panel .load-token.barrier.is-active {
    border-color: #0f806f;
    background:
        linear-gradient(180deg, rgba(22, 163, 144, 0.24), rgba(255, 255, 255, 0.84)),
        #e6fbf6;
}

.load-panel .sub-fields {
    border-left-color: rgba(21, 151, 168, 0.55);
    background: rgba(255, 255, 255, 0.24);
    border-radius: 0 8px 8px 0;
}

.load-input-section {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--line), var(--brand) 16%);
    border-left: 4px solid var(--brand);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface-soft), var(--surface) 48%);
    box-shadow: 0 8px 18px rgba(27, 64, 92, 0.06);
}

.load-input-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.load-input-heading h4 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 0.98rem;
    letter-spacing: 0;
}

.load-input-section .check-row {
    margin: 0 0 12px;
}

.load-input-section .sub-fields {
    border-left: 0;
    padding-left: 0;
    background: transparent;
    border-radius: 0;
}

.barrier-inputs {
    border-left-color: #128672;
}

.barrier-inputs .section-accent {
    background: #128672;
}

.maintenance-inputs {
    border-left-color: var(--brand);
}

.accidental-inputs {
    border-left-color: #b37c2e;
}

.accidental-inputs .section-accent {
    background: #b37c2e;
}

.analysis-inputs {
    border-left-color: #6f8399;
}

.analysis-inputs .section-accent {
    background: #6f8399;
}

body.theme-dark .load-token.is-active {
    background: rgba(34, 211, 238, 0.14);
}

.load-token .load-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand), var(--surface) 84%);
    color: var(--brand-strong);
    box-shadow: none;
    clip-path: none;
}

.load-token.wind .load-icon,
.load-token.snow .load-icon,
.load-token.live .load-icon,
.load-token.maintenance .load-icon,
.load-token.barrier .load-icon,
.load-token.accidental .load-icon {
    clip-path: none;
}

.load-token .load-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.load-token.snow .load-icon {
    background: rgba(106, 174, 232, 0.16);
    color: #4f9ad7;
}

.load-token.live .load-icon,
.load-token.barrier .load-icon {
    background: color-mix(in srgb, var(--green), var(--surface) 84%);
    color: var(--green);
}

.load-token.maintenance .load-icon,
.load-token.accidental .load-icon {
    background: color-mix(in srgb, #7893a8, var(--surface) 84%);
    color: #668198;
}

.load-token strong {
    color: var(--muted-strong);
    font-size: 0.95rem;
}

.load-token small {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.25;
}

.load-checkbox-row {
    display: none;
}

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

.diagram-canvas {
    border-radius: 12px;
    background:
        radial-gradient(circle at 50% 0%, rgba(17, 143, 160, 0.1), transparent 36%),
        var(--surface-stronger);
}

.glass-diagram {
    min-height: 360px;
}

.diagram-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.primary-button {
    min-height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, #16a7b8 0%, #118fa0 52%, #1e4268 100%);
    font-family: var(--font-head);
    font-size: 1rem;
    letter-spacing: 0.12em;
    box-shadow: 0 4px 18px rgba(17, 143, 160, 0.28);
}

body.theme-dark .settings-panel,
body.theme-dark .config-panel,
body.theme-dark .load-panel,
body.theme-dark .diagram-panel,
body.theme-dark .project-panel {
    background: var(--surface);
    border-color: var(--line);
}

body.theme-dark .pane-card {
    background:
        linear-gradient(180deg, rgba(34, 211, 238, 0.08), rgba(255, 255, 255, 0) 42%),
        color-mix(in srgb, var(--surface), var(--surface-soft) 42%);
    border-color: var(--line-strong);
}

body.theme-dark .load-panel .sub-fields {
    background: rgba(22, 51, 80, 0.34);
    border-left-color: rgba(34, 211, 238, 0.44);
}

body.theme-dark .load-input-section {
    background: rgba(18, 44, 70, 0.56);
    border-color: rgba(134, 186, 214, 0.26);
    box-shadow: none;
}

body.theme-dark .load-input-section .sub-fields {
    background: transparent;
    border-left-color: transparent;
}

body.theme-dark .load-panel .load-token.is-active,
body.theme-dark .load-panel .load-token.barrier.is-active {
    background: rgba(34, 211, 238, 0.14);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

body.theme-dark .diagram-canvas {
    background: var(--surface-stronger);
}

.run-icon {
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
}

.report-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 0 0 16px;
    flex-wrap: wrap;
}

.report-button {
    color: #fff;
    background: var(--surface-strong);
    border: 1px solid var(--line-strong);
}

.project-report-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 14px;
}

.project-report-strip span {
    display: block;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.project-report-strip strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.compliance-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 16px;
}

.compliance-banner.pass {
    background: linear-gradient(135deg, rgba(30, 138, 94, 0.13), rgba(30, 138, 94, 0.05));
    border: 1px solid rgba(30, 138, 94, 0.26);
}

.compliance-banner.fail {
    background: linear-gradient(135deg, rgba(201, 64, 64, 0.13), rgba(201, 64, 64, 0.05));
    border: 1px solid rgba(201, 64, 64, 0.26);
}

.compliance-kicker,
.util-header span {
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.compliance-banner strong {
    display: block;
    margin-top: 3px;
    font-size: 1.35rem;
}

.compliance-mark {
    color: var(--green);
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.compliance-banner.fail .compliance-mark {
    color: var(--red);
}

.util-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 16px;
}

.util-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.util-header strong {
    color: var(--brand-strong);
    font-size: 1.45rem;
}

.util-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line), transparent 24%);
}

.util-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--brand));
}

.util-track span.over-limit {
    background: linear-gradient(90deg, var(--amber), var(--red));
}

.result-summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.app-footer {
    margin-top: -28px;
    font-size: 0.66rem;
    background: transparent;
    border: 0;
}

@media (max-width: 820px) {
    .page-shell,
    .app-footer {
        width: min(100% - 20px, 840px);
    }

    .load-overview,
    .diagram-facts,
    .result-summary-strip,
    .method-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .load-overview,
    .diagram-facts,
    .result-summary-strip,
    .method-summary,
    .project-report-strip,
    .form-grid.two,
    .form-grid.three,
    .form-grid.four,
    .pane-pair,
    .pane-results {
        grid-template-columns: 1fr;
    }
}
