:root {
  --so-black: #000000;
  --so-white: #ffffff;
  --so-ink-soft: #555555;
  --so-line: #d6d6d6;
  --so-line-strong: #969696;
  --so-surface-soft: #f5f5f5;
  --so-error: #8a1c1c;
  --so-font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --so-font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --so-text-xs: 12px;
  --so-text-sm: 13px;
  --so-text-md: 15px;
  --so-text-lg: 20px;
  --so-text-xl: 28px;
  --so-field-gap: 20px;
  --so-section-gap: 16px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: transparent;
}

body {
  margin: 0;
  background: transparent;
  color: var(--so-black);
  font-family: var(--so-font-sans);
  font-size: var(--so-text-md);
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
}

.app-heading {
  border-bottom: 1px solid var(--so-black);
  padding-bottom: 14px;
}

.eyebrow {
  margin: 0 0 5px;
  font-family: var(--so-font-mono);
  font-size: var(--so-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 6px;
  font-size: clamp(25px, 5vw, var(--so-text-xl));
  line-height: 1.2;
}

.lede {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--so-ink-soft);
}

.request-process {
  margin: 8px 0 0;
  font-size: var(--so-text-md);
}

.contact-email {
  color: inherit;
  font-weight: 700;
  overflow-wrap: anywhere;
  user-select: text;
}

.sheet-blocking-note {
  margin: 6px 0 0;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
}

.draft-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.draft-tools .button,
.draft-panel .button {
  font-size: var(--so-text-sm);
}

.draft-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--so-line);
  font-size: var(--so-text-sm);
}

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

.draft-panel h2 {
  margin: 0;
  font-size: var(--so-text-lg);
}

.draft-panel label { display: block; margin-bottom: 6px; font-weight: 600; }
.draft-code { margin-bottom: 8px; font-family: var(--so-font-mono); font-size: var(--so-text-xs); overflow-wrap: anywhere; }
#restore-preview { margin-top: 12px; }
#restore-description { margin-bottom: 8px; overflow-wrap: anywhere; }
#draft-status.is-error { color: var(--so-error); }

.concept-illustration {
  margin-top: 14px;
  padding: 9px 14px;
  border: 1px solid var(--so-line);
  background: var(--so-surface-soft);
}

.concept-illustration svg {
  display: block;
  width: 100%;
  height: clamp(150px, 25vw, 210px);
}

.diagram-axis,
.diagram-curve,
.diagram-guide,
.diagram-measure,
.diagram-object,
.diagram-divider {
  vector-effect: non-scaling-stroke;
}

.diagram-axis,
.diagram-measure,
.diagram-object {
  fill: none;
  stroke: var(--so-black);
  stroke-width: 1.4;
}

.diagram-curve {
  fill: none;
  stroke: var(--so-black);
  stroke-width: 2.5;
}

.diagram-guide,
.diagram-divider {
  fill: none;
  stroke: var(--so-line-strong);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.diagram-region,
.diagram-object-fill {
  fill: #e7e7e7;
}

.diagram-label,
.diagram-small {
  fill: var(--so-black);
  font-family: var(--so-font-sans);
}

.diagram-label {
  font-size: 14px;
}

.diagram-small {
  fill: var(--so-ink-soft);
  font-size: 12px;
}

.diagram-strong {
  font-weight: 700;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  border: 1px solid var(--so-line-strong);
  background: var(--so-line-strong);
}

.step-button {
  min-height: 48px;
  padding: 7px 6px;
  border: 0;
  background: var(--so-white);
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
  font-weight: 600;
}

.step-button span {
  display: block;
  font-family: var(--so-font-mono);
  font-size: 10px;
}

.step-button.is-current {
  background: var(--so-black);
  color: var(--so-white);
}

.step-button:hover:not(.is-current) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.request-form {
  margin-top: 5px;
}

.form-notes {
  padding-top: 9px;
}

.form-guidance,
.required-note,
.recommendation-note {
  margin: 0;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
}

.form-guidance {
  display: grid;
  gap: 6px;
  line-height: 1.5;
}

.recommendation-note-sample {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 4px;
  border: 1px solid var(--so-line-strong);
  background: var(--so-white);
  vertical-align: -1px;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: var(--so-section-gap) 0 0;
  border: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--so-field-gap) var(--so-section-gap);
}

