/* QSimHealth site layer (2026-09-27) — docs/brand-style-guide.md.
   Loads AFTER each page's own <style>; rules are scoped to body.qsh so the
   app pages (protected/*.html) never pick them up.

   Parts:  base type / links / focus
           buttons   .qsh-btn (amber action) | .qsh-textlink (the quiet second action)
           nav       .qsh-nav (same markup on every marketing page)
           sections  .qsh-sec + .qsh-ground | .qsh-ground-2 | .qsh-band (deep QSim blue)
           joins     .qsh-join (curved edge between grounds, kept under 4:1)
           heroes    .qsh-hero (split) | .qsh-hero--short (legal, utility)
           cards     .qsh-card | .qsh-shot (screenshot frame) | .qsh-stat
           footer    .qsh-footer
*/

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.qsh *, body.qsh *::before, body.qsh *::after { transition: none !important; animation: none !important; }
}
body.qsh {
  margin: 0; font-family: var(--font-text); font-size: 17px; line-height: 1.65;
  background: var(--ground); color: var(--text);
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
body.qsh *, body.qsh *::before, body.qsh *::after { box-sizing: border-box; }
body.qsh img, body.qsh svg, body.qsh video { max-width: 100%; }
body.qsh img { height: auto; }

/* ── Type ── */
body.qsh h1, body.qsh h2, body.qsh h3, body.qsh h4 { text-wrap: balance; }
:where(body.qsh) :where(h1, h2, h3, h4) { margin: 0; color: var(--text); }
body.qsh p, body.qsh li, body.qsh dd, body.qsh figcaption, body.qsh blockquote, body.qsh td { text-wrap: pretty; }
body.qsh h1 { font-family: var(--font-head); font-weight: 600; font-size: clamp(34px, 4vw, 54px); line-height: 1.1; letter-spacing: -0.02em; }
body.qsh h2 { font-family: var(--font-head); font-weight: 600; font-size: clamp(28px, 3.1vw, 40px); line-height: 1.16; letter-spacing: -0.015em; }
body.qsh h3 { font-family: var(--font-head); font-weight: 600; font-size: 20px; line-height: 1.3; letter-spacing: -0.005em; }
:where(body.qsh) :where(p) { margin: 0; }
body.qsh strong, body.qsh b { font-weight: 700; color: var(--text); }
body.qsh code, body.qsh pre, body.qsh .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.qsh-lede { font-size: 19px; line-height: 1.6; color: var(--text-2); max-width: 62ch; }
.qsh-muted { color: var(--text-2); }
.qsh-small { font-size: 15px; color: var(--text-2); }

/* eyebrow: uppercase label led by the logo's amber spark line; never a pill */
.qsh-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
  font-family: var(--font-label); font-weight: 600; font-size: 15px; line-height: 1.2;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--eyebrow, var(--accent));
}
.qsh-eyebrow::before {
  content: ''; flex: none; width: 30px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 12'%3E%3Cpolyline points='2,7 10,2 18,10 27,4' fill='none' stroke='%23F59E0B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='2' cy='7' r='1.8' fill='%23F59E0B'/%3E%3Ccircle cx='10' cy='2' r='1.8' fill='%23F59E0B'/%3E%3Ccircle cx='18' cy='10' r='1.8' fill='%23F59E0B'/%3E%3Ccircle cx='27' cy='4' r='1.8' fill='%23F59E0B'/%3E%3C/svg%3E") left center / contain no-repeat;
}

/* links in running text: underlined, never colour alone */
body.qsh { --link: #8FBEF0; }  /* in-text links: sky, 9.4:1 on the ground */
body.qsh a { color: var(--link, var(--accent)); }
body.qsh p a:not([class]), body.qsh li a:not([class]), body.qsh td a:not([class]), body.qsh dd a:not([class]), body.qsh figcaption a:not([class]) {
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
body.qsh p a:not([class]):hover, body.qsh li a:not([class]):hover { text-decoration-thickness: 2px; }
body.qsh :focus-visible { outline: 2px solid var(--spark); outline-offset: 3px; border-radius: 4px; }

/* ── Buttons: one amber action per section; the rest are text links ── */
.qsh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-text); font-weight: 700; font-size: 17px; line-height: 1.2;
  padding: 15px 26px; border-radius: 10px; border: 0; cursor: pointer; text-decoration: none !important;
  background: var(--action); color: var(--on-action) !important; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(245,158,11,0.18); transition: filter 0.15s, transform 0.15s;
}
.qsh-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.qsh-textlink {
  font-weight: 600; color: var(--text) !important; text-decoration: underline; text-underline-offset: 5px;
  text-decoration-color: var(--accent); text-decoration-thickness: 1.5px;
}
.qsh-textlink::after { content: ' \2192'; color: var(--accent); }
.qsh-textlink:hover { text-decoration-thickness: 2.5px; }
.qsh-band .qsh-textlink { color: var(--on-band) !important; text-decoration-color: var(--sky); }
.qsh-band .qsh-textlink::after { color: var(--sky); }
.qsh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.qsh-actions--center { justify-content: center; }

