/* 桂冠綠 + 土豪金 BI 戰情風格 */
:root {
  --green: #0a5a2e;
  --green-1: #0a5a2e;
  --green-2: #08471f;
  --green-3: #156c3a;
  --green-light: #e8f1eb;
  --gold: #c8a64b;
  --gold-2: #b08c2f;
  --gold-3: #e8d27a;
  --bg: #f6f5f0;
  --panel: #ffffff;
  --panel-2: #faf8f1;
  --border: #e3decf;
  --text: #1d2417;
  --text-muted: #6b7363;
  --text-soft: #8a9085;
  --shadow: 0 1px 2px rgba(10,40,20,.04), 0 8px 24px rgba(10,40,20,.06);
  --radius: 10px;
  --radius-sm: 6px;
  --fs: 14px;
}

[data-theme="dark"] {
  --green: #1c8049;
  --green-1: #1c8049;
  --green-2: #0e5e34;
  --green-3: #2da267;
  --green-light: #143523;
  --gold: #d4b35d;
  --gold-2: #c79a3a;
  --gold-3: #f0d97e;
  --bg: #0e1813;
  --panel: #16221c;
  --panel-2: #1d2c24;
  --border: #2a3a30;
  --text: #ecebe1;
  --text-muted: #aab2a6;
  --text-soft: #7d8a82;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs);
  line-height: 1.55;
  font-feature-settings: "tnum";
}

/* ===== Top brand strip ===== */
.brand-strip {
  background: linear-gradient(180deg, var(--green-2), var(--green));
  color: #fff;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 3px solid var(--gold);
}
.brand-mark { display: flex; align-items: center; gap: 14px; }
.brand-logo-wrap {
  width: 56px; height: 56px;
  background: #fff; border-radius: 8px;
  padding: 4px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.brand-logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-logo-fallback {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #f0d97e; font-weight: 800; font-size: 13px; letter-spacing: .5px;
  border-radius: 4px;
  align-items: center; justify-content: center;
}
.brand-text h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.brand-text p { margin: 2px 0 0; font-size: 11.5px; opacity: .85; letter-spacing: .5px; }
.brand-meta { display: flex; align-items: center; gap: 18px; font-size: 12px; }
.brand-meta a { color: var(--gold-3); text-decoration: none; border-bottom: 1px dashed var(--gold-3); }
.lang-switch { display: flex; gap: 4px; background: rgba(0,0,0,.18); border-radius: 100px; padding: 3px; }
.lang-switch button {
  background: transparent; color: #fff; border: 0; padding: 4px 12px;
  font-size: 12px; cursor: pointer; border-radius: 100px;
}
.lang-switch button.on { background: var(--gold); color: var(--green-2); font-weight: 700; }

/* ===== Sub header ===== */
.sub-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 8px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 2px 8px rgba(10,40,20,.05);
}
.crumb { font-size: 12px; color: var(--text-muted); }
.crumb b { color: var(--green); }

/* ===== Filter bar ===== */
.filter-bar {
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.chip {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 5px 11px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  transition: all .15s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--green); }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.chip.gold.on { background: var(--gold); color: var(--green-2); border-color: var(--gold); }
.divider { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }

select.unit-select {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  min-width: 140px;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  gap: 2px;
  overflow-x: auto;
  position: sticky; top: 49px; z-index: 25;
}
.tab {
  background: transparent;
  border: 0;
  padding: 12px 18px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  font-family: inherit;
  font-weight: 500;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap;
  transition: all .15s;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--green); border-bottom-color: var(--gold); font-weight: 700; }
.tab-icon {
  width: 18px; height: 18px; display: inline-block;
  background: currentColor; opacity: .9;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

/* ===== Main content ===== */
.main { padding: 22px 28px 60px; max-width: 1640px; margin: 0 auto; }

/* ===== Section ===== */
.section { margin-bottom: 30px; }
.section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
  border-bottom: 2px solid var(--green);
  padding-bottom: 8px;
}
.section-head h2 {
  margin: 0; font-size: 20px; font-weight: 700; color: var(--green);
  display: flex; align-items: center; gap: 10px;
}
.section-head h2::before {
  content: ""; display: inline-block; width: 4px; height: 22px;
  background: var(--gold); border-radius: 2px;
}
.section-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--text-muted); }
.section-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* ===== Card ===== */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* allow tooltips to escape card edges */
  overflow: visible;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  position: relative;
}
.card-head { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.card-foot { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 16px 10px; gap: 10px;
  border-bottom: 1px dashed var(--border);
}
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--text); }
.card-sub { font-size: 11.5px; color: var(--text-muted); display: block; margin-top: 2px; }
.card-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.card-body { padding: 14px 16px; flex: 1; }
.card-foot { padding: 8px 16px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-muted); background: var(--panel-2); }

/* ===== Grid layouts ===== */
.grid { display: grid; gap: 16px; }
.g-12 { grid-template-columns: repeat(12, 1fr); }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: span 12; }
@media (max-width: 1100px) {
  .span-3, .span-4 { grid-column: span 6; }
  .span-5, .span-7, .span-8, .span-9 { grid-column: span 12; }
}
@media (max-width: 640px) {
  .span-3, .span-4, .span-6 { grid-column: span 12; }
}

/* ===== KPI ===== */
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  box-shadow: var(--shadow);
}
.kpi-card:nth-child(2n) { border-left-color: var(--gold); }
.kpi-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.kpi-value { font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -.5px; font-family: "Noto Serif TC", "PingFang TC", serif; }
.kpi-unit { font-size: 13px; color: var(--text-muted); margin-left: 4px; font-weight: 500; }
.kpi-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.kpi-trend { margin-top: 8px; }

/* ===== SDG badges ===== */
.sdg-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.sdg-badge {
  width: 26px; height: 26px;
  border-radius: 4px;
  color: #fff; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: help;
  font-family: "Helvetica", sans-serif;
}
.sdg-badges.mini .sdg-badge { width: 20px; height: 20px; font-size: 10.5px; border-radius: 3px; }

