:root {
  color-scheme: light;
  --navy-950: #04131f;
  --navy-900: #071a2b;
  --navy-850: #0a2034;
  --navy-800: #0b2944;
  --teal-600: #089b93;
  --teal-500: #16cfc2;
  --teal-400: #27e1d0;
  --mint-300: #8ef0c8;
  --paper: #f4f7f8;
  --white: #ffffff;
  --ink: #102638;
  --text: #425466;
  --muted: #718292;
  --line: #d7e1e8;
  --soft-teal: #eafaf7;
  --soft-blue: #edf4f7;
  --warning: #f5b84b;
  --warning-soft: #fff8e9;
  --danger: #b5523c;
  --shadow: 0 12px 34px rgba(7, 26, 43, 0.08);
  --content: 1314px;
  --nav-height: 68px;
}

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

html {
  min-height: 100%;
  overflow-y: scroll;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 14px);
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: visible;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  overflow: visible;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.anchor-section {
  scroll-margin-top: calc(var(--nav-height) + 14px);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy-900);
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  height: var(--nav-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(142, 240, 200, 0.15);
  background: rgba(6, 23, 37, 0.97);
  padding: 0 max(22px, calc((100vw - var(--content)) / 2));
  color: var(--white);
  backdrop-filter: blur(16px);
}

.header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2vw, 28px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand b {
  color: var(--mint-300);
}

.shield-mark {
  display: inline-flex;
  width: 31px;
  height: 34px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--teal-400);
  border-radius: 10px 10px 13px 13px;
  color: var(--mint-300);
  font-size: 15px;
}

.shield-mark.small {
  width: 27px;
  height: 29px;
  font-size: 12px;
}

.calculator-switch {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(142, 240, 200, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 4px;
}

.calculator-switch a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #d5e0e8;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.calculator-switch a:hover,
.calculator-switch a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: var(--teal-400);
  outline: none;
}

