:root {
  color-scheme: dark;
  --bg: #07111c;
  --bg-elevated: #0a1826;
  --panel: rgba(13, 29, 44, 0.94);
  --panel-soft: #102438;
  --panel-solid: #0c1c2c;
  --text: #eef5f8;
  --muted: #91a6b5;
  --dim: #667d8e;
  --line: rgba(151, 181, 199, 0.15);
  --line-strong: rgba(151, 181, 199, 0.28);
  --navy: #0f2741;
  --teal: #23c9b8;
  --teal-soft: rgba(35, 201, 184, 0.13);
  --amber: #ffb657;
  --amber-soft: rgba(255, 182, 87, 0.14);
  --red: #ff715b;
  --red-soft: rgba(255, 113, 91, 0.14);
  --yellow-input: #fff4cc;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  --radius: 18px;
  font-family:
    Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei",
    system-ui, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf2f3;
  --bg-elevated: #f7f9f9;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-soft: #edf4f5;
  --panel-solid: #ffffff;
  --text: #142b3b;
  --muted: #617888;
  --dim: #8a9aa4;
  --line: rgba(25, 58, 77, 0.12);
  --line-strong: rgba(25, 58, 77, 0.23);
  --navy: #183e5e;
  --teal: #079f92;
  --teal-soft: rgba(7, 159, 146, 0.11);
  --amber: #dc8619;
  --amber-soft: rgba(220, 134, 25, 0.11);
  --red: #dc4a38;
  --red-soft: rgba(220, 74, 56, 0.11);
  --yellow-input: #fff5cf;
  --shadow: 0 20px 55px rgba(24, 54, 70, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 4%, rgba(35, 201, 184, 0.08), transparent 34rem),
    radial-gradient(circle at 8% 18%, rgba(72, 126, 168, 0.09), transparent 30rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

a {
  color: inherit;
}

.topbar,
main,
footer {
  width: min(1520px, calc(100% - 42px));
  margin-inline: auto;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand > span:last-child,
.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(35, 201, 184, 0.48);
  border-radius: 12px;
  background: var(--teal-soft);
}

.brand-mark::before {
  content: "";
  width: 10px;
  height: 24px;
  border: 2px solid var(--teal);
  border-radius: 3px;
}

.brand-mark i {
  width: 16px;
  height: 2px;
  position: absolute;
  border-radius: 1px;
  background: var(--amber);
}

.brand-mark i:nth-child(1) {
  transform: translateY(-7px);
}

.brand-mark i:nth-child(3) {
  transform: translateY(7px);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.local-badge {
  margin-right: 3px;
  padding: 7px 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
}

.local-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

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

.button.primary {
  color: #031713;
  border-color: var(--teal);
  background: var(--teal);
  font-weight: 800;
}

.button.secondary,
.button.ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.button.ghost {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 12px;
}

.button.compact {
  width: 36px;
  padding: 0;
  border-radius: 50%;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.018), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  min-height: 510px;
  padding: 52px 0 48px;
  display: grid;
  grid-template-columns: minmax(400px, 0.82fr) minmax(590px, 1.18fr);
  gap: 30px;
  align-items: center;
}

.hero-copy {
  padding: 30px 0 30px 12px;
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--teal);
  font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 5vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 em {
  color: var(--teal);
  font-style: normal;
}

.hero-copy > p {
  max-width: 650px;
  margin: 24px 0 29px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 11px;
}

.hero-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--dim);
  font: 700 9px/1.2 ui-monospace, monospace;
  letter-spacing: 0.08em;
}

.hero-meta span::before {
  content: "✓";
  margin-right: 7px;
  color: var(--teal);
}

.hero-visual {
  min-height: 450px;
  padding: 22px;
  overflow: hidden;
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  opacity: 0.37;
  pointer-events: none;
}

.visual-head,
.visual-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.visual-head {
  color: var(--muted);
  font-size: 11px;
}

.visual-head strong {
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 11px;
}

.visual-head strong.risk {
  color: var(--red);
  background: var(--red-soft);
}

.joint-svg {
  width: 100%;
  height: 340px;
  display: block;
  position: relative;
  z-index: 1;
}

.svg-label {
  fill: #a5bbc9;
  font-size: 13px;
  font-family: ui-monospace, monospace;
}

.svg-label.force {
  fill: #ff715b;
  font-size: 15px;
  font-weight: 800;
}

.svg-value {
  fill: #ffb657;
  font-size: 12px;
  font-family: ui-monospace, monospace;
}

.visual-legend {
  justify-content: flex-start;
  gap: 22px;
  color: var(--muted);
  font-size: 10px;
}

.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
}

.dot.red {
  background: var(--red);
}

.dot.amber {
  background: var(--amber);
}

.dot.teal {
  background: var(--teal);
}

.calculator {
  padding-top: 22px;
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  scroll-margin-top: 15px;
}

