.detail-body {
  padding: 80px 0 60px;
  min-height: 60vh;
}
.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

.detail-header { margin-bottom: 24px; }
.program-dept {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.vendor-meta {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 0;
}
.vendor-meta strong {
  color: var(--text);
  font-weight: 600;
}

.forecast-box {
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid;
}
.forecast-active {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
}
.forecast-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  color: var(--accent);
}
.forecast-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.profile-section h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.view-all {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.view-all:hover { text-decoration: underline; }

.year-chart { display: flex; flex-direction: column; gap: 6px; }
.year-bar-row {
  display: grid;
  grid-template-columns: 40px 1fr 100px;
  align-items: center;
  gap: 10px;
}
.year-label {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  font-family: var(--mono);
}
.year-bar-wrap {
  height: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
}
.year-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  opacity: 0.8;
}
.year-stat {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text);
  white-space: nowrap;
}
.year-count { color: var(--muted); }

.breakdown-list { display: flex; flex-direction: column; gap: 2px; }
.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label {
  font-size: 14px;
  flex: 1;
  min-width: 0;
}
.breakdown-label a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.breakdown-label a:hover { color: var(--accent); }
.breakdown-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
}
.breakdown-count { font-size: 13px; color: var(--muted); }
.breakdown-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.grants-list { display: flex; flex-direction: column; }
.grant-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.grant-row:last-child { border-bottom: none; }
.grant-row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.grant-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
}
.grant-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.grant-title a:hover { color: var(--accent); }
.grant-subtitle {
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
}
.grant-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.grant-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.grant-date { color: var(--muted); }

.alert-box {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 24px 28px;
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 12px;
}
.alert-box-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.alert-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.alert-form input[type="email"] {
  flex: 1;
  max-width: 300px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.alert-form input[type="email"]:focus {
  border-color: var(--accent);
}
.alert-msg {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .detail-body { padding: 24px 0 40px; }
  .detail-header h1 { font-size: 1.3rem; }
  .year-bar-row { grid-template-columns: 36px 1fr 80px; }
  .grant-row-header { flex-direction: column; gap: 2px; }
  .breakdown-meta { flex-direction: column; align-items: flex-end; gap: 2px; }
  .alert-form { flex-direction: column; align-items: stretch; }
  .alert-form input[type="email"] { max-width: none; }
}
