:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  color: #1b2232;
  background: #f4f5f7;
  --muted: #596477;
  --line: #e1e5eb;
  --brand: #3e43b5;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body, h1, h2, p { margin: 0; }
button, a { font: inherit; }
a { color: var(--brand); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #555de4; outline-offset: 3px; }
.bar { background: #fff; border-bottom: 1px solid var(--line); }
.bar-inner { max-width: 1250px; margin: 0 auto; padding: 12px 28px; display: flex; gap: 32px; align-items: center; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 750; white-space: nowrap; }
.brand span { background: #294ed5; color: #fff; border-radius: 7px; width: 29px; height: 29px; display: grid; place-items: center; }
.brand b { color: var(--muted); font-size: 12px; }
nav { display: flex; flex-wrap: wrap; gap: 7px 20px; }
nav a { color: #384359; text-decoration: none; font-size: 13px; font-weight: 600; }
nav a:hover { color: var(--brand); text-decoration: underline; }
.page { max-width: 1250px; margin: 0 auto; padding: 28px 28px 40px; }
.intro { margin-bottom: 20px; }
.meta, .subheading, .panel-heading p, .footnote { color: var(--muted); font-size: 13px; line-height: 1.5; }
.meta { font-weight: 650; }
.cargo-summary { margin: 7px 0; }
h1 { margin: 5px 0 4px; font-size: clamp(25px, 4vw, 35px); line-height: 1.2; letter-spacing: -.025em; }
h2 { font-size: 16px; line-height: 1.35; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 16px; overflow: hidden; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.panel-heading p { margin-top: 3px; }
.status { padding: 18px 20px; }
.versions { display: flex; gap: 3px; flex-wrap: wrap; background: #f0f2f5; padding: 3px; border-radius: 8px; }
.versions button, .preview-header button { cursor: pointer; padding: 6px 10px; border: 0; background: transparent; color: #434f62; border-radius: 6px; font-weight: 650; font-size: 13px; }
.versions button[aria-pressed="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 3px #1826421c; }
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.totals > div { padding: 17px 19px; display: flex; flex-direction: column; gap: 5px; border-right: 1px solid var(--line); }
.totals > div:last-child { border-right: 0; }
.totals span { font-size: 13px; font-weight: 600; color: #4b5668; }
.totals strong { font-size: clamp(20px, 3vw, 29px); font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.variance { background: #fff4ef; color: #a23328; }
.matched { background: #eef8f2; color: #216944; }
.scroll-table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; text-align: left; }
th, td { padding: 12px 19px; vertical-align: top; }
thead { background: #f8f9fb; color: #4b5668; font-size: 12px; }
tbody tr { border-top: 1px solid var(--line); }
tbody th, tbody td { font-size: 14px; }
tbody th { min-width: 12em; }
.row-note { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.numeric { white-space: nowrap; }
.source-link { font-size: 13px; }
.line-sources { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.messages { list-style: none; margin: 0; padding: 0 19px; }
.messages li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.messages li:last-child { border-bottom: 0; }
.message-head { display: flex; justify-content: space-between; gap: 5px 16px; flex-wrap: wrap; }
.message-head strong { line-height: 1.4; }
.message-head time { color: var(--muted); white-space: nowrap; font-size: 12px; }
.message-from { color: var(--muted); font-size: 13px; margin-top: 3px; }
.mail-body { margin-top: 7px; color: var(--muted); font-size: 13px; }
.mail-body summary { cursor: pointer; }
.mail-body p { white-space: pre-wrap; margin: 5px 0 0; }
.files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.files a { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; text-decoration: none; }
.files a:hover { text-decoration: underline; background: #f5f6fa; }
.footnote { margin: 3px 0 0; }
dialog { width: min(94vw, 900px); height: min(88vh, 950px); padding: 0; border: 1px solid var(--line); border-radius: 9px; }
dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
dialog::backdrop { background: #171e37aa; }
.preview-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.preview-header h2 { flex: 1 1 auto; overflow-wrap: anywhere; }
.preview-header a, .preview-header button { font-size: 12px; }
.preview-header button { background: #f0f2f5; }
iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
  .bar-inner, .page { padding-left: 14px; padding-right: 14px; }
  .bar-inner { gap: 15px; }
  .panel-heading, .totals > div, th, td { padding-left: 12px; padding-right: 12px; }
  .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .totals > div:nth-child(2) { border: 0; }
  .totals > div:last-child { grid-column: span 2; border-top: 1px solid var(--line); }
  .totals span { font-size: 12px; }
  .messages { padding: 0 12px; }
}