.input-panel {
  max-height: calc(100vh - 28px);
  position: sticky;
  top: 14px;
  overflow: auto;
  scrollbar-width: thin;
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-heading {
  padding: 24px 24px 15px;
}

.panel-heading h2,
.section-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--teal);
}

.field-grid label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.segment-control {
  margin: 0 24px 15px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
}

.segment-control button {
  height: 35px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.segment-control button.active {
  color: var(--text);
  background: var(--panel-soft);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.14);
}

#inputForm details {
  border-top: 1px solid var(--line);
}

#inputForm summary {
  min-height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}

#inputForm summary::-webkit-details-marker {
  display: none;
}

#inputForm summary::after {
  content: "+";
  margin-left: auto;
  color: var(--dim);
  font-size: 18px;
  font-weight: 400;
}

#inputForm details[open] summary::after {
  content: "−";
}

#inputForm summary span {
  color: var(--teal);
  font: 800 9px ui-monospace, monospace;
}

.field-grid {
  padding: 0 24px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-grid label {
  min-width: 0;
}

.field-grid label > div {
  height: 39px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dbc66e;
  border-radius: 8px;
  background: var(--yellow-input);
}

.field-grid input,
.field-grid select {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 8px;
  border: 0;
  outline: 0;
  color: #2a3540;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.field-grid b {
  max-width: 52px;
  padding: 0 8px;
  color: #7f7143;
  font: 700 9px/1 ui-monospace, monospace;
  white-space: nowrap;
}

.field-grid .featured > div {
  box-shadow: inset 0 0 0 1px #ca9d10;
}

.field-grid label.invalid > div {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-soft);
}

.input-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
}

.input-footer p {
  margin: 0 0 13px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.6;
}

.import-data {
  width: 100%;
  min-height: 38px;
  font-size: 11px;
  cursor: pointer;
}

.results-column {
  min-width: 0;
}

.status-banner {
  min-height: 112px;
  padding: 23px 27px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  border-color: rgba(35, 201, 184, 0.28);
  background:
    linear-gradient(100deg, var(--teal-soft), transparent 55%),
    var(--panel);
}

.status-banner.risk {
  border-color: rgba(255, 113, 91, 0.35);
  background:
    linear-gradient(100deg, var(--red-soft), transparent 55%),
    var(--panel);
}

.status-banner.invalid {
  border-color: rgba(255, 182, 87, 0.4);
}

.status-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(35, 201, 184, 0.4);
  border-radius: 50%;
  background: var(--teal-soft);
}

.status-icon span {
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: translateY(-2px) rotate(-45deg);
}

.risk .status-icon {
  border-color: rgba(255, 113, 91, 0.5);
  background: var(--red-soft);
}

.risk .status-icon span,
.invalid .status-icon span {
  width: 3px;
  height: 19px;
  border: 0;
  border-radius: 2px;
  background: var(--red);
  transform: none;
  box-shadow: 0 13px 0 -1px var(--red);
}

.status-banner h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.status-banner p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.status-torque {
  min-width: 148px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.status-torque span,
.status-torque strong {
  display: block;
}

.status-torque span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.status-torque strong {
  font-size: 12px;
  font-weight: 600;
}

.status-torque b {
  font-size: 27px;
}

.metric-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric-card {
  min-width: 0;
  padding: 18px;
  box-shadow: none;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.metric-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
}

.metric-card.risk .metric-head i {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}

.metric-card > strong {
  margin-top: 13px;
  display: block;
  white-space: nowrap;
}

.metric-card > strong b {
  font-size: clamp(25px, 2vw, 34px);
  letter-spacing: -0.045em;
}

.metric-card > strong small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.meter {
  height: 5px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--panel-soft);
}

.meter span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--teal);
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.metric-card.risk .meter span {
  background: var(--red);
}

