/* /find-your-mistakes/ (MAR-131): the search page for "find the mistakes you keep making". The app's own
   components, rebuilt in HTML, do the explaining. Tokens, bar, pills and footer: /site.css. App tokens:
   CoachTokens.swift (dark palette); the profile card follows ProgressAreaColumns and ProgressAreaSummaryCard. */

:root {
  --h2: clamp(34px, 3.4vw, 50px);
  --stmt: clamp(21px, 1.7vw, 25px);
  --deep: #171C24;           /* one tone step up from the canvas */
  --wood-ink: #16120D; --wood-ink-2: #5C4029;
  --sec: clamp(120px, 12vw, 190px);
}
h2 { font-size: var(--h2); line-height: 1.04; letter-spacing: -0.03em; }
.body { font-size: 18px; line-height: 1.55; max-width: 32rem; }
h2 + .body { margin-top: 22px; }
.bar .pill { min-height: 44px; }

/* ---------- The app's look inside fragments: CoachTokens dark palette, true sizes. ---------- */
.app { --r: 26px; color: var(--ink); font-size: 15px; line-height: 1.4; }
.app p { margin: 0; }
.frame { padding: 9px; border-radius: 16px; background: #3A2A1B; }
.frame img { width: 100%; aspect-ratio: 1; border-radius: 8px; }

/* ---------- Hero ---------- */

.area-card { width: 620px; margin-top: 24px; padding: 22px 22px 40px; border-radius: 30px 30px 0 0; background: var(--canvas); }
.app-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.app-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.app-sub { font-size: 14px; color: var(--ink-2); }
.app-h { margin-top: 20px; font-size: 19px; font-weight: 700; }
.pats { margin-top: 8px; }
.pats li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 14px; border-radius: 16px; transition: background-color 180ms; }
.pats li:hover { background: var(--raised); }
.pn { font-weight: 600; font-size: 16px; }
.pc { color: var(--ink-2); font-size: 14px; text-align: right; }
.sq { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px; }
.sq i { width: 11px; height: 11px; border-radius: 3px; background: var(--blunder); }
.sq i.m { background: var(--mistake); }
.area-body { transition: opacity 160ms; }
.area-body.swap { opacity: 0; }