.calculator-switch a.active {
  border-color: rgba(142, 240, 200, 0.34);
  background: linear-gradient(135deg, #12aaa4, #0d8e91);
  box-shadow: 0 4px 14px rgba(4, 17, 28, 0.22);
  color: var(--white);
}

.main-nav {
  display: flex;
  height: 100%;
  flex: none;
  align-items: stretch;
  gap: clamp(18px, 2.2vw, 34px);
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: #d5e0e8;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition:
    color 0.18s ease,
    border-color 0.18s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  border-bottom-color: var(--teal-400);
  color: var(--teal-400);
  outline: none;
}

.hero {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0, rgba(24, 102, 132, 0.22), transparent 42%),
    linear-gradient(180deg, var(--navy-900) 0%, #08223a 100%);
  color: var(--white);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.8;
  background-image:
    linear-gradient(rgba(78, 169, 193, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 169, 193, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(#000, transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 45px 28px 39px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal-400);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.12;
  white-space: normal;
  text-wrap: wrap;
}

.hero-lead {
  margin: 17px 0 0;
  color: #c8d6df;
  font-size: 18px;
  letter-spacing: 0.05em;
  white-space: normal;
  text-wrap: wrap;
}

.hero-bars {
  position: absolute;
  bottom: -8px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  opacity: 0.34;
}

.hero-bars-left {
  left: 1vw;
}

.hero-bars-right {
  right: 1vw;
}

.hero-bars i {
  display: block;
  width: 5px;
  background: linear-gradient(var(--teal-400), rgba(39, 225, 208, 0.15));
}

.calculator-wrap {
  max-width: calc(var(--content) + 56px);
  margin: 0 auto;
  padding: 22px 28px 72px;
}

.module-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  padding: 7px;
}

.module-tabs button {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #617284;
  padding: 8px 22px;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.module-tabs button:hover {
  background: #f1f7f8;
}

.module-tabs button:focus-visible {
  outline: 3px solid rgba(22, 207, 194, 0.24);
  outline-offset: 2px;
}

.module-tabs button.selected {
  background: linear-gradient(135deg, #12bdb6, #11d0c1);
  box-shadow: 0 8px 24px rgba(18, 189, 182, 0.16);
  color: var(--white);
}

.module-tabs button:active {
  transform: scale(0.99);
}

.module-tabs button > span:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.module-tabs b {
  font-size: 17px;
}

.module-tabs small {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.78;
}

.module-icon {
  flex: none;
  font-size: 11px;
  letter-spacing: -1px;
}

.question-strip {
  display: flex;
  min-height: 50px;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0;
  border: 1px solid #d4e0e6;
  border-radius: 10px;
  background: #eaf1f4;
  padding: 10px 18px;
}

.question-strip > span {
  color: #6e8190;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.question-strip strong {
  min-width: min(100%, 260px);
  flex: 1 1 360px;
  color: #17344a;
  font-size: 14px;
}

.question-strip em {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: #346278;
  padding: 6px 10px;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.planning-hint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  border: 1px solid #aedae2;
  border-left: 4px solid #168fa0;
  border-radius: 10px;
  background: #edf7f9;
  padding: 14px 16px;
}

.hint-icon {
  display: inline-flex;
  width: 23px;
  height: 23px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #168fa0;
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

.planning-hint strong {
  color: #17475a;
  font-size: 13px;
}

.planning-hint p {
  margin: 5px 0 0;
  color: #4c6977;
  font-size: 11px;
  line-height: 1.75;
}

.workspace {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
  gap: 16px;
  overflow: visible;
}

.parameter-panel,
.result-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.parameter-panel {
  padding: 26px;
}

.result-panel {
  position: relative;
  overflow: visible;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.panel-heading p {
  margin: 0 0 3px;
  color: #2f8592;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.panel-heading h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.panel-heading.light p {
  color: var(--teal-400);
}

.panel-heading.light h2 {
  color: var(--white);
}

.reset-button {
  border: 0;
  background: transparent;
  color: #637789;
  padding: 7px;
  font-size: 12px;
  font-weight: 750;
}

.reset-button:hover,
.reset-button:focus-visible {
  color: #0a8e88;
}

.method-picker {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid #dae5ea;
  border-left: 3px solid var(--teal-500);
  border-radius: 10px;
  background: #f3f7f9;
  padding: 16px;
}

.method-picker label {
  align-self: center;
  color: #18354a;
  font-size: 13px;
  font-weight: 750;
}

.method-picker p {
  grid-column: 2;
  margin: -5px 0 0;
  color: #6b7c8b;
  font-size: 12px;
  line-height: 1.6;
}

.select-shell {
  position: relative;
  display: flex;
  min-height: 43px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #ccd9e1;
  border-radius: 8px;
  background: var(--white);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.select-shell::after {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #658090;
  content: "⌄";
  pointer-events: none;
  transform: translateY(-58%);
}

.method-select {
  border-color: #cfdde4;
}

.method-select select,
.select-shell select {
  width: 100%;
  min-height: 41px;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17344a;
  padding: 9px 38px 9px 11px;
}

.method-select select {
  font-size: 14px;
  font-weight: 650;
}

.field-section {
  margin-top: 25px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #698090;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.section-label i {
  height: 1px;
  flex: 1;
  background: #e1e8ec;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 15px;
}

.field {
  min-width: 0;
}

.field-label {
  display: flex;
  min-height: 19px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: #304c60;
  font-size: 12px;
  font-weight: 700;
}

.field-label > span:first-child {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.field-label em {
  color: #7a8c99;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.info-dot {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #9aabb6;
  border-radius: 50%;
  color: #718592;
  cursor: help;
  font-family: Georgia, serif;
  font-size: 9px;
  font-style: italic;
}

.input-shell {
  display: flex;
  min-height: 43px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #ccd9e1;
  border-radius: 8px;
  background: var(--white);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  min-height: 41px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #153149;
  padding: 9px 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.input-shell span {
  flex: none;
  padding: 0 11px 0 4px;
  color: #6d7f8d;
  font-size: 11px;
  white-space: nowrap;
}

.input-shell:focus-within,
.select-shell:focus-within {
  border-color: #14aaa1;
  box-shadow: 0 0 0 3px rgba(22, 207, 194, 0.13);
}

.continuous-control {
  display: grid;
  min-height: 43px;
  grid-template-columns: minmax(92px, 1fr) 112px;
  align-items: center;
  gap: 10px;
}

.continuous-control input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--teal-600);
  cursor: pointer;
}

.continuous-control .input-shell {
  min-width: 0;
}

.power-number-shell input[type="number"] {
  appearance: textfield;
  padding-right: 4px;
}

.power-number-shell input[type="number"]::-webkit-inner-spin-button,
.power-number-shell input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.continuous-value {
  color: var(--teal-600);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  white-space: nowrap;
}

.field-note {
  display: block;
  margin-top: 5px;
  color: #718292;
  font-size: 10px;
  line-height: 1.5;
}

.cluster-box {
  margin-top: 23px;
  border: 1px solid #dce6ea;
  border-radius: 11px;
  background: #f5f8fa;
  padding: 16px;
}

.cluster-box.open {
  border-color: #bde9e3;
  background: #eef9f7;
}

.cluster-box.unavailable {
  border-style: dashed;
  opacity: 0.78;
}

.cluster-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cluster-toggle-row strong {
  color: #213e52;
  font-size: 13px;
}

.cluster-toggle-row p {
  margin: 4px 0 0;
  color: #6a7f8d;
  font-size: 11px;
  line-height: 1.6;
}

.switch {
  width: 45px;
  height: 25px;
  flex: none;
  border: 0;
  border-radius: 999px;
  background: #b8c5cc;
  padding: 3px;
  transition: background 0.18s ease;
}

.switch span {
  display: block;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 5px rgba(4, 32, 47, 0.25);
  transition: transform 0.18s ease;
}

.switch[aria-checked="true"] {
  background: #13b8aa;
}

.switch[aria-checked="true"] span {
  transform: translateX(20px);
}

.switch:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.cluster-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.cluster-fields[hidden] {
  display: none;
}

.deff-card {
  display: flex;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--navy-850);
  color: var(--white);
  padding: 7px;
}

.deff-card span,
.deff-card small {
  color: #b7cbd7;
  font-size: 9px;
}

.deff-card strong {
  color: var(--mint-300);
  font-size: 24px;
  line-height: 1.2;
}

.result-top {
  overflow: hidden;
  border-radius: 13px 13px 0 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(39, 225, 208, 0.12), transparent 34%),
    linear-gradient(145deg, var(--navy-900), #0b2b48);
  color: var(--white);
  padding: 25px 26px 0;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(142, 240, 200, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfe5df;
  padding: 6px 9px;
  font-size: 10px;
}

.live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 4px rgba(39, 225, 208, 0.1);
}

.main-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  padding: 1px 0 19px;
  text-align: center;
}

.main-result > span {
  flex: 0 0 100%;
  margin-bottom: 3px;
  color: #c4d5df;
  font-size: 13px;
  font-weight: 700;
}

.main-result strong {
  color: var(--mint-300);
  font-size: clamp(48px, 5.5vw, 70px);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.main-result small {
  margin-left: 8px;
  color: #b8d2d8;
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 105px), 1fr));
  gap: 1px;
  border-radius: 10px 10px 0 0;
  background: #dce4e8;
  color: var(--ink);
  padding: 1px;
}

.metric-grid div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: var(--white);
  padding: 17px 7px 14px;
  text-align: center;
}

.metric-grid span {
  min-height: 27px;
  color: #667985;
  font-size: 10px;
}

.metric-grid b {
  max-width: 100%;
  overflow: hidden;
  color: #068f89;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.precision-line {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 -26px;
  border-top: 1px solid #dce4e8;
  background: #f7fafb;
  color: #3f5b6d;
  padding: 8px 20px;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.precision-line > span:first-child {
  color: #0aa59d;
  font-size: 17px;
}

.explanation-card,
.warning-card,
.sensitivity-card,
.method-details,
.result-actions,
.result-footnote {
  margin-right: 18px;
  margin-left: 18px;
}

.explanation-card {
  display: flex;
  gap: 12px;
  margin-top: 17px;
  border: 1px solid #b8e8de;
  border-radius: 10px;
  background: #edfaf7;
  padding: 14px;
}

.explanation-icon {
  display: flex;
  width: 25px;
  height: 25px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #0fa89f;
  border-radius: 5px;
  color: #0b8e87;
  font-weight: 800;
}

.explanation-card span {
  color: #087b75;
  font-size: 13px;
  font-weight: 800;
}

.explanation-card p {
  margin: 5px 0 0;
  color: #40645f;
  font-size: 11px;
  line-height: 1.7;
}

.warning-card {
  margin-top: 11px;
  border: 1px solid #f0d59d;
  border-radius: 9px;
  background: var(--warning-soft);
  padding: 11px 13px;
}

.warning-card strong {
  color: #8d631a;
  font-size: 11px;
}

.warning-card ul {
  margin: 5px 0 0;
  padding-left: 17px;
  color: #7c6946;
  font-size: 10px;
  line-height: 1.6;
}

.sensitivity-card {
  margin-top: 12px;
  border: 1px solid #dbe5e9;
  border-radius: 10px;
  padding: 13px 14px 11px;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title-row div {
  display: flex;
  flex-direction: column;
}

.card-title-row span {
  color: #294659;
  font-size: 12px;
  font-weight: 800;
}

.card-title-row small {
  margin-top: 2px;
  color: #7a8d99;
  font-size: 9px;
}

.card-title-row em {
  color: #6f8490;
  font-size: 9px;
  font-style: normal;
}

.mini-chart {
  display: grid;
  height: 126px;
  align-items: end;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.mini-chart > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.mini-chart span {
  color: #748591;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.mini-chart i {
  display: block;
  width: min(28px, 80%);
  min-height: 8px;
  max-height: 82px;
  border-radius: 4px 4px 1px 1px;
  background: #cddde1;
  transition: height 0.24s ease;
}

.mini-chart small {
  color: #768995;
  font-size: 9px;
}

.mini-chart > div.active i {
  background: linear-gradient(#42ddc8, #0da89f);
  box-shadow: 0 5px 12px rgba(13, 168, 159, 0.2);
}

.mini-chart > div.active span,
.mini-chart > div.active small {
  color: #078f88;
  font-weight: 800;
}

.method-details {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #dbe5e9;
  border-radius: 9px;
}

.method-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
}

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

.method-details summary span {
  color: #2f4a5e;
  font-size: 11px;
  font-weight: 800;
}

.method-details summary em {
  max-width: min(42vw, 210px);
  overflow: hidden;
  color: #6f8491;
  font-size: 9px;
  font-style: normal;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-details summary::after {
  color: #168f88;
  content: "展开  ▾";
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.method-details[open] summary {
  border-bottom: 1px solid #dbe5e9;
  background: #f5f8fa;
}

.method-details[open] summary::after {
  content: "收起  ▴";
}

.details-body {
  max-height: none;
  overflow: visible;
  padding: 14px;
}

.details-body section + section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #e5ecef;
}

.details-body h3 {
  margin: 0 0 6px;
  color: #27465a;
  font-size: 10px;
  font-weight: 850;
}

.details-body p {
  margin: 0;
  color: #5e7482;
  font-size: 9px;
  line-height: 1.7;
}

.formula-box {
  max-width: 100%;
  overflow: hidden;
  border-radius: 7px;
  background: #0a2034;
  color: #dff8f1;
  padding: 10px 11px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.formula-box div + div {
  margin-top: 5px;
}

.variable-list {
  display: grid;
  grid-template-columns: minmax(42px, max-content) minmax(0, 1fr);
  gap: 4px 9px;
  margin: 9px 0 0;
  color: #667b89;
  font-size: 9px;
  line-height: 1.55;
}

.variable-list dt {
  color: #227a76;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 800;
}

.variable-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.details-body ul {
  margin: 0;
  padding-left: 17px;
  color: #667b89;
  font-size: 9px;
  line-height: 1.65;
}

.inline-references {
  margin: 0;
  padding-left: 18px;
  color: #667b89;
  font-size: 8.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inline-references a {
  color: #087e78;
  text-decoration: none;
}

.inline-references a:hover {
  text-decoration: underline;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 8px;
}

.result-actions button {
  min-height: 42px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  transition:
    transform 0.16s ease,
    background 0.16s ease;
}

.result-actions button:active {
  transform: scale(0.98);
}

.primary-action {
  border: 1px solid #0ba89f;
  background: #0ba89f;
  color: var(--white);
}

.primary-action:hover,
.primary-action:focus-visible {
  background: #078f88;
}

.secondary-action {
  border: 1px solid #cddbe2;
  background: var(--white);
  color: #3e586a;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  background: #f2f6f8;
}

.result-footnote {
  margin-top: 8px;
  margin-bottom: 15px;
  color: #83939d;
  font-size: 8px;
  line-height: 1.55;
  text-align: center;
}

.method-guide {
  border-top: 1px solid #d5e0e5;
  border-bottom: 1px solid #d5e0e5;
  background: #eaf0f2;
  padding: 76px max(28px, calc((100vw - var(--content)) / 2));
}

.section-intro,
.reference-lead {
  max-width: 840px;
}

.section-intro > p,
.reference-lead > p {
  margin: 0 0 9px;
  color: #0b9f97;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.section-intro h2,
.reference-lead h2 {
  margin: 0;
  color: #102c40;
  font-size: clamp(27px, 3.2vw, 40px);
  letter-spacing: -0.04em;
  text-wrap: balance;
  line-height: 1.25;
}

.section-intro > span,
.reference-lead > span {
  display: block;
  margin-top: 12px;
  color: #6b7e8b;
  font-size: 14px;
  line-height: 1.7;
}

.method-cards {
  margin-top: 34px;
}

.method-group + .method-group {
  margin-top: 34px;
  border-top: 1px solid #d8e3e7;
  padding-top: 30px;
}

.method-group-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
}

.method-cards .method-group-heading h3 {
  margin: 0;
  color: #17364a;
  font-size: 17px;
}

.method-group-heading span {
  color: #71838f;
  font-size: 11px;
}

.method-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 12px;
}

.method-cards article {
  position: relative;
  display: flex;
  min-height: 275px;
  flex-direction: column;
  border: 1px solid #d6e1e6;
  border-radius: 12px;
  background: var(--white);
  padding: 22px;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.method-cards article:hover,
.method-cards article.current {
  border-color: #63cfc5;
  box-shadow: 0 12px 28px rgba(7, 75, 86, 0.08);
  transform: translateY(-2px);
}

.method-number {
  position: absolute;
  top: 16px;
  right: 18px;
  color: #d6e1e6;
  font-size: 24px;
  font-weight: 850;
}

.method-cards article > span:not(.method-number) {
  color: #0e9b93;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.method-cards h3 {
  margin: 18px 0 8px;
  color: #17364a;
  font-size: 18px;
}

.method-cards p {
  flex: 1;
  margin: 0;
  color: #6f818d;
  font-size: 12px;
  line-height: 1.7;
}

.method-cards strong {
  margin-top: 16px;
  border-top: 1px solid #e3eaee;
  color: #506b7c;
  padding-top: 13px;
  font-size: 10px;
}

.method-source {
  margin-top: 7px;
  color: #82929d;
  font-size: 9px;
  line-height: 1.45;
}

.method-cards button {
  align-self: flex-start;
  margin-top: 13px;
  border: 0;
  background: transparent;
  color: #099e96;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
}

.design-extension {
  margin-top: 28px;
  border: 1px solid #d3e1e5;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  padding: 26px;
}

.extension-heading {
  max-width: 930px;
}

.extension-heading > p {
  margin: 0 0 8px;
  color: #0b9f97;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.extension-heading h3 {
  margin: 0;
  color: #143247;
  font-size: clamp(21px, 2.4vw, 30px);
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.extension-heading > span {
  display: block;
  margin-top: 10px;
  color: #657b88;
  font-size: 12px;
  line-height: 1.75;
}

.extension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 10px;
  margin-top: 21px;
}

.extension-grid article {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  border: 1px solid #dce7ea;
  border-radius: 11px;
  background: #f8fbfb;
  padding: 17px;
}

.extension-grid article.active {
  border-color: #28b9ad;
  background: #f1fbf9;
  box-shadow: 0 10px 24px rgba(9, 126, 121, 0.09);
}

.extension-grid article > span {
  align-self: flex-start;
  border-radius: 999px;
  background: #e5f8f4;
  color: #087c75;
  padding: 4px 8px;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.extension-grid h4 {
  margin: 14px 0 8px;
  color: #17364a;
  font-size: 15px;
  line-height: 1.45;
}

.extension-grid p {
  margin: 0;
  color: #687c88;
  font-size: 10px;
  line-height: 1.75;
}

.extension-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: auto;
  padding-top: 14px;
}

.extension-actions button {
  border: 0;
  background: transparent;
  color: #087e78;
  padding: 0;
  font-size: 9px;
  font-weight: 850;
}

.extension-actions a {
  color: #098f88;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.extension-actions button:hover,
.extension-actions button:focus-visible,
.extension-actions a:hover,
.extension-actions a:focus-visible {
  color: #056e69;
  outline: none;
  text-decoration: underline;
}

.advanced-lab {
  scroll-margin-top: calc(var(--nav-height) + 28px);
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #9fd7d1;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(7, 55, 68, 0.1);
}

.advanced-lab[hidden] {
  display: none;
}

.advanced-lab-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  background:
    radial-gradient(circle at 90% 0, rgba(39, 225, 208, 0.16), transparent 36%),
    linear-gradient(135deg, #08243a, #0a404c);
  color: #fff;
  padding: 24px 26px;
}

.advanced-lab-heading > div {
  min-width: 0;
  max-width: 920px;
}

.advanced-lab-heading p {
  margin: 0 0 8px;
  color: var(--teal-400);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.advanced-lab-heading h4 {
  margin: 0;
  color: #f5fffd;
  font-size: clamp(20px, 2.4vw, 29px);
  line-height: 1.3;
}

.advanced-lab-heading span {
  display: block;
  margin-top: 8px;
  color: #bed3db;
  font-size: 11px;
  line-height: 1.7;
}

.advanced-close {
  flex: none;
  border: 1px solid rgba(142, 240, 200, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dff8f1;
  padding: 7px 12px;
  font-size: 9px;
  font-weight: 800;
}

.advanced-close:hover,
.advanced-close:focus-visible {
  border-color: var(--teal-400);
  background: rgba(255, 255, 255, 0.13);
  outline: none;
}

.advanced-workspace {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
  align-items: stretch;
}

.advanced-input-panel,
.advanced-result-panel {
  min-width: 0;
  padding: 24px;
}

.advanced-input-panel {
  border-right: 1px solid #dce8eb;
  background: #f8fbfb;
}

.advanced-result-panel {
  background: #fff;
}

.advanced-type-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 11px;
  margin-bottom: 18px;
}

.advanced-type-line > span {
  border-radius: 999px;
  background: #dff7f3;
  color: #087e78;
  padding: 5px 9px;
  font-size: 8px;
  font-weight: 850;
}

.advanced-type-line strong {
  color: #234456;
  font-size: 13px;
}

.advanced-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr));
  gap: 13px;
}

.advanced-field {
  min-width: 0;
}

.advanced-field label {
  display: block;
  min-height: 18px;
  margin-bottom: 6px;
  color: #38576a;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.45;
}

.advanced-field .input-shell,
.advanced-field .select-shell {
  min-height: 40px;
}

.advanced-field .input-shell input,
.advanced-field .select-shell select {
  min-height: 38px;
  font-size: 11px;
}

.advanced-field small {
  display: block;
  margin-top: 5px;
  color: #738691;
  font-size: 8px;
  line-height: 1.55;
}

.advanced-run-row,
.advanced-result-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 8px;
  margin-top: 20px;
}

.advanced-run-row button,
.advanced-result-actions button {
  min-height: 42px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 850;
}

.advanced-run {
  border: 1px solid #079b93;
  background: #079b93;
  color: #fff;
}

.advanced-run:hover,
.advanced-run:focus-visible {
  background: #067f79;
  outline: none;
}

.advanced-run:disabled {
  cursor: wait;
  opacity: 0.7;
}

.advanced-reset {
  border: 1px solid #cad9df;
  background: #fff;
  color: #435e6f;
}

.advanced-reset:hover,
.advanced-reset:focus-visible {
  background: #f0f5f6;
  outline: none;
}

.advanced-local-note {
  margin: 10px 0 0;
  color: #7d8e98;
  font-size: 8px;
  line-height: 1.5;
  text-align: center;
}

.advanced-empty,
.advanced-progress {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c9dadd;
  border-radius: 11px;
  background: #f9fbfb;
  padding: 26px;
  text-align: center;
}

.advanced-empty[hidden],
.advanced-progress[hidden],
#advanced-result[hidden] {
  display: none;
}

.advanced-empty span {
  color: #168f88;
  font-size: 14px;
  font-weight: 850;
}

.advanced-empty p,
.advanced-progress p {
  max-width: 420px;
  margin: 8px 0 0;
  color: #718490;
  font-size: 10px;
  line-height: 1.7;
}

.advanced-progress {
  align-items: stretch;
  text-align: left;
}

.advanced-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #2b4b5d;
  font-size: 11px;
  font-weight: 800;
}

.advanced-progress > div b {
  color: #079b93;
  font-variant-numeric: tabular-nums;
}

.advanced-progress > i {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfebed;
}

.advanced-progress > i span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a9f97, #36d8c5);
  transition: width 0.18s ease;
}

.advanced-result-hero {
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  background:
    radial-gradient(circle at 90% 0, rgba(39, 225, 208, 0.14), transparent 42%),
    linear-gradient(140deg, #08233a, #0b3d4b);
  color: #fff;
  padding: 21px 22px;
}

.advanced-result-hero > span {
  display: block;
  color: #bdd2da;
  font-size: 10px;
  font-weight: 700;
}

.advanced-result-hero > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.advanced-result-hero strong {
  color: var(--mint-300);
  font-size: clamp(38px, 5vw, 58px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.advanced-result-hero small {
  color: #c3d7dd;
  font-size: 11px;
}

.advanced-result-hero em {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(142, 240, 200, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #c9e0df;
  padding: 5px 8px;
  font-size: 8px;
  font-style: normal;
}

.advanced-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 125px), 1fr));
  gap: 8px;
  margin-top: 10px;
}

.advanced-metric-grid > div {
  min-width: 0;
  border: 1px solid #dce6e9;
  border-radius: 9px;
  background: #f9fbfb;
  padding: 12px;
}

.advanced-metric-grid span,
.advanced-metric-grid b,
.advanced-metric-grid small {
  display: block;
}

.advanced-metric-grid span {
  min-height: 29px;
  color: #6b7f8b;
  font-size: 8px;
  line-height: 1.45;
}

.advanced-metric-grid b {
  overflow-wrap: anywhere;
  color: #087f79;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.advanced-metric-grid small {
  margin-top: 2px;
  color: #7d8e98;
  font-size: 8px;
}

.advanced-interpretation,
.advanced-warning {
  margin-top: 10px;
  border-radius: 9px;
  padding: 13px 14px;
}

.advanced-interpretation {
  border: 1px solid #bde8df;
  background: #effaf8;
}

.advanced-interpretation span,
.advanced-warning strong {
  color: #087e78;
  font-size: 9px;
  font-weight: 850;
}

.advanced-interpretation p {
  margin: 5px 0 0;
  color: #43645f;
  font-size: 9px;
  line-height: 1.7;
}

.advanced-warning {
  border: 1px solid #efd49f;
  background: #fff8e9;
}

.advanced-warning strong {
  color: #8c631b;
}

.advanced-warning ul {
  margin: 6px 0 0;
  padding-left: 16px;
  color: #756443;
  font-size: 8.5px;
  line-height: 1.65;
}

.advanced-section-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 9px;
}

.advanced-section-heading span {
  color: #0a9b93;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.advanced-section-heading h5 {
  margin: 0;
  color: #29495b;
  font-size: 11px;
}

.advanced-simulation-summary,
.advanced-sensitivity {
  margin-top: 10px;
  border: 1px solid #dce7ea;
  border-radius: 9px;
  padding: 13px;
}

.advanced-simulation-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, max-content) minmax(0, 1fr));
  gap: 5px 9px;
  margin: 0;
  font-size: 8px;
  line-height: 1.5;
}

