/* SVS iPG app. MR/Claude 11/5/2026: the installable web app that replaces the native SVS iPG app.
   Clinical, editorial look in the SVS red: warm paper background, white cards, serif reading text,
   evidence colours for strength and quality, light and dark themes, phone tab bar and desktop rail. */

:root {
	--svs-read-scale: 1;
	--red: #a3151a;
	--red-2: #8f1217;
	--red-ink: #a3151a;
	--red-soft: #fbeceb;
	--bar: #a3151a;
	--bar-2: #93131a;
	--bg: #f5f3f0;
	--surface: #ffffff;
	--surface-2: #faf8f6;
	--surface-3: #f1ede8;
	--ink: #17191d;
	--ink-2: #40454e;
	--muted: #6b717c;
	--line: #e6e1da;
	--line-2: #efebe6;
	--focus: #1d64d8;
	--s1: #0d7350; --s1-bg: #e1f3ea;
	--s2: #94610a; --s2-bg: #fbf0d8;
	--sg: #4a4fb8; --sg-bg: #ebecfa;
	--qA: #0d7350; --qB: #c07a12; --qC: #c2410c; --q0: #9aa0a9;
	--arterial: #a3151a; --arterial-bg: #fbeaea;
	--venous: #2148b5; --venous-bg: #e8eefb;
	--mark: #ffe9a8;
	--shadow-1: 0 1px 2px rgba(31, 20, 12, .05), 0 1px 1px rgba(31, 20, 12, .03);
	--shadow-2: 0 1px 2px rgba(31, 20, 12, .05), 0 8px 24px rgba(31, 20, 12, .07);
	--shadow-3: 0 18px 50px rgba(20, 10, 6, .22);
	--r-s: 10px; --r: 16px; --r-l: 22px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Source Serif Pro", "Sitka Text", Georgia, serif;
	--safe-t: env(safe-area-inset-top, 0px);
	--safe-b: env(safe-area-inset-bottom, 0px);
	--bar-h: 56px;
	--tab-h: 60px;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--red: #e5484d;
	--red-2: #ff6369;
	--red-ink: #ff7b80;
	--red-soft: rgba(229, 72, 77, .14);
	--bar: #5e0c10;
	--bar-2: #4e0a0d;
	--bg: #0e1013;
	--surface: #16191e;
	--surface-2: #1b1f25;
	--surface-3: #22272e;
	--ink: #eef0f3;
	--ink-2: #c5cad1;
	--muted: #8c939d;
	--line: #272c33;
	--line-2: #20252b;
	--focus: #6aa1ff;
	--s1: #45d19a; --s1-bg: rgba(69, 209, 154, .13);
	--s2: #f2b84b; --s2-bg: rgba(242, 184, 75, .13);
	--sg: #9ea3ff; --sg-bg: rgba(158, 163, 255, .14);
	--qA: #45d19a; --qB: #f2b84b; --qC: #ff8a4c; --q0: #5b626c;
	--arterial: #ff7b80; --arterial-bg: rgba(229, 72, 77, .15);
	--venous: #8fb0ff; --venous-bg: rgba(110, 150, 255, .15);
	--mark: rgba(255, 210, 90, .32);
	--shadow-1: 0 1px 0 rgba(255, 255, 255, .03);
	--shadow-2: 0 1px 0 rgba(255, 255, 255, .03), 0 10px 28px rgba(0, 0, 0, .35);
	--shadow-3: 0 20px 60px rgba(0, 0, 0, .6);
	color-scheme: dark;
}

/* ================================================================== base */

html, body { height: 100%; margin: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	background: var(--bg); color: var(--ink);
	font: 16px/1.45 var(--font);
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
	overscroll-behavior: none; -webkit-tap-highlight-color: transparent;
}
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--red-ink); text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ================================================================ splash */

