/* ==========================================================================
   Changes — in-app build log (#184)

   Olfantic has no design-token system yet, so rather than depend on
   `--color-*` / `--space-*` variables (as the lucentbrief original did) we
   scope a small local palette to `.changes-container`, drawn from the
   olive/cream brand values used by the landing page and feedback chrome.
   When a real design system lands, these can be promoted to :root tokens.
   ========================================================================== */

.changes-container {
  --cl-bg: #f6efe7;
  --cl-surface: #fffaf3;
  --cl-bg-alt: #ece1d3;
  --cl-ink: #1b1715;
  --cl-ink-secondary: #5a4f45;
  --cl-ink-muted: #8a7d70;
  --cl-accent: #7a4e2d;
  --cl-accent-hover: #5f3c22;
  --cl-border: rgba(122, 78, 45, 0.22);
  --cl-border-strong: rgba(122, 78, 45, 0.45);
  --cl-positive: #2e7d32;
  --cl-negative: #b3261e;
  --cl-blue: #1565c0;
  --cl-slate: #455a64;

  --cl-font-heading: ui-serif, Georgia, "Iowan Old Style", "Apple Garamond", serif;
  --cl-font-body: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --cl-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  max-width: 52rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  font-family: var(--cl-font-body);
  color: var(--cl-ink);
}

/* ---------- Index Header ---------- */

.changes-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--cl-accent);
}

.changes-page-title {
  font-family: var(--cl-font-heading);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--cl-ink);
  margin: 0 0 0.5rem;
}

.changes-subtitle {
  font-size: 1.125rem;
  color: var(--cl-ink-secondary);
  margin: 0;
}

/* ---------- Filter Chips ---------- */

.changes-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.changes-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35em 0.85em;
  border-radius: 999px;
  border: 1px solid var(--cl-border);
  background: var(--cl-surface);
  color: var(--cl-ink-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.changes-filter-chip:hover {
  border-color: var(--cl-border-strong);
  color: var(--cl-ink);
}

.changes-filter-chip--active {
  background: var(--cl-ink);
  color: var(--cl-bg);
  border-color: var(--cl-ink);
}

.changes-filter-chip--active:hover {
  color: var(--cl-bg);
}

.changes-filter-chip-count {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 0.4em;
  border-radius: 999px;
  background: var(--cl-bg-alt);
  color: var(--cl-ink-muted);
  font-size: 0.85em;
  font-weight: 600;
  text-align: center;
}

.changes-filter-chip--active .changes-filter-chip-count {
  background: rgba(255, 255, 255, 0.18);
  color: var(--cl-bg);
}

/* ---------- Index List ---------- */

.changes-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.changes-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--cl-border);
}

.changes-item:first-child {
  padding-top: 0;
}

.changes-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.changes-date {
  display: block;
  font-size: 0.875rem;
  color: var(--cl-ink-muted);
}

/* ---------- Tag Pill ---------- */

.changes-tag-pill {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
  background: var(--cl-bg-alt);
  color: var(--cl-ink-secondary);
  border: 1px solid var(--cl-border);
}

/* Per-tag color mappings. The active filter chip for a tag reuses the same
   color so selecting "feature" turns its chip the feature green, etc. */
.changes-tag-pill--bug,
.changes-filter-chip--bug.changes-filter-chip--active {
  background: var(--cl-negative);
  color: #fff;
  border-color: var(--cl-negative);
}

.changes-tag-pill--feature,
.changes-filter-chip--feature.changes-filter-chip--active {
  background: var(--cl-positive);
  color: #fff;
  border-color: var(--cl-positive);
}

.changes-tag-pill--efficiency,
.changes-filter-chip--efficiency.changes-filter-chip--active {
  background: var(--cl-blue);
  color: #fff;
  border-color: var(--cl-blue);
}

.changes-tag-pill--infrastructure,
.changes-filter-chip--infrastructure.changes-filter-chip--active {
  background: var(--cl-slate);
  color: #fff;
  border-color: var(--cl-slate);
}

