.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-loading {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
}

.detail-header {
  margin-bottom: 32px;
}
.detail-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
.detail-sol {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  margin-bottom: 12px;
}
.detail-dept {
  color: var(--muted);
  font-size: 15px;
}
.detail-sol-link {
  margin-top: 10px;
}
.detail-sol-link a {
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.detail-sol-link a:hover { opacity: 0.75; }

.lifecycle {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.lifecycle-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.lifecycle-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
}
.lifecycle-section-header .count {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}
.lifecycle-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-tender { background: #60a5fa; }
.dot-award { background: #22c55e; }
.dot-contract { background: var(--accent); }

.lifecycle-empty {
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.record-card {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: block;
}
.record-card:last-child { border-bottom: none; }
.record-card-link {
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.record-card-link:hover {
  background: rgba(255,255,255,0.02);
}
.record-card-link:hover .record-card-title {
  color: var(--accent);
}
.record-card-title {
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}
.record-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 24px;
}
.field {
  display: flex;
  flex-direction: column;
}
.field-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field-value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}
.field-link {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}
.field-link:hover { opacity: 0.75; }
.field-value.mono {
  font-family: var(--mono);
  font-size: 13px;
}

.amendment-timeline {
  padding: 8px 0;
}
.amendment-step {
  display: flex;
  gap: 0;
}
.amendment-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 36px;
  flex-shrink: 0;
  padding-top: 18px;
}
.amendment-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.amendment-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin: 4px 0;
  min-height: 16px;
}
.amendment-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 8px;
}
.amendment-step-last .amendment-body {
  padding-bottom: 16px;
}
.amendment-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 14px 0 4px;
}
.amendment-body .record-card {
  border: none;
  border-bottom: none;
  padding: 0 20px 0 0;
}
.amendment-body .record-card-link {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 12px 16px;
  margin-bottom: 0;
}

.single-record {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.single-record h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .detail-body { padding: 70px 0 40px; }
  .detail-header h1 { font-size: 1.2rem; }
  .record-fields { grid-template-columns: 1fr; }
}