.svs-app { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.svs-splash {
	position: absolute; inset: 0; z-index: 50; display: grid; place-content: center; gap: 18px; text-align: center;
	background: radial-gradient(120% 80% at 80% 0%, #c21d23 0%, var(--bar) 45%, #6e0b10 100%); color: #fff;
}
:root[data-theme="dark"] .svs-splash { background: radial-gradient(120% 80% at 80% 0%, #7d1015 0%, #4e0a0d 60%, #2a0507 100%); }
.svs-splash-mark { animation: svs-breathe 1.8s ease-in-out infinite; }
.svs-splash-sub { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; opacity: .78; margin-top: 18px; }
@keyframes svs-breathe { 50% { opacity: .78; } }
.svs-noscript { position: absolute; left: 16px; right: 16px; bottom: 40px; z-index: 60; padding: 16px; border-radius: 14px; background: #fff; color: #17191d; text-align: center; }

/* The SVS logo (red and black artwork), shown white on the red bars. */
.svs-logo { display: block; width: auto; height: 34px; filter: brightness(0) invert(1); }
.svs-splash-mark .svs-logo { height: 46px; }

/* ================================================================ shell */

.svs-stage { position: relative; overflow: hidden; grid-column: 1; grid-row: 1; background: var(--bg); }
.svs-rail { display: none; }
.svs-tabbar {
	grid-row: 2; display: grid; grid-template-columns: repeat(4, 1fr); z-index: 10;
	padding: 4px 6px calc(4px + var(--safe-b));
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	-webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
	border-top: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .svs-tabbar { background: var(--surface); } }
.svs-tab {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	min-height: 52px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .01em; border-radius: 12px;
}
.svs-tab i { font-size: 19px; transition: transform .2s; }
.svs-tab.is-on { color: var(--red-ink); }
.svs-tab.is-on i { transform: translateY(-1px) scale(1.06); }
.svs-tab:active i { transform: scale(.9); }

/* ================================================================ screens */

.svs-screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.svs-bar {
	flex: none; position: relative; z-index: 3; color: #fff;
	background: linear-gradient(180deg, var(--bar) 0%, var(--bar-2) 100%);
	padding-top: var(--safe-t);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.svs-bar-row { height: var(--bar-h); display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; padding: 0 6px; }
.svs-bar-actions { display: flex; align-items: center; justify-content: flex-end; min-width: 50px; gap: 2px; }
.svs-bar-spacer { width: 44px; }
.svs-bar-title { min-width: 0; text-align: center; font-weight: 650; font-size: 16.5px; letter-spacing: .005em; }
.svs-bar-title > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: opacity .2s, transform .2s; }
.has-big-title .svs-bar-title > span { opacity: 0; transform: translateY(4px); }
.has-big-title.is-scrolled .svs-bar-title > span { opacity: 1; transform: none; }
.is-home .svs-bar-title { display: flex; justify-content: center; }
.is-home .svs-bar-title .svs-logo { height: 30px; }
.svs-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; outline: none; }
.svs-content { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }
.svs-content.is-wide { max-width: 1100px; }

.svs-icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px;
	background: transparent; color: var(--ink-2); font-size: 18px; cursor: pointer; transition: background .15s, transform .1s;
}
.svs-icon-btn:hover { background: var(--surface-3); }
.svs-icon-btn:active { transform: scale(.92); }
.svs-icon-btn.is-light { color: #fff; }
.svs-icon-btn.is-light:hover { background: rgba(255, 255, 255, .14); }
.svs-bar-back { font-size: 20px; }

/* Screen transitions (like a native stack). */
.svs-screen.is-entering { z-index: 2; }
.enter-push { animation: svs-push-in .38s cubic-bezier(.2, .8, .2, 1) both; box-shadow: -12px 0 30px rgba(0, 0, 0, .12); }
.leave-push { animation: svs-push-out .38s cubic-bezier(.2, .8, .2, 1) both; }
.enter-pop { animation: svs-pop-in .34s cubic-bezier(.2, .8, .2, 1) both; }
.leave-pop { z-index: 3; animation: svs-pop-out .34s cubic-bezier(.2, .8, .2, 1) both; box-shadow: -12px 0 30px rgba(0, 0, 0, .12); }
.enter-fade { animation: svs-fade-in .22s ease-out both; }
.leave-fade { animation: svs-fade-out .18s ease-in both; }
@keyframes svs-push-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes svs-push-out { to { transform: translateX(-26%); filter: brightness(.94); } }
@keyframes svs-pop-in { from { transform: translateX(-26%); filter: brightness(.94); } to { transform: none; filter: none; } }
@keyframes svs-pop-out { to { transform: translateX(100%); } }
@keyframes svs-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes svs-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	.enter-push, .leave-push, .enter-pop, .leave-pop, .enter-fade, .leave-fade { animation: none; }
	.svs-splash-mark { animation: none; }
}

/* ================================================================ common */

.svs-page-head { margin: 6px 2px 18px; }
.svs-page-title { margin: 6px 0 6px; font-size: 27px; line-height: 1.16; font-weight: 750; letter-spacing: -.015em; text-wrap: balance; }
.svs-page-sub { margin: 0; color: var(--muted); font-size: 15px; }
.svs-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.svs-crumbs a { color: var(--red-ink); }
.svs-crumb-sep { font-size: 9px; opacity: .6; }
.svs-muted { color: var(--muted); }
.svs-small { font-size: 13px; }
.svs-link { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--red-ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.svs-link i { font-size: 11px; }
.svs-chev { color: var(--muted); font-size: 13px; opacity: .7; }
.svs-count {
	display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 99px;
	background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.svs-section { margin: 26px 0; }
.svs-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.svs-section-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.01em; }

.svs-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 18px; margin: 16px 0; border: 1px solid var(--line-2); }
.svs-card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.svs-card-title i { color: var(--red-ink); }
.svs-card > p { margin: 0 0 10px; }

.svs-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
	border: 1px solid transparent; border-radius: 12px; background: var(--red); color: #fff; font-weight: 650; font-size: 15px;
	cursor: pointer; transition: transform .1s, background .15s, opacity .15s; text-decoration: none; white-space: nowrap;
}
:root[data-theme="dark"] .svs-btn:not(.is-ghost) { background: #c7262c; }
.svs-btn:hover { background: var(--red-2); }
.svs-btn:active { transform: scale(.97); }
.svs-btn:disabled { opacity: .45; cursor: default; transform: none; }
.svs-btn.is-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-1); }
.svs-btn.is-ghost:hover { background: var(--surface-2); }
.svs-btn.is-ghost i { color: var(--red-ink); }
.svs-btn.is-small { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.svs-btn.is-block { display: flex; width: 100%; margin-top: 14px; }
.svs-btn.is-light { background: #fff; color: var(--bar); }
.svs-action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.svs-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 650; }
.svs-pill.is-ok { background: var(--s1-bg); color: var(--s1); }

.svs-seg { display: flex; gap: 4px; padding: 4px; margin: 0 0 18px; border-radius: 14px; background: var(--surface-3); overflow-x: auto; scrollbar-width: none; }
.svs-seg::-webkit-scrollbar { display: none; }
.svs-seg > a, .svs-seg > button {
	flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px;
	border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.svs-seg > .is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.svs-seg .svs-count { height: 19px; min-width: 22px; font-size: 11.5px; background: var(--surface-3); }
.svs-seg.is-full { margin: 0 0 16px; }

.svs-empty { text-align: center; padding: 46px 20px; }
.svs-empty-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--red-soft); color: var(--red-ink); font-size: 30px; margin-bottom: 14px; }
.svs-empty-title { font-size: 19px; font-weight: 750; margin-bottom: 6px; }
.svs-empty-text { margin: 0 auto 18px; max-width: 360px; color: var(--muted); }

/* Abbreviation tiles: AAA, CLTI, DF... */
.svs-abbr {
	flex: none; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
	font-size: 12.5px; font-weight: 800; letter-spacing: .02em; background: var(--arterial-bg); color: var(--arterial);
}
.svs-abbr.is-venous { background: var(--venous-bg); color: var(--venous); }
.svs-abbr.is-big { width: 58px; height: 58px; border-radius: 16px; font-size: 15px; }
.svs-abbr.is-small { width: 36px; height: 36px; border-radius: 10px; font-size: 10.5px; }
.svs-cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--arterial); }
.svs-cat-dot.is-venous { background: var(--venous); }