/* ---------- One count, back to its move ---------- */
.trace { display: grid; grid-template-columns: 1fr 1fr; min-height: 88svh; margin-top: 0; }
.trace-copy { display: flex; flex-direction: column; justify-content: center; padding: var(--sec) var(--margin) 64px max(var(--margin), calc((100vw - 1320px) / 2 + var(--margin))); background: var(--deep); }
.trace-copy h2 { max-width: 11em; }
.clause { margin-top: 56px; max-width: 30rem; min-height: 7.2em; transition: opacity 200ms; }
.clause.swap { opacity: 0; }
.clause-t { font-size: var(--stmt); font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.clause-d { margin-top: 10px; font-size: 18px; color: var(--ink); max-width: 28rem; }
.scrub input::-moz-range-track { height: 8px; background: transparent; }
.scrub input::-moz-range-thumb { width: 32px; height: 32px; border: 0; border-radius: 0; background: var(--blue); }

.trace-board { display: grid; place-items: center; padding: var(--sec) var(--margin); background: var(--wood-light); }
.board-card { width: min(460px, 100%); }
.board-card .frame img { transition: opacity 200ms; }
.board-card .frame img.swap { opacity: .15; }
.answer { margin-top: 14px; padding: 16px 18px; border-radius: 20px; background: var(--canvas); min-height: 104px; }
.a-top { color: var(--ink-2); font-size: 14px; }
.a-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 16px; }
.a-row span { color: var(--ink-2); }
.a-row b { font-weight: 700; }
.a-bad { color: var(--blunder); } .a-good { color: var(--good); }
.a-big { margin-top: 2px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Then it trains the habit ---------- */
.train { padding: var(--sec) 0 calc(var(--sec) * .8); background: var(--blue); color: #fff; }
.train .body { color: #fff; max-width: 36rem; }
.train-head h2 { max-width: 12em; }
.rail { display: flex; gap: 28px; margin-top: 64px; padding: 8px max(var(--margin), calc((100vw - 1320px) / 2 + var(--margin))) 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--margin), calc((100vw - 1320px) / 2 + var(--margin))); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.panel { flex: none; width: 360px; padding: 22px; border-radius: 30px; background: var(--canvas); scroll-snap-align: start;
  transition: transform 300ms var(--ease); transform: scale(.94); transform-origin: left center; }
.panel.on { transform: none; }
.p-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.p-sub { margin: 4px 0 16px; font-size: 14px; color: var(--ink-2); }
.p-foot { margin-top: 14px; font-size: 15px; color: var(--ink); }
.p-kick { font-size: 14px; color: #C9D6FF; font-weight: 600; }
.panel:first-child { background: #1D4FD8; }
.p-big { margin-top: 6px; font-size: 34px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.p-cue { margin-top: 14px; font-size: 17px; line-height: 1.4; }
.p-list { margin-top: 22px; }
.p-list li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-top: 6px; border-radius: 14px; background: rgba(255,255,255,.12); font-size: 15px; font-weight: 600; }
.p-list li span + span { color: #DCE6FF; font-weight: 400; }
.sog { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sog button { min-height: 46px; border-radius: 999px; background: var(--raised); font-weight: 600; font-size: 16px; transition: background-color 180ms, transform 140ms var(--ease); }
.sog button:hover { background: var(--raised-2); }
.sog button:active { transform: scale(.96); }
.sog button.right { background: var(--good); color: #0F1319; }
.sog button.wrong { background: var(--blunder); color: #0F1319; }
.redo { display: grid; place-items: center; aspect-ratio: 1; padding: 28px; border-radius: 16px; background: var(--raised); font-size: 19px; line-height: 1.4; text-align: center; }
.rail-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-top: 36px; }
.arrows { display: flex; gap: 10px; }
.arrow { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: #fff; color: #1D4FD8; transition: background-color 180ms, transform 140ms var(--ease); }
.arrow:hover { background: #EAF0FF; }
.arrow:active { transform: scale(.94); }
.arrow .chev { margin: 0 4px 0 0; }
.arrow.prev .chev { transform: rotate(-135deg); margin: 0 0 0 4px; }
.arrow[disabled] { opacity: .45; cursor: default; }

/* ---------- Four ways: two-ended rows, one narrow column ---------- */

/* ---------- Questions: index left, one answer right ---------- */

/* ---------- Close: a plain sentence, one action ---------- */

.inner footer { padding-top: 60px; }

/* ---------- Motion: the stage opens like a shutter; parts of each section rise in order. ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ready [data-in] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 900ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .ready [data-in].is-in { opacity: 1; transform: none; }
  @keyframes shutter { from { clip-path: polygon(130px 100%, 100% 100%, 100% 100%, 0 100%, 0 100%); } }
  @keyframes settle { from { transform: translateY(60px) scale(1.06); } }
}
@media (max-width: 900px) {
  .area-card { width: min(620px, calc(100vw - 16px)); padding: 18px 16px 32px; border-radius: 26px 0 0 0; }
  .trace { display: flex; flex-direction: column; min-height: 0; padding: 96px 0 80px; background: var(--deep); }
  .trace-copy { display: contents; }
  .trace-copy h2, .trace-copy .body, .clause { margin-left: var(--margin); margin-right: var(--margin); }
  .trace-board { order: 3; margin-top: 40px; padding: 40px var(--margin); }
  .clause { order: 5; margin-top: 24px; min-height: 8em; }
  .panel { width: min(330px, 84vw); }
  .rail-foot { flex-direction: column; gap: 20px; }
  .train { padding-bottom: 96px; }
}
@media (max-width: 520px) {
  .app-sub { display: none; }
}

/* ================= Mock E: the answer page. Content first; the same fields and fragments as mock D. ================= */
:root { --edge: max(var(--margin), calc((100vw - 1320px) / 2 + var(--margin))); }
.step a { color: var(--link); text-underline-offset: 3px; }

.steps { padding: var(--sec) 0 calc(var(--sec) * .6); }
.step { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 110px); align-items: center; scroll-margin-top: 24px; }
.step.flip .step-text { order: 2; }
.step-text h2 { max-width: 12em; }
.step-text p { margin-top: 18px; max-width: 34rem; font-size: 18px; line-height: 1.6; color: var(--ink); }
.step-text h2 + p { margin-top: 24px; }
.fig-stage { padding: 40px 0 0 48px; background: var(--blue); clip-path: polygon(96px 0, 100% 0, 100% 100%, 0 100%, 0 96px); overflow: hidden; height: 600px; margin-right: calc(-1 * var(--edge)); }
.step.flip .fig-stage { margin-right: 0; margin-left: calc(-1 * var(--edge)); padding-left: var(--edge); }
.fig-stage .area-card { margin-top: 0; width: min(620px, 100%); }
.step.flip .fig-stage { padding-right: 48px; }
@media (max-width: 900px) {
  .step { grid-template-columns: 1fr; }
  .step.flip .step-text { order: 0; }
  .fig-stage, .step.flip .fig-stage { margin: 0 calc(-1 * var(--margin)); padding: 28px 0 0 16px; height: 560px; clip-path: polygon(64px 0, 100% 0, 100% 100%, 0 100%, 0 64px); }
}

/* ================= Mock F: "why they repeat". ================= */

.hide { padding: var(--sec) 0; background: var(--deep); }
.hide-copy p { font-size: 18px; line-height: 1.6; max-width: 36rem; }
.hide-copy p + p { margin-top: 16px; }

/* ================= Mock H: a designed answer page, not a second start page. One dark ground; the app's pieces
   on rounded panels; one blue band (the training). ================= */
.hero-h { padding: clamp(48px, 7vw, 112px) 0 0; }
.hero-h-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 5vw, 88px); align-items: start; }
.hero-h h1 { font-size: clamp(48px, 5.5vw, 86px); line-height: .95; letter-spacing: -0.045em; }

/* The three boards follow straight on, same ground. */
.hide { background: none; padding: clamp(80px, 8vw, 120px) 0 0; }

/* All the games at once: the area card on a rounded panel. */
.steps { padding-top: var(--sec); }
.fig-stage, .step.flip .fig-stage { clip-path: none; margin: 0; padding: 32px 32px 0; height: 600px; border-radius: 28px 28px 0 0; background: var(--deep); }
.fig-stage .area-card { margin: 0 auto; }

/* Back to the move: the board on a wood panel, inside the grid. */
.trace { max-width: 1320px; margin: var(--sec) auto 0; padding: 0 var(--margin); gap: clamp(40px, 6vw, 110px); min-height: 0; background: none; }
.trace-copy { background: none; padding: 0; }
.trace-board { padding: clamp(32px, 4vw, 64px); border-radius: 28px; background: var(--wood-light); }

/* The training keeps the one blue band. */
.train { margin-top: var(--sec); }

/* Glossary and questions on the same ground. */

/* Close: one blue panel inside the grid. */
.close-h { padding: var(--sec) 0 40px; }
.end-h { padding: clamp(32px, 5vw, 72px); border-radius: 32px; background: var(--blue); color: #fff; }
.end-t { font-size: var(--h2); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; max-width: 14em; }
.end-d { margin-top: 18px; font-size: 18px; color: #fff; max-width: 34rem; }
.end-h .go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 30px; }
.end-h .more { color: #fff; font-weight: 600; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .hero-h-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-h h1 { font-size: clamp(40px, 11vw, 60px); }
  .end-t { font-size: 24px; }
  .trace { display: grid; grid-template-columns: 1fr; padding: 0 var(--margin); }
  .trace-copy { display: block; }
  .trace-copy h2, .trace-copy .body, .clause { margin-left: 0; margin-right: 0; }
  .trace-board { order: 0; margin-top: 32px; padding: 24px; }
  .fig-stage, .step.flip .fig-stage { margin: 0 calc(-1 * var(--margin)); padding: 20px 12px 0; height: 560px; border-radius: 0; }
}
.fig-stage, .step.flip .fig-stage { height: auto; padding-bottom: 32px; border-radius: 28px; }
.train { --pad: clamp(24px, 4vw, 64px); max-width: calc(1320px - 2 * var(--margin)); margin: var(--sec) auto 0; border-radius: 32px; overflow: hidden; width: calc(100% - 2 * var(--margin)); padding: var(--pad) 0; }
.train .wrap { padding: 0 var(--pad); }
.train .rail { padding: 8px var(--pad) 16px; scroll-padding-inline: var(--pad); margin-top: 48px; }
@media (max-width: 900px) {
  .fig-stage, .step.flip .fig-stage { margin: 0; padding: 16px 10px 20px; border-radius: 24px; }
  .train { width: 100%; border-radius: 0; }
}

/* ---------- Mock H, round 2: a visual top. Copy left, the three boards fanned right. ---------- */
.hero-h { padding: clamp(40px, 6vw, 96px) 0 0; }
.hero-h-grid { grid-template-columns: 6fr 5fr; align-items: center; gap: clamp(40px, 5vw, 96px); }
.hero-h h1 { font-size: clamp(46px, 5.2vw, 80px); line-height: .96; }
.hero-h-copy .lead { margin-top: 28px; font-size: 21px; line-height: 1.5; max-width: 31rem; color: var(--ink); }
.hero-h-copy .store { margin-top: 30px; }
.hero-h-copy .store a { padding: 0; }
.fan-h { position: relative; }
.fan-stack { position: relative; height: clamp(380px, 34vw, 500px); }
.fan-stack .frame { position: absolute; top: 50%; left: 50%; width: clamp(240px, 22vw, 340px); padding: 10px; border-radius: 18px; transition: transform 1100ms var(--ease); }
.fan-stack .f1 { transform: translate(-96%, -54%) rotate(-9deg); }
.fan-stack .f2 { transform: translate(-50%, -62%) rotate(-1deg); z-index: 2; }
.fan-stack .f3 { transform: translate(-6%, -44%) rotate(7deg); z-index: 3; }
@media (prefers-reduced-motion: no-preference) {
  .ready .fan-stack .frame { animation: deal 1100ms var(--ease) both; }
  .ready .fan-stack .f2 { animation-delay: 90ms; } .ready .fan-stack .f3 { animation-delay: 180ms; }
  @keyframes deal { from { transform: translate(-50%, -50%) rotate(0deg); opacity: 0; } }
}

.hide { padding: var(--sec) 0 0; }
.hide-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.hide-copy h2 { max-width: 10em; }
.hide-copy h2 + p { margin-top: 24px; }
.hide-copy p { font-size: 18px; line-height: 1.6; max-width: 32rem; color: var(--ink); }
.hide-copy p + p { margin-top: 16px; }
.cases-h { display: grid; gap: 14px; }
.cases-h li { display: grid; grid-template-columns: 132px 1fr; gap: 22px; align-items: center; padding: 14px 22px 14px 14px; border-radius: 24px; background: var(--deep); }
.cases-h .frame { padding: 5px; border-radius: 10px; }
.cases-h .frame img { border-radius: 5px; }
.c-t { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.cases-h p + p { margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--ink); }

@media (max-width: 900px) {
  .hero-h-grid, .hide-grid { grid-template-columns: 1fr; }
  .hero-h h1 { font-size: clamp(40px, 11vw, 60px); }
  .fan-stack { height: 300px; }
  .fan-stack .frame { width: min(200px, 50vw); padding: 6px; border-radius: 12px; }
  .fan-stack .f1 { transform: translate(-90%, -54%) rotate(-9deg); }
  .fan-stack .f3 { transform: translate(-10%, -44%) rotate(7deg); }
  .cases-h li { grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 14px 12px 12px; }
}
:root { --sec: clamp(88px, 8vw, 128px); }

/* ---------- Ten habits: an index left, the app's pattern card right. Without script every card shows. ---------- */
.habits-h { padding: var(--sec) 0 0; }
.hx-head { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 110px); align-items: end; }
.hx-head .body { margin-top: 0; max-width: 34rem; }
.hx { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 110px); align-items: start; margin-top: 56px; }
.hx-list { display: none; }
.ready .hx-list { display: grid; gap: 4px; }
.hx-list button { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 0 20px; border-radius: 16px; font-size: 18px; font-weight: 600; color: var(--ink-2); text-align: left; transition: background-color 160ms, color 160ms; }
.hx-list button:hover { background: var(--deep); color: var(--ink); }
.hx-list button[aria-selected="true"] { background: var(--raised); color: var(--ink); }
.hx-n { font-size: 15px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hx-cards { display: grid; gap: 16px; }
.ready .hx-cards { position: sticky; top: 32px; }
.ready .hcard { display: none; }
.ready .hcard.on { display: block; animation: hc-in 260ms var(--ease); }
@keyframes hc-in { from { opacity: 0; transform: translateY(8px); } }
.hcard { padding: clamp(26px, 3vw, 40px); border-radius: 30px; background: var(--blue); color: #fff; }
.hc-count { font-size: 15px; font-weight: 600; color: #fff; }
.hcard h3 { margin-top: 8px; font-size: clamp(32px, 3vw, 44px); line-height: 1.05; letter-spacing: -0.025em; }
.hc-sq { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 16px; }
.hc-sq i { width: 20px; height: 20px; border-radius: 5px; background: var(--blunder); }
.hc-sq i.m { background: var(--mistake); }
.hc-d { margin-top: 22px; font-size: 20px; line-height: 1.45; color: #fff; }
.hc-ask { margin-top: 26px; padding: 18px 22px; border-radius: 20px; background: #fff; color: #0F1319; }
.hc-ask-h { font-size: 15px; font-weight: 600; color: #1D4FD8; }
.hc-ask-q { margin-top: 4px; font-size: 20px; line-height: 1.4; font-weight: 700; letter-spacing: -0.01em; color: #0F1319; }
@media (max-width: 900px) {
  .hx-head, .hx { grid-template-columns: 1fr; gap: 20px; }
  .hx { margin-top: 32px; }
  .ready .hx-list { display: flex; flex-wrap: wrap; gap: 8px; }
  .hx-list button { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--deep); font-size: 15px; }
  .hx-list .hx-n { display: none; }
  .ready .hx-cards { position: static; }
}

/* CTAs: hero perks, in-section pills, the mid panel, the dock. */

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 0 16px max(14px, env(safe-area-inset-bottom)); pointer-events: none; transform: translateY(120%); transition: transform 280ms var(--ease, ease); }
.dock.show { transform: none; }
.dock-in { pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 520px; margin: 0 auto; padding: 10px 10px 10px 14px; background: var(--raised-2); border-radius: 999px; }
.dock-in img { width: 40px; height: 40px; flex: none; }
.dock-t { flex: 1; display: grid; line-height: 1.25; font-size: 14px; color: var(--ink-2); }
.dock-t b { color: var(--ink); font-size: 16px; }
.dock .pill { min-height: 48px; padding: 0 22px; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }
.rail-foot { justify-content: space-between; align-items: center; }
.dock-t { align-content: center; }

/* Round 3: step tabs on the move, even training cards, other ways as three cards, plain questions. */
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 40px; max-width: 34rem; padding: 6px; border-radius: 999px; background: var(--deep); }
.steps4 button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 10px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color 180ms, color 180ms, transform 140ms var(--ease); }
.steps4 button b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--raised-2); color: var(--ink); font-size: 12px; }
.steps4 button:hover { color: var(--ink); }
.steps4 button:active { transform: scale(.96); }
.steps4 button[aria-selected="true"] { background: var(--ink); color: var(--canvas); }
.steps4 button[aria-selected="true"] b { background: var(--blue); color: #fff; }
.trace .clause { margin-top: 28px; min-height: 6.4em; }

.train .rail { align-items: stretch; }
.panel, .panel.on { transform: none; display: flex; flex-direction: column; }
.panel:first-child { background: var(--canvas); }
.panel:first-child .p-kick { color: var(--ink-2); }
.panel:first-child .p-list li { background: var(--raised); }
.panel:first-child .p-list li span + span { color: var(--ink-2); }
.panel .p-foot { margin-top: auto; padding-top: 14px; }
.train-head h2 { max-width: 14em; }
.train .body { max-width: 40rem; }


.ways3 { padding: var(--sec) 0 0; }
.w3-head { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 110px); align-items: end; }
.w3-head h2 { max-width: 10em; }
.w3-head .body { margin-top: 0; }
.w3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.w3 li { display: flex; flex-direction: column; padding: clamp(24px, 2.6vw, 36px); border-radius: 28px; background: var(--deep); }
.w3-n { font-size: var(--stmt); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
.w3-d { margin-top: 12px; font-size: 18px; line-height: 1.55; color: var(--ink); }
.w3 .us { background: var(--blue); color: #fff; }
.w3 .us .w3-d { color: #fff; }

@media (max-width: 900px) {
  .steps4 { grid-template-columns: 1fr 1fr; border-radius: 28px; }
  .w3-head { grid-template-columns: 1fr; gap: 20px; }
  .w3 { grid-template-columns: 1fr; margin-top: 36px; }
}
.w3 li:not(.us) { background: none; padding-left: 0; padding-right: 8px; }
.w3 { grid-template-columns: 1fr 1fr 1.25fr; gap: clamp(24px, 3vw, 48px); align-items: stretch; }
@media (max-width: 900px) { .w3 { grid-template-columns: 1fr; gap: 28px; } .w3 li:not(.us) { padding: 0; } }
.hx-head { align-items: start; }

/* Round 4: questions as an accordion. Answers stay in the page (details), so search reads them. */
.faqB { padding: var(--sec) 0 0; }
.acc { display: grid; gap: 10px; }
.acc-i { border-radius: 22px; background: var(--deep); transition: background-color 180ms; }
.acc-i[open] { background: var(--raised); }
.acc-i summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; cursor: pointer; list-style: none; }
.acc-i summary::-webkit-details-marker { display: none; }
.acc-i h3 { font-size: 19px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.acc-i summary i { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--raised-2); }
.acc-i summary i::before, .acc-i summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--ink); border-radius: 2px; transition: transform 200ms var(--ease); }
.acc-i summary i::after { transform: rotate(90deg); }
.acc-i[open] summary i { background: var(--blue); }
.acc-i[open] summary i::after { transform: rotate(0deg); }
.acc-i p { padding: 0 26px 24px; margin-top: -4px; font-size: 18px; line-height: 1.6; color: var(--ink); max-width: 44rem; }
.acc-i p a { color: var(--link); text-underline-offset: 3px; }
.faqB h2 { text-align: center; }
.accB { max-width: 820px; margin: 40px auto 0; }
@media (max-width: 900px) {
  .acc-i summary { padding: 18px 18px 18px 20px; }
  .acc-i p { padding: 0 20px 20px; }
}

/* Round 6: the profile card as the app's Progress view (ProgressAreaColumns, ProgressAreaSummaryCard). */
.cols { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 18px; padding: 20px 10px 16px; border-radius: 22px; background: var(--raised); }
.col { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; border-radius: 14px; transition: background-color 160ms; }
.col:hover { background: rgba(255,255,255,.04); }
.col-stack { display: flex; flex-direction: column; align-items: center; }
.col-stack > i, .col-piece { width: 34px; height: 30px; }
.col-stack > i.t { background: rgba(245,247,250,.09); }
.col-stack > i.t.e { background: rgba(245,247,250,.05); }
.col-stack > i.f.e { opacity: .78; }
.col-piece { position: relative; display: grid; place-items: center; }
.col-piece img, .col-piece svg { width: 30px; height: 30px; }
.col[aria-selected="true"] .col-piece::before { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; box-sizing: border-box; border: 3px solid var(--blue); }
.col[aria-selected="true"] .col-piece::after { content: ""; position: absolute; top: -16px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top: 6px solid var(--blue); }
.col-w { margin-top: 10px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.col-n { margin-top: 1px; font-size: 12px; color: var(--ink); }
.prog .area-body { margin-top: 14px; transition: opacity 160ms; }
.prog .area-body.swap { opacity: 0; }
.sum { padding: 18px 20px 20px; border-radius: 22px; background: var(--raised); }
.sum-top { display: flex; align-items: center; gap: 16px; }
.mini { display: flex; flex-direction: column; flex: none; }
.mini i { width: 14px; height: 14px; background: rgba(245,247,250,.09); }
.mini i:nth-child(even) { background-color: rgba(245,247,250,.05); }
.sum-w { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.sum-l { margin-top: 4px; font-size: 16px; color: var(--ink-2); }
.qbar { display: flex; gap: 2px; height: 8px; margin-top: 18px; border-radius: 999px; overflow: hidden; }
.qbar i { min-width: 4px; }
.qbar .g { background: var(--good); } .qbar .i { background: var(--inacc); } .qbar .m { background: var(--mistake); } .qbar .b { background: var(--blunder); }
.qpct { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.qpct b { display: block; font-size: 17px; }
.qpct b.g { color: var(--good); } .qpct b.i { color: var(--inacc); } .qpct b.m { color: var(--mistake); } .qpct b.b { color: var(--blunder); }
.qpct span { font-size: 13px; color: var(--ink-2); }
.prog .pats li { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
.prog .pc { text-align: left; }
.prog .sq { grid-column: auto; }
.fig-stage:has(.prog) { height: auto; padding-bottom: 32px; }
.prog { border-radius: 30px; }
@media (max-width: 520px) {
  .cols { padding: 16px 4px 12px; gap: 2px; }
  .col-stack > i, .col-piece { width: 26px; height: 24px; }
  .col-piece img, .col-piece svg { width: 24px; height: 24px; }
  .col[aria-selected="true"] .col-piece::before { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
  .col-w { font-size: 11px; }
  .col-n { font-size: 10px; }
  .qpct { grid-template-columns: repeat(2, 1fr); }
}
.cols { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.col { min-width: 0; }
.col-w { white-space: normal; text-align: center; line-height: 1.15; font-size: 13px; min-height: 2.3em; display: flex; align-items: flex-end; justify-content: center; }
.col-n { font-size: 11.5px; text-align: center; }
.prog { width: 100%; max-width: 620px; }
@media (max-width: 520px) { .col-w { font-size: 11px; } .col-n { font-size: 10px; } }

/* Before the launch: the hero's line in place of the badge. */
.soon-note { margin-top: 30px; font-size: 18px; color: var(--ink); }
.soon-note a { color: var(--link); text-underline-offset: 3px; }

/* Without the script (or before it has run): every habit card shows and the index that switches them hides;
   Safe or gift? shows its answer instead of the buttons. */
html:not(.ready) .hx-list, html:not(.ready) .sog { display: none; }
html:not(.ready) .hx { grid-template-columns: 1fr; }
.ready .sog-ans { display: none; }
.sog-ans { margin-top: 12px; font-size: 15px; }
.sog-ans summary { cursor: pointer; font-weight: 600; color: var(--link); }
.sog-ans p { margin-top: 6px; }
.area-body:focus-visible, .clause:focus-visible, .hcard:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
html:not(.ready) .hx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }

/* Design pass 2 (2026-11-10): alignment, one size per role, the closing panel's prices, fewer buttons. */
/* Type: six page sizes (75, 49, 24, 21, 18, 16). */
.c-t { font-size: 18px; }
.steps4 button { font-size: 16px; }
.hero-h-copy .lead { max-width: 36rem; }
@media (max-width: 520px) { .hero-h-copy .lead { font-size: 19px; } }

/* One habit, three games: the copy stays beside the boards; the boards are big enough to read. */
.hide-copy { position: sticky; top: 48px; }
.cases-h li { grid-template-columns: 176px 1fr; }
@media (max-width: 900px) { .hide-copy { position: static; } .cases-h li { grid-template-columns: 120px 1fr; } }

/* Profile: text starts at the card's top and stays with it; the card stands on its own (no frame around it). */
.step { align-items: start; }
.step-text { position: sticky; top: 48px; padding-top: 8px; }
.fig-stage:has(.prog), .step.flip .fig-stage:has(.prog) { background: none; padding: 0; }
.prog { border-radius: 30px; background: var(--deep); }
.prog .app-h { margin-top: 26px; padding-left: 14px; }
/* One size for every column's words, on one line where the card is wide enough, as in the app. A narrower card
   wraps them, aligned at the bottom so every column's words still line up. */
.prog { container-type: inline-size; }
.col-w { white-space: nowrap; font-size: 12.5px; min-height: 0; }
@container (max-width: 500px) {
  .col-w { white-space: normal; line-height: 1.15; min-height: 2.3em; display: flex; align-items: flex-end; justify-content: center; text-align: center; }
}
.col-n { font-size: 11.5px; white-space: nowrap; }
@media (max-width: 900px) { .step-text { position: static; } }
@container (max-width: 440px) { .cols { padding: 14px 2px 10px; gap: 0; } .col { padding-inline: 3px; } .col-w { font-size: 10.5px; } .col-n { font-size: 9px; letter-spacing: -0.01em; } }

/* The move: on a phone the board sits right under the step buttons, the words under the board. */
.answer { min-height: 0; }
@media (max-width: 900px) {
  .trace-copy { display: flex; flex-direction: column; }
  .trace { display: flex; flex-direction: column; }
  .trace-copy { display: contents; }
  .trace-copy h2 { order: 1; } .trace-copy .body { order: 2; } .steps4 { order: 3; }
  .trace-board { order: 4; margin-top: 20px; }
  .clause { order: 5; min-height: 0; margin-top: 20px; }
}

/* Training: each note sits under its board; the buttons keep the page's left edge on a phone. */
.panel .p-foot { margin-top: 0; padding-top: 14px; }
@media (max-width: 900px) { .rail-foot { align-items: flex-start; } }

/* Other ways: the intro starts level with the heading, as in the habits section. */
.w3-head { align-items: start; }
.w3-head .body { padding-top: 8px; }

/* The closing panel: the same inner edge as the training panel, and what the profile and the subscription hold on the right. */
.end-h { padding: clamp(28px, 4vw, 58px); display: grid; grid-template-columns: 7fr 5fr; gap: 24px clamp(32px, 5vw, 80px); align-items: end; }
.end-h > p { grid-column: 1; }
.end-facts { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: grid; gap: 10px; }
.end-facts li { padding: 18px 22px; border-radius: 20px; background: #1D4FD8; }
.end-facts b { display: block; font-size: 18px; }
.end-facts span { display: block; margin-top: 2px; font-size: 16px; color: #DCE6FF; }
@media (max-width: 900px) { .end-h { grid-template-columns: 1fr; } .end-facts { grid-column: 1; grid-row: auto; margin-top: 8px; } }
.end-h { row-gap: 0; }
@media (max-width: 900px) { .trace { gap: 0; } .trace-copy .body { margin-top: 18px; } .steps4 { margin-top: 28px; } }
.rail-foot { justify-content: flex-end; }

/* On the light board paper (MAR-170, direction D, 2026-11-14): the start page's ground and headings. The hero is a
   cream field under the cream bar, the rest of the page sits on the paper (/paper.css, body.light); the app's pieces
   keep the app's dark, and the training and the close stay blue. */
:root { --h2: clamp(38px, 4vw, 60px); }
.hero-h { padding-bottom: clamp(64px, 7vw, 112px); }
.hero-h-copy .lead { color: var(--ink-brown); }
.train .tint, .end-h .tint { color: var(--cream); }
.cases-h li { background: rgb(58 50 38 / .06); }
.hx-more { margin-top: 14px; max-width: 34rem; }
.hx-more a { display: inline-flex; align-items: center; gap: 10px; color: var(--link); font-weight: 600; text-underline-offset: 4px; }
