/* AILatest Grant — Academic Vintage Style (matches journal.ailatest.org) */
:root {
  --paper:          #fffdf9;
  --paper-soft:     #f9f6ef;
  --paper-deeper:   #f1ece3;
  --ink:            #27231f;
  --ink-soft:       #514b45;
  --ink-faint:      #756f68;
  --rule:           #ded8cf;
  --rule-soft:      #ece7df;
  --accent:         #f97316;
  --accent-soft:    #fb8a35;
  --deep:           #1f2c4c;
  --deep-soft:      #2c3d68;
  --deep-light:     #e7ecf3;
  --sage:           #5b6a4d;
  --gold:           #a07a2a;
  --mono:  'SFMono-Regular', Menlo, Consolas, monospace;
  --sans:  Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
           'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
           'Microsoft YaHei', sans-serif;
  --radius: 8px;
  --radius-sm: 6px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-y: scroll; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 580px 380px at 50% 8%, rgba(249,115,22,.10), transparent 72%),
    radial-gradient(ellipse 580px 380px at 82% 90%, rgba(31,44,76,.05), transparent 72%),
    linear-gradient(rgba(39,35,31,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,35,31,.035) 1px, transparent 1px),
    linear-gradient(180deg, #fffefa 0%, #fffaf2 42%, #fffdf9 100%);
  background-attachment: fixed;
  background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat;
  background-size: cover, cover, 60px 60px, 60px 60px, cover;

  color: var(--ink);
  padding: 24px 20px;
  max-width: 920px;
  margin: 0 auto;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
a:hover { border-bottom-color: var(--accent); }

/* ── Header ── */
.header { text-align: center; margin-bottom: 24px; }
.brand { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.brand-ai { color: var(--accent); }
.brand-sub { font-size: 14px; color: var(--ink-faint); margin-top: 3px; }
.nav-link {
  display: inline-block; margin-top: 8px; font-size: 13px; color: var(--ink-soft);
  text-decoration: none; padding: 3px 14px; border-radius: 50px;
  border: 1px solid var(--rule); transition: all .15s;
}
.nav-link:hover { border-color: var(--accent); color: var(--accent); background: rgba(249,115,22,.06); }

/* ── Dashboard filters ── */
.dash-filters {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center;
  margin-bottom: 18px; padding: 12px 18px; background: var(--paper);
  border-radius: var(--radius); border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(43,42,39,.04), 0 4px 16px rgba(43,42,39,.06);
}
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-label { font-size: 12px; color: var(--ink-faint); white-space: nowrap; font-weight: 500; }
.dash-select {
  font-size: 13px; padding: 4px 10px; border: 1px solid var(--rule);
  border-radius: var(--radius-sm); background: var(--paper); color: var(--ink);
  cursor: pointer;
}
.dash-select:hover { border-color: var(--accent); }

/* ── Fund type pills ── */
.fund-type-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.fund-type-btn {
  padding: 6px 18px; border-radius: 50px; border: 1px solid var(--rule);
  background: var(--paper-soft); font-size: 14px; cursor: pointer;
  color: var(--ink-soft); font-weight: 500; transition: all .15s;
  white-space: nowrap;
}
.fund-type-btn:hover { border-color: var(--accent); color: var(--accent); }
.fund-type-btn.active {
  background: var(--deep); color: #fff; border-color: var(--deep);
}
.fund-type-btn.active:hover { background: var(--deep-soft); }

/* ── Region buttons ── */
.region-btn {
  padding: 4px 14px; border-radius: 50px; border: 1px solid var(--rule);
  background: var(--paper-soft); font-size: 13px; cursor: pointer;
  color: var(--ink-soft); transition: all .15s; white-space: nowrap;
}
.region-btn:hover { border-color: var(--accent); color: var(--accent); }
.region-btn.active {
  background: var(--deep); color: #fff; border-color: var(--deep);
}

.filter-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 4px;
  width: 100%;
}
.filter-loc {
  width: 100%; text-align: center; font-size: 15px; font-weight: 600;
  color: var(--deep); margin-bottom: 6px; padding: 4px 0;
}
.source-select-lg { font-size: 15px; padding: 6px 14px; font-weight: 600; }
.region-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; background: var(--deep-light); color: var(--deep);
  border-radius: 50px; font-size: 14px; font-weight: 600;
}
.filter-group.full { width: 100%; }
.filter-arrow { color: var(--ink-faint); font-size: 14px; }
.analyze-btn {
  display: block; margin: 14px auto 0; padding: 10px 40px;
  background: var(--accent); color: #fff; border: none; border-radius: 50px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.analyze-btn:hover { background: var(--accent-soft); }
.filter-hint {
  text-align: center; font-size: 13px; color: var(--ink-faint); margin-top: 10px;
}

/* ── Search ── */
.search-wrap { margin-bottom: 16px; }
.search-box {
  display: flex; gap: 8px; max-width: 600px; margin: 0 auto;
  background: var(--paper); border-radius: 50px; padding: 4px;
  border: 1px solid var(--rule); box-shadow: 0 1px 0 rgba(43,42,39,.04), 0 8px 30px rgba(43,42,39,.08);
}
.search-box input {
  flex: 1; border: none; outline: none; font-size: 16px;
  padding: 12px 18px; background: transparent; border-radius: 50px;
  color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-faint); }
