/* Shared tokens — taken from the wheel prototype so new pages match it. */
:root {
  --bg: #faf8f5;
  --bg-elevated: #f2efe9;
  --bg-card: #ffffff;
  --text: #201f2b;
  --text-muted: #6c6b7a;
  --accent: #ff6b4a;
  --accent-deep: #e2492f;
  --accent-2: #ffb020;
  --border: rgba(32, 31, 43, 0.1);
  --shadow-md: 0 12px 32px rgba(32, 31, 43, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --font-display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-deep); }

.landing {
  max-width: calc(var(--page-max, 640px) + 32px);
  margin: 0 auto;
  padding: 56px 16px 40px;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: 0.02em;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.05;
  text-wrap: balance;
}

.hl {
  background: linear-gradient(transparent 60%, rgba(255, 176, 32, 0.45) 60%);
}

.lede {
  margin: 16px 0 32px;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.paths {
  display: grid;
  gap: 16px;
}

.path {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.path--primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-md);
}

.path--primary[aria-disabled="true"] {
  cursor: default;
}

.path__tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
}

.path__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
}

.path__body {
  line-height: 1.5;
  opacity: 0.85;
}

.path__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 4px;
  font-weight: 600;
}

.fineprint {
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Site nav (landing + start) ─────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: calc(var(--page-max, 880px) + 32px);
  margin: 0 auto;
  padding: 16px;
}

.site-nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent-deep);
  text-decoration: none;
}

.site-nav__links {
  display: flex;
  gap: 18px;
}

.site-nav__links a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.site-nav__links a:hover { color: var(--accent-deep); }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}
.btn--accent:hover { background: var(--accent-deep); }

.btn--ghost {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--text-muted); }

.btn--small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.9rem;
}

/* ── Landing additions ──────────────────────────────────────────── */
.landing { padding-top: 24px; }

.continue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.continue[hidden] { display: none; }

.continue__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.continue__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.continue__plan {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
}

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

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

.path { transition: border-color 0.15s, transform 0.15s; }
a.path:not([aria-disabled]):hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.path__cta {
  margin-top: 4px;
  font-weight: 700;
  color: var(--accent-deep);
}

.path__cta--light { color: var(--accent-2); }

a.coach-callout { text-decoration: none; }
a.coach-callout:hover { box-shadow: var(--shadow-md); }

.how { margin-top: 48px; }

.how h2, .section-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
}

.how__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .how__steps { grid-template-columns: repeat(3, 1fr); }
}

.how__steps li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.how__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  font-size: 0.85rem;
}

.how__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}

.how__body {
  color: var(--text-muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

/* ── Start page ─────────────────────────────────────────────────── */
.start {
  max-width: calc(var(--page-max, 880px) + 32px);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.start .lede { margin-bottom: 36px; }

.start section { margin-bottom: 40px; }

.cards {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  text-align: left;
  font: inherit;
  color: inherit;
}

.card--choice {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card--choice:hover,
.card--choice:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card__tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.15;
}

.card__body {
  color: var(--text-muted);
  line-height: 1.5;
}

.card__cta {
  margin-top: auto;
  font-weight: 700;
  color: var(--accent-deep);
}

.card__swatches {
  display: flex;
  gap: 4px;
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.card__steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  line-height: 1.4;
}

.card__steps a { font-weight: 700; }

.copy-status {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #2d6a4f;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.field__label {
  font-size: 0.85rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font: inherit;
  color: var(--text);
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.saved-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.saved-item__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.saved-item__title {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-item__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.coach-callout {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--text);
  color: var(--bg);
}

.coach-callout__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.coach-callout__body { opacity: 0.85; line-height: 1.5; }

/* ── Account page ───────────────────────────────────────────────── */
.account {
  max-width: calc(var(--page-max, 440px) + 32px);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.account-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.account-card[hidden] { display: none; }

.account-card h1 { font-size: 1.8rem; }

.account-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-sub {
  margin: -6px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-elevated);
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.tab.is-active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(32, 31, 43, 0.08);
}

.btn--block { width: 100%; }

.link-btn {
  align-self: center;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--accent-deep);
  cursor: pointer;
}

.form-msg {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
}

.form-msg[hidden] { display: none; }

.form-msg--error {
  background: rgba(229, 72, 77, 0.12);
  color: #b91c1c;
}

.account-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}

.account-stats li {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  min-width: 0;
}

.account-stats__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-stats__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-nav__links a[hidden] { display: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Coaching intake (chat) ─────────────────────────────────────── */
.intake {
  max-width: calc(var(--page-max, 600px) + 32px);
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.coach-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.coach-header__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.coach-header__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}

.coach-header__role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.coach-header__restart[hidden] { display: none; }

.chat {
  list-style: none;
  margin: 0;
  padding: 20px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: msg-in 0.2s ease-out;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .msg { animation: none; }
}

.msg--coach {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}

.msg--user {
  align-self: flex-end;
  background: var(--text);
  color: var(--bg);
  border-bottom-right-radius: 6px;
}

.msg--typing {
  display: flex;
  gap: 4px;
  padding: 14px 16px;
}

.msg--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  animation: typing 1s infinite;
}
.msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.msg--typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 100% { opacity: 0.25; transform: none; }
  50% { opacity: 0.8; transform: translateY(-2px); }
}

.composer {
  position: sticky;
  bottom: 0;
  padding: 12px 0 16px;
  background: linear-gradient(transparent, var(--bg) 18px);
}

.composer[hidden] { display: none; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chips:empty { display: none; }

.chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  background: var(--bg-card);
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.chip:hover { background: rgba(255, 107, 74, 0.08); }

.composer__row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.composer textarea,
.review textarea,
.review input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  font: inherit;
  color: var(--text);
  line-height: 1.4;
  resize: vertical;
}

.composer textarea:focus,
.review textarea:focus,
.review input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.composer__send {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.composer__send:hover { background: var(--accent-deep); }

.composer__hint {
  min-height: 1.2em;
  margin: 6px 4px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.review {
  margin-top: 12px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.review[hidden] { display: none; }

.review form,
#review-fields,
.review__account {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review__account {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.review__account[hidden] { display: none; }

.review__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.review__signed-in {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.review__signed-in[hidden] { display: none; }

.intake-status {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--text);
  color: var(--bg);
}

.intake-status[hidden] { display: none; }

.intake-status h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
}

.intake-status p { margin: 0; line-height: 1.5; opacity: 0.85; }

.intake-status .btn--ghost {
  background: transparent;
  color: var(--bg);
  border-color: rgba(250, 248, 245, 0.35);
}

.intake-status .link-btn { color: var(--accent-2); align-self: flex-start; }
a.link-btn { text-decoration: none; }
a.link-btn[hidden] { display: none; }
