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

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --border: #2e2e2e;
  --text: #e8e8e8;
  --text-muted: #888;
  --text-dim: #555;
  --accent: #7c6af7;
  --accent-dim: #3d3570;
  --green: #4ade80;
  --green-dim: #1a3d28;
  --yellow: #fbbf24;
  --yellow-dim: #3d3010;
  --red: #f87171;
  --red-dim: #3d1a1a;
  --radius: 10px;
  --radius-sm: 6px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.logo span {
  color: var(--accent);
}

.header-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Section */
section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

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

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.app-name {
  font-size: 1rem;
  font-weight: 600;
}

.app-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  white-space: nowrap;
}

.badge-pre-dev {
  background: var(--yellow-dim);
  color: var(--yellow);
}

.badge-planned {
  background: var(--surface-2);
  color: var(--text-muted);
}

.badge-active {
  background: var(--green-dim);
  color: var(--green);
}

.app-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.app-meta-row {
  display: flex;
  gap: 0.4rem;
}

.app-meta-label {
  color: var(--text-dim);
  min-width: 70px;
  flex-shrink: 0;
}

/* Progress bar */
.progress-wrap {
  margin-top: 0.5rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.progress-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.progress-fill.green {
  background: var(--green);
}

/* Next milestone */
.next-milestone {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.next-label {
  color: var(--text-dim);
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.next-text {
  color: var(--text);
}

/* Checklist grid */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.checklist-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

.checklist-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
}

.check-icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.check-icon.done {
  background: var(--green-dim);
  color: var(--green);
}

.check-icon.todo {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: transparent;
}

.check-text.done {
  color: var(--text-muted);
}

.check-text.todo {
  color: var(--text);
}

/* Costs table */
.costs-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cost-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  flex: 1;
  min-width: 140px;
}

.cost-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.3rem;
}

.cost-stat-value {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cost-stat-value.green { color: var(--green); }
.cost-stat-value.yellow { color: var(--yellow); }

.costs-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cost-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

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

.cost-row.header {
  background: var(--surface-2);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

.cost-service { color: var(--text); }
.cost-amount { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.cost-cadence { color: var(--text-muted); text-align: right; }

.cost-status {
  display: flex;
  justify-content: flex-end;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 600px) {
  .cost-row {
    grid-template-columns: 1fr auto auto;
  }
  .cost-cadence {
    display: none;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}