.field {
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.spectral-pair {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--so-section-gap);
}

.spectral-pair > .field {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
}

.field label {
  display: block;
  margin-bottom: 5px;
  font-size: var(--so-text-sm);
  font-weight: 600;
}

.field-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 12px;
  min-height: 25px;
  margin-bottom: 5px;
}

.field-title .parameter-label,
.field-title .group-label {
  min-width: 0;
  margin: 0;
}

.recommendation-toggle,
.field .recommendation-toggle,
.advanced-row-title .recommendation-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  margin: 0;
  padding: 2px 6px;
  border: 1px solid var(--so-line-strong);
  background: var(--so-white);
  color: var(--so-ink-soft);
  font-family: var(--so-font-sans);
  font-size: var(--so-text-xs);
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}

.recommendation-toggle:hover {
  color: var(--so-black);
  border-color: var(--so-black);
}

.recommendation-toggle:focus-within {
  outline: 2px solid var(--so-black);
  outline-offset: 2px;
}

.recommendation-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--so-black);
}


.recommendation-inputs {
  min-width: 0;
}

.recommendation-toggle.is-requested {
  color: var(--so-black);
  border-color: var(--so-black);
}

.recommendation-placeholder {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 9px 10px;
  border: 1px dashed var(--so-line-strong);
  background: var(--so-surface-soft);
  color: var(--so-ink-soft);
  font-size: var(--so-text-sm);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.recommendation-context-editor {
  min-width: 0;
}

.recommendation-context-editor label {
  display: block;
  margin-bottom: 5px;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
  font-weight: 600;
}

.recommendation-context-input {
  display: block;
  min-height: 110px;
  font-size: var(--so-text-sm);
  line-height: 1.5;
}

.recommendation-context-input.is-single-line {
  min-height: 44px;
}

.recommendation-context-input::placeholder {
  color: var(--so-ink-soft);
}

.field-hint {
  margin: 6px 0 0;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
  line-height: 1.4;
}

.field-title + .recommendation-inputs > .field-hint:first-child {
  margin: 0 0 6px;
}

.field-advisory,
.sheet-advisory {
  margin: 7px 0 0;
  padding: 9px 10px;
  border-left: 3px solid var(--so-black);
  background: var(--so-surface-soft);
  font-size: var(--so-text-xs);
  line-height: 1.45;
}

.optical-advisory {
  margin: 2px 0 8px;
}

.optical-advisory p {
  margin: 0;
}

.optical-advisory p + p {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--so-line);
}

.reveal-panel {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--so-black);
  background: var(--so-surface-soft);
}

.reveal-panel label {
  margin-bottom: 5px;
}

.reveal-panel .field-hint {
  margin-bottom: 0;
}

.group-label {
  margin: 0 0 6px;
  font-size: var(--so-text-sm);
  font-weight: 700;
}

.field .subfield-label {
  margin-bottom: 4px;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
}

.shape-input-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}

.shape-selector,
.shape-dimensions {
  min-width: 0;
}

.dimension-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dimension-pair:not([hidden]) {
  display: grid;
}

.dimension-input {
  min-width: 0;
}

.blocking-line {
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.blocking-requirements {
  display: grid;
  gap: 10px;
}

.blocking-requirement-row + .blocking-requirement-row {
  padding-top: 10px;
  border-top: 1px solid var(--so-line);
}

.blocking-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
  margin-bottom: 5px;
  color: var(--so-black);
  font-family: var(--so-font-mono);
  font-size: var(--so-text-xs);
  font-weight: 700;
}

.blocking-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
}

.blocking-add-button,
.blocking-remove-button {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--so-line-strong);
  border-radius: 0;
  background: var(--so-white);
  color: var(--so-black);
  font-size: var(--so-text-xs);
  font-weight: 700;
}