/* Evidence badges */
.svs-grade, .svs-quality {
	display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 4px; border-radius: 8px;
	font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.svs-grade { background: var(--surface-3); color: var(--ink-2); }
.svs-grade-k { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 3px; border-radius: 5px; background: var(--tone, var(--ink-2)); }
.svs-grade-k, .svs-grade-k i { color: var(--surface); font-size: 11.5px; font-weight: 800; }
.svs-grade.is-s1 { background: var(--s1-bg); color: var(--s1); }
.svs-grade.is-s2 { background: var(--s2-bg); color: var(--s2); }
.svs-grade.is-sgps { background: var(--sg-bg); color: var(--sg); }
.svs-quality { padding: 0 9px; background: var(--surface-3); color: var(--ink-2); }
.svs-quality > i { color: var(--q0); }
.svs-meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.svs-meter i { display: block; width: 4px; border-radius: 1.5px; background: var(--q0); opacity: .45; }
.svs-meter i:nth-child(1) { height: 6px; } .svs-meter i:nth-child(2) { height: 9.5px; } .svs-meter i:nth-child(3) { height: 13px; }
.svs-meter i.on { opacity: 1; }
.is-qA .svs-meter i.on { background: var(--qA); }
.is-qB .svs-meter i.on { background: var(--qB); }
.is-qC .svs-meter i.on { background: var(--qC); }
.svs-meter.is-big { height: 22px; gap: 3px; }
.svs-meter.is-big i { width: 7px; border-radius: 2px; }
.svs-meter.is-big i:nth-child(1) { height: 9px; } .svs-meter.is-big i:nth-child(2) { height: 15px; } .svs-meter.is-big i:nth-child(3) { height: 22px; }

/* Recommendation cards */
.svs-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.svs-cards > *, .svs-num-item > * { min-width: 0; }
.svs-rec-card {
	display: block; position: relative; padding: 15px 16px 14px; border-radius: var(--r); background: var(--surface);
	box-shadow: var(--shadow-2); border: 1px solid var(--line-2); color: var(--ink); transition: transform .12s, box-shadow .2s;
}
.svs-rec-card:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 12px 30px rgba(31, 20, 12, .1); }
.svs-rec-card:active { transform: scale(.99); }
.svs-rec-card > span { display: block; }
.svs-rec-card-top { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.svs-rec-card-where { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.svs-rec-card-where b { color: var(--red-ink); }
.svs-saved-dot { color: var(--red-ink); font-size: 13px; }
.svs-rec-card-title { font-size: 16.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; margin-bottom: 5px; }
.svs-rec-card-text { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.svs-rec-card-foot { display: flex !important; flex-wrap: wrap; gap: 6px; margin-top: 11px; }

.svs-cards.is-numbered { gap: 12px; }
.svs-num-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: start; }
.svs-num { margin-top: 15px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Lists (guidelines, tools, topics) */
.svs-list { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-2); border: 1px solid var(--line-2); overflow: hidden; }
.svs-list-group { margin: 0 0 22px; }
.svs-list-group-title { display: flex; align-items: center; gap: 9px; margin: 0 4px 10px; font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.svs-g-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); border-top: 1px solid var(--line-2); transition: background .15s; }
.svs-g-row:first-child { border-top: 0; }
.svs-g-row:hover { background: var(--surface-2); }
.svs-g-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.svs-g-row-title { font-weight: 680; font-size: 16px; line-height: 1.3; }
.svs-g-row-meta { color: var(--muted); font-size: 13.5px; }

/* ================================================================== home */

.is-home-screen .svs-content { max-width: none; padding: 0 0 40px; }
.is-home-screen .svs-content > :not(.svs-hero) { max-width: 1040px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.is-home-screen .svs-content > .svs-banner, .is-home-screen .svs-content > .svs-install-card { width: calc(100% - 32px); max-width: 1008px; margin-left: auto; margin-right: auto; }
.is-home-screen .svs-content > .svs-install-card { padding: 12px 8px 12px 12px; }
.is-home-screen .svs-content > .svs-banner { padding: 0; }
.svs-hero {
	position: relative; overflow: hidden; color: #fff;
	background: radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, var(--bar-2) 0%, #7a0f14 100%);
	border-radius: 0 0 28px 28px;
}
:root[data-theme="dark"] .svs-hero { background: radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, var(--bar-2) 0%, #2f0608 100%); }
.svs-vessels { position: absolute; right: -20px; bottom: -10px; width: 70%; max-width: 560px; height: 100%; color: #fff; opacity: .14; pointer-events: none; }
.svs-hero-inner { position: relative; max-width: 1040px; margin: 0 auto; padding: 18px 20px 24px; }
.svs-hero-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .78; }
.svs-hero-title { margin: 0 0 8px; font-size: 32px; line-height: 1.08; font-weight: 780; letter-spacing: -.022em; max-width: 14ch; }
.svs-hero-lede { margin: 0 0 18px; max-width: 46ch; opacity: .86; font-size: 15px; line-height: 1.45; }
.svs-hero-search {
	display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; border-radius: 16px; max-width: 620px;
	background: #fff; color: #5b616b; font-size: 16px; box-shadow: 0 10px 30px rgba(40, 0, 0, .28); transition: transform .12s;
}
:root[data-theme="dark"] .svs-hero-search { background: #22262c; color: #a3aab4; }
.svs-hero-search:active { transform: scale(.99); }
.svs-hero-search i { color: var(--red-ink); font-size: 17px; }
.svs-hero-search span { flex: 1; }
.svs-hero-search kbd { font: 600 12px/1 var(--font); padding: 4px 7px; border-radius: 6px; border: 1px solid #d9d4cd; color: #8a9099; }
.svs-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; max-width: 620px; }
.svs-hero-stats a {
	display: flex; flex-direction: column; gap: 2px; padding: 11px 12px; border-radius: 14px; color: #fff;
	background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); transition: background .15s;
}
.svs-hero-stats a:hover { background: rgba(255, 255, 255, .16); }
.svs-hero-stats b { font-size: 22px; font-weight: 780; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.svs-hero-stats span { font-size: 12px; opacity: .82; font-weight: 600; }

.svs-install-card {
	display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 8px 12px 12px; border-radius: var(--r);
	background: var(--surface); box-shadow: var(--shadow-2); border: 1px solid var(--line-2);
}
.svs-install-icon img { display: block; width: 44px; height: 44px; border-radius: 11px; }
.svs-install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--muted); }
.svs-install-text b { color: var(--ink); font-size: 15px; }

.svs-tool-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.svs-tool-tile {
	position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); color: var(--ink);
	background: var(--surface); box-shadow: var(--shadow-2); border: 1px solid var(--line-2); overflow: hidden; transition: transform .12s;
}
.svs-tool-tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--red-soft); }
.svs-tool-tile:active { transform: scale(.98); }
.svs-tool-tile-icon { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--red); color: #fff; font-size: 16px; }
.svs-tool-tile-name { position: relative; z-index: 1; font-size: 17px; font-weight: 750; margin-top: 4px; }
.svs-tool-tile-note { color: var(--muted); font-size: 13px; line-height: 1.4; }

