:root {
  --bg: #f5f7fa;
  --surface: #fff;
  --soft: #eef3f7;
  --ink: #17212b;
  --muted: #5e6b78;
  --line: #d8e0e7;
  --brand: #0b4f71;
  --brand2: #147a8a;
  --accent: #b7263f;
  --focus: #f5b642;
  --shadow: 0 16px 40px rgba(23, 33, 43, .1);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.5; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand strong { display: block; font-size: 22px; }
.brand small { display: block; color: var(--muted); font-size: 13px; }
.pills { display: flex; gap: 8px; }
.pills span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 700; }
.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: calc(100vh - 103px); }
.side-nav { padding: 20px 16px; background: #102f43; color: #fff; }
.side-nav a { display: block; padding: 10px 12px; border-radius: 8px; color: #fff; text-decoration: none; font-weight: 700; }
.side-nav a:hover, .side-nav a.active { background: rgba(255,255,255,.13); }
.side-nav div { margin: 18px 10px 8px; color: #b8d7e3; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.content { width: 100%; max-width: 1180px; padding: 34px; }
h1 { margin: 0 0 12px; color: var(--brand); font-size: 30px; line-height: 1.15; }
h2 { margin: 28px 0 10px; color: var(--brand); font-size: 20px; }
h3 { margin: 22px 0 8px; color: var(--ink); font-size: 16px; }
.lede { max-width: 780px; color: var(--muted); }
.muted { color: var(--muted); }
.panel { margin: 18px 0 24px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.field { display: grid; gap: 5px; }
label { font-weight: 700; font-size: 13px; }
select, input[type=text] { min-height: 38px; width: 100%; padding: 7px 9px; border: 1px solid #b8c5cf; border-radius: 6px; background: #fff; color: var(--ink); }
button, .button, input[type=submit] { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border: 0; border-radius: 6px; background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .button:hover, input[type=submit]:hover { background: var(--brand2); color: #fff; }
.secondary { background: #53616d; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sticky-actions { position: sticky; bottom: 0; margin: 18px -18px -18px; padding: 14px 18px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); }
.result-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 18px 0 24px; }
.result-summary > div { min-height: 88px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.result-summary strong { display: block; margin-top: 4px; color: var(--brand); font-size: 26px; line-height: 1.2; }
.summary-filters { grid-column: span 2; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.filter-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 28px; padding: 5px 9px; border: 1px solid #bed3dd; border-radius: 999px; background: #f4fafc; color: var(--brand); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.muted-chip { color: var(--muted); background: var(--soft); }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 12px 0 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--soft); font-size: 13px; }
td.number, th.number { text-align: right; white-space: nowrap; }
tr:hover td { background: #f8fbfd; }
.notice { max-width: 760px; padding: 16px 18px; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.error { border-left-color: var(--accent); }
.radio-list { display: grid; gap: 8px; }
.radio-list label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
select:focus, input:focus, button:focus, a:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 860px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 16px; }
  .app-shell { display: block; }
  .side-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px; padding: 12px; }
  .side-nav div { grid-column: 1 / -1; }
  .content { padding: 22px 16px; }
  h1 { font-size: 24px; }
  .sticky-actions { position: static; }
  .summary-filters { grid-column: auto; }
  .result-summary strong { font-size: 22px; }
}
