:root {
  --bg: #f6f3ed;
  --card: #fffaf1;
  --ink: #1e211f;
  --muted: #676b66;
  --accent: #2f7d68;
  --accent-dark: #205a4a;
  --line: #e3d9ca;
  --warn: #a65f20;
  --soft: #e9f4ee;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #e2f0e9 0, transparent 36rem), var(--bg);
  color: var(--ink);
}

.app {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.card {
  background: rgba(255, 250, 241, 0.94);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(30, 33, 31, 0.08);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  margin: 0 0 8px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 0.98; margin-bottom: 12px; }
h2 { font-size: 1.2rem; margin-bottom: 14px; }
h3 { font-size: 1rem; margin-bottom: 8px; }
.lede { color: var(--muted); max-width: 62ch; margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.status-pill {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 800;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.body-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.tiers {
  display: grid;
  gap: 12px;
}

.tier {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  color: var(--ink);
}

.tier strong { display: block; margin-bottom: 4px; }
.tier span { color: var(--muted); display: block; }
.tier em { color: var(--accent-dark); font-style: normal; display: block; margin-top: 8px; font-size: 0.9rem; }
.tier:hover {
  background: #f6fbf8;
  border-color: var(--accent);
  color: var(--ink);
}
.tier:hover span { color: var(--muted); }
.tier:hover em { color: var(--accent-dark); }
.tier.active { outline: 3px solid rgba(47, 125, 104, 0.2); border-color: var(--accent); }

.timer-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.timer-content {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}
.phase { color: var(--accent); font-weight: 900; font-size: 1.1rem; }
.timer { font-size: clamp(4rem, 15vw, 8rem); font-weight: 900; letter-spacing: -0.06em; margin: 12px 0; }

.progress-wrap {
  width: 100%;
  max-width: 620px;
  height: 14px;
  background: #eee5d8;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.25s linear;
}

.button-row, .filter-row, .routine-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.button-row { width: 100%; }
button {
  border: 0;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
button:hover { background: var(--accent-dark); transform: translateY(-1px); }
button.secondary { background: #1e211f; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.ghost:hover { background: #fffdf8; color: var(--ink); }

.streak-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.hint { color: var(--muted); margin: 18px auto 0; max-width: 58ch; }

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.reset-card, .move-library-card, .evidence-card { margin-bottom: 20px; }

.routine-tabs {
  justify-content: flex-start;
  margin-bottom: 14px;
}
.routine-tab {
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid var(--line);
}
.routine-tab:hover {
  background: var(--soft);
  border-color: var(--accent);
  color: var(--ink);
}
.routine-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.routine-tab.active:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
}

.routine {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}
.routine li {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.routine strong { display: block; }
.routine span { color: var(--muted); }
.rule { color: var(--muted); margin: 18px 0 0; }

.tips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 0;
  list-style: none;
  margin: 0;
}
.tips li {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.checklist {
  display: grid;
  gap: 12px;
}
.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
}
.checklist input { width: 18px; height: 18px; accent-color: var(--accent); }

.move-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.move-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.move-card.highlight {
  outline: 3px solid rgba(47, 125, 104, 0.24);
  border-color: var(--accent);
}
.move-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.badge {
  background: var(--soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}
.move-card ol {
  margin: 0;
  padding-left: 20px;
}
.move-card li { margin-bottom: 6px; }
.caution {
  color: var(--warn);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin: 10px 0 0;
  font-size: 0.92rem;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.evidence-grid div {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.evidence-grid p { color: var(--muted); margin-bottom: 0; }
.sources {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.sources summary { cursor: pointer; font-weight: 800; color: var(--accent-dark); }
.sources ul { margin-bottom: 0; }
a { color: var(--accent-dark); font-weight: 700; }

@media (max-width: 920px) {
  .hero, .grid { grid-template-columns: 1fr; display: grid; }
  .body-grid { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr 1fr; }
  .move-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .status-pill { width: fit-content; }
  .section-head { flex-direction: column; }
}

@media (max-width: 560px) {
  .app { width: min(100% - 20px, 1120px); padding: 10px 0; }
  .card { padding: 18px; border-radius: 18px; }
  .tips, .evidence-grid { grid-template-columns: 1fr; }
  .timer { font-size: 4rem; }
  .button-row, .filter-row, .routine-tabs { justify-content: flex-start; }
}
