:root {
  color-scheme: light;
  --ink: #18211d;
  --muted: #66736b;
  --line: #dbe4dc;
  --paper: #f4f7f1;
  --panel: #ffffff;
  --leaf: #2f6c52;
  --clay: #9a5a3f;
  --blue: #3c6382;
  --gold: #b5842e;
  --shadow: 0 16px 38px rgba(24, 33, 29, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 20px 16px 96px;
}

.topbar,
.section-heading,
.button-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.75rem;
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.02rem;
}

.status-pill,
.text-button {
  border: 0;
  background: transparent;
  color: var(--leaf);
  font-weight: 850;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
}

.hero-band,
.practice-card,
.checkin-panel,
.flow-panel,
.recap-panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero-band {
  margin: 4px 0 16px;
  min-height: 150px;
  display: grid;
  align-items: end;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(47, 108, 82, 0.92), rgba(60, 99, 130, 0.82)),
    url("/vitality/assets/vitality-field.svg") center / cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-band p {
  margin-bottom: 8px;
  font-weight: 800;
  opacity: 0.86;
}

.hero-band strong {
  display: block;
  max-width: 28rem;
  font-size: 1.45rem;
  line-height: 1.08;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.practice-stack,
.recap-grid {
  display: grid;
  gap: 10px;
}

.practice-card,
.checkin-panel,
.flow-panel,
.recap-panel {
  padding: 16px;
}

.practice-card {
  display: grid;
  gap: 10px;
}

.practice-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.domain-pill {
  border-radius: 999px;
  padding: 6px 9px;
  background: #eef5ef;
  color: var(--leaf);
  font-size: 0.76rem;
  font-weight: 850;
}

.practice-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.12;
}

.practice-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.42;
}

.practice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.practice-meta span {
  border-radius: 999px;
  padding: 7px 9px;
  background: #f6f2ea;
  color: #75551c;
  font-size: 0.8rem;
  font-weight: 800;
}

.checkin-panel,
.flow-panel,
.recap-panel {
  margin-top: 14px;
}

#checkin-date {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.slider-field {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  font-weight: 850;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--leaf);
}

.field-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 0.86rem;
  font-weight: 850;
}

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

.segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  min-height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdfb;
  color: var(--ink);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 850;
}

.choice input:checked + span {
  border-color: var(--leaf);
  background: #e8f3ec;
  color: #204f3e;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfb;
  color: var(--ink);
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-button {
  margin-top: 16px;
  border: 0;
  background: var(--ink);
  color: #fff;
}

.secondary-button {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.metric-card {
  padding: 14px;
}

.metric-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 1.5rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  width: min(calc(100% - 24px), 720px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.nav-button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 850;
}

.nav-button.active {
  background: var(--ink);
  color: #fff;
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
  }

  h1 {
    font-size: 1.48rem;
  }

  .choice-grid,
  .segmented,
  .slider-field {
    grid-template-columns: 1fr;
  }
}
