/* How it works (/how-it-works/). Owner: page-how (UX pass WP-D, Sep 27: 9 sections became 6). Every class is prefixed "how-". */

/* Page tokens: engine, question type and owner colours (match the product mock) */
:root, :root[data-theme="dark"] {
  --how-e1: #89E6D4; --how-e2: #899CFA; --how-e3: #F5C77E; --how-e4: #B3B2B2;
  --how-t1: #AC75FF; --how-t2: #899CFA; --how-t3: #89E6D4; --how-t4: #B0F7BA;
  --how-comp: #899CFA; --how-third: #797777;
  --how-panel: #1D1D1C;
}
:root[data-theme="light"] {
  --how-e1: #1F8A78; --how-e2: #5B6FE0; --how-e3: #B7791F; --how-e4: #8C8B8A;
  --how-t1: #8A38F5; --how-t2: #5B6FE0; --how-t3: #1F8A78; --how-t4: #3FAF6A;
  --how-comp: #5B6FE0; --how-third: #9A9998;
  --how-panel: #F7F7F6;
}

/* Shared bits */
.how-e1 { --e: var(--how-e1); } .how-e2 { --e: var(--how-e2); } .how-e3 { --e: var(--how-e3); } .how-e4 { --e: var(--how-e4); }
.how-t1 { --c: var(--how-t1); } .how-t2 { --c: var(--how-t2); } .how-t3 { --c: var(--how-t3); } .how-t4 { --c: var(--how-t4); }
.how-url { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.how-say { display: block; quotes: none; font-size: 14px; line-height: 1.45; color: var(--ink); }
.how-say span { display: inline-block; padding: 8px 12px; border-radius: 12px 12px 12px 4px; background: var(--card-2); border: 1px solid var(--line-soft); }
.how-card {
  position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-frame);
  background: var(--surface); box-shadow: var(--highlight), var(--shadow);
}


/* 1. Hero ------------------------------------------------------------------------------------ */
/* S3 hero rhythm: eyebrow to H1 14, H1 to lead 16, lead to actions 24 to 32, actions to note 12 */
.how-hero-grid { display: grid; gap: 24px; }
.how-hero-copy > * + * { margin-top: 16px; }
.how-hero-copy > .eyebrow + h1 { margin-top: 14px; }
.how-hero-copy h1 { max-width: 15ch; }
.how-hero-copy .lead { max-width: 56ch; }
.how-hero-copy .actions { margin-top: clamp(24px, 3vw, 32px); }
.how-hero-copy .actions + .hero-note { margin-top: 12px; }
@media (min-width: 1024px) {
  .how-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); align-items: center; gap: 56px; }
}
@media (min-width: 1440px) { .how-hero-grid { gap: 96px; } }

