@font-face { font-family: 'IBM Plex Sans'; src: url('./IBMPlexSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('./IBMPlexSans-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('./IBMPlexSans-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('./IBMPlexSans-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root {
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  color: #233540;
  background: #fff;
  --ink: #20354d;
  --muted: #536476;
  --line: #d6dde6;
  --soft: #f4f6f9;
  --accent: #355b7c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f4f5f7; font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.topbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px max(24px, calc((100vw - 1260px)/2));
  color: #fff;
  background: var(--ink);
}
.brand-copy { display: flex; flex-direction: column; gap: 4px; }
.brand-copy strong { font-size: .88rem; letter-spacing: .035em; }
.brand-copy span { color: #d4e1e2; font-size: .81rem; }
.topbar-right { color: #edf4f6; font-size: .85rem; font-weight: 650; text-decoration: none; }
.topbar-right:hover { text-decoration: underline; }

.workspace { max-width: 1260px; padding: 24px 24px 50px; margin: auto; }
.page-heading { margin-bottom: 17px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .11em; }
.page-heading h1 { margin: 0 0 5px; color: var(--ink); font-size: clamp(1.72rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.018em; }
.intro { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.45; }
.heading-tools { flex: none; text-align: right; }
.heading-actions { display: flex; gap: 9px; }
.action-note { display: block; margin-top: 7px; color: var(--muted); font-size: .72rem; }
.button { min-height: 43px; padding: 10px 16px; border: 1px solid #cbd8db; border-radius: 6px; background: #fff; color: var(--ink); font-size: .9rem; font-weight: 650; }
.button:hover:not(:disabled) { border-color: #91a5ac; }
.button-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.button-primary:hover:not(:disabled) { background: #315164; }
.download-line { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 14px; font-size: .8rem; }
.download-line a { color: #255b75; font-weight: 700; text-underline-offset: 3px; }
.download-line span { color: var(--muted); }
.quick-guide { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.quick-guide summary { cursor: pointer; padding: 12px 16px; color: var(--ink); font-size: .9rem; font-weight: 650; }
.quick-guide[open] summary { border-bottom: 1px solid var(--line); }
.quick-guide-body { padding: 4px 17px 15px; color: #3e535e; font-size: .89rem; line-height: 1.5; }
.quick-guide-body p { margin: 12px 0; }
.quick-guide-body table { width: 100%; border-collapse: collapse; }
.quick-guide-body th, .quick-guide-body td { padding: 8px 9px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.quick-guide-body th { color: var(--ink); background: var(--soft); }
.quick-guide-body td:first-child { font-weight: 700; color: var(--ink); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 18px; align-items: start; }
form { min-width: 0; display: grid; gap: 12px; }
.panel { min-width: 0; padding: 20px 23px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 1px 2px #162e3810; }
.section-title { display: flex; gap: 12px; align-items: start; margin-bottom: 14px; }
.section-number { display: block; flex: none; min-width: 24px; padding-top: 2px; color: var(--accent); font-size: .87rem; font-weight: 700; }
.section-title h2, .section-copy strong { display: block; margin: 0 0 4px; color: var(--ink); font-size: 1.08rem; line-height: 1.25; font-weight: 700; }
.section-title p, .section-copy small { display: block; margin: 0; color: var(--muted); font-size: .87rem; line-height: 1.4; font-weight: 400; }
.collapsible { padding: 0; }
.collapsible > summary { position: relative; cursor: pointer; list-style: none; margin: 0; padding: 17px 44px 17px 24px; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::after { content: "+"; position: absolute; right: 23px; top: 18px; color: var(--ink); font-size: 1.28rem; font-weight: 400; }
.collapsible[open] > summary::after { content: "−"; }
.collapsible[open] > summary { border-bottom: 1px solid var(--line); }
.panel-body { padding: 20px 24px 24px; }

.field-grid { display: grid; gap: 12px 16px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.two .full-row { grid-column: 1 / -1; }
.field-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.lot-grid { margin-top: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { color: #344b56; font-size: .87rem; font-weight: 650; line-height: 1.35; }
.field small { color: #667a83; font-size: .81rem; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; min-height: 43px; padding: 9px 11px;
  border: 1px solid #cbd8db; border-radius: 5px; background: #fff; color: #23343e; font-size: .93rem;
}
.field textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
.field input::placeholder, .field textarea::placeholder { color: #929fa5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #537b89; outline: 2px solid #d5e5e8; outline-offset: 0; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 46px; }
.input-suffix b { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #647780; font-size: .75rem; pointer-events: none; }
.weight-input { display: flex; gap: 6px; }
.weight-input input { flex: 1; }
.weight-input select { flex: none; width: 77px; padding: 9px 6px; font-weight: 700; }
.field .check-line { display: flex; align-items: center; gap: 7px; margin-top: 2px; font-size: .78rem; font-weight: 400; color: #344b56; }
.field .check-line input { flex: none; width: 16px; height: 16px; min-height: 16px; padding: 0; accent-color: var(--ink); }
.field-help { margin: 10px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.profile-note { margin: 18px 0 0; padding: 10px 12px; background: var(--soft); border-left: 2px solid #a8b8bf; color: #51646d; font-size: .8rem; line-height: 1.4; }
.inline-options { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.inline-options summary, .entry-extra summary { cursor: pointer; color: #315c70; font-size: .82rem; font-weight: 700; }
.inline-options summary span, .entry-extra summary span { color: var(--muted); font-weight: 400; }
.inline-options > .field-grid, .entry-extra > .entry-grid { margin-top: 16px; }
.full-field { margin-top: 16px; }

.repeat-list { display: grid; gap: 12px; }
.entry { border: 1px solid var(--line); border-radius: 6px; padding: 16px; background: #fff; }
.entry-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 14px; }
.entry-title { color: var(--ink); font-size: .84rem; font-weight: 700; }
.remove-entry { border: 0; padding: 3px 0; background: transparent; color: #8b493e; font-size: .8rem; text-decoration: underline; text-underline-offset: 2px; }
.entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.entry-grid .span-2 { grid-column: span 2; }
.entry-grid .span-4 { grid-column: span 4; }
.deduction-explanation { display: flex; flex-wrap: wrap; gap: 4px 9px; align-items: baseline; margin: 16px 0 0; padding: 11px 13px; border-left: 3px solid var(--accent); background: var(--soft); color: #405661; font-size: .88rem; line-height: 1.45; }
.deduction-explanation strong { color: var(--ink); }
.method-switch { border: 0; padding: 0; background: transparent; color: #215d78; font-size: .82rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.entry-extra { margin-top: 15px; }
.entry-extra[open] { padding-top: 13px; border-top: 1px solid var(--line); }
.entry-help { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.add-button { width: 100%; min-height: 43px; margin-top: 12px; border: 1px solid #a8bac0; border-radius: 5px; background: #fff; color: #285268; font-size: .84rem; font-weight: 700; }
.add-button:hover { background: #f5f9fa; }
.add-button span { padding-right: 4px; font-size: 1rem; }

.result-column { position: sticky; top: 18px; min-width: 0; }
.result-card { border: 1px solid #cbd8dc; border-top: 3px solid var(--ink); border-radius: 7px; background: #fff; overflow: hidden; }
.result-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 19px 19px 0; }
.result-kicker { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .065em; }
.status-pill { color: #8b611e; font-size: .76rem; }
.status-pill.ready { color: #2e6950; }
.empty-result { padding: 28px 19px 34px; }
.empty-icon { display: none; }
.empty-result strong { display: block; color: var(--ink); font-size: .95rem; }
.empty-result p { margin: 8px 0 0; color: var(--muted); font-size: .83rem; line-height: 1.5; }
.main-price { padding: 22px 19px 16px; }
.main-price small, .with-vat small { display: block; color: var(--muted); font-size: .79rem; font-weight: 650; letter-spacing: .025em; }
.main-price strong { display: block; margin: 6px 0 4px; color: var(--ink); font-size: 2.15rem; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.main-price > span, .with-vat > span { color: var(--muted); font-size: .78rem; }
.with-vat { margin: 0 19px; padding: 14px 0 2px; border-top: 1px solid var(--line); }
.with-vat > div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.with-vat strong { color: var(--ink); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.payable-summary { margin: 14px 19px 0; padding: 10px 11px; background: var(--soft); color: #385362; font-size: .78rem; line-height: 1.4; }
.mobile-details { display: none; }
.rule { height: 1px; margin: 17px 19px; background: var(--line); }
.breakdown { display: grid; gap: 11px; padding: 0 19px; }
.breakdown > div, .secondary-result > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.breakdown span, .secondary-result span { color: #556a74; font-size: .82rem; }
.breakdown b, .secondary-result b { color: #263e4b; font-size: .82rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.breakdown .total-row { padding-top: 12px; border-top: 1px solid var(--line); }
.breakdown .total-row span, .breakdown .total-row b { color: var(--ink); font-weight: 700; }
.secondary-result { display: grid; gap: 10px; margin: 18px 19px 0; padding: 13px 0 0; border-top: 1px solid var(--line); }
.result-warning { margin: 15px 19px 0; padding: 11px; background: #fff5e9; color: #7b5421; font-size: .8rem; line-height: 1.4; }
.error-list { margin: 18px 19px 0; padding: 12px; background: #fff4ef; color: #873d31; font-size: .8rem; line-height: 1.45; }
.error-list ul { margin: 6px 0 0; padding-left: 17px; }
.result-footer { margin-top: 20px; padding: 12px 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; line-height: 1.45; }
.result-footer b { font-weight: 700; }
.formula-card { margin: 12px 3px 0; color: #6c7e86; font-size: .77rem; line-height: 1.5; }
.site-footer { max-width: 1260px; margin: auto; padding: 0 24px 28px; display: flex; justify-content: space-between; gap: 12px; color: #71838b; font-size: .75rem; }
.print-sheet { display: none; }
[hidden] { display: none !important; }
.module-nav { display: flex; gap: 4px; padding: 4px; margin: 0 0 25px; border: 1px solid var(--line); border-radius: 7px; background: #fff; width: fit-content; max-width: 100%; overflow-x: auto; }
.module-nav button { border: 0; border-radius: 4px; background: transparent; padding: 10px 16px; color: #4c636d; font: inherit; font-size: .88rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.module-nav button.selected { background: var(--ink); color: #fff; }
.workflow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0 0 19px; }
.workflow-actions .button { font-size: .87rem; }
.workflow-actions #resetButton { margin-left: auto; }
.secondary-actions { position: relative; align-self: center; }
.secondary-actions summary { padding: 10px; color: var(--ink); font-size: .87rem; font-weight: 650; cursor: pointer; }
.secondary-actions > div { position: absolute; top: 100%; left: 0; z-index: 5; display: grid; gap: 5px; min-width: 215px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; box-shadow: 0 8px 25px #17324425; }
.secondary-actions .button { width: 100%; text-align: left; }
.secondary-actions label { display: grid; gap: 5px; padding: 6px; color: #556c76; font-size: .75rem; }
.secondary-actions select { min-height: 38px; border: 1px solid var(--line); border-radius: 4px; padding: 5px; background: #fff; }
.module-panel { min-height: 350px; padding: 24px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.module-head h1 { margin: 0 0 6px; font-size: 1.55rem; color: var(--ink); }
.module-head p { margin: 0 0 22px; color: var(--muted); font-size: .86rem; }
.record-list { display: grid; gap: 10px; margin-top: 14px; }
.record-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfc; }
.record-row strong, .record-row span, .record-row small { display: block; }
.record-row strong { color: var(--ink); font-size: .86rem; }
.record-row strong em { margin-left: 7px; color: #57727d; font-size: .7rem; font-style: normal; font-weight: 500; }
.record-row span { margin-top: 4px; font-size: .81rem; }
.record-row small { margin-top: 4px; color: var(--muted); font-size: .73rem; line-height: 1.35; }
.record-row button { white-space: nowrap; }
.save-message { margin: 0 0 20px; padding: 11px 14px; border-left: 3px solid #477865; background: #f0f7f2; color: #315641; font-size: .82rem; }
.save-message.error { border-color: #b46951; background: #fff4ee; color: #8c3d2c; }
.current-record { margin: 7px 0 0; color: var(--muted); font-size: .84rem; }
.current-record:empty { display: none; }
.comparison-panel { margin-bottom: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow-x: auto; }
.comparison-panel h2 { margin: 0 0 12px; font-size: 1rem; }
.comparison-panel table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.comparison-panel th, .comparison-panel td { padding: 9px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.comparison-panel th:first-child, .comparison-panel td:first-child { text-align: left; }
.liquidation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 18px; align-items: start; }
.liquidation-form { display: block; }
.liquidation-result { border-top: 3px solid var(--ink); }
.liquidation-source { margin: 9px 0 20px; color: var(--muted); font-size: .9rem; }
.liquidation-metrics { display: grid; gap: 11px; margin: 16px 0; }
.liquidation-metrics > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.liquidation-metrics span { color: var(--muted); font-size: .86rem; }
.liquidation-metrics b { color: var(--ink); font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.liquidation-total { display: grid; gap: 5px; padding: 16px 0; border-top: 1px solid var(--line); }
.liquidation-total span { color: var(--muted); font-size: .83rem; font-weight: 650; }
.liquidation-total strong { color: var(--ink); font-size: 1.48rem; font-variant-numeric: tabular-nums; }
.liquidation-total.final { border-bottom: 1px solid var(--line); }
.preview-dialog, .template-dialog { border: 0; border-radius: 8px; box-shadow: 0 15px 50px #172e3d44; }
.preview-dialog::backdrop, .template-dialog::backdrop { background: #10232bd1; }
.preview-dialog { width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; overflow: auto; background: #e9eeef; }
.preview-toolbar, .preview-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; background: #fff; }
.preview-toolbar { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); }
.preview-toolbar button { border: 0; background: transparent; color: #375a69; font: inherit; cursor: pointer; }
.preview-page { width: min(210mm, calc(100% - 24px)); min-height: 280mm; margin: 14px auto; padding: 10mm; box-shadow: 0 4px 18px #1c33302b; background: #fff; color: #111; font: 8pt/1.3 Arial,sans-serif; }
.preview-page .print-head { border-bottom: 1.5px solid #111; padding-bottom: 8px; margin-bottom: 12px; }
.preview-page .print-brand { font-size: 11pt; font-weight: 700; text-align: right; }
.preview-page .print-brand span { display: block; margin-top: 2px; color: #42505a; font-size: 8pt; letter-spacing: .08em; }
.preview-page .print-head h1 { margin: 8px 0 0; font-size: 15pt; text-align: center; }
.preview-page .print-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; margin-bottom: 12px; }
.preview-page .print-meta p { margin: 0; }
.preview-page h2 { margin: 12px 0 5px; padding-bottom: 4px; border-bottom: 1px solid #111; font-size: 9pt; }
.preview-page table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.preview-page th, .preview-page td { border-bottom: 1px solid #d0d0d0; padding: 3px 5px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.preview-page th:last-child, .preview-page td:last-child { text-align: right; }
.preview-page .print-condition { margin: 3px 0; }
.preview-page .print-totals { margin-top: 12px; border-top: 1.5px solid #111; }
.preview-page .print-totals p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 4px 1px; border-bottom: 1px solid #bdbdbd; }
.preview-page .print-totals .final { font-size: 11pt; font-weight: 700; }
.preview-page .print-note { margin-top: 9px; color: #505050; font-size: 7pt; }
.template-dialog { width: min(520px, calc(100vw - 24px)); padding: 24px; }
.template-dialog h2 { margin: 0 0 7px; font-size: 1.25rem; }
.template-dialog p { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.template-dialog label { display: grid; gap: 6px; margin: 13px 0; color: #435f6b; font-size: .8rem; font-weight: 650; }
.template-dialog input, .template-dialog textarea { width: 100%; padding: 10px; border: 1px solid #b8c6cb; border-radius: 4px; font: inherit; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

@media (max-width: 1060px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .liquidation-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-grid .span-4 { grid-column: span 2; }
  .field-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .liquidation-layout { display: flex; flex-direction: column; }
  .liquidation-layout > * { width: 100%; }
  .liquidation-result { order: -1; }
  .module-nav { display: grid; grid-template-columns: 1fr 1fr; width: 100%; overflow: visible; }
  .module-nav button { padding: 10px 8px; font-size: .82rem; }
  .workflow-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-actions > .button { min-width: 0; }
  .workflow-actions #saveButton { grid-column: 1 / -1; }
  .workflow-actions #resetButton { margin-left: 0; }
  .workflow-actions .secondary-actions { grid-column: 1 / -1; }
  .workflow-actions .secondary-actions summary { padding-left: 0; }
  .record-row { align-items: flex-start; }
  .topbar { padding: 12px 16px; }
  .topbar-right { font-size: .7rem; white-space: nowrap; }
  .workspace { padding: 22px 14px 42px; }
  .page-heading { display: block; }
  .layout { display: flex; flex-direction: column; }
  .result-column { order: -1; position: static; width: 100%; }
  form { width: 100%; }
  .result-card { border-top-width: 2px; }
  .empty-result { padding: 15px 19px 20px; }
  .empty-result p { display: none; }
  .result-column:not(.has-result) .result-heading { padding: 11px 15px 0; }
  .result-column:not(.has-result) .empty-result { padding: 7px 15px 12px; }
  .result-column:not(.has-result) .result-footer, .result-column:not(.has-result) .formula-card { display: none; }
  .main-price { padding: 14px 19px 12px; }
  .main-price strong { font-size: 1.85rem; }
  .with-vat { padding-top: 11px; }
  .mobile-details { display: block; width: calc(100% - 38px); margin: 14px 19px 0; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: #2a5a70; text-align: left; font-size: .78rem; font-weight: 700; }
  .rule, .breakdown, .secondary-result { display: none; }
  .result-card.expanded .rule { display: block; }
  .result-card.expanded .breakdown, .result-card.expanded .secondary-result { display: grid; }
  .result-footer { margin-top: 12px; }
  .panel { padding: 20px 17px; }
  .collapsible { padding: 0; }
  .collapsible > summary { padding: 16px 42px 16px 17px; }
  .collapsible > summary::after { right: 16px; }
  .panel-body { padding: 17px; }
  .site-footer { display: block; padding: 0 14px 28px; }
  .site-footer span { display: block; margin-top: 5px; }
}
@media (max-width: 490px) {
  .module-nav { gap: 1px; }
  .module-nav button { padding: 10px 8px; }
  .record-row { display: block; }
  .record-row button { margin-top: 10px; }
  .preview-page { padding: 8mm; font-size: 7pt; }
  .preview-page .print-meta { grid-template-columns: 1fr; }
  .brand-copy strong { font-size: .73rem; }
  .page-heading h1 { font-size: 1.65rem; }
  .field-grid.two { grid-template-columns: 1fr; }
  .field-grid.four { gap: 14px; }
  .entry-grid { grid-template-columns: 1fr; }
  .entry-grid .span-2, .entry-grid .span-4 { grid-column: span 1; }
  .quick-guide-body table, .quick-guide-body tbody, .quick-guide-body tr, .quick-guide-body td { display: block; }
  .quick-guide-body thead { display: none; }
  .quick-guide-body tr { margin: 10px 0; border: 1px solid var(--line); }
  .quick-guide-body td { border: 0; border-bottom: 1px solid var(--line); }
  .quick-guide-body td:last-child { border-bottom: 0; }
}

.calculation-help { margin: 15px 0 0; padding: 12px 14px; background: #f2f5f7; border-left: 3px solid #526b7a; border-radius: 3px; color: #273e4d; font-size: .88rem; line-height: 1.65; overflow-wrap: anywhere; }
.entry input:disabled, .entry select:disabled { background: #f2f5f7; color: #465e6c; opacity: 1; }
.entry-grid .field > span { line-height: 1.5; }
@media (max-width: 700px) { .field input, .field select, .field textarea { font-size: 16px; } }
@media (min-width: 491px) and (max-width: 1100px) { .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .entry-grid .span-4 { grid-column: span 2; } }
/* Screen presentation. Document typography remains in its print rules. */
@media screen {
  .topbar { min-height: 78px; border-bottom: 3px solid #b7c7d7; }
  .brand-copy strong { font-weight: 600; font-size: 1rem; letter-spacing: .02em; }
  .brand-copy span { color: #dae3ee; font-size: .88rem; }
  .workspace { max-width: 1320px; padding-top: 26px; }
  .page-heading h1 { font-weight: 600; letter-spacing: -.025em; }
  .intro { color: var(--muted); font-size: 1rem; }
  .module-nav { border-radius: 5px; border-color: var(--line); margin-bottom: 26px; }
  .module-nav button { font-size: .94rem; font-weight: 500; min-height: 46px; }
  .module-nav button.selected { background: var(--ink); color: #fff; }
  .button { font-weight: 500; border-radius: 5px; }
  .layout, .liquidation-layout { gap: 24px; }
  .panel { border-radius: 7px; box-shadow: 0 2px 4px #20354d06; padding: 24px; }
  .collapsible { padding: 0; }
  .panel-body { padding: 24px; }
  .section-number { color: var(--ink); background: #edf1f6; min-width: 30px; padding: 3px 5px; border-radius: 3px; text-align: center; font-size: .8rem; }
  .section-title h2, .section-copy strong { font-weight: 600; font-size: 1.12rem; }
  .section-title p, .section-copy small { font-size: .91rem; }
  .entry { border-color: #cdd7e2; padding: 20px; border-radius: 5px; }
  .entry-head { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #e5eaf0; }
  .entry-title { font-size: .96rem; font-weight: 600; }
  .entry-grid, .field-grid { row-gap: 20px; column-gap: 18px; }
  #metalsList .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #metalsList .entry-grid .span-4 { grid-column: span 2; }
  #metalsList .entry-extra .span-2 { grid-column: span 1; }
  .field > span { font-size: .91rem; font-weight: 500; color: #293f56; }
  .field input, .field select, .field textarea { min-height: 46px; font-size: 16px; border-color: #b8c5d3; border-radius: 4px; padding: 10px 12px; }
  .field input::placeholder, .field textarea::placeholder { color: #718195; }
  .field input:focus, .field select:focus, .field textarea:focus { border-color: #355b7c; outline-color: #dbe6f1; }
  .field-example, .field .field-example, .template-dialog .field-example { display: block; font-size: .81rem; font-weight: 400; line-height: 1.5; color: #566779; margin-top: 2px; overflow-wrap: anywhere; }
  .template-dialog .field-example { margin-top: 5px; }
  .field .check-line input { min-height: 16px; padding: 0; }
  .field .check-line { font-size: .84rem; }
  .deduction-explanation, .calculation-help { background: #f0f4f8; border-left-color: #355b7c; color: #2a4058; font-size: .92rem; }
  .entry-extra summary, .inline-options summary { color: #355b7c; font-weight: 500; font-size: .9rem; }
  .entry-help, .field-help { font-size: .86rem; color: var(--muted); }
  .add-button { color: #294863; border-color: #91a8bd; font-weight: 500; min-height: 46px; font-size: .93rem; }
  .add-button:hover { background: #eef3f8; }
  .result-card { border-color: #bccbd9; border-top-color: var(--ink); border-radius: 6px; }
  .main-price strong { font-weight: 600; letter-spacing: -.02em; font-size: 2.35rem; }
  .breakdown, .secondary-result { font-size: .88rem; }
  .result-heading .result-kicker, .main-price small, .with-vat small { font-weight: 500; color: #415970; }
  .workflow-actions { margin-bottom: 20px; gap: 9px; }
}
@media screen and (max-width: 760px) {
  .topbar { padding: 15px 18px; min-height: 74px; }
  .brand-copy strong { font-size: .85rem; }
  .workspace { padding: 22px 14px 40px; }
  .panel { padding: 20px 17px; }
  .collapsible { padding: 0; }
  .panel-body { padding: 18px 16px; }
  .entry { padding: 18px 15px; }
  .module-nav button { font-size: .87rem; }
  .main-price strong { font-size: 2rem; }
  .field-example, .field .field-example { font-size: 13px; }
  .layout, .liquidation-layout { gap: 16px; }
}
@media screen and (max-width: 490px) {
  #metalsList .entry-grid { grid-template-columns: 1fr; }
  #metalsList .entry-grid .span-2, #metalsList .entry-grid .span-4 { grid-column: span 1; }
}
@page { size: A4; margin: 0; }
@media print {
  dialog, .save-message { display: none !important; }
  html, body, .print-sheet { background: #fff !important; }
  body { color: #111; }
  .topbar, .workspace, .site-footer { display: none !important; }
  .print-sheet { display: block !important; padding: 10mm; font-family: Arial, sans-serif; color: #111; font-size: 8pt; line-height: 1.3; }
  .print-head { border-bottom: 1.5px solid #111; padding-bottom: 8px; margin-bottom: 12px; }
  .print-brand { font-size: 11pt; font-weight: 700; letter-spacing: .025em; text-align: right; }
  .print-brand span { display: block; margin-top: 2px; color: #42505a; font-size: 8pt; letter-spacing: .08em; }
  .print-head h1 { margin: 8px 0 0; font-size: 15pt; text-align: center; }
  .print-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; margin-bottom: 12px; }
  .print-meta p { margin: 0; }
  .print-meta b { display: inline-block; min-width: 75px; }
  .print-sheet h2 { margin: 12px 0 5px; padding-bottom: 4px; border-bottom: 1px solid #111; font-size: 9pt; }
  .print-sheet table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .print-sheet thead { display: table-header-group; }
  .print-sheet tr { break-inside: avoid; }
  .print-sheet th, .print-sheet td { border-bottom: 1px solid #d0d0d0; padding: 3px 5px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
  .print-sheet th { border-bottom: 1px solid #111; }
  .print-sheet th:last-child, .print-sheet td:last-child { text-align: right; white-space: nowrap; }
  .print-sheet table:not(.valuation) th:last-child, .print-sheet table:not(.valuation) td:last-child { width: 32%; white-space: normal; }
  .print-sheet .valuation th:first-child, .print-sheet .valuation td:first-child { width: 31%; }
  .print-sheet .valuation th:last-child, .print-sheet .valuation td:last-child { width: 22%; }
  .print-sheet .print-totals { margin-top: 12px; border-top: 1.5px solid #111; break-inside: avoid; }
  .print-sheet .print-totals p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 4px 1px; border-bottom: 1px solid #bdbdbd; }
  .print-sheet .print-totals .final { font-size: 11pt; font-weight: 700; border-bottom: 1.5px solid #111; }
  .print-sheet .print-totals .tax { color: #333; }
  .print-sheet .print-condition { margin: 3px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .print-sheet .print-note { margin-top: 9px; color: #505050; font-size: 7pt; }
}
