:root {
  --ink: #17243a;
  --muted: #66758b;
  --line: #dce3ec;
  --panel: #ffffff;
  --canvas: #f3f6f9;
  --nav: #10243c;
  --nav-2: #193753;
  --blue: #1676d2;
  --blue-soft: #e8f2fc;
  --green: #18885c;
  --amber: #c77b16;
  --red: #c2414b;
  --shadow: 0 8px 28px rgba(25, 48, 76, 0.08);
  --statusbar-clearance: 60px;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 16px; }
html[lang="en"] body { font-family: "Times New Roman", Times, serif; }
html[lang="zh-CN"] body { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 72px 1fr; }
.topbar { grid-column: 1 / 3; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; color: white; background: linear-gradient(100deg, #0e2036, #173b5c); border-bottom: 1px solid rgba(255,255,255,.12); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 10px; font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: .03em; }
.brand p { margin: 3px 0 0; color: #b8c9da; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.language-toggle { min-width: 76px; height: 34px; padding: 0 13px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 14px; font-weight: 700; }
.language-toggle:hover { background: rgba(255,255,255,.2); }
.feedback-open { min-width: 92px; height: 34px; padding: 0 14px; color: #dff3ff; background: rgba(75,163,228,.14); border: 1px solid rgba(137,205,249,.5); border-radius: 999px; font-size: 14px; font-weight: 700; }
.feedback-open:hover { color: #fff; background: rgba(75,163,228,.28); }
.feedback-open:disabled { cursor: not-allowed; opacity: .5; }
.server-state { display: flex; align-items: center; gap: 8px; color: #d8e4ee; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #e09b38; box-shadow: 0 0 0 4px rgba(224,155,56,.15); }
.dot.online { background: #42c68a; box-shadow: 0 0 0 4px rgba(66,198,138,.14); }

.sidebar { grid-row: 2; display: flex; flex-direction: column; padding: 18px 12px calc(18px + var(--statusbar-clearance)); background: var(--nav); border-right: 1px solid #203c56; }
.workflow-nav { display: block; }
.nav-item { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 1px 8px; padding: 13px 14px; margin-bottom: 5px; color: #aebfd0; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; transition: .18s ease; }
.nav-item > span { grid-row: 1 / 3; align-self: center; font-size: 13px; font-weight: 800; color: #6f8ba5; }
.nav-item b { color: #dbe6f0; font-size: 15px; }
.nav-item small { color: #9aafc1; font-size: 12px; }
.nav-item:hover { background: rgba(255,255,255,.045); }
.nav-item.active { background: var(--nav-2); border-color: #315574; box-shadow: inset 3px 0 0 #4da1ed; }
.nav-item.active span { color: #67b1f2; }
.sidebar-support { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(184,205,224,.18); }
.help-link { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 1px 8px; padding: 13px 14px; color: #aebfd0; text-decoration: none; background: rgba(70,150,218,.08); border: 1px solid rgba(106,177,234,.24); border-radius: 8px; transition: .18s ease; }
.help-link:hover,.help-link:focus-visible { color: #fff; background: rgba(70,150,218,.18); border-color: #4f91c6; outline: none; }
.help-icon { grid-row: 1 / 3; align-self: center; width: 25px; height: 25px; display: grid; place-items: center; color: #8cc9fa; border: 1px solid #4f91c6; border-radius: 50%; font-size: 14px; font-weight: 900; }
.help-link b { color: #e6f2fb; font-size: 15px; }
.help-link small { color: #9fb8cc; font-size: 12px; }

.workspace { min-width: 0; grid-row: 2; overflow: auto; padding: 25px 30px 88px; }
.page { display: none; max-width: 1320px; margin: 0 auto; }
.page.active { display: block; animation: reveal .2s ease; }
@keyframes reveal { from { opacity: .35; transform: translateY(4px); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.page-heading h2 { margin: 2px 0 5px; font-size: 25px; font-weight: 720; letter-spacing: -.02em; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 15px; }
.eyebrow { margin: 0; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.completion { padding: 7px 11px; color: var(--amber); background: #fff7e7; border: 1px solid #f0d39e; border-radius: 999px; font-size: 13px; font-weight: 700; }
.completion.ready { color: var(--green); background: #eaf8f2; border-color: #b9e1d0; }

.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, .82fr); gap: 18px; align-items: start; }
.two-column.wide-left { grid-template-columns: minmax(540px, 1.35fr) minmax(330px, .65fr); }
.stack { display: grid; gap: 16px; }
.card { min-width: 0; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 17px; font-size: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-title h3 { margin: 0; }
.badge { padding: 5px 9px; color: #4d6076; background: #edf2f7; border-radius: 999px; font-size: 12px; font-weight: 700; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid.compact { gap: 12px; }
label { display: grid; gap: 6px; color: #42536a; font-size: 13px; font-weight: 650; }
input, select { width: 100%; height: 38px; padding: 0 10px; color: var(--ink); background: #fbfcfd; border: 1px solid #cad4e0; border-radius: 6px; outline: none; transition: .15s; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; appearance: none; }
input:focus, select:focus { background: white; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,118,210,.1); }
input:invalid { border-color: var(--red); background: #fff7f7; }
.field-with-unit { display: grid; grid-template-columns: 1fr auto; }
.field-with-unit input { border-radius: 6px 0 0 6px; }
.unit { min-width: 65px; display: grid; place-items: center; color: #66768a; background: #edf2f6; border: 1px solid #cad4e0; border-left: 0; border-radius: 0 6px 6px 0; font-size: 12px; }
.featured-field { font-size: 13px; }
.featured-field select { height: 46px; font-weight: 700; }

.airflow-guide { display: grid; grid-template-columns: auto minmax(160px, 1fr) auto; align-items: center; gap: 12px; margin: -2px 2px 13px; color: #246b9d; font-size: 12px; font-weight: 800; }
.airflow-arrow { position: relative; display: grid; place-items: center; height: 28px; }
.airflow-arrow b { position: relative; z-index: 1; padding: 0 9px; color: #246b9d; background: var(--panel); font-size: 12px; }
.airflow-arrow i { position: absolute; left: 0; right: 8px; top: 50%; height: 3px; background: linear-gradient(90deg, #78b9e3, #1676d2); transform: translateY(-50%); }
.airflow-arrow i::after { content: ""; position: absolute; right: -8px; top: 50%; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid #1676d2; transform: translateY(-50%); }
.face-guide { display: flex; justify-content: space-between; gap: 12px; margin: 0 2px 8px; font-size: 12px; font-weight: 800; }
.face-guide span { padding: 5px 9px; border-radius: 999px; }
.face-guide .front { color: #155f58; background: #e5f5f1; border: 1px solid #a9d9d0; }
.face-guide .rear { color: #65528c; background: #f0ebfa; border: 1px dashed #b9abd6; }
.tube-grid { position: relative; min-height: 380px; overflow: auto; background: #f7f9fb; border: 1px solid #d9e0e8; border-radius: 8px; }
.tube-stage { position: relative; width: 100%; min-height: 380px; background-image: linear-gradient(#e7ecf2 1px, transparent 1px), linear-gradient(90deg, #e7ecf2 1px, transparent 1px); background-size: 24px 24px; }
.connection-svg { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: auto; overflow: visible; }
.connection-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: pointer; }
.connection-path { fill: none; stroke-width: 3; opacity: .9; pointer-events: none; }
.connection-path.front { stroke: #238b7d; }
.connection-path.rear { stroke: #7562a8; stroke-dasharray: 8 6; }
.connection-path.unknown { stroke: #8793a3; stroke-dasharray: 2 6; }
.connection-side-label { font-size: 10px; font-weight: 900; text-anchor: middle; dominant-baseline: central; pointer-events: none; paint-order: stroke; stroke: #f7f9fb; stroke-width: 4px; }
.connection-side-label.front { fill: #155f58; }.connection-side-label.rear { fill: #65528c; }.connection-side-label.unknown { fill: #657185; }
.tube { position: absolute; z-index: 2; width: 46px; height: 46px; display: grid; place-items: center; transform: translate(-50%,-50%); color: #415269; background: #fff; border: 3px solid #8fa2b5; border-radius: 50%; font-size: 12px; font-weight: 800; box-shadow: 0 4px 9px rgba(24,52,78,.12); transition: .15s; }
.tube:hover { transform: translate(-50%,-50%) scale(1.06); border-color: var(--blue); }
.tube.inlet { color: #086cae; background: #e4f3ff; border-color: #2196df; }
.tube.outlet { color: #9a4f0d; background: #fff1df; border-color: #e49335; }
.tube.selected { z-index: 3; transform: translate(-50%,-50%) scale(1.08); border-color: #075fae; background: #eaf5ff; box-shadow: 0 0 0 4px #fff, 0 0 0 8px #1676d2, 0 8px 18px rgba(10,73,132,.3); }
.tube-coordinate { position: absolute; left: 50%; top: calc(100% + 9px); transform: translateX(-50%); color: #66758b; font-size: 9px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: #8fa2b5; }
.legend-dot.inlet { background: #2196df; }.legend-dot.outlet { background: #e49335; }.legend-dot.selected { width: 12px; height: 12px; background: #eaf5ff; border: 3px solid #1676d2; box-shadow: 0 0 0 2px #b9dcfb; }
.legend-line { width: 24px; height: 0; border-top: 3px solid; }.legend-line.front { border-color: #238b7d; }.legend-line.rear { border-color: #7562a8; border-top-style: dashed; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.mode { padding: 9px; color: #475a70; background: #f6f8fa; border: 1px solid #d5dee7; border-radius: 6px; font-size: 13px; font-weight: 700; }
.mode.active { color: white; background: var(--blue); border-color: var(--blue); }
.mode.danger.active { background: var(--red); border-color: var(--red); }
.button { min-height: 40px; padding: 0 17px; border: 0; border-radius: 6px; font-weight: 750; }
.button.full { width: 100%; }.button.primary { color: white; background: linear-gradient(100deg, #126fc5, #2589df); box-shadow: 0 8px 18px rgba(22,118,210,.2); }.button.secondary { color: #405269; background: #edf2f6; }.button:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.connection-list { max-height: 160px; overflow: auto; }
.connection { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 3px 12px; padding: 8px 10px; margin-bottom: 6px; color: #43556b; background: #f5f8fa; border-left: 3px solid #77a9d6; font-size: 13px; }
.connection small { grid-column: 1 / 4; color: #77869a; }.connection.front { border-left-color: #238b7d; }.connection.rear { border-left-color: #7562a8; }.connection.deletable { cursor: pointer; }.connection.deletable:hover { background: #fff0f1; border-left-color: var(--red); }
.connection-delete { min-width: 52px; min-height: 32px; padding: 0 9px; color: #a62e38; background: #fff; border: 1px solid #e3aeb3; border-radius: 5px; font-size: 12px; font-weight: 800; cursor: pointer; }
.connection-delete:hover, .connection-delete:focus-visible { color: #fff; background: var(--red); border-color: var(--red); outline: none; }
.connection-delete-handle { cursor: pointer; }
.connection-delete-handle .delete-hit { fill: transparent; stroke: none; pointer-events: all; }
.connection-delete-handle .delete-visible { fill: #fff; stroke: var(--red); stroke-width: 1.8; pointer-events: none; }
.connection-delete-handle text { fill: var(--red); font-size: 17px; font-weight: 900; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.connection-delete-handle:hover .delete-visible { fill: var(--red); }.connection-delete-handle:hover text { fill: #fff; }

.advanced-settings { padding: 0; overflow: hidden; }
.advanced-settings summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; cursor: pointer; list-style: none; }
.advanced-settings summary::-webkit-details-marker { display: none; }
.advanced-settings summary span { display: grid; gap: 4px; }.advanced-settings summary small { color: var(--muted); font-weight: 500; font-size: 13px; }.advanced-settings summary b { color: var(--blue); font-size: 13px; }
.advanced-settings[open] summary { border-bottom: 1px solid #e0e6ed; }.advanced-settings[open] summary b { font-size: 0; }.advanced-settings[open] summary b::after { content: "Collapse"; font-size: 13px; }
html[lang="zh-CN"] .advanced-settings[open] summary b::after { content: "收起"; }
.advanced-settings-body { display: grid; gap: 14px; padding: 18px 20px 20px; }
.empty { color: #8a98a9; font-size: 13px; }

.geometry-layout { display: grid; gap: 18px; }
.geometry-groups { display: grid; grid-template-columns: 1fr; gap: 14px; }
.geometry-group, .derived-group { padding: 15px; background: #f8fafc; border: 1px solid #dde5ed; border-radius: 8px; }
.geometry-group h4, .derived-group h4 { margin: 0 0 14px; color: #294a67; font-size: 14px; letter-spacing: .02em; }
.derived-groups { display: grid; gap: 14px; }
.geometry-field-grid { grid-template-columns: repeat(3, minmax(190px, 260px)); justify-content: start; }
.fin-field-grid { grid-template-columns: repeat(2, minmax(190px, 260px)); }
.geometry-field-grid .field-with-unit { grid-template-columns: minmax(0, 1fr) 46px; }
.geometry-field-grid .unit { min-width: 46px; }
.metric-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric { min-height: 122px; padding: 14px; background: #fff; border: 1px solid #dce5ed; border-radius: 7px; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 6px; font-size: 16px; }
.metric small { color: #8290a1; font-size: 11px; }
.metric-formula { display: block; min-height: 32px; margin-top: 10px; padding-top: 8px; color: #526b82; border-top: 1px dashed #d4dee7; font-family: "Times New Roman", Consolas, monospace; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.metric-formula em { color: #7890a5; font-family: inherit; font-style: normal; font-weight: 700; }
.card-description { margin: 5px 0 0; color: var(--muted); font-size: 13px; font-weight: 400; }
.property-layout { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(360px, 1.15fr); gap: 16px; }
.property-layout > div { padding: 16px; background: #f8fafc; border: 1px solid #dde5ed; border-radius: 8px; }
.property-layout h4 { margin: 0 0 14px; color: #294a67; font-size: 14px; }
.property-layout .featured-field { max-width: 340px; }
.property-layout .loading-panel { min-height: 150px; }
.property-range-notice { position: relative; margin-top: 14px; padding: 14px 16px 14px 45px; background: #f6f8fa; border: 1px solid #d8e1e9; border-radius: 8px; }
.property-range-notice::before { content: "i"; position: absolute; left: 15px; top: 16px; width: 20px; height: 20px; display: grid; place-items: center; color: #fff; background: #44718f; border-radius: 50%; font-size: 12px; font-weight: 900; }
.property-range-notice strong { color: #294a67; font-size: 13px; }.property-range-notice p { margin: 5px 0 0; color: #526b82; font-size: 13px; line-height: 1.45; }.property-range-notice small { display: block; margin-top: 5px; color: #9a5f00; font-size: 12px; font-weight: 700; }
.property-range-notice.active { background: #fff8e8; border-color: #e8bd66; }.property-range-notice.active::before { content: "!"; background: #c07900; }
.property-range-notice.warning { background: #fff3f3; border-color: #d98a91; }.property-range-notice.warning::before { content: "!"; background: var(--red); }
.field-range-hint { color: #9a5f00; font-size: 11px; font-weight: 700; }
input.range-invalid { border-color: var(--red); background: #fff4f4; box-shadow: 0 0 0 3px rgba(185,68,77,.1); }
.boundary-stack { display: grid; gap: 18px; }
.boundary-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.boundary-card { min-width: 0; }
.boundary-card .card-title { margin-bottom: 14px; }
.mode-select { max-width: 300px; margin-bottom: 16px; }
.boundary-field-grid { grid-template-columns: repeat(2, minmax(180px, 250px)); justify-content: start; }
.boundary-field-grid > label { align-self: start; align-content: start; }
.boundary-field-grid .field-with-unit { grid-template-columns: minmax(0, 1fr) 52px; }
.boundary-field-grid .unit { min-width: 52px; }
.inline-calculator { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 19px; padding: 14px; background: #eef5fb; border: 1px solid #cfe0ee; border-radius: 8px; }
.inline-calculator h4,.derived-inline h4 { margin: 0 0 5px; color: #294a67; font-size: 14px; }
.inline-calculator p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.inline-calculator .button { flex: 0 0 auto; white-space: nowrap; }
.boundary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.boundary-metrics > .empty { grid-column: 1 / -1; }
.compact-metric { min-height: 91px; padding: 12px; }
.compact-metric .metric-formula { min-height: 0; margin-top: 7px; padding-top: 6px; }
.derived-inline { margin-top: 19px; padding-top: 15px; border-top: 1px solid #dce4eb; }
.dataset-box { display: grid; grid-template-columns: 1fr 1.4fr; gap: 11px; margin-top: 22px; padding: 16px; background: #f6f8fa; border-radius: 8px; font-size: 13px; }.dataset-box span { color: var(--muted); }.dataset-box strong { text-align: right; }
.loading-panel { min-height: 230px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }.loading-panel strong { margin-top: 13px; color: var(--ink); }.loading-panel p { margin: 6px 0; font-size: 13px; }.loader { width: 44px; height: 44px; border: 3px solid #dce6ef; border-top-color: var(--blue); border-radius: 50%; }.loading-panel.loading .loader { animation: spin .8s linear infinite; }.loading-panel.idle .loader { border-color: #dce6ef; }.loading-panel.ready .loader { display: grid; place-items: center; border-color: #4bb989; }.loading-panel.ready .loader::after { content: "✓"; color: var(--green); font-weight: 900; }
.loading-panel.warning .loader { border-color: #e7b85c; }.loading-panel.warning .loader::after { content: "!"; display: grid; place-items: center; height: 100%; color: #b66b00; font-weight: 900; }
@keyframes spin { to { transform: rotate(360deg); } }

.limitation-card { overflow: hidden; }
.limitation-badge { color: #8a5600; background: #fff5df; border-color: #edc77c; }
.limitation-intro { display: flex; align-items: center; gap: 16px; padding: 4px 3px 20px; border-bottom: 1px solid #e0e7ee; }
.limitation-intro > span { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: #bb7000; border-radius: 10px; font-size: 18px; font-weight: 900; }
.limitation-intro h3 { margin: 0 0 5px; }.limitation-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.limitation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.limitation-grid article { display: flex; gap: 13px; min-height: 104px; padding: 16px; background: #f8fafc; border: 1px solid #dce4eb; border-left: 4px solid #d99832; border-radius: 8px; }
.limitation-grid article > b { flex: 0 0 auto; color: #b46b00; font-size: 12px; }.limitation-grid h4 { margin: 0 0 7px; color: #294a67; font-size: 14px; }.limitation-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.solver-layout { grid-template-columns: minmax(280px, .55fr) minmax(650px, 1.45fr); align-items: start; }
.solver-field-grid { grid-template-columns: minmax(190px, 260px); justify-content: start; }
.solver-field-grid label { width: 100%; max-width: 260px; }
.correlation-major-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.correlation-major { padding: 14px; background: #f8fafc; border: 1px solid #dce5ed; border-radius: 8px; }
.correlation-major > h4 { margin: 0 0 12px; color: #1d527c; font-size: 15px; }
.correlation-side-grid { display: grid; gap: 12px; }.correlation-side-grid > div { padding: 12px; background: #fff; border: 1px solid #e0e7ee; border-radius: 7px; }
.correlation-side-grid h5 { margin: 0 0 11px; color: #526b82; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.correlation-fields { display: grid; gap: 10px; }.correlation-fields select { min-width: 0; }
.fixed-correlation span,.fixed-correlation small { display: block; color: var(--muted); font-size: 11px; }.fixed-correlation strong { display: block; margin: 8px 0; color: #294a67; font-size: 13px; }
.solver-advanced-settings { margin-top: 18px; }
.solver-advanced-body { grid-template-columns: 1fr; }
.compact-setting { max-width: 220px; }
.solver-advanced-grid { grid-template-columns: repeat(3, minmax(190px, 250px)); justify-content: start; }
.solver-advanced-grid .field-with-unit { grid-template-columns: minmax(0, 1fr) 52px; }.solver-advanced-grid .unit { min-width: 52px; }
.advanced-row { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(420px, 1.3fr); gap: 18px; padding-top: 16px; border-top: 1px solid #e0e6ed; }.advanced-row > div { min-width: 0; }.advanced-row h3 { margin-top: 0; }

.switches label { display: flex; align-items: center; gap: 10px; margin: 12px 0; }.switches input { width: 17px; height: 17px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.review-layout { display: grid; grid-template-columns: 1fr 330px; gap: 18px; }
.text-button { padding: 0; color: var(--blue); background: transparent; border: 0; font-size: 13px; font-weight: 700; }
.review-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }.review-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; background: #f7f9fb; border-radius: 6px; font-size: 13px; }.review-row span { color: var(--muted); }.review-row strong { text-align: right; }
.solve-card { text-align: center; }.solve-card p { min-height: 35px; color: var(--muted); font-size: 13px; line-height: 1.55; }.solve-orbit { width: 84px; height: 84px; display: grid; place-items: center; margin: 4px auto 18px; border: 1px solid #bdd6ed; border-radius: 50%; box-shadow: inset 0 0 0 9px #eef6fc; }.solve-orbit span { display: grid; place-items: center; width: 43px; height: 43px; color: white; background: var(--blue); border-radius: 50%; font-size: 12px; font-weight: 900; }
.result-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-top: 18px; overflow: hidden; background: #d9e3ec; border: 1px solid #d9e3ec; border-radius: 9px; box-shadow: var(--shadow); }.result-panel.hidden { display: none; }.result-panel > div { padding: 19px; background: white; }.result-panel span,.result-panel small { display: block; color: var(--muted); font-size: 10px; }.result-panel strong { display: block; margin: 8px 0 3px; font-size: 22px; }
.result-snapshot-notice { margin-top: 18px; padding: 11px 14px; color: #7a4b00; background: #fff6dc; border: 1px solid #edc76d; border-radius: 8px; font-size: 13px; font-weight: 700; }.result-snapshot-notice.hidden { display: none; }.result-snapshot-notice + .result-panel { margin-top: 8px; }.result-snapshot-notice.hidden + .result-panel { margin-top: 18px; }.result-panel.stale { opacity: .82; }

.feedback-dialog { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; color: var(--ink); background: #fff; border: 1px solid #cbd7e2; border-radius: 12px; box-shadow: 0 24px 70px rgba(10,30,50,.35); }
.feedback-dialog::backdrop { background: rgba(7,22,37,.58); backdrop-filter: blur(2px); }
.feedback-form { display: grid; gap: 16px; padding: 24px; }
.feedback-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.feedback-heading h2 { margin: 3px 0 5px; font-size: 23px; }.feedback-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.dialog-close { flex: 0 0 auto; width: 34px; height: 34px; color: #51647a; background: #eef3f7; border: 0; border-radius: 50%; font-size: 24px; line-height: 1; }
.dialog-close:hover { color: #fff; background: var(--red); }
.feedback-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feedback-form textarea { width: 100%; min-height: 92px; padding: 10px; resize: vertical; color: var(--ink); background: #fbfcfd; border: 1px solid #cad4e0; border-radius: 6px; outline: none; font: inherit; line-height: 1.45; }
.feedback-form textarea:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,118,210,.1); }
.character-count { justify-self: end; color: #8290a1; font-size: 11px; font-weight: 500; }
.feedback-security { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 70px; padding: 12px 14px; background: #f4f8fb; border: 1px solid #d8e5ee; border-radius: 8px; }
.feedback-security p { max-width: 300px; margin: 0; color: #60758a; font-size: 12px; line-height: 1.5; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }

.notification-toast { position: fixed; z-index: 100; top: 88px; right: 30px; max-width: min(480px, calc(100vw - 40px)); padding: 13px 17px 13px 44px; color: #17324c; background: #fff; border: 1px solid #a9c5dc; border-radius: 9px; box-shadow: 0 14px 36px rgba(18,42,65,.24); font-size: 14px; font-weight: 700; line-height: 1.4; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: .18s ease; }
.notification-toast::before { content: "i"; position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; display: grid; place-items: center; color: #fff; background: #44718f; border-radius: 50%; transform: translateY(-50%); }
.notification-toast.show { opacity: 1; visibility: visible; transform: translateY(0); }
.notification-toast.error { color: #79212a; background: #fff7f7; border-color: #dd7e87; }.notification-toast.error::before { content: "!"; background: var(--red); }
.notification-toast.success { color: #145c40; background: #f4fcf8; border-color: #7bc3a4; }.notification-toast.success::before { content: "✓"; background: var(--green); }
.statusbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; min-height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 18px; color: #eef5fb; background: #10263d; border-top: 3px solid #4c88b6; font-size: 14px; box-shadow: 0 -5px 16px rgba(10,28,46,.16); transition: .15s; }.statusbar time { margin-left: auto; color: #b4c6d6; }.statusbar.error { color: #fff; background: #411a20; border-top-color: #ee6672; }.statusbar.success { background: #123a2d; border-top-color: #4fc292; }.status-icon { flex: 0 0 auto; width: 23px; height: 23px; display: grid; place-items: center; color: white; background: #44718f; border-radius: 50%; font-size: 13px; font-weight: 900; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding: 12px 7px calc(12px + var(--statusbar-clearance)); }.nav-item { display: block; padding: 10px 5px; text-align: center; }.nav-item > span { display: block; margin-bottom: 3px; }.nav-item small { display: none; }
  .sidebar-support { padding-top: 12px; }.help-link { display: block; padding: 10px 4px; text-align: center; }.help-icon { margin: 0 auto 5px; }.help-link small { display: none; }.help-link b { font-size: 12px; }
  .two-column,.two-column.wide-left,.review-layout,.geometry-layout { grid-template-columns: 1fr; }
  .geometry-field-grid { grid-template-columns: repeat(2, minmax(190px, 260px)); }
  .property-layout { grid-template-columns: 1fr; }
  .boundary-layout { grid-template-columns: 1fr; }
  .solver-layout,.advanced-row { grid-template-columns: 1fr; }
  .correlation-major-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .app-shell { display: block; padding-bottom: 50px; }.topbar { min-height: 68px; padding: 0 14px; }.server-state { display: none; }.brand p { display: none; }
  .sidebar { position: sticky; top: 0; z-index: 10; display: flex; flex-direction: row; overflow-x: auto; padding: 6px; }.workflow-nav { display: flex; }.nav-item { min-width: 92px; margin: 0 3px; }
  .sidebar-support { margin: 0 0 0 5px; padding: 0 0 0 6px; border-top: 0; border-left: 1px solid rgba(184,205,224,.18); }.help-link { min-width: 92px; height: 100%; }
  .workspace { padding: 18px 12px 80px; }.form-grid,.metric-list,.review-summary,.result-panel,.geometry-groups,.geometry-field-grid,.boundary-field-grid,.boundary-metrics,.solver-field-grid,.solver-advanced-grid,.limitation-grid { grid-template-columns: 1fr; }.page-heading { align-items: center; }.tube-grid,.tube-stage { min-height: 320px; }
  .inline-calculator { align-items: stretch; flex-direction: column; }
  .airflow-guide { grid-template-columns: auto minmax(100px, 1fr) auto; gap: 8px; }.airflow-arrow b { display: none; }
  .notification-toast { top: 76px; right: 12px; max-width: calc(100vw - 24px); }
  .statusbar time { display: none; }
  .feedback-open { min-width: 78px; padding: 0 9px; }
  .feedback-form { padding: 18px; }.feedback-grid { grid-template-columns: 1fr; }.feedback-security { align-items: stretch; flex-direction: column; }.feedback-security p { max-width: none; }
}