/* ===== Bar chart ===== */
.chart-wrap { position: relative; }
.chart-area {
  position: relative;
  padding: 18px 16px 40px 60px;
  min-height: 240px;
  box-sizing: border-box;
}
.chart-grid { position: absolute; inset: 18px 16px 40px 60px; pointer-events: none; }
.grid-line {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed rgba(120,130,110,.18);
}
.grid-line:first-child { border-top: 1px solid var(--border); }
.grid-label {
  position: absolute; left: -56px; top: 0;
  transform: translateY(-50%);
  font-size: 10.5px; color: var(--text-soft);
  width: 50px; text-align: right;
  font-feature-settings: "tnum";
  background: var(--panel);
  padding: 0 4px 0 0;
  line-height: 1.2;
}
.bars {
  display: flex; gap: 6px;
  height: 100%;
  align-items: flex-end; position: relative;
}
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; position: relative; cursor: pointer; min-width: 0; }
.bar-stack {
  width: 100%; height: 100%;
  display: flex; align-items: flex-end; gap: 3px;
  padding: 0 8%;
}
.bar {
  flex: 1; min-height: 2px;
  border-radius: 3px 3px 0 0;
  transition: opacity .15s;
  min-width: 4px;
}
.bar-group:hover .bar { opacity: .8; }
.bar-label {
  position: absolute; top: calc(100% + 4px);
  left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap;
  font-feature-settings: "tnum";
  text-align: center;
  max-width: 95%;
  overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
/* Long-label charts: rotate to avoid collision */
.chart-wrap.rotate-x .chart-area { padding-bottom: 70px; }
.chart-wrap.rotate-x .chart-grid { bottom: 70px; }
.chart-wrap.rotate-x .bar-label {
  transform: translateX(-50%) rotate(-30deg);
  transform-origin: top center;
  top: calc(100% + 6px);
  max-width: none;
}

/* tooltip */
.tooltip {
  position: absolute;
  bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--border);
  padding: 8px 10px; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  z-index: 50; min-width: 140px;
  pointer-events: none;
}
.tt-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; color: var(--green); }
.tt-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 1px 0; }
.tt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tt-label { flex: 1; color: var(--text-muted); }
.tt-val { font-weight: 700; color: var(--text); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; padding: 0 4px; }
.legend-item { font-size: 11.5px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; }

/* line chart */
.plot-area {
  position: absolute;
  top: 18px; right: 16px; bottom: 40px; left: 60px;
}
.line-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.point-overlay {
  position: absolute; inset: 0; pointer-events: none;
}
.data-point {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  transform: translate(-50%, 50%);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,.1);
}
.hover-zones { position: absolute; inset: 0; pointer-events: none; }
.hover-zone {
  position: absolute; top: 0; bottom: 0; width: 8%;
  transform: translateX(-50%);
  pointer-events: auto;
}
.hover-zone.active { background: rgba(200,166,75,.08); }
.x-labels {
  display: flex; justify-content: space-between;
  padding: 8px 16px 0 60px; font-size: 11px;
  color: var(--text-muted);
  font-feature-settings: "tnum";
}
.line-tt { min-width: 160px; }
.tooltip.tt-flip-left {
  left: auto; right: 0;
  transform: translateX(0);
}
.tooltip.tt-flip-right {
  left: 0;
  transform: translateX(0);
}
/* tall bars: place tooltip beside top of bar instead of above (avoid card-head clip) */
.tooltip.tt-flip-side {
  bottom: auto; top: 20%;
  left: 100%; margin-left: 8px;
  transform: translateX(0);
}
.tooltip.tt-flip-side.tt-flip-left {
  left: auto; right: 100%;
  margin-left: 0; margin-right: 8px;
}
.tooltip.tt-flip-left.line-tt {
  right: 100%;
  margin-right: 10px;
  bottom: auto; top: 50%;
  transform: translateY(-50%);
}
.tooltip.tt-flip-right.line-tt {
  left: 100%;
  margin-left: 10px;
  bottom: auto; top: 50%;
  transform: translateY(-50%);
}

/* H bar list */
.hbar-list { display: flex; flex-direction: column; gap: 6px; }
.hbar-row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr 60px;
  align-items: center; gap: 12px;
}
.hbar-name {
  font-size: 12px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.hbar-track {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px; height: 22px; position: relative;
  display: flex; align-items: center;
  overflow: hidden;
}
.hbar-fill { height: 100%; transition: width .4s; }
.hbar-val {
  font-size: 12px; font-weight: 700;
  color: var(--text);
  font-feature-settings: "tnum";
  text-align: right;
  padding-left: 4px;
}
.hbar-val-inline {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 700;
  color: var(--text);
  font-feature-settings: "tnum";
  text-shadow: 0 0 4px rgba(255,255,255,.6);
  pointer-events: none;
}
.hbar-list.compact .hbar-row { grid-template-columns: minmax(100px, 160px) 1fr; }
.hbar-list.compact .hbar-val { display: none; }

/* ===== Donut ===== */
.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.dl-row {
  display: grid; grid-template-columns: 14px 1fr auto auto; gap: 8px; align-items: center;
  padding: 4px 6px; border-radius: 4px; font-size: 11.5px; cursor: pointer;
}
.dl-row:hover, .dl-row.active { background: var(--panel-2); }
.dl-dot { width: 10px; height: 10px; border-radius: 50%; }
.dl-name { color: var(--text); }
.dl-val { font-weight: 700; }
.dl-pct { color: var(--text-muted); font-size: 10.5px; min-width: 42px; text-align: right; }

/* ===== Unit highlight states ===== */
.bar-group.bar-dim { opacity: 0.28; transition: opacity .2s; }
.bar-group.bar-hl { opacity: 1; }
.bar-group.bar-hl::before {
  content: ""; position: absolute; inset: -2px -3px 18px -3px;
  background: rgba(200, 166, 75, 0.14); border: 1px solid rgba(200, 166, 75, 0.55);
  border-radius: 4px; pointer-events: none; z-index: 0;
}
.bar-group.bar-hl .bar-label { color: var(--gold-2); font-weight: 700; }
.bar-group.bar-hl .bar { box-shadow: 0 0 0 1px rgba(200,166,75,0.6); }

.hbar-row.hbar-dim { opacity: 0.32; transition: opacity .2s; }
.hbar-row.hbar-hl { background: rgba(200,166,75,0.10); border-radius: 4px; padding: 2px 4px; margin: 0 -4px; }
.hbar-row.hbar-hl .hbar-name { color: var(--gold-2); font-weight: 700; }
.hbar-row.hbar-hl .hbar-fill { box-shadow: 0 0 0 1px rgba(200,166,75,0.7), 0 0 8px rgba(200,166,75,0.3); }
.hbar-row.hbar-hl .hbar-val { color: var(--gold-2); font-weight: 700; }

.dl-row.dim { opacity: 0.4; }
.dl-row.hl { background: rgba(200,166,75,0.12); }
.dl-row.hl .dl-name { color: var(--gold-2); font-weight: 700; }

/* Per-college card highlight (e.g. gradFlow) */
.unit-match > .card {
  outline: 2px solid var(--gold-2); outline-offset: -1px;
  box-shadow: 0 0 0 1px rgba(200,166,75,0.25), 0 8px 24px rgba(200,166,75,0.18);
}
.unit-match > .card .card-head h3 { color: var(--gold-2); }
.unit-dim > .card { opacity: 0.55; transition: opacity .2s; }
.unit-dim > .card:hover { opacity: 1; }

/* ===== Stacked bar ===== */
.stacked-bar { display: flex; border-radius: 6px; overflow: hidden; width: 100%; }
.stacked-seg { transition: opacity .15s; min-width: 1px; }
.stacked-seg:hover { opacity: .8; }

/* 新生身分別 stacked-bar 列 */
.freshman-stack .fs-row {
  display: grid;
  grid-template-columns: 70px 1fr 44px;
  gap: 10px;
  align-items: center;
}
.freshman-stack .fs-name { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.freshman-stack .fs-bar { min-width: 0; }
.freshman-stack .fs-total { font-size: 12px; font-weight: 700; text-align: right; color: var(--text); }
.freshman-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; padding: 6px 8px; background: var(--panel-2); border-radius: 6px; }
.freshman-legend .fl-item { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text); }
.freshman-legend .fl-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ===== Heatmap ===== */
.heatmap { display: flex; flex-direction: column; font-size: 11.5px; overflow-x: auto; }
.hm-row { display: flex; }
.hm-cell {
  flex: 1; min-width: 44px; padding: 6px 4px; text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-feature-settings: "tnum";
  box-sizing: border-box;
}
.hm-row:first-child .hm-cell { border-top: 1px solid var(--border); }
.hm-row .hm-cell:first-child { border-left: 1px solid var(--border); }
.hm-corner, .hm-row-head, .hm-col-head { background: var(--panel-2); font-weight: 600; }
.hm-row-head { min-width: 160px; flex: 0 0 160px; text-align: left; padding-left: 10px; }
.hm-corner { min-width: 160px; flex: 0 0 160px; }
.hm-col-head, .hm-corner { padding: 6px 4px; }

