/* Field planning UI: system fonts, high contrast, no external CSS dependencies. */
:root {
  color-scheme: light;
  --ink: #152f3f;
  --muted: #536878;
  --line: #d9e2e7;
  --paper: #f1f4f5;
  --white: #fff;
  --night: #132c3a;
  --teal: #086e60;
  --teal-light: #e8f4f0;
  --accent: #c8e57b;
  --red: #a5372c;
  --amber: #895311;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
input,
select,
textarea,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
summary,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
a {
  color: var(--teal);
  text-underline-offset: 3px;
}
button,
input,
select,
textarea {
  border-radius: 8px;
}
:focus-visible {
  outline: 3px solid #0b7cc1;
  outline-offset: 3px;
}
button svg,
.brand svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 16px;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.appbar {
  height: 68px;
  padding: 0 max(24px, calc((100vw - 1344px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--night);
  color: white;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: white;
  text-decoration: none;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.brand svg {
  width: 33px;
  height: 33px;
  color: var(--accent);
}
.brand-divider {
  color: #788e9b;
  margin: 0 16px;
  font-weight: 400;
}
.brand-name {
  font-weight: 450;
  font-size: 14px;
  letter-spacing: 0;
}
.back-link {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #e0eaee;
  text-decoration: none;
  min-height: 44px;
}
.back-link span {
  font-size: 22px;
}
.shell {
  max-width: 1344px;
  padding: 0 24px;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 34px 0 30px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin: 0 0 9px;
}
.eyebrow span {
  color: #9aacb6;
  margin: 0 9px;
}
h1 {
  font-size: clamp(27px, 3.2vw, 40px);
  line-height: 1.17;
  letter-spacing: -0.035em;
  margin: 0 0 10px;
  font-weight: 750;
}
h1 > span {
  color: var(--teal);
}
.page-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.specification {
  display: grid;
  gap: 3px;
  padding-left: 20px;
  border-left: 2px solid #b9c9ce;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.spec-line {
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 3px;
}
.spec-line b {
  color: var(--teal);
  margin-left: 4px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.83fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: start;
}
.input-column,
.output-column {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.output-column {
  position: sticky;
  top: min(20px, calc(100dvh - var(--output-height, 800px) - 20px));
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 3px 5px #183c4b03;
  min-width: 0;
}
.geometry,
.project,
.results {
  padding: 25px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.section-heading > div {
  min-width: 0;
}
.step {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #eff3f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  border: 1px solid #e1e8ec;
  border-radius: 9px;
}
h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.section-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  min-height: 44px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 0 4px 10px;
}
.text-button:hover {
  text-decoration: underline;
}
.section-heading > .text-button {
  margin-left: auto;
  white-space: nowrap;
}
.measure-field {
  padding-bottom: 20px;
  margin-bottom: 19px;
  border-bottom: 1px solid #edf1f3;
}
.field-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.field-heading label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.letter {
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: #ecf2f5;
  color: #35586b;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  font-size: 12px;
  font-weight: 800;
}
.required-label,
.optional-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.reference-select {
  border: 1px solid var(--line);
  min-height: 44px;
  width: 100%;
  background: #f7f9fa;
  color: #3b5361;
  font-size: 12px;
  padding: 10px 33px 10px 12px;
  margin-bottom: 8px;
}
.number-field {
  display: flex;
  align-items: center;
  min-height: 62px;
  border: 1.5px solid #bbcbd3;
  border-radius: 9px;
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.number-field input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 9px 15px;
  height: 60px;
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  outline: none;
}
.number-field input::placeholder {
  font-weight: 400;
  font-size: 20px;
  color: #8496a1;
}
.number-field > span {
  margin-right: 12px;
  padding: 3px 9px;
  background: #eef3f5;
  border: 1px solid #e3eaee;
  border-radius: 5px;
  font-size: 12px;
  color: var(--muted);
}
.number-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px #086e6018;
}
.measure-field:focus-within .letter {
  background: var(--teal);
  color: white;
}
.number-field:has([aria-invalid='true']) {
  border-color: var(--red);
  background: #fff9f7;
}
.field-help,
.field-error {
  font-size: 11px;
  margin: 7px 0 0;
  line-height: 1.5;
}
.field-help {
  color: var(--muted);
}
.field-error {
  color: var(--red);
  font-weight: 550;
}
.field-error:empty {
  display: none;
}
.variant-field {
  padding: 0;
  border: 0;
  margin: 0;
}
.variant-field legend {
  padding: 0;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.segmented label {
  position: relative;
  cursor: pointer;
}
.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.segmented label > span {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: #fff;
}
.segmented b {
  font-size: 19px;
}
.segmented small {
  font-size: 10px;
  color: var(--muted);
}
.segmented input:checked + span {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal);
}
.segmented input:checked + span::after {
  content: '✓';
  position: absolute;
  top: 13px;
  right: 13px;
  font-size: 13px;
  font-weight: 800;
}
.segmented input:focus-visible + span {
  outline: 3px solid #0b7cc1;
  outline-offset: 3px;
}
.automatic-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 18px;
}
.live-dot {
  display: inline-block;
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: #339780;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #33978018;
}
.project-fields {
  display: grid;
  gap: 15px;
}
.project-fields label {
  display: block;
  min-width: 0;
  font-size: 12px;
  font-weight: 650;
}
.project-fields .optional-label {
  float: right;
}
.project-fields input,
.project-fields select,
.project-fields textarea {
  margin-top: 7px;
  width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 10px 12px;
  border: 1px solid #bbcbd3;
  color: var(--ink);
  background: #fff;
  font-weight: 400;
  font-size: 13px;
}
.project-fields textarea {
  resize: vertical;
}
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.project-fields [aria-invalid='true'] {
  border-color: var(--red);
}
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
}
.reset-button {
  color: #695653;
}

/* SVG drawing and measurement states. */
summary {
  list-style: none;
  cursor: pointer;
}
summary::-webkit-details-marker {
  display: none;
}
.preview {
  overflow: clip;
}
.preview > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 22px;
  color: var(--ink);
  border-bottom: 1px solid #e1e9ed;
}
.preview-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 750;
}
.preview-summary {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chevron {
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  flex: 0 0 7px;
  margin: -4px 2px 0 8px;
}
details[open] > summary .chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}
.drawing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 20px 0;
  background: #f7f9fa;
}
.drawing-toolbar > span {
  color: var(--muted);
  font-size: 10px;
}
.view-switch {
  display: inline-flex;
  border: 1px solid #d9e2e7;
  padding: 3px;
  background: #edf2f4;
  border-radius: 7px;
}
.view-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  padding: 5px 13px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}
.view-switch button[aria-pressed='true'] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px #17334216;
}
.drawing-surface {
  background-color: #f7f9fa;
  background-image: radial-gradient(#cbd7de 1px, transparent 1px);
  background-size: 18px 18px;
}
#liveSketch {
  width: 100%;
  height: auto;
  display: block;
  max-height: 370px;
}
.drawing-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 20px;
  color: var(--muted);
  font-size: 9px;
  border-top: 1px solid #e1e9ed;
}
.drawing-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-line {
  display: inline-block;
  width: 13px;
  height: 2px;
  background: var(--teal);
}
.dimension {
  color: #4b6f84;
  transition: color 0.15s;
}
.dimension .measure-line {
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
}
.dimension .extension {
  stroke: currentColor;
  stroke-width: 0.8;
  opacity: 0.4;
  stroke-dasharray: 3 3;
}
.dimension .dim-bg {
  fill: #f7f9fa;
  stroke: #dce5e9;
  stroke-width: 0.8;
}
.dimension text {
  fill: currentColor;
  font-size: 14px;
  font-weight: 650;
  text-anchor: middle;
  dominant-baseline: central;
}
.dimension.active {
  color: #007863;
}
.dimension.active .measure-line {
  stroke-width: 3;
}
.dimension.active .dim-bg {
  fill: #dcf5eb;
  stroke: #007863;
  stroke-width: 1.5;
}
.dimension.active text {
  font-weight: 800;
}
.dimension.exceeded {
  color: #ad4326;
}
.dimension.exceeded .dim-bg {
  fill: #fff2e8;
  stroke: #dba077;
}
.dimension.exceeded.active .dim-bg {
  stroke-width: 2;
}
.dimension.pending {
  opacity: 0.68;
}
.diagram-label {
  fill: #6b818f;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.svg-note {
  fill: #6b818f;
  font-size: 12px;
}