.search-box button {
  background: var(--accent); color: #fff; border: none;
  border-radius: 50px; padding: 10px 24px; font-size: 15px;
  cursor: pointer; font-weight: 600; white-space: nowrap;
}
.search-box button:hover { background: var(--accent-soft); }

/* ── Year switcher ── */
.year-switcher {
  display: flex; gap: 6px;
}
.year-btn {
  padding: 5px 18px; border-radius: 50px; border: 1px solid var(--rule);
  background: transparent; font-size: 13px; cursor: pointer; color: var(--ink-soft);
  font-weight: 500; transition: all .15s;
}
.year-btn.active { background: var(--deep); color: #fff; border-color: var(--deep); }
.year-btn:hover:not(.active) { border-color: var(--deep); color: var(--deep); }

/* ── Stats cards ── */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px;
}
.stat-card {
  background: var(--paper); border-radius: var(--radius); padding: 16px 12px;
  text-align: center; border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(43,42,39,.04), 0 4px 16px rgba(43,42,39,.06);
}
.stat-num { display: block; font-size: 28px; font-weight: 700; color: var(--deep); }
.stat-label { display: block; font-size: 13px; color: var(--ink-faint); margin-top: 2px; }

/* ── Dashboard grid ── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash-col { display: flex; flex-direction: column; gap: 14px; }
.chart-card {
  background: var(--paper); border-radius: var(--radius); padding: 18px;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(43,42,39,.04), 0 4px 16px rgba(43,42,39,.06);
}
.chart-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--deep); letter-spacing: .01em; }

.analysis-legend { margin-bottom: 14px; }
.legend-title,
.drill-title {
  font-size: 15px; font-weight: 700; color: var(--deep); margin-bottom: 6px;
}
.legend-text,
.drill-sub {
  font-size: 13px; color: var(--ink-faint); line-height: 1.5;
}
.legend-items {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.legend-chip {
  font-size: 12px; color: var(--ink-soft); background: var(--paper-soft);
  border: 1px solid var(--rule-soft); border-radius: 50px; padding: 2px 10px;
}
.legend-chip b { color: var(--deep); margin-left: 4px; }
.drilldown-panel { margin-top: 14px; }
.drill-head {
  display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-soft);
}
.drill-count {
  font-size: 24px; font-weight: 700; color: var(--accent); white-space: nowrap;
}
.drill-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 14px;
}
.drill-label {
  font-size: 12px; color: var(--ink-faint); font-weight: 700; margin-bottom: 6px;
}
.source-line {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--ink-soft); padding: 3px 0; border-bottom: 1px solid var(--rule-soft);
}
.source-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-line b { color: var(--deep); }
.mini-list { display: grid; gap: 6px; }
.mini-row {
  border: 1px solid var(--rule-soft); border-radius: var(--radius-sm);
  padding: 8px 10px; background: var(--paper-soft);
}
.mini-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.mini-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* ── Bar chart ── */
.bar-chart { font-size: 14px; }
.bar-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 3px;
}
.bar-row.drillable,
.ov-bar-row.drillable,
.ov-trend-col.drillable {
  cursor: pointer;
}
.bar-row.drillable:hover .bar-fill,
.ov-bar-row.drillable:hover .ov-bar-fill,
.ov-trend-col.drillable:hover .ov-trend-bar {
  opacity: 1;
  background: var(--accent);
}
.bar-label {
  width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: right; font-size: 12px; color: var(--ink-soft); flex-shrink: 0;
}
.bar-track {
  flex: 1; height: 16px; background: var(--rule-soft); border-radius: 3px; overflow: hidden;
}
.bar-fill {
  height: 100%; background: var(--deep); border-radius: 3px;
  transition: width .3s; opacity: .82;
}
.bar-val { width: 36px; text-align: right; font-size: 12px; font-weight: 600; color: var(--ink-soft); flex-shrink: 0; }

