:root {
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #182b3a;
  background: #f4f7f8;
  font-size: 15px;
  line-height: 1.65;
  --ink: #172c3c;
  --teal: #087d74;
  --blue: #4778b3;
  --grey: #a7b6c2;
  --orange: #cb7844;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 48px;
  background: var(--ink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
}
.brand {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.15em;
  color: white;
  text-decoration: none;
}
main {
  max-width: 1488px;
  padding: 24px;
  margin: auto;
}
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}
.intro p {
  max-width: 720px;
  color: #5c707e;
  margin: 4px 0;
  font-size: 13px;
}
.intro h1 {
  margin: 5px 0;
}
.intro .eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--teal) !important;
}
h1 {
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.04em;
  margin: 10px 0;
}
h2 {
  font-size: 15px;
  margin: 0 0 18px;
  letter-spacing: 0.015em;
}
.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
}
aside,
.results {
  min-width: 0;
}
.panel {
  background: white;
  border: 1px solid #dde5e8;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 3px 12px #172c3c03;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.metric {
  background: var(--ink);
  color: white;
  padding: 20px;
  border-radius: 12px;
}
.metric small {
  display: block;
  color: #bacbd5;
  font-size: 11px;
}
.metric strong {
  display: block;
  font-size: 27px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.8;
}
.metric span {
  font-size: 11px;
  color: #bacbd5;
}
.actions,
.presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions {
  max-width: 360px;
  justify-content: flex-end;
}
button,
.button {
  font: inherit;
  font-size: 12px;
  border: 1px solid #cbd7dc;
  background: white;
  color: var(--ink);
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
  display: inline-block;
  white-space: nowrap;
}
button:hover,
.button:hover {
  border-color: var(--teal);
  color: var(--teal);
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
summary:focus-visible,
textarea:focus-visible,
.button:focus-within {
  outline: 3px solid #5cafaa;
  outline-offset: 3px;
}
input[type="number"],
input[type="text"] {
  width: 100%;
  border: 1px solid #cbd7dc;
  border-radius: 6px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
  cursor: pointer;
}
.budget-entry {
  display: flex;
  align-items: center;
  gap: 8px;
}
.budget-entry input {
  font-size: 28px;
  font-weight: 600;
}
.budget-entry span {
  font-size: 12px;
  color: #748692;
}
.presets {
  margin-top: 10px;
}
.presets button {
  font-size: 11px;
  padding: 3px 10px;
}
.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.field label {
  font-size: 12px;
  color: #405966;
}
.field small {
  display: block;
  color: #83949e;
  font-size: 10px;
}
.field .override {
  color: var(--teal);
  font-weight: 650;
}
.hint {
  font-size: 12px;
  color: #657e8c;
  line-height: 1.7;
  margin: 12px 0 0;
}
details summary {
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
details[open] summary {
  margin-bottom: 20px;
}
.badge {
  font-size: 11px;
  border: 1px solid #82929a66;
  border-radius: 100px;
  padding: 3px 10px;
  white-space: nowrap;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.section-heading h2 {
  margin: 0;
}
.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #657e8c;
  margin-top: 10px;
}
.dot:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  margin-right: 6px;
}
.dot.mandatory:before {
  background: var(--grey);
}
.dot.summary:before {
  background: var(--teal);
}
.dot.raw:before {
  background: var(--blue);
}
.dot.generation:before {
  background: var(--orange);
}
svg {
  width: 100%;
  display: block;
  overflow: visible;
}
svg text {
  font:
    11px ui-sans-serif,
    system-ui;
  fill: #657e8c;
}
.callout {
  font-size: 12px;
  background: #f2f6f7;
  padding: 12px 16px;
  border-radius: 7px;
  color: #58707f;
}
.volume-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.volume-grid div {
  padding: 15px;
  background: #f3f7f7;
  border-radius: 8px;
}
.volume-grid small {
  display: block;
  color: #657e8c;
  font-size: 11px;
}
.volume-grid strong {
  font-size: 20px;
  font-weight: 600;
}
textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border: 1px solid #d4dfe3;
  border-radius: 7px;
  padding: 12px;
  font:
    12px/1.6 ui-monospace,
    monospace;
  background: #f8fafb;
  margin-top: 16px;
}
#error {
  padding: 15px;
  background: #fff0e8;
  border: 1px solid #efc5a8;
  color: #92461a;
  border-radius: 9px;
  margin-bottom: 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
