:root {
  --navy: #132a44;
  --blue: #2368a2;
  --blue-soft: #eaf3f9;
  --canvas: #f3f6f8;
  --surface: #ffffff;
  --ink: #17212b;
  --muted: #627181;
  --line: #d8e0e7;
  --line-strong: #aebdca;
  --good: #18794e;
  --good-soft: #edf8f3;
  --warn: #9a5b13;
  --warn-soft: #fff7e8;
  --risk: #b42318;
  --risk-soft: #fff1f0;
  --sans: Aptos, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--canvas); color-scheme: light; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { min-height: 38px; padding: .55rem .92rem; border: 1px solid var(--blue); border-radius: 6px; background: var(--blue); color: #fff; font-size: .86rem; font-weight: 650; cursor: pointer; }
button:hover:not(:disabled) { background: #1c5788; border-color: #1c5788; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary { border-color: var(--line-strong); background: #fff; color: var(--navy); }
button.secondary:hover:not(:disabled) { border-color: #8093a3; background: #f8fafb; }
button:focus-visible, input:focus-visible, select:focus-visible, .upload-zone:focus-visible, .template-zone:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(35, 104, 162, .25); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
h1, h2, p, dl { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 10px; color: var(--navy); font-size: clamp(1.8rem, 3vw, 2.65rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.08; }
h2 { margin-bottom: 4px; color: var(--navy); font-size: 1.12rem; font-weight: 700; letter-spacing: -.012em; }
.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; }

.topbar { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 8px max(18px, calc((100vw - 1480px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); box-shadow: 0 2px 10px rgba(20, 42, 68, .04); backdrop-filter: blur(10px); }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 30px; border-radius: 4px; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .06em; }
.brand-divider { width: 1px; height: 30px; background: var(--line); }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { color: var(--navy); font-size: .9rem; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: .76rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border: 1px solid #b8daca; border-radius: 999px; background: var(--good-soft); color: var(--good); font-size: .78rem; font-weight: 650; }
.privacy-pill svg { width: 14px; height: 14px; }
.compact-button { min-height: 32px; padding: .35rem .65rem; }
.text-button { min-height: 28px; padding: 2px 4px; border: 0; background: transparent; color: var(--blue); font-size: .76rem; }
.text-button:hover:not(:disabled) { background: transparent; color: #174d78; text-decoration: underline; }

.page-shell { width: min(1480px, calc(100% - 36px)); margin: 0 auto; padding: 38px 0 56px; }
.page-intro { padding: 8px 2px 26px; }
.page-intro p { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: 1rem; }

.workflow-panel, .stage-panel, .result-panel, .checks-panel { border: 1px solid var(--line); background: var(--surface); box-shadow: 0 8px 28px rgba(19, 42, 68, .055); }
.workflow-panel { margin-bottom: 20px; }
.workflow-grid { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(250px, 1fr) minmax(300px, 1.2fr); }
.multi-workflow-grid { grid-template-columns: minmax(300px, .85fr) minmax(460px, 1.15fr); }
.workflow-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; min-width: 0; min-height: 145px; padding: 20px 22px 18px; color: inherit; }
.workflow-step + .workflow-step { border-left: 1px solid var(--line); }
.step-number { display: grid; place-items: center; align-self: start; width: 27px; height: 27px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.step-body { display: grid; align-content: start; gap: 8px; min-width: 0; }
.step-body > small { color: var(--muted); font-size: .78rem; }
.step-label { color: var(--navy); font-size: .83rem; font-weight: 700; }
select { width: 100%; min-height: 42px; padding: 0 38px 0 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); text-overflow: ellipsis; }
select:disabled { background: #f4f6f8; color: #84909c; }
.upload-zone { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border: 1px dashed #8ea9bd; border-radius: 5px; background: #f8fbfd; color: var(--blue); cursor: pointer; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: var(--blue); background: var(--blue-soft); }
.upload-zone.has-file { border-style: solid; border-color: #91c5ae; background: var(--good-soft); color: var(--good); }
.upload-zone.is-loading { opacity: .65; pointer-events: none; }
.upload-zone > svg { width: 22px; height: 22px; flex: 0 0 auto; }
.upload-copy { display: grid; min-width: 0; line-height: 1.25; }
.upload-copy strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.upload-copy small { margin-top: 2px; color: var(--muted); font-size: .75rem; }

.medicine-step { z-index: 12; }
.medicine-picker { position: relative; min-width: 0; }
.medicine-picker > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); cursor: pointer; list-style: none; }
.medicine-picker > summary::-webkit-details-marker { display: none; }
.medicine-picker > summary svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); transition: transform .15s ease; }
.medicine-picker[open] > summary { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(35, 104, 162, .11); }
.medicine-picker[open] > summary svg { transform: rotate(180deg); }
.medicine-picker.is-disabled > summary { background: #f4f6f8; color: #84909c; cursor: not-allowed; }
.picker-menu { position: absolute; z-index: 20; top: calc(100% + 7px); right: 0; left: 0; min-width: 360px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; box-shadow: 0 18px 38px rgba(19, 42, 68, .18); }
.picker-search { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #f8fafb; }
.picker-search svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--muted); }
.picker-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .82rem; }
.picker-actions { display: flex; justify-content: space-between; gap: 8px; padding: 6px 2px; }
.medicine-options { max-height: 300px; overflow: auto; border-top: 1px solid var(--line); }
.medicine-option { display: grid; grid-template-columns: 18px minmax(0, 1fr) max-content; align-items: center; gap: 9px; min-height: 39px; padding: 6px 7px; border-bottom: 1px solid #edf1f4; cursor: pointer; }
.medicine-option:hover { background: var(--blue-soft); }
.medicine-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
.medicine-option span { overflow: hidden; color: var(--navy); font-size: .8rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.medicine-option small { color: var(--muted); font-size: .7rem; }
.picker-empty { margin: 0; padding: 10px 7px 2px; color: var(--muted); font-size: .76rem; }

.stage-panel { margin-bottom: 20px; overflow: hidden; }
.stage-header { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.stage-header h2 { margin: 0 0 2px; }
.stage-header p { margin: 0; color: var(--muted); font-size: .8rem; }
.dosage-list { background: #f7f9fb; }
.dosage-accordion .variant-toolbar { border-bottom: 0; }
.authority-stage { display: grid; grid-template-columns: 28px minmax(0, 620px); gap: 12px; min-height: 118px; padding: 20px 22px; }
.authority-stage .step-body > small { min-height: 20px; }

.file-summary { display: grid; grid-template-columns: minmax(260px, 1.6fr) minmax(430px, 1fr); align-items: stretch; border-top: 1px solid var(--line); background: #f8fafb; }
.file-identity { display: grid; align-content: center; gap: 3px; min-width: 0; padding: 14px 22px; }
.file-identity strong { overflow: hidden; color: var(--navy); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.file-identity span { color: var(--muted); font-size: .76rem; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(80px, 1fr)); margin-bottom: 0; border-left: 1px solid var(--line); }
.summary-grid div { display: grid; align-content: center; gap: 2px; padding: 11px 14px; border-left: 1px solid var(--line); }
.summary-grid div:first-child { border-left: 0; }
.summary-grid dt { color: var(--muted); font-size: .72rem; }
.summary-grid dd { margin: 0; color: var(--navy); font-size: 1rem; font-weight: 750; font-variant-numeric: tabular-nums; }

.result-panel { overflow: hidden; }
.result-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.result-header p { margin: 0; color: var(--muted); font-size: .82rem; }
.export-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.result-actions { display: flex; align-items: center; gap: 16px; }
.accordion-actions { display: flex; gap: 6px; padding-right: 16px; border-right: 1px solid var(--line); }
.selection-summary { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr .7fr; background: var(--navy); color: #fff; }
.selection-summary div { display: grid; gap: 3px; min-width: 0; padding: 12px 16px; border-left: 1px solid rgba(255,255,255,.14); }
.selection-summary div:first-child { border-left: 0; }
.selection-summary span { color: #b9ccdc; font-size: .69rem; }
.selection-summary strong { overflow: hidden; font-size: .84rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { display: grid; place-items: center; min-height: 300px; padding: 45px 20px; text-align: center; }
.empty-state svg { width: 38px; height: 38px; margin-bottom: 14px; color: #8aa0b2; }
.empty-state strong { color: var(--navy); font-size: .98rem; }
.empty-state span { max-width: 500px; margin-top: 5px; color: var(--muted); font-size: .83rem; }

.table-shell { max-width: 100%; overflow: auto; scrollbar-color: var(--line-strong) #f4f6f8; }
.price-table { width: 100%; min-width: 1220px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: .81rem; }
.price-table .col-number { width: 52px; }
.price-table .col-country { width: 170px; }
.price-table .col-pack { width: 105px; }
.price-table .col-price { width: 108px; }
.price-table .col-currency { width: 74px; }
.price-table .col-notes { width: 300px; }
.price-table th { position: sticky; z-index: 3; top: 0; padding: 11px 9px; border-right: 1px solid #486078; border-bottom: 1px solid #486078; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 650; line-height: 1.25; text-align: center; }
.price-table th[rowspan] { vertical-align: middle; }
.price-table .subhead-row th { top: 39px; padding: 7px 8px; background: #294662; color: #dbe6ee; font-size: .71rem; }
.price-table th:last-child { border-right: 0; }
.price-table td { height: 43px; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; vertical-align: middle; }
.price-table td:last-child { border-right: 0; }
.price-table tbody tr:nth-child(even) td { background: #f8fafb; }
.price-table tbody tr:hover td { background: var(--blue-soft); }
.row-number { color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.country-name { color: var(--navy); font-weight: 650; }
.price-value { text-align: right; font-variant-numeric: tabular-nums; }
.currency-value { color: #40576a; font-size: .76rem; font-weight: 650; text-align: center; }
.notes-value { color: var(--muted); font-size: .75rem; white-space: normal; }
.pricing-note { margin: 0; padding: 12px 18px 14px; border-top: 1px solid var(--line); background: #f8fafb; color: var(--muted); font-size: .76rem; }
.pricing-note strong { color: var(--navy); }

.accordion-list { background: #f7f9fb; }
.medicine-accordion { border-bottom: 1px solid var(--line); background: #fff; }
.medicine-accordion:last-child { border-bottom: 0; }
.medicine-accordion > summary { display: grid; grid-template-columns: 42px minmax(220px, 1fr) 145px 130px 22px; align-items: center; gap: 14px; min-height: 74px; padding: 10px 18px; color: var(--ink); cursor: pointer; list-style: none; }
.medicine-accordion > summary::-webkit-details-marker { display: none; }
.medicine-accordion > summary:hover { background: #f8fafb; }
.medicine-accordion[open] > summary { border-bottom: 1px solid var(--line); background: #f8fafb; }
.accordion-number { color: #7890a4; font-size: .78rem; font-variant-numeric: tabular-nums; }
.accordion-title { display: grid; min-width: 0; gap: 3px; }
.accordion-title strong { overflow: hidden; color: var(--navy); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.accordion-title small { overflow: hidden; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.accordion-countries { color: var(--muted); font-size: .75rem; text-align: right; }
.accordion-chevron { width: 18px; height: 18px; color: var(--muted); transition: transform .15s ease; }
.medicine-accordion[open] .accordion-chevron { transform: rotate(180deg); }
.status-chip { justify-self: end; display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.status-ready { border-color: #b8daca; background: var(--good-soft); color: var(--good); }
.status-warning { border-color: #ebce9e; background: var(--warn-soft); color: var(--warn); }
.status-blocker { border-color: #efbbb6; background: var(--risk-soft); color: var(--risk); }
.status-unresolved { background: #f1f4f6; color: var(--muted); }
.accordion-content { background: #fff; }
.variant-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.variant-selector { display: grid; flex: 1 1 auto; gap: 7px; min-width: 0; max-width: 860px; padding: 0; margin: 0; border: 0; }
.variant-selector-heading { display: grid; grid-template-columns: max-content max-content 1fr; align-items: center; gap: 12px; min-height: 28px; }
.variant-selector-label { color: var(--navy); font-size: .76rem; font-weight: 700; }
.variant-selection-count { color: var(--muted); font-size: .73rem; }
.variant-selector-actions { display: flex; justify-content: flex-end; gap: 10px; }
.variant-search { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.variant-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(35, 104, 162, .11); }
.variant-search svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }
.variant-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .8rem; }
.variant-options { display: grid; max-height: 225px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; background: #fff; scrollbar-color: var(--line-strong) #f4f6f8; }
.variant-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 40px; padding: 7px 10px; border-bottom: 1px solid #edf1f4; cursor: pointer; }
.variant-option:last-child { border-bottom: 0; }
.variant-option:hover { background: var(--blue-soft); }
.variant-option:has(input:checked) { background: #f1f7fb; }
.variant-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
.variant-option span { overflow: hidden; color: var(--navy); font-size: .8rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.variant-no-matches { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: .76rem; }
.medicine-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.remove-button { flex: 0 0 auto; margin: 3px 0 0 4px; color: var(--risk); }
.remove-button:hover:not(:disabled) { color: #8f1d14; }
.variant-outputs { display: grid; gap: 14px; padding: 14px; background: #eef2f5; }
.variant-output { min-width: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.variant-output-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 58px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.variant-output-identity { display: grid; min-width: 0; gap: 2px; }
.variant-output-identity h3 { margin: 0; color: var(--navy); font-size: .78rem; font-weight: 750; }
.variant-output-identity p { overflow: hidden; margin: 0; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.variant-facts { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); background: var(--navy); color: #fff; }
.variant-facts div { display: grid; gap: 3px; padding: 10px 15px; border-left: 1px solid rgba(255,255,255,.14); }
.variant-facts div:first-child { border-left: 0; }
.variant-facts span { color: #b9ccdc; font-size: .68rem; }
.variant-facts strong { overflow: hidden; font-size: .8rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.variant-empty { display: grid; place-items: center; min-height: 170px; padding: 30px; text-align: center; }
.variant-empty strong { color: var(--navy); font-size: .9rem; }
.variant-empty span { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.medicine-accordion .table-shell { max-height: 520px; }

.submission-panel { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 8px 28px rgba(19, 42, 68, .055); }
.submission-header { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.submission-header h2 { margin: 0 0 2px; }
.submission-header p { margin: 0; color: var(--muted); font-size: .8rem; }
.submission-step { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 50%; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 750; }
.submission-setup { display: grid; grid-template-columns: minmax(360px, 720px); border-bottom: 1px solid var(--line); }
.template-setup { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 17px 20px; }
.template-label-row > span { color: var(--navy); font-size: .76rem; font-weight: 700; }
.template-copy small.is-warning { color: var(--warn); }
.template-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.template-label-row .remove-button { margin: 0; }
.template-zone { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border: 1px dashed #8ea9bd; border-radius: 5px; background: #f8fbfd; color: var(--blue); cursor: pointer; }
.template-zone:hover, .template-zone.is-dragging { border-color: var(--blue); background: var(--blue-soft); }
.template-zone.has-template { border-style: solid; border-color: #91c5ae; background: var(--good-soft); color: var(--good); }
.template-zone.has-error { border-color: #d99b96; background: var(--risk-soft); color: var(--risk); }
.template-zone.is-disabled { background: #f4f6f8; color: #84909c; cursor: not-allowed; }
.template-zone.is-loading { opacity: .65; pointer-events: none; }
.template-zone > svg { width: 23px; height: 23px; flex: 0 0 auto; }
.template-copy { display: grid; min-width: 0; line-height: 1.25; }
.template-copy strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.template-copy small { margin-top: 2px; color: var(--muted); font-size: .73rem; }
.submission-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; padding: 13px 20px; border-top: 1px solid var(--line); background: #fff; }
.submission-footer p { margin: 0; color: var(--muted); font-size: .76rem; }
.submission-footer p.is-error { color: var(--risk); }
.submission-footer p.is-success { color: var(--good); }

.checks-panel { margin-top: 20px; }
.checks-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 18px; color: var(--navy); font-size: .86rem; font-weight: 700; cursor: pointer; }
.checks-panel summary span:last-child { color: var(--muted); font-size: .78rem; font-weight: 550; }
.checks-panel[open] summary { border-bottom: 1px solid var(--line); }
.diagnostics-counts { display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 18px; background: #f8fafb; }
.diagnostics-counts span { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .74rem; font-weight: 650; }
.diagnostics-counts .count-blocker { border-color: #efbbb6; color: var(--risk); }
.diagnostics-counts .count-warning { border-color: #eed19d; color: var(--warn); }
.diagnostics-counts .count-info { color: var(--muted); }
.diagnostics-list { display: grid; gap: 8px; margin: 0; padding: 0 18px 18px; list-style: none; }
.diagnostic { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; }
.diagnostic p { grid-column: 2; margin: 0; font-size: .8rem; }
.diagnostic small { grid-column: 2; color: var(--muted); font-size: .7rem; }
.diagnostic-badge { grid-row: 1 / span 2; align-self: start; padding: 2px 6px; border-radius: 4px; font-size: .66rem; font-weight: 750; text-transform: uppercase; }
.diagnostic-blocker { border-color: #efc2be; background: var(--risk-soft); }
.diagnostic-blocker .diagnostic-badge { color: var(--risk); }
.diagnostic-warning { border-color: #edd4aa; background: var(--warn-soft); }
.diagnostic-warning .diagnostic-badge { color: var(--warn); }
.diagnostic-info .diagnostic-badge { color: var(--muted); }
.diagnostic-limit { padding: 10px 12px; color: var(--muted); font-size: .78rem; }

::selection { background: #cfe4f3; color: var(--navy); }

@media (max-width: 920px) {
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-step { min-height: 0; }
  .workflow-step + .workflow-step { border-top: 1px solid var(--line); border-left: 0; }
  .picker-menu { position: static; min-width: 0; margin-top: 7px; }
  .file-summary { grid-template-columns: 1fr; }
  .summary-grid { border-top: 1px solid var(--line); border-left: 0; }
  .selection-summary { grid-template-columns: repeat(2, 1fr); }
  .selection-summary div { border-top: 1px solid rgba(255,255,255,.14); }
  .result-actions { align-items: flex-end; flex-direction: column-reverse; gap: 8px; }
  .accordion-actions { padding-right: 0; border-right: 0; }
  .medicine-accordion > summary { grid-template-columns: 34px minmax(160px, 1fr) 100px 20px; }
  .accordion-countries { display: none; }
  .variant-toolbar { align-items: stretch; flex-direction: column; }
  .variant-selector { width: 100%; max-width: none; }
  .variant-toolbar > .remove-button { align-self: flex-start; margin-left: 0; }
  .medicine-actions { justify-content: flex-start; }
  .submission-setup { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { padding: 8px 12px; }
  .brand-copy small, .privacy-pill { display: none; }
  .page-shell { width: min(100% - 20px, 1480px); padding-top: 26px; }
  .page-intro { padding-bottom: 20px; }
  .workflow-step { padding: 17px 15px; }
  .stage-header { align-items: flex-start; padding: 14px; }
  .authority-stage { grid-template-columns: 28px minmax(0, 1fr); min-height: 0; padding: 17px 15px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-grid div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .summary-grid div:nth-child(4) { border-top: 1px solid var(--line); }
  .result-header { align-items: flex-start; flex-direction: column; }
  .result-actions, .export-actions { width: 100%; }
  .export-actions button { flex: 1; }
  .selection-summary { grid-template-columns: 1fr; }
  .selection-summary div { border-top: 1px solid rgba(255,255,255,.14); border-left: 0; }
  .selection-summary div:first-child { border-top: 0; }
  .picker-menu { min-width: 0; }
  .medicine-accordion > summary { grid-template-columns: 30px minmax(0, 1fr) 20px; gap: 8px; padding: 10px 12px; }
  .status-chip { grid-column: 2; grid-row: 2; justify-self: start; }
  .accordion-chevron { grid-column: 3; grid-row: 1 / span 2; }
  .variant-toolbar { padding: 12px; }
  .variant-selector-heading { grid-template-columns: 1fr max-content; gap: 4px 10px; }
  .variant-selector-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .variant-option span { white-space: normal; }
  .variant-outputs { gap: 10px; padding: 10px; }
  .variant-output-header { align-items: stretch; flex-direction: column; gap: 9px; }
  .medicine-actions { flex-wrap: wrap; }
  .variant-facts { grid-template-columns: repeat(2, 1fr); }
  .variant-facts div:nth-child(3) { border-top: 1px solid rgba(255,255,255,.14); border-left: 0; }
  .variant-facts div:nth-child(4) { border-top: 1px solid rgba(255,255,255,.14); }
  .submission-header, .template-setup { padding-right: 14px; padding-left: 14px; }
  .submission-footer { align-items: stretch; flex-direction: column; padding-right: 14px; padding-left: 14px; }
  .submission-footer button { width: 100%; }
}

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