.changes-tag-pill--refactor,
.changes-filter-chip--refactor.changes-filter-chip--active {
  background: var(--cl-border-strong);
  color: var(--cl-ink);
  border-color: var(--cl-border-strong);
}

.changes-tag-pill--tuning,
.changes-filter-chip--tuning.changes-filter-chip--active {
  background: var(--cl-accent);
  color: #fff;
  border-color: var(--cl-accent);
}

.changes-tag-pill--docs,
.changes-filter-chip--docs.changes-filter-chip--active {
  background: #efe2d3;
  color: var(--cl-accent-hover);
  border-color: var(--cl-accent);
}

.changes-tag-pill--chore,
.changes-filter-chip--chore.changes-filter-chip--active {
  background: var(--cl-ink-muted);
  color: #fff;
  border-color: var(--cl-ink-muted);
}

.changes-title {
  font-family: var(--cl-font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
}

.changes-title-link {
  color: var(--cl-ink);
  text-decoration: none;
  transition: color 120ms ease;
}

.changes-title-link:hover {
  color: var(--cl-accent);
}

.changes-summary {
  font-size: 1rem;
  color: var(--cl-ink-secondary);
  line-height: 1.6;
  margin: 0;
}

.changes-empty {
  font-size: 1rem;
  color: var(--cl-ink-muted);
  padding: 2.5rem 0;
}

/* ---------- Show Header ---------- */

.changes-show-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--cl-accent);
}

.changes-nav {
  margin-bottom: 1rem;
}

.changes-back-link {
  font-size: 0.9rem;
  color: var(--cl-accent);
  text-decoration: none;
}

.changes-back-link:hover {
  text-decoration: underline;
}

.changes-show-title {
  font-family: var(--cl-font-heading);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--cl-ink);
  margin: 0 0 0.75rem;
}

.changes-show-date {
  display: block;
  font-size: 1rem;
  color: var(--cl-ink-secondary);
}

/* ---------- Show Content (Markdown) ---------- */

.changes-content {
  font-family: var(--cl-font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--cl-ink);
}

.changes-content h1 {
  font-family: var(--cl-font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 2rem;
  border-top: 2px solid var(--cl-accent);
  letter-spacing: -0.02em;
}

.changes-content h1:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.changes-content h2 {
  font-family: var(--cl-font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.changes-content h3 {
  font-family: var(--cl-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.changes-content p {
  margin-bottom: 1rem;
}

.changes-content a {
  color: var(--cl-accent);
  text-decoration: none;
  text-underline-offset: 0.15em;
}

.changes-content a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.changes-content ul,
.changes-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.changes-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.changes-content blockquote {
  border-left: 4px solid var(--cl-accent);
  padding-left: 1rem;
  color: var(--cl-ink-secondary);
  margin: 1rem 0;
  font-style: italic;
}

.changes-content code {
  font-family: var(--cl-font-mono);
  font-size: 0.9em;
  background: var(--cl-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
}

.changes-content pre {
  background: var(--cl-bg-alt);
  border: 1px solid var(--cl-border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.changes-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

.changes-content strong {
  font-weight: 700;
}

.changes-content em {
  color: var(--cl-ink-secondary);
}

.changes-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.changes-content th,
.changes-content td {
  border: 1px solid var(--cl-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.changes-content th {
  background: var(--cl-bg-alt);
  font-weight: 600;
}

/* ---------- Site footer (signed-in only entry point, #184) ---------- */

.site-footer {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 0.85rem;
  color: #8a7d70;
  text-align: center;
}

.site-footer-link {
  color: #8a7d70;
  text-decoration: none;
  transition: color 120ms ease;
}

.site-footer-link:hover {
  color: #7a4e2d;
}

.site-footer-sep {
  margin: 0 0.5rem;
  opacity: 0.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .changes-content h1 {
    font-size: 1.5rem;
  }

  .changes-content h2 {
    font-size: 1.2rem;
  }
}
