/* Industrial workbench: cool paper, clear hierarchy, material identity first. */
:root {
  /* Arial handles Latin/numbers; Chinese uses the bundled Source Han Sans SC Medium. */
  --font-ui: Arial, "BOM Source Han Sans SC", "Source Han Sans SC", "思源黑体", sans-serif;
  --paper: #eef2f6; --surface: #ffffff; --ink: #1f2d3d;
  --line: #ccd5df; --steel: #245eaa; --navy: #243441;
  --navy-deep: #203943; --muted: #4b5b6c;
  --amber: #996b13; --amber-soft: #fff8e9;
  --red: #a93535; --red-soft: #fff1f0;
  --green: #23694d; --green-soft: #edf7f1;
}
* { box-sizing: border-box; }
body { margin: 0; font: 500 16px/1.55 var(--font-ui); color: var(--ink); background: var(--paper); }
a { color: var(--steel); text-decoration: none; }
a:hover { color: #1d4f91; text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { font-size: 26px; line-height: 1.35; font-weight: 500; }
h2 { font-size: 18px; line-height: 1.5; font-weight: 500; }
h3 { font-size: 18px; font-weight: 500; }
p { margin: 0 0 12px; }
.skip-link { position: fixed; top: -80px; left: 20px; background: white; padding: 10px 18px; z-index: 100; }
.skip-link:focus { top: 8px; }
.topbar { position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px 0 25px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { width: 31px; height: 31px; color: var(--steel); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 21px; font-weight: 500; }
.brand small { color: var(--muted); font-size: 14px; margin-top: 0; }
.topbar-meta { display: flex; align-items: center; gap: 20px; font-size: 15px; color: var(--muted); }
.topbar-meta form { margin: 0; }
.environment { color: var(--steel); padding: 3px 10px; background: #edf3fb; border-radius: 4px; font-size: 15px; }
.link-button { border: 0; background: transparent; color: var(--muted); padding: 5px 0; }
.menu-toggle { display: none; border: 1px solid var(--line); background: white; border-radius: 5px; padding: 5px 12px; }
.shell { display: grid; grid-template-columns: 214px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.sidebar { position: sticky; top: 68px; height: calc(100vh - 68px); background: white; border-right: 1px solid var(--line); padding: 24px 16px; }
.nav-caption { display: block; padding: 0 13px 9px; color: var(--muted); font-size: 14px; }
.nav-caption-secondary { margin-top: 28px; }
.sidebar a { display: flex; align-items: center; gap: 12px; padding: 10px 13px; margin-bottom: 4px; color: #4b5b6c; border-radius: 5px; font-weight: 500; }
.sidebar a:hover { background: #f3f7f8; text-decoration: none; }
.sidebar a.active { background: #e6eef9; color: var(--steel); }
.nav-symbol { display: inline-flex; width: 19px; align-items: center; justify-content: center; font-family: "Segoe UI Symbol", sans-serif; font-size: 18px; font-weight: 500; opacity: .8; }
.sidebar-note { margin: 40px 13px 0; color: #4b5b6c; font-size: 14px; line-height: 1.9; }
.content { width: 100%; max-width: 1600px; min-width: 0; padding: 27px 36px 48px; }
.preview-notice { display: flex; gap: 12px; align-items: baseline; margin: -3px 0 24px; color: #5d737d; font-size: 15px; }
.preview-notice strong { flex: 0 0 auto; color: var(--steel); }
.breadcrumbs { display: flex; gap: 9px; align-items: center; color: #4b5b6c; font-size: 15px; margin: 0 0 12px; }
.breadcrumbs a { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 23px; }
.page-head h1 { margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; font-size: 15px; max-width: 70ch; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.actions form { margin: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 39px; border: 1px solid transparent; border-radius: 5px; padding: 8px 16px; font-weight: 500; font-size: 16px; text-align: center; line-height: 1.45; }
.button:hover { text-decoration: none; }
.button.primary { background: var(--steel); border-color: var(--steel); color: white; }
.button.primary:hover { background: #1d4f91; border-color: #1d4f91; }
.button.secondary { background: white; border-color: #c6d3db; color: var(--ink); }
.button.secondary:hover, .button.ghost:hover { background: #eef4f6; }
.button.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.button.wide { width: 100%; }
.text-action { border: 0; background: transparent; color: var(--steel); font-weight: 500; padding: 0; }
.action-menu { position: relative; }
.action-menu > summary { list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 15; width: 205px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: white; box-shadow: 0 6px 18px #24344112; }
.action-menu-panel a { display: block; padding: 8px; }
.ledger { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; margin-bottom: 22px; min-width: 0; overflow-x: auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; padding: 15px 21px; border-bottom: 1px solid #e8eef1; }
.section-head h2 { margin: 0; font-weight: 500; }
.section-head span { font-size: 15px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; padding: 11px 20px; background: #f7f9fa; border-bottom: 1px solid var(--line); color: #4b5b6c; font-size: 15px; font-weight: 500; white-space: nowrap; }
td { padding: 13px 20px; border-bottom: 1px solid #e8eef1; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f6fafb; }
.table-scroll { max-width: 100%; overflow: auto; }
.table-scroll table { min-width: 680px; }
.result-table .table-scroll { max-height: 58vh; }
.result-table thead th { position: sticky; top: 0; z-index: 2; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-ui); white-space: nowrap; }
.quantity-total { color: var(--steel); font-weight: 500; }
.code-link, .material-code, code { font-variant-numeric: tabular-nums; }
.code-link { font-weight: 500; }
.material-code { color: var(--muted); font-size: 15px; display: block; }
.material-name { font-size: 16px; font-weight: 500; color: var(--ink); }
.material-function { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.path-cell { color: #4b5b6c; font-size: 14px; min-width: 230px; max-width: 460px; overflow-wrap: anywhere; }
.empty { padding: 35px 20px; text-align: center; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 4px; background: #eef2f4; color: #4b5b6c; white-space: nowrap; font-size: 14px; }
.status-published, .status-applied, .status-verified, .status-active { background: var(--green-soft); color: var(--green); }
.status-draft, .status-preflighted, .status-pending, .status-review { background: var(--amber-soft); color: var(--amber); }
.status-blocked, .status-blocker, .status-inactive { background: var(--red-soft); color: var(--red); }
.status.large { padding: 5px 10px; font-size: 15px; }
.library-tabs, .view-tabs { display: flex; gap: 25px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.library-tabs a, .view-tabs a { display: inline-flex; padding: 11px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; font-size: 16px; font-weight: 500; }
.library-tabs a:hover, .view-tabs a:hover { text-decoration: none; color: var(--steel); }
.library-tabs a.active, .view-tabs a[aria-selected="true"] { border-bottom-color: var(--steel); color: var(--steel); }
.view-tabs a span { margin-left: 7px; font-size: 14px; font-weight: 500; color: #4b5b6c; }
.filterbar { display: grid; grid-template-columns: minmax(160px, 1fr) 170px 190px auto; gap: 10px; align-items: center; padding: 0; margin-bottom: 20px; }
.searchbar { display: flex; gap: 10px; width: min(680px, 100%); margin-bottom: 22px; }
.searchbar input { min-width: 0; flex: 1; }
.searchbar .button { flex: 0 0 auto; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid #c6d3db; border-radius: 5px; color: var(--ink); background: white; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #4b5b6c; font-size: 15px; }
input[type="checkbox"], input[type="radio"] { width: auto; }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid #245eaa; outline-offset: 3px; }
.pagination { display: flex; gap: 18px; align-items: center; justify-content: flex-end; font-size: 15px; color: var(--muted); margin: 18px 0; }
.pagination a { padding: 5px 12px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.table-footer { padding: 11px 20px; color: var(--muted); font-size: 14px; border-top: 1px solid #e8eef1; }
.notice, .warning-banner, .success-banner, .decision-bar { display: flex; align-items: baseline; gap: 12px; padding: 11px 15px; border: 1px solid #ead9ae; border-radius: 5px; margin-bottom: 20px; font-size: 15px; background: var(--amber-soft); color: var(--amber); }
.notice strong, .warning-banner strong, .success-banner strong { flex: 0 0 auto; }
.notice p, .notice span, .warning-banner span, .success-banner span { color: #776b52; margin: 0; }
.success-banner, .decision-bar { background: var(--green-soft); border-color: #cbe0d4; color: var(--green); }
.success-banner span, .decision-bar span { color: var(--muted); }
.decision-bar { justify-content: space-between; }
.decision-bar.blocked { background: var(--red-soft); border-color: #edc8c5; color: var(--red); }
.decision-bar div, .warning-banner, .success-banner { min-width: 0; }
.decision-bar span { display: block; }
.messages { margin-bottom: 20px; }
.message { padding: 11px 15px; border: 1px solid #cadde2; border-radius: 5px; background: #edf5f7; margin-bottom: 8px; font-size: 15px; }
.message.success { border-color: #cbe0d4; background: var(--green-soft); }
.message.error { border-color: #edc8c5; background: var(--red-soft); }
.selection-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin: 0 0 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.selection-strip > div { display: flex; gap: 9px; align-items: baseline; font-size: 15px; }
.selection-strip span { color: var(--muted); font-size: 15px; }
.selection-strip strong { font-weight: 500; }
.selection-strip .set-count { margin-left: auto; }
.identity-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); background: white; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 22px; }
.identity-strip div { padding: 13px 18px; }
.identity-strip span { display: block; color: var(--muted); font-size: 14px; }
.identity-strip strong { display: block; margin-top: 4px; font-size: 14px; }
.pack-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 15px; }
.pack-toolbar select { width: 180px; }
.pack-toolbar .pack-note { margin-left: auto; color: var(--muted); }
.pack-workspace { display: grid; grid-template-columns: 265px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 7px; background: white; overflow: hidden; }
.pack-picker { display: none; background: #f9fbfc; border-right: 1px solid var(--line); max-height: 62vh; overflow-y: auto; padding: 8px; }
.js .pack-picker { display: block; }
.pack-select { display: grid; grid-template-columns: 1fr auto; width: 100%; gap: 4px 12px; padding: 13px 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; text-align: left; color: var(--ink); margin-bottom: 2px; }
.pack-select:hover { background: #eef4f6; }
.pack-select[aria-pressed="true"] { border-color: #245eaa; background: #e6eef9; }
.pack-select strong { font-size: 15px; font-weight: 500; line-height: 1.5; }
.pack-select small { font-size: 14px; color: var(--muted); }
.pack-select .pack-count { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--steel); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pack-content { min-width: 0; }
.packing-card { padding: 0; min-width: 0; }
.packing-card h3 { margin: 0 0 5px; }
.pack-heading { padding: 19px 23px; border-bottom: 1px solid var(--line); }
.pack-heading p { font-size: 15px; color: var(--muted); margin: 0; }
.pack-heading strong { color: var(--steel); }
.packing-card .table-scroll { max-height: 48vh; }
.packing-card details { margin: 16px 22px; font-size: 14px; color: var(--muted); }
.pack-mobile-select { display: none; }
.config-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 26px; }
.configurator { min-width: 0; }
.config-section { background: white; border: 1px solid var(--line); border-radius: 7px; margin-bottom: 20px; overflow: hidden; }
.config-fields { padding: 18px 22px; }
.config-dimension { border: 0; margin: 0; padding: 20px 22px; border-bottom: 1px solid #e8eef1; }
.config-dimension:last-child { border-bottom: 0; }
.config-dimension legend { float: left; width: 100%; font-size: 16px; font-weight: 500; margin-bottom: 12px; padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; clear: both; }
.choice { cursor: pointer; position: relative; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice span { display: block; min-width: 66px; border: 1px solid #c6d3db; border-radius: 5px; padding: 9px 15px; background: white; color: var(--ink); font-size: 16px; text-align: center; }
.choice:hover span { border-color: var(--steel); }
.choice input:checked + span { border-color: var(--steel); background: #e6eef9; color: var(--steel); font-weight: 500; box-shadow: inset 0 0 0 1px var(--steel); }
.choice input:focus-visible + span { outline: 2px solid var(--steel); outline-offset: 3px; }
.option-row { display: grid; grid-template-columns: minmax(0, 1fr) 115px; align-items: center; gap: 18px; padding: 16px 22px; border-bottom: 1px solid #e8eef1; }
.option-row:last-child { border: 0; }
.option-row strong, .option-row small { display: block; }
.option-row strong { font-size: 16px; font-weight: 500; }
.option-row small { color: var(--muted); font-size: 14px; margin-top: 2px; }
.option-row input { text-align: right; }
.field label { display: block; font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.field small, .field-error { display: block; font-size: 15px; margin-top: 5px; color: var(--muted); }
.field-error { color: var(--red) !important; }
.field.compact { max-width: 155px; }
.fixed-summary ul { list-style: none; margin: 0; padding: 10px 22px 18px; }
.fixed-summary li { display: flex; gap: 12px; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.fixed-summary details { padding: 18px 22px; color: var(--muted); font-size: 15px; }
.fixed-summary details ul { padding: 8px 0 0; }
.configuration-summary { position: sticky; top: 96px; background: white; border: 1px solid #bed4d5; border-radius: 7px; padding: 23px; }
.configuration-summary h2 { margin: 0 0 4px; }
.configuration-summary .summary-product { color: var(--muted); font-size: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.configuration-summary dl { margin: 20px 0; }
.configuration-summary dl > div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 11px; font-size: 16px; }
.configuration-summary dt { color: var(--muted); }
.configuration-summary dd { margin: 0; text-align: right; font-weight: 500; }
.configuration-summary .summary-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.config-submit { padding: 20px 0; }
.form-sheet { max-width: 950px; padding: 26px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.form-grid p { padding: 0 22px; }
.field.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.upload-layout, .two-column { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); gap: 24px; }
.two-column { grid-template-columns: 1fr 1fr; }
.upload-box { background: white; border: 1px dashed #9cb9bd; border-radius: 7px; padding: 27px; }
.upload-box h2, .rules-panel h2 { margin: 8px 0; }
.upload-box p { color: var(--muted); font-size: 15px; }
.upload-box input[type="file"] { margin: 14px 0; }
.upload-index, .eyebrow { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.rules-panel { padding: 24px; background: #e6eef9; border-radius: 7px; }
.rules-panel ol { padding-left: 20px; font-size: 15px; color: #4b5b6c; }
.rules-panel li { padding: 6px 0; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: white; border-radius: 7px; margin-bottom: 24px; }
.metrics div { padding: 18px 22px; }
.metrics span { display: block; font-size: 15px; color: var(--muted); }
.metrics strong { display: block; color: var(--ink); margin-top: 5px; font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.metrics .metric-alert strong { color: var(--amber); }
.metrics.compact { grid-template-columns: repeat(3, 1fr); }
.metrics.compact.four { grid-template-columns: repeat(4, 1fr); }
.process-line { display: flex; gap: 12px; align-items: center; margin-top: 28px; font-size: 14px; color: var(--muted); }
.process-line i { height: 1px; background: var(--line); flex: 1; }
.calculation-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 23px; background: #e6eef9; border-radius: 7px; margin-bottom: 20px; }
.calculation-panel h2 { margin-top: 0; }
.calculation-panel p { font-size: 15px; color: var(--muted); }
.inline-form { display: grid; grid-template-columns: 100px 1fr; gap: 10px; align-items: center; }
.inline-form .button { grid-column: 2; justify-self: start; }
.version-tag { font-size: 15px; background: #e6eef9; color: var(--steel); padding: 4px 8px; border-radius: 4px; }
.bom-path { font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.bom-path i { display: inline-block; width: 20px; height: 1px; background: var(--line); margin: 0 10px; }
.wizard-help { padding: 18px 22px; }
.wizard-help p { font-size: 15px; color: var(--muted); line-height: 1.8; }
.wizard table input { min-width: 95px; max-width: 180px; }
.wizard table input[type="checkbox"], .verification-item input { width: auto; min-width: auto; }
.verification-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; padding: 18px; }
.verification-item { display: block; margin: 8px 20px; }
.muted { color: var(--muted); }
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-panel { width: min(430px, calc(100vw - 32px)); background: white; border: 1px solid var(--line); border-radius: 8px; padding: 34px; }
.login-panel h1 { margin-bottom: 6px; }
.login-brand { margin-bottom: 25px; }
.stack-form { display: grid; gap: 16px; margin-top: 24px; }
.stack-form label { display: block; margin-bottom: 5px; }
@media (max-width: 1100px) {
 .content { padding: 25px; }
 .shell { grid-template-columns: 185px minmax(0, 1fr); }
 .config-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; }
 .filterbar { grid-template-columns: minmax(150px, 1fr) 145px 150px auto; }
 .pack-workspace { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 900px) {
 .topbar { height: 64px; padding: 0 20px; }
 .shell { display: block; min-height: calc(100vh - 64px); }
 .sidebar { position: fixed; left: 0; top: 64px; bottom: 0; width: 225px; height: calc(100vh - 64px); z-index: 25; overflow: auto; box-shadow: 12px 0 24px #24344114; }
 .js .sidebar { display: none; }
 .js .sidebar.is-open { display: block; }
 body:not(.js) .sidebar { position: static; width: auto; height: auto; box-shadow: none; }
 .menu-toggle { display: inline-block; }
 .content { padding: 23px; }
 .config-layout { grid-template-columns: minmax(0, 1fr); }
 .configuration-summary { position: static; }
 .two-column, .upload-layout, .calculation-panel { grid-template-columns: 1fr; }
 .filterbar { grid-template-columns: minmax(140px, 1fr) 1fr; }
 .filterbar input { grid-column: span 2; }
 .topbar-meta .user-name { display: none; }
 .preview-notice { margin-bottom: 20px; }
 .pack-toolbar .pack-note { display: none; }
}
@media (max-width: 620px) {
 .topbar { padding: 0 16px; }
 .brand strong { font-size: 18px; }
 .brand small { font-size: 14px; }
 .brand-mark { width: 26px; }
 .topbar-meta { gap: 12px; }
 .topbar-meta .environment, .topbar-meta form { display: none; }
 .content { padding: 20px 16px 32px; }
 .preview-notice { display: block; font-size: 14px; line-height: 1.6; margin-bottom: 19px; }
 .preview-notice strong { margin-right: 7px; }
 .preview-notice span { display: inline; }
 .page-head { display: block; margin-bottom: 20px; }
 .page-head h1 { font-size: 24px; margin-bottom: 6px; }
 .page-head > .actions, .page-head > .button { margin-top: 15px; }
 .page-head p { font-size: 15px; }
 .section-head { padding: 14px 17px; gap: 12px; align-items: baseline; flex-wrap: wrap; }
 .section-head h2 { font-size: 15px; }
 .section-head span { font-size: 14px; }
 .notice, .warning-banner, .success-banner { display: block; font-size: 14px; }
 .notice strong, .warning-banner strong, .success-banner strong { margin-right: 7px; }
 .notice span, .warning-banner span, .success-banner span { display: inline; }
 .selection-strip { gap: 7px 19px; padding: 13px 0; margin-bottom: 8px; }
 .selection-strip > div { font-size: 15px; gap: 7px; }
 .selection-strip .set-count { margin-left: 0; }
 .view-tabs, .library-tabs { gap: 20px; overflow-x: auto; overflow-y: hidden; margin-bottom: 17px; }
 .view-tabs a, .library-tabs a { font-size: 15px; }
 .view-tabs a span { display: none; }
 .result-table .table-scroll { max-height: 55vh; }
 th { padding: 10px 15px; }
 td { padding: 12px 15px; }
 .table-scroll table { min-width: 650px; }
 .pack-workspace { display: block; }
 .js .pack-picker { display: none; }
 .js .pack-mobile-select { display: block; width: 100%; margin-bottom: 14px; }
 .pack-toolbar { flex-wrap: wrap; gap: 8px; }
 .pack-toolbar select { width: auto; flex: 1; }
 .pack-heading { padding: 18px; }
 .pack-heading p { line-height: 1.8; }
 .config-dimension { padding: 18px; }
 .option-row { padding: 15px 18px; grid-template-columns: minmax(0, 1fr) 84px; gap: 13px; }
 .option-row input { padding: 8px; }
 .choice span { min-width: 60px; padding: 9px 12px; }
 .configuration-summary { padding: 20px; }
 .form-grid, .identity-strip { grid-template-columns: 1fr; }
 .field.span-2 { grid-column: span 1; }
 .form-sheet { padding: 20px; }
 .metrics, .metrics.compact, .metrics.compact.four { grid-template-columns: 1fr 1fr; }
 .metrics div { padding: 15px; }
 .process-line { display: none; }
 .inline-form { grid-template-columns: 1fr; }
 .inline-form .button { grid-column: 1; }
 .material-table thead, .product-table thead { display: none; }
 .material-table tbody, .material-table tr, .product-table tbody, .product-table tr { display: block; }
 .material-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 17px; gap: 9px 15px; border-bottom: 1px solid var(--line); }
 .material-table td { display: block; padding: 0; border: 0; font-size: 16px; text-align: left; }
 .material-table td::before { content: attr(data-label); display: block; font-size: 14px; color: var(--muted); margin-bottom: 3px; }
 .material-table td.material-identity { grid-column: span 2; margin-bottom: 3px; }
 .material-table td.empty { grid-column: span 2; }
 .material-table td.material-identity::before, .material-table td:last-child::before { display: none; }
 .material-table .cell-empty { display: none; }
 .material-table td:last-child { align-self: end; }
 .material-table tr:last-child { border: 0; }
 .product-table tr { padding: 19px; border-bottom: 1px solid var(--line); }
 .product-table td { display: block; border: 0; padding: 4px 0; font-size: 16px; }
 .product-table td:first-child { padding-bottom: 10px; }
 .product-table td:not(:first-child):not(:last-child)::before { content: attr(data-label); display: inline-block; width: 90px; color: var(--muted); font-size: 14px; }
 .product-table td:last-child { padding-top: 14px; }
 .responsive-table:not(.material-table):not(.product-table) { min-width: 650px; }
 .decision-bar { flex-wrap: wrap; }
 .action-menu-panel { left: 0; right: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
/* Site-wide confirmation baseline; preserves the library's approved sizes. */
body { font-synthesis: none; }
strong, b { font-weight: 500; }
button, input, select, textarea, .sidebar a, .text-action { font-size: 16px; }
.button { min-height: 42px; }
.page-head { margin-bottom: 18px; align-items: center; }
.page-head > div:first-child { min-width: 0; }
.page-head + .actions { margin-bottom: 14px; }
code { font-family: var(--font-ui); font-size: 14px; }
.content { padding: 22px 28px 32px; }
.section-head { min-height: 50px; padding: 10px 18px; background: #f7f9fb; }
.ledger, .form-sheet, .upload-box, .rules-panel, .metrics, .calculation-panel { border-radius: 6px; }
.form-grid { gap: 12px 20px; padding: 16px 18px; }
.form-grid p { margin: 0; padding: 0; min-width: 0; }
.form-grid p > label { display: block; margin-bottom: 6px; }
.helptext { font-size: 14px; color: var(--muted); display: block; margin-top: 5px; }
.errorlist { font-size: 14px; color: var(--red); padding-left: 20px; }
input[type=checkbox], input[type=radio] { min-height: 0; }
.result-table .table-scroll, .packing-card .table-scroll { max-height: none; }
.result-table thead th { position: static; }
.identity-strip { margin-top: 14px; }
.ledger > p { margin: 12px 18px; }
.ledger > form, .ledger > details { padding: 12px 18px; }
.review-banner { border: 1px solid #aabfdc; background: #edf3fb; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; color: #374151; }
.review-banner strong { display: block; color: #1d4f91; font-size: 16px; margin-bottom: 3px; }
.preview-notice { margin-bottom: 14px; font-size: 14px; }
.review-banner + .preview-notice { display: none; }
@media (max-width: 900px) { .content { padding: 20px; } .pack-toolbar .pack-note { display: block; margin-left: 0; font-size: 14px; } }
@media (max-width: 620px) { .content { padding: 16px; } .brand strong { font-size: 20px; } .brand small { font-size: 14px; } .page-head h1 { font-size: 25px; } .section-head h2 { font-size: 18px; } .view-tabs a, .library-tabs a { font-size: 16px; } .form-grid { padding: 14px; } }
@media print {
 @page { size: A4 landscape; margin: 12mm; }
 .topbar, .sidebar, .actions, .filterbar, .messages, .pagination, .view-tabs, .pack-toolbar, .pack-picker, .pack-mobile-select, .preview-notice, .skip-link, .review-banner { display: none !important; }
 .shell, .content, .pack-workspace { display: block; padding: 0; max-width: none; }
 body { background: white; font-size: 10pt; }
 [data-panel][hidden], [data-package][hidden] { display: block !important; }
 .ledger, .pack-workspace, .config-section { border: 0; box-shadow: none; border-radius: 0; }
 .table-scroll, .result-table .table-scroll, .packing-card .table-scroll { overflow: visible; max-height: none; }
 .table-scroll table, .responsive-table { min-width: 0 !important; }
 table { font-size: 9pt; }
 th, td { padding: 5px !important; }
 thead { display: table-header-group !important; }
 thead th { position: static !important; }
 .material-table tr, .product-table tr { display: table-row; }
 .material-table td, .product-table td { display: table-cell; }
 .material-table td::before, .product-table td::before { display: none !important; }
 .packing-card { break-inside: avoid; margin-bottom: 20px; }
 .configuration-summary { position: static; }
}
