/* ===== Tokens: Jessie Calm brand (social/brand/brand.css) ===== */
:root {
  --bg: #050505;
  --surface: #0f0f0f;
  --surface-2: #17140c;
  --text: #e0e0e0;
  --text-strong: #f5f1e6;
  --muted: #a8a8a8;
  --gold: #d4af37;
  --gold-light: #e0cb70;
  --gold-dark: #967b27;
  --gold-soft: rgba(212, 175, 55, 0.14);
  --line: rgba(212, 175, 55, 0.22);
  --line-strong: rgba(212, 175, 55, 0.55);

  --goal: #d4af37;
  --context: #6ea8e6;
  --limits: #e58a7b;
  --done: #7cc99a;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Fira Code", ui-monospace, Menlo, Consolas, monospace;

  --font-body: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  --font-small: clamp(0.85rem, 0.82rem + 0.12vw, 0.92rem);
  --font-h1: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  --font-h2: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem);
  --space-gap: clamp(1rem, 2.5vw, 2rem);
  --space-pad: clamp(1rem, 2.4vw, 1.75rem);
  --space-section: clamp(1.5rem, 4vw, 3rem);
  --radius: 0.75rem;
  --pager: 4.5rem;
}

/* ===== Base ===== */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-block-start: 1rem; }

body {
  margin: 0;
  min-block-size: 100dvh;
  padding-block-end: calc(var(--pager) + 2rem);
  background:
    radial-gradient(ellipse at 85% 0%, rgba(212, 175, 55, 0.14), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64l28 16v32M28 64L0 80v32' fill='none' stroke='%23d4af37' stroke-opacity='0.06' stroke-width='1'/%3E%3C/svg%3E"),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--font-body);
  line-height: 1.5;
}

h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); color: var(--text-strong); font-weight: 700; line-height: 1.15; }
h1 { font-size: var(--font-h1); }
h2 { font-size: var(--font-h2); }
h3 { font-size: 1.15rem; }
p, h1, h2, li, label, pre { overflow-wrap: break-word; }
strong { color: var(--text-strong); }

:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

.wrap { inline-size: min(100% - 2rem, 44rem); margin-inline: auto; }

.skip { position: absolute; inset-inline-start: -999rem; }
.skip:focus { inset-inline-start: 1rem; inset-block-start: 1rem; z-index: 10; background: var(--surface); padding: 0.5rem 1rem; }

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gold { color: var(--gold); }

/* ===== Header and stepper ===== */
.top { padding-block: var(--space-gap); display: grid; gap: 0.6rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--font-small);
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.25rem;
  margin-block-start: 0.5rem;
}

.step {
  --hue: var(--gold);
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  inline-size: 100%;
  min-block-size: 44px;
  padding: 0.4rem 0.1rem;
  background: none;
  border: 0;
  border-block-end: 3px solid var(--line);
  color: var(--muted);
  font: inherit;
  font-size: clamp(0.72rem, 0.6rem + 0.5vw, 0.9rem);
  cursor: pointer;
  touch-action: manipulation;
}
.step--goal { --hue: var(--goal); }
.step--context { --hue: var(--context); }
.step--limits { --hue: var(--limits); }
.step--done { --hue: var(--done); }