td,
th {
  text-align: left;
  padding: 9px 6px;
  border-bottom: 1px solid #e4ebee;
}
footer {
  font-size: 11px;
  color: #758b96;
  margin-top: 32px;
}
a {
  color: var(--teal);
}
@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 290px minmax(0, 1fr);
  }
  .intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .actions {
    justify-content: flex-start;
    max-width: none;
  }
  .panel {
    padding: 20px;
  }
  .metric strong {
    font-size: 22px;
  }
  .metric-grid {
    gap: 8px;
  }
}
@media (max-width: 740px) {
  main {
    padding: 24px 14px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  header {
    padding: 0 16px;
  }
  .intro {
    gap: 12px;
  }
  .volume-grid {
    grid-template-columns: 1fr;
  }
  .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 10px;
  }
  .metric strong {
    font-size: 25px;
  }
}
.field input[type="range"] {
  grid-column: 1/-1;
  margin-top: -6px;
}
.flow-panel .section-heading {
  margin-bottom: 10px;
}
.flow-panel .section-heading h2 {
  font-size: 17px;
}
.flow-panel .eyebrow {
  margin: 0 0 3px;
}
.model-constraints {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border-bottom: 1px solid #e4ebee;
  padding-bottom: 8px;
}
.model-stat {
  min-width: 0;
}
.model-stat > span,
.model-stat small {
  display: block;
  color: #708794;
  font-size: 10px;
}
.model-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.model-constraints .model-stat {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 10px;
  align-items: center;
}
.model-constraints .model-stat small {
  grid-column: 1/-1;
}
.model-constraints .model-stat strong {
  font-size: 18px;
}
.constraint-min {
  font:
    italic 15px Georgia,
    serif;
  color: #718a99;
}
.funnel-figure {
  container-type: inline-size;
}
.funnel-mobile {
  display: none;
}
.funnel-layer {
  stroke: none;
}
.funnel-layer.layer-0 {
  fill: #243e52;
}
.funnel-layer.layer-1 {
  fill: #4778b3;
}
.funnel-layer.layer-2 {
  fill: #087d74;
}
svg .funnel-number {
  fill: white;
  font:
    650 27px ui-sans-serif,
    system-ui;
  font-variant-numeric: tabular-nums;
}
svg .funnel-owner {
  font-size: 12px;
  fill: #6a8090;
}
svg .funnel-value {
  font-size: 24px;
  font-weight: 650;
  fill: #182b3a;
  font-variant-numeric: tabular-nums;
}
svg .funnel-function {
  font:
    13px ui-monospace,
    monospace;
  fill: #2b4b5d;
}
svg .funnel-calculation {
  font-size: 12px;
  fill: #6a8090;
}
.funnel-leader {
  fill: none;
  stroke: #a5b6c0;
  stroke-width: 1;
}
.funnel-zero {
  stroke: #b14936;
  stroke-width: 2;
}
.funnel-branch rect {
  fill: #f4f7f8;
  stroke: #dde5e8;
}
.funnel-branch.summary rect {
  fill: #e7f4f1;
  stroke: #86b9b1;
}
svg .funnel-branch-title {
  font-size: 11px;
  fill: #405966;
}
svg .funnel-branch-value {
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  fill: #182b3a;
}
svg .funnel-branch-note {
  font-size: 10px;
  fill: #526c7c;
}
.funnel-summary-link {
  fill: none;
  stroke: #087d74;
  stroke-width: 1.5;
}
.funnel-summary-arrow {
  fill: #087d74;
}
.funnel-merge-arrow {
  fill: #a5b6c0;
}
svg .funnel-value.zero {
  fill: #b14936;
}
@container (max-width: 600px) {
  .funnel-desktop {
    display: none;
  }
  .funnel-mobile {
    display: block;
  }
  svg .funnel-number {
    font-size: 19px;
  }
  svg .funnel-value {
    font-size: 21px;
  }
  svg .funnel-owner {
    font-size: 12px;
  }
  svg .funnel-function {
    font-size: 12px;
  }
  svg .funnel-calculation {
    font-size: 12px;
  }
}
.model-volume {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 16px;
  padding: 0 0 8px;
  color: #6a8090;
  font-size: 11px;
}
.model-volume strong {
  color: var(--teal);
  font-weight: 550;
}
.model-fences {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  border-left: 3px solid var(--orange);
  background: #fbf7f1;
  padding: 7px 10px;
  font-size: 10px;
  color: #765f43;
}
.model-fences::before {
  content: "读取保护";
  font-weight: 700;
}
.assembly-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  margin: 9px 0 5px;
  font-size: 11px;
  color: #405c6d;
}
.assembly-heading code {
  font-size: 11px;
  color: #69818e;
}
.model-stack {
  display: flex;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  background: #eaf0f2;
}
.model-stack > span {
  min-width: 0;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  font-size: 10px;
  color: white;
}
.model-stack > .mandatory {
  background: #879ba9;
}
.model-stack > .summary {
  background: #087d74;
}
.model-stack > .raw {
  background: #4778b3;
}
.model-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  color: #657e8c;
  font-size: 10px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.model-legend span::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 1px;
  background: #879ba9;
}
.model-legend .summary::before {
  background: #087d74;
}
.model-legend .raw::before {
  background: #4778b3;
}
.model-decision {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
  border-top: 1px solid #e4ebee;
  margin-top: 10px;
  padding-top: 8px;
  font-size: 11px;
  color: #657e8c;
}
.model-decision strong {
  color: var(--teal);
  font-size: 12px;
}
.model-decision.rejected strong {
  color: #ae452f;
}
.model-decision.projected strong {
  color: #91652f;
}
.summary-budget {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #c9e3de;
  border-radius: 6px;
  background: #f4faf8;
  font-size: 12px;
}
.summary-budget-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
}
.summary-budget-path .model-stat {
  flex: 1 1 120px;
}
.summary-budget .model-note,
.summary-actual-note {
  font-size: 12px;
  line-height: 1.6;
}
.summary-actual-note {
  margin: 8px 0 0;
  color: #526c7c;
}
.input-estimate {
  margin-top: 12px;
  font-size: 12px;
}
.input-estimate .model-note {
  font-size: 12px;
}
.trigger-gauge {
  margin-top: 6px;
}
.trigger-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #657e8c;
  font-size: 10px;
}
.trigger-label strong {
  font-weight: 500;
  color: #9a6830;
}
.gauge-track {
  height: 5px;
  background: #edf1f3;
  position: relative;
  margin-top: 5px;
  border-radius: 3px;
}
.gauge-fill {
  display: block;
  height: 100%;
  background: #83adac;
  border-radius: inherit;
}
.gauge-marker {
  height: 11px;
  border-left: 2px solid #ba7a2e;
  position: absolute;
  top: -3px;
  transform: translateX(-1px);
}
.model-note {
  font-size: 10px;
  color: #7b8e98;
  margin: 7px 0 0;
  line-height: 1.6;
}
.model-reference {
  margin: -6px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4ebee;
  font-size: 12px;
  color: #526c7c;
}
.model-reference a,
.mandatory-explanation a {
  color: var(--teal);
}
.safety-explanation {
  margin-bottom: 14px;
}
.safety-explanation > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}
.safety-explanation > code,
.input-estimate > code {
  display: block;
  color: #274b60;
  background: #f3f7f9;
  border-radius: 4px;
  padding: 7px 9px;
  margin-top: 7px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.mandatory-explanation {
  font-size: 12px;
  margin: 10px 0;
  padding-left: 10px;
  border-left: 3px solid var(--teal);
  color: #526c7c;
}
.mandatory-explanation a {
  display: inline-block;
  margin-left: 6px;
}
.symbol-group h4 {
  margin: 17px 0 4px;
  font-size: 12px;
  color: #274b60;
}
.symbol-list {
  margin: 0;
}
.symbol-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #edf1f3;
  font-size: 11px;
}
.symbol-row dt {
  color: var(--teal);
  font-weight: 650;
  font-family: ui-monospace, monospace;
}
.symbol-row dd {
  margin: 0;
  min-width: 0;
}
.symbol-row strong {
  font-weight: 550;
  margin-right: 10px;
}
.symbol-row code {
  color: #274b60;
  overflow-wrap: anywhere;
}
.symbol-row p {
  color: #657e8c;
  margin: 3px 0 0;
}
.model-warning {
  margin: 7px 0 0;
  padding: 6px 9px;
  color: #9b5031;
  background: #fff3e8;
  font-size: 11px;
  border-radius: 3px;
}
.compact-model {
  margin-top: 14px;
  padding: 13px 0;
  border-top: 1px dashed #b8cdd5;
}
.compact-model.inactive {
  opacity: 0.5;
}
.compact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.compact-heading h3 {
  font-size: 14px;
  margin: 0;
}
.model-pill {
  font-size: 10px;
  border-radius: 4px;
  padding: 2px 7px;
  color: #708491;
  background: #f0f4f6;
}
.model-pill.active {
  color: #087165;
  background: #e5f3ec;
}
.model-pill.blocked {
  color: #aa4a34;
  background: #fff0e8;
}
.compact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 20px minmax(0, 1fr) 20px minmax(
      0,
      1fr
    );
  align-items: center;
  gap: 10px;
}
.compact-input .assembly-heading {
  margin-top: 0;
}
.compact-layout .model-stat {
  padding: 8px 10px;
  border-radius: 5px;
  background: #f2f6fa;
}
.compact-layout .model-stat strong {
  font-size: 18px;
}
.compact-layout .generation {
  background: #fff3e7;
  color: #95612f;
}
.compact-layout .summary {
  background: #e8f4ef;
  color: #087165;
}
.model-arrow {
  color: #8aa2af;
  text-align: center;
  font-size: 19px;
}
.compact-equations {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 20px;
  margin-top: 10px;
}
.compact-equations code {
  font-size: 11px;
  color: #38586a;
  overflow-wrap: anywhere;
}
.compact-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 5px;
  font-size: 10px;
  color: #7a8d97;
}
.formula-reference {
  border-top: 1px solid #e4ebee;
  padding-top: 11px;
}
.formula-reference summary {
  font-size: 12px;
}
.formula-reference[open] summary {
  margin-bottom: 10px;
}
.function-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 145px;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #edf1f3;
  align-items: center;
  font-size: 11px;
}
.function-row > span {
  color: #657e8c;
}
.function-row code {
  color: #274b60;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.function-row strong {
  font-size: 11px;
  text-align: right;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.detail-section {
  padding: 18px 0;
  border-top: 1px solid #e4ebee;
}
.detail-section:last-child {
  padding-bottom: 0;
}
@media (max-width: 1050px) {
  .compact-layout {
    grid-template-columns: 1fr 18px 1fr;
    gap: 7px;
  }
  .compact-input {
    grid-column: 1/-1;
  }
  .compact-layout > .model-arrow:nth-child(2) {
    display: none;
  }
  .function-row {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 6px 10px;
  }
  .function-row strong {
    grid-column: 2;
    text-align: left;
  }
}
@media (max-width: 740px) {
  .model-constraints {
    gap: 16px;
  }
  .model-constraints .model-stat {
    display: block;
  }
  .model-volume {
    flex-direction: column;
  }
  .model-fences {
    gap: 4px 10px;
  }
  .flow-panel .section-heading {
    align-items: flex-start;
  }
  .function-row {
    grid-template-columns: 1fr;
  }
  .function-row strong {
    grid-column: 1;
  }
}