/* ===== Insights ===== */
.insight-card {
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.insight-tag {
  display: inline-block; font-size: 10.5px; padding: 2px 8px;
  background: var(--green-light); color: var(--green);
  border-radius: 100px; font-weight: 700; align-self: flex-start;
}
.insight-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.insight-body { font-size: 12px; color: var(--text-muted); line-height: 1.55; }

/* ===== AI insight strip ===== */
.ai-strip {
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #fff; padding: 14px 18px; border-radius: var(--radius);
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 16px;
  border-left: 4px solid var(--gold);
}
.ai-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--gold); color: var(--green-2);
  border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
}
.ai-text { flex: 1; font-size: 12.5px; }
.ai-text b { color: var(--gold-3); }

/* ===== Footer ===== */
.foot {
  margin-top: 40px; padding: 24px 28px;
  background: var(--green-2); color: #fff;
  font-size: 12px;
}
.foot a { color: var(--gold-3); text-decoration: none; }

/* ===== Misc ===== */
.note { font-size: 11px; color: var(--text-soft); padding: 8px 0 0; line-height: 1.5; }
.muted { color: var(--text-muted); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 100px; background: var(--green-light); color: var(--green); font-size: 11px; font-weight: 600; }
.tag.gold { background: rgba(200,166,75,.15); color: var(--gold-2); }

table.data {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  font-feature-settings: "tnum";
  table-layout: fixed;
}
table.data th, table.data td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
table.data th {
  background: var(--panel-2);
  font-weight: 700;
  color: var(--green);
  text-align: right;
  position: sticky;
  top: 0;
  border-bottom: 2px solid var(--green);
}
table.data td:first-child, table.data th:first-child {
  text-align: left;
  font-weight: 500;
}
table.data .num { text-align: right; font-feature-settings: "tnum"; }
table.data tr:hover td { background: var(--panel-2); }

.scroll-x { overflow-x: auto; }

/* Filter highlight when active */
.filter-active-glow {
  box-shadow: 0 0 0 1px var(--gold), 0 4px 12px rgba(200,166,75,.25);
}

/* SDG board */
.sdg-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (max-width: 800px) { .sdg-grid { grid-template-columns: repeat(3, 1fr); } }
.sdg-tile {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; padding: 8px; text-align: center; cursor: pointer;
  transition: transform .15s; position: relative; overflow: hidden;
}
.sdg-tile:hover { transform: translateY(-2px); }
.sdg-tile-num { font-size: 26px; font-weight: 800; }
.sdg-tile-name { font-size: 10.5px; line-height: 1.2; opacity: .95; }
.sdg-tile-count {
  position: absolute; top: 4px; right: 6px;
  background: rgba(0,0,0,.25); padding: 1px 6px; border-radius: 100px;
  font-size: 10px; font-weight: 700;
}
.sdg-tile.dim { opacity: .25; }

