/* finder-next r5 (2026-11-15, research/BRIEF-r5-2026-11-15.md): shell (3), hd (4), rows (3). Layout, surface and spacing only; controls are DS components or Phase 1 parts (set-collapse, set-pickbtn, set-menu).
   DS-GAPs (local stand-ins): .fnx-s section frame, .fnx-seg / .fnx-rail header steps, .fnx-lb__r / .fnx-tl / .fnx-tbl list structures, .fnx-rad, .fnx-pk, .aif-sc. */
body:has(.fnx-page) .rs-crumb { display: none; }
body.nuf.rs-light:has(.fnx-page), body:has(.fnx-page) main.rs { background: var(--neutral-75); }
main.rs > .view.fnx-page { display: block; padding: 0 32px 0; min-width: 0; }
.fnx-shell { --fnx-off: 157px; display: flex; flex-direction: column; min-height: calc(100vh - var(--fnx-off)); min-width: 0; }
.fnx-wrap { width: 100%; max-width: 960px; margin: 0 auto; min-width: 0; padding: 16px 0 24px; box-sizing: border-box; flex: 1 0 auto; }
.fnx-card { background: var(--surface-screen); border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-16); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); min-width: 0; box-sizing: border-box; }
.fnx-page .field-error { font: 400 13px/20px var(--font); color: var(--action-error); margin: 8px 0 0; }
.fnx-set__body { padding: 24px 28px; min-width: 0; display: grid; gap: 16px; }

/* header container: page title 20/28, step overline 12 + step title 18/26 */
.fnx-top { background: var(--surface-screen); border-bottom: 1px solid var(--stroke-tertiary); margin: 0 -32px; padding: 0 32px; }
.fnx-top__in { max-width: 960px; margin: 0 auto; padding: 16px 0 14px; display: grid; gap: 12px; }
.fnx-top__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fnx-top__t { margin: 0; font: 500 20px/28px var(--font); color: var(--type-primary); }
.fnx-top__t:focus { outline: none; }
.fnx-top__s { display: grid; gap: 0; padding-top: 12px; border-top: 1px solid var(--stroke-tertiary); }
.fnx-top__k { margin: 0; font: 400 12px/16px var(--font); color: var(--type-secondary); }
.fnx-top__n { margin: 0; font: 500 18px/26px var(--font); color: var(--type-primary); }
.fnx-seg, .fnx-rail { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.fnx-seg__b { display: block; width: 28px; height: 16px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius-4); }
.fnx-seg__b:disabled { cursor: default; }
.fnx-seg__b i { display: block; height: 4px; margin-top: 6px; border-radius: var(--radius-full); background: var(--neutral-100); transition: background-color var(--m-base) var(--m-ease); }
.fnx-seg__b.is-done i { background: var(--neutral-300); } .fnx-seg__b.is-cur i { background: var(--brand-100); }
.fnx-seg__b:focus-visible, .fnx-rail__b:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 2px; }
/* shell 2: the header is its own rounded card */
.fnx-shell--2 .fnx-top { background: transparent; border: 0; padding-top: 16px; }
.fnx-shell--2 .fnx-top__in { background: var(--surface-screen); border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-16); padding: 16px 28px 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); box-sizing: border-box; }
.fnx-shell--2 .fnx-wrap { padding-top: 0; }
/* shell 3: stepper rail */
.fnx-rail { gap: 20px; }
.fnx-rail__b { display: inline-flex; align-items: center; gap: 8px; padding: 2px 4px; border: 0; background: transparent; cursor: pointer; font: 400 14px/20px var(--font); color: var(--type-secondary); border-radius: var(--radius-4); }
.fnx-rail__b:disabled { cursor: default; opacity: .7; }
.fnx-rail__n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-full); border: 1px solid var(--stroke-secondary); font: 500 12px/16px var(--font); color: var(--type-secondary); background: var(--surface-screen); }
.fnx-rail__b.is-cur { color: var(--type-primary); font-weight: 500; } .fnx-rail__b.is-cur .fnx-rail__n { border-color: var(--brand-100); background: var(--brand-10); color: var(--brand-300); }
.fnx-rail__b.is-done .fnx-rail__n { border-color: var(--action-success); background: var(--action-success); color: var(--neutral-white); } .fnx-rail__n .fa { font-size: 10px; }
.fnx-shell--3 .fnx-top__in { padding-bottom: 14px; }