.svs-cat { margin-bottom: 18px; }
.svs-cat-title { display: flex; align-items: center; gap: 9px; margin: 0 2px 10px; font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.svs-g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.svs-g-card {
	display: flex; flex-direction: column; gap: 10px; padding: 15px; border-radius: var(--r); background: var(--surface); color: var(--ink);
	box-shadow: var(--shadow-2); border: 1px solid var(--line-2); transition: transform .12s, box-shadow .2s;
}
.svs-g-card:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 12px 30px rgba(31, 20, 12, .1); }
.svs-g-card:active { transform: scale(.98); }
.svs-g-card .svs-abbr { width: 40px; height: 40px; border-radius: 11px; font-size: 11.5px; }
.svs-g-card-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; flex: 1; }
.svs-g-card-meta { display: flex; gap: 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; }

.svs-fig-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.svs-fig-tile { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.svs-fig-thumb { display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: #fff; box-shadow: var(--shadow-2); border: 1px solid var(--line-2); }
.svs-fig-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.svs-fig-title { font-weight: 650; font-size: 14px; color: var(--ink); line-height: 1.3; padding: 0 2px; }

.svs-banner { display: block; margin-top: 22px; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-2); }
.svs-banner img { display: block; width: 100%; height: auto; }
.svs-foot { margin-top: 26px; text-align: center; color: var(--muted); font-size: 13px; }
.svs-foot p { margin: 4px 0; }

/* ============================================================ guideline */

.svs-g-head { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.svs-g-head .svs-page-title { margin: 0; }
.svs-meta-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; color: var(--muted); font-size: 14px; font-weight: 600; }
.svs-meta-row i { color: var(--red-ink); margin-right: 3px; }

.svs-profile { margin-top: 14px; }
.svs-profile:first-of-type { margin-top: 0; }
.svs-profile-head { font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.svs-profile-bar { display: flex; gap: 3px; height: 12px; border-radius: 6px; overflow: hidden; }
.svs-profile-bar span { min-width: 6px; }
.is-s1 { --tone: var(--s1); } .is-s2 { --tone: var(--s2); } .is-sgps { --tone: var(--sg); }
.is-qA { --tone: var(--qA); } .is-qB { --tone: var(--qB); } .is-qC { --tone: var(--qC); } .is-qungraded, .is-none { --tone: var(--q0); }
.svs-profile-bar span, .svs-profile-legend i { background: var(--tone, var(--q0)); }
.svs-profile-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; font-size: 13px; }
.svs-profile-legend a, .svs-profile-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.svs-profile-legend a:hover { color: var(--red-ink); }
.svs-profile-legend i { width: 9px; height: 9px; border-radius: 3px; }
.svs-profile-legend b { color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }

.svs-topics { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-2); border: 1px solid var(--line-2); overflow: hidden; }
.svs-topics li + li { border-top: 1px solid var(--line-2); }
.svs-topics a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); transition: background .15s; }
.svs-topics a:hover { background: var(--surface-2); }
.svs-topic-n { flex: none; width: 28px; color: var(--red-ink); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.svs-topic-title { flex: 1; min-width: 0; font-weight: 620; line-height: 1.35; }

.svs-cite p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.svs-cite .svs-action-row { margin-top: 8px; }

.svs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 6px; }
.svs-pager-link { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); color: var(--ink); min-width: 0; }
.svs-pager-link span { font-size: 12.5px; font-weight: 700; color: var(--red-ink); text-transform: uppercase; letter-spacing: .05em; }
.svs-pager-link b { font-size: 14.5px; font-weight: 640; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svs-pager-link.is-next { text-align: right; }
.svs-pager-pos { text-align: center; color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }

/* ======================================================= recommendation */

.svs-grades { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
.svs-grade-tile { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); }
.svs-grade-tile-k {
	flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
	background: var(--tone, var(--q0)); color: var(--surface); font-size: 21px; font-weight: 800;
}
.svs-grade-tile-meter { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); color: var(--q0); font-size: 20px; }
.svs-grade-tile-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.svs-grade-tile-main b { font-size: 16px; font-weight: 750; color: var(--tone, var(--ink)); }
.svs-grade-tile-main span { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.25; }

.svs-rec-text {
	font-family: var(--serif); font-size: calc(19px * var(--svs-read-scale)); line-height: 1.62; color: var(--ink);
	background: var(--surface); border-radius: var(--r); padding: 20px 20px 18px; border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
	border-left: 4px solid var(--red); overflow-wrap: break-word;
}
.svs-rec-text p { margin: 0 0 .75em; }
.svs-rec-text > :last-child { margin-bottom: 0; }
.svs-rec-text ul, .svs-rec-text ol { margin: 0 0 .75em; padding-left: 1.3em; }
.svs-rec-text li { margin: .25em 0; }
.svs-rec-text img { display: block; height: auto !important; margin: 10px 0; border-radius: 10px; background: #fff; cursor: zoom-in; border: 1px solid var(--line); }
.svs-rec-text table, .svs-rich table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-family: var(--font); font-size: .82em; line-height: 1.4; }
.svs-rec-text td, .svs-rec-text th, .svs-rich td, .svs-rich th { border: 1px solid var(--line); padding: 7px 9px; vertical-align: top; text-align: left; }
.svs-rec-text.is-sample { margin: 12px 0 0; padding: 14px 16px; box-shadow: none; }
.svs-action-row.is-rec-actions { margin: 14px 0 0; }
.svs-action-row.is-rec-actions .svs-btn { flex: 1; }

