/* ===== Detail Page Header ===== */
.detail-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.detail-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.detail-header .opp-org {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

.detail-header .opp-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.detail-header .opp-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1rem;
  max-width: 680px;
}

.opp-deadline {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.opp-deadline.urgent {
  color: var(--peach);
  font-weight: 600;
}

.opp-award {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}

.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--sage);
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--sage);
  border-radius: 100px;
  transition: all 0.3s;
}

.ext-link:hover {
  background: var(--sage-light);
}

/* ===== At-a-Glance ===== */
.at-a-glance {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  background: var(--white);
}

.at-a-glance h2 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  margin-bottom: 1.25rem;
}

.glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem 1rem;
}

.glance-grid div {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: var(--bg);
}

.glance-grid dt {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.glance-grid dd {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

/* ===== Table of Contents ===== */
.toc {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.toc h2 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.toc ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.toc a {
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.toc a:hover {
  color: var(--sage);
  border-color: var(--sage);
}

/* ===== Detail Grid ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* ===== Detail Cards ===== */
.detail-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--white);
  transition: border-color 0.3s;
}

.detail-card:hover {
  border-color: #ddd;
}

.detail-card h2 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ===== Card Subtitles ===== */
.card-subtitle {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.card-subtitle:first-child,
.card-content > .card-subtitle:first-of-type {
  margin-top: 0;
}

/* ===== Info List (key-value rows) ===== */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.info-row {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  align-items: baseline;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 110px;
  flex-shrink: 0;
}

.info-row dd {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* ===== Card Note (contextual aside) ===== */
.card-note {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-soft);
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: 10px;
  border-left: 3px solid var(--sage);
}

/* ===== Card Content ===== */
.card-content {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text);
}

.card-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-content ul li {
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.65;
}

.card-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sage);
  opacity: 0.5;
}

.card-content p { margin-bottom: 0.6rem; }
.card-content p:last-child { margin-bottom: 0; }
.card-content strong { font-weight: 600; color: var(--text); }

.card-content a {
  color: var(--sage);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.card-content a:hover { border-color: var(--sage); }

/* ===== Ordered Lists (Steps) ===== */
.detail-card ol,
.steps-list {
  padding-left: 0;
  list-style: none;
  counter-reset: steps;
  font-size: 0.88rem;
  line-height: 1.75;
}

.detail-card ol li,
.steps-list li {
  padding: 0.5rem 0 0.5rem 2.25rem;
  position: relative;
  counter-increment: steps;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.detail-card ol li:last-child,
.steps-list li:last-child {
  border-bottom: none;
}

.detail-card ol li::before,
.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--sage-light);
  color: var(--sage);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== No Research State ===== */
.no-research {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 1.5rem;
  background: var(--white);
}

.no-research .muted {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ===== Sources ===== */
.sources {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.sources h3 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.sources ul { list-style: none; padding: 0; }
.sources ul li { padding: 0.25rem 0; }

.sources ul li a {
  font-size: 0.8rem;
  color: var(--text-soft);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s;
}

.sources ul li a:hover { color: var(--sage); }

/* ===== Last Updated ===== */
.last-updated {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 2.5rem;
  text-align: right;
}

/* ===== Hub Page ===== */
.hub-page { max-width: 960px; margin: 0 auto; }

.hub-desc {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
  line-height: 1.65;
}

.hub-count {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 2rem;
}

/* ===== Compare Styles ===== */
.compare-intro {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.compare-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  background: var(--bg);
}

.compare-table th a {
  color: var(--sage);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
}

.compare-table th a:hover { text-decoration: underline; }

.compare-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}

.compare-table tr:last-child td { border-bottom: none; }

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-soft);
  width: 140px;
  white-space: nowrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare-cta {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.compare-cta a {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--white);
  transition: all 0.3s;
}

.compare-cta a:hover {
  border-color: var(--sage);
  color: var(--sage);
  background: var(--sage-light);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-header h1 { font-size: 1.5rem; }
  .glance-grid { grid-template-columns: repeat(2, 1fr); }
  .toc ul { flex-direction: column; gap: 0.4rem; }
  .compare-table { font-size: 0.8rem; }
  .compare-table td:first-child { width: auto; white-space: normal; }
  .compare-cta { flex-direction: column; }
  .info-row { flex-direction: column; gap: 0.15rem; }
  .info-row dt { min-width: unset; }
  .detail-card { padding: 1.25rem; }
}