/* footer: full-width sticky bar */

/* sections (hd): section title 16/24 + lead 13/20; field labels 14/500 */
.fnx-secs { display: grid; gap: 16px; min-width: 0; }
/* hd 1: section cards */
/* hd 2: numbered */
/* hd 3: label column */
/* hd 4: tinted header strip */
.fnx-later { margin: 0; font: 400 13px/20px var(--font); color: var(--type-secondary); }

/* rows 1: list box */
.fnx-path { font: 400 12px/16px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--type-secondary); margin-left: 6px; background: transparent; padding: 0; }
/* rows 2: tile grid */
/* rows 3: table */

/* pages: radio list with nested content, picker */
.fnx-pgs { display: grid; gap: 4px; min-width: 0; }
.fnx-rads { display: grid; gap: 4px; }
.fnx-rad > label.k { align-items: flex-start; padding: 8px 0; }
.fnx-rad__t { display: grid; gap: 0; }
.fnx-rad__t b { font: 500 14px/20px var(--font); color: var(--type-primary); }
.fnx-rad__t > span { font: 400 13px/20px var(--font); color: var(--type-secondary); }
.fnx-nest { margin: 4px 0 12px 30px; min-width: 0; display: grid; gap: 12px; }
.fnx-pk { position: relative; max-width: 360px; }
.fnx-pk .set-menu { position: absolute; left: 0; right: 0; z-index: 20; }
.fnx-pk .set-menu[hidden] { display: none; }
.fnx-pk .set-menu ul { max-height: 220px; overflow-y: auto; }
.fnx-none { padding: 8px; font: 400 13px/20px var(--font); color: var(--type-secondary); }
.fnx-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* analyze and finished */
.fnx-page .aif-prog { margin: 4px 0 8px; }
.fnx-page .aif-sts { margin: 0; padding: 0; list-style: none; }
.fnx-page .ds-banner { margin: 0; }
.fnx-sofar { margin: 0; font: 400 14px/20px var(--font); color: var(--type-primary); }
.fnx-sofar b { font-weight: 500; }
.fnx-page .aif-sk { margin: 0; }
.fnx-dn { display: grid; gap: 16px; }
.fnx-dn__l { margin: 0; font: 400 14px/22px var(--font); color: var(--type-primary); }
.fnx-dn__l b { font-weight: 500; }
.fnx-nx { list-style: none; counter-reset: nx; margin: 0; padding: 0; display: grid; gap: 16px; }
.fnx-nx li { display: grid; gap: 0; padding-left: 32px; position: relative; counter-increment: nx; }
.fnx-nx li::before { content: counter(nx); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: var(--radius-full); background: var(--brand-10); color: var(--brand-300); font: 500 12px/24px var(--font); text-align: center; }
.fnx-nx b { font: 500 14px/20px var(--font); }
.fnx-nx span { font: 400 13px/20px var(--font); color: var(--type-secondary); }