/* ── Nav (same markup on every marketing page) ── */
.qsh-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 12px;
  height: 76px; padding: 0 max(16px, 4vw);
  background: rgba(7,17,30,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.qsh-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; flex: none; }
.qsh-brand svg { width: 44px; height: 44px; flex: none; }
.qsh-wordmark { font-family: var(--font-mark); font-size: 31px; line-height: 1; color: var(--on-band); letter-spacing: -0.5px; display: inline-flex; align-items: baseline; }
.qsh-wordmark span { color: var(--spark); font-size: 21px; margin-left: 2px; }
.qsh-nav .nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.qsh-nav .nav-links a {
  font-family: var(--font-label); font-weight: 600; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #C6D2E0; text-decoration: none; padding: 8px 12px; border-radius: 6px; white-space: nowrap;
}
.qsh-nav .nav-links a:hover { color: #fff; background: rgba(91,155,213,0.12); }
.qsh-nav .nav-links a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--spark); border-radius: 0; }
.qsh-nav-cta {
  flex: none; margin-left: 10px; background: var(--action); color: var(--on-action) !important; text-decoration: none !important;
  font-family: var(--font-label); font-weight: 600; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 8px; white-space: nowrap;
}
.qsh-nav-cta:hover { filter: brightness(1.06); }
.qsh-nav .nav-mobile-toggle {
  display: none; margin-left: 8px; background: transparent; color: #fff; cursor: pointer;
  border: 1px solid var(--rule-band); border-radius: 8px; font-size: 20px; line-height: 1;
  min-width: 44px; min-height: 44px; padding: 8px 12px;
}
@media (max-width: 960px) {
  .qsh-nav { height: 66px; }
  .qsh-nav .nav-links { display: none; }
  .qsh-nav .nav-mobile-toggle { display: block; }
  .qsh-nav-cta { margin-left: auto; }
  .qsh-nav .nav-links.mobile-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: rgba(7,17,30,0.98); padding: 10px 16px 16px; border-bottom: 1px solid var(--rule);
  }
  .qsh-nav .nav-links.mobile-open a { padding: 12px 8px; font-size: 17px; }
}
@media (max-width: 440px) {
  .qsh-brand svg { width: 36px; height: 36px; }
  .qsh-wordmark { font-size: 25px; }
  .qsh-wordmark span { font-size: 17px; }
  .qsh-nav-cta { padding: 9px 11px; font-size: 14px; letter-spacing: 0.05em; }
  .qsh-nav .nav-mobile-toggle { margin-left: 6px; }
}

/* ── Sections ── */
.qsh-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 max(16px, 4vw); }
.qsh-sec { padding: 96px 0; }
.qsh-sec--tight { padding: 64px 0; }
.qsh-ground   { background: var(--ground); }
.qsh-ground-2 { background: var(--ground-2); }
.qsh-band     { background: var(--band); color: var(--on-band); --accent: var(--sky); --eyebrow: var(--sky); }
.qsh-band h1, .qsh-band h2, .qsh-band h3 { color: var(--on-band); }
.qsh-band .qsh-lede, .qsh-band .qsh-muted, .qsh-band .qsh-small { color: var(--on-band-2); }
.qsh-head { max-width: 760px; margin-bottom: 44px; }
.qsh-head .qsh-lede { margin-top: 16px; }
@media (max-width: 720px) {
  .qsh-sec { padding: 64px 0; }
  .qsh-sec--tight { padding: 48px 0; }
  .qsh-head { margin-bottom: 32px; }
  .qsh-lede { font-size: 18px; }
}

/* joins: a soft curve between grounds instead of a hard edge */
.qsh-join { display: block; width: 100%; height: 56px; line-height: 0; }
.qsh-join svg { display: block; width: 100%; height: 100%; }
@media (max-width: 720px) { .qsh-join { height: 32px; } }