.how-pipe { padding: 8px; border-radius: var(--r-frame); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--highlight), var(--shadow-lg); }
.how-pipe-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.how-pipe-head strong { color: var(--ink); font-weight: 500; }
.how-pipe-list { position: relative; }
.how-pipe-list::before {
  content: ""; position: absolute; left: 31.5px; top: 32px; bottom: 32px; width: 1px;
  background: linear-gradient(var(--line), var(--line)) no-repeat, linear-gradient(transparent, var(--accent), transparent) no-repeat;
  background-size: 1px 100%, 1px 72px; background-position: 0 0, 0 -72px;
}
@media (prefers-reduced-motion: no-preference) { .how-pipe-list::before { animation: how-flow 4.8s linear infinite; } }
@keyframes how-flow { to { background-position: 0 0, 0 calc(100% + 72px); } }
@keyframes how-flow-x { to { background-position: 0 0, calc(100% + 72px) 0; } }
.how-pipe-row {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 16px; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 14px; color: inherit; transition: background-color var(--t-fast) var(--ease);
}
@media (hover: hover) { .how-pipe-row:hover { background: var(--hover); } .how-pipe-row:hover .how-pipe-chev { color: var(--ink); transform: translateX(2px); } }
.how-pipe-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.how-pipe-list li:last-child .how-pipe-icon { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.how-pipe-body { min-width: 0; }
.how-pipe-label { display: block; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.how-pipe-value { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; font-weight: 500; color: var(--ink); }
.how-pipe-meta { display: flex; align-items: center; }
.how-pipe-engines { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.how-pipe-engines .engine-name { display: inline-flex; align-items: center; }
.how-pipe-chev { color: var(--faint); transition: transform var(--t-fast) var(--ease), color var(--t-fast); }
.how-pipe-foot { margin-top: 4px; padding: 8px 12px 6px; border-top: 1px solid var(--line-soft); }
.how-pipe-short { display: none; }
.how-mini-mix { display: inline-flex; gap: 2px; }
.how-mini-mix i { width: 6px; height: 18px; border-radius: 2px; background: var(--how-t1); }
.how-mini-mix .b { background: var(--how-t2); } .how-mini-mix .h { background: var(--how-t3); } .how-mini-mix .a { background: var(--how-t4); }
.how-mini-ring {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0 61%, var(--line) 61% 100%);
  -webkit-mask: radial-gradient(circle, transparent 12.5px, #000 13.5px); mask: radial-gradient(circle, transparent 12.5px, #000 13.5px);
}
.how-mini-score { position: relative; display: grid; place-items: center; }
.how-mini-score b { position: absolute; font-size: 12px; font-weight: 600; color: var(--ink); }

/* Below 1024 the pipeline becomes a one-row, six-step strip under the copy */
@media (max-width: 1023px) {
  .how-pipe { max-width: 560px; padding: 12px 6px 8px; box-shadow: var(--highlight), var(--shadow); }
  .how-pipe-head, .how-pipe-foot, .how-pipe-meta, .how-pipe-chev { display: none; }
  .how-pipe-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .how-pipe-list::before {
    left: 8.33%; right: 8.33%; top: 20px; bottom: auto; width: auto; height: 1px;
    background: linear-gradient(var(--line), var(--line)) no-repeat, linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat;
    background-size: 100% 1px, 72px 1px; background-position: 0 0, -72px 0;
  }
  .how-pipe-row { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 6px; min-height: 64px; padding: 0 2px 4px; border-radius: 10px; }
  .how-pipe-body { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .how-pipe-short { display: block; font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--muted); white-space: nowrap; }
  .how-pipe-list li:last-child .how-pipe-short { color: var(--ink-2); }
}
@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) { .how-pipe-list::before { animation-name: how-flow-x; } }
@media (max-width: 399px) {
  .how-pipe { padding-inline: 2px; }
  .how-pipe-icon { width: 36px; height: 36px; border-radius: 9px; }
  .how-pipe-icon .icon { width: 18px; height: 18px; }
  .how-pipe-list::before { top: 18px; }
  .how-pipe-short { letter-spacing: -.02em; }
}
/* Very narrow phones: two rows of three, so the labels never touch */
@media (max-width: 359px) {
  .how-pipe-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
  .how-pipe-list::before { display: none; }
}

/* 2. Setup wizard ---------------------------------------------------------------------------- */
.how-wizard { display: grid; overflow: hidden; }
.how-rail { padding: 16px 12px 14px; border-bottom: 1px solid var(--line-soft); background: var(--how-panel); }
html:not(.js) .how-rail { display: none; }
.how-steps { display: flex; align-items: flex-start; }
.how-step {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 0; padding: 2px 0; border: 0; background: none; color: var(--muted); text-align: center; border-radius: 12px;
}
.how-step-num {
  position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 500;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.how-step-num .icon { display: none; width: 18px; height: 18px; }
.how-step:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: calc(50% + 26px); right: calc(-50% + 26px); height: 1px; background: var(--line); }
.how-step-text { display: grid; gap: 2px; }
.how-step-label { font-size: 13px; font-weight: 500; line-height: 1.3; color: inherit; }
.how-step[aria-selected="true"] { color: var(--ink); }
.how-step[aria-selected="true"] .how-step-num { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.how-step:has(~ .how-step[aria-selected="true"]) { color: var(--ink-2); }
.how-step:has(~ .how-step[aria-selected="true"]) .how-step-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.how-step:has(~ .how-step[aria-selected="true"]) .how-step-num .icon { display: block; }
.how-step:has(~ .how-step[aria-selected="true"]) .how-step-num span { display: none; }
.how-step:has(~ .how-step[aria-selected="true"])::after { background: var(--accent-line); }
@media (hover: hover) { .how-step:hover .how-step-num { border-color: var(--line-strong); } .how-step[aria-selected="true"]:hover .how-step-num { border-color: var(--accent); } }
@media (max-width: 767px) { .how-step-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
@media (min-width: 1024px) {
  .how-wizard { grid-template-columns: 296px minmax(0, 1fr); }
  .how-rail { padding: 28px 16px; border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .how-steps { flex-direction: column; gap: 8px; }
  .how-step { flex: none; width: 100%; flex-direction: row; align-items: center; gap: 14px; padding: 8px; text-align: left; }
  .how-step:not(:last-child)::after { top: 52px; bottom: -12px; left: 27.5px; right: auto; width: 1px; height: auto; }
  .how-step[aria-selected="true"] { background: var(--card); box-shadow: var(--highlight); }
  :root[data-theme="light"] .how-step[aria-selected="true"] { background: var(--card); box-shadow: var(--shadow-sm); }
}
/* From 768 all five panels share one grid cell (.tab-stack-md), so the card keeps one height across steps */
.how-main { min-width: 0; padding: clamp(20px, 2.8vw, 32px); --panel-display: block; }
.how-panel:focus-visible { outline-offset: -2px; border-radius: 8px; }
.how-panel > * + * { margin-top: 8px; }
.how-panel h3 { margin-top: 2px; }
.how-panel-lead { color: var(--ink-2); max-width: 62ch; }
@media (prefers-reduced-motion: no-preference) {
  html.js .how-panel:not([hidden]) { animation: how-in var(--t-slow) var(--ease) both; }
}
@keyframes how-in { from { opacity: 0; transform: translateX(10px); } }
html:not(.js) .how-panel + .how-panel { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line-soft); }
@media (min-width: 768px) { .how-panel { display: flex; flex-direction: column; } .how-main { --panel-display: flex; } }

.how-form { margin-top: 16px; display: grid; gap: 14px; padding: clamp(14px, 2.4vw, 22px); border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--bg); }
.how-form-2 { display: grid; gap: 14px; }
.how-form-2-xs { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
@media (max-width: 479px) { .how-form-2-xs .how-input { padding-inline: 10px; gap: 4px; } }
@media (min-width: 768px) { .how-form-2.how-form-2-xs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 359px) { .how-form-2-xs { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 768px) { .how-form-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.how-f-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.how-f-label span { font-weight: 400; }
.how-input {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--input-bg); color: var(--ink); font-size: 14.5px;
}
.how-input-select { justify-content: space-between; flex-wrap: nowrap; min-width: 0; }
.how-input-select > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.how-input-select::after { content: ""; width: 16px; height: 16px; flex: none; background: var(--muted); -webkit-mask: var(--m-chevron-down) center / contain no-repeat; mask: var(--m-chevron-down) center / contain no-repeat; }
.how-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 500; white-space: nowrap; }
.how-chip-n { border-color: var(--line); background: var(--card-2); color: var(--ink-2); }
.how-rows { display: grid; gap: 8px; }
.how-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--input-bg); font-size: 14.5px; }
.how-row small { display: block; font-size: 12.5px; color: var(--muted); }
.how-row-add { grid-template-columns: 28px minmax(0, 1fr); border-style: dashed; background: transparent; color: var(--muted); }
.how-fav { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.how-row-add .how-fav { background: none; border-style: dashed; }
.how-radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); justify-self: center; }
.how-row.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.how-row.is-on .how-radio { border: 5px solid var(--accent); }
@media (min-width: 768px) { .how-rows { gap: 6px; } .how-row { min-height: 46px; padding-block: 6px; } }
/* Step 5: three example questions, then the mix per 8 questions */
.how-qs { border: 1px solid var(--line); border-radius: var(--r); background: var(--input-bg); }
.how-q { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.how-q::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.how-q:last-child { border-bottom: 0; }
.how-mixbar { display: flex; gap: 3px; height: 10px; margin-top: 4px; }
.how-mixbar i { border-radius: 3px; background: var(--c); }
.how-mixbar .how-t1 { flex: 3; } .how-mixbar .how-t2, .how-mixbar .how-t3 { flex: 2; } .how-mixbar .how-t4 { flex: 1; }
.how-mix-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: -4px; font-size: 13px; color: var(--ink-2); }
.how-mix-key li { display: inline-flex; align-items: center; gap: 6px; }
.how-mix-key li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.how-mix-key b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.how-meter { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; font-size: 13.5px; color: var(--muted); }
.how-meter strong { color: var(--ink); font-weight: 600; }
.how-panel-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto !important; padding-top: 16px; }
.how-panel-foot .actions { gap: 8px; margin-left: auto; }
html:not(.js) .how-panel-foot [data-how-go] { display: none; }
@media (max-width: 479px) { .how-q .badge { display: none; } }

