:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #fafafa;
  --surface-muted: #f5f5f5;
  --foreground: #111111;
  --muted: #6b7280;
  --muted-strong: #4b5563;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --accent: #18181b;
  --accent-soft: #f4f4f5;
  --blue: #2563eb;
  --green: #16803c;
  --amber: #a16207;
  --red: #b42318;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--background); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open { overflow: hidden; }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 8px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { font-size: 12px; letter-spacing: .08em; white-space: nowrap; }
.brand-copy small { margin-top: 1px; color: var(--muted); font-size: 11px; }

.sidebar-label {
  margin: 34px 10px 8px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.side-nav { display: grid; gap: 3px; }

.side-link {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
}

.side-link strong { color: var(--muted); font-size: 11px; font-weight: 500; }
.side-link:hover { background: var(--surface-muted); color: var(--foreground); }
.side-link.is-active { background: #f1f1f3; color: var(--foreground); font-weight: 650; }

.sidebar-status {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.sidebar-status div { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; color: var(--muted-strong); }
.sidebar-status strong { font-weight: 550; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a1a1aa; }
.status-dot.is-online { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.status-dot.is-error { background: #dc2626; box-shadow: 0 0 0 3px #fee2e2; }

.main-column { min-width: 0; }

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .96);
}

.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--foreground); font-weight: 650; }
.breadcrumb span:nth-child(2) { color: #c4c4c7; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.data-date { color: var(--muted); font-size: 11px; }

.button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--foreground);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.button:hover { opacity: .88; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button--secondary { background: var(--surface); color: var(--foreground); }
.button--secondary:hover { background: var(--surface-muted); opacity: 1; }

.main-content { max-width: 1550px; margin: 0 auto; padding: 26px 28px 48px; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-heading h1 { margin: 0; font-size: 25px; line-height: 1.25; letter-spacing: -.025em; }
.page-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.page-heading-actions { padding-top: 2px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }

.metric-card {
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.metric-card span { color: var(--muted-strong); font-size: 12px; }
.metric-card strong { margin-top: 5px; font-size: 24px; line-height: 1.1; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.metric-card small { margin-top: 5px; color: #9ca3af; font-size: 10px; }

.dashboard-view { margin-bottom: 16px; }
.dashboard-controls {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}
.dashboard-controls > div { display: grid; gap: 3px; }
.dashboard-controls strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.dashboard-controls > div > span { color: var(--muted); font-size: 10px; }
.dashboard-year-filter { height: 36px; display: flex; align-items: center; gap: 10px; padding-left: 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.dashboard-year-filter select { height: 100%; min-width: 108px; padding: 0 9px 0 2px; border: 0; outline: 0; background: transparent; color: var(--foreground); font-size: 12px; }
.dashboard-year-filter:focus-within { border-color: #a1a1aa; box-shadow: 0 0 0 2px #f4f4f5; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.chart-card {
  min-width: 0;
  min-height: 300px;
  padding: 17px 18px 18px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.chart-card--wide { grid-column: 1 / -1; }
.chart-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.chart-header span { color: var(--muted); font-size: 10px; }
.chart-header h2 { margin: 2px 0 0; font-size: 14px; letter-spacing: -.01em; }
.chart-header small { max-width: 210px; color: #9ca3af; font-size: 9px; text-align: right; }

.bar-chart { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 74px; align-items: center; gap: 10px; min-width: 0; }
.bar-label { overflow: hidden; color: var(--muted-strong); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { position: relative; height: 7px; overflow: hidden; border-radius: 2px; background: #f0f0f1; }
.bar-fill { height: 100%; min-width: 2px; border-radius: 2px; background: #3f3f46; }
.bar-fill--muted { background: #94a3b8; }
.bar-value { color: var(--foreground); font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bar-value small { display: block; margin-top: 1px; color: var(--muted); font-size: 8px; }
.bar-chart--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }

.year-chart { display: grid; gap: 16px; }
.year-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 92px; gap: 12px; align-items: center; }
.year-label { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.year-bars { display: grid; gap: 5px; }
.year-bar { height: 9px; overflow: hidden; border-radius: 2px; background: #f0f0f1; }
.year-bar i { display: block; height: 100%; border-radius: 2px; background: #27272a; }
.year-bar:last-child i { background: #94a3b8; }
.year-values { font-size: 9px; line-height: 1.6; text-align: right; font-variant-numeric: tabular-nums; }
.year-values strong { font-size: 11px; }
.chart-legend { display: flex; gap: 16px; color: var(--muted); font-size: 9px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 10px; height: 4px; border-radius: 1px; background: #27272a; }
.chart-legend span:last-child i { background: #94a3b8; }

.quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quality-item { min-height: 78px; padding: 11px; border: 1px solid var(--border); border-radius: 6px; }
.quality-item span { display: block; color: var(--muted); font-size: 9px; }
.quality-item strong { display: block; margin-top: 5px; font-size: 18px; font-variant-numeric: tabular-nums; }
.quality-item small { display: block; margin-top: 5px; color: #9ca3af; font-size: 8px; }

.data-panel { border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--surface); }

.filter-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 138px 156px 150px;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.search-field, .select-field {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.search-field { padding: 0 11px; }
.search-mark { width: 11px; height: 11px; border: 1.5px solid #71717a; border-radius: 50%; position: relative; flex: 0 0 auto; }
.search-mark::after { content: ""; position: absolute; width: 5px; height: 1.5px; right: -4px; bottom: -2px; background: #71717a; transform: rotate(45deg); border-radius: 2px; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; }
.search-field input::placeholder { color: #a1a1aa; }

.select-field { justify-content: space-between; padding-left: 10px; color: var(--muted); font-size: 11px; }
.select-field select { min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 8px 0 2px; background: transparent; color: var(--foreground); font-size: 12px; }

.search-field:focus-within, .select-field:focus-within { border-color: #a1a1aa; box-shadow: 0 0 0 2px #f4f4f5; }

.table-toolbar { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 12px; border-bottom: 1px solid var(--border); }
.view-tabs { display: flex; align-items: center; gap: 4px; }
.view-tab { height: 30px; padding: 0 11px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; }
.view-tab:hover { background: var(--surface-muted); }
.view-tab.is-active { background: var(--accent-soft); color: var(--foreground); font-weight: 650; }
.result-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.separator { color: #d4d4d8; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.export-button { min-height: 30px; padding-inline: 10px; }

.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.events-table { min-width: 1180px; }
.announcements-table { min-width: 1110px; }

.data-table th {
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: left;
  white-space: nowrap;
}

.events-table th:nth-child(1) { width: 94px; }
.events-table th:nth-child(2) { width: 150px; }
.events-table th:nth-child(3) { width: 82px; }
.events-table th:nth-child(4) { width: 88px; }
.events-table th:nth-child(5) { width: 138px; }
.events-table th:nth-child(6) { width: 235px; }
.events-table th:nth-child(7) { width: 150px; }
.events-table th:nth-child(8) { width: 110px; }
.events-table th:nth-child(9) { width: 82px; }
.announcements-table th:nth-child(1) { width: 100px; }
.announcements-table th:nth-child(2) { width: 150px; }
.announcements-table th:nth-child(3) { width: 82px; }
.announcements-table th:nth-child(4) { width: auto; }
.announcements-table th:nth-child(5) { width: 130px; }
.announcements-table th:nth-child(6) { width: 100px; }
.announcements-table th:nth-child(7) { width: 90px; }
.announcements-table th:nth-child(8) { width: 82px; }

.sort-button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; }
.sort-button::after { content: " ↕"; color: #c4c4c7; }
.sort-button.is-active::after { content: " ↓"; color: var(--foreground); }
.sort-button.is-active[data-direction="asc"]::after { content: " ↑"; }

.data-table td { height: 58px; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 12px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background 110ms ease; }
.data-table tbody tr:hover { background: #fafafa; }
.data-table tbody tr.is-selected { background: #f5f7fa; box-shadow: inset 2px 0 0 #2563eb; }

.row-button { display: contents; }
.cell-primary { display: block; color: var(--foreground); font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.company-cell .cell-primary { font-size: 12.5px; }
.amount-cell .cell-primary { font-variant-numeric: tabular-nums; }
.evidence-link { padding: 0; border: 0; border-bottom: 1px solid #a1a1aa; background: transparent; font-size: 12px; font-weight: 600; white-space: nowrap; }
.evidence-link:hover { border-color: var(--foreground); }

.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--muted-strong); font-size: 10px; white-space: nowrap; }
.tag--dark { border-color: #27272a; background: #27272a; color: #fff; }
.tag--blue { border-color: #dbeafe; background: #eff6ff; color: #1d4ed8; }

.state-panel { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); text-align: center; }
.state-panel strong { color: var(--foreground); font-size: 13px; }
.state-panel span:last-child { font-size: 11px; }
.state-panel--error strong { color: var(--red); }
.loader { width: 20px; height: 20px; margin-bottom: 8px; border: 2px solid #e4e4e7; border-top-color: #27272a; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-row td { height: 220px; color: var(--muted); text-align: center; }

.pagination { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--border); }
.pagination-pages { display: flex; align-items: center; gap: 4px; }
.page-button { width: 32px; height: 32px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; }
.page-button:hover { background: var(--surface-muted); }
.page-button.is-active { border-color: var(--border-strong); background: var(--surface); color: var(--foreground); font-weight: 650; }
.page-ellipsis { width: 24px; color: var(--muted); text-align: center; }

.detail-drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.detail-drawer.is-open { pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(9, 9, 11, .16); opacity: 0; transition: opacity 170ms ease; }
.detail-drawer.is-open .drawer-backdrop { opacity: 1; }

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, calc(100vw - 32px));
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 190ms ease;
}

.detail-drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 22px 18px; border-bottom: 1px solid var(--border); }
.drawer-kicker { display: block; margin-bottom: 6px; color: #64748b; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.drawer-header h2 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.02em; }
.drawer-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.icon-button { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 20px; line-height: 1; }
.icon-button:hover { background: var(--surface-muted); color: var(--foreground); }
.drawer-body { min-height: 0; flex: 1; overflow-y: auto; }
.drawer-loading { min-height: 260px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.drawer-section { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer-section:last-child { border-bottom: 0; }
.drawer-section-title { margin: 0 0 12px; color: var(--muted-strong); font-size: 11px; font-weight: 700; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.detail-card { min-height: 64px; padding: 10px; border: 1px solid var(--border); border-radius: 6px; }
.detail-card span { display: block; color: var(--muted); font-size: 9px; }
.detail-card strong { display: block; margin-top: 5px; font-size: 12px; font-weight: 650; line-height: 1.4; }

.detail-line { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px; padding: 8px 0; border-bottom: 1px solid #f0f0f1; font-size: 11px; }
.detail-line:last-child { border-bottom: 0; }
.detail-line > span { color: var(--muted); }
.detail-line > strong { font-weight: 550; text-align: right; overflow-wrap: anywhere; }

.quota-list { display: grid; gap: 8px; }
.quota-item { padding: 11px 12px; border: 1px solid var(--border); border-radius: 6px; }
.quota-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.quota-item-head span { color: var(--muted); font-size: 10px; }
.quota-item-head strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.quota-item p { margin: 8px 0 0; color: var(--muted-strong); font-size: 11px; line-height: 1.55; }
.verification { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

.timeline { display: grid; }
.timeline-item { position: relative; padding: 0 0 18px 20px; }
.timeline-item::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: -5px; width: 1px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-item::after { content: ""; position: absolute; left: 1px; top: 5px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #64748b; box-shadow: 0 0 0 1px #94a3b8; }
.timeline-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.timeline-item h4 { margin: 0; font-size: 12px; line-height: 1.45; }
.timeline-item > p { margin: 6px 0 0; color: var(--muted-strong); font-size: 11px; line-height: 1.6; }
.evidence-quote { margin: 8px 0 0; padding: 9px 10px; border-left: 2px solid #315d82; border-radius: 0 5px 5px 0; background: #f8fafc; color: #273548; font-size: 11px; line-height: 1.6; }
.evidence-quote small { display: block; margin-bottom: 3px; color: #64748b; font-size: 9px; }
.source-link { display: inline-flex; margin-top: 8px; color: #1d4ed8; font-size: 10px; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.drawer-empty { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; max-width: min(420px, calc(100vw - 32px)); padding: 9px 13px; border: 1px solid #27272a; border-radius: 6px; background: #18181b; color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: 160ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.periodic-view { display: grid; gap: 14px; }
.periodic-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.periodic-summary article { min-width: 0; padding: 13px 15px; border-right: 1px solid var(--border); }
.periodic-summary article:last-child { border-right: 0; }
.periodic-summary span, .periodic-summary strong { display: block; }
.periodic-summary span { color: var(--muted); font-size: 10px; }
.periodic-summary strong { margin-top: 4px; font-size: 21px; letter-spacing: -.03em; }
.periodic-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.periodic-filters { display: grid; grid-template-columns: minmax(240px, 1.7fr) repeat(4, minmax(120px, .65fr)); gap: 7px; padding: 9px; border-bottom: 1px solid var(--border); background: #fafafa; }
.periodic-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 8px 11px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.periodic-toolbar div { display: flex; align-items: baseline; gap: 9px; }
.periodic-toolbar strong { color: var(--text); font-size: 11px; }
.periodic-toolbar .periodic-toolbar-actions { align-items: center; gap: 12px; }
.periodic-table-scroll { max-height: calc(100vh - 260px); }
.periodic-table { min-width: 2180px; }
.periodic-table th { position: sticky; top: 0; z-index: 2; white-space: nowrap; }
.periodic-table td { min-width: 104px; max-width: 180px; vertical-align: top; }
.periodic-table th:nth-child(2), .periodic-table td:nth-child(2) { position: sticky; left: 0; z-index: 1; min-width: 176px; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
.periodic-table th:nth-child(2) { z-index: 3; background: #f8f8f8; }
.metric-value { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-value.is-negative { color: #b42318; }
.metric-note { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.periodic-status { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 7px; border: 1px solid var(--border-strong); border-radius: 999px; background: #fff; color: var(--text); font-size: 9px; white-space: nowrap; }
.periodic-status--applied { border-color: #b7d8c4; background: #f1faf4; color: #17633a; }
.periodic-status--review { border-color: #e7c879; background: #fff9e8; color: #7a5400; }
.periodic-evidence-button { appearance: none; padding: 0; border: 0; background: transparent; color: #1d4ed8; font: inherit; cursor: pointer; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .filter-row { grid-template-columns: minmax(260px, 1fr) repeat(3, 132px); }
  .main-content { padding-inline: 20px; }
  .topbar { padding-inline: 20px; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding: 0; }
  .brand-copy small, .sidebar-label, .sidebar-status { display: none; }
  .side-nav { display: flex; margin-top: 10px; gap: 6px; overflow-x: auto; }
  .side-link { width: auto; min-width: 112px; border: 1px solid var(--border); }
  .topbar { height: 50px; padding: 0 14px; }
  .breadcrumb { display: none; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .main-content { padding: 18px 14px 36px; }
  .page-heading { margin-bottom: 14px; }
  .page-heading h1 { font-size: 22px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 88px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-controls { align-items: flex-start; flex-direction: column; }
  .dashboard-year-filter { width: 100%; justify-content: space-between; }
  .chart-card--wide { grid-column: auto; }
  .bar-chart--columns { grid-template-columns: 1fr; }
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .filter-row .select-field:last-child { grid-column: 1 / -1; }
  .periodic-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .periodic-summary article:nth-child(2) { border-right: 0; }
  .periodic-summary article:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .periodic-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .periodic-filters .search-field { grid-column: 1 / -1; }

  .table-scroll { overflow: visible; }
  .data-table { min-width: 0; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tbody { padding: 0; }
  .data-table tr { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); padding: 12px; border-bottom: 1px solid var(--border); }
  .data-table td { height: auto; min-height: 0; padding: 4px 6px; border: 0; }
  .data-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; }
  .data-table td:nth-child(1) { grid-row: span 2; }
  .data-table td:nth-last-child(1) { grid-column: 1 / -1; }
  .events-table td:nth-child(4), .events-table td:nth-child(5), .events-table td:nth-child(8) { display: none; }
  .announcements-table tr { grid-template-columns: 88px minmax(0, 1fr); }
  .announcements-table td:nth-child(5), .announcements-table td:nth-child(7) { display: none; }
  .announcements-table td:nth-child(4) { grid-column: 2; }
  .periodic-table-scroll { max-height: none; overflow-x: auto; }
  .periodic-table { display: table; min-width: 2180px; }
  .periodic-table thead { display: table-header-group; }
  .periodic-table tbody { display: table-row-group; padding: 0; }
  .periodic-table tr { display: table-row; padding: 0; }
  .periodic-table td { display: table-cell; width: auto; padding: 8px 10px; border-bottom: 1px solid var(--border); }
  .periodic-table td::before { display: none; }
  .periodic-table td:nth-child(1), .periodic-table td:nth-last-child(1) { grid-row: auto; grid-column: auto; }
  .evidence-link { margin-top: 3px; }
  .pagination-pages .page-button:not(.is-active) { display: none; }
}

@media (max-width: 520px) {
  .data-date { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-heading-actions { display: none; }
  .metric-grid { gap: 7px; }
  .metric-card { min-height: 80px; padding: 11px 12px; }
  .metric-card strong { font-size: 21px; }
  .filter-row { grid-template-columns: 1fr; }
  .search-field, .filter-row .select-field:last-child { grid-column: auto; }
  .periodic-filters { grid-template-columns: 1fr; }
  .periodic-filters .search-field { grid-column: auto; }
  .periodic-toolbar { align-items: flex-start; flex-direction: column; }
  .table-toolbar { align-items: flex-start; flex-direction: column; padding-block: 8px; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .detail-drawer .drawer-panel { width: 100%; }
  .drawer-header { padding: 18px 16px 14px; }
  .drawer-section { padding: 16px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 74px minmax(0, 1fr) 66px; }
  .year-row { grid-template-columns: 46px minmax(0, 1fr) 82px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation-duration: .001ms !important; }
}
