
:root{--bg:#f4f8fc;--panel:#fff;--text:#172033;--muted:#607080;--line:#d9e5ef;--blue:#1769aa;--blue2:#0e4f82;--soft:#eaf5ff;--green:#eaf8ef;--amber:#fff6df;--red:#fff0f0;--shadow:0 10px 30px rgba(25,70,110,.08)}
*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text);line-height:1.62}button,input,select{font:inherit}
header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.topbar{max-width:1300px;margin:auto;padding:14px 22px;display:flex;align-items:center;gap:18px;justify-content:space-between}.brand{font-weight:800;color:var(--blue2);font-size:1.1rem}.brand span{color:#333}.search{width:min(460px,48vw);padding:11px 14px;border:1px solid var(--line);border-radius:12px;background:#fafdff}
.layout{max-width:1300px;margin:auto;display:grid;grid-template-columns:310px 1fr;gap:24px;padding:24px}.sidebar{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;height:calc(100vh - 100px);position:sticky;top:82px;overflow:auto;box-shadow:var(--shadow)}.category{margin:15px 6px 7px;font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:#6b7b88;font-weight:800}.topic-btn{width:100%;border:0;background:transparent;text-align:left;padding:10px;border-radius:10px;cursor:pointer;color:#26384a}.topic-btn:hover{background:#f1f7fc}.topic-btn.active{background:var(--soft);color:var(--blue2);font-weight:800}.num{font-size:.75rem;color:#789;display:inline-block;width:34px}
.main{min-width:0}.hero,.primer{background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}.hero{padding:35px;margin-bottom:20px;background:linear-gradient(135deg,#fff,#edf7ff)}.hero h1{font-size:2.15rem;margin:0 0 9px;color:var(--blue2)}.hero p{font-size:1.12rem;color:#3f5264;max-width:860px}.primer{padding:32px}.eyebrow{font-size:.8rem;text-transform:uppercase;letter-spacing:.1em;color:var(--blue);font-weight:800}h1{line-height:1.2}h2{font-size:1.2rem;color:var(--blue2);margin:28px 0 10px}.refresh{background:var(--soft);border-left:5px solid var(--blue);padding:17px 19px;border-radius:10px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.box{border:1px solid var(--line);border-radius:14px;padding:17px;background:#fbfdff}.box.green{background:var(--green)}.box.amber{background:var(--amber)}.box.red{background:var(--red)}.clues{padding-left:22px}.clues li{margin:7px 0}.compare{width:100%;border-collapse:collapse;margin-top:8px}.compare th,.compare td{padding:10px;border-bottom:1px solid var(--line);text-align:left}.compare th{background:#f4f8fb}.case{background:#f9fbfd;border:1px solid var(--line);border-radius:16px;padding:20px}.reveal{border:0;background:var(--blue);color:#fff;font-weight:800;padding:10px 15px;border-radius:10px;cursor:pointer}.answer{display:none;margin-top:14px;background:var(--green);padding:16px;border-radius:11px}.answer.show{display:block}.controls{display:flex;justify-content:space-between;gap:10px;margin-top:27px}.navbtn{border:1px solid var(--line);background:#fff;padding:10px 14px;border-radius:10px;cursor:pointer}.abbr{font-size:.92rem;color:var(--muted)}.mobile-topics{display:none;width:100%;padding:11px;border:1px solid var(--line);border-radius:10px;background:#fff}footer{padding:24px;text-align:center;color:var(--muted);font-size:.9rem}
.drawer-toggle{width:42px;height:42px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--blue2);font-size:1.35rem;cursor:pointer}.drawer-toggle:hover{background:var(--soft)}.subject-drawer{position:fixed;top:0;left:0;bottom:0;width:355px;max-width:91vw;background:#fff;z-index:100;transform:translateX(-102%);transition:transform .24s ease;box-shadow:18px 0 45px rgba(20,55,85,.18);overflow-y:auto;border-right:1px solid var(--line)}.subject-drawer.open{transform:translateX(0)}.drawer-overlay{position:fixed;inset:0;background:rgba(25,42,58,.32);z-index:90;opacity:0;pointer-events:none;transition:opacity .2s ease}.drawer-overlay.open{opacity:1;pointer-events:auto}.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:20px 19px;border-bottom:1px solid var(--line);background:#f9fcff}.drawer-kicker{font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--blue);font-weight:800}.drawer-close{width:38px;height:38px;border:0;border-radius:10px;background:#eef5fb;color:var(--blue2);font-size:1.65rem;cursor:pointer}.drawer-sections{padding:12px}.drawer-link{width:100%;display:grid;grid-template-columns:30px 1fr;align-items:center;gap:10px;padding:14px 15px;margin-bottom:8px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--text);text-align:left;cursor:pointer;font-weight:700;text-decoration:none}.drawer-link:hover{background:#f5f9fd}.drawer-link.active{background:var(--soft);color:var(--blue2);border-color:#b8d7ef}.drawer-link.disabled{opacity:.48;cursor:not-allowed;background:#f7f9fb}.drawer-note{margin:10px 15px 22px;padding:13px;border-radius:12px;background:#f1f5f8;color:var(--muted);font-size:.88rem}body.drawer-open{overflow:hidden}
@media(max-width:850px){.layout{display:block;padding:15px}.sidebar{display:none}.mobile-topics{display:block;margin-bottom:14px}.topbar{flex-direction:row;align-items:center;flex-wrap:wrap}.brand{flex:1}.search{order:3;width:100%}.grid{grid-template-columns:1fr}.primer,.hero{padding:23px}.hero h1{font-size:1.65rem}}
@media print{header,.sidebar,.mobile-topics,.controls,footer,.subject-drawer,.drawer-overlay{display:none!important}.layout{display:block;padding:0}.primer,.hero{box-shadow:none;border:0}.answer{display:block}}

/* Specialty identity themes */
body[data-section="cardiology"]{
  --section:#b42336;
  --section-dark:#7f1d2d;
  --section-soft:#fff1f3;
  --section-border:#f2c6ce;
  --section-glow:rgba(180,35,54,.12);
}
body[data-section="pulmonary"]{
  --section:#0f8b8d;
  --section-dark:#0b6264;
  --section-soft:#e9fbfb;
  --section-border:#b9e7e7;
  --section-glow:rgba(15,139,141,.13);
}

body[data-section] header{border-top:6px solid var(--section)}
body[data-section] .brand{color:var(--section-dark)}
body[data-section] .drawer-toggle{color:var(--section-dark);border-color:var(--section-border)}
body[data-section] .drawer-toggle:hover{background:var(--section-soft)}
body[data-section] .hero{
  position:relative;
  overflow:hidden;
  border-color:var(--section-border);
  background:linear-gradient(135deg,#fff 0%,var(--section-soft) 100%);
  box-shadow:0 12px 34px var(--section-glow);
}
body[data-section] .hero:after{
  content:"";position:absolute;right:-55px;top:-65px;width:210px;height:210px;
  border-radius:50%;background:var(--section-glow);pointer-events:none
}
body[data-section] .hero h1,
body[data-section] h2{color:var(--section-dark)}
body[data-section] .eyebrow{color:var(--section);}
body[data-section] .refresh{background:var(--section-soft);border-left-color:var(--section)}
body[data-section] .topic-btn.active{background:var(--section-soft);color:var(--section-dark)}
body[data-section] .topic-btn:hover{background:var(--section-soft)}
body[data-section] .reveal{background:var(--section)}
body[data-section] .reveal:hover{background:var(--section-dark)}
body[data-section] .drawer-link.active{
  background:var(--section-soft);color:var(--section-dark);border-color:var(--section-border)
}
body[data-section] .sidebar{border-top:5px solid var(--section)}
body[data-section] .mobile-topics{border-color:var(--section-border)}
body[data-section] .section-badge{
  display:inline-flex;align-items:center;gap:9px;margin-bottom:14px;padding:8px 12px;
  border-radius:999px;background:var(--section);color:#fff;font-size:.83rem;font-weight:800;
  letter-spacing:.02em;box-shadow:0 7px 18px var(--section-glow)
}
body[data-section] .section-icon{font-size:1rem}


body[data-section="neurology"]{--section:#6554c0;--section-dark:#46378f;--section-soft:#f2efff;--section-border:#d6cff7;--section-glow:rgba(101,84,192,.14)}
body[data-section="endocrinology"]{--section:#c26a12;--section-dark:#8a4705;--section-soft:#fff5e8;--section-border:#f2d3ac;--section-glow:rgba(194,106,18,.14)}
body[data-section="nephrology"]{--section:#2878b8;--section-dark:#185486;--section-soft:#ebf6ff;--section-border:#bedcf2;--section-glow:rgba(40,120,184,.14)}
body[data-section="gastroenterology"]{--section:#628b24;--section-dark:#416315;--section-soft:#f3fae9;--section-border:#d2e6ae;--section-glow:rgba(98,139,36,.14)}
body[data-section="infectious"]{--section:#9a5b20;--section-dark:#6d3c12;--section-soft:#fff6e9;--section-border:#ead0ae;--section-glow:rgba(154,91,32,.14)}


body[data-section="hematology"]{
  --section:#8c3f8f;--section-dark:#642b68;--section-soft:#faeffb;
  --section-border:#e5c7e7;--section-glow:rgba(140,63,143,.14)
}

body[data-section="emergency"]{--section:#d64b32;--section-dark:#99301f;--section-soft:#fff0eb;--section-border:#f0c5b8;--section-glow:rgba(50,50,50,.10)}

body[data-section="surgery"]{--section:#526d82;--section-dark:#354b5d;--section-soft:#eff5f8;--section-border:#cbd9e1;--section-glow:rgba(50,50,50,.10)}

body[data-section="obgyn"]{--section:#c14e86;--section-dark:#8a315e;--section-soft:#fff0f7;--section-border:#edc3d8;--section-glow:rgba(50,50,50,.10)}

body[data-section="pediatrics"]{--section:#347c9c;--section-dark:#21576f;--section-soft:#edf8fc;--section-border:#bfdeeb;--section-glow:rgba(50,50,50,.10)}

body[data-section="psychiatry"]{--section:#7b5ea7;--section-dark:#554077;--section-soft:#f5f0fb;--section-border:#d8c9e9;--section-glow:rgba(50,50,50,.10)}

body[data-section="pharm-toxicology"]{--section:#b06a27;--section-dark:#7c4717;--section-soft:#fff5e9;--section-border:#ebcfab;--section-glow:rgba(50,50,50,.10)}

body[data-section="musculoskeletal"]{--section:#3f8464;--section-dark:#285a43;--section-soft:#edf8f2;--section-border:#c2dfd0;--section-glow:rgba(50,50,50,.10)}

body[data-section="ophthalmology"]{--section:#3f6fa8;--section-dark:#294e78;--section-soft:#edf4fc;--section-border:#c5d7ec;--section-glow:rgba(50,50,50,.10)}

body[data-section="ent"]{--section:#9a6348;--section-dark:#68402f;--section-soft:#faf2ed;--section-border:#e2cbbb;--section-glow:rgba(50,50,50,.10)}


/* IMG Registry typography / structure only — specialty color themes above remain authoritative */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');
body,button,input,select{font-family:Montserrat,Arial,Helvetica,sans-serif}
.brand,.hero h1,.primer h1,h1,h2{font-family:"Cormorant Garamond",Georgia,serif}
.brand{font-size:1.38rem}
.hero h1{font-size:2.35rem;line-height:1.08}
.primer{padding:34px}
.hero{padding:38px}
.topic-btn,.drawer-link,.reveal,.navbtn{font-family:Montserrat,Arial,sans-serif}
@media(max-width:850px){.hero{padding:26px 23px}.hero h1{font-size:1.9rem}.primer{padding:24px}.brand{font-size:1.22rem}}


/* =========================================================
   IMG Registry Step 3 site shell
   Structural/navigation layer only. Specialty theme variables
   above remain authoritative for primer content colors.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');
body,button,input,select{font-family:Montserrat,Arial,Helvetica,sans-serif}
.brand,.hero h1,.primer h1,.home-hero h1,h1,h2{font-family:"Cormorant Garamond",Georgia,serif}

.site-rail{position:fixed;left:0;top:0;bottom:0;width:248px;background:linear-gradient(180deg,#0f2745 0%,#102f55 100%);color:#fff;padding:24px 18px;overflow:auto;z-index:70;box-shadow:12px 0 34px rgba(15,39,69,.12)}
.site-rail-brand{font-family:"Cormorant Garamond",Georgia,serif;font-size:1.42rem;line-height:1.08;font-weight:700;padding:2px 10px 18px;border-bottom:1px solid rgba(255,255,255,.14);margin-bottom:12px}
.site-rail-brand small{display:block;font-family:Montserrat,Arial,sans-serif;font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;color:#9ec6ea;margin-top:7px}
.site-rail-group{font-size:.68rem;text-transform:uppercase;letter-spacing:.1em;color:#8fb6da;font-weight:800;padding:15px 10px 6px}
.site-rail a{display:block;color:#dbe7f5;text-decoration:none;padding:9px 10px;border-radius:9px;margin:2px 0;font-size:.82rem;font-weight:600;transition:.16s}
.site-rail a:hover{background:rgba(255,255,255,.10);color:#fff;transform:translateX(2px)}
.site-rail a.active{background:rgba(255,255,255,.13);color:#fff}
.site-rail .primer-home{border:1px solid rgba(158,198,234,.28);margin:7px 0 5px}
body.with-site-rail{padding-left:248px}
body.with-site-rail>header{left:248px}
body.with-site-rail .layout{max-width:1560px;grid-template-columns:270px minmax(0,1fr);gap:20px}
body.with-site-rail .sidebar{height:calc(100vh - 104px)}

.topbar{max-width:1560px}
.brand{font-size:1.34rem}
.brand span{font-family:Montserrat,Arial,sans-serif;font-size:.84rem;font-weight:600;color:#5d7183;margin-left:5px}
.site-back{display:inline-flex;align-items:center;gap:7px;text-decoration:none;color:#335d82;font-size:.79rem;font-weight:700;white-space:nowrap;padding:8px 10px;border-radius:9px;border:1px solid var(--line);background:#fff}
.site-back:hover{background:#f4f8fc}
.header-actions{display:flex;align-items:center;gap:9px}
.hero h1{font-size:2.35rem;line-height:1.08}
.primer{padding:34px}.hero{padding:38px}
.topic-btn,.drawer-link,.reveal,.navbtn{font-family:Montserrat,Arial,sans-serif}

/* Primer landing page uses the same site shell */
body.primer-home-page{padding-left:248px}
body.primer-home-page .home-top{position:sticky;top:0;z-index:30}
body.primer-home-page .home-top-inner{max-width:1280px;display:flex;align-items:center;justify-content:space-between;gap:14px}
body.primer-home-page .home-title{font-family:"Cormorant Garamond",Georgia,serif;font-size:1.35rem;font-weight:700;color:#254e72}
body.primer-home-page .home-wrap{max-width:1280px}
.home-menu-row{display:flex;align-items:center;gap:10px}

@media(max-width:1180px){
  .site-rail{display:none}
  body.with-site-rail,body.primer-home-page{padding-left:0}
  body.with-site-rail>header{left:0}
  body.with-site-rail .layout{max-width:1300px;grid-template-columns:290px 1fr}
}
@media(max-width:850px){
  .hero{padding:26px 23px}.hero h1{font-size:1.9rem}.primer{padding:24px}.brand{font-size:1.22rem}
  .site-back{font-size:0;padding:9px}.site-back:before{content:"←";font-size:1.05rem}
}
@media(max-width:620px){
  body.primer-home-page .home-top-inner{padding:12px 16px}.home-title{font-size:1.1rem!important}
}
@media print{.site-rail,.site-back{display:none!important}body.with-site-rail,body.primer-home-page{padding-left:0}}
