/* Alignment Ledger — alignment-ledger.css */

/* ── Layout ──────────────────────────────────────────────────────── */
.al-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  color: var(--color-text, #e8e4d9);
  font-family: var(--font-body, system-ui, sans-serif);
}

.al-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
}

.al-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: var(--color-accent, #fbbf24);
}

.al-hero-description {
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
  color: rgba(232, 228, 217, 0.8);
  font-size: 1rem;
}

/* ── Controls ─────────────────────────────────────────────────────── */
.al-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.al-controls label {
  font-size: 0.875rem;
  color: rgba(232, 228, 217, 0.7);
}

.al-controls select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.375rem;
  color: var(--color-text, #e8e4d9);
  padding: 0.375rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ── Record card ─────────────────────────────────────────────────── */
.al-section {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.5rem;
}

.al-year-heading,
.al-section-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-accent, #fbbf24);
  margin: 0 0 1rem;
}

.al-record-grid,
.al-cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0.25rem 1rem;
}

@media (max-width: 480px) {
  .al-record-grid,
  .al-cmp-grid { grid-template-columns: 1fr; }
}

.al-record-grid dt,
.al-cmp-grid dt {
  font-size: 0.8rem;
  color: rgba(232, 228, 217, 0.55);
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.al-record-grid dd,
.al-cmp-grid dd {
  font-size: 0.9rem;
  color: var(--color-text, #e8e4d9);
  margin: 0;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Comparison ──────────────────────────────────────────────────── */
.al-cmp-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(232, 228, 217, 0.9);
  margin: 0 0 0.75rem;
}

.al-cmp-similarities,
.al-cmp-differences {
  font-size: 0.9rem;
  margin: 0.5rem 0;
  line-height: 1.6;
}

.al-precision-note {
  font-size: 0.8rem;
  color: rgba(232, 228, 217, 0.45);
  margin: 0.5rem 0 0;
  font-style: italic;
}

/* ── Recurrence table ─────────────────────────────────────────────── */
.al-recurrence-table,
.al-historical-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 0;
}

.al-recurrence-table caption,
.al-historical-table caption {
  font-size: 0.8rem;
  color: rgba(232, 228, 217, 0.5);
  text-align: left;
  margin-bottom: 0.5rem;
  caption-side: top;
}

.al-recurrence-table th,
.al-historical-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(232, 228, 217, 0.6);
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.al-recurrence-table td,
.al-historical-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--color-text, #e8e4d9);
}

.al-recurrence-table tr:hover td,
.al-historical-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.al-recurrence-note {
  font-size: 0.78rem;
  color: rgba(232, 228, 217, 0.4);
  margin: 0.5rem 0 0;
  font-style: italic;
}

/* ── Year buttons ─────────────────────────────────────────────────── */
.al-year-btn {
  background: none;
  border: none;
  color: var(--color-accent, #fbbf24);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.al-year-btn:hover { opacity: 0.8; }
.al-year-btn:focus-visible {
  outline: 2px solid var(--color-accent, #fbbf24);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Spiral list ──────────────────────────────────────────────────── */
.al-spiral-list {
  padding: 0 0 0 1.25rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

.al-spiral-list li strong { color: var(--color-accent, #fbbf24); }

/* ── Export / sharing row ────────────────────────────────────────── */
.al-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.al-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text, #e8e4d9);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.al-btn:hover { background: rgba(255, 255, 255, 0.1); }
.al-btn:focus-visible {
  outline: 2px solid var(--color-accent, #fbbf24);
  outline-offset: 2px;
}

.al-btn-primary {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.al-btn-primary:hover { background: rgba(251, 191, 36, 0.2); }

/* ── Error ───────────────────────────────────────────────────────── */
.al-error {
  color: rgba(248, 113, 113, 0.9);
  font-size: 0.875rem;
  margin: 0;
}

/* ── Methods / sources ───────────────────────────────────────────── */
.al-methods-summary {
  font-size: 0.875rem;
  color: rgba(232, 228, 217, 0.65);
  line-height: 1.7;
  padding: 0;
  margin: 0;
}

.al-source-disclosure {
  font-size: 0.8rem;
  color: rgba(232, 228, 217, 0.4);
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* ── Link to sphere ──────────────────────────────────────────────── */
.al-sphere-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent, #fbbf24);
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  padding-bottom: 1px;
}

.al-sphere-link:hover { border-bottom-color: rgba(251, 191, 36, 0.7); }

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── High contrast ───────────────────────────────────────────────── */
@media (forced-colors: active) {
  .al-btn, .al-controls select { border: 2px solid ButtonText; }
  .al-year-heading, .al-hero-title { color: Highlight; }
}