/* results: lab options. Filter tabs (fl 2) and set cards (tbl 2) */
.aif-tabs { padding: 0 24px; border-bottom: 1px solid var(--stroke-tertiary); }
.aif-tabs .ds-tabs-list { border-bottom: 0; gap: 20px; overflow-x: auto; }
.aif-tabs .ds-tabs-list > li > button { white-space: nowrap; }
.aif-scs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--stroke-tertiary); }
.aif-sc { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-12); background: var(--surface-screen); align-content: start; min-width: 0; }
.aif-sc .aif-gh__t { display: grid; gap: 2px; min-width: 0; }
.aif-sc .aif-gh__m { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aif-sc .aif-gh__a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* settings: radio list for notify */
.fnx-rads .fnx-nest { margin-bottom: 8px; }

@media (max-width: 1100px) { main.rs > .view.fnx-page { padding-inline: 24px; } .fnx-top { margin-inline: -24px; padding-inline: 24px; } .fnx-page { --ais-px: 24px; } }
@media (max-width: 640px) {
  main.rs > .view.fnx-page { padding-inline: 12px; }
  .fnx-top { margin-inline: -12px; padding-inline: 12px; } .fnx-page { --ais-px: 12px; }
  .fnx-top__top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fnx-rail { gap: 8px; flex-wrap: wrap; } .fnx-rail__b span:last-child { display: none; } .fnx-rail__b.is-cur span:last-child { display: inline; }
  .fnx-shell--2 .fnx-top__in { padding-inline: 16px; }
  .fnx-set__body { padding: 16px; } .fnx-hd--1, .fnx-hd--4 .fnx-s__bd { padding: 16px; } .fnx-hd--4 .fnx-s__h { padding: 12px 16px; }
  .fnx-nest { margin-left: 0; } .fnx-tbl td:first-child { width: auto; } .fnx-tbl th:nth-child(2), .fnx-tbl td:nth-child(2) { display: none; }
  .aif-tabs, .aif-scs { padding-inline: 16px; }
}
.fnx-pgs > .ds-seg, .set-g__c > .ds-seg { justify-self: start; align-self: start; max-width: 100%; }

/* control widths (r5): selects size to content 160 to 320, short inputs 120, name and email up to 360, only long text is full width */
.aif-res .ds-select, .set-g__c .ds-select, .ais-sheet .ds-select, .fnx-page .ds-select { width: max-content; min-width: 160px; max-width: 320px; }
.aif-tool__s .inp { max-width: 360px; }
.set-g__c input[type="email"], .set-g__c .inp[type="email"], .ais-sheet .inp[type="email"], .ais-sheet .inp[type="text"]:not(textarea) { max-width: 360px; }
.ais-sheet .inp[type="number"], .ais-sheet input[inputmode="numeric"] { width: 120px; }
.fnx-pgs > .ds-seg, .set-g__c > .ds-seg { justify-self: start; align-self: start; max-width: 100%; }
/* review and Edit set drawers: same levels (title 18/26, section 16/24, label 14/500, help 13/20) */
.ais-sheet__h h2, .ais-sheet__h .ais-sheet__t { font: 500 18px/26px var(--font); }
.ais-sheet .field-label, .ais-sheet .aii-lab { font: 500 14px/20px var(--font); }
.ais-sheet .field-help, .ais-sheet .aii-help { font: 400 13px/20px var(--font); }
/* drawers clear the lab bar (same --lab-h the page uses) */
.ais-sheet { top: var(--lab-h, 0px); }

/* ---- round 6 (phase A) ---- */
/* shell 6: page header on the grey page, card strip with the progress as its divider */
/* hairline under every expanded card header, 20px above the content (hd 1, 4); numbered sections too */
/* tabs with a description line */
.set-g__c .fnx-tabs + .fnx-tabc { margin-top: 0; }
/* selects: filled caret, opens upward near the bottom */
/* tile grid (rows 2): borderless soft canvas, index, Medium title, one grey line; selected = 2px orange ring + check badge */
/* analyze and finished: dividers between groups */
.fnx-sofar { padding-top: 16px; border-top: 1px solid var(--stroke-tertiary); }
.fnx-dn__l { padding-bottom: 16px; border-bottom: 1px solid var(--stroke-tertiary); }
.fnx-page .aif-sk { padding-top: 0; }
/* results: toolbar divider, set header and row text in the r5 levels */
.aif-tool { border-bottom: 1px solid var(--stroke-tertiary); }
.aif-gh__t b { font: 500 16px/24px var(--font); }
.aif-muted, .aif-gh__p { font: 400 13px/20px var(--font); }
.aif-q__h b { font: 500 14px/20px var(--font); }


/* ---- round 6 phase B: ai-shared drives the header, strip, cards, rows, tiles, tabs and footer ---- */
.fnx-page { --ais-px: 32px; }
.fnx-hdw, .fnx-barw { display: contents; }
.fnx-shell > .fnx-barw > .ais-foot { margin-top: auto; }
.fnx-shell--6 .fnx-wrap { padding-top: 24px; }
.fnx-set .ais-strip { border-bottom-color: var(--stroke-tertiary); }
.fnx-set .ais-tabs, .fnx-set .ais-rows, .fnx-set .ais-tiles { min-width: 0; }


/* footer buttons align to the 960px card (ai-shared pads to the page edge) */
.fnx-shell .ais-foot { padding-inline: max(var(--ais-px), calc((100% + 2 * var(--ais-px) - 960px) / 2)); }
@media (max-width: 1100px) { .fnx-page { --ais-px: 24px; } }
@media (max-width: 640px) { .fnx-page { --ais-px: 12px; } }

/* ---- round 7 ---- */
.fnx-secs { display: grid; gap: 16px; min-width: 0; }
.fnx-later { margin: 0; font: 400 13px/20px var(--font); color: var(--type-secondary); }
.fnx-lists { display: grid; gap: 4px; min-width: 0; }
.fnx-lists .aif-lh { margin: 16px 0 8px; } .fnx-lists .aif-lh:first-child { margin-top: 0; }
.fnx-set .ais-strip__k { font-weight: 500; }
.fnx-tabc { max-width: 360px; }
/* Edit set testimonial list: the same list box as everywhere */
.aif-sl { border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-8); background: var(--surface-screen); padding: 0; margin: 0; list-style: none; }
.aif-sl__r { padding: 12px 16px; gap: 12px; min-height: 0; }
.aif-sl__r + .aif-sl__r { border-top: 1px solid var(--stroke-tertiary); }

