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

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1318;
  --panel: #171d24;
  --text: #edf2f7;
  --muted: #9aa8b8;
  --line: #303946;
  --accent: #c084fc;
  --accent-soft: #332044;
  --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;
}

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

.disclaimer a:hover,
.source-list 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: minmax(150px, 0.8fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(260px, 1.8fr);
  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(130px, 180px) 126px minmax(220px, 0.9fr) minmax(280px, 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: #f1e8ff;
  color: #4c1d95;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
}

[data-theme="dark"] .pill {
  background: #2e2140;
  color: #eadcff;
}

.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(720px, 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);
}

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

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

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

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

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

.source-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

@media (max-width: 920px) {
  :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: 900px;
  }
}