.metric-card p {
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.chart-card,
.checks-card,
.recommendation-card,
.grade-card {
  padding: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading > p {
  max-width: 340px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.line {
  width: 16px;
  height: 2px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}

.line.teal {
  background: var(--teal);
}

.line.amber {
  background: var(--amber);
}

.line.red {
  background: var(--red);
}

.chart-wrap {
  min-height: 270px;
}

.chart-wrap svg {
  width: 100%;
  height: 270px;
  display: block;
  overflow: visible;
}

.chart-axis,
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-grid.limit {
  stroke: var(--red);
  stroke-dasharray: 5 5;
  opacity: 0.55;
}

.chart-text {
  fill: var(--muted);
  font: 9px ui-monospace, monospace;
}

.chart-line {
  fill: none;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.chart-line.bolt {
  stroke: var(--teal);
}

.chart-line.pullout {
  stroke: var(--amber);
}

.chart-line.bearing {
  stroke: var(--red);
}

.chart-current {
  stroke: var(--text);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  opacity: 0.7;
}

.chart-feasible {
  fill: var(--teal-soft);
}

.torque-window {
  min-height: 52px;
  margin-top: 8px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.torque-window > span {
  grid-row: 1 / span 2;
  color: var(--muted);
  font-size: 10px;
}

.torque-window strong {
  font-size: 17px;
}

.torque-window small {
  color: var(--dim);
  font-size: 9px;
}

.torque-window.no-window strong {
  color: var(--red);
}

.check-list {
  display: grid;
  gap: 9px;
}

.check-item {
  min-height: 46px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}

.check-item > i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 10px;
  font-style: normal;
}

.check-item.risk > i {
  color: var(--red);
  background: var(--red-soft);
}

.check-item span {
  font-size: 11px;
  font-weight: 700;
}

.check-item small {
  color: var(--muted);
  font-size: 9px;
}

.check-item b {
  color: var(--teal);
  font: 800 10px ui-monospace, monospace;
}

.check-item.risk b {
  color: var(--red);
}

.recommendation-card,
.grade-card,
.detail-card {
  margin-top: 16px;
}

.formula-badge {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
}

.recommendation-card ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  list-style: none;
  counter-reset: recommendation;
}

.recommendation-card li {
  min-height: 54px;
  padding: 12px 13px 12px 42px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  counter-increment: recommendation;
}

.recommendation-card li::before {
  content: counter(recommendation, decimal-leading-zero);
  position: absolute;
  left: 12px;
  top: 13px;
  color: var(--amber);
  font: 800 10px ui-monospace, monospace;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th,
td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 9px;
  letter-spacing: 0.04em;
}

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

td strong {
  color: var(--text);
}

.table-status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 9px;
  font-weight: 800;
}

.table-status.risk {
  color: var(--red);
  background: var(--red-soft);
}

.detail-card {
  overflow: hidden;
  box-shadow: none;
}

.detail-card summary {
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
}

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

.detail-card summary span,
.detail-card summary b,
.detail-card summary small {
  display: block;
}

.detail-card summary b {
  font-size: 15px;
}

.detail-card summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.detail-card summary i {
  color: var(--teal);
  font-size: 22px;
  font-style: normal;
}

.detail-card details[open] summary i {
  transform: rotate(45deg);
}

.detail-card .table-wrap {
  max-height: 510px;
  border-top: 1px solid var(--line);
}

.detail-card td:nth-child(3) {
  color: var(--dim);
  font-family: ui-monospace, monospace;
}

.method-section {
  margin: 70px 0 45px;
  padding: 36px;
  display: grid;
  grid-template-columns: 0.35fr 1.65fr;
  gap: 35px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-section h2 {
  margin: 0;
  font-size: 28px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.method-grid b {
  color: var(--teal);
  font: 800 10px ui-monospace, monospace;
}

.method-grid h3 {
  margin: 10px 0 8px;
  font-size: 13px;
}

.method-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
  font-size: 10px;
}

.toast {
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 15px;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  font-size: 11px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.22s ease;
}

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

@media (max-width: 1220px) {
  .hero {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .calculator {
    grid-template-columns: 365px minmax(0, 1fr);
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-visual {
    min-height: 410px;
  }

  .calculator {
    grid-template-columns: 1fr;
  }

  .input-panel {
    max-height: none;
    position: static;
  }

  .field-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

@media (max-width: 680px) {
  .topbar,
  main,
  footer {
    width: min(100% - 24px, 1520px);
  }

  .topbar {
    min-height: 68px;
  }

  .top-actions .button:not(.compact),
  .local-badge {
    display: none;
  }

  .hero {
    padding-top: 28px;
    gap: 22px;
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .hero-actions .button {
    flex: 1;
    padding-inline: 10px;
    font-size: 12px;
  }

  .hero-visual {
    min-height: auto;
    padding: 15px;
  }

  .joint-svg {
    height: 275px;
  }

  .visual-legend {
    gap: 9px;
    flex-wrap: wrap;
  }

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

  .status-banner {
    grid-template-columns: auto 1fr;
  }

  .status-torque {
    grid-column: 1 / -1;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-card {
    padding: 14px;
  }

  .chart-card,
  .checks-card,
  .recommendation-card,
  .grade-card {
    padding: 18px;
  }

  .section-heading {
    gap: 12px;
  }

  .legend {
    display: none;
  }

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

  .method-section {
    margin-top: 44px;
    padding: 28px 4px;
  }

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

  footer {
    padding: 18px 0;
    display: grid;
    gap: 7px;
  }
}

@media (max-width: 480px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    color: #142b3b;
    background: #fff;
  }

  .topbar,
  .hero-copy,
  .input-panel,
  .top-actions,
  .method-section,
  footer,
  .toast {
    display: none !important;
  }

  main {
    width: 100%;
  }

  .hero {
    min-height: 0;
    padding: 0 0 12px;
    display: block;
  }

  .hero-visual {
    min-height: 340px;
    box-shadow: none;
  }

  .calculator {
    display: block;
  }

  .panel {
    break-inside: avoid;
    box-shadow: none;
    background: #fff;
  }

  .analysis-grid {
    grid-template-columns: 1.3fr 0.7fr;
  }

  .detail-card details {
    display: block;
  }
}