.blocking-add-button:hover:not(:disabled),
.blocking-remove-button:hover {
  border-color: var(--so-black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blocking-add-button:focus-visible,
.blocking-remove-button:focus-visible {
  outline: 2px solid var(--so-black);
  outline-offset: 2px;
}

.blocking-add-button:disabled {
  background: var(--so-surface-soft);
  color: #767676;
  cursor: not-allowed;
}

.blocking-mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
}

.blocking-mode-switch {
  display: inline-flex;
  border: 1px solid var(--so-line-strong);
  background: var(--so-white);
}

.blocking-mode-button {
  min-height: 30px;
  padding: 4px 10px;
  border: 0;
  border-right: 1px solid var(--so-line-strong);
  background: var(--so-white);
  color: var(--so-black);
  font-size: var(--so-text-xs);
  font-weight: 600;
}

.blocking-mode-button:last-child {
  border-right: 0;
}

.blocking-mode-button.is-selected {
  background: var(--so-black);
  color: var(--so-white);
}

.blocking-mode-button:hover:not(.is-selected) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blocking-mode-button:focus-visible {
  outline: 2px solid var(--so-black);
  outline-offset: 2px;
}

.blocking-item {
  min-width: 0;
}

.blocking-item label {
  margin-bottom: 4px;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
}

.blocking-item .input-unit > span {
  min-width: 42px;
  padding: 0 6px;
}

.blocking-output-list {
  white-space: pre-line;
}

.advanced-settings {
  margin-top: var(--so-field-gap);
  border: 1px solid var(--so-line-strong);
  background: var(--so-white);
}

.advanced-settings summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

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

.advanced-indicator {
  font-family: var(--so-font-mono);
  font-size: 18px;
  line-height: 1;
  text-align: right;
}

.advanced-minus {
  display: none;
}

.advanced-settings[open] summary {
  border-bottom: 1px solid var(--so-line-strong);
}

.advanced-settings[open] .advanced-plus {
  display: none;
}

.advanced-settings[open] .advanced-minus {
  display: inline;
}

.advanced-summary {
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
  font-weight: 500;
}

.advanced-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

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

.advanced-table tr:last-child th,
.advanced-table tr:last-child td {
  border-bottom: 0;
}

.advanced-table th {
  width: 38%;
  background: var(--so-surface-soft);
  font-size: var(--so-text-sm);
}

.advanced-table label {
  display: block;
}

.advanced-table .field-hint {
  margin-bottom: 0;
}

.advanced-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.advanced-row-title > label:first-child {
  min-width: 0;
  margin: 0;
}

.radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field .radio-option,
.advanced-table .radio-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--so-line-strong);
  font-size: var(--so-text-sm);
  font-weight: 600;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  width: 16px;
  min-height: 0;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--so-black);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--so-line-strong);
  border-radius: 0;
  background: var(--so-white);
  color: var(--so-black);
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 9px 11px;
}

textarea {
  min-height: 88px;
  padding: 9px 11px;
  line-height: 1.45;
  resize: none;
}

input::placeholder,
textarea::placeholder {
  color: #777777;
  opacity: 1;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--so-black);
  outline-offset: 2px;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--so-error);
  box-shadow: inset 0 0 0 1px var(--so-error);
}

.input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.thickness-input {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr) auto;
  align-items: stretch;
}

.thickness-input input {
  min-width: 0;
}

.thickness-condition-select {
  width: 76px;
  min-width: 76px;
  padding-right: 10px;
  padding-left: 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.thickness-input input {
  border-left: 0;
  border-right: 0;
}

.thickness-input > span {
  display: grid;
  min-width: 52px;
  place-items: center;
  padding: 0 9px;
  border: 1px solid var(--so-line-strong);
  background: var(--so-surface-soft);
  color: var(--so-ink-soft);
  font-size: var(--so-text-sm);
  white-space: nowrap;
}

.input-unit input {
  min-width: 0;
  border-right: 0;
}

.input-unit > span {
  display: grid;
  min-width: 58px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--so-line-strong);
  background: var(--so-surface-soft);
  color: var(--so-ink-soft);
  font-size: var(--so-text-sm);
  white-space: nowrap;
}

.input-unit-prefix {
  grid-template-columns: auto minmax(0, 1fr);
}