/* ── Tag cloud ── */
.tag-cloud {
  display: flex; flex-wrap: wrap; gap: 6px 12px; line-height: 1.6;
}
.tag {
  display: inline-block; cursor: pointer; padding: 2px 0; color: var(--accent);
  transition: transform .15s, background .15s; border-radius: 4px;
}
.tag:hover { transform: scale(1.08); color: var(--deep); background: var(--deep-light); padding: 2px 8px; }

/* ── Results section ── */
.results { margin-top: 8px; }
.results-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.results-head h2 { font-size: 16px; font-weight: 600; }
.count { font-size: 13px; color: var(--ink-faint); }
.project-list { }
.empty-state { text-align: center; color: var(--ink-faint); padding: 40px 20px; }
.empty-small { color: var(--ink-faint); font-size: 13px; padding: 12px; text-align: center; }

/* ── Topic page ── */
.topic-page { }
.topic-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.back-btn {
  background: none; border: 1px solid var(--rule); border-radius: 50px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--ink-soft);
  white-space: nowrap; transition: all .15s;
}
.back-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(249,115,22,.06); }
.topic-name { font-size: 22px; font-weight: 700; color: var(--deep); }

/* ── Project card ── */
.project-card {
  background: var(--paper); border-radius: var(--radius-sm); padding: 14px 16px;
  margin-bottom: 8px; border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(43,42,39,.03);
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.project-card:hover { border-color: var(--accent); box-shadow: 0 1px 0 rgba(249,115,22,.08), 0 4px 16px rgba(43,42,39,.06); }
.project-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; color: var(--ink); }
.project-card .project-title mark { background: #fde68a; padding: 0 2px; border-radius: 2px; }
.project-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-soft);
}
.project-meta .label { color: var(--ink-faint); }
.project-meta .cat-badge {
  background: var(--deep-light); color: var(--deep); padding: 2px 10px;
  border-radius: 50px; font-size: 12px; font-weight: 500;
}
.card-topics { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.topic-badge {
  background: #fdf6ee; color: #9a6b1a; font-size: 11px; padding: 1px 7px;
  border-radius: 50px; border: 1px solid #f0dbb5;
}
.source-badge {
  background: #eef2ff; color: #3730a3; font-size: 11px; padding: 1px 8px;
  border-radius: 50px; border: 1px solid #c7d2fe; font-weight: 500;
}
.self-badge {
  background: #fef2f2; color: #991b1b; font-size: 11px; padding: 1px 8px;
  border-radius: 50px; border: 1px solid #fecaca; font-weight: 500;
}
.project-meta mark { background: #fde68a; padding: 0 2px; border-radius: 2px; }

/* ── Drawer ── */
.drawer-overlay {
  display: none; position: fixed; inset: 0; background: rgba(39,35,31,.3);
  z-index: 99;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; right: -100%; width: 90%; max-width: 420px;
  height: 100%; background: var(--paper); z-index: 100; overflow-y: auto;
  transition: right .25s; box-shadow: -4px 0 24px rgba(43,42,39,.12);
}
.drawer.open { right: 0; }
.drawer-head {
  display: flex; align-items: center; gap: 8px; padding: 16px 18px;
  border-bottom: 1px solid var(--rule); position: sticky; top: 0;
  background: var(--paper); z-index: 1;
}
.drawer-close {
  background: none; border: none; font-size: 18px; cursor: pointer; padding: 4px 8px;
  color: var(--ink-soft); border-radius: var(--radius-sm);
}
.drawer-close:hover { background: var(--rule-soft); }
.drawer-body { padding: 18px; }
.drawer-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; line-height: 1.4; color: var(--ink); }
.detail-grid { display: grid; gap: 14px; }
.detail-item {}
.detail-item label { font-size: 11px; color: var(--ink-faint); display: block; margin-bottom: 2px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.detail-item .value { font-size: 14px; color: var(--ink); word-break: break-all; }
.detail-item .topic-badge { display: inline-block; margin: 2px 2px 0 0; }

.cal-link {
  text-align: center; margin-top: 4px; cursor: pointer;
  font-size: 15px; color: var(--ink-soft); border: none;
  padding: 8px 24px; border-radius: 50px;
  background: var(--paper-soft); border: 1px solid var(--rule);
  display: inline-block; transition: all .15s;
  width: auto;
}
.cal-link:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(249,115,22,.06);
}

/* Responsive */
@media (max-width: 600px) {
  body { padding: 14px 12px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .drill-grid { grid-template-columns: 1fr; }
  .drill-head { flex-direction: column; }
  .bar-label { width: 70px; }
  .dash-filters { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-group { justify-content: space-between; }
}

/* ── Overview (homepage default) ── */
.overview { margin-top: 4px; }
.source-tabs {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 18px;
}
.src-tab {
  padding: 8px 22px; border-radius: 50px; border: 1px solid var(--rule);
  background: transparent; font-size: 14px; cursor: pointer; color: var(--ink-soft);
  font-weight: 500; transition: all .15s;
}
.src-tab.active { background: var(--deep); color: #fff; border-color: var(--deep); }
.src-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

.overview-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 18px;
}

.overview-section {
  background: var(--paper); border-radius: var(--radius); padding: 16px 18px;
  margin-bottom: 14px; border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(43,42,39,.04), 0 4px 16px rgba(43,42,39,.06);
}
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--deep); }
.overview-row { display: flex; gap: 14px; margin-bottom: 14px; }
.overview-row .half { flex: 1; margin-bottom: 0; }

/* Trend mini chart */
.ov-trend {
  display: flex; align-items: flex-end; gap: 6px; height: 100px;
  padding: 0 4px;
}
.ov-trend-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; height: 100%;
}
.ov-trend-bar {
  width: 100%; max-width: 40px; min-height: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  border-radius: 3px 3px 0 0; align-self: flex-end; margin-top: auto;
  transition: height .3s;
}
.ov-trend-label { font-size: 11px; color: var(--ink-faint); }
.ov-trend-latest { font-weight: 700; color: var(--accent); }
.ov-trend-val { font-size: 12px; font-weight: 600; color: var(--ink-soft); }