/* ── Heroes ── */
.qsh-hero { padding: 72px 0 88px; background:
  radial-gradient(900px 480px at 85% 20%, rgba(24,95,165,0.28), transparent 70%), var(--ground); }
.qsh-hero .qsh-wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.qsh-hero h1 { margin-bottom: 22px; }
.qsh-hero .qsh-note { margin-top: 18px; font-size: 15px; color: var(--text-2); }
@media (max-width: 960px) {
  .qsh-hero { padding: 48px 0 64px; }
  .qsh-hero .qsh-wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
.qsh-hero--short { padding: 64px 0 40px; background: var(--ground); }
.qsh-hero--short .qsh-wrap { display: block; }
body.qsh .qsh-hero--short h1 { font-size: clamp(32px, 3.6vw, 46px); margin-bottom: 12px; }

/* ── Cards, frames, stats ── */
.qsh-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.qsh-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.qsh-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.qsh-split { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 1080px) { .qsh-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .qsh-grid-3, .qsh-grid-2, .qsh-split { grid-template-columns: minmax(0, 1fr); }
  .qsh-split { gap: 28px; }
}
@media (max-width: 560px) { .qsh-grid-4 { grid-template-columns: minmax(0, 1fr); } }

.qsh-card {
  background: var(--raised); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow);
}
.qsh-card h3 { margin-bottom: 10px; }
.qsh-card p { color: var(--text-2); font-size: 16px; }
.qsh-band .qsh-card { background: var(--band-card); border-color: var(--rule-band); }
.qsh-band .qsh-card p { color: var(--on-band-2); }
.qsh-card--accent { border-top: 3px solid var(--accent); }

.qsh-icon {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--accent);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--accent);
}
.qsh-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.qsh-shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); box-shadow: 0 24px 60px rgba(0,0,0,0.45); background: #0F172A; }
.qsh-shot img { display: block; width: 100%; }

.qsh-stat-num { font-family: var(--font-mono); font-weight: 500; font-size: clamp(30px, 3vw, 40px); line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.qsh-stat-label { font-family: var(--font-label); font-weight: 600; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }

/* forms */
body.qsh label { font-size: 15px; font-weight: 600; color: var(--text-2); }
body.qsh input[type=text], body.qsh input[type=email] {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--ground); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px;
}
body.qsh input[type=text]:focus, body.qsh input[type=email]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(91,155,213,0.25); }
.qsh-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ── Footer ── */
.qsh-footer { background: var(--ground-2); border-top: 1px solid var(--rule); padding: 56px 0 40px; font-size: 15px; color: var(--text-2); }
.qsh-footer .qsh-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.qsh-footer .qsh-foot-h { font-family: var(--font-label); font-weight: 600; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin: 0 0 12px; }
.qsh-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
body.qsh .qsh-footer a, body.qsh .qsh-footer li a:not([class]) { color: var(--text-2); text-decoration: none; }
body.qsh .qsh-footer a:hover, body.qsh .qsh-footer li a:not([class]):hover { color: var(--text); text-decoration: underline; }
.qsh-footer .qsh-legalline { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 22px; margin-top: 8px; font-size: 14px; }
.qsh-footer .qsh-brand svg { width: 36px; height: 36px; }
.qsh-footer .qsh-wordmark { font-size: 25px; }
.qsh-footer .qsh-wordmark span { font-size: 17px; }
@media (max-width: 800px) { .qsh-footer .qsh-wrap { grid-template-columns: 1fr 1fr; } .qsh-footer .qsh-footer-about { grid-column: 1 / -1; } }

/* ── Legal / long-reading pages: a contents rail beside the prose ── */
.qsh-legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 96px; }
.qsh-legal aside { position: sticky; top: 100px; font-size: 15px; }
.qsh-legal aside h2 { font-family: var(--font-label); font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin: 0 0 12px; font-weight: 600; }
.qsh-legal aside ul, .qsh-legal aside ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); }
body.qsh .qsh-legal aside a, body.qsh .qsh-legal aside li a:not([class]) { color: var(--text-2); text-decoration: none; }
body.qsh .qsh-legal aside a:hover, body.qsh .qsh-legal aside li a:not([class]):hover { color: var(--text); text-decoration: underline; }
.qsh-legal article { max-width: 78ch; }
@media (max-width: 900px) { .qsh-legal { grid-template-columns: minmax(0, 1fr); gap: 24px; } .qsh-legal aside { position: static; } }