/* ===== SDG Campaign Hero ===== */
.sdg-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #063a1d 0%, #0a5a2e 50%, #1c8049 100%);
  color: #fff; padding: 36px 40px 40px;
  margin-bottom: 22px;
  box-shadow: 0 12px 40px -10px rgba(6,58,29,.45);
}
.sdg-hero-bg {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(17, 1fr);
  opacity: .12; pointer-events: none;
  transform: rotate(-8deg) scale(1.4); transform-origin: center;
}
.sdg-hero-chip {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 22px;
  border-radius: 6px; margin: 4px;
}
.sdg-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.sdg-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(240, 217, 126, .18);
  color: #f0d97e;
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid rgba(240, 217, 126, .35);
}
.sdg-hero-dot { width: 6px; height: 6px; border-radius: 50%; background: #f0d97e; box-shadow: 0 0 0 4px rgba(240,217,126,.22); }
.sdg-hero-headline {
  margin: 16px 0 8px;
  font-size: 42px; font-weight: 800; letter-spacing: -.01em;
  line-height: 1.08;
  background: linear-gradient(135deg, #fff 0%, #f0d97e 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sdg-hero-tag {
  font-size: 16px; line-height: 1.55; opacity: .9;
  margin: 0 0 26px; max-width: 620px;
}
.sdg-hero-stats {
  display: flex; gap: 36px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18);
}
.sdg-hero-stats > div { display: flex; flex-direction: column; gap: 2px; }
.sdg-hero-stats b { font-size: 30px; font-weight: 800; color: #f0d97e; font-feature-settings: "tnum"; line-height: 1; }
.sdg-hero-stats span { font-size: 11.5px; opacity: .75; letter-spacing: .04em; }

/* ===== SDG Pillars ===== */
.sdg-pillars {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.sdg-pillar {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  border-top: 3px solid var(--pc, #0a5a2e);
}
.sdg-pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--pc, #0a5a2e) 50%, transparent);
}
.sdg-pillar-head {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px;
}
.sdg-pillar-badges { display: flex; gap: 4px; }
.sdg-pillar-key {
  font-size: 16px; font-weight: 700; color: var(--text);
}
.sdg-pillar-kpi {
  font-size: 20px; font-weight: 800; color: var(--pc, #0a5a2e);
  font-feature-settings: "tnum"; letter-spacing: -.01em;
  margin-bottom: 8px;
}
.sdg-pillar-action {
  font-size: 12px; line-height: 1.5; color: var(--text-muted);
}

/* ===== SDG Commitments ===== */
.sdg-commit {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; height: 100%;
  position: relative; overflow: hidden; min-height: 170px;
  display: flex; flex-direction: column; gap: 8px;
}
.sdg-commit::before {
  content: ""; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  background: linear-gradient(180deg, #0a5a2e, #f0d97e);
}
.sdg-commit-num {
  position: absolute; top: 14px; right: 22px;
  font-size: 64px; font-weight: 800; color: var(--green-light);
  font-feature-settings: "tnum"; letter-spacing: -.04em; line-height: 1;
  opacity: .55;
}
.sdg-commit-icon { font-size: 30px; line-height: 1; margin-bottom: 4px; }
.sdg-commit-title {
  font-size: 19px; font-weight: 700; color: var(--green);
  letter-spacing: -.005em;
}
.sdg-commit-body {
  font-size: 13px; line-height: 1.65; color: var(--text-muted);
  text-wrap: pretty;
}

/* ===== SDG CTA ===== */
.sdg-cta {
  margin-top: 22px;
  background: linear-gradient(135deg, #0a5a2e 0%, #1c8049 100%);
  color: #fff; border-radius: var(--radius);
  padding: 32px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  flex-wrap: wrap;
  box-shadow: 0 12px 40px -10px rgba(10,90,46,.45);
  position: relative; overflow: hidden;
}
.sdg-cta::after {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,217,126,.25), transparent 70%);
}
.sdg-cta-text { position: relative; z-index: 1; }
.sdg-cta-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  color: #f0d97e; text-transform: uppercase; margin-bottom: 6px;
}
.sdg-cta-headline {
  font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2;
  margin-bottom: 6px;
}
.sdg-cta-sub { font-size: 13.5px; opacity: .85; }
.sdg-cta-actions { display: flex; gap: 10px; position: relative; z-index: 1; }
.sdg-cta-btn {
  border: 0; padding: 12px 20px; border-radius: 8px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: transform .15s, background .15s;
  letter-spacing: .01em;
}
.sdg-cta-btn.primary { background: #f0d97e; color: #0a5a2e; }
.sdg-cta-btn.primary:hover { background: #fff; transform: translateY(-2px); }
.sdg-cta-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.sdg-cta-btn.ghost:hover { background: rgba(255,255,255,.12); }

/* ===== Module Hero (各分頁推廣英雄區) ===== */
.module-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 24px;
  padding: 38px 44px 36px;
  background: linear-gradient(135deg, var(--hero-accent, var(--green)) 0%, color-mix(in srgb, var(--hero-accent, var(--green)) 80%, #000 20%) 100%);
  color: #fff;
  box-shadow: 0 12px 36px -12px color-mix(in srgb, var(--hero-accent) 60%, transparent);
}
.module-hero-bg {
  position: absolute; inset: 0;
  opacity: 0.18;
  pointer-events: none;
}
.module-hero-bg.pattern-dots {
  background-image: radial-gradient(circle, rgba(255,255,255,.5) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}
.module-hero-bg.pattern-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 36px 36px;
}
.module-hero-bg.pattern-arc {
  background:
    radial-gradient(circle at 95% 100%, rgba(255,255,255,.22) 0, rgba(255,255,255,.22) 22%, transparent 22.5%),
    radial-gradient(circle at 95% 100%, rgba(255,255,255,.13) 0, rgba(255,255,255,.13) 38%, transparent 38.5%),
    radial-gradient(circle at 95% 100%, rgba(255,255,255,.07) 0, rgba(255,255,255,.07) 55%, transparent 55.5%);
}
.module-hero-bg.pattern-bars {
  background:
    repeating-linear-gradient(105deg, transparent 0 22px, rgba(255,255,255,.08) 22px 24px);
}
.module-hero-bg.pattern-stars {
  background:
    radial-gradient(2px 2px at 12% 24%, rgba(255,255,255,.6) 0, transparent 50%),
    radial-gradient(2px 2px at 32% 68%, rgba(255,255,255,.55) 0, transparent 50%),
    radial-gradient(1.5px 1.5px at 58% 18%, rgba(255,255,255,.5) 0, transparent 50%),
    radial-gradient(2px 2px at 78% 52%, rgba(255,255,255,.6) 0, transparent 50%),
    radial-gradient(1.5px 1.5px at 90% 78%, rgba(255,255,255,.4) 0, transparent 50%),
    radial-gradient(2px 2px at 22% 88%, rgba(255,255,255,.55) 0, transparent 50%),
    radial-gradient(1.5px 1.5px at 68% 88%, rgba(255,255,255,.4) 0, transparent 50%);
}
.module-hero-bg.pattern-pulse {
  background:
    radial-gradient(circle at 22% 50%, rgba(255,255,255,.18) 0, transparent 30%),
    radial-gradient(circle at 78% 30%, rgba(255,255,255,.12) 0, transparent 35%);
}
.module-hero-inner { position: relative; z-index: 1; max-width: 820px; }
.module-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #f0d97e; padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(240, 217, 126, .35);
}
.module-hero-pulse {
  width: 6px; height: 6px; border-radius: 50%; background: #f0d97e;
  box-shadow: 0 0 0 4px rgba(240,217,126,.22);
  animation: hero-pulse 2.4s ease-in-out infinite;
}
@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(240,217,126,.22); }
  50% { box-shadow: 0 0 0 7px rgba(240,217,126,.05); }
}
.module-hero-headline {
  margin: 16px 0 8px;
  font-size: 36px; font-weight: 800; letter-spacing: -.01em;
  line-height: 1.18;
  color: #fff;
  font-family: "Noto Serif TC", serif;
}
.module-hero-tag {
  font-size: 15px; line-height: 1.55; opacity: .92;
  margin: 0 0 22px; max-width: 640px;
}
.module-hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18);
}
.mh-stat { display: flex; flex-direction: column; gap: 3px; }
.mh-stat b {
  font-size: 26px; font-weight: 800; color: #f0d97e;
  font-feature-settings: "tnum"; line-height: 1;
}
.mh-stat .mh-unit { font-size: 13px; opacity: .8; margin-left: 2px; }
.mh-stat span { font-size: 11.5px; opacity: .78; letter-spacing: .04em; }
.mh-stat .mh-year {
  display: inline-block; font-style: normal; margin-left: 6px;
  padding: 1px 6px; border-radius: 8px;
  background: rgba(255,255,255,.18); color: #f5e8b8;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.mh-stat-link {
  text-decoration: none; color: inherit; cursor: pointer;
  padding: 6px 10px; margin: -6px -10px; border-radius: 8px;
  transition: background .15s, transform .15s;
  display: flex; flex-direction: column; gap: 2px;
}
.mh-stat-link:hover { background: rgba(255,255,255,.08); transform: translateY(-1px); }
.mh-stat-link::after {
  content: "↓"; position: absolute; opacity: 0; transition: opacity .15s;
}
.mh-stat-link:hover::after { opacity: .6; }
@keyframes flashHl {
  0% { box-shadow: 0 0 0 0 rgba(200,166,75,0); }
  20% { box-shadow: 0 0 0 6px rgba(200,166,75,.45); }
  100% { box-shadow: 0 0 0 0 rgba(200,166,75,0); }
}
.flash-highlight { animation: flashHl 1.6s ease-out; }
.module-hero-sdgs {
  margin-top: 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.mh-sdg-label {
  font-size: 11px; opacity: .75; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 700;
}

/* ===== Scatter Chart ===== */
.scatter-wrap { position: relative; }
.scatter-area {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(to right, rgba(120,130,110,.05) 0, transparent 1px) 50% 0/5% 100%,
    linear-gradient(to top, rgba(120,130,110,.05) 0, transparent 1px) 0 50%/100% 5%;
  background-color: #fafaf6;
  overflow: hidden;
  margin: 8px 0;
}
.sc-grid-y, .sc-grid-x {
  position: absolute;
  pointer-events: none;
}
.sc-grid-y {
  left: 0; right: 0; height: 1px;
  border-top: 1px dashed rgba(120,130,110,.18);
}
.sc-grid-x {
  top: 0; bottom: 0; width: 1px;
  border-left: 1px dashed rgba(120,130,110,.18);
}
.sc-grid-label {
  position: absolute; left: 6px; top: -7px;
  font-size: 10px; color: var(--text-muted);
  background: #fafaf6; padding: 0 4px;
  font-feature-settings: "tnum";
}
.sc-grid-x-label {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: var(--text-muted);
  background: #fafaf6; padding: 0 4px;
  font-feature-settings: "tnum";
}
.quad-line {
  position: absolute; background: rgba(184, 57, 47, .35);
}
.quad-line.v { top: 0; bottom: 0; width: 1.5px; }
.quad-line.h { left: 0; right: 0; height: 1.5px; }
.quad-label {
  position: absolute;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--text-muted);
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,.7);
  pointer-events: none;
}
.q-tl { top: 8px; left: 12px; }
.q-tr { top: 8px; right: 12px; color: var(--red, #b8392f); }
.q-bl { bottom: 28px; left: 12px; color: var(--green); }
.q-br { bottom: 28px; right: 12px; }
.sc-point {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  z-index: 2;
}
.sc-point.danger {
  box-shadow: 0 0 0 4px rgba(184,57,47,.18), 0 1px 4px rgba(0,0,0,.18);
}
.sc-point.active {
  transform: translate(-50%, -50%) scale(1.4);
  z-index: 5;
}
.sc-tooltip {
  position: absolute;
  bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--border);
  padding: 10px 12px; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  z-index: 50; min-width: 180px;
  pointer-events: none;
}
.sc-tooltip.tt-flip-left {
  left: auto; right: 100%;
  bottom: 50%;
  transform: translateY(50%);
  margin-right: 10px;
}
.sc-tooltip.tt-flip-down {
  bottom: auto; top: calc(100% + 8px);
}
.sc-tooltip .tt-title { white-space: nowrap; }
.tt-note {
  font-size: 11px; color: var(--text-muted);
  margin-top: 4px; padding-top: 4px;
  border-top: 1px solid var(--border);
  line-height: 1.4;
}
.sc-axis-x {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-muted); font-weight: 600;
}
.sc-axis-y {
  position: absolute; top: 50%; left: -32px;
  transform: translateY(-50%) rotate(-90deg); transform-origin: center;
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  white-space: nowrap;
}

