/* Palette: navy surfaces, electric blue structure, neon green action. Loaded after the inline
   styles in index.html, so these tokens also recolor the older --aqua/--teal/--purple references. */
:root {
  --bg:#07111c; --navy-900:#07111c; --navy-800:#0c1b29; --navy-700:#112638;
  --ink:#eef7ff; --muted:#b4c8d8; --line:#1c3a55;
  --blue:#3b9cff; --blue-bright:#7bbcff; --neon:#39ff8a; --on-neon:#04140c;
  --aqua:var(--blue); --teal:var(--neon); --purple:var(--blue); --peach:var(--neon); --lime:var(--neon);
}
body { background:var(--bg); }
.nav { min-height:64px; height:auto; padding-block:10px; }
.hero { min-height:0; padding:clamp(34px,7vw,90px) 0; gap:clamp(18px,4vw,52px); }
.hero h1 { font-size:clamp(2.25rem,4.7vw,4.65rem); }
.hero h1 .grad { display:block; }
.hero .lead { max-width:54ch; }
.hero-demo { display:block; width:100%; min-width:0; height:555px; border:1px solid var(--line); border-radius:18px; background:var(--navy-800); }
@media (max-width:480px) { .hero-demo { height:580px; } }
.viz, .beforeafter .panel { min-height:0; }
.viz { box-shadow:none; }
.viz::before { display:none; }
.theo-stages h3 { letter-spacing:.035em; }
.section { padding:clamp(36px,5vw,68px) 0; }
.section h2 { font-size:clamp(1.9rem,4.3vw,3.6rem); }
.section[id] { scroll-margin-top:82px; }
.section:nth-of-type(even) { background:#0a1724; border-block:1px solid #142839; }
.panel,.card,.feature { background:#0c1b29; border:1px solid var(--line); border-radius:6px; min-width:0; }
.feature { padding:clamp(18px,4vw,38px); }
.grid { gap:12px; }
.price.pop { transform:none; }
.btn { border-radius:4px; background:var(--lime); cursor:pointer; }
.btn.secondary { color:var(--ink); }
.field { color:var(--ink); min-width:0; }
.field::placeholder { color:var(--muted); }
:focus-visible { outline:2px solid var(--aqua); outline-offset:3px; }
.small,.footer { color:var(--muted); }
.footer { padding:32px 0; }
.workbook-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.workbook-card { grid-column:span 2; display:flex; flex-direction:column; gap:12px; padding:clamp(14px,2.4vw,26px); }
.project-conversion,.project-dashboard { grid-column:span 3; }
.workbook-card h3 { margin:0; }
.workbook-card img { display:block; width:100%; height:auto; border:1px solid var(--line); background:white; }
.workbook-card .sample-link { color:var(--lime); align-self:flex-start; margin-top:auto; text-decoration:underline; }
.project-conversion { background:#1d252d; }
.project-dashboard { background:#161b35; }
.project-receivables { background:#102338; }
.project-clinic { background:#132c2a; }
.project-handoff { background:#2b2326; }
.conversion-preview { display:grid; gap:8px; }
.source-memo,.budget-output { padding:12px; border-radius:5px; }
.source-memo { background:#f2e5c9; color:#322c25; }
.source-memo p { color:inherit; font-family:Georgia,serif; }
.budget-output { background:#e2f3e9; color:#163d32; }
.conversion-preview b { font-size:.72rem; letter-spacing:.055em; }
.budget-output table { width:100%; border-collapse:collapse; font-size:clamp(.69rem,1.4vw,.83rem); text-align:right; font-variant-numeric:tabular-nums; }
.budget-output th,.budget-output td { border-bottom:1px solid #a8c6b9; padding:3px 2px; }
.budget-output th:first-child { text-align:left; }
.receivables-preview { margin:0; }
.receivables-preview figcaption { padding:7px 9px; background:#24415d; font-size:.8rem; }
.clinic-preview { background:#d7f2e7; color:#123c31; padding:12px; border-radius:8px; }
.clinic-preview strong { display:block; font-size:2.35rem; line-height:1; margin-bottom:10px; }
.clinic-preview strong span { display:block; font-size:.77rem; line-height:1.4; margin-top:4px; }
.clinic-preview div { display:flex; justify-content:space-between; gap:8px; border-top:1px solid #a3cabd; font-size:.85rem; padding:4px 0; }
.handoff-preview { background:#f8e7df; color:#442a31; padding:9px 12px; border-radius:8px; list-style:none; margin:0; }
.handoff-preview li { display:flex; justify-content:space-between; gap:8px; padding:7px 0; font-size:.83rem; }
.handoff-preview li+li { border-top:1px solid #dbc1bb; }
.handoff-preview b { white-space:nowrap; }
.long-form { margin-top:24px; padding:clamp(14px,3vw,26px); border:1px solid #39586e; border-radius:8px; background:#0e2030; }
.long-form h3 { font-size:clamp(1.25rem,3vw,1.85rem); margin:3px 0 14px; }
.long-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.long-workbook { display:grid; grid-template-rows:auto 1fr; gap:14px; min-width:0; padding:14px; border-radius:6px; background:#182c41; }
.long-workbook img { display:block; width:min(100%,230px); height:auto; margin-inline:auto; border:1px solid #ffffff35; }
.long-workbook h4 { margin:4px 0; font-size:1.1rem; }
.long-workbook p { color:var(--muted); margin:6px 0 10px; }
.long-workbook a { color:var(--lime); text-decoration:underline; overflow-wrap:anywhere; }
.long-history { background:#352824; }
.long-training { background:#282340; }
.small-project-label { margin-top:24px; }
.long-form-feature .long-form-grid { grid-template-columns:1fr; }
.long-feature { grid-template-columns:minmax(140px,230px) minmax(0,1fr); grid-template-rows:auto; align-items:start; }
.long-feature ul { margin:6px 0 12px; padding-left:20px; color:var(--muted); }
.long-feature li { margin:3px 0; }
@media (max-width:700px) { .long-form-feature .long-feature { grid-template-columns:1fr; } .long-form-feature .long-feature img { width:min(100%,260px); } }
@media (max-width:700px) { .long-form-grid { grid-template-columns:1fr; } .long-workbook { grid-template-rows:auto; grid-template-columns:minmax(80px,32%) minmax(0,1fr); } }
@media (max-width:850px) { .workbook-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .workbook-card { grid-column:auto; } }
@media (max-width:620px) { .workbook-grid { grid-template-columns:1fr; } }
.sample-actions { display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:auto; }
.mobile-links { display:none; }
@media (max-width:850px) {
  .nav { gap:12px; flex-wrap:wrap; }
  .navlinks { gap:0; }
  .navlinks .btn { padding:8px 10px; font-size:.8rem; }
  .brand { font-size:.88rem; }
  .mobile-links { display:flex; gap:16px; width:100%; padding-block:2px; font-size:.84rem; color:var(--muted); }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* ===== Theme and layout pass: navy / electric blue / neon green ===== */

/* Type: relax the very tight headline tracking and avoid one-word last lines. */
.hero h1 { letter-spacing:-.035em; }
.section h2 { letter-spacing:-.03em; }
h1,h2,h3 { text-wrap:balance; }
.lead,.sub,.card p { text-wrap:pretty; }
.eyebrow { color:var(--blue-bright); margin-bottom:.45rem; }

/* Gradient text runs electric blue to neon green; the old purple end stop is gone. */
.grad,.hero .grad { background-image:linear-gradient(100deg,var(--blue-bright),var(--neon)); -webkit-background-clip:text; background-clip:text; color:transparent; }

/* Actions. */
.btn,.hero .actions .btn:not(.secondary) { background:var(--neon); color:var(--on-neon); }
.btn:hover { filter:brightness(1.08); }
.btn.secondary,.hero .actions .btn.secondary { background:transparent; color:var(--ink); border:1px solid var(--blue); }
.btn.secondary:hover { background:#3b9cff22; filter:none; }
.card p a,.panel p a,.feature p a { color:var(--neon); text-decoration:underline; text-underline-offset:3px; }
.navlinks a:hover,.mobile-links a:hover { color:var(--neon); }
.navlinks { color:#d3e4f2; }
.tag { background:#3b9cff1a; color:#d3e4f2; }
.check { color:#d3e4f2; }
.pill { color:var(--on-neon); }
.arrow { color:var(--blue); }

/* Theo pipeline and the Telehealth walkthrough use the same two accents. */
.theo-stages h3 { color:var(--blue-bright); }
.theo-stages>div:last-child h3 { color:var(--neon); }
.case-walkthrough summary { color:var(--neon); }
.case-walkthrough li:last-child { border-color:var(--neon); }

/* Panels that compare two things line up instead of floating at different heights. */
.flow { align-items:stretch; }
.card { display:flex; flex-direction:column; }
.card .actions { margin-top:auto; padding-top:16px; }
.card details { margin-top:10px; }

/* Services: seven cards in three columns left one orphan; let the last one span the row. */
@media (min-width:851px) { #services .grid>.card:last-child:nth-child(3n+1) { grid-column:1 / -1; } }

/* Pricing: the badge sits on the card edge so the three prices line up; ticks mark each point. */
.price { padding-top:30px; }
.price .pill { position:absolute; top:-11px; left:22px; }
.price .amount { margin:.6rem 0 .8rem; }
.price .check { position:relative; padding-left:1.5rem; margin:.45rem 0; }
.price .check::before { content:"\2713"; position:absolute; left:0; color:var(--neon); font-weight:900; }

/* Portfolio and sample cards sit on navy; a colored top edge tells them apart. */
.project-conversion,.project-dashboard,.project-receivables,.project-clinic,.project-handoff,
.long-workbook,.long-history,.long-training { background:var(--navy-700); }
.workbook-card,.long-workbook { border-top:3px solid var(--blue); }
.project-clinic,.project-handoff,.long-training { border-top-color:var(--neon); }
.long-workbook { border-left:1px solid var(--line); border-right:1px solid var(--line); border-bottom:1px solid var(--line); }

/* Forms: match the dark UI, make focus obvious, keep long placeholders from clipping. */
.field { text-overflow:ellipsis; }
.field:focus { border-color:var(--blue); box-shadow:0 0 0 3px #3b9cff33; outline:none; }
select.field option { background:var(--navy-800); color:var(--ink); }
input[type=file] { max-width:100%; color:var(--muted); font:inherit; }
input[type=file]::file-selector-button { font:inherit; font-weight:800; margin-right:.8rem; padding:.55rem .9rem; border:1px solid var(--blue); border-radius:4px; background:transparent; color:var(--ink); cursor:pointer; }
input[type=file]::file-selector-button:hover { background:#3b9cff22; }

/* Jump links clear the sticky bar, including targets that are not sections. */
[id] { scroll-margin-top:84px; }

@media (max-width:850px) {
  [id] { scroll-margin-top:112px; }
  .nav { gap:2px 12px; padding-block:6px; }
  .mobile-links { gap:18px; margin-top:-2px; overflow-x:auto; white-space:nowrap; scrollbar-width:none; }
  .mobile-links a { padding:.4rem 0; }
}

/* Phones: keep the hero pipeline as three compact columns instead of three tall boxes. */
@media (max-width:480px) {
  .viz { padding:16px; }
  .theo-stages { grid-template-columns:repeat(3,minmax(0,1fr)); gap:.4rem; }
  .theo-stages>div { padding:.55rem .5rem; }
  .theo-stages h3 { font-size:.68rem; letter-spacing:.02em; }
  .theo-stages li { font-size:.8rem; padding:.35rem 0; }
  .field::placeholder { font-size:.92rem; }
  .price { padding-top:34px; }
}
@media (max-width:340px) { .theo-stages { grid-template-columns:1fr; } }

/* Touch: give text links and the disclosure toggles a comfortable hit area on small screens. */
@media (max-width:850px) {
  .brand { display:inline-block; padding:.35rem 0; }
  .sample-link,.long-workbook a,.card summary,.case-walkthrough summary { display:inline-block; padding:.5rem 0; }
  .card p a,.panel p a,.feature p a { padding-block:.4rem; }
}

/* Keyboard users can jump past the sticky bar. */
.skip { position:absolute; left:-999px; top:8px; z-index:100; padding:.6rem 1rem; border-radius:4px; background:var(--neon); color:var(--on-neon); font-weight:800; }
.skip:focus { left:8px; }

/* Five cards (the process steps) fill two balanced rows instead of leaving a gap. */
@media (min-width:851px) {
  .grid:has(>.card:nth-child(5):last-child) { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .grid:has(>.card:nth-child(5):last-child)>.card { grid-column:span 2; }
  .grid:has(>.card:nth-child(5):last-child)>.card:nth-child(n+4) { grid-column:span 3; }
}

/* Four pricing tiers: 2x2 on tablets, one row on wide screens. */
.grid:has(>.card:nth-child(4):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (min-width:1100px) { .grid:has(>.card:nth-child(4):last-child) { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:850px) { .grid:has(>.card:nth-child(4):last-child) { grid-template-columns:1fr; } }
.price-note { margin-top:1.2rem; text-align:center; }
.price .actions { margin-top:auto; padding-top:1rem; align-items:flex-end; }

.book-reader { min-width:0; }
.book-enlarge { display:block; width:min(100%,230px); margin-inline:auto; padding:0; border:0; background:none; cursor:zoom-in; }
.long-workbook .book-enlarge img { width:100%; aspect-ratio:557 / 720; object-fit:contain; background:var(--bg); }
.book-controls { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; margin-top:8px; }
.book-controls button { min-width:36px; min-height:36px; border:1px solid var(--blue); border-radius:6px; color:var(--ink); background:var(--navy-800); font:inherit; cursor:pointer; }
.book-controls button:disabled { opacity:.5; cursor:default; }
.book-controls span { color:var(--muted); font-size:.85rem; white-space:nowrap; }
.book-dialog { width:min(96vw,760px); max-height:94vh; padding:12px; border:1px solid var(--blue); border-radius:12px; color:var(--ink); background:var(--navy-900); }
.book-dialog::backdrop { background:#000b; }
.book-dialog .book-controls { position:sticky; top:0; margin:0 0 8px; padding:8px; background:var(--navy-900); }
.book-dialog img { display:block; width:100%; height:auto; }
@media (max-width:700px) { .long-workbook { grid-template-columns:1fr; } }
@media (max-width:350px) { .hero-demo { height:625px; } }

#qr-resume li { margin-block:.5rem; }
#qr-resume li a,#pricing .price-note a { color:var(--neon); text-decoration:underline; text-underline-offset:3px; }
#qr-resume details { margin-top:1rem; }
#qr-resume summary { color:var(--neon); cursor:pointer; }
footer a { color:var(--neon); text-decoration:underline; text-underline-offset:3px; }
