/* 천국구역 — approved warm charcoal / coral dashboard system */
@font-face {
  font-family: "Pretendard Variable";
  src: url("./vendor/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f8f4f1;
  --surface: #fffdfa;
  --surface-subtle: #f1ece8;
  --text: #1d1614;
  --muted: #615955;
  --line: #d9d3cf;
  --line-soft: #e9e3df;
  --accent: #bb3d31;
  --accent-hover: #a43026;
  --accent-soft: #f8e9e4;
  --dark: #2d2724;
  --success: #37634a;
  --warning: #89620f;
  --radius: 5px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 78px; }
body { margin: 0; min-width: 320px; line-height: 1.55; }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, select, input[type="checkbox"], input[type="radio"] { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: not-allowed; }
button, a, input, select, textarea, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: inherit; text-underline-offset: 3px; }
button svg, a svg { flex: 0 0 auto; }
svg { vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { word-break: keep-all; }
[hidden] { display: none !important; }
input, select, textarea, .stat-value, .data-table, .association-metrics, .chart {
  font-variant-numeric: tabular-nums;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 62px;
  display: flex;
  align-items: stretch;
  gap: 30px;
  padding: 0 max(32px, calc((100vw - 1280px) / 2));
  background: var(--dark);
  color: #fffaf6;
  border-bottom: 1px solid #413936;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 0 auto;
  color: #fffaf6;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.12;
}
.brand-icon { display: block; width: 40px; height: 40px; flex: 0 0 auto; object-fit: contain; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.brand-caption { color: #d2c7c1; font-size: 10px; font-weight: 450; letter-spacing: .04em; line-height: 1.2; }
.skip-link { position: fixed; z-index: 200; top: 10px; left: 18px; transform: translateY(-150%); padding: 9px 14px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 650; text-decoration: none; }
.skip-link:focus { transform: translateY(0); outline-color: #fff; }
.main-nav { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.nav-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 2px 15px 0;
  background: transparent;
  color: #e9e1dd;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.nav-button:hover { background: #3b3330; color: #fff; }
.nav-button.active, .nav-button[aria-current="page"] {
  border-bottom-color: #e67b69;
  color: #fff;
  font-weight: 700;
}
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; }
.header-actions .button { color: #fffaf6; border-color: #756b65; background: transparent; }
.header-actions .button:hover { background: #433a35; }
.header-caption { color: #d2c7c1; font-size: 12px; white-space: nowrap; }

/* Account tools collapse separately from the main screen navigation. */
.mobile-menu-toggle, .header-actions .mobile-data-link { display: none; }
.name-visibility-control { display: flex; align-items: center; flex: 0 0 auto; }
.name-visibility-switch { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 1px solid #756b65; border-radius: 6px; background: transparent; color: #fffaf6; font-size: 12px; font-weight: 550; white-space: nowrap; }
.name-visibility-switch:hover { background: #433a35; }
.name-visibility-switch:disabled { opacity: .55; }
.name-visibility-label { line-height: 1.3; }
.name-visibility-track { position: relative; display: inline-block; flex: 0 0 auto; width: 34px; height: 20px; border: 1px solid #a99b93; border-radius: 20px; background: #5c514b; transition: background-color .16s ease; }
.name-visibility-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fffaf6; transition: transform .16s ease; }
.name-visibility-switch[aria-checked="true"] .name-visibility-track { border-color: #e99787; background: #bb3d31; }
.name-visibility-switch[aria-checked="true"] .name-visibility-track::after { transform: translateX(14px); }
.name-visibility-state { min-width: 13px; font-size: 11px; color: #e9e1dd; }

@media (prefers-reduced-motion: reduce) {
  .name-visibility-track, .name-visibility-track::after { transition: none; }
}

.app-main { max-width: 1360px; padding: 30px 40px 60px; margin: 0 auto; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; width: calc(100% - 80px); max-width: 1280px; margin: 0 auto; padding: 18px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.7; }
.app-footer:empty { display: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading > div:first-child { min-width: 0; }
.page-title { display: inline-block; font-size: 29px; line-height: 1.25; letter-spacing: -1.1px; font-weight: 750; }
.page-title + .badge { margin-left: 12px; vertical-align: 5px; }
.eyebrow { margin-bottom: 6px; font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .02em; }
.page-description { color: var(--muted); margin-top: 8px; font-size: 14px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 30px; background: #eae4df; color: #4c413b; font-size: 12px; line-height: 1.4; white-space: nowrap; font-weight: 500; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.score-badge { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 3px 8px; border: 1px solid #e8cfc8; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-size: 12px; line-height: 1.45; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-badge.is-missing { border-color: var(--line); background: var(--surface-subtle); color: var(--muted); font-weight: 500; }
.score-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; max-width: 100%; min-width: 0; white-space: normal; word-break: keep-all; }
.score-population { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; font-weight: 400; white-space: normal; word-break: keep-all; }
.score-context { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.score-context-detail { display: block; }
.region-score-heading { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.score-comparison { display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface-subtle); font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.score-comparison.above { color: var(--success); border-color: #cbddcd; background: #edf4ec; }
.score-comparison.below { color: #845b18; border-color: #e4d4b2; background: #faf1dd; }
.score-needed { color: #845b18; font-size: 11px; font-weight: 650; line-height: 1.5; white-space: normal; }
.score-comparison-cell { justify-content: flex-end; }
.score-comparison-cell .score-needed { flex-basis: 100%; }
.score-feedback { display: block; max-width: 28rem; margin-top: 5px; color: #755b37; font-size: 11px; font-weight: 450; line-height: 1.5; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.score-components { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.score-components > span { white-space: nowrap; }
.score-components strong { color: var(--text); font-weight: 650; }
.score-criteria { margin: 14px 0; color: var(--muted); font-size: 12px; }
.score-criteria > summary { width: fit-content; cursor: pointer; font-weight: 600; }
.criteria-label { margin-left: 7px; padding-left: 8px; border-left: 1px solid var(--line); font-weight: 450; }
.score-criteria-body { margin-top: 10px; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); line-height: 1.75; word-break: keep-all; }
.score-criteria-body p + p, .score-criteria-body .table-wrap + p { margin-top: 10px; }
.score-criteria-body .table-wrap { margin-top: 10px; }
.score-criteria-body .data-table { font-size: 12px; }
.score-criteria-body .data-table td { white-space: normal; }
.toolbar, .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar { justify-content: space-between; }
.filters { justify-content: flex-end; }
.period-controls { display: flex; flex: 0 1 540px; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; max-width: 540px; margin-left: auto; }
.period-settings-toggle { display: none; }
.period-settings-body { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: 100%; min-width: 0; }
.period-control-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; width: 100%; min-width: 0; }
.period-control-row > .field { min-width: 0; }
.period-control-row > .segmented { max-width: 100%; min-width: 0; }
.period-control-row .segmented > button { flex: 1 1 auto; min-width: 0; white-space: normal; word-break: keep-all; }
.period-control-row select { max-width: 100%; }
.worship-months { display: flex; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; min-width: 0; max-width: 100%; }
.worship-months-label { flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.worship-month-buttons { display: flex; flex: 0 1 auto; gap: 6px; min-width: 0; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.worship-month-button { flex: 0 0 auto; min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.worship-month-button:hover { border-color: var(--accent); }
.worship-month-button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.period-context { max-width: 100%; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: right; word-break: keep-all; overflow-wrap: anywhere; }
.toolbar.search-toolbar { justify-content: flex-start; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline > label { white-space: nowrap; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  min-height: 40px;
  border: 1px solid #cec6c0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  outline-offset: 2px;
  max-width: 100%;
}
input::placeholder, textarea::placeholder { color: #8a8079; opacity: 1; }
input[type="search"] { min-width: 230px; }
select { min-width: 112px; padding-right: 32px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: middle; }
textarea { min-height: 90px; resize: vertical; }
.search-field { flex: 1 1 280px; max-width: 440px; }
.search-field input { width: 100%; }
.field-hint { margin-top: 5px; font-size: 12px; color: var(--muted); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #c9c0ba;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .12s ease, border-color .12s ease;
}
.button:hover { border-color: #96877d; background: #f3eeea; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.secondary { background: var(--surface); }
.button.ghost { background: transparent; }
.button.small { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.button.icon-button { padding: 7px; width: 34px; min-height: 34px; }
.button:disabled, .button[aria-disabled="true"] { background: #e4ded9; border-color: #e4ded9; color: #898079; }
.button.danger { color: var(--accent); border-color: #d6aaa2; }
.text-button { border: 0; padding: 0; color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.segmented { display: inline-flex; border: 1px solid #cdc4bd; border-radius: var(--radius); overflow: hidden; }
.segmented > button { min-height: 38px; padding: 8px 18px; border: 0; background: var(--surface); color: #564a43; font-size: 13px; font-weight: 600; }
.segmented > button + button { border-left: 1px solid #cdc4bd; }
.segmented > button.active, .segmented > button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 24px 0 32px; }
.stat-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { min-width: 0; padding: 3px 28px 5px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat:last-child { padding-right: 0; }
.stat-label { margin-bottom: 10px; color: var(--text); font-size: 16px; font-weight: 700; }
.stat-main { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.stat-value { font-size: 38px; line-height: 1.15; letter-spacing: -1.3px; font-weight: 750; white-space: nowrap; }
.stat-value .unit, .stat-value small { font-size: 20px; margin-left: 3px; letter-spacing: -.4px; font-weight: 650; }
.stat-value.is-missing { color: #81766f; letter-spacing: 0; }
.stat-grid .stat .stat-value.missing { color: #81766f; font-size: 24px; line-height: 1.35; letter-spacing: -.4px; white-space: normal; word-break: keep-all; }
.stat-grid .stat .stat-comparison > .small-value { font-size: 14px; line-height: 1.5; font-weight: 500; letter-spacing: 0; white-space: normal; }
.info-button { display: inline-flex; justify-content: center; align-items: center; width: 17px; height: 17px; padding: 0; margin-left: 3px; border: 1px solid #ab9a8e; border-radius: 50%; background: transparent; color: #827064; font-family: inherit; font-size: 11px; line-height: 1; font-weight: 600; vertical-align: 1px; }
.info-button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.stat-comparison { color: var(--text); font-size: 12px; line-height: 1.5; }
.stat-main > .stat-comparison { padding-left: 16px; border-left: 1px solid var(--line); }
.stat-comparison > span { display: block; color: var(--muted); }
.stat-comparison strong { display: block; font-size: 21px; font-weight: 700; line-height: 1.35; }
.stat-detail { color: var(--muted); font-size: 13px; margin-top: 9px; }
.stat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 16px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.stat-meta > span + span { border-left: 1px solid var(--line); padding-left: 16px; }
.stat-grid.compact { margin: 16px 0 20px; }
.stat-grid.compact .stat-value { font-size: 29px; }
.stat-grid.compact .stat-label { font-size: 14px; margin-bottom: 8px; }
.stat-grid.compact .stat-value .unit { font-size: 16px; }
.stat-grid.activity-grid { border-top: 1px solid var(--line); padding-top: 18px; }

.section { margin-top: 30px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.section-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.section-title { font-size: 20px; line-height: 1.4; font-weight: 750; letter-spacing: -.45px; }
.section-subtitle { color: var(--muted); font-size: 12px; font-weight: 400; }
.section-rule { border-top: 1px solid var(--line); padding-top: 22px; }
.section-note, .page-footnote { color: var(--muted); font-size: 12px; line-height: 1.7; }
.section-note { margin-top: 10px; }
.page-footnote { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

.monthly-highlights { padding: 22px 0 0; border-top: 1px solid var(--line); }
.highlight-section-heading { align-items: center; }
.highlight-period { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 4px 10px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.highlight-period strong { color: var(--text); font-weight: 650; }
.highlight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.highlight-grid.region-highlight-grid { grid-template-columns: minmax(0, 1fr); }
.regional-highlights .highlight-winner { padding: 13px 20px; }
.regional-highlights .highlight-name { font-size: 22px; }
.regional-highlights .highlight-population { margin-top: 3px; }
.highlight-card { min-width: 0; border: 1px solid #dfc5bc; border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.highlight-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 47px; padding: 11px 20px; border-bottom: 1px solid #ecd9d2; background: var(--accent-soft); }
.highlight-card-heading h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: #873c30; font-size: 14px; line-height: 1.4; font-weight: 700; }
.highlight-symbol { width: 22px; height: 22px; flex: 0 0 auto; }
.highlight-status { flex: 0 1 auto; color: #8a5144; font-size: 11px; line-height: 1.5; text-align: right; word-break: keep-all; }
.highlight-winners { padding: 0; margin: 0; list-style: none; }
.highlight-winners > li + li { border-top: 1px solid var(--line-soft); }
.highlight-winner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-width: 0; padding: 19px 20px 17px; border: 0; border-radius: 0; background: transparent; text-align: left; }
.highlight-winner:hover { background: #faf1eb; }
.highlight-winner:focus-visible { outline-offset: -4px; }
.highlight-organization { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.highlight-parent { color: var(--muted); font-size: 12px; word-break: keep-all; overflow-wrap: anywhere; }
.highlight-name { color: var(--text); font-size: 25px; line-height: 1.3; letter-spacing: -.6px; font-weight: 750; word-break: keep-all; overflow-wrap: anywhere; }
.highlight-population { margin-top: 7px; color: var(--muted); font-size: 11px; word-break: keep-all; }
.highlight-score { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 3px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.highlight-score > strong { color: var(--accent); font-size: 32px; line-height: 1.2; font-weight: 750; letter-spacing: -.7px; }
.highlight-score small { margin-left: 3px; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.highlight-link { color: #8c4c3e; font-size: 11px; margin-top: 4px; }
.highlight-link > span { padding-left: 3px; }
.highlight-more { border-top: 1px solid var(--line-soft); }
.highlight-more > summary { padding: 11px 20px; color: #8c4c3e; font-size: 12px; cursor: pointer; }
.highlight-more[open] > summary { border-bottom: 1px solid var(--line-soft); }
.highlight-empty { display: flex; flex-direction: column; justify-content: center; gap: 7px; min-height: 131px; padding: 20px; color: var(--muted); font-size: 12px; line-height: 1.65; word-break: keep-all; }
.highlight-empty strong { color: #62534b; font-size: 15px; font-weight: 650; }
.highlight-card.is-empty { border-color: var(--line); }
.highlight-card.is-empty .highlight-card-heading { border-color: var(--line-soft); background: var(--surface-subtle); }
.highlight-card.is-empty .highlight-card-heading h3, .highlight-status.is-empty { color: var(--muted); }
.highlight-footnote { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.highlight-footnote > p { margin: 0; }
.highlight-rules { max-width: 100%; }
.highlight-rules > summary { color: #705b4e; cursor: pointer; text-align: right; }
.highlight-rules[open] { flex: 1 0 100%; }
.highlight-rules[open] > summary { text-align: left; }
.highlight-rules > div { margin-top: 7px; padding: 12px 16px; border-left: 2px solid #cbb8aa; background: var(--surface-subtle); word-break: keep-all; }
.highlight-rules p + p { margin-top: 5px; }

.table-wrap { width: 100%; overflow-x: auto; scrollbar-color: #c4b7ae transparent; }
.data-table, .mapping-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.data-table th, .data-table td, .mapping-table th, .mapping-table td { padding: 13px 14px; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
.data-table th, .mapping-table th { padding-top: 11px; padding-bottom: 11px; background: var(--surface-subtle); border-top: 1px solid var(--line); border-bottom-color: var(--line); font-weight: 650; line-height: 1.4; white-space: nowrap; }
.data-table tbody th, .mapping-table tbody th { background: transparent; border-top: 0; border-bottom-color: var(--line-soft); font-weight: 650; }
.data-table tbody th:first-child { padding-left: 18px; }
.data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
.data-table .num, .data-table th.num, .data-table td.num, .mapping-table .num { text-align: right; }
.data-table .num { font-variant-numeric: tabular-nums; }
.metric-table tr > :not(:first-child):not(.chevron):not(.table-action) { border-left: 1px solid var(--line-soft); }
.data-table th.table-action, .data-table td.table-action { width: 24px; padding-left: 2px; padding-right: 10px; }
.data-table .center, .data-table th.center, .data-table td.center { text-align: center; }
.data-table .strong, .data-table strong { font-weight: 700; }
.data-table tbody tr.clickable, .data-table tbody tr[data-action] { cursor: pointer; }
.data-table tbody tr.clickable:hover, .data-table tbody tr[data-action]:hover { background: #f0e9e3; }
.data-table tbody tr.active, .data-table tbody tr.selected, .data-table tbody tr[aria-selected="true"] { background: var(--accent-soft); }
.data-table tbody tr.active > :first-child, .data-table tbody tr.selected > :first-child, .data-table tbody tr[aria-selected="true"] > :first-child { box-shadow: inset 3px 0 0 var(--accent); }
.data-table tfoot, .data-table tr.total { background: var(--surface-subtle); font-weight: 700; }
.data-table tfoot td { border-top: 1px solid var(--line); }
.data-table .row-link { color: inherit; text-decoration: none; font-weight: 650; }
.data-table .row-link:hover { color: var(--accent); text-decoration: underline; }
.data-table .row-chevron { color: #88776b; font-size: 20px; width: 24px; padding-left: 2px; padding-right: 8px; text-align: right; }
.data-table .chevron { width: 24px; padding-left: 2px; padding-right: 10px; color: #88776b; font-size: 22px; line-height: 1; text-align: right; }
.data-table .id-cell { font-size: 12px; color: var(--muted); letter-spacing: -.15px; white-space: nowrap; }
.data-table .row-head { white-space: nowrap; font-weight: 650; }
.data-table .cell-note { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; margin-top: 5px; white-space: nowrap; }
.data-table .cell-note > span + span { margin-left: 10px; }
.data-table th .cell-note { margin-top: 3px; line-height: 1.3; }
.data-table .missing { color: #94857b; }
.data-table .table-empty { padding: 32px 14px; text-align: center; color: var(--muted); }
.data-table.dense th, .data-table.dense td { padding-top: 10px; padding-bottom: 10px; }
.data-table .wrap { white-space: normal; min-width: 160px; }
.bar-cell { display: flex; flex-direction: row-reverse; align-items: center; gap: 12px; min-width: 160px; }
.bar-cell > strong, .bar-cell > span:first-child { min-width: 47px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { height: 7px; min-width: 64px; flex: 1 1 auto; overflow: hidden; border-radius: 4px; background: #e3ded9; }
.bar-fill { display: block; height: 100%; max-width: 100%; border-radius: 4px; background: var(--accent); }
.bar-fill.muted { background: #a89c93; }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 26px; }
.chart-grid.region-charts { grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); }
.chart-panel { min-width: 0; }
.chart-panel + .chart-panel { border-left: 1px solid var(--line); padding-left: 28px; }
.chart-panel .section-heading { margin-bottom: 14px; }
.chart-panel .section-title { font-size: 17px; }
.chart { width: 100%; min-height: 190px; font-variant-numeric: tabular-nums; }
.chart svg, svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: inherit; font-size: 11px; fill: var(--muted); }
.chart .chart-axis, .chart .axis { stroke: #cfc5bd; stroke-width: 1; }
.chart text.chart-axis, .chart text.axis { stroke: none; fill: var(--muted); font-weight: 400; }
.chart .chart-gridline, .chart .grid-line { stroke: #e8e0da; stroke-width: 1; }
.chart .chart-line, .chart .data-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .chart-dot, .chart .data-point { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.chart .chart-average, .chart .average-line { fill: none; stroke: #9a8e85; stroke-width: 1; stroke-dasharray: 4 4; }
.chart .chart-value, .chart .value-label { fill: var(--text); font-weight: 650; }
.chart .chart-area { fill: #f3dfd8; opacity: .5; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.source-categories { display: grid; gap: 10px; margin-top: 16px; }
.source-category { display: grid; grid-template-columns: 80px minmax(0, 1fr) 60px; align-items: center; gap: 12px; min-width: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.source-category > :first-child { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.source-category > :last-child { text-align: right; white-space: nowrap; }
.source-category-track { display: block; height: 8px; min-width: 0; overflow: hidden; border-radius: 4px; background: #e3ded9; }
.source-category-fill { display: block; height: 100%; max-width: 100%; border-radius: 4px; background: #b66d60; }
.source-summary-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-top: 16px; font-size: 13px; font-variant-numeric: tabular-nums; }
.source-summary-row strong { font-weight: 650; }
.source-info-note { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.legend-swatch { display: inline-block; width: 20px; height: 2px; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.activity-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.activity-list li { display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.activity-list time { color: var(--muted); }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 180px; padding: 32px 24px; background: #f2ede8; color: var(--muted); text-align: center; line-height: 1.7; }
.empty-state strong { display: block; font-size: 15px; font-weight: 650; color: #51443c; margin-bottom: 7px; }
.empty-state p { max-width: 460px; }
.empty-state .button { margin-top: 16px; }
.empty-state.compact { min-height: 120px; padding: 24px; }
.notice { padding: 12px 16px; border-left: 3px solid #b1a093; background: #eee6de; color: #5c4b40; font-size: 13px; line-height: 1.65; margin-bottom: 20px; }
.notice strong { font-weight: 650; }
.notice p + p { margin-top: 6px; }
.notice.warning { border-color: #ac8536; background: #f4ecda; color: #70531d; }
.notice.error { border-color: var(--accent); background: #f8e6e1; color: #8b2f25; }
.notice.success { border-color: #5c8268; background: #eaf0e9; color: #3e5c45; }
.notice.inline-notice { margin: 8px 0 0; }
.source-notice { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-top: 30px; margin-bottom: 0; }
.source-notice > span { flex: 1 1 480px; }
.source-notice .button { flex: 0 0 auto; }

.association-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0 24px; }
.association-option { display: block; min-width: 0; padding: 17px 18px 15px; border: 0; border-left: 1px solid var(--line-soft); border-bottom: 2px solid transparent; background: transparent; text-align: left; cursor: pointer; }
.association-option:first-child { border-left: 0; }
.association-option:hover { background: #f1e9e2; }
.association-option.active, .association-option[aria-pressed="true"] { border-bottom-color: var(--accent); background: var(--accent-soft); }
.association-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; font-weight: 750; margin-bottom: 11px; }
.association-option.active .association-title { color: var(--accent); }
.association-title-scored { flex-wrap: wrap; gap: 7px; margin-bottom: 0; }
.association-title-scored .score-name { gap: 6px; }
.association-score-population { margin: 7px 0 12px; }
.association-metrics { display: grid; grid-template-columns: 1fr 1fr .75fr; gap: 10px; font-size: 11px; color: var(--muted); }
.association-metrics > * + * { border-left: 1px solid var(--line); padding-left: 10px; }
.association-metric-label { display: block; min-height: 30px; line-height: 1.35; word-break: keep-all; }
.association-metrics strong { display: block; color: var(--text); font-size: 19px; font-weight: 700; line-height: 1.4; margin-top: 3px; }

.people-layout { display: grid; grid-template-columns: minmax(260px, .62fr) minmax(0, 1.38fr); gap: 30px; align-items: start; }
.people-list { min-width: 0; }
.people-list .data-table { font-size: 13px; }
.people-list .data-table td { padding-top: 17px; padding-bottom: 17px; }
.people-list .data-table .cell-note { white-space: normal; }
.people-list .table-wrap { max-height: 610px; overflow: auto; }
.people-list .data-table thead { position: sticky; top: 0; z-index: 1; }
.person-detail { min-width: 0; border-left: 1px solid var(--line); padding-left: 30px; }
.person-detail .page-title { font-size: 28px; }
.person-detail > .section-heading { margin-bottom: 12px; }
.person-detail > .section-heading > div { display: block; }
.person-name { margin-bottom: 4px; font-size: 28px; line-height: 1.25; letter-spacing: -.8px; font-weight: 750; }
.person-name-scored { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.person-score-badge { padding: 2px 6px; font-size: 11px; line-height: 1.4; letter-spacing: 0; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-meta > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-meta dt, .detail-meta .label { color: var(--muted); }
.detail-meta dd { margin: 0; font-weight: 650; }
.person-detail .stat-grid { margin: 18px 0 24px; }
.person-detail .stat { padding-left: 18px; padding-right: 18px; }
.person-detail .stat:first-child { padding-left: 0; }
.person-detail .stat:last-child { padding-right: 0; }
.person-detail .stat-value { font-size: 29px; }
.person-detail .stat-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.person-detail .stat-value .unit { font-size: 16px; }
.person-offering { margin-top: 22px; }
.offering-import-note { margin: 0 0 14px; }
.offering-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.offering-status-item { min-width: 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.offering-status-item dt { color: var(--muted); font-size: 13px; font-weight: 500; }
.offering-state { display: inline-flex; margin: 10px 0 0; padding: 4px 10px; border-radius: 30px; background: var(--surface-subtle); color: var(--text); font-size: 15px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.offering-state.participating { background: var(--accent-soft); color: var(--accent); }
.offering-state.unconfirmed { color: var(--muted); }
.tabs { display: flex; align-items: stretch; gap: 12px; border-bottom: 1px solid var(--line); margin: 18px 0 24px; overflow-x: auto; scrollbar-width: thin; }
.tab { border: 0; border-bottom: 3px solid transparent; padding: 12px 16px 11px; background: transparent; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--muted); }
.tab:hover { color: var(--text); background: #f2ebe5; }
.tab.active, .tab[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 700; }
.tabs .tab-caption { margin-left: auto; align-self: center; padding-left: 16px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.pagination > div { display: flex; align-items: center; gap: 8px; }

.workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; margin: 28px 0; padding: 4px 0 25px; border-bottom: 1px solid var(--line); }
.step { position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding-right: 14px; color: var(--muted); }
.step:not(:last-child)::after { content: ""; position: absolute; left: 47px; right: -13px; top: 17px; height: 1px; background: #cfc4ba; z-index: 0; }
.step > div:last-child { position: relative; z-index: 1; background: var(--bg); padding-right: 8px; }
.step-number { display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; flex: 0 0 auto; border: 1px solid #c7bbb1; border-radius: 50%; background: var(--bg); color: #84756b; font-size: 16px; font-weight: 650; position: relative; z-index: 1; }
.step strong { display: block; color: var(--text); font-size: 14px; font-weight: 650; }
.step small { display: block; font-size: 11px; margin-top: 3px; line-height: 1.5; }
.step.complete .step-number, .step.active .step-number { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.complete::after { background: var(--accent); }
.dropzone { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; min-height: 230px; padding: 35px 28px; border: 1px dashed #b3a398; border-radius: var(--radius); background: #f4eee8; text-align: center; color: var(--muted); }
.dropzone strong { display: block; color: var(--text); font-size: 18px; font-weight: 650; }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone p { font-size: 13px; }
.dropzone-icon { color: #958171; margin-bottom: 3px; }
.dropzone h2 { color: var(--text); font-size: 18px; font-weight: 650; }
.upload-mark { width: 36px; height: 40px; display: flex; align-items: center; justify-content: center; color: #958171; font-size: 38px; font-weight: 350; line-height: 1; }
.dropzone.is-busy { opacity: .7; }
.password-panel { padding: 28px 0; max-width: 720px; }
.password-panel > p { margin-top: 8px; font-size: 13px; }
.password-panel .toolbar { align-items: flex-end; justify-content: flex-start; gap: 12px; }
.password-panel .field { min-width: min(100%, 280px); }
.file-summary { display: grid; grid-template-columns: minmax(220px, 1.7fr) minmax(110px, 1fr) minmax(110px, 1fr) auto; align-items: center; gap: 22px; padding: 18px 0 24px; border-bottom: 1px solid var(--line); }
.file-summary > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.file-summary .label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.file-summary strong { display: block; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.import-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .9fr); gap: 28px; margin-top: 26px; }
.import-layout > :nth-child(2) { min-width: 0; border-left: 1px solid var(--line); padding-left: 28px; }
.import-layout > :first-child { min-width: 0; }
.mapping-table { font-size: 12px; }
.mapping-table th, .mapping-table td { padding: 11px 12px; }
.mapping-table select { width: 100%; min-width: 0; min-height: 34px; padding: 6px 26px 6px 9px; font-size: 12px; }
.import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.import-actions .action-help { color: var(--muted); font-size: 12px; margin-left: 5px; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #64564a; white-space: nowrap; }
.status.error { color: var(--accent); }
.status.warning { color: #8a6526; }
.status.success { color: var(--success); }
.status.pending { color: #84776d; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.settings-group { padding: 20px 0; border-top: 1px solid var(--line); }
.settings-group h3 { font-size: 16px; margin-bottom: 12px; }
.role-options { max-height: 330px; overflow-y: auto; margin-top: 16px; padding: 0 8px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-color: #b9aa9f transparent; scrollbar-width: thin; }
.role-options .checkbox-row { margin: 0; padding: 10px 6px; border-bottom: 1px solid var(--line-soft); }
.role-options .checkbox-row:last-child { border-bottom: 0; }
.role-options .checkbox-row:hover { background: #f0e8e1; }
.role-options .checkbox-row > .muted { margin-left: auto; padding-left: 8px; flex: 0 0 auto; white-space: nowrap; font-size: 12px; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.template-grid .button { min-height: 54px; justify-content: flex-start; white-space: normal; text-align: left; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 8px 0; }
.checkbox-row input { flex: 0 0 auto; margin-top: 3px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgb(29 22 20 / 45%); }
.modal { width: min(100%, 540px); max-height: calc(100dvh - 48px); overflow-y: auto; background: var(--bg); border: 1px solid #cdbeb2; border-radius: 6px; padding: 28px; }
.modal.wide { width: min(100%, 800px); }
.modal h2 { font-size: 22px; letter-spacing: -.4px; margin-bottom: 12px; }
.modal .modal-copy { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.modal .field + .field { margin-top: 16px; }
.modal .field input, .modal .field select { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 150; display: flex; align-items: center; gap: 16px; max-width: min(90vw, 640px); padding: 13px 20px; background: var(--dark); color: #fff; border-radius: 5px; font-size: 13px; }
.toast button { border: 0; background: transparent; color: #fff; padding: 2px 4px; }
.loading-indicator { width: 16px; height: 16px; display: inline-block; border: 2px solid #d8c2b9; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.loading-state { min-height: 50vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.muted { color: var(--muted); }
.accent-text { color: var(--accent); }
.text-right { text-align: right; }
.no-wrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 1600px) {
  .app-main { padding-top: 38px; }
  .page-heading { margin-bottom: 28px; }
  .stat-grid { margin-top: 28px; margin-bottom: 38px; }
}
@media (max-width: 1120px) {
  .app-header { gap: 20px; padding-left: 24px; padding-right: 24px; }
  .nav-button { padding-left: 11px; padding-right: 11px; }
  .header-caption { display: none; }
  .app-main { padding-left: 28px; padding-right: 28px; }
  .app-footer { width: calc(100% - 56px); margin-left: 28px; margin-right: 28px; }
  .stat { padding-left: 20px; padding-right: 20px; }
  .stat-main { gap: 12px; }
  .stat-main > .stat-comparison { padding-left: 12px; }
  .stat-value { font-size: 35px; }
  .stat-comparison strong { font-size: 18px; }
  .association-option { padding-left: 13px; padding-right: 13px; }
  .association-metrics { gap: 8px; }
  .association-metrics strong { font-size: 17px; }
  .people-layout { grid-template-columns: minmax(240px, .62fr) minmax(0, 1.38fr); gap: 22px; }
  .person-detail { padding-left: 22px; }
}
@media (max-width: 960px) {
  html { scroll-padding-top: 128px; }
  .app-header { flex-wrap: wrap; gap: 0 20px; padding-top: 14px; }
  .brand { min-height: 36px; font-size: 22px; }
  .brand-icon { width: 36px; height: 36px; border-radius: 8px; }
  .header-actions { min-height: 34px; }
  .main-nav { order: 3; flex: 1 0 100%; overflow-x: auto; margin-top: 8px; scrollbar-width: none; gap: 8px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-button { min-height: 47px; padding: 7px 15px 5px; }
  .nav-button:first-child { margin-left: -10px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .page-heading .filters { margin-left: auto; }
  .period-controls { flex: 1 1 100%; }
  .stat-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .stat-grid.cols-4 .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat-grid.cols-4 .stat:nth-child(2) { padding-right: 0; }
  .stat-grid > .stat .stat-main { display: block; }
  .stat-grid > .stat .stat-main > .stat-comparison { border-left: 0; padding-left: 0; margin-top: 10px; }
  .stat-grid > .stat .stat-main > .stat-comparison strong, .stat-grid > .stat .stat-main > .stat-comparison span { display: inline; font-size: 12px; }
  .stat-grid > .stat .stat-main > .stat-comparison strong { margin-left: 6px; font-weight: 700; }
  .chart-grid { gap: 22px; }
  .chart-panel + .chart-panel { padding-left: 22px; }
  .chart-grid.region-charts { grid-template-columns: 1fr; }
  .chart-grid.region-charts .chart-panel + .chart-panel { border-left: 0; padding-left: 0; }
  .association-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .association-option:nth-child(odd) { border-left: 0; }
  .association-option:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .association-metrics strong { font-size: 19px; }
  .people-layout { grid-template-columns: 1fr; gap: 28px; }
  .people-list .table-wrap { max-height: 310px; }
  .person-detail { padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px solid var(--line); }
  .person-detail .stat-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .person-detail .stat-grid.cols-4 .stat:nth-child(3) { border-left: 1px solid var(--line); padding-left: 18px; }
  .person-detail .stat-grid.cols-4 .stat:nth-child(2) { padding-right: 18px; }
  .import-layout { grid-template-columns: 1fr; }
  .import-layout > :nth-child(2) { border-left: 0; padding-left: 0; padding-top: 22px; border-top: 1px solid var(--line); }
  .workflow { gap: 15px; }
  .step { gap: 8px; padding-right: 3px; }
  .step-number { width: 29px; height: 29px; font-size: 14px; }
  .step:not(:last-child)::after { top: 14px; left: 36px; }
  .step small { display: none; }
  .file-summary { grid-template-columns: minmax(200px, 1.5fr) 1fr 1fr; gap: 16px; }
  .file-summary > .button { justify-self: start; }
}
@media (max-width: 640px) {
  :root { font-size: 13px; }
  .app-header { padding: 12px 18px 0; }
  .brand { gap: 10px; font-size: 21px; }
  .brand-icon { width: 32px; height: 32px; border-radius: 7px; }
  .brand-caption { font-size: 9px; }
  .header-actions .button { min-height: 30px; padding: 5px 10px; font-size: 11px; }
  .main-nav { gap: 0; }
  .nav-button { min-height: 45px; font-size: 12px; padding-left: 12px; padding-right: 12px; }
  .nav-button:first-child { margin-left: -8px; }
  .app-main { padding: 24px 18px 44px; }
  .app-footer { width: calc(100% - 36px); margin-left: 18px; margin-right: 18px; padding-bottom: 22px; font-size: 10px; }
  .page-heading { gap: 16px; margin-bottom: 18px; }
  .page-title { font-size: 25px; letter-spacing: -.8px; }
  .page-title + .badge { vertical-align: 4px; margin-left: 7px; }
  .badge { padding: 3px 8px; font-size: 10px; }
  .score-badge { padding: 3px 7px; font-size: 11px; }
  .score-context { font-size: 11px; }
  .score-name { gap: 5px 6px; }
  .page-heading > .filters { flex: 1 0 100%; justify-content: flex-start; }
  .period-controls { align-items: flex-start; width: 100%; max-width: none; margin-left: 0; }
  .period-control-row { justify-content: flex-start; gap: 8px; }
  .period-control-row > .field { flex: 1 1 120px; }
  .period-control-row > .field select { width: 100%; }
  .worship-months { justify-content: flex-start; }
  .period-context { font-size: 11px; text-align: left; }
  .page-heading > .button { margin-left: auto; }
  .toolbar, .filters { gap: 8px; }
  .toolbar.search-toolbar { margin-bottom: 20px; padding-bottom: 18px; }
  .search-field { flex-basis: calc(100% - 80px); max-width: none; }
  .search-toolbar > .field { flex: 1 1 95px; }
  input[type="search"] { min-width: 0; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { min-height: 38px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
  select { min-width: 94px; max-width: 100%; padding-left: 10px; padding-right: 26px; }
  .button { min-height: 38px; padding: 8px 12px; font-size: 12px; }
  .segmented > button { min-height: 36px; padding: 8px 13px; font-size: 12px; }
  .stat-grid { grid-template-columns: 1fr; gap: 20px; margin: 22px 0 28px; }
  .stat { padding: 0 0 20px; border-left: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; padding-bottom: 0; }
  .stat-label { font-size: 14px; margin-bottom: 8px; }
  .info-button { width: 21px; height: 21px; font-size: 12px; }
  .stat-value { font-size: 37px; }
  .stat-value .unit, .stat-value small { font-size: 20px; }
  .stat-grid > .stat .stat-main { display: flex; gap: 18px; }
  .stat-grid > .stat .stat-main > .stat-comparison { border-left: 1px solid var(--line); padding-left: 15px; margin-top: 0; }
  .stat-grid > .stat .stat-main > .stat-comparison > span { display: block; font-size: 11px; }
  .stat-grid > .stat .stat-main > .stat-comparison strong { display: block; margin-left: 0; font-size: 19px; }
  .stat-meta { margin-top: 10px; gap: 8px 14px; }
  .stat-meta > span + span { padding-left: 14px; }
  .stat-grid.cols-4, .stat-grid.cols-2, .stat-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
  .stat-grid.cols-4 .stat, .stat-grid.cols-2 .stat, .stat-grid.compact .stat { border-bottom: 0; padding: 0 16px; border-left: 1px solid var(--line); }
  .stat-grid.cols-4 .stat:nth-child(odd), .stat-grid.cols-2 .stat:nth-child(odd), .stat-grid.compact .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat-grid.cols-4 .stat:nth-child(even), .stat-grid.cols-2 .stat:nth-child(even), .stat-grid.compact .stat:nth-child(even) { padding-right: 0; }
  .stat-grid.cols-4 .stat-value { font-size: 29px; }
  .stat-grid.cols-4 .stat-main, .stat-grid.compact .stat-main { display: block; }
  .stat-grid.cols-4 .stat-main > .stat-comparison, .stat-grid.compact .stat-main > .stat-comparison { margin-top: 6px; padding: 0; border: 0; }
  .stat-grid.cols-4 .stat-main > .stat-comparison > span, .stat-grid.cols-4 .stat-main > .stat-comparison > strong, .stat-grid.compact .stat-main > .stat-comparison > span, .stat-grid.compact .stat-main > .stat-comparison > strong { display: inline; font-size: 11px; }
  .stat-grid.cols-4 .stat-main > .stat-comparison > strong, .stat-grid.compact .stat-main > .stat-comparison > strong { margin-left: 5px; }
  .section { margin-top: 26px; }
  .section-heading { flex-wrap: wrap; gap: 8px; align-items: flex-start; }
  .section-title { font-size: 18px; }
  .section-subtitle { font-size: 11px; }
  .monthly-highlights { padding-top: 18px; }
  .highlight-section-heading { gap: 7px; }
  .highlight-period { flex-basis: 100%; justify-content: flex-start; font-size: 11px; text-align: left; }
  .highlight-grid { grid-template-columns: 1fr; gap: 12px; }
  .highlight-card-heading { padding: 10px 16px; }
  .highlight-winner { padding: 17px 16px 15px; gap: 12px; }
  .highlight-name { font-size: 24px; }
  .highlight-score > strong { font-size: 30px; }
  .highlight-footnote { align-items: flex-start; gap: 6px 12px; font-size: 10.5px; }
  .highlight-rules > summary { text-align: left; }
  .highlight-more > summary { padding-left: 16px; padding-right: 16px; }
  .highlight-empty { min-height: 115px; padding: 18px 16px; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 11px 12px; }
  .data-table th:first-child, .data-table td:first-child, .data-table tbody th:first-child { padding-left: 12px; }
  .bar-cell { min-width: 140px; gap: 8px; }
  .chart-grid { grid-template-columns: 1fr; gap: 28px; }
  .chart-panel + .chart-panel { border-left: 0; padding-left: 0; }
  .chart { min-height: 170px; }
  .chart text { font-size: 11px; }
  .source-category { grid-template-columns: 72px minmax(0, 1fr) 56px; gap: 9px; font-size: 12px; }
  .source-summary-row { gap: 7px 14px; font-size: 12px; }
  .source-info-note { font-size: 11px; }
  .association-option { padding: 13px 10px; }
  .association-title { font-size: 14px; margin-bottom: 9px; }
  .association-metrics { gap: 6px; font-size: 10px; }
  .association-metrics > * + * { padding-left: 6px; }
  .association-metrics strong { font-size: 16px; }
  .person-detail .page-title { font-size: 25px; }
  .person-name { font-size: 25px; }
  .offering-status-grid { gap: 8px; }
  .offering-status-item { padding: 13px 10px; }
  .offering-status-item dt { font-size: 12px; }
  .offering-state { font-size: 14px; padding-left: 8px; padding-right: 8px; }
  .person-detail .stat-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-detail .stat-grid.cols-4 .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .person-detail .stat-grid.cols-4 .stat:nth-child(2) { padding-right: 0; }
  .detail-meta { gap: 10px 20px; padding: 13px 0; font-size: 12px; }
  .tabs { gap: 2px; margin-top: 16px; margin-bottom: 20px; }
  .tab { font-size: 12px; padding: 10px 12px; }
  .tabs .tab-caption { display: none; }
  .workflow { gap: 10px; margin: 24px 0; }
  .step { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
  .step strong { font-size: 11px; }
  .step > div:last-child { padding: 0; }
  .step:not(:last-child)::after { left: 32px; right: 0; }
  .step-number { width: 27px; height: 27px; font-size: 13px; }
  .file-summary { grid-template-columns: 1fr 1fr; padding-top: 10px; gap: 16px; }
  .file-summary > div:first-child { grid-column: 1 / -1; }
  .file-summary > div:nth-child(2) { border-left: 0; padding-left: 0; }
  .file-summary > div:nth-child(3) { padding-left: 16px; }
  .file-summary strong { font-size: 14px; }
  .file-summary > .button { grid-column: 1 / -1; }
  .dropzone { min-height: 215px; padding: 28px 18px; }
  .dropzone strong { font-size: 16px; }
  .dropzone h2 { font-size: 16px; }
  .template-grid { grid-template-columns: 1fr; gap: 9px; }
  .password-panel .field { min-width: 0; flex: 1 1 180px; }
  .import-actions .action-help { flex-basis: 100%; margin-left: 0; }
  .settings-grid { grid-template-columns: 1fr; gap: 8px; }
  .modal-backdrop { padding: 14px; }
  .modal { padding: 22px; max-height: calc(100dvh - 28px); }
  .modal h2 { font-size: 20px; }
  .toast { width: calc(100% - 36px); max-width: none; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  body { background: #fff; font-size: 10pt; }
  .app-header, .filters, .period-controls, .toolbar, .tabs, .pagination, .button, .modal-backdrop, .toast, .skip-link { display: none !important; }
  .app-main { padding: 0; max-width: none; }
  .page-title { font-size: 22pt; }
  .table-wrap { overflow: visible; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { border-bottom: 0; border-left: 1px solid #ccc; padding: 0 16px; }
  .stat:first-child { border-left: 0; padding-left: 0; }
  .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section, .stat-grid, .chart-panel, tr { break-inside: avoid; }
  .data-table th { background: #f1ece8 !important; }
  .notice { border: 1px solid #ddd; }
  .people-list { display: none; }
  .people-layout { display: block; }
  .person-detail { border: 0; padding: 0; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Additional source metrics share the approved typography and table system. */
.extended-section { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 34px; }
.metric-tabs { margin-top: 12px; margin-bottom: 22px; gap: 8px; }
.metric-tabs .tab { padding-left: 17px; padding-right: 17px; }
.mini-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 10px 0 22px; gap: 0; }
.mini-metrics.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-metrics.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 650px; }
.mini-metric { min-width: 0; padding: 0 24px; border-left: 1px solid var(--line); }
.mini-metric:first-child { padding-left: 0; border-left: 0; }
.mini-metric:last-child { padding-right: 0; }
.mini-metric > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.mini-metric > strong { display: block; font-size: 29px; font-weight: 750; line-height: 1.25; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.mini-metric > small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.bounded-table { max-height: 400px; overflow: auto; scrollbar-color: #c4b7ae transparent; }
.bounded-table thead { position: sticky; top: 0; z-index: 2; }
.comparison-details { margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.comparison-details > summary, .record-details > summary, .coverage-details > summary { cursor: pointer; padding: 13px 0; font-size: 13px; font-weight: 650; color: var(--text); }
.comparison-details[open] > summary, .coverage-details[open] > summary { padding-bottom: 15px; }
.comparison-details .table-wrap { margin-bottom: 2px; }
.compact-categories { max-width: 700px; }
.compact-categories .source-category { grid-template-columns: 90px minmax(0, 1fr) 70px; }
.source-link { font-size: 11.5px; white-space: nowrap; }
.person-source-records .data-table { font-size: 12px; }
.person-source-records .data-table th, .person-source-records .data-table td { padding: 10px 11px; }
.person-source-records .data-table .wrap { min-width: 160px; }
.person-source-records .section:first-child { margin-top: 0; }
.record-details { border-top: 1px solid var(--line-soft); margin-top: 12px; }
.record-details > p { margin: 8px 0 15px; font-size: 12px; white-space: pre-wrap; }
.record-details h3 { font-size: 14px; margin: 18px 0 10px; }
.candidate-records { border: 1px solid var(--line); padding: 0 16px 12px; background: var(--surface); }
.candidate-records .section-note { margin: 0 0 14px; }
.coverage-details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 16px; }
.coverage-details .table-wrap { margin-bottom: 16px; }
.raw-source-heading { margin-top: 26px; }
.raw-source-toolbar { justify-content: flex-start; align-items: flex-end; gap: 12px; margin: 18px 0; }
.raw-source-toolbar .search-field { flex: 1 1 240px; max-width: 420px; }
.raw-source-toolbar > .field:first-child select { min-width: 160px; }
.raw-source-toolbar .raw-header-option { min-height: 40px; align-items: center; margin: 0 0 0 auto; font-size: 12px; }
.raw-source-note { margin-bottom: 14px; }
.source-error-note { padding: 10px 13px; margin-bottom: 14px; background: var(--accent-soft); border-left: 2px solid var(--accent); color: #7a3328; font-size: 12px; }
.raw-table-wrap { max-height: 620px; overflow: auto; border: 1px solid var(--line); }
.raw-table { width: max-content; min-width: 100%; font-size: 12px; }
.raw-table th, .raw-table td { min-width: 118px; max-width: 260px; padding: 10px 12px; }
.raw-table thead { position: sticky; top: 0; z-index: 3; }
.raw-table thead th { white-space: normal; min-width: 118px; max-width: 240px; vertical-align: top; border-top: 0; }
.raw-table th:first-child { position: sticky; left: 0; min-width: 74px; width: 74px; background: var(--surface-subtle); text-align: center; padding: 8px; z-index: 2; }
.raw-table thead th:first-child { z-index: 4; }
.raw-table tbody th:first-child { font-size: 11px; box-shadow: 1px 0 0 var(--line); }
.raw-column-letter { display: block; margin-bottom: 5px; font-size: 10px; color: var(--muted); font-weight: 500; }
.raw-value { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.raw-blank { color: #a99c93; }
.raw-row-button { border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; padding: 3px 8px; min-height: 28px; cursor: pointer; }
.raw-row-button:hover { background: var(--accent-soft); }
.raw-value.source-error { background: #faeee9; color: #a33327; font-weight: 600; }
.formula-indicator { display: inline-block; margin-left: 8px; color: #8b7d72; font-size: 11px; font-weight: 650; }
.source-row-focus > * { background: var(--accent-soft) !important; }
.raw-formula { min-width: 200px; max-width: 400px; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.6; }
.modal .raw-value { min-width: 160px; max-width: 380px; }
@media (max-width: 960px) {
  .mini-metric { padding-left: 17px; padding-right: 17px; }
  .mini-metric > strong { font-size: 26px; }
  .raw-source-toolbar .raw-header-option { margin-left: 0; }
}
@media (max-width: 640px) {
  .extended-section { margin-top: 28px; padding-top: 20px; }
  .metric-tabs { gap: 0; }
  .metric-tabs .tab { padding-left: 12px; padding-right: 12px; }
  .mini-metrics, .mini-metrics.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
  .mini-metric:nth-child(odd) { padding-left: 0; border-left: 0; }
  .mini-metric:nth-child(even) { padding-right: 0; }
  .mini-metric > strong { font-size: 26px; }
  .mini-metric > span, .mini-metric > small { font-size: 11px; }
  .mini-metrics.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coverage-details { padding-left: 12px; padding-right: 12px; }
  .raw-source-toolbar > .field:first-child { flex: 1 1 100%; }
  .raw-source-toolbar > .field:first-child select { width: 100%; }
  .raw-source-toolbar .search-field { flex-basis: calc(100% - 75px); }
  .raw-source-toolbar .raw-header-option { font-size: 11px; }
  .raw-table-wrap { max-height: 500px; }
  .raw-table th, .raw-table td { min-width: 102px; max-width: 210px; }
  .raw-table th:first-child { min-width: 62px; width: 62px; }
  .bounded-table { max-height: 340px; }
}
@media print {
  .mini-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mini-metric > strong { font-size: 20pt; }
  .bounded-table, .raw-table-wrap { max-height: none; overflow: visible; }
  .raw-row-button { color: inherit; text-decoration: none; }
  .comparison-details, .coverage-details, .record-details { break-inside: avoid; }
}
:root { --loading-track: #e9e1dc; }
.loading-state progress { display: block; width: min(280px, 85%); height: 6px; margin: 24px auto 0; border: 0; border-radius: 999px; overflow: hidden; accent-color: #bd4e3b; background: var(--loading-track); }
.loading-state progress::-webkit-progress-bar { background: var(--loading-track); border-radius: 999px; }
.loading-state progress::-webkit-progress-value { background: #bd4e3b; border-radius: 999px; transition: width 180ms ease; }
.loading-state progress::-moz-progress-bar { background: #bd4e3b; border-radius: 999px; }

/* Meeting reports: five shared metrics, readable comparisons and weekly trends. */
.main-metrics-section { margin-top: 22px; }
.main-metrics-section .table-wrap { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.main-metrics-table { width: 100%; min-width: 690px; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.main-metrics-table th, .main-metrics-table td { width: 20%; padding: 14px 18px; text-align: left; vertical-align: top; white-space: normal; }
.main-metrics-table th { padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); background: var(--surface-subtle); color: var(--text); font-size: 15px; line-height: 1.4; font-weight: 700; }
.main-metrics-table td { padding-top: 16px; padding-bottom: 18px; }
.main-metrics-table th + th, .main-metrics-table td + td { border-left: 1px solid var(--line-soft); }
.main-metric-value { display: block; color: var(--text); font-size: 29px; font-weight: 750; line-height: 1.3; letter-spacing: -.75px; overflow-wrap: anywhere; }
.main-metric-value small, .main-metric-value .unit { font-size: .58em; letter-spacing: 0; margin-left: 3px; }
.main-metric-value.is-missing, .main-metrics-table td.is-missing .main-metric-value { color: var(--muted); font-size: 20px; letter-spacing: -.2px; }
.main-metric-detail { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
.main-metric-basis { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; word-break: keep-all; }

.association-comparison .data-table { min-width: 790px; font-size: 15px; line-height: 1.5; }
.association-comparison .data-table th, .association-comparison .data-table td { padding: 15px 14px; }
.association-comparison .data-table th { font-size: 13px; }
.association-comparison .data-table .row-head { min-width: 175px; font-size: 16px; }
.association-comparison .data-table .cell-note { font-size: 12px; }
.association-comparison .bar-cell { min-width: 128px; gap: 8px; }
.association-comparison .score-badge { font-size: 12px; }
.association-comparison .score-population { font-size: 12px; }

.weekly-trends { padding-top: 20px; border-top: 1px solid var(--line); }
.weekly-trends .weekly-trend-grid { margin-top: 14px; gap: 24px; align-items: stretch; }
.weekly-trend-grid.is-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.weekly-trend-grid.is-association { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.weekly-trend-grid .chart-panel + .chart-panel { padding-left: 24px; }
.weekly-trend-grid .section-heading { margin-bottom: 10px; }
.weekly-trend-grid .section-title { font-size: 16px; line-height: 1.45; }
.weekly-trend-grid .chart { min-height: 155px; }
.weekly-trend-grid .chart text { font-size: 17px; }
.weekly-trend-grid .chart text.chart-value { font-size: 18px; }
.weekly-trend-grid .chart-note { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; word-break: keep-all; }
.weekly-trend-grid .empty-state { min-height: 155px; padding: 22px 14px; font-size: 12px; }
.weekly-trend-grid .empty-state strong { font-size: 14px; }

.regional-score-list { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0 0 16px; }
.regional-score-link { display: flex; align-items: center; min-width: 0; max-width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 14px; text-align: left; }
button.regional-score-link:hover { border-color: #bda89a; background: var(--surface-subtle); }
button.regional-score-link:focus-visible { outline-offset: 2px; }
.regional-score-link .score-name { gap: 5px 7px; line-height: 1.45; }
.regional-score-link .score-name > span:first-child { font-weight: 650; }
.regional-score-link .score-badge { padding: 2px 6px; }
.regional-score-link .score-comparison { padding: 2px 5px; }
.regional-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.regional-metric-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.regional-metric-panel > h3 { margin: 0 0 14px; color: var(--text); font-size: 17px; line-height: 1.4; letter-spacing: -.25px; }
.regional-metric-panel > .chart-note { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.regional-bars { display: grid; gap: 4px; padding: 0; margin: 0; list-style: none; }
.regional-bars > li { min-width: 0; }
.regional-bar-row { display: grid; grid-template-columns: minmax(58px, .32fr) minmax(40px, 1fr) minmax(64px, auto); align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 8px 4px; border: 0; border-radius: 3px; background: transparent; color: var(--text); text-align: left; font-variant-numeric: tabular-nums; }
button.regional-bar-row:hover { background: var(--surface-subtle); }
button.regional-bar-row:focus-visible { outline-offset: 0; }
.regional-bar-label { min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.regional-bar-track { display: block; min-width: 0; height: 10px; overflow: hidden; border-radius: 3px; background: #e9e1dc; }
.regional-bar-fill { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: #b65c4e; }
.regional-bar-value { min-width: 0; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.4; text-align: right; white-space: nowrap; }
.regional-bar-value > small { display: block; max-width: 100%; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.35; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.regional-bar-row.is-missing .regional-bar-track { height: 0; border-top: 1px dashed #d2c7bf; background: transparent; }
.regional-bar-row.is-missing .regional-bar-value { color: var(--muted); font-size: 12px; font-weight: 450; }
.regional-comparison > .section-note { max-width: 85ch; }

.highlight-card.is-attention { border-color: #d7cbb7; }
.highlight-card.is-attention .highlight-card-heading { border-bottom-color: #e4dac8; background: #f2ece0; }
.highlight-card.is-attention .highlight-card-heading h3, .highlight-card.is-attention .highlight-status { color: #725a34; }
.highlight-card.is-attention .highlight-score > strong { color: #806338; }
.highlight-card.is-attention .highlight-link, .highlight-card.is-attention .highlight-more > summary { color: #725a34; }
.highlight-card.is-attention .highlight-winner:hover { background: #f7f2e9; }
.monthly-highlights.has-attention .highlight-winner { padding-top: 15px; padding-bottom: 14px; }
.monthly-highlights.has-attention .highlight-name { font-size: 23px; }
.monthly-highlights.has-attention .highlight-score > strong { font-size: 29px; }
.meeting-score-criteria { margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.meeting-score-criteria > h3 { margin-bottom: 7px; color: var(--text); font-size: 15px; line-height: 1.4; }
.meeting-score-criteria > p { line-height: 1.7; }
.meeting-score-criteria .table-wrap { margin-top: 10px; }
.meeting-score-criteria .data-table { table-layout: fixed; }
.meeting-score-criteria .data-table th:first-child { width: 18%; }
.meeting-score-criteria .data-table th:last-child { width: 16%; }
.meeting-score-criteria .data-table td { white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  .weekly-trend-grid.is-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekly-trend-grid.is-overview > .chart-panel:first-child { grid-column: 1 / -1; }
  .weekly-trend-grid.is-overview > .chart-panel:nth-child(2) { border-left: 0; padding-left: 0; }
  .weekly-trend-grid.is-overview > .chart-panel:first-child .chart { max-height: 240px; }
  .regional-metric-panel { padding: 16px; }
  .regional-bar-row { grid-template-columns: minmax(50px, .3fr) minmax(30px, 1fr) minmax(60px, auto); gap: 9px; }
}
@media (max-width: 640px) {
  .main-metrics-section { margin-top: 18px; }
  .main-metrics-table { min-width: 640px; }
  .main-metrics-table th, .main-metrics-table td { padding-left: 13px; padding-right: 13px; }
  .main-metrics-table th { font-size: 14px; }
  .main-metric-value { font-size: 27px; }
  .main-metric-basis { font-size: 11px; }
  .association-comparison .data-table { font-size: 14px; }
  .association-comparison .data-table th, .association-comparison .data-table td { padding: 13px 12px; }
  .association-comparison .data-table .row-head { font-size: 15px; }
  .weekly-trends .weekly-trend-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .weekly-trend-grid.is-overview > .chart-panel:first-child { grid-column: auto; }
  .weekly-trend-grid .chart-panel + .chart-panel { border-left: 0; border-top: 1px solid var(--line-soft); padding: 18px 0 0; }
  .weekly-trend-grid .chart { min-height: 160px; }
  .regional-score-list { gap: 7px; margin-bottom: 14px; }
  .regional-score-link { min-height: 44px; font-size: 13px; }
  .regional-chart-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .regional-metric-panel { padding: 16px 14px; }
  .regional-metric-panel > h3 { font-size: 16px; }
  .regional-bar-row { min-height: 44px; }
  .regional-bar-label { font-size: 14px; }
  .regional-bar-value { font-size: 15px; }
}
