/* TheWholeNest free study tool pages.
   Tool pages load this file instead of site.css so the site's global rules
   (section padding, headings, .card, .panel, .btn) never reach the tools.
   Part 1 is the TWN header, crumbs and footer, scoped to those elements.
   Part 2 maps each tool's own tokens onto the TWN palette. Tool markup and JS are unchanged. */

@font-face{font-family:"Fraunces";src:url(/assets/fonts/fraunces.woff2) format("woff2");font-weight:300 900;font-style:normal;font-display:swap}
@font-face{font-family:"Fraunces";src:url(/assets/fonts/fraunces-italic.woff2) format("woff2");font-weight:300 900;font-style:italic;font-display:swap}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter.woff2) format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
:root{
  --cream:#F5EFE4;--cream-2:#EFE6D6;--paper:#FBF8F2;--navy:#1E3A63;--navy-2:#16294A;--rust:#B0522C;--rust-2:#9A4524;--teal:#74A29C;--teal-d:#3F6C66;
  --ink:#1F2A3A;--body:#3D4656;--muted:#4F5664;--line:rgba(30,58,99,.12);
  --r-lg:28px;--r-md:20px;--r-sm:14px;--shadow:0 1px 2px rgba(30,58,99,.06),0 12px 32px -12px rgba(30,58,99,.18);
  --serif:"Fraunces",Georgia,"Times New Roman",serif;--sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --wrap:1160px;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--cream);color:var(--body);font:400 17px/1.65 var(--sans);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:hidden}
