/* Shared visual language with UCIFI's Faculty Discipline page.
   Chart, table, and interaction layout rules remain in styles.css. */
:root {
  --brand: #176b73;
  --brand-dark: #10545b;
  --ink: #203c3f;
  --body: #354a4c;
  --muted: #5a6e70;
  --line: #d4e4e3;
  --paper: #ffffff;
  --bg: #f6f9f8;
  --blue: #176b73;
  --teal: #27694f;
  --gold: #a16f26;
  --slate: #789d99;
  --amber-bg: #fff6e4;
  --focus: #a56316;
  --radius: 5px;
}

body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.site-container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* Organization header and full-width title area. */
.masthead {
  color: var(--ink);
  background: #ffffff;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  max-width: none;
  min-height: 92px;
  padding: 20px 0;
  gap: 24px;
}
.brand {
  color: var(--brand);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 1.5px;
}
.brand:hover { color: var(--brand-dark); }
.brand span {
  color: var(--ink);
  border-color: #c1d7d5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.site-return {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-return:hover { text-decoration: underline; }
.site-return span { font-size: 20px; font-weight: 400; }
.dashboard-hero {
  color: #ffffff;
  background: var(--brand);
}
.hero-inner { padding: 28px 0 30px; }
.hero-overline {
  margin: 0 0 10px;
  color: #c9e6e3;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dashboard-hero h1 {
  max-width: 1000px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -.025em;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 14px;
  color: #d6ecea;
  font-size: 13px;
}
.hero-meta span + span {
  border-left: 1px solid #679a9e;
  padding-left: 24px;
}

/* A centered content column, matching the parent website. */
main.site-container { max-width: none; padding: 22px 0 56px; }
.tabs {
  gap: 34px;
  margin-bottom: 28px;
  border-color: #c2d8d6;
  scrollbar-width: thin;
  scrollbar-color: #b1d0cc transparent;
}
.tabs button {
  padding: 15px 0 17px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.tabs button:hover { color: var(--brand); }
.tabs button[aria-selected=true] {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.controls {
  padding: 22px 24px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  gap: 16px;
}
.controls label { color: var(--ink); font-size: 13px; gap: 7px; }
.controls label:first-child { min-width: 240px; flex: 1 1 270px; }
.controls label:nth-child(2) { min-width: 190px; flex: 0 1 230px; }
select {
  background-color: #ffffff;
  border-color: #b7cecc;
  border-radius: 3px;
  font-size: 14px;
}
.action, .quiet { border-radius: 3px; font-size: 13px; }
.action {
  background: var(--brand);
  border-color: var(--brand);
  padding-inline: 18px;
}
.action:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.quiet { color: var(--brand); }
.quiet:hover { background: #e8f1f0; }
.scope-note { color: var(--muted); border-left-color: #b1cfcc; }
.scope-note strong { color: var(--ink); }
.scope-note.warning { color: #795216; border-color: var(--gold); }
.section-heading { margin: 28px 0 20px; align-items: flex-start; }
.section-heading > div { min-width: 0; }
.section-heading .muted { max-width: 800px; line-height: 1.7; }
h2 { font-size: 27px; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 19px; font-weight: 650; }
.eyebrow { color: var(--brand); font-size: 12px; letter-spacing: .13em; }
.source-link { padding-top: 5px; font-size: 13px; color: var(--brand); }

/* Teal accents tie the data views to the Faculty Discipline page. */
.metrics { gap: 18px; margin-bottom: 26px; }
.metric {
  padding: 22px;
  border-top-color: #82b2af;
  box-shadow: 0 2px 8px rgba(25, 68, 66, .025);
}
.metric:first-child { border-top-color: var(--brand); }
.metric:nth-child(3) { border-top-color: var(--teal); }
.metric:nth-child(4) { border-top-color: var(--gold); }
.metric-label { min-height: 22px; font-size: 13px; }
.metric-value { font-size: 39px; font-weight: 650; margin: 6px 0 9px; }
.metric-detail { font-size: 12px; line-height: 1.6; }
.grid-two { gap: 24px; margin-bottom: 24px; }
.panel {
  padding: 24px;
  box-shadow: 0 2px 8px rgba(25, 68, 66, .025);
}
.panel-heading p { font-size: 13px; line-height: 1.65; }
.panel-heading { gap: 18px; }
.caption { color: var(--muted); line-height: 1.7; }
.trend-chart { border-color: #bad1ce; }
.trend-bar { border-radius: 2px 2px 0 0; }
.trend-label, .trend-value { font-size: 13px; }
.trend-column:hover .trend-bar { background: var(--brand-dark); }
.bar-track { background: #e8f0ee; }
.bar-row.empty .bar-track { border-color: #c6d9d6; }

/* Source-linked Sankey for the reconciled UC Merced OPHD counts. */
.sankey-panel { margin-bottom: 24px; }
.sankey-panel .panel-heading { margin-bottom: 10px; }
.sankey-intro { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.sankey-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #b1d0cc transparent; }
.sankey-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sankey-svg { display: block; width: 100%; min-width: 940px; height: auto; }
.sankey-band:hover { fill-opacity: .55; }
.sankey-label { pointer-events: none; }
.sankey-reading-note { margin: 12px 0 16px; }
.sankey-scroll-hint { display: none; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.sankey-data { margin-top: 16px; border-top: 1px solid var(--line); }
.sankey-data summary { padding: 14px 0; color: var(--brand); font-size: 14px; font-weight: 600; cursor: pointer; }
.sankey-data summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sankey-data .table-scroll { border: 1px solid var(--line); }
.sankey-data td:last-child { text-align: left; white-space: nowrap; }
@media (max-width: 1040px) {
  .sankey-scroll-hint { display: block; }
  .sankey-panel .panel-heading { flex-wrap: wrap; }
}
@media print {
  .sankey-scroll { overflow: visible; }
  .sankey-svg { min-width: 0; }
  .sankey-scroll-hint { display: none; }
}
.bar-row-head { line-height: 1.5; }
.stacked-bar { background: #e3eeeb; }
.stack-notfound { background: var(--slate); }
.empty-note { background: #eef5f3; }
.tag { background: #e8f1f0; color: var(--brand-dark); }
.tag.amber { background: var(--amber-bg); color: #795216; }
.notice { line-height: 1.75; }
.population { line-height: 1.7; }
.reference-controls label:first-child { max-width: 520px; }
.table-panel { padding: 0; }
.table-title { padding: 22px 24px 16px; }
.table-title p { font-size: 13px; }
thead { background: #e8f1f0; color: var(--ink); }
tbody tr:hover { background: #f3f8f6; }
.row-total { background: #f0f6f4; }
.missing { color: #667d79; }
.table-footer { padding: 16px 24px; line-height: 1.7; }
.public-panel { margin-bottom: 24px; }
.source-card { margin-bottom: 24px; }
.source-top { align-items: flex-start; }
.source-notes, .source-facts, .definitions { line-height: 1.75; }
.source-facts dt { font-weight: 600; }
footer {
  margin-top: 48px;
  padding-top: 24px;
  font-size: 12px;
}
footer > a { font-weight: 600; flex-shrink: 0; text-decoration: none; }
footer > a:hover { text-decoration: underline; }
footer > span { max-width: 570px; text-align: right; }
.skip:focus { outline: 3px solid var(--focus); color: var(--brand); }

@media (max-width: 1050px) {
  .controls { padding: 20px; }
  .controls .action { margin-left: 0; }
  .metrics { gap: 14px; }
  .metric { padding: 18px; }
  .metric-value { font-size: 35px; }
  .grid-two { gap: 20px; }
  .panel { padding: 20px; }
  .table-panel { padding: 0; }
  .trend-chart, .trend-labels { gap: 10px; }
}

@media (max-width: 767px) {
  .site-container { width: calc(100% - 32px); }
  .masthead-inner { min-height: 76px; padding: 17px 0; gap: 18px; }
  .brand { font-size: 27px; }
  .brand span { display: none; }
  .site-return { font-size: 13px; gap: 7px; }
  .hero-inner { padding: 22px 0 24px; }
  .hero-overline { font-size: .72rem; letter-spacing: .11em; }
  .dashboard-hero h1 { font-size: clamp(2rem, 7vw, 2.75rem); line-height: 1.18; }
  .hero-meta { margin-top: 12px; gap: 6px 16px; font-size: 12px; }
  .hero-meta span + span { border: 0; padding-left: 0; }
  main.site-container { padding: 16px 0 40px; }
  .tabs { gap: 25px; margin-bottom: 22px; }
  .tabs button { font-size: 14px; padding: 14px 0; }
  .controls { padding: 18px; gap: 14px; }
  .controls label:first-child, .controls label:nth-child(2) {
    min-width: 0;
    flex: 1 1 200px;
    max-width: none;
  }
  .controls select { width: 100%; min-width: 0; }
  .controls .action, .controls .quiet { flex: 1 1 150px; }
  .reference-controls .action { flex: initial; }
  .section-heading { flex-wrap: wrap; gap: 10px; margin-top: 24px; }
  .section-heading .muted { font-size: 13px; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
  .source-link { white-space: normal; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .metric { padding: 16px; }
  .metric-value { font-size: 32px; }
  .grid-two { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .table-panel { padding: 0; }
  .table-title, .table-footer { padding: 18px 20px; }
  .ucla-metrics, .public-metrics { grid-template-columns: 1fr; }
  .source-top { flex-direction: column; gap: 10px; }
  .source-facts, .definitions { grid-template-columns: 1fr; }
  .source-facts { gap: 4px; }
  .source-facts dd { margin-bottom: 10px; }
  .definitions { gap: 7px; }
  .definitions dd { margin-bottom: 14px; }
  .public-panel .table-scroll { margin: 0; }
  footer { flex-direction: column; gap: 12px; margin-top: 36px; }
  footer > span { text-align: left; }
}

@media print {
  .dashboard-hero { background: #ffffff; color: #000000; }
  .site-container { width: 100%; }
  .hero-inner { padding: 0 0 20px; }
  .dashboard-hero h1 { color: #000000; font-size: 28px; }
  .hero-overline, .hero-meta { color: #333333; }
  main.site-container { padding: 0; }
  .panel, .metric { box-shadow: none; }
  .grid-two { grid-template-columns: 1fr 1fr; }
}