/* Results and export actions. */
.results .section-heading {
  margin-bottom: 14px;
}
.status-badge {
  margin-left: auto;
  border: 1px solid #dbe4e9;
  border-radius: 5px;
  padding: 4px 7px;
  color: var(--muted);
  background: #f5f8f9;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge[data-state='valid'] {
  background: var(--teal-light);
  color: var(--teal);
  border-color: #bcdad0;
}
.status-badge[data-state='warning'] {
  background: #fff3df;
  color: var(--amber);
  border-color: #e9cca2;
}
.status-badge[data-state='invalid'] {
  background: #fff0eb;
  color: var(--red);
  border-color: #ecc6bc;
}
.status-message {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 15px;
  min-height: 17px;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.result-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce5e9;
  border-radius: 10px;
  color: var(--ink);
  background: #f9fbfc;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.result-card:hover,
.result-card.is-active {
  border-color: var(--teal);
  background: #f0f8f5;
}
.result-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  font-weight: 650;
}
.result-label .letter {
  width: 23px;
  height: 23px;
  flex-basis: 23px;
  font-size: 11px;
}
.result-card strong {
  font-size: clamp(25px, 2.9vw, 35px);
  font-weight: 650;
  letter-spacing: -0.025em;
  margin: 11px 0 6px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.result-card strong small {
  font-weight: 450;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}
.result-detail {
  font-size: 9px;
  color: var(--muted);
}
.meter {
  display: block;
  height: 3px;
  width: 100%;
  overflow: hidden;
  background: #e1e9ed;
  border-radius: 2px;
  margin-top: 12px;
}
.meter > span {
  display: block;
  height: 100%;
  width: 0;
  background: #7e9ba8;
  transition: width 0.2s;
}
.result-card.exceeded {
  border-color: #dba077;
  background: #fff8ef;
}
.result-card.exceeded .meter > span {
  background: #b46126;
}
.result-card.exceeded strong {
  color: #97501f;
}
.result-card.clearance {
  background: var(--night);
  border-color: var(--night);
  color: white;
}
.clearance .letter {
  background: #315263;
  color: #d8e8ee;
}
.clearance strong {
  color: var(--accent);
}
.clearance strong small,
.clearance .result-detail {
  color: #c5d4dd;
}
.clearance.is-active,
.clearance:hover {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.clearance-rule {
  position: absolute;
  right: 17px;
  top: 60px;
  font-size: 28px;
  color: #6d8795;
}
.warning {
  display: flex;
  gap: 10px;
  border: 1px solid #ebd0a8;
  background: #fff7e9;
  color: #794812;
  border-radius: 8px;
  margin-top: 10px;
  padding: 12px;
  font-size: 11px;
}
.warning-icon {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.export-actions {
  display: grid;
  grid-template-columns: 1.12fr 1fr auto;
  gap: 8px;
  margin-top: 22px;
}
.export-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: white;
}
.primary-button:hover:not(:disabled) {
  background: #055849;
}
.secondary-button {
  border: 1px solid #bacbd4;
  background: white;
  color: var(--ink);
}
.secondary-button:hover:not(:disabled) {
  background: #f1f6f8;
}
.export-actions button:disabled {
  color: #748590;
  background: #edf1f3;
  border-color: #dce4e9;
}
.export-actions button svg {
  width: 16px;
  height: 16px;
}
.export-hint,
.export-status {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin: 12px 0 0;
}
.export-status {
  color: var(--teal);
  font-weight: 600;
}
.export-status:empty {
  display: none;
}
.reference-section {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.reference-panel > summary {
  min-height: 56px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 650;
}
.reference-content {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  color: var(--muted);
  font-size: 13px;
}
.reference-content p {
  margin: 0 0 15px;
}
.original-diagram {
  width: 100%;
  height: auto;
  display: block;
}
.component {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 24px;
}
.component img {
  width: 320px;
  max-width: 100%;
  height: auto;
}
.formula-list {
  margin: 0 0 20px;
}
.formula-list > div {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.formula-list dt {
  font-weight: 650;
  color: var(--ink);
}
.formula-list dd {
  text-align: right;
  margin: 0;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  color: var(--muted);
  padding: 24px 0;
}
#printReport {
  display: none;
}
.no-script {
  padding: 20px;
  background: #fff3df;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
}
@media (min-width: 981px) {
  .preview > summary {
    cursor: default;
  }
  .preview > summary .chevron {
    display: none;
  }
}
@media (max-width: 1160px) and (min-width: 981px) {
  .workspace {
    gap: 18px;
    grid-template-columns: minmax(335px, 0.9fr) minmax(0, 1.15fr);
  }
  .geometry,
  .project,
  .results {
    padding: 20px;
  }
  .export-actions {
    grid-template-columns: 1fr 1fr;
  }
  .print-button {
    grid-column: 1/-1;
  }
  .specification {
    display: none;
  }
}
@media (max-width: 980px) {
  .appbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 58px;
    padding: 0 20px;
  }
  .shell {
    max-width: 740px;
    padding: 0 20px;
  }
  .page-heading {
    padding: 24px 0;
  }
  .specification {
    display: none;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .input-column,
  .output-column {
    display: contents;
  }
  .workspace .panel {
    width: 100%;
  }
  .preview {
    order: 0;
    position: sticky;
    top: 58px;
    z-index: 20;
    box-shadow: 0 5px 16px #15324512;
    border-radius: 0 0 12px 12px;
  }
  .preview > summary {
    min-height: 48px;
    padding: 0 18px;
  }
  .preview:not([open]) > summary {
    border-bottom: 0;
  }
  .geometry {
    order: 1;
  }
  .project {
    order: 2;
  }
  .results {
    order: 3;
  }
  #liveSketch {
    max-height: 235px;
  }
  .drawing-toolbar {
    padding: 8px 14px 0;
  }
  .view-switch button {
    min-height: 44px;
    padding: 5px 15px;
  }
  .drawing-footer {
    padding: 6px 14px;
    font-size: 9px;
  }
  .drawing-footer > span:last-child {
    display: none;
  }
  .geometry,
  .project,
  .results {
    padding: 24px;
  }
  html {
    scroll-padding-top: 125px;
  }
}
@media (max-width: 540px) {
  .shell {
    padding: 0 12px;
  }
  .appbar {
    padding: 0 16px;
  }
  .brand {
    font-size: 16px;
    gap: 7px;
  }
  .brand-divider {
    margin: 0 9px;
  }
  .brand-name {
    font-size: 11px;
  }
  .back-link {
    font-size: 0;
    gap: 0;
  }
  .back-link span {
    font-size: 24px;
    width: 44px;
    text-align: right;
  }
  .page-heading {
    padding: 23px 5px 20px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.12em;
  }
  .eyebrow span {
    margin: 0 5px;
  }
  h1 {
    font-size: 27px;
  }
  .page-heading p:last-child {
    font-size: 11px;
  }
  .geometry,
  .project,
  .results {
    padding: 20px 17px;
  }
  .section-heading {
    gap: 9px;
  }
  .step {
    flex-basis: 29px;
    height: 29px;
    font-size: 10px;
    border-radius: 7px;
  }
  h2 {
    font-size: 15px;
  }
  .section-heading > .text-button {
    font-size: 10px;
    padding-left: 0;
  }
  .section-heading p {
    font-size: 10px;
  }
  .reference-select,
  .project-fields input,
  .project-fields select,
  .project-fields textarea {
    font-size: 16px;
  }
  .reference-select {
    padding-left: 10px;
  }
  .field-heading label {
    font-size: 13px;
  }
  .number-field,
  .number-field input {
    min-height: 62px;
  }
  .measure-field {
    margin-bottom: 18px;
    padding-bottom: 18px;
  }
  .project-fields label {
    font-size: 11px;
  }
  .project-footer {
    flex-wrap: wrap;
    gap: 0;
  }
  .project-footer .text-button {
    margin-left: auto;
  }
  .preview-summary {
    font-size: 10px;
  }
  #liveSketch {
    max-height: 200px;
  }
  .drawing-toolbar > span {
    font-size: 9px;
  }
  .view-switch button {
    padding: 4px 10px;
    font-size: 10px;
  }
  .result-card {
    padding: 13px 11px;
  }
  .result-label {
    gap: 5px;
    font-size: 10px;
  }
  .result-label .letter {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }
  .result-card strong {
    font-size: 29px;
  }
  .result-detail {
    font-size: 9px;
  }
  .clearance-rule {
    display: none;
  }
  .status-badge {
    font-size: 8px;
    padding: 4px 5px;
  }
  .export-actions {
    grid-template-columns: 1fr 1fr;
  }
  .export-actions .primary-button {
    grid-column: 1/-1;
    min-height: 52px;
    font-size: 13px;
  }
  .export-actions .secondary-button {
    font-size: 11px;
  }
  .export-hint {
    font-size: 10px;
  }
  .reference-content {
    padding: 18px;
  }
  .component {
    flex-direction: column;
    align-items: flex-start;
  }
  .formula-list > div {
    flex-direction: column;
    gap: 4px;
  }
  .formula-list dd {
    text-align: left;
  }
  .page-footer {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
@media print {
  @page {
    size: A4;
    margin: 14mm;
  }
  body {
    background: white;
    font-size: 10pt;
    color: #172f3e;
  }
  .appbar,
  .shell,
  .skip-link,
  .no-script {
    display: none !important;
  }
  #printReport {
    display: block;
  }
  #printReport h1 {
    font-size: 24pt;
  }
  #printReport h2 {
    font-size: 14pt;
    margin: 6mm 0 3mm;
  }
  #printReport p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  #printReport table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 10pt;
  }
  #printReport td,
  #printReport th {
    overflow-wrap: anywhere;
    padding: 2.5mm 0;
    border-bottom: 1px solid #d9e2e7;
    text-align: left;
  }
  #printReport td:last-child {
    text-align: right;
  }
  #printReport tr {
    break-inside: avoid;
  }
  #printReport .print-sketch {
    width: 100%;
    max-height: 75mm;
  }
  #printReport .print-reference {
    break-before: page;
  }
  #printReport .print-reference img {
    width: 100%;
    height: auto;
  }
  #printReport .print-reference img:last-of-type {
    width: 75mm;
    display: block;
    margin: 5mm 0;
  }
  #printReport .print-note {
    padding: 3mm;
    border: 1px solid #b98b49;
  }
}