/* ===== Radar Chart ===== */
.radar-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0;
}

/* ===== Faculty Pyramid ===== */
.pyramid-wrap {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 0;
}
.pyr-row {
  display: grid;
  grid-template-columns: 90px 1fr 60px;
  align-items: center; gap: 12px;
}
.pyr-rank {
  font-size: 13px; font-weight: 700; color: var(--text);
  text-align: right;
}
.pyr-bar-wrap {
  background: rgba(120,130,110,.08); height: 28px;
  border-radius: 4px; overflow: hidden;
}
.pyr-bar {
  height: 100%; display: flex; align-items: center; justify-content: flex-end;
  padding: 0 10px;
  border-radius: 4px;
  transition: width .4s ease;
}
.pyr-count {
  color: #fff; font-weight: 700; font-size: 13px;
  font-feature-settings: "tnum";
  text-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.pyr-pct {
  font-size: 12px; color: var(--text-muted);
  font-feature-settings: "tnum"; text-align: right;
}
.pyr-total {
  font-size: 12px; color: var(--text-muted);
  text-align: right; margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* ===== Gender Ring ===== */
.gender-ring {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.gr-legend {
  display: flex; gap: 16px; font-size: 12px;
}
.gr-legend > div {
  display: flex; align-items: center; gap: 6px;
}
.gr-dot {
  width: 12px; height: 12px; border-radius: 3px;
  display: inline-block;
}

/* ===== World Region Map ===== */
.world-map {
  position: relative;
  height: 380px;
  background: linear-gradient(180deg, #f3f6ee 0%, #e8efde 100%);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.world-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.region-bubble {
  position: absolute;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  cursor: pointer;
  border: 3px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  transition: transform .2s;
  color: #fff;
  z-index: 2;
}
.region-bubble:hover {
  transform: scale(1.08);
  z-index: 10;
}
.rb-value {
  font-size: 16px; font-weight: 800; line-height: 1;
  font-feature-settings: "tnum";
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.rb-name {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 6px;
  font-size: 11px; font-weight: 700; color: var(--text);
  background: rgba(255,255,255,.85);
  padding: 2px 8px; border-radius: 3px;
  white-space: nowrap;
}
.rb-tooltip {
  position: absolute;
  left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--panel); border: 1px solid var(--border);
  padding: 10px 12px; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  z-index: 50; min-width: 200px;
  color: var(--text);
}
.rb-tooltip.tt-flip-left {
  left: auto; right: calc(100% + 12px);
}
.world-foot {
  position: absolute; bottom: 12px; right: 16px;
  font-size: 11px; color: var(--text-muted);
  background: rgba(255,255,255,.7);
  padding: 4px 10px; border-radius: 3px;
}

/* ===== Dual Axis ===== */
.right-axis .grid-line {
  border-top: none;
}
.grid-line-right {
  position: absolute; right: 0; left: 0;
  pointer-events: none;
}
.grid-label-right {
  position: absolute; right: -56px; top: 0;
  transform: translateY(-50%);
  font-size: 10.5px;
  width: 50px; text-align: left;
  font-feature-settings: "tnum";
  background: var(--panel);
  padding: 0 0 0 4px;
  line-height: 1.2;
}
.dual-axis-chart .chart-area { padding-right: 60px; }
.dual-axis-chart .chart-grid { right: 60px; }
.dual-axis-chart .chart-grid.right-axis { left: auto; right: 60px; width: auto; }
.dual-axis-chart .plot-area { right: 60px; }

@media (max-width: 1100px) {
  .module-hero { padding: 28px 24px 26px; }
  .module-hero-headline { font-size: 28px; }
  .module-hero-stats { gap: 22px; }
  .mh-stat b { font-size: 22px; }
}

/* ===== Extra visuals: KPI wall / WorldDotMap / SDG Sunburst / YearScrubber ===== */

/* ---- HeroKPIWall ---- */
.kpi-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.hero-kpi-tile {
  --accent: #0a5a2e;
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #fafaf1 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 12px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
}
.hero-kpi-tile.in { opacity: 1; transform: translateY(0); }
.hero-kpi-tile::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
}
.hero-kpi-tile::after {
  content: "";
  position: absolute; right: -40px; top: -40px; width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: .07;
}
.hkt-label {
  font-size: 11px; color: #5a6a58; font-weight: 600;
  text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 6px;
}
.hkt-value {
  font-family: "Noto Serif TC", serif;
  font-size: 30px; font-weight: 800; color: var(--accent);
  letter-spacing: -.5px; line-height: 1.05;
  display: flex; align-items: baseline; gap: 4px;
}
.hkt-num { font-variant-numeric: tabular-nums; }
.hkt-unit { font-size: 13px; color: #7a8a78; font-weight: 500; }
.hkt-sub { font-size: 11.5px; color: #7a8a78; margin-top: 3px; }
.hkt-spark { width: 100%; height: 28px; margin-top: 6px; display: block; }
.hkt-spark-dot { animation: hkt-pulse 1.6s infinite; transform-origin: center; }
@keyframes hkt-pulse { 0%,100%{r:1.8;} 50%{r:2.6;} }

/* ---- WorldDotMap ---- */
.world-dot-wrap {
  position: relative;
  background: linear-gradient(180deg, #f7faf2 0%, #eef4e6 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.wdm-svg { width: 100%; height: 100%; display: block; }
.wdm-land { transition: fill .3s; }
.wdm-arc { animation: wdm-flow 2.6s ease-in-out infinite; }
@keyframes wdm-flow {
  0% { stroke-opacity: .15; stroke-dashoffset: 0; }
  50% { stroke-opacity: .55; }
  100% { stroke-opacity: .15; stroke-dashoffset: -8; }
}
.wdm-pulse { animation: wdm-bubble 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes wdm-bubble {
  0% { opacity: .25; transform: scale(.9); }
  50% { opacity: .08; transform: scale(1.4); }
  100% { opacity: .25; transform: scale(.9); }
}
.wdm-dot { cursor: pointer; transition: transform .2s; transform-origin: center; transform-box: fill-box; }
.wdm-dot:hover { transform: scale(1.25); }
.wdm-dot.on circle:nth-child(2) { stroke: #c8a64b; stroke-width: .6; }
.wdm-card {
  position: absolute;
  transform: translate(12px, -50%);
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  pointer-events: none;
  z-index: 10;
  min-width: 110px;
}
.wdm-card-flag {
  display: inline-block;
  font-size: 9.5px; font-weight: 700; color: #fff;
  padding: 2px 6px; border-radius: 3px;
  letter-spacing: .5px; margin-bottom: 4px;
}
.wdm-card-name { font-size: 14px; font-weight: 800; color: #0a5a2e; }
.wdm-card-num { font-family: "Noto Serif TC", serif; font-size: 22px; font-weight: 800; color: #c8a64b; line-height: 1; margin-top: 2px; }
.wdm-card-num span { font-size: 11px; color: #7a8a78; font-weight: 500; }
.wdm-foot {
  position: absolute; left: 12px; right: 12px; bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: #5a6a58;
  background: rgba(255,255,255,.8);
  padding: 4px 10px; border-radius: 100px;
  backdrop-filter: blur(2px);
}
.wdm-foot b { color: #0a5a2e; font-weight: 800; }
.wdm-legend { display: flex; gap: 10px; }
.wdm-leg-item { display: flex; align-items: center; gap: 4px; font-size: 10.5px; }
.wdm-leg-item i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---- AziMap (極座標方位地圖) ---- */
.azimap-wrap {
  position: relative;
  width: 100%;
  background: #fafbf2;
  border-radius: 12px;
  overflow: hidden;
}
.azimap-svg { width: 100%; height: 100%; display: block; }
.azi-dot circle:nth-child(2) { transition: transform .18s; transform-origin: center; transform-box: fill-box; }
.azi-dot:hover circle:nth-child(2) { transform: scale(1.18); cursor: pointer; }
.azi-arc {
  stroke-dashoffset: 60;
  animation: aziDraw 1.6s ease-out forwards;
}
@keyframes aziDraw { to { stroke-dashoffset: 0; } }
.azi-card {
  position: absolute; top: 12px; right: 12px;
  transform: none; left: auto;
  min-width: 150px;
}
.azi-card-meta {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed #d8e2c8;
  font-size: 10.5px; color: #5a6a58; font-weight: 500;
}
.azi-card-meta b { color: #0a5a2e; font-weight: 800; }
.azi-card-sep { color: #c8a64b; margin: 0 4px; }

/* ---- SDG Sunburst ---- */
.sdg-sunburst-wrap {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  min-height: 480px;
}
.sdg-sunburst { display: block; max-width: 100%; height: auto; }
.sb-slice { transition: opacity .25s; }
.sb-slice.dim { opacity: .25; }
.sb-slice.sdg.act path { stroke: #c8a64b; stroke-width: 2.5; }
.sb-slice.sdg:hover path { filter: brightness(1.15); }

/* 指標 chip 列 */
.sb-ind-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding: 12px 14px;
  background: var(--panel-2, #f4ede0);
  border-radius: 10px;
}
.sb-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: 1.5px solid;
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
}
.sb-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(10,90,46,.12); }
.sb-chip.dim { opacity: .25; }
.sb-chip.hl { box-shadow: 0 0 0 2px currentColor inset, 0 4px 12px rgba(200,166,75,.25); }
.sb-chip-ids { display: inline-flex; gap: 2px; }
.sb-chip-id {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 4px;
  font-size: 10px; font-weight: 800; color: #fff;
}
[data-theme="dark"] .sb-ind-chips { background: rgba(255,255,255,.04); }
[data-theme="dark"] .sb-chip { background: #1a2a1f; }
.sb-tip {
  position: absolute; top: 8px; right: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; min-width: 220px; max-width: 280px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  pointer-events: none;
}
.sb-tip-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.sb-tip-name { font-size: 14px; font-weight: 800; color: #1a2a1a; margin-top: 3px; line-height: 1.3; }
.sb-tip-sub { font-size: 11.5px; color: #7a8a78; margin-top: 4px; }
.sb-tip-row { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.sb-active-card {
  position: absolute; left: 8px; bottom: 8px; right: 8px;
  background: #fff; border: 2px solid #c8a64b;
  border-radius: 10px; padding: 10px 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.14);
}
.sb-act-head { display: flex; align-items: center; gap: 12px; }
.sb-act-title { font-size: 14px; font-weight: 800; color: #1a2a1a; }
.sb-act-sub { font-size: 11.5px; color: #7a8a78; margin-top: 1px; }
.sb-act-close {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  font-size: 22px; color: #7a8a78; line-height: 1;
}
.sb-act-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sb-act-chip {
  background: #f7faf2; border: 1px solid #d8e2c8;
  font-size: 11.5px; padding: 3px 9px; border-radius: 100px;
  white-space: nowrap;
  color: #2a3a2a; font-weight: 600;
}

/* ---- YearScrubber ---- */
.year-scrub {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, #fff, #fafaf1);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 28px 8px 8px;
  box-shadow: inset 0 0 0 1px #fff, 0 1px 4px rgba(10,40,20,.04);
  width: 100%;
  min-height: 56px;
}
.ys-play {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  border: 0; color: #fff;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -1px;
  transition: background .15s;
}
.ys-play:hover { background: var(--green-2); }
.ys-label { display: flex; align-items: baseline; gap: 6px; flex-shrink: 0; }
.ys-label-key { font-size: 10.5px; color: #7a8a78; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.ys-label-val { font-family: "Noto Serif TC", serif; font-size: 22px; font-weight: 800; color: #0a5a2e; min-width: 36px; }
.ys-track {
  position: relative;
  flex: 1;
  height: 44px;
  cursor: pointer;
  user-select: none;
  margin: 0 18px;
}
.ys-track::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #e2e8d4;
  border-radius: 100px;
}
.ys-fill {
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: linear-gradient(90deg, #0a5a2e, #c8a64b);
  border-radius: 100px;
  pointer-events: none;
}
.ys-tick {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  z-index: 2;
}
.ys-tick-dot {
  width: 8px; height: 8px;
  background: #fff;
  border: 2px solid #b6c5a5;
  border-radius: 50%;
  transition: transform .15s;
}
.ys-tick.on .ys-tick-dot { background: #c8a64b; border-color: #c8a64b; transform: scale(1.4); }
.ys-tick.has-event .ys-tick-dot { background: #c8a64b; }
.ys-tick-label {
  position: absolute; top: 12px;
  font-size: 10.5px; color: #5a6a58; font-weight: 600;
  white-space: nowrap;
}
.ys-tick.on .ys-tick-label { color: #0a5a2e; font-weight: 800; font-size: 11.5px; }
.ys-tick-flag {
  position: absolute; bottom: 12px;
  font-size: 9.5px; color: #5a6a58;
  background: #fff;
  border: 1px solid;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  font-weight: 600;
}
.ys-thumb {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
}
.ys-thumb-pin {
  display: block;
  width: 14px; height: 14px;
  background: #fff;
  border: 3px solid #c8a64b;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.ys-thumb-num { display: none; }

/* ---- Dark theme overrides ---- */
[data-theme="dark"] .hero-kpi-tile {
  background: linear-gradient(180deg, #1a2a1f 0%, #14201a 100%);
  border-color: #2a3a30;
}
[data-theme="dark"] .hkt-label { color: #b8c5b0; }
[data-theme="dark"] .hkt-sub { color: #8a9a85; }
[data-theme="dark"] .world-dot-wrap {
  background: linear-gradient(180deg, #1a2a1f, #14201a);
  border-color: #2a3a30;
}
[data-theme="dark"] .wdm-land { fill: #2a3a30; }
[data-theme="dark"] .wdm-card { background: #1a2a1f; color: #f0f5e8; border-color: #2a3a30; }
[data-theme="dark"] .wdm-foot { background: rgba(20,32,26,.85); color: #c8d4be; }
[data-theme="dark"] .sb-tip { background: #1a2a1f; color: #f0f5e8; border-color: #2a3a30; }
[data-theme="dark"] .sb-active-card { background: #1a2a1f; color: #f0f5e8; }
[data-theme="dark"] .sb-act-chip { background: #2a3a30; border-color: #3a4a40; color: #d8e2c8; }
[data-theme="dark"] .year-scrub { background: linear-gradient(180deg, #1a2a1f, #14201a); border-color: #2a3a30; }


/* ===== Official Open Data & Reports Hub ===== */
.official-links {
  margin: 24px 16px 0;
  padding: 24px 28px;
  background: linear-gradient(135deg, #f7f4e8 0%, #fefcf3 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
}
.official-links::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-2), var(--green-2), var(--gold-3));
  border-radius: 14px 14px 0 0;
}
.ol-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ol-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--green-1);
  letter-spacing: .5px;
}
.ol-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 640px;
}
.ol-hub {
  background: var(--green-1);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s, background .15s;
}
.ol-hub:hover {
  background: var(--green-2);
  transform: translateY(-1px);
}
.ol-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .ol-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .ol-grid { grid-template-columns: 1fr; } }
.ol-card {
  display: block;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  position: relative;
}
.ol-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-2);
  box-shadow: 0 6px 18px rgba(166, 124, 0, 0.12);
}
.ol-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--gold-3);
  background: #fdf6e0;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.ol-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 6px;
  min-height: 38px;
}
.ol-arrow {
  font-size: 11.5px;
  color: var(--green-2);
  font-weight: 600;
}

/* 3-col override + icon */
.ol-grid { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 900px) { .ol-grid { grid-template-columns: 1fr !important; } }
.ol-card { padding: 18px 18px 16px; }
.ol-icon {
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
}
.ol-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 4px 0 10px;
  line-height: 1.5;
  min-height: 32px;
}
.ol-title { min-height: auto; margin-bottom: 4px; }

/* ===== Reports Module ===== */
.rep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .rep-grid { grid-template-columns: 1fr; } }
.rep-card {
  display: block;
  padding: 24px 22px 20px;
  background: linear-gradient(180deg, #fff 0%, #fdfcf5 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}
.rep-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-2), var(--green-2));
  opacity: .7;
}
.rep-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-2);
  box-shadow: 0 10px 28px rgba(166, 124, 0, 0.15);
}
.rep-icon { font-size: 36px; line-height: 1; margin-bottom: 12px; }
.rep-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-3);
  background: #fdf6e0;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.rep-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--green-1);
  line-height: 1.5;
  margin-bottom: 8px;
}
.rep-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  min-height: 38px;
}
.rep-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-2);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.rep-portal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  border-radius: 12px;
  color: #fff;
  flex-wrap: wrap;
}
.rep-portal-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.rep-portal-desc { font-size: 12.5px; opacity: .85; line-height: 1.5; }
.rep-portal-btn {
  background: var(--gold-2);
  color: #2a1a00;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s;
}
.rep-portal-btn:hover { transform: scale(1.04); }

/* === stylesExtra2.css : 新模組樣式 (就業力 / 助學 / 財務 / 校務研究 / ESG 雲端) === */

/* === 資料來源警語 (Source Warning) === */
.src-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: #fef6e3;
  border: 1px solid #c8a64b;
  border-left: 4px solid #a07a1f;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #2a1a00;
}
[data-theme="dark"] .src-warning {
  background: rgba(200,166,75,.10);
  color: #f0d97e;
  border-color: rgba(200,166,75,.4);
  border-left-color: #c8a64b;
}
.src-warning b {
  color: #a07a1f;
  letter-spacing: .3px;
}
[data-theme="dark"] .src-warning b { color: #f0d97e; }
.src-warning-icon {
  font-size: 18px;
  line-height: 1.4;
  flex-shrink: 0;
}
.src-warning-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed var(--green);
  white-space: nowrap;
}
.src-warning-link:hover {
  color: var(--gold-2);
  border-bottom-color: var(--gold-2);
}
[data-theme="dark"] .src-warning-link {
  color: #aceac9;
  border-bottom-color: #aceac9;
}

/* ========== Source badge ========== */
.src-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green);
  padding: 3px 10px 3px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.3;
  white-space: nowrap;
}
[data-theme="dark"] .src-badge { background: rgba(45,162,103,.18); color: #6ed29b; border-color: rgba(110,210,155,.5); }
.src-badge-dot {
  width: 6px; height: 6px; border-radius: 100px;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(10,90,46,.18);
}
[data-theme="dark"] .src-badge-dot { background: #6ed29b; box-shadow: 0 0 0 3px rgba(110,210,155,.22); }

/* ========== Cloud link cards ========== */
.cloud-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.cloud-card {
  display: block;
  padding: 22px 24px 20px;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-left: 4px solid var(--cloud-accent, var(--green));
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
  overflow: hidden;
}
.cloud-card::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cloud-accent, var(--green)) 0%, transparent 70%);
  opacity: .08;
  pointer-events: none;
}
.cloud-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(10,40,20,.12);
  border-color: var(--cloud-accent, var(--gold));
}
.cloud-card-head {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px;
}
.cloud-card-icon {
  font-size: 36px; line-height: 1;
  width: 56px; height: 56px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cloud-card-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: .3px;
}
.cloud-card-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.cloud-card-list {
  margin: 0 0 14px;
  padding: 0 0 0 18px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 16px;
}
.cloud-card-list li {
  position: relative;
  font-size: 12.5px;
  color: var(--text-muted);
  padding-left: 12px;
  line-height: 1.7;
}
.cloud-card-list li::before {
  content: "▸";
  position: absolute;
  left: 0; top: 0;
  color: var(--cloud-accent, var(--green));
  font-size: 11px;
}
@media (max-width: 700px) { .cloud-card-list { grid-template-columns: 1fr; } }
.cloud-card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700;
  color: var(--cloud-accent, var(--green));
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* ========== IR Timeline ========== */
.ir-timeline {
  position: relative;
  padding: 8px 0;
}
.ir-timeline::before {
  content: "";
  position: absolute;
  left: 90px; top: 18px; bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, var(--green) 0%, var(--gold) 100%);
  opacity: .4;
}
.ir-y {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
  position: relative;
}
.ir-y-mark {
  width: 90px;
  display: flex; flex-direction: column; align-items: flex-end;
  flex-shrink: 0;
  padding-top: 14px;
}
.ir-y-num {
  font-size: 14px; font-weight: 800;
  color: var(--green);
  font-feature-settings: "tnum";
  margin-bottom: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
}
.ir-y-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 2px var(--green);
  position: absolute;
  left: 84px; top: 22px;
  z-index: 1;
}
.ir-y-body {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-left: 12px;
  position: relative;
}
.ir-y-body::before {
  content: "";
  position: absolute;
  left: -8px; top: 18px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 7px 8px 7px 0;
  border-color: transparent var(--border) transparent transparent;
}
.ir-y-title {
  font-size: 14px; font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
  letter-spacing: .3px;
}
.ir-y-list {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ir-y-list li {
  font-size: 12.5px;
  background: var(--green-light);
  color: var(--green-2);
  padding: 4px 10px;
  border-radius: 6px;
  line-height: 1.5;
}
[data-theme="dark"] .ir-y-list li { background: rgba(45,162,103,.18); color: #aceac9; }

/* ========== Work-study stat row ========== */
.work-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 10px 6px;
}
.work-stat { text-align: center; }
.work-stat-v {
  font-size: 26px; font-weight: 800;
  color: var(--green);
  font-feature-settings: "tnum";
  line-height: 1.2;
}
.work-stat-v small {
  font-size: 13px;
  font-weight: 500;
  margin-left: 2px;
  opacity: .7;
}
.work-stat-l {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: .3px;
}

/* ========== Stacked list (% bars with name + total) ========== */
.stack-list {
  display: flex; flex-direction: column; gap: 10px;
}
.stack-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  gap: 12px;
  align-items: center;
}
.stack-name { font-size: 13px; font-weight: 600; color: var(--text); }
.stack-bar { width: 100%; }
.stack-total {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  color: var(--green);
  font-feature-settings: "tnum";
}

/* ========== Data table tight ========== */
table.data.data-tight th,
table.data.data-tight td {
  padding: 6px 10px;
  font-size: 12.5px;
}
table.data.data-tight thead th {
  background: var(--panel-2);
  font-weight: 700;
  border-bottom: 2px solid var(--gold);
  color: var(--green-2);
  letter-spacing: .3px;
}
[data-theme="dark"] table.data.data-tight thead th { color: #aceac9; }
table.data.data-tight tbody tr:nth-child(even) { background: var(--panel-2); }
table.data.data-tight tbody tr:hover { background: var(--green-light); }
[data-theme="dark"] table.data.data-tight tbody tr:hover { background: rgba(45,162,103,.12); }
table.data.data-tight td.num,
table.data.data-tight th.num { text-align: right; font-feature-settings: "tnum"; }

/* ========== Card compact variant ========== */
.card.card-compact .card-body { padding: 10px 12px 12px; }

/* ========== Proportion stat (compact 'bar + meta' atomic) ========== */
.prop-stat { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.prop-stat-bar {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.prop-stat-bar > div { height: 100%; border-radius: 100px; transition: width .3s; }
.prop-stat-meta { display: flex; justify-content: space-between; font-size: 12.5px; }
.prop-stat-label { color: var(--text-muted); }
.prop-stat-value { font-weight: 700; font-feature-settings: "tnum"; }
.prop-stat-value small { font-weight: 400; color: var(--text-soft); margin-left: 4px; }

/* ========== Tabs scrolling (11+ tabs may overflow on small screens) ========== */
.tabs {
  flex-wrap: wrap !important;
}
.tabs .tab {
  white-space: nowrap;
}

/* ========== Hero stats fit narrow ========== */
@media (max-width: 1100px) {
  .work-stat-v { font-size: 22px; }
  .stack-row { grid-template-columns: 100px 1fr 50px; }
}