.input-unit-prefix input {
  border-right: 1px solid var(--so-line-strong);
  border-left: 0;
}

.input-affixes {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
}

.input-affixes input {
  min-width: 0;
  border-right: 0;
  border-left: 0;
}

.input-affixes > span {
  display: grid;
  min-width: 44px;
  place-items: center;
  padding: 0 9px;
  border: 1px solid var(--so-line-strong);
  background: var(--so-surface-soft);
  color: var(--so-ink-soft);
  font-size: var(--so-text-sm);
  white-space: nowrap;
}

.field-error:empty,
.action-status:empty {
  display: none;
}

.field-error {
  display: block;
  padding-top: 6px;
  color: var(--so-error);
  font-size: var(--so-text-xs);
  font-weight: 600;
  line-height: 1.35;
}

.output-section {
  padding-top: var(--so-field-gap);
}

.output-heading {
  margin-bottom: var(--so-section-gap);
}

.output-heading h2 {
  margin-bottom: 0;
  font-size: var(--so-text-lg);
  line-height: 1.35;
}

.readiness {
  margin: 6px 0 0;
  color: var(--so-ink-soft);
  font-size: var(--so-text-sm);
  text-align: left;
}

.missing-requirements {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--so-line-strong);
  border-left: 4px solid var(--so-black);
  background: var(--so-surface-soft);
  font-size: var(--so-text-sm);
}

.missing-requirements-title {
  margin-bottom: 4px;
  font-weight: 700;
}

.missing-requirements ul {
  margin: 0;
  padding-left: 20px;
}

.missing-requirements-note {
  margin: 6px 0 0;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
}

.spec-sheet {
  border: 1px solid var(--so-black);
  background: var(--so-white);
}

.sheet-header {
  padding: 20px;
  border-bottom: 2px solid var(--so-black);
}

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

.sheet-wordmark {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.sheet-website {
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
  overflow-wrap: anywhere;
}

.sheet-header h3 {
  margin-bottom: 6px;
  font-size: 24px;
  line-height: 1.2;
}

.needs-review { color: var(--so-error); }

.copy-fallback {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--so-line);
}

.copy-fallback label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--so-text-sm);
  font-weight: 600;
}

.copy-fallback textarea {
  margin-bottom: 8px;
}

.sheet-reference {
  margin: 0;
  color: var(--so-ink-soft);
  font-size: var(--so-text-sm);
}

.sheet-reference strong {
  color: var(--so-black);
  font-family: var(--so-font-mono);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.sheet-section {
  padding: 14px 20px 0;
}

.sheet-section h4 {
  margin-bottom: 6px;
  font-size: var(--so-text-sm);
  line-height: 1.4;
  text-transform: uppercase;
}

.sheet-section table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.sheet-section th,
.sheet-section td {
  padding: 6px 8px;
  border: 1px solid var(--so-line);
  vertical-align: top;
  font-size: var(--so-text-sm);
  overflow-wrap: anywhere;
  text-align: left;
}

.sheet-section th {
  width: 42%;
  background: var(--so-surface-soft);
  font-weight: 600;
}

.sheet-section td {
  white-space: pre-wrap;
}

.sheet-advisory {
  margin-top: 10px;
}

.sheet-notes {
  padding-bottom: 14px;
}

.sheet-notes p {
  min-height: 52px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--so-line);
  font-size: var(--so-text-sm);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sheet-footer {
  margin: 16px 20px 0;
  padding: 12px 0 16px;
  border-top: 1px solid var(--so-black);
}

.sheet-footer p {
  margin: 0;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
  line-height: 1.4;
}

.sheet-footer .sheet-contact-note {
  margin: 0;
  color: var(--so-black);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.button {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--so-black);
  border-radius: 0;
  font-weight: 700;
}

.button-primary {
  background: var(--so-black);
  color: var(--so-white);
}

.button-secondary {
  background: var(--so-white);
  color: var(--so-black);
}

.button:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.button:disabled {
  border-color: var(--so-line-strong);
  background: var(--so-surface-soft);
  color: #767676;
  cursor: not-allowed;
}

.action-status {
  min-height: 22px;
  margin: 5px 0 0;
  font-size: var(--so-text-xs);
  font-weight: 600;
}

.wizard-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: var(--so-section-gap);
  padding-top: var(--so-section-gap);
  border-top: 1px solid var(--so-line);
}