body.twn-tool [hidden]{display:none!important}
.skip{position:absolute;left:-999px}
.skip:focus{left:12px;top:12px;z-index:99;background:#fff;padding:8px 12px;border-radius:8px}
:focus-visible{outline:3px solid var(--teal);outline-offset:3px;border-radius:6px}

/* ---------- Part 1: TWN chrome ---------- */
.site-head img,.site-head svg,.site-foot img,.site-foot svg{display:block;max-width:100%}
.site-head .wrap,.site-foot .wrap,.twn-crumbs.wrap{max-width:var(--wrap);margin:0 auto;padding:0 22px}
.site-head{position:sticky;top:0;z-index:40;background:rgba(245,239,228,.95);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid transparent;transition:border-color .2s}
.site-head.scrolled{border-bottom-color:var(--line)}
.site-head .head-in{display:flex;align-items:center;justify-content:space-between;gap:16px;height:72px}
.site-head .brand,.site-foot .brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:0}
.site-head .brand img,.site-foot .brand img{width:42px;height:42px;border-radius:11px}
.site-head .brand-txt,.site-foot .brand-txt{display:flex;flex-direction:column;line-height:1}
.site-head .brand-name,.site-foot .brand-name{font-family:var(--serif);font-weight:650;font-size:1.32rem;color:#3A2A20;letter-spacing:-.01em;font-variation-settings:"opsz" 40}
.site-head .brand-name span{color:var(--rust-2)}
.site-head .brand-sub,.site-foot .brand-sub{font-size:10.5px;letter-spacing:.2em;text-transform:uppercase;color:#355C57;font-weight:600;margin-top:5px}
.site-head .nav{display:flex;align-items:center;gap:6px}
.site-head .nav a{color:var(--navy);text-decoration:none;font-weight:500;font-size:15px;padding:9px 14px;border-radius:999px;transition:background .15s}
.site-head .nav a:hover{background:rgba(30,58,99,.07)}
.site-head .nav a[aria-current=page]{background:rgba(30,58,99,.08)}
.site-head .nav .btn{margin-left:6px}
.site-head .menu-btn{display:none;background:none;border:0;padding:10px;margin-right:-10px;cursor:pointer;color:var(--navy)}
.site-head .head-shop{display:none}
.site-head .menu-btn svg{width:26px;height:26px}
.site-head .btn{display:inline-flex;align-items:center;gap:10px;font:600 16px/1 var(--sans);text-decoration:none;border:0;border-radius:999px;padding:16px 24px;cursor:pointer;transition:transform .15s,background .15s,box-shadow .15s;white-space:nowrap}
.site-head .btn-navy{background:var(--navy);color:#fff}
.site-head .nav a.btn-navy{color:#fff}
.site-head .nav a.btn-navy:hover{background:var(--navy-2);transform:translateY(-1px)}
.site-head .btn-sm{padding:11px 18px;font-size:14.5px}
.site-head .btn svg{width:18px;height:18px;flex:none}
@media (max-width:1020px){
  .site-head .menu-btn{display:block}
  .site-head .head-shop{display:inline-flex;align-items:center;margin-left:auto;padding:8px 12px;font-size:13.5px;gap:0;white-space:nowrap}
  .site-head .nav{position:absolute;left:12px;right:12px;top:66px;flex-direction:column;align-items:stretch;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--shadow);padding:10px;gap:2px;display:none}
  .site-head .nav.open{display:flex}
  .site-head .nav a{padding:13px 14px;font-size:16px}
  .site-head .nav .btn{margin:6px 0 0;justify-content:center}
}
.twn-crumbs{font-size:14px;color:var(--muted);padding-top:18px !important;padding-bottom:14px !important}
.twn-crumbs a{color:var(--rust-2);text-underline-offset:3px}
.twn-crumbs span[aria-current]{color:var(--ink)}
.site-foot{background:var(--navy-2);color:#BFC9D9;padding:64px 0 34px;margin-top:40px;font-size:14.5px;line-height:1.65}
.site-foot .foot-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:40px}
.site-foot .brand-name{color:#fff}
.site-foot .brand-name span{color:#E08A62}
.site-foot .brand-sub{color:#A9C9C4}
.site-foot h4{color:#fff;font:600 13px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;margin:6px 0 16px}
.site-foot ul{list-style:none;padding:0;margin:0}
.site-foot li{margin-bottom:10px}
body .site-foot a{color:#E3E9F2;text-decoration:none}
body .site-foot a:hover{text-decoration:underline}
.site-foot .slogan{color:#A9C9C4;margin:16px 0 0;font-family:var(--serif);font-style:italic;font-size:1.05rem}
.site-foot .fine{border-top:1px solid rgba(255,255,255,.1);margin-top:44px;padding-top:24px;font-size:13px;line-height:1.6;color:#98A5BA}
.site-foot .fine p{margin:0 0 8px}
@media (max-width:760px){.site-foot .foot-grid{grid-template-columns:1fr 1fr}.site-foot .foot-grid>div:first-child{grid-column:1/-1}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* ---------- Part 2: tool theme ---------- */
/* Base the tools were written against: zero-specificity resets, so every tool rule still wins. */
:where(body.twn-tool .tool-root),:where(body.twn-tool .tool-root *){margin:0;padding:0}
:where(body.twn-tool) .wrap{max-width:1160px;margin:0 auto;padding:0 20px}
body.twn-tool :where(.tool-root) a{color:var(--accent)}
body.twn-tool :where(.tool-root) :is(h1,h2,h3){font-weight:600;line-height:1.15;color:var(--text)}

/* TWN light palette. Beats each tool's dark default (.tool-root:not([data-theme="light"])). */
body.twn-tool .tool-root{
  --bg:#F5EFE4;--surface:#FFFFFF;--surface-2:rgba(30,58,99,.05);--sunk:rgba(30,58,99,.05);
  --card:#FFFDF9;--chip:rgba(30,58,99,.06);
  --surface2:#F6F0E5;
  --panel:#FFFDF9;--panel2:#F6F0E5;--panel3:#ECE3D3;
  --ink:#1F2A3A;--text:#1F2A3A;--muted:#4F5664;--text-muted:#4F5664;--text-subtle:#4F5664;--dim:#3D4656;
  --line:rgba(30,58,99,.14);--border:rgba(30,58,99,.14);
  --accent:#1E3A63;--accent-ink:#FFFFFF;--accent-soft:rgba(30,58,99,.09);--accent-dim:rgba(30,58,99,.09);--accent-text:#1E3A63;
  --teal:#3F6C66;--teal-dim:rgba(116,162,156,.16);--teal-dim2:rgba(116,162,156,.28);
  --tutor:#FFFFFF;--me:#EEF1F6;--soft:rgba(116,162,156,.14);
  --navy:#E7ECF3;--navy-ink:#1E3A63;
  --gold:#92400E;--gold-soft:#FBEBD0;--label:#F6DFA8;--label-ink:#1C1917;
  --ok:#2F6B4F;--ok-soft:#DDEFE3;--warn:#9A520F;--warn-soft:#FCEBD7;--bad:#B4232F;--bad-soft:#FBE2E2;
  --alert:#B4232F;--alert-soft:#FBE2E2;--critical:#B91C1C;--critical-dim:#FEE2E2;--warning:#C2410C;--warning-dim:#FFEDD5;
  --good:#15803D;--good-dim:#DCFCE7;--info:#1D4ED8;--info-dim:#DBEAFE;
  --type1:#1D4ED8;--type1-dim:#DBEAFE;--type2:#6D28D9;--type2-dim:#EDE9FE;
  --red:#BE123C;--yellow:#A16207;--blue:#1D4ED8;--purple:#6D28D9;--orange:#C2410C;--green:#15803D;
  --shadow:0 1px 2px rgba(30,58,99,.06),0 12px 32px -12px rgba(30,58,99,.18);
  --f-body:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --f-display:"Fraunces",Georgia,"Times New Roman",serif;
  --f-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color:var(--text);font-family:var(--f-body);font-size:16px;line-height:1.55;
}
body.twn-tool .tool-root,body.twn-tool .tool-root button,body.twn-tool .tool-root input,body.twn-tool .tool-root textarea,body.twn-tool .tool-root select{font-family:var(--sans)}
body.twn-tool .tool-root h1,body.twn-tool .tool-root h2,body.twn-tool .tool-root .brand h1,body.twn-tool .tool-root .page-title,body.twn-tool .tool-root .sec-title{font-family:var(--serif);color:var(--navy-ink);letter-spacing:-.015em;font-variation-settings:"opsz" 72,"SOFT" 50}
body.twn-tool .tool-root h3{font-family:var(--sans);color:var(--navy-ink);letter-spacing:-.01em}
body.twn-tool .tool-root h1{font-size:clamp(1.8rem,3.4vw,2.5rem);line-height:1.1;margin:0 0 6px;font-weight:600}
body.twn-tool .tool-root h1 span{color:var(--rust-2)}
body.twn-tool .tool-root.wrap,body.twn-tool .tool-root .wrap{max-width:1360px}
body.twn-tool .tool-root{padding-bottom:8px}

body.twn-tool .tool-root .top,body.twn-tool .tool-root .page-header,body.twn-tool .tool-root header.top{background:var(--paper);color:var(--text);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:none}
body.twn-tool .tool-root .top .brand p,body.twn-tool .tool-root .top .unit,body.twn-tool .tool-root .top .score,body.twn-tool .tool-root .top .score b,body.twn-tool .tool-root .brand p,body.twn-tool .tool-root .page-sub,body.twn-tool .tool-root .lede{color:var(--muted)}
body.twn-tool .tool-root .top .score b{color:var(--navy-ink)}

body.twn-tool .tool-root .panel,body.twn-tool .tool-root .card,body.twn-tool .tool-root .q-card,body.twn-tool .tool-root .insulin-card,body.twn-tool .tool-root .comp-card,body.twn-tool .tool-root .board,body.twn-tool .tool-root .study,body.twn-tool .tool-root details.pocket,body.twn-tool .tool-root .compare-wrap,body.twn-tool .tool-root .exam-q{background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);color:var(--text);box-shadow:0 1px 2px rgba(30,58,99,.05)}
body.twn-tool .tool-root .card:hover,body.twn-tool .tool-root .q-card:hover,body.twn-tool .tool-root .comp-card:hover{transform:none;box-shadow:0 1px 2px rgba(30,58,99,.05)}

body.twn-tool .tool-root .btn,body.twn-tool .tool-root a.btn,body.twn-tool .tool-root button.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:999px;background:var(--navy-ink);color:#fff;border:1px solid transparent;font:600 15px/1.2 var(--sans);text-decoration:none;padding:11px 18px;cursor:pointer;white-space:normal;text-align:center}
body.twn-tool .tool-root .btn:hover,body.twn-tool .tool-root a.btn:hover{background:var(--navy-2);color:#fff;text-decoration:none}
body.twn-tool .tool-root .btn.ghost,body.twn-tool .tool-root .btn-outline,body.twn-tool .tool-root button.btn.ghost{background:transparent;color:var(--navy-ink);border:1px solid rgba(30,58,99,.28);font-weight:600}
body.twn-tool .tool-root .btn.ghost:hover,body.twn-tool .tool-root .btn-outline:hover{background:rgba(30,58,99,.06);color:var(--navy-ink);border-color:var(--navy-ink)}
body.twn-tool .tool-root .btn:disabled{opacity:.45;cursor:not-allowed}

body.twn-tool .tool-root input,body.twn-tool .tool-root textarea,body.twn-tool .tool-root select,body.twn-tool .tool-root .search{background:#fff;color:var(--text);border:1.5px solid rgba(30,58,99,.18);border-radius:var(--r-sm);padding:8px 12px}
body.twn-tool .tool-root :focus-visible{outline:3px solid var(--teal);outline-offset:3px}

body.twn-tool .tool-root .chip,body.twn-tool .tool-root .mode,body.twn-tool .tool-root .tab,body.twn-tool .tool-root .pt,body.twn-tool .tool-root .opt,body.twn-tool .tool-root .option,body.twn-tool .tool-root .room,body.twn-tool .tool-root .nav-btn,body.twn-tool .tool-root .nav-a{border-radius:12px}
body.twn-tool .tool-root .tab:disabled,body.twn-tool .tool-root .pt.locked,body.twn-tool .tool-root .pt:disabled,body.twn-tool .tool-root .nav-btn:disabled,body.twn-tool .tool-root .mode:disabled,body.twn-tool .tool-root .nav-a.is-locked{opacity:.55;cursor:not-allowed}
body.twn-tool .tool-root .nav{margin-left:0;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between}

/* Section tabs stick under the 72px TWN header. */
body.twn-tool .tool-root .sticky-nav,body.twn-tool .tool-root .mh-nav,body.twn-tool .tool-root nav.tabs{position:sticky;top:72px;z-index:5;background:rgba(251,248,242,.94);border:1px solid var(--line);border-radius:var(--r-md);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}

/* End of the free sample */
body.twn-tool .sample-end{border:1px solid var(--line);background:var(--paper);border-radius:var(--r-md);padding:22px 22px 10px;margin:18px 0 8px;box-shadow:0 1px 2px rgba(30,58,99,.05)}
body.twn-tool .sample-end p{margin:0 0 12px;color:var(--ink);font-size:1.05rem;line-height:1.45}
body.twn-tool .sample-end p:first-child{font-family:var(--serif);font-size:1.3rem;color:var(--navy-ink);font-weight:600}
body.twn-tool .tool-root .sample-end .btn,body.twn-tool .tool-root .sample-end a.btn{background:var(--rust);color:#fff;box-shadow:0 8px 20px -10px rgba(176,82,44,.8)}
body.twn-tool .tool-root .sample-end .btn:hover,body.twn-tool .tool-root .sample-end a.btn:hover{background:var(--rust-2);color:#fff}

/* Cardiac Classroom hardcodes white bold text for its dark theme; on TWN's light paper use ink.
   (Inline colors such as the blue/red blood words still win.) */
body.twn-tool .tool-root .bb strong{color:var(--ink)}
/* ED simulation rank hint is hardcoded light grey for its dark theme */
body.twn-tool .tool-root .rank small{color:var(--muted)}
/* A few dark-only hardcoded colors inside the tools, re-set for the light TWN paper */
body.twn-tool .tool-root .ehr{background:var(--card)}
body.twn-tool .tool-root details.deep,body.twn-tool .tool-root .model{background:var(--panel2)}
body.twn-tool .tool-root .cj{color:#5B3FB3;border-color:#8B6FE0}
body.twn-tool .tool-root .elist li.on{background:rgba(234,179,8,.22);color:#6B4E00}
body.twn-tool .tool-root .toast{background:var(--navy-ink);color:#fff}
body.twn-tool .tool-root .toast b{color:#fff}
/* Mental Health mnemonic boxes (.formula) use --surface2, which the TWN palette did not set, so in iOS dark mode
   they kept the tool's dark #21262d under TWN's dark ink. --surface2 is now set above; the box also wraps at 390px. */
body.twn-tool .tool-root .formula{background:var(--panel2);color:var(--ink);border-color:rgba(30,58,99,.18);white-space:pre-line;overflow-wrap:break-word;overflow-x:visible}
/* Cardiac Classroom's blue/red blood words use the diagram colors, too light for body text on white */
body.twn-tool .tool-root strong[style*="var(--deoxy)"]{--deoxy:#2D5BD8}
body.twn-tool .tool-root strong[style*="var(--oxy)"]{--oxy:#C42B33}

/* footer: let columns shrink at 360px so the long link text wraps instead of pushing the page wider */
.site-foot .foot-grid>div{min-width:0}.site-foot .foot-grid a{overflow-wrap:break-word}
@media (max-width:400px){.site-foot .foot-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px 20px}}
/* Oct 29: brand "TheWholeNest Nursing" */
.brand-name .brand-n{color:inherit}
@media (max-width:400px){.brand-name{font-size:1.16rem}.brand{gap:10px}}

.up-buy .up-etsy,.buy .up-etsy,.sample-end .up-etsy{display:inline-block;font-weight:600;font-size:.92rem;color:inherit;text-underline-offset:3px}
.up-buy .up-btn,.buy .btn{text-align:center}
