/* memory.gredig.swiss — ROD theme */
:root {
  --primary: #47aa8d;
  --primary-dark: #3a8e75;
  --bg: #f5f6fa;
  --card-bg: #fff;
  --text: #2d3436;
  --text-muted: #7f8c8d;
  --border: #e2e8f0;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }

nav { background: white; border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.solar-link { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.solar-link:hover { color: var(--primary); }

main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { padding: 1.25rem; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-value-small { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.3; word-break: break-word; }
.stat-sub { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }
.stat-card.alert .stat-value { color: var(--warning); }
.stat-card.urgent .stat-value { color: var(--danger); }

.card { background: var(--card-bg); border-radius: 10px; padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.card h2 { margin-top: 0; margin-bottom: 1rem; font-size: 1.15rem; color: var(--text); }

.intro-card { border-left: 4px solid var(--primary); }
.intro-card p { margin: 0 0 0.6rem 0; color: var(--text); }
.intro-card p:last-child { margin-bottom: 0; }
.intro-card code { background: #eef4f1; color: var(--primary-dark); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
.intro-goal { font-size: 0.95rem; color: var(--text-muted); }

.search-card input {
  width: 100%; padding: 0.75rem 1rem; font-size: 1rem;
  border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit;
}
.search-card input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }

#search-results { margin-top: 1rem; }
.result-item { padding: 0.75rem; border-bottom: 1px solid var(--border); }
.result-item:last-child { border-bottom: none; }
.result-filename { font-weight: 600; color: var(--primary); margin-bottom: 0.25rem; }
.result-snippet { font-size: 0.9rem; color: var(--text-muted); }
.result-snippet mark { background: #fff3cd; color: var(--text); padding: 0 2px; border-radius: 2px; }
.result-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.file-list { font-size: 0.9rem; }
.file-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); align-items: center; gap: 1rem; }
.file-row:last-child { border-bottom: none; }
.file-name { font-weight: 500; flex: 1; }
.file-meta { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.cat-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; background: #ecf0f1; color: var(--text-muted); margin-right: 0.5rem; }
.cat-feedback { background: #fff3cd; color: #8a6d3b; }
.cat-session { background: #d1ecf1; color: #0c5460; }
.cat-project { background: #d4edda; color: #155724; }
.cat-rod-app { background: #e2d1f9; color: #6a1b9a; }
.cat-legal { background: #f8d7da; color: #721c24; }

.btn { background: var(--primary); color: white; border: none; padding: 0.6rem 1.25rem; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: 600; }
.btn:hover { background: var(--primary-dark); }
.btn-mini { background: transparent; color: var(--primary); border: 1px solid var(--primary); padding: 0.3rem 0.75rem; border-radius: 4px; cursor: pointer; font-size: 0.8rem; margin-top: 0.5rem; }
.btn-mini:hover { background: var(--primary); color: white; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }
.cat-cell { padding: 0.75rem; background: var(--bg); border-radius: 6px; }
.cat-cell-name { font-weight: 600; color: var(--text); }
.cat-cell-count { font-size: 1.5rem; color: var(--primary); }
.cat-cell-size { font-size: 0.8rem; color: var(--text-muted); }

.run-row { display: flex; gap: 1rem; padding: 0.4rem 0; font-family: 'SF Mono', monospace; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.run-row:last-child { border-bottom: none; }
.run-time { color: var(--text-muted); }
.run-stats { color: var(--text); }
.run-duration { color: var(--text-muted); margin-left: auto; }

.must-read-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.must-read-row.unread { color: var(--danger); }
.must-read-row.drift { color: var(--warning); }

@media (max-width: 768px) {
  main { padding: 1rem; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.5rem; }
}
