:root {
  color-scheme: light;
  --navy: #142f54;
  --blue: #2472b7;
  --ice: #eef4fa;
  --paper: #ffffff;
  --ink: #21324a;
  --muted: #607188;
  --line: #dbe4ee;
  --amber: #98681a;
  font-family: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: #f7f9fc;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; }
button, summary, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .46; cursor: default; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #4c94d5; outline-offset: 4px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 12px; background: white; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 32px 18px 20px; background: var(--navy); color: #f3f7ff; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 14px; color: white; text-decoration: none; font-size: 22px; font-weight: 650; letter-spacing: -.6px; line-height: 1.14; }
.sidebar-caption { margin: 15px 14px 34px; color: #b3c6df; font-size: 12px; }
.region-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; margin-bottom: 12px; }
.region-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.region-heading > span { color: #b3c6df; font-size: 12px; }
.region-list { flex: 1; overflow-y: auto; min-height: 120px; scrollbar-width: thin; scrollbar-color: #496485 transparent; padding: 7px 0; }
.region-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 13px; border: 0; border-radius: 7px; color: #d8e4f4; background: transparent; text-align: left; font-size: 13px; line-height: 1.4; }
.region-button:hover { background: #203f66; color: white; }
.region-button[aria-current="true"] { background: #2a507c; color: #fff; box-shadow: inset 3px 0 #8dc9f1; }
.region-number { flex: 0 0 auto; color: #a6c2df; font-size: 11px; font-variant-numeric: tabular-nums; }
.all-regions { min-height: 43px; border-bottom: 1px solid #2e496b; border-radius: 7px 7px 0 0; font-weight: 600; }
.sidebar-footer { padding: 20px 14px 0; margin-top: 8px; border-top: 1px solid #2e496b; font-size: 11px; }
.sidebar-footer a { color: #c4e4ff; font-size: 12px; font-weight: 600; text-decoration: none; }
.sidebar-footer p { color: #a9bed8; margin: 8px 0 0; line-height: 1.65; }
.main { min-width: 0; }
.topbar { height: 69px; display: flex; align-items: center; justify-content: space-between; padding: 0 46px; border-bottom: 1px solid var(--line); background: white; font-size: 12px; color: var(--muted); }
.workspace-label { display: inline-flex; align-items: center; gap: 8px; }
.local-dot { height: 7px; width: 7px; border: 2px solid #6894bb; border-radius: 50%; }
.content { max-width: 1180px; padding: 38px 46px 26px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 28px; }
.intro { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
h1 { margin: 0; font-size: clamp(27px, 3vw, 37px); font-weight: 650; line-height: 1.25; letter-spacing: -1.2px; }
.page-description { color: var(--muted); margin: 11px 0 0; font-size: 13px; }
.journal-stat { text-align: right; flex-shrink: 0; padding-left: 24px; border-left: 1px solid var(--line); }
.journal-stat strong { display: block; font-size: 27px; font-weight: 550; line-height: 1.3; font-variant-numeric: tabular-nums; }
.journal-stat span { color: var(--muted); font-size: 11px; }
.source-status { border: 1px solid var(--line); border-radius: 9px; background: white; margin-bottom: 24px; font-size: 12px; }
.source-status summary { list-style: none; display: flex; gap: 10px; align-items: center; padding: 13px 16px; cursor: pointer; }
.source-status summary::-webkit-details-marker { display: none; }
.health-icon { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #8c9eb2; }
.health-icon[data-state="good"] { background: #34775e; }
.health-icon[data-state="bad"] { background: #ba483b; }
.health-icon[data-state="stale"] { background: #ae7b25; }
.last-collected { margin-left: auto; color: var(--muted); }
.disclosure-arrow { margin-left: 5px; font-size: 17px; color: var(--muted); }
.source-status[open] .disclosure-arrow { transform: rotate(180deg); }
.status-details { padding: 0 17px 15px; color: var(--muted); border-top: 1px solid var(--line); }
.endpoint-line { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 7px 0; }
.endpoint-line strong { color: var(--ink); font-weight: 550; min-width: 125px; }
.status-note { margin-bottom: 0; font-size: 11px; }
.toolbar { display: flex; align-items: end; gap: 14px; margin-bottom: 22px; }
.toolbar label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); }
select { height: 39px; padding: 0 32px 0 12px; background: white; color: var(--ink); border: 1px solid #cbd7e5; border-radius: 6px; max-width: 100%; font-size: 12px; }
.event-filter { min-width: 240px; }
.toolbar .mobile-region { display: none; }
.page-size { color: var(--muted); margin-bottom: 10px; font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 6px; padding: 9px 14px; line-height: 1.5; font-size: 12px; font-weight: 550; min-height: 39px; }
.button.secondary { background: white; border-color: #cbd7e5; color: var(--ink); }
.button.secondary:not(:disabled):hover { border-color: #6c91b4; background: #f2f7fc; }
.button.primary { background: var(--blue); color: white; }
.button.primary:not(:disabled):hover { background: #1a5b93; }
#refresh { margin-left: auto; }
.new-messages { display: block; width: 100%; padding: 11px 14px; margin: 0 0 18px; border: 1px solid #b9d7ef; border-radius: 7px; background: #e8f3fd; color: #205e92; font-size: 12px; font-weight: 550; }
.loading { color: var(--muted); padding: 30px 0; font-size: 13px; }
.date-heading { display: flex; align-items: center; gap: 15px; margin: 25px 0 14px; color: var(--muted); font-size: 11px; font-weight: 500; }
.date-heading:first-child { margin-top: 0; }
.date-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.message { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 18px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.message-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 3px; display: flex; gap: 8px; align-items: baseline; }
.event-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #a3b4c9; }
.message[data-event="2"] .event-dot, .message[data-event="5"] .event-dot { background: #2472b7; }
.message[data-event="6"] .event-dot { background: #ae7131; }
.message[data-event="3"] .event-dot { background: #6c63aa; }
.message[data-event="4"] .event-dot, .message[data-event="7"] .event-dot { background: #7d8999; }
.message-content { min-width: 0; }
.record-name-line { margin: 0 0 8px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.record-name-caption { color: var(--muted); font-size: 11px; }
.record-name { color: var(--ink); font-weight: 600; }
.message-meta { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 11px; margin-bottom: 7px; }
.region-tag { color: #245f91; font-weight: 600; }
.event-tag { color: #687a90; }
.kind-tag { padding: 2px 7px; border-radius: 4px; background: #eaf0f7; color: #536b87; }
.message h3 { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 0 0 7px; letter-spacing: -.2px; }
.message-body { font-size: 13px; line-height: 1.7; max-width: 74ch; margin: 0; color: #4b5e75; }
.source-quote { margin: 11px 0 0; padding: 9px 13px; background: #edf3f9; border-left: 2px solid #b9cde1; border-radius: 0 5px 5px 0; color: #304a65; font-size: 13px; line-height: 1.65; max-width: 76ch; overflow-wrap: anywhere; }
.quote-label { display: block; font-size: 10px; color: #617891; margin-bottom: 3px; }
.record-details { margin-top: 11px; font-size: 11px; color: var(--muted); }
.record-details summary { display: inline-block; cursor: pointer; color: #567393; padding: 3px 0; text-decoration: underline; text-decoration-color: #bfcedd; text-underline-offset: 3px; }
.record-details dl { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); gap: 6px 14px; margin: 12px 0 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px; max-width: 700px; }
.record-details dt { color: #6e7c90; }
.record-details dd { margin: 0; color: #344d66; overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 30px 0 20px; }
.pagination > span { color: var(--muted); font-size: 11px; text-align: center; }
.feed-note { color: #73839a; font-size: 11px; line-height: 1.7; max-width: 80ch; margin: 22px 0 0; }
.empty-state { padding: 55px 24px 65px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 9px; }
.empty-mark { color: #89a7c4; font-size: 40px; line-height: 1; }
.empty-state h2 { font-weight: 550; font-size: 19px; margin: 17px 0 8px; }
.empty-state p { color: var(--muted); font-size: 13px; max-width: 52ch; margin: 0 auto 22px; }
.error-box { border: 1px solid #e6bbb3; background: #fff5f2; border-radius: 7px; padding: 15px 18px; color: #93483a; font-size: 13px; margin-bottom: 20px; }
.error-box p { margin: 0 0 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1550px) { .layout { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 245px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .topbar { padding: 0 28px; }
  .content { padding: 30px 28px 24px; }
  .page-size { display: none; }
  .journal-stat { display: none; }
  .last-collected { font-size: 10px; }
}
@media (max-width: 760px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .topbar { height: 53px; padding: 0 20px; }
  .content { padding: 27px 20px 22px; }
  h1 { font-size: 29px; }
  .page-heading { margin-bottom: 22px; }
  .page-description { font-size: 12px; }
  .toolbar { flex-wrap: wrap; gap: 12px; align-items: end; }
  .toolbar .mobile-region { display: flex; flex: 1 1 100%; }
  .event-filter { flex: 1; min-width: 0; }
  .event-filter select { width: 100%; }
  #refresh { flex-shrink: 0; padding-left: 10px; padding-right: 10px; }
  .source-status summary { padding: 12px; flex-wrap: wrap; gap: 7px; }
  .last-collected { width: 100%; margin-left: 15px; order: 2; }
  .disclosure-arrow { margin-left: auto; }
  .message { grid-template-columns: 49px minmax(0, 1fr); gap: 11px; padding: 18px 0; }
  .message-time { font-size: 11px; gap: 6px; }
  .message-meta { font-size: 10px; gap: 5px 9px; }
  .message h3 { font-size: 15px; }
  .message-body, .source-quote { font-size: 12px; }
  .record-details dl { grid-template-columns: 1fr; gap: 2px; }
  .record-details dd { margin-bottom: 7px; }
  .pagination { flex-wrap: wrap; gap: 10px; }
  .pagination > span { order: 2; width: 100%; }
  .pagination .button { font-size: 11px; padding: 9px 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