/* Overview bars (compact) */
.ov-bars { display: flex; flex-direction: column; gap: 2px; }
.ov-bar-row {
  display: flex; align-items: center; gap: 6px; padding: 2px 0;
}
.ov-rank {
  width: 18px; font-size: 11px; color: var(--ink-faint); text-align: center;
  flex-shrink: 0; font-weight: 600;
}
.ov-bar-label {
  width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--ink-soft); flex-shrink: 0;
}
.period-bars { gap: 5px; }
.period-row { padding: 4px 0; }
.period-label {
  width: 210px;
  font-size: 12px;
  color: var(--deep);
}
.period-val {
  width: 56px;
  font-variant-numeric: tabular-nums;
}
.ov-bar-track {
  flex: 1; height: 14px; background: var(--rule-soft); border-radius: 3px; overflow: hidden;
}
.ov-bar-fill {
  height: 100%; background: var(--deep); border-radius: 3px; opacity: .78;
  transition: width .3s;
}
.cat-fill { background: var(--sage); }
.ov-bar-val { width: 30px; text-align: right; font-size: 12px; font-weight: 600; color: var(--ink-soft); flex-shrink: 0; }

/* Back to overview button */
.back-overview {
  font-size: 13px; color: var(--ink-faint); cursor: pointer;
  padding: 4px 10px; border-radius: 50px; border: 1px solid var(--rule);
  white-space: nowrap; transition: all .15s;
}
.back-overview:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 600px) {
  .overview-row { flex-direction: column; }
  .overview-stats { grid-template-columns: repeat(3, 1fr); }
  .ov-bar-label { width: 70px; }
  .period-label { width: 128px; }
  .period-val { width: 44px; }
  .source-tabs { flex-direction: column; align-items: stretch; }
}

/* ═══════════════════════════════════════
   FUNDHUB — Homepage entry cards
   ═══════════════════════════════════════ */
#home-view { margin-top: 8px; }
.entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.entry-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 1px 0 rgba(43,42,39,.04), 0 4px 16px rgba(43,42,39,.06);
  position: relative;
  overflow: hidden;
}
.entry-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--deep), var(--accent));
  opacity: 0;
  transition: opacity .2s;
}
.entry-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(249,115,22,.08), 0 8px 30px rgba(43,42,39,.10);
  transform: translateY(-2px);
}
.entry-card:hover::before { opacity: 1; }
.entry-title {
  font-size: 18px; font-weight: 700; color: var(--deep); margin-bottom: 4px;
}
.entry-desc {
  font-size: 13px; color: var(--ink-faint); line-height: 1.5; margin-bottom: 8px;
}
.entry-meta {
  font-size: 12px; color: var(--ink-soft);
  background: var(--paper-soft);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  border: 1px solid var(--rule-soft);
}

