/* ============================================================
   AI Business Efficiency Advisor — Stylesheet
   Premium, restrained, responsive. No external fonts or assets.
   ============================================================ */

:root {
  --navy: #0f2a44;
  --navy-2: #163a5c;
  --ink: #16202b;
  --ink-2: #3b4856;
  --muted: #6b7a89;
  --line: #e3e8ee;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --accent: #1f7a6d;
  --accent-2: #67d4b8;
  --accent-soft: #e6f5f1;
  --amber: #b97b12;
  --amber-soft: #fbf1dc;
  --slate: #4b5c70;
  --slate-soft: #e9eef4;
  --gray-soft: #eef1f4;
  --danger: #a33a3a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .05), 0 8px 24px rgba(16, 32, 48, .06);
  --shadow-lg: 0 2px 4px rgba(16, 32, 48, .06), 0 20px 50px rgba(16, 32, 48, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding-left: 1.2rem; }
button { font-family: inherit; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.container--narrow { max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--accent); margin-bottom: .75rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 40rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 10px; border: 1px solid transparent; padding: .7rem 1.2rem; font-weight: 600; font-size: .95rem; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease; white-space: nowrap; text-decoration: none !important; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(31, 122, 109, .35); outline-offset: 2px; }
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(15, 42, 68, .22); }
.btn--primary:hover { background: var(--navy-2); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: #c9d2dc; background: #fbfcfd; }
.btn--lg { padding: .95rem 1.5rem; font-size: 1.02rem; }
.btn--sm { padding: .5rem .9rem; font-size: .875rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; text-decoration: none !important; }
.brand__mark svg { width: 30px; height: 30px; display: block; }
.brand__name { font-size: .98rem; letter-spacing: -.01em; }
.topnav { display: flex; align-items: center; gap: 1.4rem; }
.topnav a { color: var(--ink-2); font-weight: 500; font-size: .93rem; }
.topnav a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 720px) { .topnav a { display: none; } .brand__name { font-size: .9rem; } }

/* ---------- Views ---------- */
.view { display: none; }
.view.is-active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.4rem; }
.trust { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--muted); font-size: .9rem; }
.trust li { display: inline-flex; align-items: center; gap: .45rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); display: inline-block; }
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; } .hero__visual { order: -1; } }