.advanced-simulation-summary dt {
  color: #6b7e89;
}

.advanced-simulation-summary dd {
  margin: 0;
  color: #244b5b;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.advanced-sensitivity-grid {
  display: grid;
  gap: 6px;
}

.advanced-sensitivity-grid > div {
  display: grid;
  grid-template-columns: minmax(78px, 0.85fr) minmax(90px, 1.8fr) minmax(72px, 0.8fr);
  align-items: center;
  gap: 8px;
}

.advanced-sensitivity-grid span,
.advanced-sensitivity-grid strong {
  color: #6b7f8b;
  font-size: 8px;
  font-weight: 650;
}

.advanced-sensitivity-grid strong {
  color: #315064;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.advanced-sensitivity-grid i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2ebed;
}

.advanced-sensitivity-grid i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #a9cbc7;
}

.advanced-sensitivity-grid .active span,
.advanced-sensitivity-grid .active strong {
  color: #087e78;
  font-weight: 850;
}

.advanced-sensitivity-grid .active i b {
  background: linear-gradient(90deg, #0a9e96, #36d8c5);
}

.advanced-details {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #dbe6e9;
  border-radius: 9px;
}

.advanced-details summary {
  color: #315064;
  padding: 12px 13px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}

.advanced-details[open] summary {
  border-bottom: 1px solid #dbe6e9;
  background: #f7f9fa;
}

.advanced-details > div {
  padding: 13px;
}

.advanced-details h5 {
  margin: 0 0 6px;
  color: #29495b;
  font-size: 9px;
}

.advanced-details h5:not(:first-child) {
  margin-top: 13px;
}

.advanced-details p,
.advanced-details ul,
.advanced-details ol {
  margin: 0;
  color: #667b87;
  font-size: 8px;
  line-height: 1.65;
}

.advanced-details ul,
.advanced-details ol {
  padding-left: 17px;
}

.advanced-details code {
  display: block;
  overflow-wrap: anywhere;
  border-radius: 7px;
  background: #0a2034;
  color: #dff8f1;
  padding: 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  line-height: 1.65;
  white-space: normal;
}

.advanced-details a {
  color: #087e78;
  text-decoration: none;
}

.advanced-details a:hover,
.advanced-details a:focus-visible {
  text-decoration: underline;
}

.outcome-map {
  display: grid;
  grid-template-columns: minmax(190px, 0.55fr) minmax(0, 1.45fr);
  gap: 22px;
  margin-top: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0a263e, #0a3b49);
  padding: 22px;
  color: var(--white);
}

.outcome-map-heading > span {
  color: var(--teal-400);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.outcome-map-heading h4 {
  margin: 9px 0 0;
  color: #f5fffd;
  font-size: 20px;
  line-height: 1.4;
}

.outcome-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.outcome-map-grid > div {
  border: 1px solid rgba(151, 218, 211, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
}

.outcome-map-grid b,
.outcome-map-grid span {
  display: block;
}

.outcome-map-grid b {
  color: #dff8f1;
  font-size: 10px;
}

.outcome-map-grid span {
  margin-top: 6px;
  color: #abc2cc;
  font-size: 9px;
  line-height: 1.7;
}

.outcome-map-grid button {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--teal-400);
  padding: 0;
  font-size: 9px;
  font-weight: 800;
  text-align: left;
}

.outcome-map-grid button:hover,
.outcome-map-grid button:focus-visible {
  color: var(--mint-300);
  outline: none;
  text-decoration: underline;
}

.reference-section {
  background: var(--navy-900);
  color: var(--white);
  padding: 78px max(28px, calc((100vw - var(--content)) / 2));
}

.reference-lead h2 {
  color: var(--white);
}

.reference-lead > span {
  color: #a8bdca;
}

.reference-group {
  margin-top: 38px;
}

.reference-group-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}

.reference-group-heading h3 {
  margin: 0;
  color: #dff8f1;
  font-size: 13px;
  font-weight: 800;
}

.reference-group-heading span {
  border-radius: 999px;
  background: rgba(39, 225, 208, 0.1);
  color: var(--teal-400);
  padding: 4px 8px;
  font-size: 9px;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 12px;
}

.reference-card {
  scroll-margin-top: calc(var(--nav-height) + 12px);
  display: flex;
  min-height: 190px;
  flex-direction: column;
  border: 1px solid rgba(151, 195, 209, 0.17);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  padding: 20px;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.reference-card:hover,
.reference-card:focus-visible {
  border-color: rgba(39, 225, 208, 0.5);
  background: rgba(39, 225, 208, 0.08);
  outline: none;
  transform: translateY(-2px);
}

.reference-card b {
  color: var(--teal-400);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.reference-card strong {
  margin-top: 13px;
  font-size: 13px;
  line-height: 1.45;
}

.reference-card > span {
  margin-top: 9px;
  color: #a9beca;
  font-size: 10px;
  line-height: 1.55;
}

.reference-card small {
  margin-top: auto;
  padding-top: 13px;
  color: #7fa0b2;
  font-size: 8px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.reference-standard-note {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid rgba(142, 240, 200, 0.3);
  border-radius: 10px;
  background: rgba(142, 240, 200, 0.07);
  padding: 14px 16px;
  color: #bcd4d7;
  font-size: 10px;
  line-height: 1.7;
}

.reference-standard-note b {
  color: var(--mint-300);
  white-space: nowrap;
}

.boundary-section {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(28px, 5vw, 70px);
  background: var(--white);
  padding: 75px max(28px, calc((100vw - var(--content)) / 2));
}

.boundary-section > div span {
  color: #0b9f97;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.boundary-section h2 {
  margin: 12px 0 0;
  color: #153349;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -0.04em;
  text-wrap: balance;
  line-height: 1.3;
}

.boundary-section ol {
  margin: 0;
  padding: 0;
  counter-reset: boundaries;
  list-style: none;
}

.boundary-section li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px 18px;
  border-top: 1px solid #dce5e9;
  padding: 16px 0;
  counter-increment: boundaries;
}

.boundary-section li::before {
  display: flex;
  width: 32px;
  height: 32px;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e9f8f5;
  color: #0b9f97;
  content: counter(boundaries, decimal-leading-zero);
  font-size: 10px;
  font-weight: 850;
}

.boundary-section li b {
  color: #29465a;
  font-size: 13px;
}

.boundary-section li p {
  margin: 0;
  color: #71828e;
  font-size: 11px;
  line-height: 1.6;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--navy-950);
  color: var(--white);
  padding: 25px max(28px, calc((100vw - var(--content)) / 2));
}

footer > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

footer > div > span:last-child {
  display: flex;
  flex-direction: column;
}

footer b {
  font-size: 12px;
}

footer small,
footer p {
  color: #8097a6;
  font-size: 9px;
}

footer p {
  margin: 0;
}

.toast {
  position: fixed;
  z-index: 300;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 32px));
  transform: translateY(20px);
  border-radius: 9px;
  background: #073a3b;
  box-shadow: 0 14px 34px rgba(4, 19, 31, 0.25);
  color: var(--white);
  padding: 11px 15px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.noscript-message {
  position: fixed;
  z-index: 999;
  right: 0;
  bottom: 0;
  left: 0;
  background: #8d631a;
  color: var(--white);
  padding: 12px;
  text-align: center;
}

.print-report {
  display: none;
}

@media (max-width: 1180px) {
  .main-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --nav-height: 112px;
  }

  html {
    scroll-padding-top: calc(var(--nav-height) + 8px);
  }

  .anchor-section {
    scroll-margin-top: calc(var(--nav-height) + 8px);
  }

  .topbar {
    display: flex;
    height: auto;
    min-height: var(--nav-height);
    flex-wrap: wrap;
    align-content: center;
    gap: 8px;
    padding: 9px 14px;
  }

  .brand {
    width: 100%;
    justify-content: flex-start;
    gap: 9px;
    font-size: 13px;
  }

  .shield-mark {
    width: 25px;
    height: 28px;
    border-radius: 8px 8px 10px 10px;
    font-size: 11px;
  }

  .header-actions {
    display: block;
    width: 100%;
  }

  .calculator-switch {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calculator-switch a {
    min-width: 0;
    min-height: 36px;
    padding: 6px 5px;
    font-size: 10.5px;
    text-align: center;
  }

  .main-nav {
    display: none;
  }

  .hero {
    min-height: 220px;
  }

  .hero-content {
    padding: 38px 20px 32px;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.13em;
  }

  .hero h1 {
    font-size: 31px;
  }

  .hero-lead {
    font-size: 13px;
    line-height: 1.6;
  }

  .calculator-wrap {
    padding: 14px 12px 50px;
  }

  .module-tabs button {
    min-height: 62px;
    gap: 7px;
    padding: 7px 5px;
  }

  .module-tabs b {
    font-size: 11px;
  }

  .module-tabs small {
    display: none;
  }

  .module-icon {
    display: none;
  }

  .question-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 12px;
  }

  .question-strip em {
    display: none;
  }

  .planning-hint {
    padding: 13px;
  }

  .planning-hint p {
    font-size: 10px;
  }

  .parameter-panel {
    padding: 18px 15px;
  }

  .method-picker {
    grid-template-columns: 1fr;
  }

  .method-picker p {
    grid-column: 1;
  }

  .deff-card {
    min-height: 76px;
  }

  .result-top {
    padding-right: 16px;
    padding-left: 16px;
  }

  .precision-line {
    margin-right: -16px;
    margin-left: -16px;
  }

  .metric-grid b {
    font-size: 17px;
  }

  .metric-grid span {
    font-size: 8px;
  }

  .method-guide,
  .reference-section,
  .boundary-section {
    padding: 56px 18px;
  }

  .design-extension {
    padding: 19px 14px;
  }

  .method-group + .method-group {
    margin-top: 28px;
    padding-top: 24px;
  }

  .extension-grid article {
    min-height: auto;
  }

  .advanced-lab-heading {
    padding: 19px 16px;
  }

  .advanced-lab-heading span {
    font-size: 10px;
  }

  .advanced-close {
    padding: 6px 9px;
  }

  .advanced-input-panel,
  .advanced-result-panel {
    padding: 16px 14px;
  }

  .advanced-input-panel {
    border-right: 0;
    border-bottom: 1px solid #dce8eb;
  }

  .advanced-field-grid {
    grid-template-columns: 1fr;
  }

  .advanced-empty,
  .advanced-progress {
    min-height: 230px;
  }

  .advanced-result-hero em {
    position: static;
    display: inline-block;
    margin-top: 10px;
  }

  .advanced-simulation-summary dl {
    grid-template-columns: minmax(100px, max-content) minmax(0, 1fr);
  }

  .advanced-sensitivity-grid > div {
    grid-template-columns: minmax(72px, 0.8fr) minmax(80px, 1.4fr) minmax(66px, 0.8fr);
    gap: 6px;
  }

  .outcome-map {
    grid-template-columns: 1fr;
    padding: 17px;
  }

  .outcome-map-grid {
    grid-template-columns: 1fr;
  }

  .boundary-section {
    gap: 28px;
  }

  .method-details summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .method-details summary em {
    display: none;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 23px 18px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@page {
  size: A4;
  margin: 16mm;
}

@media print {
  html,
  body {
    overflow: visible !important;
    background: #fff !important;
  }

  .topbar,
  main,
  footer,
  .toast,
  noscript {
    display: none !important;
  }

  .print-report {
    display: block !important;
    color: #111;
    font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
    font-size: 10.5pt;
    line-height: 1.6;
  }

  .print-report h1 {
    margin: 0 0 4mm;
    font-size: 19pt;
    text-align: center;
  }

  .print-report .report-meta {
    margin-bottom: 6mm;
    color: #555;
    font-size: 8.5pt;
    text-align: center;
  }

  .print-report h2 {
    margin: 6mm 0 2mm;
    border-bottom: 0.5pt solid #aaa;
    padding-bottom: 1.5mm;
    font-size: 12pt;
    break-after: avoid;
  }

  .print-report h3 {
    margin: 3mm 0 1mm;
    font-size: 10.5pt;
  }

  .print-report p {
    margin: 1mm 0;
  }

  .print-report ul,
  .print-report ol {
    margin: 1.5mm 0;
    padding-left: 6mm;
  }

  .print-report table {
    width: 100%;
    margin: 2mm 0;
    border-collapse: collapse;
    break-inside: avoid;
  }

  .print-report th,
  .print-report td {
    border: 0.5pt solid #aaa;
    padding: 1.5mm 2mm;
    font-size: 9pt;
    text-align: left;
  }

  .print-report .report-result {
    border: 1pt solid #333;
    margin: 3mm 0;
    padding: 3mm;
    break-inside: avoid;
  }

  .print-report .report-formula {
    border: 0.5pt solid #aaa;
    background: #f5f5f5;
    padding: 2mm;
    font-family: "Courier New", monospace;
    font-size: 8.5pt;
    white-space: pre-wrap;
  }

  .print-report .report-references li {
    margin-bottom: 1.5mm;
    overflow-wrap: anywhere;
  }

  .print-report a {
    color: #111;
    text-decoration: none;
  }
}