/* ================================================================ search */

.is-search .svs-bar-row { height: 48px; }
.is-search .svs-bar-title > span { font-size: 15px; opacity: .9; }
.svs-searchbar {
	display: flex; align-items: center; gap: 10px; margin: 0 12px 12px; height: 46px; padding: 0 6px 0 14px; border-radius: 14px;
	background: #fff; color: #5b616b; box-shadow: 0 6px 18px rgba(40, 0, 0, .22);
}
:root[data-theme="dark"] .svs-searchbar { background: #22262c; color: #a3aab4; }
.svs-searchbar > i { color: var(--red-ink); }
.svs-searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 16px var(--font); }
:root:not([data-theme="dark"]) .svs-searchbar input { color: #17191d; }
.svs-searchbar input::-webkit-search-cancel-button { display: none; }
.svs-searchbar-clear { width: 36px; height: 36px; border: 0; background: none; color: #9aa0a9; font-size: 17px; cursor: pointer; border-radius: 10px; }
.svs-filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.svs-filters::-webkit-scrollbar { display: none; }
.svs-filters-sep { flex: none; width: 1px; background: var(--line); margin: 6px 2px; }
.svs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.svs-chip {
	flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 99px;
	border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
	transition: background .15s, color .15s, border-color .15s;
}
.svs-chip i { font-size: 12px; color: var(--muted); }
.svs-chip:hover { border-color: var(--muted); }
.svs-chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.svs-chip.is-on i { color: inherit; }
.svs-chip.is-s1.is-on, .svs-chip.is-s2.is-on, .svs-chip.is-sgps.is-on, .svs-chip.is-qA.is-on, .svs-chip.is-qB.is-on, .svs-chip.is-qC.is-on, .svs-chip.is-qungraded.is-on { background: var(--tone); border-color: var(--tone); color: var(--surface); }
.svs-results-head { margin: 4px 2px 12px; color: var(--muted); font-size: 14px; font-weight: 600; }
.svs-results-head b { color: var(--ink); }
.svs-quick { display: grid; gap: 10px; }
.svs-quick-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1); text-align: left; cursor: pointer; font-weight: 620; }
.svs-quick-item:hover { background: var(--surface-2); }

.svs-pick { display: grid; gap: 2px; }
.svs-pick-item { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; font-weight: 600; }
.svs-pick-item:hover { background: var(--surface-3); }
.svs-pick-item > span:not(.svs-abbr) { flex: 1; }
.svs-pick-item > i:first-child { width: 36px; text-align: center; color: var(--red-ink); }
.svs-pick-item.is-on { background: var(--red-soft); }
.svs-pick-item > i:last-child { color: var(--red-ink); }

/* ================================================================= saved */