.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 1.1rem 1.25rem 1rem; max-width: 460px; margin: 0 auto; }
.mock__head { display: flex; gap: 6px; margin-bottom: .9rem; }
.mock__head span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock__title { font-weight: 700; font-size: .95rem; margin-bottom: .8rem; color: var(--navy); }
.mock__row { display: grid; grid-template-columns: 1.2fr 1fr auto; align-items: center; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .85rem; }
.mock__label { color: var(--ink-2); }
.mock__bar { height: 8px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; }
.mock__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.mock__foot { margin-top: .8rem; font-size: .78rem; color: var(--muted); text-align: center; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; padding: .22rem .6rem; border-radius: 99px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.pill--auto { background: var(--accent-soft); color: var(--accent); }
.pill--assist { background: #e7eefc; color: #2b57a8; }
.pill--human { background: var(--amber-soft); color: var(--amber); }
.pill--skip { background: var(--gray-soft); color: var(--slate); }
.pill--high { background: var(--accent-soft); color: var(--accent); }
.pill--medium { background: #e7eefc; color: #2b57a8; }
.pill--low { background: var(--gray-soft); color: var(--slate); }
.pill--minimal { background: var(--gray-soft); color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 46rem; margin-bottom: 2.25rem; }
.section__sub { color: var(--ink-2); font-size: 1.05rem; }
.grid { display: grid; gap: 1.1rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid--3 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.card--flat { box-shadow: none; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; color: var(--ink-2); }
.card__icon { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: .9rem; font-size: 1.1rem; }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: s; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step__num { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.step p { color: var(--ink-2); margin: 0; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

.cta-band { margin-top: 2.5rem; background: var(--navy); color: #fff; border-radius: 18px; padding: 2rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.cta-band h3 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .78); margin: 0; }
.cta-band .btn--primary { background: #fff; color: var(--navy); box-shadow: none; }
.cta-band .btn--primary:hover { background: #eef3f7; }
@media (max-width: 760px) { .cta-band { flex-direction: column; align-items: flex-start; } }

.method { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.method h3 { margin-top: 1.4rem; }
.method h3:first-child { margin-top: 0; }
.method p { color: var(--ink-2); }
@media (max-width: 880px) { .method { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.5rem; margin-bottom: .55rem; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); }
.outcomes { margin: 0; display: grid; gap: .8rem; }
.outcomes div { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; }
.outcomes dt { margin: 0; padding-top: .1rem; }
.outcomes dd { margin: 0; color: var(--ink-2); }
.prose p { color: var(--ink-2); }
.prose p:last-child { margin: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 2rem 0; color: var(--muted); font-size: .88rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer p { margin: 0; max-width: 44rem; }
.footer__links a { margin-left: 1.2rem; color: var(--ink-2); }

/* ============================================================
   Questionnaire
   ============================================================ */
.quiz { padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 4rem; min-height: 70vh; }
.progress { margin-bottom: 1.25rem; }
.progress__meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin-bottom: .5rem; font-weight: 600; }
.progress__section { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.progress__track { height: 6px; background: #e6ebf0; border-radius: 99px; overflow: hidden; }
.progress__track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .35s ease; }

.qcard { padding: clamp(1.4rem, 3.5vw, 2.25rem); box-shadow: var(--shadow-lg); animation: fade .25s ease; }
.qcard h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: .5rem; }
.qcard__help { color: var(--muted); margin-bottom: 1.25rem; font-size: .95rem; }
.options { display: grid; gap: .6rem; }
.options--dense { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .options--dense { grid-template-columns: 1fr; } }
.opt { display: flex; align-items: flex-start; gap: .85rem; width: 100%; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; color: var(--ink); font-size: .97rem; line-height: 1.4; }
.opt:hover { border-color: #b9c6d3; background: #fbfcfd; }
.opt:focus-visible { outline: 3px solid rgba(31, 122, 109, .3); outline-offset: 2px; }
.opt.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.opt__ctrl { flex: 0 0 20px; height: 20px; margin-top: .12rem; border: 2px solid #b9c6d3; border-radius: 50%; position: relative; background: #fff; transition: border-color .12s, background .12s; }
.opt--multi .opt__ctrl { border-radius: 6px; }
.opt.is-selected .opt__ctrl { border-color: var(--accent); background: var(--accent); }
.opt.is-selected .opt__ctrl::after { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opt--multi.is-selected .opt__ctrl::after { width: 10px; height: 6px; border-radius: 0; background: none; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.opt__label { font-weight: 600; display: block; }
.opt__desc { display: block; color: var(--muted); font-size: .86rem; font-weight: 400; margin-top: .1rem; }
.opt[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.qcard__limit { font-size: .82rem; color: var(--muted); margin-top: .8rem; }
.quiz__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
.quiz__note { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 1.25rem; }

/* ============================================================
   Results
   ============================================================ */
.results-bar { position: sticky; top: 64px; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.results-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding-top: .5rem; padding-bottom: .5rem; }
.results-bar__date { color: var(--muted); font-size: .85rem; margin-left: .75rem; }
.results-bar__actions { display: flex; gap: .5rem; }
@media (max-width: 600px) { .results-bar__date { display: none; } }

.r-hero { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.r-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.r-hero .lead { max-width: 48rem; }
.r-context { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .8rem; font-size: .82rem; color: var(--ink-2); }
.chip strong { color: var(--ink); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.5rem 0 0; }
@media (max-width: 880px) { .metrics { grid-template-columns: 1fr 1fr; } }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.metric__label { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.metric__value { font-size: 1.5rem; font-weight: 750; color: var(--navy); margin: .3rem 0 .2rem; letter-spacing: -.01em; }
.metric__hint { font-size: .82rem; color: var(--muted); }
.metric--High .metric__value { color: var(--accent); }
.metric--Low .metric__value { color: var(--slate); }
.metric--risk.metric--High .metric__value { color: var(--danger); }
.metric--risk.metric--Moderate .metric__value { color: var(--amber); }
.metric--risk.metric--Low .metric__value { color: var(--accent); }

.r-section { padding: 2.25rem 0 .5rem; }
.r-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.r-section__head h2 { font-size: 1.5rem; }
.r-section__head p { color: var(--muted); margin: 0; max-width: 40rem; }

.notice { border-radius: var(--radius); padding: 1rem 1.2rem; border: 1px solid; display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1rem; }
.notice__icon { flex: 0 0 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; }
.notice--amber { background: var(--amber-soft); border-color: #eedcb3; color: #5c3f0a; }
.notice--amber .notice__icon { background: var(--amber); color: #fff; }
.notice--green { background: var(--accent-soft); border-color: #bfe7db; color: #0f4a41; }
.notice--green .notice__icon { background: var(--accent); color: #fff; }
.notice p { margin: 0; }
.notice p + p { margin-top: .4rem; }

/* Top opportunities */
.top-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 880px) { .top-grid { grid-template-columns: 1fr; } }
.topcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.topcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.topcard__rank { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.topcard h3 { margin: .3rem 0 .4rem; font-size: 1.1rem; }
.topcard__why { color: var(--ink-2); font-size: .93rem; flex: 1; }
.topcard__meta { display: flex; justify-content: space-between; align-items: center; margin-top: .9rem; gap: .5rem; }

/* Score bar */
.score { display: flex; align-items: center; gap: .6rem; min-width: 140px; }
.score__track { flex: 1; height: 8px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; }
.score__track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.score__num { font-size: .82rem; font-weight: 700; color: var(--ink-2); min-width: 2ch; text-align: right; }

/* Category groups */
.group { margin-bottom: 1.75rem; }
.group__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.group__head h3 { margin: 0; font-size: 1.15rem; }
.group__head p { margin: 0; color: var(--muted); font-size: .9rem; }
.group__count { margin-left: auto; color: var(--muted); font-size: .85rem; }
.reccard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: .75rem; overflow: hidden; }
.reccard__sum { width: 100%; text-align: left; background: none; border: 0; padding: 1.1rem 1.25rem; display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; cursor: pointer; color: var(--ink); }
.reccard__sum:hover { background: #fbfcfd; }
.reccard__sum:focus-visible { outline: 3px solid rgba(31, 122, 109, .3); outline-offset: -3px; }
.reccard__title { font-weight: 650; font-size: 1.02rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.reccard__sub { color: var(--muted); font-size: .88rem; margin-top: .15rem; }
.reccard__chev { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; transition: transform .2s; }
.reccard.is-open .reccard__chev { transform: rotate(180deg); }
.reccard__body { display: none; padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--line); }
.reccard.is-open .reccard__body { display: block; animation: fade .2s ease; }
.reccard__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1rem; }
@media (max-width: 760px) { .reccard__grid { grid-template-columns: 1fr; } .reccard__sum { grid-template-columns: 1fr auto; } .reccard__sum .score { display: none; } }
.reccard h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .5rem; font-weight: 700; }
.reccard ul { padding-left: 1.1rem; color: var(--ink-2); font-size: .93rem; }
.reccard li { margin-bottom: .35rem; }
.reccard p { color: var(--ink-2); font-size: .93rem; }
.reccard__first { background: var(--accent-soft); border-radius: var(--radius-sm); padding: .9rem 1rem; margin-top: 1rem; color: #0f4a41; font-size: .93rem; }
.reccard__first strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .3rem; }
.reccard__first--human { background: var(--amber-soft); color: #5c3f0a; }
.reccard__first--skip { background: var(--gray-soft); color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { background: var(--gray-soft); border-radius: 6px; padding: .25rem .6rem; font-size: .8rem; color: var(--ink-2); }
.factors { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-top: .8rem; }
.factors span b { color: var(--ink-2); }
.badge-def { font-size: .74rem; color: var(--amber); font-weight: 700; }

/* Not needed */
.nn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 760px) { .nn-grid { grid-template-columns: 1fr; } }
.nn { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; gap: .9rem; align-items: flex-start; }
.nn__icon { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--gray-soft); color: var(--slate); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.nn h3 { font-size: 1rem; margin-bottom: .25rem; }
.nn p { margin: 0; color: var(--ink-2); font-size: .92rem; }

/* Plan */
.plan { position: relative; }
.phase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.phase__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.phase__num { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.phase--audit .phase__num { background: var(--amber); }
.phase--protect .phase__num { background: var(--amber); }
.phase--leave .phase__num { background: var(--slate); }
.phase__head h3 { margin: 0; font-size: 1.1rem; }
.phase__head p { margin: 0; color: var(--muted); font-size: .88rem; flex-basis: 100%; }
.plan-item { display: grid; grid-template-columns: auto 1fr; gap: .9rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.plan-item__idx { width: 26px; height: 26px; border-radius: 8px; background: var(--gray-soft); color: var(--ink-2); font-weight: 700; font-size: .82rem; display: inline-flex; align-items: center; justify-content: center; }
.plan-item__title { font-weight: 650; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.plan-item__text { color: var(--ink-2); font-size: .92rem; margin: .25rem 0 0; }
.plan-item--plain { grid-template-columns: 1fr; }

/* Methodology / footer of results */
.r-foot { padding: 2rem 0 4rem; }
.r-foot .card { margin-bottom: 1rem; }
.r-foot .card h3 { margin-bottom: .6rem; }
.r-foot details summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.r-foot details summary::-webkit-details-marker { display: none; }
.r-foot details summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; }
.r-foot details[open] summary::after { content: "–"; }
.r-foot details > div { margin-top: .9rem; color: var(--ink-2); }
.r-foot details ul { padding-left: 1.1rem; }
.r-foot details li { margin-bottom: .35rem; }

/* ============================================================
   Print
   ============================================================ */
@media print {
  @page { margin: .6in; }
  body { background: #fff; font-size: 11.5pt; }
  .topbar, .results-bar, .footer, .quiz__nav, .r-foot details summary::after, #view-landing, #view-quiz { display: none !important; }
  .view { display: none !important; }
  #view-results.is-active { display: block !important; }
  .container { max-width: 100%; padding: 0; }
  .card, .metric, .topcard, .reccard, .nn, .phase { box-shadow: none !important; break-inside: avoid; }
  .reccard__body { display: block !important; }
  .reccard__chev { display: none; }
  .reccard__sum { cursor: default; }
  .r-foot details > div { display: block; }
  .r-foot details { open: true; }
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .top-grid { grid-template-columns: repeat(3, 1fr); }
  a { color: inherit; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* Narrow-screen refinements */
@media (max-width: 480px) {
  .results-bar__inner { flex-wrap: wrap; }
  .results-bar__actions { width: 100%; }
  .results-bar__actions .btn { flex: 1; }
  .topcard__meta { flex-direction: column; align-items: stretch; gap: .6rem; }
  .score { min-width: 0; }
  .btn--lg { width: 100%; }
}
@media (max-width: 480px) { .group__head { flex-wrap: wrap; } .group__count { margin-left: 0; flex-basis: 100%; } }
