/* ============================================================================
   GitClaw — Apple HIG Design System
   Clean, minimal, black and white. SF Pro. No terminal. No emojis.
   ============================================================================ */

:root {
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #e8e8ed;
  --bg-hover: #f0f0f5;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --border: #d2d2d7;
  --border-light: #e5e5ea;
  --separator: #c6c6c8;
  --accent: #1d1d1f;
  --active: #000000;
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
          'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.47059;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: -0.022em;
}

/* ── Header Bar ───────────────────────────────────────────────────────────── */

.header-bar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text-primary);
}

.header-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 980px;
  transition: all 0.2s;
}

.header-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.alive-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.alive-green { background: #34c759; }
.alive-amber { background: #ff9f0a; }
.alive-grey { background: var(--text-tertiary); }

.header-meta {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  display: flex;
  gap: 16px;
  align-items: center;
}

.header-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */

.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text-primary);
}

.nav a.active {
  color: var(--active);
  border-bottom-color: var(--active);
}

/* ── Main Content ─────────────────────────────────────────────────────────── */

.main {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── Grid Layouts ─────────────────────────────────────────────────────────── */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

/* ── Tablet (768px) ──────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .header-bar {
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px;
  }

  .header-left { width: 100%; }

  .header-meta {
    width: 100%;
    gap: 12px;
    font-size: 12px;
  }

  .nav a {
    padding: 8px 12px;
    font-size: 12px;
  }

  .main { padding: 16px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .stat-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .agent-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* ── Phone (480px) ───────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  html { font-size: 14px; }

  .header-bar { padding: 8px 12px; }

  .header-title { font-size: 15px; }

  .header-meta {
    gap: 8px;
    font-size: 11px;
  }

  .header-link {
    font-size: 11px;
    padding: 2px 8px;
  }

  .xp-bar { width: 50px; }

  .nav {
    padding: 0 12px;
    -webkit-overflow-scrolling: touch;
  }

  .nav a {
    padding: 6px 10px;
    font-size: 11px;
  }

  .main { padding: 12px; }

  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card { padding: 14px 10px; }

  .stat-value { font-size: 22px; }

  .stat-label { font-size: 11px; }

  .panel { padding: 14px; }

  .agent-grid {
    grid-template-columns: 1fr;
  }

  .agent-card { padding: 12px; }

  .footer {
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    text-align: center;
  }
}

/* ── Panels ───────────────────────────────────────────────────────────────── */

.panel {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}

.panel.full-width {
  width: 100%;
}

.panel-title {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

/* ── Data Tables ──────────────────────────────────────────────────────────── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: left;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

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

.data-table tr:hover td {
  background: var(--bg-secondary);
}

.data-table .num {
  color: var(--text-primary);
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 980px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.tab-btn.active {
  color: #ffffff;
  background: var(--active);
  border-color: var(--active);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ── Entries & Expandable Rows ────────────────────────────────────────────── */

.memory-entry, .council-entry, .blog-post {
  border-bottom: 1px solid var(--border-light);
}

.memory-entry:last-child, .council-entry:last-child, .blog-post:last-child {
  border-bottom: none;
}

.entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.entry-header:hover {
  background: var(--bg-secondary);
}

.expand-icon {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 16px;
  min-width: 20px;
  text-align: center;
  font-weight: 300;
}

.entry-body {
  padding: 12px 16px 16px;
  margin-left: 8px;
  border-left: 2px solid var(--border-light);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.entry-body h1, .entry-body h2, .entry-body h3 {
  color: var(--text-primary);
  margin: 12px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.entry-body pre {
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid var(--border-light);
}

.entry-body code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 13px;
  color: var(--text-primary);
}

.entry-body p code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.entry-body p {
  margin: 6px 0;
}

.entry-body ul {
  margin: 6px 0;
  padding-left: 20px;
}

.entry-body li {
  margin: 4px 0;
}

.entry-body hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 12px 0;
}

.entry-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Agent Grid ───────────────────────────────────────────────────────────── */

.agent-group {
  margin-bottom: 24px;
}

.agent-group:last-child {
  margin-bottom: 0;
}

.agent-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.agent-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.agent-card:hover {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border-color: var(--border);
}

.agent-card.disabled {
  opacity: 0.45;
}

.agent-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.agent-icon {
  width: 28px;
  height: 28px;
  background: var(--bg-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.agent-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

.agent-desc {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.agent-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ── Badges ───────────────────────────────────────────────────────────────── */

.badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: 2px 8px;
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: 980px;
  font-weight: 500;
}

/* ── Status Indicators ────────────────────────────────────────────────────── */

.status-active {
  color: var(--text-primary);
  font-weight: 600;
}

.status-active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #34c759;
  border-radius: 50%;
  margin-right: 6px;
}

.status-disabled {
  color: var(--text-tertiary);
}

.status-proposed { color: var(--text-secondary); }
.status-approved { color: var(--text-primary); font-weight: 600; }
.status-rejected { color: var(--text-tertiary); text-decoration: line-through; }

/* ── Score Grid (Council) ─────────────────────────────────────────────────── */

.score-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}

.score-row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.score-row .label {
  min-width: 50px;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.score-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
}

.score-value {
  min-width: 30px;
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── JSON View (Debug) ────────────────────────────────────────────────────── */

.json-view {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.6;
}

.json-view code {
  color: var(--text-primary);
}

/* ── Commit Log (Debug) ───────────────────────────────────────────────────── */

.commit-log {
  max-height: 300px;
  overflow-y: auto;
}

.commit-line {
  padding: 6px 12px;
  font-size: 13px;
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.commit-line:last-child {
  border-bottom: none;
}

.commit-line:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ── Webring Nav ──────────────────────────────────────────────────────────── */

.webring-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.webring-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.webring-nav a:hover {
  color: var(--text-primary);
}

/* ── Achievements ─────────────────────────────────────────────────────────── */

.achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

/* ── Empty State ──────────────────────────────────────────────────────────── */

.empty {
  color: var(--text-tertiary);
  padding: 24px;
  text-align: center;
  font-size: 14px;
}

/* ── Goals ─────────────────────────────────────────────────────────────────── */

.goals {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ── XP Bar ───────────────────────────────────────────────────────────────── */

.xp-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xp-bar {
  width: 80px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
}

/* ── Stat Cards ──────────────────────────────────────────────────────────── */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.stat-bar {
  width: 100%;
  height: 3px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}

.stat-bar-fill {
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
}

/* ── Table Scroll ────────────────────────────────────────────────────────── */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Trigger Link ────────────────────────────────────────────────────────── */

.trigger-link {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 980px;
  margin-left: auto;
  transition: all 0.2s;
  white-space: nowrap;
}

.trigger-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

/* ── Plugin Cards ────────────────────────────────────────────────────────── */

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.plugin-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}

.plugin-card:hover {
  border-color: var(--border);
}

.plugin-card.enabled {
  border-left: 3px solid var(--green);
}

.plugin-card.disabled {
  border-left: 3px solid var(--border);
  opacity: 0.8;
}

.plugin-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.plugin-icon {
  font-size: 24px;
  line-height: 1;
}

.plugin-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.plugin-status {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 980px;
}

.plugin-status.on {
  background: rgba(52, 199, 89, 0.1);
  color: var(--green);
}

.plugin-status.off {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}

.plugin-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.plugin-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.secret-tag {
  display: inline-block;
  font-size: 11px;
  font-family: 'SF Mono', ui-monospace, monospace;
  padding: 2px 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  color: var(--text-secondary);
}

.plugin-link {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
}

.plugin-link:hover {
  text-decoration: underline;
}

.vis-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 980px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vis-private {
  background: rgba(255, 59, 48, 0.08);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.setup-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}

.setup-box h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
}

.setup-box ol {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.setup-box code {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 12px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Secondary Text ───────────────────────────────────────────────────────── */

.secondary { color: var(--text-secondary); }
.tertiary { color: var(--text-tertiary); }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-light);
  padding: 12px 24px;
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text-primary);
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ── Selection ────────────────────────────────────────────────────────────── */

::selection {
  background: rgba(0, 0, 0, 0.1);
}

/* ── NYT-Style Dashboard ─────────────────────────────────────────────────── */

.nyt-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 2px solid var(--text-primary);
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.nyt-ticker strong {
  color: var(--text-primary);
  font-weight: 600;
}

.ticker-sep {
  color: var(--text-tertiary);
}

.nyt-hero {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.nyt-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.nyt-hero-headline {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.nyt-hero-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nyt-sha {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: none;
}

.nyt-sha:hover {
  color: var(--text-primary);
}

.nyt-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 24px;
}

.nyt-main-col {
  border-right: 1px solid var(--border-light);
  padding-right: 24px;
}

.nyt-sidebar {
  min-width: 0;
}

.nyt-section-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text-primary);
  margin-bottom: 16px;
}

.nyt-article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.nyt-article {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.nyt-article:nth-child(even) {
  padding-left: 16px;
  padding-right: 0;
  border-left: 1px solid var(--border-light);
}

.nyt-article-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.nyt-article-headline {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.nyt-article-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nyt-sidebar-story {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.nyt-sidebar-story:last-child {
  border-bottom: none;
}

.nyt-sidebar-title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.nyt-sidebar-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: 4px;
}

.nyt-headline-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

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

.nyt-headline-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  min-width: 70px;
  flex-shrink: 0;
}

.nyt-headline-text {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .nyt-layout {
    grid-template-columns: 1fr;
  }

  .nyt-main-col {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 20px;
  }

  .nyt-article-grid {
    grid-template-columns: 1fr;
  }

  .nyt-article:nth-child(even) {
    padding-left: 0;
    border-left: none;
  }

  .nyt-hero-headline {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .nyt-ticker {
    font-size: 11px;
    gap: 6px;
  }

  .nyt-hero-headline {
    font-size: 20px;
  }

  .nyt-headline-row {
    flex-wrap: wrap;
    gap: 4px;
  }

  .nyt-headline-label {
    min-width: auto;
  }
}

/* ── Entry Preview (always-visible snippet) ──────────────────────────────── */

.entry-preview {
  padding: 2px 8px 10px;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Headline Cards (Dashboard) ──────────────────────────────────────────── */

.headline-card {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-light);
}

.headline-card:last-child {
  border-bottom: none;
}

.headline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.headline-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.headline-preview {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Featured Content Cards (Dashboard) ──────────────────────────────────── */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.featured-card {
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.featured-card:hover {
  border-color: var(--border);
}

.featured-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.featured-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 6px;
}

.featured-card-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ── Blog Article Cards ──────────────────────────────────────────────────── */

.blog-card {
  padding: 20px 8px;
  border-bottom: 1px solid var(--border-light);
}

.blog-card:last-child {
  border-bottom: none;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.blog-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0 0 8px;
}

.blog-card-preview {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ── Mini Score Bars (Council inline) ────────────────────────────────────── */

.council-inline {
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mini-scores {
  display: flex;
  gap: 4px;
  align-items: center;
}

.mini-score {
  display: inline-block;
  width: 40px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  cursor: help;
}

.mini-score-fill {
  display: block;
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
}

.goal-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* ── Changelog ───────────────────────────────────────────────────────────── */

.changelog-group {
  margin-bottom: 24px;
}

.changelog-group:last-child {
  margin-bottom: 0;
}

.changelog-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.changelog-entry {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.changelog-entry:hover {
  background: var(--bg-secondary);
}

.changelog-entry.agent {
  background: var(--bg-secondary);
}

.changelog-sha {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 12px;
  min-width: 56px;
  color: var(--text-secondary);
}

.changelog-sha a {
  color: inherit;
  text-decoration: none;
}

.changelog-sha a:hover {
  color: var(--text-primary);
}

.changelog-time {
  min-width: 40px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.changelog-msg {
  flex: 1;
  color: var(--text-primary);
}

.changelog-author {
  font-size: 12px;
  min-width: 80px;
  text-align: right;
}

/* ── About / Setup Page ──────────────────────────────────────────────────── */

.about-hero {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
}

.about-hero strong {
  color: var(--text-primary);
}

.setup-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  line-height: 1.4;
}

.checklist-item.checklist-done {
  background: var(--bg-secondary);
  border-color: transparent;
}

.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 16px 0;
}

.arch-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.arch-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  flex: 1;
  max-width: 220px;
}

.arch-box .tertiary {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
}

.arch-arrow {
  font-size: 16px;
  color: var(--text-tertiary);
  padding: 4px 0;
}

/* ── GitHub Stat Cards ───────────────────────────────────────────────────── */

.gh-stat {
  border-left: 2px solid var(--border);
}

/* ── Responsive: 6-column stat cards ─────────────────────────────────────── */

@media (max-width: 900px) {
  .stat-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .changelog-entry {
    flex-wrap: wrap;
    gap: 4px;
  }

  .changelog-author {
    min-width: auto;
    text-align: left;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .arch-row {
    flex-direction: column;
    align-items: center;
  }

  .arch-box {
    max-width: 100%;
  }
}

/* ── Network Graph (Memory) ──────────────────────────────────────────────── */

.graph-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.graph-container svg {
  display: block;
}

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0;
  font-size: 12px;
}

.graph-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.graph-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
