/* The reading's pages: the start form, the first look with its offer, and the
   page after paying. Tokens and the top bar come from shell.css. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.funnel { margin: 0; min-height: 100vh; }
.funnel .topbar { position: sticky; top: 0; }
.lang-pick { background: var(--panel); color: var(--ink); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13.5px; }

.funnel-main { max-width: 1040px; margin: 0 auto; padding: 28px 16px 72px; }
.funnel-main.narrow { max-width: 640px; }
.stage h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 5vw, 40px); line-height: 1.12; margin: 18px 0 10px; text-wrap: balance; }
.stage h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(21px, 3.4vw, 26px); line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
.lede { color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 58ch; margin: 0 0 22px; }
.eyebrow { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--saffron); font-weight: 700; margin: 0 0 8px; }
.fine { color: var(--faint); font-size: 12.5px; line-height: 1.5; margin: 12px 0 0; }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; margin: 8px 0 0; }
.err:empty { display: none; }

.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; font-size: 13px; color: var(--faint); padding: 5px 12px 5px 8px; border-radius: 999px; border: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.steps li::before { content: counter(s); width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--bg-2); color: var(--muted); }
.steps li.on { color: var(--ink); border-color: var(--accent-line); background: var(--accent-soft); }
.steps li.on::before { background: var(--accent); color: var(--accent-ink); }
.steps li.done::before { content: "✓"; background: var(--good); color: #fff; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.form { max-width: 560px; display: grid; gap: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.field input, .field select { font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field small { font-weight: 400; color: var(--faint); font-size: 12.5px; line-height: 1.4; }
.field small.ok { color: var(--good); }

.cta { display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 100%; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-size: 16.5px; font-weight: 700; padding: 14px 20px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); transition: transform .08s ease, filter .15s ease; }
.cta:hover { filter: brightness(1.07); }
.cta:active { transform: translateY(1px); }
.cta[disabled] { opacity: .6; cursor: progress; }
.ghost { font: inherit; background: none; border: 1px solid var(--border-2); color: var(--ink); border-radius: 10px; padding: 9px 14px; cursor: pointer; }

.look-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 16px; }
.si-chart { display: grid; grid-template-columns: repeat(4, 1fr); aspect-ratio: 1; border: 1px solid var(--wheel-ring); border-radius: 10px; overflow: hidden; background: var(--wheel-inner); }
.si-chart .cell { border: .5px solid var(--wheel-line); padding: 5px 6px; font-size: 12px; line-height: 1.35; background: var(--wheel-house); min-width: 0; position: relative; }
.si-chart .cell i { position: absolute; right: 5px; bottom: 3px; font-style: normal; font-size: 10px; color: var(--faint); }
.si-chart .cell.asc { background: var(--saffron-soft); }
.si-chart .cell b { color: var(--saffron); font-weight: 700; }
.si-chart .cell span { display: inline-block; margin-right: 5px; font-weight: 600; }
.si-chart .cell span.r::after { content: "ᴿ"; color: var(--red); }
.si-chart .mid { grid-column: 2 / 4; grid-row: 2 / 4; display: grid; place-items: center; text-align: center; font-family: var(--serif); font-size: 15px; color: var(--muted); padding: 8px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 16px 0 0; font-size: 14px; }
.keys dt { color: var(--muted); }
.keys dd { margin: 0; font-weight: 600; }

.look-card { min-height: 260px; }
.look-card h2 { font-size: clamp(22px, 3.6vw, 28px); }
#paras p { font-size: 16.5px; line-height: 1.6; margin: 0 0 6px; }
#paras .basis { font-size: 12.5px; color: var(--faint); margin: 0 0 16px; }
.wait { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 30px 0; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--border-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

.offer { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 26px; border-color: var(--accent-line); }
.ticks { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; font-size: 15.5px; line-height: 1.45; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--good); font-weight: 700; }
.ticks.plain li { color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.price b { font-family: var(--serif); font-size: 44px; line-height: 1; }
.price span { color: var(--muted); font-size: 14px; }
.plans { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.plans legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; padding: 0; }
.plan { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 14.5px; }
.plan:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.plan i { font-style: normal; color: var(--muted); }
.plan em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--good); margin-left: 8px; }
.back { margin-top: 18px; font-size: 14px; }

.progress { list-style: none; margin: 0 0 18px; display: grid; gap: 14px; }
.progress li { display: grid; gap: 2px; padding-left: 34px; position: relative; color: var(--faint); }
.progress li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); }
.progress li span { font-size: 13.5px; }
.progress li.now { color: var(--ink); }
.progress li.now::before { border-color: var(--border-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.progress li.done { color: var(--ink); }
.progress li.done::before { content: "✓"; border-color: var(--good); background: var(--good); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
#included .cta { margin-top: 14px; }

@media (max-width: 760px) {
  .look-grid, .offer { grid-template-columns: 1fr; }
  .chart-card { max-width: 420px; }
  .row { grid-template-columns: 1fr; }
  .card { padding: 18px; }
}

/* ---------- the account page and the report ---------- */
.account-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.status { display: grid; gap: 6px; margin-bottom: 18px; }
.status b { font-size: 18px; }
.status .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--good); margin-right: 8px; }
.status.none .dot { background: var(--faint); }
.status span { color: var(--muted); font-size: 14px; }
.stack { display: grid; gap: 12px; }
.report { margin-top: 22px; }
.report h2.part { font-size: clamp(23px, 3.6vw, 30px); margin: 34px 0 6px; padding-top: 22px; border-top: 1px solid var(--border); }
.report h3 { font-family: var(--serif); font-size: 19px; margin: 22px 0 6px; }
.report p { font-size: 16.5px; line-height: 1.65; margin: 0 0 8px; max-width: 68ch; }
.report .meta { font-size: 12.5px; color: var(--faint); line-height: 1.5; margin: 0 0 4px; }
.report .meta b { color: var(--muted); font-weight: 600; }

/* ---------- the chat ---------- */
.chat { margin-top: 18px; }
.chat-log { display: grid; gap: 12px; margin: 4px 0 14px; max-height: 60vh; overflow-y: auto; }
.chat-log:empty { display: none; }
.turn { max-width: 88%; padding: 11px 14px; border-radius: 14px; font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn.user { justify-self: end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.turn.reader { justify-self: start; background: var(--panel-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.turn.reader small { display: block; margin-top: 8px; font-size: 12px; color: var(--faint); }
.turn.pending { color: var(--muted); display: flex; gap: 10px; align-items: center; }
.chat-ideas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chat-ideas:empty { display: none; }
.chat-ideas button { font: inherit; font-size: 13.5px; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent-line); border-radius: 999px; padding: 7px 13px; cursor: pointer; text-align: left; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.chat-form textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 11px 12px; resize: vertical; min-height: 48px; width: 100%; }
.chat-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.chat-form .cta { width: auto; padding: 13px 22px; }
@media (max-width: 520px) { .chat-form { grid-template-columns: 1fr; } .chat-form .cta { width: 100%; } }
