:root {
  --paper: #f7f1e7;
  --panel: #fffaf4;
  --ink: #1f1d19;
  --muted: #6a6459;
  --line: #dfd2c0;
  --accent: #2f6c57;
  --accent-2: #c77f2b;
  --accent-3: #7a5538;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(199, 127, 43, 0.16), transparent 28%),
    radial-gradient(circle at right center, rgba(47, 108, 87, 0.12), transparent 26%),
    var(--paper);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 18px 56px;
}

.topnav {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.topnav a {
  text-decoration: none;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.75);
}

.topnav a.active {
  background: var(--ink);
  color: #fffaf2;
  border-color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.hero.compact h1 {
  max-width: 12ch;
}

.hero-card,
.panel,
.stat {
  background: rgba(255, 250, 242, 0.95);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(48, 40, 24, 0.08);
}

.hero > div:first-child {
  padding: 28px;
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(243, 235, 221, 0.96));
  border: 1px solid var(--line);
  border-radius: 28px;
}

.hero-card {
  padding: 24px;
}

.brand-mark {
  margin: 0 0 10px;
  font-size: clamp(3.4rem, 10vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 10px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.92;
  max-width: 10ch;
}

.lede {
  margin-top: 16px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.55;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.trend-card {
  padding: 18px;
}

.trend-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.trend-head span,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

svg {
  width: 100%;
  height: auto;
  display: block;
}

.stat {
  padding: 18px;
}

.stat span {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat strong {
  font-size: 2rem;
  line-height: 1;
}

.layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 22px;
}

.legend-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(247, 242, 232, 0.96), rgba(255, 250, 242, 0.92));
}

.legend-card h3 {
  margin-bottom: 6px;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.legend-grid div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(223, 210, 192, 0.85);
}

.legend-grid strong {
  display: block;
  margin-bottom: 6px;
}

.legend-grid p {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.panel-head p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.ritual-block {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(245, 239, 228, 0.72));
}

.morning-block {
  background: linear-gradient(180deg, rgba(255, 247, 231, 0.98), rgba(255, 253, 248, 0.92));
}

.ritual-head h3 {
  margin-top: 4px;
}

.ritual-head .muted {
  margin-top: 8px;
}

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

label span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--muted);
}

label small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.8rem;
}

label.wide {
  grid-column: 1 / -1;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

input::placeholder {
  color: #8a8276;
}

button {
  margin-top: 18px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  color: #fffaf2;
  background: linear-gradient(135deg, var(--accent), #0f8a66);
  cursor: pointer;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.score-card {
  padding: 16px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.score-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.score-card strong {
  font-size: 2rem;
}

.detail-block,
.empty-state {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-block.no-border {
  border-top: 0;
  padding-top: 0;
}

.coach-copy p + p {
  margin-top: 12px;
}

.success-banner {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(13, 107, 80, 0.1);
  color: #0c5b45;
  border: 1px solid rgba(13, 107, 80, 0.18);
}

.table-panel {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
}

td a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

li {
  margin-bottom: 10px;
  line-height: 1.45;
}

.empty-state p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .hero,
  .layout,
  .stats,
  .trend-grid {
    grid-template-columns: 1fr;
  }

  .legend-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .grid,
  .score-grid {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 18px 12px 40px;
  }

  .panel,
  .hero-card,
  .hero > div:first-child {
    padding: 18px;
  }
}
/* ── BECOMING READOUT ── */
.becoming-readout {
  border-top: none;
  padding-top: 0;
}

.energy-window {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.readout-headline {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 14px;
  font-weight: 700;
}

.readout-honest {
  color: var(--muted);
  line-height: 1.68;
  font-size: 0.96rem;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.step-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.step-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: #fffdf8;
  padding: 14px 16px;
}

.step-card.direction { border-left-color: var(--accent-2); }
.step-card.identity  { border-left-color: var(--accent-3); }

.step-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}

.step-card.direction .step-tag { color: var(--accent-2); }
.step-card.identity  .step-tag { color: var(--accent-3); }

.step-action {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 6px;
  font-weight: 500;
}

.step-why {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.closing-truth {
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.55;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin: 0;
}

.pattern-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 10px 14px;
  background: rgba(199, 127, 43, 0.06);
  border-radius: 10px;
  border-left: 2px solid var(--accent-2);
  line-height: 1.5;
}

/* ── UPGRADED SCORES ── */
.score-card span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.score-card strong {
  font-size: 2.8rem;
  line-height: 1;
}