.wizard-actions p {
  margin: 0;
  color: var(--so-ink-soft);
  font-size: var(--so-text-xs);
  text-align: center;
}

@media (max-width: 560px) {
  .app-shell {
    padding: 12px;
  }

  .wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .concept-illustration {
    padding-right: 9px;
    padding-left: 9px;
  }

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

  .spectral-pair,
  .spectral-pair > .field {
    display: block;
  }

  .spectral-pair > .field + .field {
    margin-top: var(--so-field-gap);
  }

  .field-wide {
    grid-column: auto;
  }

  .shape-input-row {
    grid-template-columns: minmax(185px, 1fr) minmax(120px, 0.7fr);
    gap: 8px;
  }

  .shape-input-row .radio-options {
    flex-wrap: nowrap;
    gap: 5px;
  }

  .field .shape-input-row .radio-option {
    gap: 5px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .geometry-field.is-rectangle .shape-input-row {
    grid-template-columns: 1fr;
  }

  .blocking-line {
    grid-template-columns: minmax(110px, 1.2fr) repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .blocking-item input {
    padding-right: 7px;
    padding-left: 7px;
  }

  .blocking-item .input-unit > span {
    min-width: 36px;
    padding: 0 4px;
  }

  .advanced-settings summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .advanced-summary {
    display: none;
  }

  .advanced-table th,
  .advanced-table td {
    padding: 9px;
  }

  .advanced-table th {
    width: 42%;
  }

  .sheet-header {
    padding: 16px;
  }

  .sheet-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .sheet-section th {
    width: 44%;
  }

  .sheet-footer {
    margin-right: 16px;
    margin-left: 16px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    grid-template-columns: 1fr 1fr;
  }

  .wizard-actions p {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 360px) {
  .shape-input-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  html,
  body {
    width: auto;
    margin: 0;
    background: var(--so-white);
  }

  body {
    padding: 0;
    font-size: 9.5pt;
    line-height: 1.4;
  }

  .app-shell {
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .app-heading,
  .concept-illustration,
  .request-form,
  .output-heading,
  .missing-requirements,
  .actions,
  .copy-fallback,
  .draft-tools,
  .draft-panel,
  .action-status,
  .wizard-steps,
  .wizard-actions {
    display: none !important;
  }

  .output-section {
    display: block !important;
    padding: 0;
  }

  .spec-sheet {
    border: 0;
  }

  .sheet-header {
    padding: 0 0 3mm;
    break-inside: avoid;
    break-after: avoid;
  }

  .sheet-letterhead {
    margin-bottom: 5mm;
  }

  .sheet-wordmark {
    width: 44mm;
  }

  .sheet-header h3 {
    font-size: 18pt;
  }

  .sheet-reference,
  .sheet-website,
  .sheet-footer p {
    font-size: 7.5pt;
  }

  .sheet-section th,
  .sheet-section td,
  .sheet-notes p {
    font-size: 8.5pt;
  }

  .sheet-section {
    padding: 2.5mm 0 0;
    break-inside: auto;
  }

  .sheet-section tr { break-inside: avoid; }
  .sheet-section h4 { break-after: avoid; }
  .sheet-footer { break-inside: avoid; }

  .sheet-section h4 {
    margin-bottom: 1.2mm;
    font-size: 8pt;
  }

  .sheet-section th,
  .sheet-section td {
    display: table-cell;
    width: auto;
    padding: 0.9mm 1.5mm;
  }

  .sheet-section th {
    width: 39%;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sheet-notes {
    padding-bottom: 2.5mm;
  }

  .sheet-notes p {
    min-height: 9mm;
    padding: 1.4mm;
  }

  .sheet-footer {
    margin: 4mm 0 0;
    padding: 2mm 0 0;
  }

  .sheet-footer .sheet-contact-note {
    margin: 0;
  }
}