/* All funds link */
.all-funds-link {
  text-align: center; margin-bottom: 6px;
}
.all-funds-link a {
  font-size: 15px; color: var(--ink-soft); border: none;
  padding: 8px 24px; border-radius: 50px;
  background: var(--paper-soft); border: 1px solid var(--rule);
  display: inline-block; transition: all .15s;
}
.all-funds-link a:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(249,115,22,.06);
}

/* ═══════════════════════════════════════
   View navigation
   ═══════════════════════════════════════ */
.view-nav {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
}
.view-title {
  font-size: 18px; font-weight: 700; color: var(--deep);
}

/* ═══════════════════════════════════════
   Fund item (in entry list view)
   ═══════════════════════════════════════ */
.fund-list { display: flex; flex-direction: column; gap: 10px; }
.fund-item {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 10px; padding: 16px 18px;
  cursor: pointer; transition: all .15s;
  box-shadow: 0 1px 0 rgba(43,42,39,.03);
}
.fund-item:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(249,115,22,.08), 0 4px 16px rgba(43,42,39,.06);
  transform: translateY(-1px);
}
.fund-item-title {
  font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px;
}
.fund-item-desc {
  font-size: 13px; color: var(--ink-faint); margin-bottom: 6px; line-height: 1.5;
}
.fund-item-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-soft);
}
.fund-item-badge {
  background: var(--deep-light); color: var(--deep);
  padding: 1px 10px; border-radius: 50px; font-size: 11px; font-weight: 500;
}
.fund-item-badge.accent {
  background: #fdf6ee; color: #9a6b1a; border: 1px solid #f0dbb5;
}

/* Province/City picker */
.region-picker { margin-bottom: 16px; }
.region-picker-label {
  font-size: 13px; color: var(--ink-faint); font-weight: 500; margin-bottom: 6px;
}
.region-picker-btns {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.region-pick-btn {
  padding: 8px 20px; border-radius: 50px; border: 1px solid var(--rule);
  background: var(--paper-soft); font-size: 14px; cursor: pointer;
  color: var(--ink-soft); font-weight: 500; transition: all .15s;
}
.region-pick-btn.active {
  background: var(--deep); color: #fff; border-color: var(--deep);
}
.region-pick-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* ═══════════════════════════════════════
   Discipline grid
   ═══════════════════════════════════════ */
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.disc-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 10px; padding: 16px 14px; cursor: pointer;
  text-align: center; transition: all .15s;
  box-shadow: 0 1px 0 rgba(43,42,39,.03);
}
.disc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(249,115,22,.08), 0 4px 16px rgba(43,42,39,.06);
  transform: translateY(-2px);
}
.disc-name { font-size: 14px; font-weight: 600; color: var(--deep); }
.disc-count { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* ═══════════════════════════════════════
   Placeholder / coming soon
   ═══════════════════════════════════════ */
.placeholder-view {
  text-align: center; padding: 60px 20px; color: var(--ink-faint);
}
.placeholder-view h3 { font-size: 18px; color: var(--ink-soft); margin-bottom: 8px; }
.placeholder-view p { font-size: 14px; line-height: 1.6; }

/* ═══════════════════════════════════════
   Fund Calendar
   ═══════════════════════════════════════ */
.cal-month {
  font-size: 16px; font-weight: 700; color: var(--deep);
  margin: 18px 0 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--rule-soft);
}
.cal-list { display: flex; flex-direction: column; gap: 10px; }
.cal-event {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 1px 0 rgba(43,42,39,.03);
}
.cal-event.cal-overdue { opacity: .5; }
.cal-event-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; margin-bottom: 6px;
}
.cal-event-name { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.cal-days {
  white-space: nowrap; font-size: 12px; font-weight: 600;
  color: var(--ink-faint); padding: 2px 10px;
  background: var(--paper-soft); border-radius: 50px;
  border: 1px solid var(--rule-soft); flex-shrink: 0;
}
.cal-days.cal-urgent {
  color: #991b1b; background: #fef2f2;
  border-color: #fecaca;
}
.cal-event-desc { font-size: 13px; color: var(--ink-faint); margin-bottom: 8px; line-height: 1.5; }
.cal-event-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-soft);
  align-items: center;
}
.cal-event-meta a { font-size: 12px; }

/* ═══════════════════════════════════════
   Responsive
   ═══════════════════════════════════════ */
@media (max-width: 600px) {
  .entry-grid { grid-template-columns: 1fr; }
  .discipline-grid { grid-template-columns: repeat(2, 1fr); }
  .fund-item { padding: 12px 14px; }
}