/* round 8: Settings finder card holds AISH cards */
.set-page .aiset { gap: 16px; }
.set-page .aiset .ais-card { background: var(--surface-screen); }
.set-page .aiset .ais-sets { margin: 0; }
.ix-a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* round 10 */
.fnx-help { margin: 0 0 12px; font: 400 13px/20px var(--font); color: var(--type-secondary); }
.fnx-page .ds-banner, .aif-res .ds-banner, .set-page .ais-bn, .ais-sheet .ais-bn { margin: 0; }
.chip.with-icon .fa { font-size: 10px; margin-right: 4px; }

/* r10b: "What AI can and never does" lists (were unstyled) */
.aiset .may { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.aiset .may__c { border: 1px solid var(--neutral-200, #E3E5E8); border-radius: 8px; padding: 16px; }
.aiset .may__h { font: 500 14px/20px Rubik, sans-serif; margin: 0 0 8px; }
.aiset .may ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aiset .may li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; line-height: 20px; }
.aiset .may li .fa { color: var(--success-600, #2E7D32); flex: none; }
.aiset .may__c--n li .fa { color: var(--neutral-500, #6B7280); }
@media (max-width: 700px) { .aiset .may { grid-template-columns: 1fr; } }

/* r10c: swap note on the neutral DS note: text takes the room, buttons sit at the right */
.ds-note.neutral.aif-es__sw { flex-wrap: nowrap; justify-content: flex-start; }
.ds-note.neutral.aif-es__sw > span:first-of-type { flex: 1 1 auto; min-width: 0; }
.ds-note.neutral.aif-es__sw .aif-es__swb { flex: none; }
@media (max-width: 480px) { .ds-note.neutral.aif-es__sw { flex-wrap: wrap; } }
