:root {
  --ink: #102f38;
  --ink-soft: #46636b;
  --paper: #f5f3ec;
  --card: #fffef9;
  --line: #d9ddd6;
  --teal: #00a6a6;
  --teal-dark: #007f82;
  --coral: #f26b4a;
  --blue: #1d4e67;
  --shadow: 0 24px 60px rgba(16, 47, 56, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% -8%, rgba(0, 166, 166, 0.18), transparent 32rem),
    radial-gradient(circle at 98% 12%, rgba(242, 107, 74, 0.12), transparent 26rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 max(44px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  margin-bottom: 28px;
}

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

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(16, 47, 56, 0.2);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 3px solid #7ce0db;
  border-radius: 4px;
}

.brand-mark::after {
  inset: 14px;
  border-color: #fff;
  border-radius: 50%;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.brand span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(16, 47, 56, 0.12);
  border-radius: 999px;
  background: rgba(255, 254, 249, 0.7);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 166, 166, 0.12);
}

.status-pill.offline .status-dot {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(242, 107, 74, 0.12);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-link {
  padding: 9px 13px;
  border: 1px solid rgba(16, 47, 56, 0.14);
  border-radius: 999px;
  background: rgba(255, 254, 249, 0.72);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.duct-brand-mark::after {
  inset: 12px 8px;
  border: 0;
  border-top: 3px solid white;
  border-bottom: 3px solid white;
  border-radius: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 750px;
  margin-bottom: 18px;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
}

.formula-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
}

.formula-card span {
  display: block;
  margin-bottom: 9px;
  color: #8fdeda;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.formula-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(18px, 2.5vw, 25px);
  font-weight: 650;
  letter-spacing: -0.04em;
}

.formula-card small {
  display: block;
  margin-top: 11px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.45;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(0, 1.16fr);
  overflow: hidden;
  border: 1px solid rgba(16, 47, 56, 0.1);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.input-panel,
.result-panel {
  padding: clamp(22px, 4vw, 38px);
}

.input-panel {
  border-right: 1px solid var(--line);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  margin-bottom: 32px;
  border-radius: 14px;
  background: #e9ece6;
}

.segmented button {
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.segmented button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(16, 47, 56, 0.1);
}

.panel-title {
  margin-bottom: 7px;
  font-size: 25px;
  letter-spacing: -0.045em;
}

.panel-intro {
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.input-guide {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(0, 127, 130, 0.18);
  border-radius: 12px;
  background: rgba(0, 166, 166, 0.07);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.input-guide strong {
  color: var(--ink);
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid #cdd4ce;
  border-radius: 13px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 166, 166, 0.11);
}

.field-note {
  margin: 9px 0 0;
  color: #6a7d82;
  font-size: 12px;
  line-height: 1.45;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 50px;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  margin-top: 20px;
  border: 0;
  background: var(--teal);
  color: #062d31;
  box-shadow: 0 10px 24px rgba(0, 166, 166, 0.22);
}

.primary-button:hover {
  background: #16b9b5;
}

.error-message {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff0eb;
  color: #9d3d28;
  font-size: 13px;
  font-weight: 700;
}

.result-panel {
  position: relative;
  min-height: 470px;
  background:
    linear-gradient(rgba(16, 47, 56, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 47, 56, 0.035) 1px, transparent 1px),
    #f8faf7;
  background-size: 28px 28px;
}

.result-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.reference-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: #d9f3ef;
  color: #086d6e;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reference-badge.free {
  background: #eceee9;
  color: #607177;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) minmax(220px, 1.15fr);
  gap: 28px;
  align-items: center;
}

.result-value {
  margin-bottom: 6px;
  font-size: clamp(54px, 8vw, 88px);
  font-weight: 780;
  letter-spacing: -0.075em;
  line-height: 0.95;
}

.result-value small {
  margin-left: 7px;
  color: var(--ink-soft);
  font-size: 18px;
  letter-spacing: 0;
}

.result-label {
  margin-bottom: 21px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.mini-stats {
  display: grid;
  gap: 9px;
}

.mini-stat {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.mini-stat strong {
  color: var(--ink);
}

.diagram {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  min-height: 230px;
  padding: 18px;
  border: 1px solid rgba(16, 47, 56, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
}

.shape-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.shape-caption {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.rect-shape {
  position: relative;
  width: min(130px, 100%);
  min-width: 76px;
  border: 8px solid var(--blue);
  border-radius: 8px;
  background: rgba(29, 78, 103, 0.06);
}

.circle-shape {
  display: grid;
  width: min(128px, 100%);
  aspect-ratio: 1;
  place-items: center;
  border: 8px solid var(--teal);
  border-radius: 50%;
  background: rgba(0, 166, 166, 0.07);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
}

.arrow {
  color: var(--coral);
  font-size: 27px;
  font-weight: 900;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.secondary-button {
  padding: 0 16px;
  border: 1px solid #cbd3cd;
  background: white;
  color: var(--ink);
}

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

.lower-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  margin-top: 24px;
}

.info-card {
  padding: 25px;
  border: 1px solid rgba(16, 47, 56, 0.1);
  border-radius: 22px;
  background: rgba(255, 254, 249, 0.84);
}

.info-card h2 {
  margin-bottom: 8px;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.info-card > p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.table-picker {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.compact-field {
  display: grid;
  gap: 6px;
}

.compact-field span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-field select {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #cdd4ce;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font-weight: 750;
}

.table-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 96px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--ink);
  color: white;
}

.table-result strong {
  font-size: 23px;
}

.table-result span {
  color: #9adfdb;
  font-size: 11px;
  font-weight: 800;
}

.install-steps {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.install-step {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 11px;
  align-items: start;
}

.install-step b {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  background: #d9f3ef;
  color: var(--teal-dark);
}

.install-step p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.install-button {
  margin-top: 16px;
}

.history-section {
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
  background: var(--ink);
  color: white;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.history-heading h2 {
  margin: 0;
  font-size: 21px;
}

.text-button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.history-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.history-item span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.history-item b {
  color: #8fe3df;
  font-size: 18px;
}

.empty-history {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.disclaimer {
  margin: 24px auto 0;
  max-width: 970px;
  color: #65777c;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.design-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 30px;
  align-items: end;
  margin-bottom: 26px;
}

.design-hero h1 {
  max-width: 850px;
}

.scope-card {
  padding: 24px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(124, 224, 219, 0.12), transparent 60%),
    var(--ink);
  color: white;
  box-shadow: var(--shadow);
}

.scope-card span,
.scope-card strong,
.scope-card small {
  display: block;
}

.scope-card span {
  margin-bottom: 10px;
  color: #8fdeda;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.scope-card strong {
  font-size: 21px;
  letter-spacing: -0.035em;
}

.scope-card small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.module-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 720px;
  padding: 6px;
  margin: 0 auto 18px;
  border: 1px solid rgba(16, 47, 56, 0.08);
  border-radius: 16px;
  background: rgba(233, 236, 230, 0.82);
}

.module-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 800;
}

.module-tabs button span {
  color: #87979a;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.module-tabs button.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 18px rgba(16, 47, 56, 0.11);
}

.module-tabs button.active span {
  color: var(--teal-dark);
}

.design-workspace {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.18fr);
  overflow: hidden;
  border: 1px solid rgba(16, 47, 56, 0.1);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.design-input-panel,
.design-result-panel {
  padding: clamp(23px, 3.5vw, 38px);
}

.design-input-panel {
  border-right: 1px solid var(--line);
}

.design-result-panel {
  min-width: 0;
  background:
    linear-gradient(rgba(16, 47, 56, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 47, 56, 0.035) 1px, transparent 1px),
    #f8faf7;
  background-size: 28px 28px;
}

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

.section-heading h2 {
  margin-bottom: 0;
  font-size: 26px;
  letter-spacing: -0.045em;
}

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

.advanced-fields {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.advanced-fields summary {
  padding: 18px 0;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.advanced-fields[open] summary {
  margin-bottom: 2px;
}

.result-status {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-status.ok {
  background: #d7f1e8;
  color: #087257;
}

.result-status.review {
  background: #ffded4;
  color: #a33e26;
}

.headline-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.headline-result > div {
  padding: 18px;
  border: 1px solid rgba(16, 47, 56, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.headline-result span,
.headline-result small,
.headline-result strong {
  display: block;
}

.headline-result span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.headline-result strong {
  margin: 6px 0 5px;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -0.06em;
  line-height: 1;
}

.headline-result strong i {
  color: var(--ink-soft);
  font-size: 16px;
  font-style: normal;
  letter-spacing: 0;
}

.headline-result small {
  color: var(--ink-soft);
  line-height: 1.35;
}

.duct-run {
  position: relative;
  height: 116px;
  margin: 10px 4px 24px;
  border: 2px solid var(--blue);
  border-radius: 9px;
  background:
    linear-gradient(90deg, rgba(29, 78, 103, 0.08), transparent 25%, rgba(29, 78, 103, 0.08));
}

.duct-run-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.duct-run-label span,
.duct-run-label b {
  display: block;
}

.duct-run-label span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.duct-run-label b {
  margin-top: 4px;
  color: var(--blue);
  font-size: 17px;
}

.end-frame,
.intermediate-frame {
  position: absolute;
  top: -8px;
  bottom: -8px;
  width: 6px;
  border-radius: 3px;
  background: var(--coral);
  box-shadow: 0 0 0 2px #fff;
}

.end-frame.start {
  left: -3px;
}

.end-frame.end {
  right: -3px;
}

.intermediate-frame {
  width: 4px;
  transform: translateX(-50%);
  background: var(--teal);
}

.requirement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.requirement-grid article {
  padding: 16px;
  border-radius: 15px;
  background: var(--ink);
  color: white;
}

.requirement-grid span,
.requirement-grid strong,
.requirement-grid small {
  display: block;
}

.requirement-grid span {
  color: #8fdeda;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.requirement-grid strong {
  margin: 7px 0 5px;
  font-size: 19px;
}

.requirement-grid small {
  color: rgba(255, 255, 255, 0.63);
  line-height: 1.35;
}

.checks-table {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.checks-table > div {
  display: grid;
  grid-template-columns: 1fr auto 62px;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.checks-table span {
  color: var(--ink-soft);
  font-weight: 750;
}

.checks-table strong {
  font-weight: 750;
}

.checks-table b {
  color: var(--teal-dark);
  text-align: right;
}

.calculation-note {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-left: 3px solid var(--coral);
  border-radius: 0 9px 9px 0;
  background: #fff3ee;
  color: #7f4a3d;
  font-size: 12px;
  line-height: 1.5;
}

.vane-headline {
  margin-bottom: 14px;
}

.vane-result-layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) minmax(180px, 1.15fr);
  gap: 16px;
  align-items: center;
}

.elbow-diagram {
  width: 100%;
  max-height: 290px;
  padding: 8px;
  border: 1px solid rgba(16, 47, 56, 0.1);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.8);
}

.elbow-diagram text {
  fill: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.duct-boundary,
.duct-edge,
.vane-line {
  fill: none;
  stroke-linecap: round;
}

.duct-boundary,
.duct-edge {
  stroke: var(--blue);
  stroke-width: 7;
}

.vane-line {
  stroke: var(--teal);
  stroke-width: 4;
}

.vane-summary {
  display: grid;
  gap: 10px;
}

.vane-summary > div {
  padding: 15px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
}

.vane-summary span,
.vane-summary strong {
  display: block;
}

.vane-summary span {
  color: #8fdeda;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.vane-summary strong {
  margin-top: 5px;
  font-size: 20px;
}

.vane-summary > small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.vane-table-wrap {
  max-height: 230px;
  overflow: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.vane-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.vane-table th,
.vane-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.vane-table th {
  position: sticky;
  top: 0;
  background: #eef1ec;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vane-table tr:last-child td {
  border-bottom: 0;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.method-grid article {
  padding: 22px;
  border: 1px solid rgba(16, 47, 56, 0.1);
  border-radius: 19px;
  background: rgba(255, 254, 249, 0.82);
}

.method-grid h2 {
  margin-bottom: 8px;
  font-size: 19px;
  letter-spacing: -0.035em;
}

.method-grid p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .hero,
  .design-hero,
  .workspace,
  .design-workspace,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
  }

  .input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .design-input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar {
    margin-bottom: 20px;
  }

  .brand span {
    display: none;
  }

  .status-pill {
    padding: 8px 10px;
    font-size: 11px;
  }

  .topbar-link {
    display: none;
  }

  h1 {
    font-size: 43px;
  }

  .formula-card {
    padding: 18px;
  }

  .workspace {
    border-radius: 21px;
  }

  .form-grid,
  .result-layout,
  .table-picker,
  .three-columns,
  .headline-result,
  .requirement-grid,
  .vane-result-layout {
    grid-template-columns: 1fr;
  }

  .module-tabs button {
    padding: 8px;
    font-size: 12px;
  }

  .module-tabs button span {
    display: none;
  }

  .result-panel {
    min-height: 0;
  }

  .diagram {
    min-height: 190px;
    padding: 13px;
  }

  .result-actions .secondary-button {
    flex: 1 1 150px;
  }

  .table-result {
    justify-content: center;
  }

  .checks-table > div {
    grid-template-columns: 1fr auto;
  }

  .checks-table strong {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