/* 3. Scoring --------------------------------------------------------------------------------- */
.how-score .tab-list { margin-bottom: 16px; }
.how-score-frame { padding: clamp(18px, 3vw, 28px); }
/* From 768 the code / model key sits on the tab row, right-aligned */
@media (min-width: 768px) {
  .how-score { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 24px; align-items: center; }
  .how-score > .tab-list { grid-column: 1; grid-row: 1; }
  .how-score > .how-key { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0 0 16px; }
  .how-score > .how-score-frame { grid-column: 1 / -1; grid-row: 2; }
}
.how-answer, .how-os { margin: 0; min-width: 0; }
/* From 1024 the caption closes the left column (level with the bottom of the right one), so it never adds a row under both */
@media (min-width: 1024px) {
  .how-answer, .how-os { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; column-gap: 40px; align-items: start; height: 100%; }
  .how-answer-main, .how-os-main { grid-column: 1; grid-row: 1; }
  .how-answer-side, .how-os-side { grid-column: 2; grid-row: 1 / span 2; }
  .how-answer > figcaption, .how-os > figcaption { grid-column: 1; grid-row: 2; align-self: end; }
}
.how-fig-cap { margin-top: 14px; }
.how-answer-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.how-answer-head .badge { margin-left: auto; }
.how-answer-q { margin-top: 14px; }
.how-answer-meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.how-answer-text { margin-top: 12px; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.65; color: var(--ink-2); }
@media (min-width: 768px) { .how-answer-text { line-height: 1.75; } }
.how-hl { padding: 1px 3px; border-radius: 4px; color: var(--ink); white-space: nowrap; background: color-mix(in srgb, var(--how-comp) 16%, transparent); box-shadow: inset 0 -1.5px 0 var(--how-comp); }
.how-hl-you { background: var(--accent-soft); box-shadow: inset 0 -1.5px 0 var(--accent); }
.how-pos { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 3px; border-radius: 50%; vertical-align: 2px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1; }
.how-hl-you .how-pos { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.how-sources { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.how-sources-title { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.how-src { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.how-src li { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 3px 10px 3px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); font-size: 13px; color: var(--ink-2); }
.how-src li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--how-third); }
.how-src .is-comp::before { background: var(--how-comp); } .how-src .is-you::before { background: var(--accent); }
.how-src em { font-style: normal; color: var(--muted); }
.how-tally-wrap { margin-top: 14px; }
.how-tally { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 480px) and (max-width: 1023px) { .how-tally { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.how-tally > div { min-width: 0; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--bg-2); }
.how-tally dt { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.how-tally dt .icon { width: 14px; height: 14px; flex: none; color: var(--accent-text); }
.how-tally .is-model { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.how-tally .is-model dt .icon { color: var(--ink-2); }
.how-tally dd { margin-top: 2px; font-size: clamp(15px, 1.4vw, 17px); font-weight: 600; color: var(--ink); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 479px) { .how-tally dt { font-size: 12px; } }
@media (min-width: 1024px) { .how-answer-side .how-sources { margin-top: 0; padding-top: 0; border-top: 0; } }

.how-os-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.how-os-score b { font-size: 40px; line-height: 1; font-weight: 600; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.how-delta { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 500; color: var(--good); font-variant-numeric: tabular-nums; }
.how-nl { position: relative; height: 94px; margin: 18px 10px 0; }
.how-nl::before { content: ""; position: absolute; left: -10px; right: -10px; top: 46px; height: 1px; background: var(--line-strong); }
.how-nl-pt { position: absolute; top: 0; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.how-nl-pt em { font-style: normal; }
.how-nl-pt b { font-weight: 600; color: var(--ink); font-size: 13px; }
.how-nl-pt i { width: 14px; height: 14px; border-radius: 50%; background: var(--e); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--e); }
/* Points alternate above and below the line so labels never collide; the combined score sits below, in accent */
.how-nl-pt.is-low { top: 40px; }
.how-nl-pt.is-all i { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.how-nl-pt.is-all b { color: var(--accent-text); }
.how-nl-pt.is-all em { color: var(--ink-2); font-weight: 500; }
.how-p55 { left: 25%; } .how-p59 { left: 45%; } .how-p61 { left: 55%; } .how-p64 { left: 70%; } .how-p66 { left: 80%; }
.how-os-note { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.how-os-side { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
@media (min-width: 1024px) { .how-os-side { margin-top: 0; padding-top: 0; border-top: 0; } }
/* The four inputs, named without weights; dashed = a model's read */
.how-inputs { display: grid; gap: 6px; }
@media (min-width: 480px) and (max-width: 1023px) { .how-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.how-inputs li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); font-size: 14px; color: var(--ink-2); }
.how-inputs li > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.how-inputs .icon { width: 14px; height: 14px; flex: none; color: var(--accent-text); }
.how-inputs .is-lead { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.how-inputs .is-model { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.how-inputs .is-model .icon { color: var(--ink-2); }
.how-inputs b { font-size: 12.5px; font-weight: 500; color: var(--accent-text); white-space: nowrap; }
.how-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.how-key > span { display: inline-flex; align-items: center; gap: 6px; }
.how-key .icon { width: 14px; height: 14px; color: var(--accent-text); }
.how-key .is-model .icon { color: var(--ink-2); }
.how-key .btn-link { min-height: 44px; font-size: 14.5px; }
@media (max-width: 767px) { .how-key { margin-top: 12px; } .how-key .btn-link { flex-basis: 100%; min-height: 36px; } }

/* 4. Loop ------------------------------------------------------------------------------------ */
.how-rec { display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px); }
.how-rec-main { display: grid; gap: 12px; min-width: 0; }
.how-rec-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.how-rec-top .how-rank { font: 500 12.5px/1 var(--mono); color: var(--muted); margin-right: 4px; }
.how-rec h3 { font-size: clamp(19px, 1.8vw, 22px); }
.how-rec-main > p { font-size: 15px; color: var(--ink-2); }
.how-rec ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.how-rec ol li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.how-rec ol li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.how-trend { min-width: 0; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.how-trend-head { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.how-trend-head strong { font-size: 14px; color: var(--ink); font-weight: 600; }
.how-chart { position: relative; height: 80px; margin-top: 18px; }
@media (min-width: 768px) { .how-chart { height: 112px; } .how-trend-head { flex-wrap: wrap; } }
@media (min-width: 1024px) { .how-chart { height: 96px; } }
/* Phones: the before and after scores are already labels on the chart; keep the line for screen readers */
@media (max-width: 479px) { .how-trend-head span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
.how-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.how-chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.how-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.how-chart .area { fill: var(--accent-soft); }
.how-chart .mark { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.how-chart-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; translate: -50% 50%; background: var(--surface); border: 2px solid var(--accent); }
.how-chart-dot.is-now { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.how-d61 { left: 87.5%; bottom: 52.5%; } .how-d67 { left: 100%; bottom: 67.5%; }
.how-chart-lab { position: absolute; font-size: 12.5px; font-weight: 600; color: var(--ink); translate: -50% 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.how-l61 { left: 87.5%; bottom: calc(52.5% + 12px); } .how-l67 { left: 100%; bottom: calc(67.5% + 14px); translate: -80% 0; }
/* "Pages live" sits at the foot of the dashed marker (x = 300 of 320), clear of the score labels */
.how-chart-note { position: absolute; right: calc(6.25% + 6px); bottom: 4px; font-size: 12px; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.how-chart-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
@media (min-width: 1024px) {
  .how-rec { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: 48px; align-items: center; padding: 28px; }
  .how-trend { padding: 0 0 0 48px; border-top: 0; border-left: 1px solid var(--line-soft); }
}
/* Caption and the agent link share one row under the card */
.how-rec-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; margin-top: 12px; }
.how-rec-foot .fig-cap { margin: 0; }

/* 5. FAQ ------------------------------------------------------------------------------------- */
.how-faq .accordion-body a:not([class]) { overflow-wrap: anywhere; }
