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

:root {
  --bg: #f4f7f6;
  --card-bg: #fff;
  --text: #141413;
  --text-secondary: #5c5c5a;
  --text-muted: #8c8c8a;
  --accent: #2a9d8f;
  --accent-hover: #21867a;
  --border: #e5e4df;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 2rem;
}

.container { max-width: 1280px; margin: 0 auto; }

/* Two-column home layout */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr 320px;
  }
}

.home-sidebar {
  position: sticky;
  top: 2rem;
  align-self: start;
}

@media (min-width: 900px) {
  .home-sidebar {
    border-left: 1px solid var(--border);
    padding-left: 2rem;
  }
}

header { margin-bottom: 2rem; }
h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }

.counters {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.25rem;
}

.counter {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.counter strong {
  color: var(--text);
  font-weight: 600;
}
.counter-detail {
  color: var(--text-muted);
  font-size: 0.75rem;
}
h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-secondary); }

.back {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
}
.back:hover { color: var(--accent-hover); }

.notes {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}
.project-notes {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.project-notes p { margin-bottom: 0.5rem; }
.project-notes h1 { font-size: 1.1rem; margin: 1rem 0 0.4rem; color: var(--text); }
.project-notes h2 { font-size: 0.95rem; margin: 0.75rem 0 0.3rem; color: var(--text); }
.project-notes h3 { font-size: 0.85rem; margin: 0.5rem 0 0.2rem; color: var(--text-secondary); }
.project-notes ul { margin: 0 0 0.5rem 1.25rem; }
.project-notes ol { margin: 0 0 0.5rem 1.25rem; }
.project-notes li { margin-bottom: 0.15rem; }
.project-notes blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
  margin: 0.5rem 0;
  font-style: italic;
}

/* Project cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s;
}
.card:hover {
  box-shadow: 0 2px 8px rgba(20, 20, 19, 0.08);
}

.card-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.card-notes {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(42, 157, 143, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* Inbox tables */
section { margin-bottom: 2rem; }

.inbox {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.inbox th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.inbox td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.inbox tr.done td {
  color: var(--text-muted);
  text-decoration: line-through;
}

.inbox .summary { max-width: 400px; }
.inbox .from { white-space: nowrap; }
.inbox .channel { white-space: nowrap; color: var(--text-muted); }
.inbox .date { white-space: nowrap; color: var(--text-muted); }

.empty {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
}

.done-section { opacity: 0.6; }

/* Calendar / Meetings */
.calendar { margin-bottom: 1.5rem; }
.home-sidebar .calendar { margin-bottom: 0; }

.cal-day { margin-bottom: 1rem; }
.cal-day-heading {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.cal-event {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.cal-event.tentative { opacity: 0.6; }

.cal-time {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 6.5rem;
}
.cal-summary { font-weight: 600; }
.cal-with { color: var(--text-muted); }
.cal-vc {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
}
.cal-vc:hover { color: var(--accent-hover); }
.cal-doc {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
}
.cal-doc:hover { color: var(--accent); }

/* Actions (GTD next) */
.actions { margin-bottom: 2rem; }
.action-group { margin-bottom: 0.75rem; }
.action-category {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.action-list {
  list-style: none;
  margin: 0 0 0 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
}
.action-list li {
  margin-bottom: 0.15rem;
  padding-left: 0.75rem;
  position: relative;
}
.action-list li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}
.action-list li.done {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* References */
.ref-list {
  list-style: none;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}
.ref-list li {
  margin-bottom: 0.15rem;
}
.ref-link {
  text-decoration: none;
  color: var(--accent);
}
.ref-link:hover { color: var(--accent-hover); }
.ref-range {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Triage section */
.triage { margin-top: 2rem; }

.triage-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  white-space: nowrap;
}

.triage-assign {
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card-bg);
}

.triage-btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--text-secondary);
  transition: background 0.15s;
}
.triage-btn:hover { background: var(--bg); }
.triage-btn.convert { color: var(--accent); border-color: var(--accent); }
.triage-btn.archive { color: var(--text-muted); }