.step__n {
  display: grid;
  place-items: center;
  inline-size: 1.8rem;
  block-size: 1.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--mono);
}
.step__label { overflow-wrap: anywhere; }
.step[data-done="true"] .step__n { border-color: var(--hue); color: var(--hue); }
.step[aria-current="step"] { border-block-end-color: var(--hue); color: var(--text-strong); font-weight: 600; }
.step[aria-current="step"] .step__n { background: var(--hue); border-color: var(--hue); color: #050505; }

/* ===== Step card ===== */
main:focus { outline: none; }

.card {
  --hue: var(--gold);
  display: grid;
  gap: var(--space-gap);
  padding: var(--space-pad);
  background: var(--surface);
  border: 1px solid var(--line);
  border-block-start: 3px solid var(--hue);
  border-radius: var(--radius);
}
.card--goal { --hue: var(--goal); }
.card--context { --hue: var(--context); }
.card--limits { --hue: var(--limits); }
.card--done { --hue: var(--done); }

.card > * { min-inline-size: 0; }

.card__head { display: grid; gap: 0.25rem; }
.card__count { font-family: var(--mono); font-size: var(--font-small); color: var(--hue); }
.card__hint { color: var(--muted); font-size: var(--font-small); max-inline-size: 60ch; }

/* ===== Fields ===== */
.field { display: grid; gap: 0.5rem; min-inline-size: 0; }
.field__label { font-weight: 600; color: var(--text-strong); }
.field__note { font-weight: 400; font-size: var(--font-small); color: var(--muted); }

.input {
  inline-size: 100%;
  min-block-size: 44px;
  padding: 0.65rem 0.8rem;
  background: var(--bg);
  color: var(--text-strong);
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  font: inherit;
  font-size: 1rem;
}
.input::placeholder { color: #8a8a8a; }
textarea.input { resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 44px;
  min-inline-size: 44px;
  max-inline-size: 100%;
  padding: 0.5rem 0.9rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 1.4rem;
  font: inherit;
  font-size: var(--font-small);
  text-align: start;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--gold-light); }
.chip[aria-pressed="true"] {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--text-strong);
  font-weight: 600;
}
.chip[aria-pressed="true"]::before { content: "✓"; color: var(--gold-light); }

.swatch { inline-size: 1rem; block-size: 1rem; flex: none; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4); }
.swatch--navy-blue { background: #1f3a68; }
.swatch--teal { background: #1a8f8a; }
.swatch--forest-green { background: #2e6b3f; }
.swatch--gold { background: #d4af37; }
.swatch--coral { background: #ef7a63; }
.swatch--purple { background: #7a4fc4; }

.add { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.add .input { flex: 1 1 12rem; inline-size: auto; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  min-inline-size: 44px;
  padding: 0.6rem 1.1rem;
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--gold-soft); border-color: var(--gold); }
.btn--primary { background: var(--gold); border-color: var(--gold); color: #050505; }
.btn--primary:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn--quiet { border-color: transparent; color: var(--muted); }

.row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ===== Prompt page ===== */
.meter__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; }
.meter__label { font-family: var(--mono); font-size: var(--font-small); color: var(--gold-light); }

.meter {
  appearance: none;
  flex: 1 1 10rem;
  block-size: 0.6rem;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface-2);
}
.meter::-webkit-progress-bar { background: var(--surface-2); }
.meter::-webkit-progress-value { background: var(--gold); border-radius: 1rem; }
.meter::-moz-progress-bar { background: var(--gold); }

.missing { font-size: var(--font-small); color: var(--muted); }
.missing__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.missing__list:empty { display: none; }
.chip--missing { border-color: var(--limits); color: var(--limits); }

.prompt {
  margin: 0;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-family: var(--mono);
  font-size: var(--font-small);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
}

.note {
  padding: 0.7rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 0.5rem;
  background: var(--gold-soft);
  color: var(--text-strong);
  font-size: var(--font-small);
}

.after { display: grid; gap: 0.9rem; padding-block-start: var(--space-gap); border-block-start: 1px solid var(--line); }
.follow { display: grid; gap: 0.6rem; }
.follow__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.follow__text { flex: 1 1 16rem; font-size: var(--font-small); }

.status { min-block-size: 1.5em; margin-block-start: 0.75rem; font-size: var(--font-small); color: var(--done); }

/* ===== Back and Next ===== */
.pager {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 5;
  padding-block: 0.6rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(5, 5, 5, 0.94);
  border-block-start: 1px solid var(--line-strong);
}
.pager__inner { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-block-size: 44px; }
.pager__count { font-family: var(--mono); font-size: var(--font-small); color: var(--muted); text-align: center; }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn:disabled:hover { background: transparent; border-color: var(--line-strong); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip, .btn { transition: none; }
}
