:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #607089;
  --line: #dce3ee;
  --accent: #2563eb;
  --accent-soft: #e8f0ff;
  --shadow: 0 10px 30px rgba(23, 32, 51, 0.08);
  --ui-zoom: 1;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #151b23;
  --text: #e6edf3;
  --muted: #8b949e;
  --line: #30363d;
  --accent: #58a6ff;
  --accent-soft: #102a44;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  zoom: var(--ui-zoom);
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 32px clamp(20px, 4vw, 56px) 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.zoom-control {
  display: inline-flex;
  gap: 6px;
}

.zoom-control button {
  min-width: 34px;
  padding-inline: 8px;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 11px;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.disclaimer {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  white-space: nowrap;
}

.disclaimer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.disclaimer a:hover {
  text-decoration: underline;
}

.status {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 56px) 48px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) minmax(260px, 1.7fr);
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  padding: 9px 11px;
}

select:focus,
input:focus {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.summary > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.summary span {
  display: block;
  font-size: 28px;
  font-weight: 800;
}

.summary small {
  color: var(--muted);
}

.list-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.list-head,
.record {
  display: grid;
  grid-template-columns: 40px 84px minmax(150px, 220px) 92px minmax(220px, 0.9fr) minmax(260px, 1.4fr);
  align-items: center;
  gap: 10px;
}

.list-head {
  min-height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, var(--accent-soft));
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.record {
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.record:last-child {
  border-bottom: 0;
}

.record:hover {
  background: color-mix(in srgb, var(--panel) 88%, var(--accent-soft));
}

.indicator {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 15px;
}

.cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.description {
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eef2f7;
  color: #3d4b63;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
}

[data-theme="dark"] .pill {
  background: #212936;
  color: #c9d1d9;
}

.month {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

[data-density="expanded"] .record {
  align-items: start;
  min-height: 72px;
  padding-block: 11px;
}

[data-density="expanded"] .cell {
  overflow: visible;
  text-overflow: initial;
  white-space: normal;
}

[data-density="expanded"] .description {
  line-height: 1.45;
}

.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.disclaimer-dialog {
  width: min(640px, 92vw);
  max-height: 85vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.disclaimer-dialog::backdrop {
  background: rgba(13, 17, 23, 0.55);
}

.disclaimer-dialog .dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.disclaimer-dialog h2 {
  margin: 0;
  font-size: 20px;
}

.disclaimer-dialog .dialog-body {
  padding: 20px 22px 24px;
  overflow-y: auto;
}

.disclaimer-dialog .dialog-body p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.disclaimer-dialog h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

.source-list a {
  color: var(--accent);
  text-decoration: none;
}

.source-list a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .source-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .disclaimer {
    white-space: normal;
  }

  :root {
    --ui-zoom: 0.92;
  }

  .app-header {
    display: block;
  }

  .header-actions {
    justify-items: start;
    margin-top: 12px;
  }

  .status {
    text-align: left;
  }

  .filters,
  .summary {
    grid-template-columns: 1fr;
  }

  .list-shell {
    overflow-x: auto;
  }

  .list-head,
  .record {
    min-width: 860px;
  }
}
