:root {
  --bg: #0a0b10;
  --bg-surface: rgba(255,255,255,0.03);
  --bg-panel: #111623;
  --border: rgba(59,130,246,0.14);
  --border-strong: rgba(59,130,246,0.28);
  --primary: #3b82f6;
  --secondary: #8b5cf6;
  --accent: #38bdf8;
  --success: #4ade80;
  --warning: #fbbf24;
  --text-1: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-4: #64748b;
  --radius: 16px;
  --shadow: 0 18px 48px rgba(2,6,23,0.35);
  --max-w: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(59,130,246,0.14), transparent 36%),
    radial-gradient(circle at 80% 12%, rgba(139,92,246,0.12), transparent 28%),
    var(--bg);
  color: var(--text-2);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
}

a { color: #60a5fa; text-decoration: none; }
a:hover { color: #93c5fd; }

.page-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 28px;
}

.page-hero {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 10px;
}

.hero-title {
  margin: 0 0 12px;
  color: var(--text-1);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
}

.hero-subtitle {
  max-width: 760px;
  margin: 0;
  font-size: 16px;
  color: var(--text-2);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.14);
}

.hero-badge.accent {
  background: rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.18);
}

.hero-badge.success {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.18);
  color: #bbf7d0;
}

.hero-badge.warning {
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.18);
  color: #fde68a;
}

.section-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.section-kicker {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-4);
  font-weight: 700;
  margin: 0 0 14px;
}

.section-title {
  margin: 0 0 12px;
  color: var(--text-1);
  font-size: 24px;
}

.section-copy {
  margin: 0;
  color: var(--text-3);
}

.detail-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.detail-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card-label {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.card-title {
  margin: 0 0 12px;
  color: var(--text-1);
  font-size: 20px;
}

.card-text {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
}

.detail-list,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list li {
  position: relative;
  padding-left: 16px;
  color: var(--text-2);
  font-size: 14px;
}

.detail-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.chip-list li {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--text-2);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.14);
}

.note {
  margin-top: 16px;
  border-left: 3px solid var(--warning);
  padding: 12px 14px;
  background: rgba(251,191,36,0.06);
  color: #fde68a;
  font-size: 13px;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.page-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(59,130,246,0.18);
  background: rgba(59,130,246,0.08);
  color: #60a5fa;
}

.page-button.secondary {
  border-color: rgba(139,92,246,0.2);
  background: rgba(139,92,246,0.08);
  color: #c4b5fd;
}

.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.rhythms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.rhythm-block {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.rhythm-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.rhythm-label.daily { color: #60a5fa; }
.rhythm-label.weekly { color: #c4b5fd; }
.rhythm-label.monthly { color: #fb923c; }

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: -14px;
  width: 2px;
  background: rgba(148,163,184,0.15);
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.icon-blue { background: rgba(30,58,95,0.9); }
.icon-purple { background: rgba(45,27,105,0.9); }
.icon-green { background: rgba(26,58,42,0.9); }
.icon-orange { background: rgba(59,34,0,0.9); }
.icon-yellow { background: rgba(45,45,27,0.9); }
.icon-red { background: rgba(59,31,31,0.9); }

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 2px;
}

.step-desc {
  font-size: 11px;
  color: var(--text-4);
  line-height: 1.5;
}

.step-tool {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 4px;
}

.tool-cowork { background: rgba(30,58,95,0.95); color: #93c5fd; }
.tool-obsidian { background: rgba(45,27,105,0.95); color: #c4b5fd; }
.tool-tasks { background: rgba(26,58,42,0.95); color: #86efac; }
.tool-calendar { background: rgba(59,31,31,0.95); color: #fca5a5; }
.tool-manual { background: rgba(45,45,27,0.95); color: #fde68a; }

.pipeline {
  background: linear-gradient(180deg, rgba(17,22,35,0.96), rgba(17,22,35,0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.pipeline-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--warning);
  margin-bottom: 18px;
}

.pipeline-flow {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.pipeline-node {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 132px;
}

.node-icon { font-size: 18px; margin-bottom: 4px; }
.node-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-1);
}
.node-sub {
  font-size: 10px;
  color: var(--text-4);
  margin-top: 2px;
}
.pipeline-arrow {
  color: var(--warning);
  font-size: 18px;
  padding: 0 6px;
  flex-shrink: 0;
}

.toolstack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  background: var(--bg-panel);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  text-align: center;
}

.tool-emoji { font-size: 24px; margin-bottom: 8px; }
.tool-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}
.tool-role {
  font-size: 10px;
  color: var(--text-4);
  line-height: 1.4;
}
.tool-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
  display: inline-block;
}

.bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.section-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 14px;
}

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

.time-label {
  font-size: 11px;
  color: var(--text-3);
  width: 100px;
  flex-shrink: 0;
}

.time-bar-wrap {
  flex: 1;
  background: rgba(148,163,184,0.14);
  border-radius: 4px;
  height: 18px;
  overflow: hidden;
}

.time-bar {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 10px;
  font-weight: 600;
  color: white;
}

.time-val {
  font-size: 11px;
  color: var(--text-4);
  width: 45px;
  text-align: right;
  flex-shrink: 0;
}

.rule {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.rule-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-top: 6px;
  flex-shrink: 0;
}

.rule-text {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}

.rule-text strong { color: var(--text-1); }

@media screen and (max-width: 960px) {
  .detail-grid.two-col,
  .rhythms,
  .bottom-grid,
  .toolstack {
    grid-template-columns: 1fr;
  }

  .pipeline-flow {
    gap: 10px;
  }

  .pipeline-arrow {
    width: 100%;
    text-align: center;
    padding: 0;
  }
}

@media screen and (max-width: 640px) {
  .page-shell { padding: 24px 16px 40px; }
  .page-hero { padding: 24px 20px; }
  .hero-title { font-size: 34px; }
}
