/* tool-sa.css — the Site Auditor page (marketing/tool-sa.blade.php) and its tour
   (partials/site-audit-demo, played by rt-story.js in script mode).
   Sits on home.css (hm-), tool-v2.css (tv-) and rt-story.css (rts-).
   Every block is fully visible at rest; animations only replay it. */

.sa { --sa-ok: #19b66a; --sa-warn: #e8890c; --sa-err: #d64545; }

/* shared: health ring */
.sa-ring { --p: 50; position: relative; display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; flex: none;
  background: conic-gradient(#e8890c calc(var(--p) * 1%), #e9edf3 0); }
.sa-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.sa-ring b { position: relative; font: 800 19px/1 var(--hm-fb); color: var(--hm-ink); font-variant-numeric: tabular-nums; }
.sa-ring--lg { width: 84px; height: 84px; } .sa-ring--lg::before { inset: 8px; } .sa-ring--lg b { font-size: 27px; }
.sa-ring--sm { width: 40px; height: 40px; } .sa-ring--sm::before { inset: 5px; } .sa-ring--sm b { font-size: 13px; }

/* ================= HERO: crawl tree ================= */
.sa-crawl { margin: 0; background: #fff; border: 1px solid var(--hm-line); border-radius: 24px; box-shadow: var(--hm-shadow); padding: 16px; display: grid; gap: 12px; }
.sa-crawl__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sa-crawl__dom { display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 var(--hm-fb); }
.sa-crawl__dom i { width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, #c98b4b, #7a4a22); }
.sa-crawl__count { font: 600 12.5px/1 var(--hm-fs); color: var(--hm-muted); padding: 6px 10px; border-radius: 999px; background: var(--hm-soft); border: 1px solid var(--hm-line); }
.sa-crawl__count b { color: var(--hm-ink); font-family: var(--hm-fb); font-variant-numeric: tabular-nums; }
.sa-tree { position: relative; overflow: hidden; border-radius: 16px; padding: 14px 10px 12px;
  background-color: #fbfcfe; background-image: linear-gradient(#eef1f6 1px, transparent 1px), linear-gradient(90deg, #eef1f6 1px, transparent 1px); background-size: 22px 22px; border: 1px solid #edf0f5; }
.sa-tree__root { display: flex; justify-content: center; position: relative; padding-bottom: 18px; }
.sa-tree__root::after { content: ""; position: absolute; left: 12.5%; right: 12.5%; bottom: 0; height: 2px; background: #d6dce6; }
.sa-tree__root::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; height: 18px; background: #d6dce6; }
.sa-node { display: inline-block; padding: 6px 11px; border-radius: 9px; font: 700 12px/1 var(--hm-fb); white-space: nowrap; }
.sa-node--root { background: var(--hm-ink); color: #fff; font-size: 13px; padding: 7px 16px; }
.sa-node--branch { background: #fff; border: 1.5px solid #cfd6e2; color: var(--hm-ink2); }
.sa-tree__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sa-tree__col { position: relative; display: grid; justify-items: center; align-content: start; gap: 8px; padding-top: 14px; min-width: 0; }
.sa-tree__col::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 14px; background: #d6dce6; }
.sa-tree__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; width: 100%; }
.sa-leaf { display: flex; align-items: center; gap: 6px; padding: 6px 7px; border-radius: 8px; background: #fff; border: 1px solid #e6eaf1; font: 600 11px/1.1 var(--hm-fs); color: var(--hm-ink2); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sa-leaf i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.sa-leaf--ok { --c: var(--sa-ok); } .sa-leaf--warn { --c: var(--sa-warn); }
.sa-leaf--err { --c: var(--sa-err); border-color: #f4c2c2; background: #fff6f6; color: #a8322c; }
.sa-scanline { position: absolute; left: 0; right: 0; top: 0; height: 46px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(47,95,224,0), rgba(47,95,224,.12) 70%, rgba(47,95,224,.5) 100%); border-bottom: 2px solid rgba(47,95,224,.6); opacity: 0; }
.sa-crawl__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sa-crawl__verdict { display: grid; gap: 2px; font-size: 13px; color: var(--hm-muted); flex: 1 1 180px; }
.sa-crawl__verdict b { font: 700 15px/1.2 var(--hm-fb); color: var(--hm-ink); }
.sa-legend { display: flex; gap: 10px; font: 600 11.5px/1 var(--hm-fs); color: var(--hm-faint); }
.sa-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sa-legend i { width: 8px; height: 8px; border-radius: 50%; }
.sa-legend .ok { background: var(--sa-ok); } .sa-legend .warn { background: var(--sa-warn); } .sa-legend .err { background: var(--sa-err); }
/* crawl motion: leaves arrive as the scan passes, then the beam loops slowly */
.sa-leaf { animation: saLeaf .35s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.35s + var(--i) * .09s); }
.sa-node--branch { animation: saLeaf .35s ease both; animation-delay: calc(.15s + var(--b) * .08s); }
.sa-scanline { animation: saScan 3.2s cubic-bezier(.45,.05,.4,1) .2s 1 both, saScan 3.2s cubic-bezier(.45,.05,.4,1) 6s infinite; }
.sa-crawl__foot .sa-ring { animation: saFill 1.2s cubic-bezier(.2,.8,.2,1) 1.4s both; }
@keyframes saLeaf { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes saScan { 0% { top: -46px; opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
@keyframes saFill { from { --p: 0; } }

/* ================= EXPLAINER ================= */
.sa-explain__top { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.sa .sa-explain__top .sa-answer { padding-top: 34px; }
.sa-explain__top h2 { margin-top: 14px; }
.sa .sa-answer { margin: 0; font: 500 19px/1.6 var(--hm-fm); color: var(--hm-ink2); max-width: 64ch; }
.sa .sa-h3 { margin: 40px 0 18px; font: 700 21px/1.3 var(--hm-fb); color: var(--hm-ink); }
.sa-anatomy__bar { display: flex; gap: 3px; height: 26px; }
.sa-anatomy__bar i { flex: 1; border-radius: 4px; }
.sa-anatomy.is-in .sa-anatomy__bar i { animation: saSeg .4s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--i) * 18ms); }
@keyframes saSeg { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
.sa-anatomy__grid { margin: 22px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 28px; }
.sa-anatomy__grid > div { padding-top: 12px; border-top: 3px solid var(--c); }
.sa-anatomy__grid dt { display: flex; align-items: baseline; gap: 8px; font: 700 16px/1.2 var(--hm-fb); color: var(--hm-ink); }
.sa-anatomy__grid dt b { font: 800 26px/1 var(--hm-fb); color: var(--c); font-variant-numeric: tabular-nums; }
.sa-anatomy__grid dd { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--hm-muted); }

/* ================= SEVERITY vs IMPACT ================= */
.sa-sort__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.sa-sort__copy h2 { margin-top: 14px; }
.sa-sort__copy p { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--hm-muted); }
.sa-switch { margin-top: 22px; display: inline-flex; padding: 4px; border-radius: 12px; background: #fff; border: 1px solid var(--hm-line); }
.sa-switch button { border: 0; background: transparent; padding: 10px 14px; border-radius: 9px; font: 700 14px/1 var(--hm-fb); color: var(--hm-muted); cursor: pointer; transition: background .25s, color .25s; }
.sa-switch button[aria-pressed="true"] { background: var(--hm-ink); color: #fff; }
.sa-switch button:focus-visible { outline: 2px solid var(--hm-orange); outline-offset: 2px; }
.sa-sortlist { --row: 74px; list-style: none; margin: 0; padding: 0; position: relative; height: calc(var(--row) * 6); }
.sa-sortlist li { --rx: var(--ri); position: absolute; left: 0; right: 0; top: calc(var(--rx) * var(--row)); height: calc(var(--row) - 8px);
  display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; padding: 0 16px; border-radius: 14px; background: #fff; border: 1px solid var(--hm-line);
  transition: top .8s cubic-bezier(.65,0,.25,1), box-shadow .3s; }
.sa-sortlist[data-sort="count"] li { --rx: var(--rc); }
.sa-sortlist.is-instant li { transition: none; }
.sa-sortlist__imp { justify-self: start; font: 700 11px/1 var(--hm-fb); padding: 5px 9px; border-radius: 999px; }
.sa-sortlist li.is-high { box-shadow: inset 4px 0 0 var(--sa-err); }
.sa-sortlist li.is-high .sa-sortlist__imp { background: #fdecec; color: #c2413a; }
.sa-sortlist li.is-medium .sa-sortlist__imp { background: var(--hm-amber-bg); color: #b35400; }
.sa-sortlist li.is-low .sa-sortlist__imp { background: #f1f3f8; color: var(--hm-muted); }
.sa-sortlist__txt { min-width: 0; display: grid; gap: 3px; }
.sa-sortlist__txt b { font: 700 15px/1.2 var(--hm-fb); color: var(--hm-ink); }
.sa-sortlist__txt small { font-size: 13px; line-height: 1.3; color: var(--hm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-sortlist__n { font: 800 15px/1 var(--hm-fb); color: var(--hm-ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ================= TOUR ================= */
.sad[data-view="overview"] .sad-view--overview, .sad[data-view="issues"] .sad-view--issues, .sad[data-view="changes"] .sad-view--changes { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.sad[data-drawer="links"] .rts-drawer, .sad[data-drawer="fix"] .rts-drawer { transform: none; }
.sad .rts-kpi span.down { color: var(--red); }
.sad-ov { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; }
.sad-areas, .sad-next { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.sad-areas > small, .sad-next > small, .sad-trend > small, .sad-lbl { font: 700 10px/1 var(--fb); letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.sad-areas__r { display: grid; grid-template-columns: 92px 1fr 34px; gap: 10px; align-items: center; font-size: 12.5px; }
.sad-areas__r i { display: block; height: 8px; border-radius: 4px; background: #eef0f5; overflow: hidden; }
.sad-areas__r em { display: block; height: 100%; width: var(--w); border-radius: 4px; }
.sad-areas__r b { text-align: right; font: 700 12px/1 var(--fb); font-variant-numeric: tabular-nums; }
.rts-js .sad.rts-play .sad-areas__r em { animation: saGrow .8s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.2s + var(--i) * .07s); }
@keyframes saGrow { from { width: 0; } }
.sad-next { background: linear-gradient(135deg, #fff6f4, #fff); border-color: #f6cfc8; }
.sad-next b { font: 800 16px/1.25 var(--fb); }
.sad-next p { font-size: 12.5px; line-height: 1.45; color: var(--ink2); }
.sad-link { font: 700 12.5px/1 var(--fb); color: var(--blue); }
.sad-imp { justify-self: start; display: inline-block; font: 700 10.5px/1 var(--fb); padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.sad-imp.hi { background: #fdecec; color: #c2413a; } .sad-imp.md { background: #fff4e2; color: #b35400; } .sad-imp.lo { background: #f1f3f8; color: var(--muted); }
.sad .rts-tr { grid-template-columns: 74px 1.6fr 86px 100px 64px; }
.sad-n { font: 700 12.5px/1 var(--fb); font-variant-numeric: tabular-nums; }
.sad-area, .sad-eff { font-size: 12px; color: var(--muted); }

.sad-tabs { display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid #f0f2f7; }
.sad-tab { padding: 8px 10px; font: 700 12px/1 var(--fb); color: var(--faint); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .25s, border-color .25s, transform .15s; }
.sad-tab.is-press { transform: scale(.95); }
.sad[data-drawer="links"] .sad-tab.t-links, .sad[data-drawer="fix"] .sad-tab.t-fix { color: var(--ink); border-color: var(--orange); }
.sad-drawer { grid-template-rows: auto auto 1fr; }
.sad-dpage { grid-area: 3 / 1; padding: 14px 16px; display: grid; gap: 10px; align-content: start; opacity: 0; visibility: hidden; transform: translateX(16px); transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s; }
.sad[data-drawer="links"] .sad-dpage--links, .sad[data-drawer="fix"] .sad-dpage--fix { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease .1s, transform .35s ease .1s; }
.sad-broken { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff6f6; border: 1px solid #f4c2c2; }
.sad-code { font: 800 11px/1 var(--fb); padding: 4px 6px; border-radius: 6px; background: var(--red); color: #fff; }
.sad-broken b { font: 700 13px/1.2 var(--fb); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sad-rank { margin-left: auto; font: 700 11px/1 var(--fb); color: var(--green-ink); background: #eafaf1; padding: 4px 7px; border-radius: 999px; white-space: nowrap; }
.sad-src { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.sad-src li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f4f5f9; font: 600 12.5px/1.25 var(--fs); color: var(--ink2); }
.sad-src li span { min-width: 0; display: grid; }
.sad-src small { font: 500 11.5px/1.3 var(--f); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sad-src em { margin-left: auto; font-style: normal; font: 700 10.5px/1 var(--fb); color: var(--green-ink); background: #eafaf1; padding: 4px 7px; border-radius: 999px; }
.rts-js .sad[data-drawer="links"] .sad-src li { animation: rtsRow .4s ease both; animation-delay: calc(.25s + var(--i) * .08s); }
.sad-more { font: 600 12px/1 var(--fs); color: var(--faint); }
.sad-fix { padding: 13px; border-radius: 14px; background: linear-gradient(135deg, #fff7ec, #fff); border: 1.5px solid #ffc98f; display: grid; gap: 10px; transition: box-shadow .5s ease, border-color .5s ease; }
.sad-fix ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 12.5px; line-height: 1.45; color: var(--ink2); }
.sad-fix code { display: block; padding: 8px 10px; border-radius: 8px; background: #0f1a3a; color: #c7d2ff; font: 600 11.5px/1.4 ui-monospace, Consolas, monospace; overflow-x: auto; white-space: nowrap; }
.sad.is-zoom .sad-fix { border-color: var(--orange); box-shadow: 0 0 0 5px rgba(255,106,0,.14), 0 18px 40px -18px rgba(255,106,0,.55); }
.sad-copy { justify-self: start; padding: 9px 12px; border-radius: 9px; background: var(--ink); color: #fff; font: 700 12.5px/1 var(--fb); transition: transform .15s, background .25s; }
.sad-copy.is-press { transform: scale(.95); }
.sad-copy .c-done { display: none; }
.sad.is-copied .sad-copy { background: var(--green); }
.sad.is-copied .sad-copy .c-idle { display: none; } .sad.is-copied .sad-copy .c-done { display: inline; }
.sad-verify { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sad-vres { font-size: 12.5px; color: var(--muted); opacity: 0; transform: translateX(-6px); transition: opacity .35s ease, transform .35s ease; }
.sad-vres b { color: var(--green-ink); font-family: var(--fb); margin-right: 4px; }
.sad.is-verified .sad-vres { opacity: 1; transform: none; }

.sad-chg { display: grid; grid-template-columns: 1fr 1.15fr; gap: 12px; align-items: start; }
.sad-trend, .sad-chlist { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.sad-trend { padding: 14px; display: grid; gap: 8px; }
.sad-trend > b { font: 800 30px/1 var(--fb); }
.sad-trend > b span { color: var(--faint); font-size: 22px; }
.sad-trend svg { width: 100%; height: 70px; display: block; }
.sad-tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sad-tally span { padding: 8px 6px; border-radius: 10px; text-align: center; font: 600 11px/1.2 var(--fs); }
.sad-tally b { display: block; font: 800 18px/1 var(--fb); margin-bottom: 2px; }
.sad-tally .fixed { background: #eafaf1; color: var(--green-ink); } .sad-tally .better { background: #eef3ff; color: #2448b8; }
.sad-tally .new { background: #fff4e2; color: #b35400; } .sad-tally .worse { background: #fdecec; color: #c2413a; }
.sad-chlist { list-style: none; margin: 0; padding: 4px 14px; }
.sad-chlist li { display: grid; grid-template-columns: 62px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid #f4f5f9; font: 600 13px/1.25 var(--fs); color: var(--ink2); }
.sad-chlist li:last-child { border-bottom: 0; }
.sad-chlist em { font-style: normal; font: 700 10.5px/1 var(--fb); padding: 5px 0; border-radius: 999px; text-align: center; }
.sad-chlist .is-fixed em { background: #eafaf1; color: var(--green-ink); } .sad-chlist .is-better em { background: #eef3ff; color: #2448b8; }
.sad-chlist .is-new em { background: #fff4e2; color: #b35400; } .sad-chlist .is-worse em { background: #fdecec; color: #c2413a; }
.sad-chlist b { font: 700 12px/1 var(--fb); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rts-js .sad[data-view="changes"] .sad-chlist li { animation: rtsRow .4s ease both; animation-delay: calc(.2s + var(--i) * .08s); }

/* ================= AI READINESS ================= */
.sa-ai { padding-block: var(--hm-gap); background: linear-gradient(180deg, #f3f0ff 0%, #fbfaff 100%); }
.sa-ai__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
.sa-code { margin: 0; border-radius: 20px; overflow: hidden; background: #111a33; box-shadow: 0 30px 60px -28px rgba(17,26,51,.6); display: grid; grid-template-rows: auto 1fr; }
.sa-code__tab { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #0b1226; font: 600 12.5px/1 var(--hm-fs); color: #8f9bc4; }
.sa-code__tab i { width: 10px; height: 10px; border-radius: 50%; background: #2a355a; }
.sa-code__tab span { margin-left: 8px; }
.sa-code pre { margin: 0; padding: 18px 0; overflow-x: auto; }
.sa-code code { display: grid; font: 500 14px/1.75 ui-monospace, "Cascadia Code", Consolas, monospace; color: #dfe6ff; }
.sa-code .ln { display: flex; align-items: center; gap: 10px; padding: 0 20px; min-height: 1.75em; white-space: pre; }
.sa-code .ln em { font-style: normal; color: #8fb3ff; }
.sa-code .ln.is-bad { background: rgba(214,69,69,.16); box-shadow: inset 3px 0 0 #ff6b6b; }
.sa-code .ln b { margin-left: auto; font: 700 11px/1 var(--hm-fb); color: #ffb3b3; background: rgba(214,69,69,.25); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.sa-ai__grid.is-in .sa-code .ln { animation: saType .3s ease both; animation-delay: calc(var(--i) * .08s); }
.sa-ai__grid.is-in .sa-code .ln.is-bad { animation: saType .3s ease both, saFlash 1.2s ease both; animation-delay: calc(var(--i) * .08s), calc(.9s + var(--i) * .05s); }
@keyframes saType { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes saFlash { 0%, 100% { background: rgba(214,69,69,.16); } 40% { background: rgba(214,69,69,.42); } }
.sa-aiscore { background: #fff; border: 1px solid #e4dcff; border-radius: 20px; padding: 18px; display: grid; gap: 14px; align-content: start; }
.sa-aiscore__top { display: flex; align-items: center; gap: 14px; }
.sa-aiscore__top .sa-ring { background: conic-gradient(#7b5cff calc(var(--p) * 1%), #ece8fb 0); }
.sa-aiscore__top small { display: block; font: 700 10.5px/1 var(--hm-fb); letter-spacing: 1.2px; text-transform: uppercase; color: var(--hm-faint); }
.sa-aiscore__top b { display: block; margin-top: 4px; font: 800 19px/1.2 var(--hm-fb); color: #5b3fd6; }
.sa-aiscore__top span { font-size: 13px; color: var(--hm-muted); }
.sa-bots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sa-bots li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--hm-line); font: 700 12.5px/1.15 var(--hm-fb); min-width: 0; }
.sa-bots li span { display: grid; min-width: 0; }
.sa-bots small { font: 500 11px/1.2 var(--hm-f); color: var(--hm-faint); }
.sa-bots li b { font: 700 10.5px/1 var(--hm-fb); padding: 4px 7px; border-radius: 999px; }
.sa-bots .is-ok b { background: var(--hm-green-bg); color: var(--hm-green-ink); }
.sa-bots .is-no { border-color: #f4c2c2; background: #fff6f6; }
.sa-bots .is-no b { background: #fdecec; color: #c2413a; }
.sa-ai__grid.is-in .sa-bots li { animation: saLeaf .35s ease both; animation-delay: calc(.4s + var(--i) * .06s); }
.sa-checks { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--hm-line); display: grid; gap: 8px; }
.sa-checks li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; font-size: 14px; color: var(--hm-ink2); }
.sa-checks i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 11px/1 var(--hm-fb); font-style: normal; color: #fff; }
.sa-checks .is-pass i { background: var(--sa-ok); } .sa-checks .is-part i { background: var(--sa-warn); } .sa-checks .is-fail i { background: var(--sa-err); }
.sa-checks b { font: 700 13px/1 var(--hm-fb); color: var(--hm-muted); white-space: nowrap; }

/* ================= PAGE X-RAY ================= */
.sa-xray__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.sa-page { margin: 0; border-radius: 18px; border: 1px solid var(--hm-line); background: #fff; box-shadow: var(--hm-shadow); overflow: hidden; }
.sa-page__url { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--hm-line); background: var(--hm-soft); font: 600 12.5px/1 var(--hm-fs); color: var(--hm-muted); }
.sa-page__url i { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, #c98b4b, #7a4a22); }
.sa-page__body { position: relative; height: 380px; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 22px 1fr auto 44px; gap: 14px; }
.sa-page .w { display: block; border-radius: 8px; background: #eef1f6; }
.sa-page .w i { display: block; border-radius: 4px; background: #e3e7ee; }
.w-title { grid-column: 1 / -1; width: 72%; justify-self: center; background: #dfe4ec !important; }
.w-img { grid-row: 2 / 4; background: linear-gradient(135deg, #e9dccb, #d7c1a4) !important; }
.w-buy { display: grid !important; gap: 10px; align-content: start; background: transparent !important; }
.w-buy i { height: 14px; } .w-buy i:nth-child(1) { width: 80%; } .w-buy i:nth-child(2) { width: 45%; }
.w-buy i.btn { height: 34px; width: 60%; border-radius: 9px; background: #ffd2a8 !important; }
.w-text { display: grid !important; gap: 8px; align-content: start; background: transparent !important; }
.w-text i { height: 8px; } .w-text i:nth-child(3) { width: 85%; } .w-text i:nth-child(5) { width: 60%; }
.w-foot { grid-column: 1 / -1; display: flex !important; gap: 10px; padding: 12px; }
.w-foot i { flex: 1; }
.sa-pin { position: absolute; z-index: 2; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; display: grid; place-items: center; background: var(--hm-orange); color: #fff; font: 800 13px/1 var(--hm-fb); border: 2.5px solid #fff; box-shadow: 0 6px 14px -4px rgba(255,106,0,.7); }
.sa-pin::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255,122,0,.45); animation: saPing 2.4s ease-out infinite; animation-delay: calc(var(--i) * .4s); }
@keyframes saPing { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.sa-findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sa-findings li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 11px 14px; border-radius: 14px; background: var(--hm-soft); border: 1px solid var(--hm-line); font-size: 14px; line-height: 1.45; color: var(--hm-muted); }
.sa-findings b { display: block; font: 700 15px/1.3 var(--hm-fb); color: var(--hm-ink); }
.sa-findings__n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--hm-orange); color: #fff; font: 800 13px/1 var(--hm-fb); }
.sa-findings em { font-style: normal; align-self: center; font: 700 11px/1 var(--hm-fb); padding: 5px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--hm-line); color: var(--hm-ink2); }
.sa-xray__grid.is-in .sa-findings li { animation: saLeaf .4s ease both; animation-delay: calc(var(--i) * .08s); }
.sa-xray__grid.is-in .sa-pin { animation: saPinIn .45s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(.2s + var(--i) * .1s); }
@keyframes saPinIn { from { transform: scale(0); } to { transform: none; } }

/* ================= REPORTS + PLANS ================= */
.sa-ship__grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.sa-ship__copy h2 { margin-top: 14px; }
.sa-ship__copy p { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--hm-muted); max-width: 46ch; }
.sa-pdf { position: relative; margin-top: 30px; height: 250px; max-width: 360px; }
.sa-pdf__sheet { position: absolute; left: 40px; top: 0; width: 200px; height: 250px; border-radius: 10px; background: #fff; border: 1px solid var(--hm-line); box-shadow: 0 18px 40px -20px rgba(11,21,38,.35); }
.sa-pdf__sheet.s3 { transform: rotate(-9deg) translateX(-34px); background: #f6f7fb; }
.sa-pdf__sheet.s2 { transform: rotate(-4deg) translateX(-14px); background: #fafbfd; }
.sa-pdf__sheet.s1 { transform: rotate(3deg) translateX(30px); padding: 16px; display: grid; align-content: start; gap: 12px; }
.sa-pdf__logo { justify-self: start; padding: 5px 9px; border-radius: 6px; border: 1.5px dashed #c3c9d4; font: 700 10.5px/1 var(--hm-fb); color: var(--hm-faint); }
.sa-pdf__sheet.s1 > b { font: 800 15px/1.2 var(--hm-fb); }
.sa-pdf__row { display: flex; gap: 10px; align-items: center; }
.sa-pdf__lines { flex: 1; display: grid; gap: 6px; }
.sa-pdf__lines i { height: 7px; border-radius: 4px; background: #e8ebf1; } .sa-pdf__lines i:nth-child(2) { width: 70%; } .sa-pdf__lines i:nth-child(3) { width: 85%; }
.sa-pdf__bars { height: 74px; display: flex; align-items: flex-end; gap: 8px; padding-top: 6px; border-top: 1px solid var(--hm-line); }
.sa-pdf__bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: linear-gradient(#ff9b4a, #ff6a00); }
.sa-plans { background: #fff; border: 1px solid var(--hm-line); border-radius: 22px; padding: 10px 18px 18px; box-shadow: var(--hm-shadow); overflow-x: auto; }
.sa-plans table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sa-plans caption { text-align: left; padding: 10px 0 6px; font: 700 12px/1 var(--hm-fb); letter-spacing: 1.4px; text-transform: uppercase; color: var(--hm-faint); }
.sa-plans th, .sa-plans td { padding: 13px 10px; border-bottom: 1px solid #f0f2f7; text-align: left; vertical-align: top; }
.sa-plans thead th { font: 800 17px/1.1 var(--hm-fb); color: var(--hm-ink); border-bottom: 2px solid var(--hm-line); }
.sa-plans thead small { display: block; margin-top: 4px; font: 600 13px/1 var(--hm-fs); color: var(--hm-muted); }
.sa-plans tbody th { font: 700 13.5px/1.3 var(--hm-fb); color: var(--hm-ink2); width: 30%; }
.sa-plans td { color: var(--hm-muted); line-height: 1.4; }
.sa-plans td b { font: 800 19px/1 var(--hm-fb); color: var(--hm-ink); font-variant-numeric: tabular-nums; }
.sa-yes { color: var(--hm-green-ink); font-weight: 800; } .sa-no { color: #c3c9d4; }
.sa-plans__foot { margin: 14px 0 0; font-size: 13px; color: var(--hm-faint); }

/* ================= QUOTE (orange band) ================= */
.sa-quote { padding-block: 64px; background: linear-gradient(120deg, #ff8b1f 0%, #ff5d00 60%, #e2337a 130%); color: #fff; }
.sa-quote figure { margin: 0 auto; max-width: 880px; text-align: center; display: grid; justify-items: center; gap: 22px; }
.sa-quote blockquote { margin: 0; font: 700 clamp(22px, 2.7vw, 32px)/1.35 var(--hm-fb); letter-spacing: -.01em; text-wrap: balance; }
.sa-quote blockquote::before { content: "“"; } .sa-quote blockquote::after { content: "”"; }
.sa-quote figcaption { display: flex; align-items: center; gap: 12px; text-align: left; }
.sa-quote img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.7); }
.sa-quote figcaption span { display: grid; font-size: 14px; color: #fff1e4; }
.sa-quote figcaption b { font: 700 16px/1.3 var(--hm-fb); color: #fff; }

/* ================= smaller screens ================= */
@media (max-width: 1000px) {
  .sa-explain__top, .sa-sort__grid, .sa-ai__grid, .sa-xray__grid, .sa-ship__grid { grid-template-columns: 1fr; gap: 28px; }
  .sa-anatomy__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sa-tree__cols { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .sa-tree__root::after { left: 25%; right: 25%; }
  .sa-tree__col:nth-child(n+3)::before { display: none; }
  .sa-leaf { font-size: 10.5px; }
  .sa .sa-answer { font-size: 17px; }
  .sa .sa-explain__top .sa-answer { padding-top: 0; }
  .sa-anatomy__bar { height: 20px; gap: 2px; }
  .sa-anatomy__grid { gap: 16px 18px; }
  .sa-anatomy__grid dd { font-size: 13px; }
  .sa-sortlist { --row: 82px; }
  .sa-sortlist li { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 10px; padding: 0 12px; align-content: center; }
  .sa-sortlist__imp { grid-row: 1; }
  .sa-sortlist__txt { grid-column: 1 / -1; grid-row: 2; }
  .sa-sortlist__n { grid-column: 2; grid-row: 1; justify-self: end; font-size: 13px; }
  .sa-sortlist__txt small { white-space: normal; }
  .sa-switch { display: flex; } .sa-switch button { flex: 1; padding: 10px 8px; font-size: 13px; }
  .sa-code code { font-size: 12px; }
  .sa-code .ln { padding: 0 14px; }
  .sa-code .ln b { font-size: 9.5px; padding: 3px 6px; }
  .sa-bots { grid-template-columns: 1fr; }
  .sa-page__body { height: 300px; padding: 14px; gap: 10px; }
  .sa-findings li { grid-template-columns: 28px 1fr; }
  .sa-findings em { grid-column: 2; justify-self: start; }
  .sa-pdf { height: 220px; } .sa-pdf__sheet { width: 170px; height: 220px; }
  .sa-plans { padding: 6px 12px 14px; }
  .sa-plans th, .sa-plans td { padding: 11px 6px; font-size: 13px; }
  .sa-plans thead th { font-size: 15px; }
  .sa-plans td b { font-size: 16px; }
  /* tour */
  .sad .rts-tr { grid-template-columns: 62px 1fr 64px; gap: 8px; }
  .sad-c-area, .sad-c-eff { display: none; }
  .sad-ov, .sad-chg { grid-template-columns: 1fr; }
  .sad-next { display: none; } /* keeps the views close in height; the tour opens this issue next */
  .sad-areas__r { grid-template-columns: 84px 1fr 30px; }
  .sad-tally b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .sa *, .sa *::before, .sa *::after { animation: none !important; transition: none !important; }
  .sa-scanline { display: none; }
}