.svs-saved-item { position: relative; transition: opacity .2s, transform .2s; }
.svs-saved-item.is-removing { opacity: 0; transform: translateX(30px); }
.svs-saved-item .svs-rec-card { padding-right: 48px; }
.svs-saved-remove { position: absolute; top: 6px; right: 4px; width: 38px; height: 38px; color: var(--muted); }
.svs-saved-item .svs-saved-dot { display: none; }
.svs-history { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-2); border: 1px solid var(--line-2); overflow: hidden; }
.svs-history-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); border-top: 1px solid var(--line-2); }
.svs-history-item:first-child { border-top: 0; }
.svs-history-item:hover { background: var(--surface-2); }
.svs-history-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.svs-history-main b { font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.svs-history-main span { color: var(--muted); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.svs-history-when { flex: none; color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* ============================================================ algorithms */

.svs-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.svs-fig { margin: 0; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid var(--line-2); }
.svs-fig-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.svs-fig-open img { display: block; width: 100%; height: 240px; object-fit: contain; padding: 10px; }
.svs-fig-zoom { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(23, 25, 29, .72); color: #fff; font-size: 14px; }
.svs-fig figcaption { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; border-top: 1px solid var(--line-2); }
.svs-fig figcaption b { font-size: 15.5px; }
.svs-fig figcaption span { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }

/* ================================================================= about */

.svs-about-hero { display: flex; align-items: center; gap: 16px; margin: 8px 2px 8px; }
.svs-about-hero img { border-radius: 18px; box-shadow: var(--shadow-2); }
.svs-about-hero h1 { margin: 0 0 2px; font-size: 24px; }
.svs-about-hero p { margin: 0; }
.svs-setting label { display: block; font-weight: 650; margin-bottom: 8px; }
.svs-scale-row { display: flex; align-items: center; gap: 12px; }
.svs-scale-row input { flex: 1; accent-color: var(--red); }
.svs-scale-a { font-family: var(--serif); color: var(--muted); font-weight: 700; }
.svs-scale-a.is-small { font-size: 14px; } .svs-scale-a.is-big { font-size: 22px; }
.svs-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.svs-legend h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.svs-legend-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }

/* ================================================================= tools */

.svs-group-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--red-soft); color: var(--red-ink); font-size: 14px; }
.svs-group-icon.is-venous { background: var(--venous-bg); color: var(--venous); }
.svs-group-icon.is-aortic { background: var(--sg-bg); color: var(--sg); }
.svs-group-icon.is-fig { background: var(--s1-bg); color: var(--s1); }
.svs-tool-card, .svs-algo-card { display: flex; align-items: center; gap: 14px; padding: 15px 16px; color: var(--ink); border-top: 1px solid var(--line-2); transition: background .15s; }
.svs-tool-card:first-child { border-top: 0; }
.svs-tool-card:hover, .svs-algo-card:hover { background: var(--surface-2); }
.svs-tool-card-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--red); color: #fff; font-size: 18px; }
.svs-tool-card-icon.is-venous { background: var(--venous); }
.svs-tool-card-icon.is-aortic { background: var(--sg); }
:root[data-theme="dark"] .svs-tool-card-icon { color: var(--surface); }
.svs-tool-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.svs-tool-card-main b { font-size: 16.5px; font-weight: 720; }
.svs-tool-card-title { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.svs-tool-card-note { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.svs-algo-card { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-2); }
.svs-algo-thumbs { flex: none; display: flex; }
.svs-algo-thumbs img { width: 42px; height: 52px; object-fit: cover; object-position: top; border-radius: 8px; border: 2px solid var(--surface); background: #fff; box-shadow: var(--shadow-1); }
.svs-algo-thumbs img + img { margin-left: -18px; }

.svs-offline-note { display: none; align-items: center; gap: 10px; padding: 11px 14px; margin: 0 0 16px; border-radius: 12px; background: var(--s2-bg); color: var(--s2); font-size: 14px; font-weight: 600; }
.is-offline .svs-offline-note { display: flex; }

/* ============================================================ calculator */

.is-calc .svs-content { padding-bottom: 0; }
.svs-about-model { padding: 0; }
.svs-about-model summary { display: flex; align-items: center; gap: 10px; padding: 15px 18px; cursor: pointer; font-weight: 680; list-style: none; }
.svs-about-model summary::-webkit-details-marker { display: none; }
.svs-about-model summary > i:first-child { color: var(--red-ink); }
.svs-about-model summary .svs-chev { margin-left: auto; transition: transform .2s; }
.svs-about-model[open] summary .svs-chev { transform: rotate(180deg); }
.svs-about-model .svs-rich { padding: 0 18px 16px; font-size: 14.5px; color: var(--ink-2); }
.svs-rich { overflow-wrap: break-word; }
.svs-rich p { margin: 0 0 .7em; }
.svs-rich ul, .svs-rich ol { margin: 0 0 .7em; padding-left: 1.3em; }

.svs-calc-section { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-2); border: 1px solid var(--line-2); margin: 0 0 16px; overflow: hidden; }
.svs-calc-section-title { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px; font-size: 16px; font-weight: 750; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.svs-calc-step { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 800; transition: background .2s; }
.svs-calc-section.is-done .svs-calc-step { background: var(--s1); }
.svs-calc-section-count { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.svs-field { padding: 15px 16px 16px; border-top: 1px solid var(--line-2); }
.svs-calc-section-title + .svs-field { border-top: 0; }
.svs-field-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.svs-field-label { font-weight: 680; font-size: 15.5px; line-height: 1.35; }
.svs-field-state { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: transparent; font-size: 11px; transition: background .2s, color .2s; }
.svs-field.is-done .svs-field-state { background: var(--s1); color: var(--surface); }
.svs-field-hint { margin: -4px 0 10px; color: var(--muted); font-size: 13.5px; }
.svs-field-note { margin-top: 8px; color: var(--s2); font-size: 13px; font-weight: 600; }
.svs-field-info {
	margin-top: 10px; padding: 11px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2);
	color: var(--ink-2); font-size: 14px; line-height: 1.5; animation: svs-fade-in .2s ease-out;
}
.svs-field-info p { margin: 0 0 .5em; } .svs-field-info > :last-child { margin-bottom: 0; }
.svs-field-info ul { margin: .3em 0; padding-left: 1.2em; }
.svs-opt-group + .svs-opt-group { margin-top: 12px; }
.svs-opt-group-label { margin: 0 0 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.svs-opts { display: grid; gap: 7px; }
.svs-opts.is-seg { grid-auto-flow: column; grid-auto-columns: 1fr; }
.svs-opt {
	display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 10px 13px; border-radius: 12px; text-align: left;
	border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 560; line-height: 1.3; cursor: pointer;
	transition: border-color .15s, background .15s, transform .08s;
}
.svs-opt:hover:not(:disabled) { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.svs-opt:active:not(:disabled) { transform: scale(.985); }
.svs-opt-mark { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.svs-opt[role="checkbox"] .svs-opt-mark { border-radius: 6px; }
.svs-opt-label { flex: 1; }
.svs-opt-i { color: var(--muted); font-size: 13px; }
.svs-opt.is-on { border-color: var(--red); background: var(--red-soft); font-weight: 650; }
.svs-opt.is-on .svs-opt-mark { border-color: var(--red); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 10px var(--red); }
.svs-opt[role="checkbox"].is-on .svs-opt-mark { box-shadow: none; background: var(--red); }
.svs-opt[role="checkbox"].is-on .svs-opt-mark::after { content: "\f00c"; font: 900 11px/16px "Font Awesome 6 Pro"; color: #fff; display: block; text-align: center; }
.svs-opt:disabled { opacity: .4; cursor: not-allowed; }
.svs-opts.is-seg .svs-opt { justify-content: center; text-align: center; padding: 10px 8px; }
.svs-opts.is-seg .svs-opt-mark { display: none; }
.svs-input { width: 100%; height: 46px; padding: 0 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 16px var(--font); }

.svs-result {
	position: relative; margin: 6px 0 16px; padding: 18px; border-radius: var(--r-l); color: var(--ink);
	background: var(--surface); border: 2px solid var(--red); box-shadow: 0 14px 40px rgba(163, 21, 26, .16);
	animation: svs-fade-in .3s ease-out; scroll-margin-top: 12px;
}
.svs-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.svs-result-head.is-error { justify-content: flex-start; margin: 0; color: var(--qC); font-weight: 650; }
.svs-result-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.svs-result-when { color: var(--muted); font-size: 13px; font-weight: 600; }
.svs-result-body { font-size: 16px; line-height: 1.55; }
.svs-result-body hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
/* MR/Claude 11/5/2026: risk banners in calculator results (svs-calc.js marks them). */
.svs-risk { display: block; text-align: center; padding: 9px 12px; margin: 0 0 6px; border-radius: 12px; font-weight: 800; letter-spacing: .08em; }
.svs-risk.is-low { background: var(--s1-bg); color: var(--s1); }
.svs-risk.is-medium, .svs-risk.is-moderate { background: var(--s2-bg); color: var(--s2); }
.svs-risk.is-high { background: rgba(194, 65, 12, .14); color: var(--qC); }
.svs-risk strong, .svs-risk b { color: inherit !important; }
.svs-result-body table { font-size: 14.5px; }
.svs-result-body strong, .svs-result-body b { color: var(--ink); }
.svs-result-score { display: flex; align-items: baseline; gap: 10px; }
.svs-result-score b { font-size: 46px; line-height: 1; font-weight: 800; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.svs-result-score span { color: var(--muted); font-weight: 650; }
.svs-result-stale { display: none; align-items: center; gap: 8px; margin-top: 10px; color: var(--s2); font-size: 13.5px; font-weight: 650; }
.svs-result.is-stale .svs-result-body, .svs-result.is-stale .svs-result-score { opacity: .45; filter: grayscale(.5); transition: opacity .2s; }
.svs-result.is-stale .svs-result-stale { display: flex; }

.svs-calc-foot {
	position: sticky; bottom: 0; z-index: 4; margin: 18px -16px 0; padding: 0 16px calc(12px + var(--safe-b) * 0);
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	-webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
	border-top: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .svs-calc-foot { background: var(--bg); } }
.svs-calc-progress { height: 3px; margin: 0 -16px; background: var(--line-2); }
.svs-calc-progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s ease; }
.svs-calc-foot-row { display: flex; align-items: center; gap: 12px; padding-top: 11px; max-width: 760px; margin: 0 auto; }
.svs-calc-status { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.svs-calc-status.is-error { color: var(--qC); }
.svs-calc-go { min-width: 150px; }
.svs-calc-go.is-busy i { animation: svs-spin .8s linear infinite; }
@keyframes svs-spin { to { transform: rotate(360deg); } }

/* ============================================================ toast/sheet */

.svs-toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.svs-toast {
	pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; padding: 11px 12px 11px 16px; border-radius: 14px;
	background: #1d2025; color: #fff; box-shadow: var(--shadow-3); font-size: 14.5px; font-weight: 550;
	opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .25s, transform .25s;
}
:root[data-theme="dark"] .svs-toast { background: #eef0f3; color: #17191d; }
.svs-toast.is-in { opacity: 1; transform: none; }
.svs-toast-msg { display: flex; align-items: center; gap: 9px; }
.svs-toast.is-ok .svs-toast-msg i { color: #45d19a; }
:root[data-theme="dark"] .svs-toast.is-ok .svs-toast-msg i { color: #0d7350; }
.svs-toast-btn { border: 0; background: rgba(255, 255, 255, .14); color: inherit; font-weight: 750; padding: 7px 12px; border-radius: 9px; cursor: pointer; }
:root[data-theme="dark"] .svs-toast-btn { background: rgba(0, 0, 0, .08); }

.svs-sheet-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.svs-sheet-backdrop { position: absolute; inset: 0; background: rgba(12, 8, 6, .45); opacity: 0; transition: opacity .25s; }
.svs-sheet {
	position: relative; width: 100%; max-width: 560px; max-height: 86vh; display: flex; flex-direction: column;
	background: var(--surface); color: var(--ink); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-3);
	padding-bottom: var(--safe-b); transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.svs-sheet-wrap.is-in .svs-sheet-backdrop { opacity: 1; }
.svs-sheet-wrap.is-in .svs-sheet { transform: none; }
.svs-sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.svs-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 6px 20px; }
.svs-sheet-title { margin: 0; font-size: 18px; font-weight: 750; }
.svs-sheet-body { overflow-y: auto; padding: 4px 16px 20px; }
@media (min-width: 700px) {
	.svs-sheet-wrap { align-items: center; }
	.svs-sheet { border-radius: 22px; transform: translateY(24px) scale(.98); opacity: 0; transition: transform .25s, opacity .25s; }
	.svs-sheet-wrap.is-in .svs-sheet { opacity: 1; }
	.svs-sheet-grip { display: none; }
}
/* Add to Home Screen prompt (svs-core.js SVS.pwa.offer), above the tab bar; bottom right on desktop. */
.svs-install-pop {
	position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 18px); z-index: 70; max-width: 460px; margin: 0 auto;
	padding: 16px 16px 14px; border-radius: 22px; background: var(--surface); color: var(--ink);
	box-shadow: var(--shadow-3); border: 1px solid var(--line);
	opacity: 0; transform: translateY(24px); transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.svs-install-pop.is-in { opacity: 1; transform: none; }
.svs-install-pop-x { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; color: var(--muted); }
.svs-install-pop-head { display: flex; align-items: center; gap: 13px; padding-right: 30px; }
.svs-install-pop-head img { flex: none; border-radius: 13px; box-shadow: var(--shadow-1); }
.svs-install-pop-head div { display: flex; flex-direction: column; gap: 3px; }
.svs-install-pop-head b { font-size: 16.5px; line-height: 1.25; }
.svs-install-pop-head span { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.svs-install-pop .svs-steps { margin: 14px 0 4px; gap: 10px; font-size: 14.5px; }
.svs-install-pop .svs-step-n { width: 26px; height: 26px; font-size: 13px; }
.svs-install-pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.svs-install-pop-arrow {
	position: absolute; left: 50%; bottom: -46px; transform: translateX(-50%); display: grid; place-items: center; width: 34px; height: 34px;
	border-radius: 50%; background: var(--red); color: #fff; font-size: 15px; box-shadow: var(--shadow-2); animation: svs-nudge 1.4s ease-in-out infinite;
}
@keyframes svs-nudge { 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .svs-install-pop-arrow { animation: none; } }
@media (min-width: 960px) {
	.svs-install-pop { left: auto; right: 24px; bottom: 24px; width: 400px; margin: 0; }
}

.svs-steps { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 12px; }
.svs-steps li { display: flex; align-items: center; gap: 12px; }
.svs-step-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red-soft); color: var(--red-ink); font-weight: 800; }
.svs-steps i { color: var(--red-ink); margin-left: 4px; }
.svs-note { color: var(--muted); font-size: 14px; margin: 0; }

.svs-viewer { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; background: rgba(8, 8, 10, .96); color: #fff; opacity: 0; transition: opacity .22s; }
.svs-viewer.is-in { opacity: 1; }
.svs-viewer-top { display: flex; align-items: center; gap: 4px; padding: calc(6px + var(--safe-t)) 8px 6px 18px; }
.svs-viewer-title { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.svs-viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; padding: 8px; }
.svs-viewer-stage img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 6px; transform-origin: center; user-select: none; -webkit-user-select: none; }
.svs-viewer-stage img.is-anim { transition: transform .2s ease; }
.svs-viewer-caption { max-height: 26vh; overflow-y: auto; padding: 12px 18px calc(16px + var(--safe-b)); color: rgba(255, 255, 255, .82); font-size: 14px; line-height: 1.5; border-top: 1px solid rgba(255, 255, 255, .1); }

/* MR/Claude 11/5/2026: in-app document viewer (calculator guides, svs-core.js ui.doc). */
.svs-doc { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; background: var(--surface-3); opacity: 0; transform: translateY(18px); transition: opacity .22s, transform .3s cubic-bezier(.2, .8, .2, 1); }
.svs-doc.is-in { opacity: 1; transform: none; }
.svs-doc-bar { flex: none; display: flex; align-items: center; gap: 2px; padding: calc(6px + var(--safe-t)) 6px 6px; color: #fff; background: linear-gradient(180deg, var(--bar) 0%, var(--bar-2) 100%); box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.svs-doc-bar .svs-icon-btn:disabled { opacity: .4; cursor: default; }
.svs-doc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 0 6px; }
.svs-doc-title b { font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.svs-doc-pos { font-size: 12.5px; opacity: .8; min-height: 15px; }
.svs-doc-stage { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; outline: none; }
.svs-doc-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 12px calc(28px + var(--safe-b)); min-width: min-content; }
.svs-doc-page { background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 8px 24px rgba(0, 0, 0, .1); overflow: hidden; }
.svs-doc-page canvas { display: block; }
:root[data-theme="dark"] .svs-doc { background: #0b0c0f; }
.svs-doc-wait { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 20px; color: var(--muted); font-weight: 600; text-align: center; max-width: 360px; }
.svs-doc-wait > i { font-size: 26px; color: var(--red-ink); }
.svs-doc-wait.is-error > i { color: var(--qC); }

/* ================================================================= fatal */

.svs-fatal { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 80% at 80% 0%, #c21d23 0%, #a3151a 45%, #6e0b10 100%); }
.svs-fatal-card { max-width: 380px; text-align: center; color: #fff; }
.svs-fatal-card h1 { font-size: 22px; margin: 26px 0 8px; }
.svs-fatal-card p { opacity: .86; margin: 0 0 22px; }

/* ============================================================ responsive */

.svs-hide-narrow { display: none; }
@media (min-width: 700px) {
	.svs-hide-narrow { display: inline-block; }
	.svs-content { padding: 22px 24px 48px; }
	.svs-page-title { font-size: 32px; }
	.svs-hero-inner { padding: 26px 28px 34px; }
	.svs-hero-title { font-size: 42px; max-width: 18ch; }
	.svs-hero-lede { font-size: 16.5px; }
	.svs-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
	.svs-cards.is-numbered { grid-template-columns: 1fr; }
	.svs-calc-foot { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
	.svs-calc-progress { margin: 0 -24px; }
	.svs-filters { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 520px) {
	.svs-tool-strip { grid-template-columns: 1fr; }
	.svs-tool-tile { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px; }
	.svs-tool-tile-name { margin: 0; }
	.svs-tool-tile-note { flex-basis: 100%; }
	.svs-g-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.svs-g-card { padding: 13px; }
	.svs-g-card-title { font-size: 14.5px; }
	.svs-grade-tile { padding: 11px 12px; gap: 10px; }
	.svs-grade-tile-k, .svs-grade-tile-meter { width: 40px; height: 40px; }
	.svs-legend { grid-template-columns: 1fr; }
	.svs-pager-link b { font-size: 13.5px; }
}
@media (max-width: 360px) {
	.svs-g-grid { grid-template-columns: 1fr; }
	.svs-grades { grid-template-columns: 1fr; }
	.svs-hero-stats b { font-size: 19px; }
}

/* Desktop: a red side rail replaces the tab bar. */
@media (min-width: 960px) {
	.svs-app { grid-template-columns: 272px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
	.svs-stage { grid-column: 2; }
	.svs-tabbar { display: none; }
	.svs-hide-wide { display: none !important; }
	.svs-toasts { bottom: 24px; padding-left: 272px; }
	.svs-rail {
		grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 2px; padding: calc(18px + var(--safe-t)) 14px 18px;
		background: linear-gradient(180deg, var(--bar-2) 0%, #6e0b10 100%); color: #fff; overflow-y: auto;
	}
	:root[data-theme="dark"] .svs-rail { background: linear-gradient(180deg, #4e0a0d 0%, #1f0405 100%); }
	.svs-rail-brand { display: block; padding: 6px 10px 18px; }
	.svs-rail-brand .svs-logo { height: 38px; }
	.svs-rail-app { display: flex; flex-direction: column; gap: 3px; padding: 0 10px 16px; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
	.svs-rail-app b { font-size: 17px; }
	.svs-rail-app span { font-size: 13px; opacity: .78; }
	.svs-rail-search { display: flex; align-items: center; gap: 10px; height: 42px; margin: 6px 0 12px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .86); font-size: 14px; border: 1px solid rgba(255, 255, 255, .14); }
	.svs-rail-search:hover { background: rgba(255, 255, 255, .18); }
	.svs-rail-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; color: rgba(255, 255, 255, .86); font-weight: 600; font-size: 15px; transition: background .15s; }
	.svs-rail-link i { width: 20px; text-align: center; font-size: 16px; }
	.svs-rail-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
	.svs-rail-link.is-on { background: #fff; color: var(--bar); }
	:root[data-theme="dark"] .svs-rail-link.is-on { background: rgba(255, 255, 255, .92); color: #4e0a0d; }
	.svs-rail-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); }
	.svs-screen .svs-bar-back { visibility: visible; }
	.is-home .svs-bar-title { visibility: hidden; }
	.is-home .svs-bar { box-shadow: none; }
	.svs-tool-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media print {
	.svs-tabbar, .svs-rail, .svs-bar, .svs-action-row, .svs-pager, .svs-calc-foot { display: none !important; }
	.svs-app, .svs-screen, .svs-stage { position: static; display: block; }
	.svs-body { overflow: visible; }
}
