/*
 Tailwind-inspired, scope-safe utilities for MedEx dashboards.
 Everything is scoped under .medexp-tw so themes remain unaffected.
 This is a minimal, performance-focused subset (not full Tailwind).
*/

/* Base typography for the Tailwind-scoped dashboard shell */
.medexp-tw{
 font-family:var(--medexp-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial);
 color:var(--medexp-text, #0f172a);
 font-size:16px;
 line-height:1.5;
 -webkit-font-smoothing:antialiased;
 -moz-osx-font-smoothing:grayscale;
}
/* Keep links sane inside the app shell (WP themes often style anchors aggressively) */
.medexp-tw a{ color:inherit; text-decoration:none; }
.medexp-tw a:hover{ text-decoration:none; }
.medexp-tw h1{ font-size:clamp(1.35rem, 2vw, 1.9rem); letter-spacing:-0.02em; }
.medexp-tw h2{ font-size:1.15rem; letter-spacing:-0.01em; }


:where(.medexp-tw) {
 --tw-gray-50:#f9fafb;
 --tw-gray-100:#f3f4f6;
 --tw-gray-200:#e5e7eb;
 --tw-gray-300:#d1d5db;
 --tw-gray-400:#9ca3af;
 --tw-gray-500:#6b7280;
 --tw-gray-600:#4b5563;
 --tw-gray-700:#374151;
 --tw-gray-900:#111827;
 --tw-indigo-500:var(--medexp-brand-blue, #1a4f9c);
 --tw-indigo-600:var(--medexp-brand-blue, #1a4f9c);
 --tw-emerald-500:var(--medexp-brand-teal, #00a676);
 --tw-amber-500:#f59e0b;
 --tw-rose-500:#f43f5e;
 --tw-white:#ffffff;

 /* Extended palette for enterprise dashboard */
 --tw-slate-600:#475569;
 --tw-slate-900:#0f172a;
 --tw-sky-600:var(--medexp-brand-blue, #1a4f9c);
 --tw-amber-600:#d97706;
 --tw-emerald-600:var(--medexp-brand-teal, #00a676);
 --tw-emerald-700:color-mix(in srgb, var(--medexp-brand-teal, #00a676) 80%, black 20%);

 /* Spacing + shadow tokens */
 --tw-space-4:1rem;
 --tw-shadow:0 10px 25px rgba(2,6,23,.08);

 color: var(--tw-gray-900);
 font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
 -webkit-font-smoothing: antialiased;
 -moz-osx-font-smoothing: grayscale;
}

/*
 Full-bleed dashboard wrapper
 Many WordPress themes constrain .entry-content width.
 When the dashboard is embedded via shortcode, we expand it to viewport width
 so it feels like a first-class SaaS app.
*/
.medexp-dashboardPage.medexp-tw{
 position:relative;
 left:50%;
 right:50%;
 margin-left:-50vw;
 margin-right:-50vw;
 width:100vw;
}
.medexp-dashboardPage .tw-shell{min-height:100vh;background:radial-gradient(900px 420px at 20% -10%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.18), transparent 60%), radial-gradient(900px 420px at 80% -10%, rgba(var(--medexp-brand-teal-rgb,0,166,118),.10), transparent 60%), var(--tw-gray-50);}

/* Preflight-ish */
:where(.medexp-tw) *,
:where(.medexp-tw) *::before,
:where(.medexp-tw) *::after { box-sizing: border-box; }
:where(.medexp-tw) a { color: inherit; text-decoration: none; }
:where(.medexp-tw) button { font: inherit; }

/* Layout */
:where(.medexp-tw) .min-h-screen{min-height:100vh;}
:where(.medexp-tw) .w-full{width:100%;}
:where(.medexp-tw) .max-w-7xl{max-width:80rem;}
:where(.medexp-tw) .mx-auto{margin-left:auto;margin-right:auto;}
:where(.medexp-tw) .flex{display:flex;}
:where(.medexp-tw) .inline-flex{display:inline-flex;}
:where(.medexp-tw) .grid{display:grid;}
:where(.medexp-tw) .hidden{display:none;}
:where(.medexp-tw) .block{display:block;}
:where(.medexp-tw) .flex-col{flex-direction:column;}
:where(.medexp-tw) .items-center{align-items:center;}
:where(.medexp-tw) .items-start{align-items:flex-start;}
:where(.medexp-tw) .justify-between{justify-content:space-between;}
:where(.medexp-tw) .justify-center{justify-content:center;}
:where(.medexp-tw) .gap-2{gap:0.5rem;}
:where(.medexp-tw) .gap-3{gap:0.75rem;}
:where(.medexp-tw) .gap-4{gap:1rem;}
:where(.medexp-tw) .gap-6{gap:1.5rem;}

:where(.medexp-tw) .h-2{height:0.5rem;}
:where(.medexp-tw) .h-3{height:0.75rem;}
:where(.medexp-tw) .h-10{height:2.5rem;}
:where(.medexp-tw) .rounded-full{border-radius:9999px;}
:where(.medexp-tw) .overflow-hidden{overflow:hidden;}
:where(.medexp-tw) .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
:where(.medexp-tw) .text-center{text-align:center;}

:where(.medexp-tw) .p-2{padding:0.5rem;}
:where(.medexp-tw) .p-3{padding:0.75rem;}
:where(.medexp-tw) .p-4{padding:1rem;}
:where(.medexp-tw) .p-6{padding:1.5rem;}
:where(.medexp-tw) .px-3{padding-left:0.75rem;padding-right:0.75rem;}
:where(.medexp-tw) .px-4{padding-left:1rem;padding-right:1rem;}
:where(.medexp-tw) .px-6{padding-left:1.5rem;padding-right:1.5rem;}
:where(.medexp-tw) .py-2{padding-top:0.5rem;padding-bottom:0.5rem;}
:where(.medexp-tw) .py-3{padding-top:0.75rem;padding-bottom:0.75rem;}
:where(.medexp-tw) .py-4{padding-top:1rem;padding-bottom:1rem;}

:where(.medexp-tw) .mt-2{margin-top:0.5rem;}
:where(.medexp-tw) .mt-4{margin-top:1rem;}
:where(.medexp-tw) .mt-6{margin-top:1.5rem;}

/* Typography */
:where(.medexp-tw) .text-xs{font-size:0.75rem;line-height:1rem;}
:where(.medexp-tw) .text-sm{font-size:0.875rem;line-height:1.25rem;}
:where(.medexp-tw) .text-base{font-size:1rem;line-height:1.5rem;}
:where(.medexp-tw) .text-lg{font-size:1.125rem;line-height:1.75rem;}
:where(.medexp-tw) .text-2xl{font-size:1.5rem;line-height:2rem;}
:where(.medexp-tw) .font-medium{font-weight:500;}
:where(.medexp-tw) .font-semibold{font-weight:600;}
:where(.medexp-tw) .font-bold{font-weight:700;}
:where(.medexp-tw) .tracking-tight{letter-spacing:-0.015em;}

:where(.medexp-tw) .text-gray-900{color:var(--tw-gray-900);}
:where(.medexp-tw) .text-gray-700{color:var(--tw-gray-700);}
:where(.medexp-tw) .text-gray-600{color:var(--tw-gray-600);}
:where(.medexp-tw) .text-gray-500{color:var(--tw-gray-500);}
:where(.medexp-tw) .text-indigo-600{color:var(--tw-indigo-600);}

/* Surfaces */
:where(.medexp-tw) .bg-white{background-color:var(--tw-white);}
:where(.medexp-tw) .bg-gray-50{background-color:var(--tw-gray-50);}
:where(.medexp-tw) .bg-gray-100{background-color:var(--tw-gray-100);}

:where(.medexp-tw) .border{border-width:1px;border-style:solid;}
:where(.medexp-tw) .border-gray-200{border-color:var(--tw-gray-200);}
:where(.medexp-tw) .rounded-lg{border-radius:0.75rem;}
:where(.medexp-tw) .rounded-xl{border-radius:1rem;}
:where(.medexp-tw) .rounded-2xl{border-radius:1.25rem;}

:where(.medexp-tw) .shadow-sm{box-shadow:0 1px 2px rgba(0,0,0,0.06);}
:where(.medexp-tw) .shadow{box-shadow:0 10px 20px rgba(0,0,0,0.08);}

/*
 WP theme global button:hover override.
 Many WP themes add border-color / outline on button:hover / :focus.
 Neutralize for ALL buttons inside our dashboard wrapper.
*/
.medexp-tw button:hover,
.medexp-tw button:focus{
 outline: none !important;
 border-color: inherit !important;
}
.medexp-tw button.tw-btn:hover{ border-color: transparent !important; }
.medexp-tw button.tw-btn-secondary:hover{ border-color: rgba(var(--medexp-brand-blue-rgb,26,79,156),0.38) !important; }
.medexp-tw button.tw-btn-ghost:hover{ border-color: transparent !important; }

/* Buttons */
:where(.medexp-tw) .tw-btn{
 border-radius:9999px;
 padding:0.65rem 1.15rem;
 font-weight:900;
 letter-spacing:-0.01em;
 transition:transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s cubic-bezier(0.4,0,0.2,1), filter 0.2s cubic-bezier(0.4,0,0.2,1), background-color 0.2s cubic-bezier(0.4,0,0.2,1), border-color 0.2s cubic-bezier(0.4,0,0.2,1), color 0.2s cubic-bezier(0.4,0,0.2,1);

 /* Ensure icons align horizontally with button labels */
 display:inline-flex;
 cursor:pointer;
 align-items:center;
 justify-content:center;
 gap:0.55rem;
 line-height:1.1;
}

/* Our default icon class is block-level for standalone usage; in buttons it must be inline. */
:where(.medexp-tw) .tw-btn .tw-ico{display:inline-block;}
:where(.medexp-tw) .tw-btn:active{transform:translateY(1px);} 
:where(.medexp-tw) .tw-btn:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.18), 0 10px 22px rgba(17,24,39,.08);} 
:where(.medexp-tw) .tw-btn-primary{background:var(--medexp-primary-grad, var(--medexp-brand-teal, #00a676));color:#fff;border:1px solid rgba(0,0,0,0.06);box-shadow:0 14px 26px -20px rgba(var(--medexp-brand-teal-rgb,0,166,118),0.95), 0 10px 18px -14px rgba(0,0,0,0.18);text-shadow:0 1px 1px rgba(0,0,0,0.22);}
:where(.medexp-tw) .tw-btn-primary:hover{transform:translateY(-2px);box-shadow:0 20px 32px -22px rgba(var(--medexp-brand-teal-rgb,0,166,118),0.95), 0 18px 26px -18px rgba(0,0,0,0.18);filter:brightness(0.96);}
:where(.medexp-tw) .tw-btn-secondary{background:rgba(255,255,255,0.98);color:var(--medexp-brand-blue, #1a4f9c);border:2px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),0.38);box-shadow:0 10px 18px -16px rgba(var(--medexp-brand-navy-rgb,15,23,42),0.14);}
:where(.medexp-tw) .tw-btn-secondary:hover{background-color:var(--tw-gray-50);} 
:where(.medexp-tw) .tw-btn-ghost{background:transparent;border:1px solid transparent;color:var(--tw-gray-700);} 
:where(.medexp-tw) .tw-btn-ghost:hover{background-color:var(--tw-gray-100);} 

/*
 Button contrast fixes
 WP themes + our non-specific :where() selectors can cause anchor colors to override button text.
 Force correct foreground colors for all button variants (including <a> buttons).
*/
.medexp-tw .tw-btn,
.medexp-tw a.tw-btn,
.medexp-tw a.tw-btn:visited{ text-decoration:none !important; }

.medexp-tw .tw-btn-primary,
.medexp-tw a.tw-btn-primary,
.medexp-tw a.tw-btn-primary:visited{ color:#fff !important; }

.medexp-tw .tw-btn-secondary,
.medexp-tw a.tw-btn-secondary,
.medexp-tw a.tw-btn-secondary:visited{ color:var(--tw-gray-900) !important; }

.medexp-tw .tw-btn-ghost,
.medexp-tw a.tw-btn-ghost,
.medexp-tw a.tw-btn-ghost:visited{ color:var(--tw-gray-700) !important; }

/* Ensure nested spans/icons inside buttons inherit the correct foreground */
.medexp-tw .tw-btn-primary *{ color:inherit !important; }

/*
 WP themes (and our own global .medexp-scope a rule) can override anchor colors.
 Force button contrast so we never end up with "blue on blue" or dark text on dark buttons.
*/
.medexp-scope a.tw-btn,
.medexp-scope a.tw-btn:visited{ text-decoration:none !important; }
.medexp-scope a.tw-btn-primary,
.medexp-scope a.tw-btn-primary:visited{ color:#fff !important; }
.medexp-scope a.tw-btn-secondary,
.medexp-scope a.tw-btn-secondary:visited{ color:var(--tw-gray-900) !important; }
.medexp-scope a.tw-btn-ghost,
.medexp-scope a.tw-btn-ghost:visited{ color:var(--tw-gray-700) !important; }

/* If a button contains nested tags (e.g., <span>), keep the foreground consistent */
.medexp-scope .tw-btn-primary *{ color:inherit !important; }

/* Ensure button-like cursor on Tailwind buttons in scoped containers */
.medexp-scope .tw-btn{ cursor:pointer; }
.medexp-scope .tw-btn[disabled],
.medexp-scope .tw-btn:disabled{ cursor:not-allowed; }

/* WP themes sometimes override anchor colors inside scoped containers.
 :where() selectors have 0 specificity, so we add explicit, higher-specificity guards. */
.medexp-tw a.tw-btn,
.medexp-tw a.tw-btn:visited{ text-decoration:none !important; }
.medexp-tw a.tw-btn-primary,
.medexp-tw a.tw-btn-primary:visited{ color:#fff !important; }
.medexp-tw a.tw-btn-secondary,
.medexp-tw a.tw-btn-secondary:visited{ color:var(--tw-gray-900) !important; }
.medexp-tw a.tw-btn-ghost,
.medexp-tw a.tw-btn-ghost:visited{ color:var(--tw-gray-700) !important; }
.medexp-tw a.tw-btn *{ color:inherit !important; }

:where(.medexp-tw) button[disabled]{cursor:not-allowed;}

/* Inputs */
:where(.medexp-tw) .tw-input{width:100%;padding:0.65rem 0.85rem;border-radius:0.85rem;border:1px solid var(--tw-gray-200);background:var(--tw-white);color:var(--tw-gray-900);outline:none;transition:border-color .12s ease, box-shadow .12s ease;} 
:where(.medexp-tw) .tw-input:focus{border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.8);box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.16);} 

/* Nav */
:where(.medexp-tw) .tw-shell{position:relative;}
:where(.medexp-tw) .tw-overlay{display:none;}
:where(.medexp-tw) .tw-navClose{display:none;}
:where(.medexp-tw) .tw-sidebar{width:18rem;flex:0 0 18rem;position:sticky;top:0;align-self:flex-start;height:100vh;padding:1.25rem;background:linear-gradient(180deg,#fff,rgba(249,250,251,.6));border-right:1px solid var(--tw-gray-200);} 
:where(.medexp-tw) .tw-navlink{display:flex;align-items:center;gap:0.65rem;padding:0.6rem 0.75rem;border-radius:0.85rem;color:var(--tw-gray-700);font-weight:600;} 
:where(.medexp-tw) .tw-navlink:hover{background:var(--tw-gray-50);}
:where(.medexp-tw) .tw-navlink:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.14);} 
:where(.medexp-tw) .tw-navlink.is-active{background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.10);color:var(--tw-indigo-600);} 
:where(.medexp-tw) .tw-navicon{width:1.15rem;height:1.15rem;display:inline-flex;align-items:center;justify-content:center;} 

:where(.medexp-tw) .tw-topbar{position:sticky;top:0;z-index:40;background:rgba(249,250,251,.86);backdrop-filter:saturate(160%) blur(12px);border-bottom:1px solid var(--tw-gray-200);} 
:where(.medexp-tw) .tw-topbar__inner{max-width:88rem;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;gap:1rem;} 

/* Main content width/padding (matches topbar) */
:where(.medexp-tw) .tw-main{max-width:88rem;margin:0 auto;padding:1.5rem;}
@media (min-width: 1024px){
 :where(.medexp-tw) .tw-main{padding:1.75rem 2rem;}
}

:where(.medexp-tw) .tw-card{border-radius:18px;box-shadow:0 1px 0 rgba(17,24,39,.02), 0 4px 14px rgba(2,6,23,.05), 0 12px 32px rgba(2,6,23,.03);border:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.92);backdrop-filter:blur(10px);}
:where(.medexp-tw) .tw-card__pad{padding:1.35rem;} 
@media (min-width: 1024px){
 :where(.medexp-tw) .tw-card__pad{padding:1.5rem;}
}

:where(.medexp-tw) .tw-kicker{font-size:0.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--tw-gray-500);font-weight:700;} 

/* Dashboard components */
:where(.medexp-tw) .tw-muted{color:var(--tw-gray-600);font-size:0.9375rem;line-height:1.35rem;}
:where(.medexp-tw) .tw-title{font-size:1.5rem;line-height:2rem;font-weight:800;letter-spacing:-0.02em;}
:where(.medexp-tw) .tw-h2{font-size:1.125rem;line-height:1.6rem;font-weight:800;letter-spacing:-0.01em;}
:where(.medexp-tw) .tw-sectionhead{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;row-gap:.75rem;flex-wrap:wrap;margin-bottom:0.9rem;}
:where(.medexp-tw) .tw-sectionhead__sub{margin-top:0.25rem;color:var(--tw-gray-500);font-size:0.875rem;}
:where(.medexp-tw) .tw-divider{height:1px;background:rgba(148,163,184,.15);margin:1rem 0;}
:where(.medexp-tw) .tw-progress{background:rgba(148,163,184,.15);border-radius:9999px;overflow:hidden;height:0.45rem;position:relative;}
:where(.medexp-tw) .tw-progress__fill{height:100%;background:linear-gradient(90deg, #3BC6C2, #117673);width:0;border-radius:inherit;position:relative;overflow:hidden;transition:width .4s cubic-bezier(.34,1.56,.64,1);}
/* Shine sweep on progress fill */
:where(.medexp-tw) .tw-progress__fill::after{
 content:"";
 position:absolute;
 inset:0;
 background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,.30) 40%, rgba(255,255,255,.30) 60%, transparent 100%);
 animation:twProgressShine 1.8s ease-in-out infinite;
}
@keyframes twProgressShine{0%{transform:translateX(-120%);}100%{transform:translateX(250%);}}
:where(.medexp-tw) .tw-statRow{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;}
:where(.medexp-tw) .tw-stat{font-size:2.1rem;line-height:1;font-weight:800;letter-spacing:-0.02em;}
:where(.medexp-tw) .tw-statSmall{font-size:0.875rem;font-weight:700;color:var(--tw-gray-600);}
:where(.medexp-tw) .tw-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.75rem;}
:where(.medexp-tw) .tw-tile{border:1px solid var(--tw-gray-200);border-radius:1rem;padding:0.9rem;background:var(--tw-white);transition:transform .08s ease, box-shadow .12s ease;}
:where(.medexp-tw) .tw-tile:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(0,0,0,0.08);}
:where(.medexp-tw) .tw-tile__title{font-weight:800;color:var(--tw-gray-900);font-size:0.875rem;line-height:1.15rem;}
:where(.medexp-tw) .tw-tile__meta{margin-top:0.35rem;color:var(--tw-gray-500);font-size:0.75rem;font-weight:700;}
:where(.medexp-tw) .tw-badges{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.75rem;}
:where(.medexp-tw) .tw-badgeCard{border:1px solid var(--tw-gray-200);border-radius:1rem;padding:0.85rem;background:var(--tw-white);display:flex;gap:0.75rem;align-items:center;}
:where(.medexp-tw) .tw-badgeIcon{width:2.25rem;height:2.25rem;border-radius:0.9rem;display:flex;align-items:center;justify-content:center;background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);color:var(--tw-indigo-600);font-weight:800;}
:where(.medexp-tw) .tw-badgeLabel{font-weight:800;font-size:0.875rem;line-height:1.15rem;}

/* ── Redesigned Badges v2 ── */
:where(.medexp-tw) .tw-badgeFilters{display:flex;gap:0.5rem;margin-bottom:1.25rem;flex-wrap:wrap;}
:where(.medexp-tw) .tw-badgeFilter{display:inline-flex;align-items:center;gap:0.35rem;padding:0.4rem 0.85rem;border-radius:999px;border:1px solid var(--tw-gray-200);background:var(--tw-white);font-size:0.8rem;font-weight:700;color:var(--tw-gray-600);cursor:pointer;transition:all .15s;}
:where(.medexp-tw) .tw-badgeFilter:hover{border-color:rgba(23,157,153,.3);color:#179D99;}
:where(.medexp-tw) .tw-badgeFilter.is-active{background:rgba(23,157,153,.08);color:#179D99;border-color:rgba(23,157,153,.25);}
:where(.medexp-tw) .tw-badgeFilter__count{background:rgba(148,163,184,.12);border-radius:999px;padding:0.05rem 0.4rem;font-size:0.7rem;min-width:1.2rem;text-align:center;line-height:1.4;}
:where(.medexp-tw) .tw-badgeFilter.is-active .tw-badgeFilter__count{background:rgba(23,157,153,.12);}
:where(.medexp-tw) .tw-badgeGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:0.75rem;}
:where(.medexp-tw) .tw-badgeCard2{display:flex;gap:0.85rem;align-items:flex-start;padding:1rem;border-radius:1rem;border:1px solid var(--tw-gray-200);background:var(--tw-white);transition:transform .1s,box-shadow .15s;}
:where(.medexp-tw) .tw-badgeCard2:not(.is-locked):hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.08);}
:where(.medexp-tw) .tw-badgeCard2.is-locked{opacity:.5;}
:where(.medexp-tw) .tw-badgeCard2__icon{width:3rem;height:3rem;flex-shrink:0;border-radius:0.85rem;display:flex;align-items:center;justify-content:center;}
:where(.medexp-tw) .tw-badgeCard2__emoji{font-size:1.35rem;}
:where(.medexp-tw) .tw-badgeCard2.is-locked .tw-badgeCard2__emoji{filter:grayscale(1);}
:where(.medexp-tw) .tw-badgeCard2__info{flex:1;min-width:0;}
:where(.medexp-tw) .tw-badgeCard2__title{font-weight:800;font-size:0.875rem;line-height:1.25;color:var(--tw-gray-900);}
:where(.medexp-tw) .tw-badgeCard2__desc{font-size:0.75rem;color:var(--tw-gray-500);font-weight:600;margin-top:0.15rem;line-height:1.35;}
:where(.medexp-tw) .tw-badgeTierLabel{display:inline-block;font-size:0.6rem;font-weight:800;color:#179D99;background:rgba(23,157,153,.1);border-radius:999px;padding:0.1rem 0.4rem;vertical-align:middle;margin-left:0.2rem;}
:where(.medexp-tw) .tw-badgeCard2.is-locked .tw-badgeTierLabel{opacity:.4;}
:where(.medexp-tw) .tw-badgeCard2__progress{margin-top:0.4rem;display:flex;align-items:center;gap:0.45rem;}
:where(.medexp-tw) .tw-badgeTierDots{display:flex;gap:0.2rem;flex-shrink:0;}
:where(.medexp-tw) .tw-badgeTierDot{width:6px;height:6px;border-radius:50%;background:rgba(148,163,184,.2);}
:where(.medexp-tw) .tw-badgeTierDot.is-filled{background:#179D99;}
:where(.medexp-tw) .tw-badgeProgressBar{flex:1;height:5px;border-radius:999px;background:rgba(148,163,184,.1);overflow:hidden;}
:where(.medexp-tw) .tw-badgeProgressBar__fill{height:100%;border-radius:999px;background:rgba(23,157,153,.45);transition:width .3s ease;}
:where(.medexp-tw) .tw-badgeCard2__progText{font-size:0.65rem;font-weight:700;color:var(--tw-gray-400);white-space:nowrap;}

/* ── Leaderboard Redesign ── */
.medexp-lbStats{display:flex;gap:0.75rem;margin-bottom:1.25rem;}
.medexp-lbStatPill{flex:1;display:flex;align-items:center;gap:0.65rem;padding:0.75rem 0.85rem;border-radius:0.85rem;background:rgba(245,158,11,.04);border:1px solid rgba(245,158,11,.1);}
.medexp-lbStatPill__emoji{font-size:1.3rem;flex-shrink:0;}
.medexp-lbStatPill__val{font-weight:800;font-size:1.1rem;color:var(--tw-gray-900);line-height:1.2;}
.medexp-lbStatPill__label{font-size:0.7rem;font-weight:700;color:var(--tw-gray-400);line-height:1;}
.medexp-lbOptRow{display:flex;align-items:center;margin-bottom:1rem;}
.medexp-lbToggleLabel{display:inline-flex;align-items:center;gap:0.5rem;font-size:0.8rem;font-weight:700;color:var(--tw-gray-500);cursor:pointer;}
.medexp-lbToggleLabel input[type="checkbox"]{width:16px;height:16px;accent-color:#179D99;}

/* CTA card (opt-in) */
.medexp-lbCta{text-align:center;padding:2.5rem 1.5rem;border-radius:1rem;background:linear-gradient(135deg,rgba(245,158,11,.04),rgba(251,191,36,.06));border:1px dashed rgba(245,158,11,.2);}
.medexp-lbCta__icon{font-size:2.5rem;margin-bottom:0.5rem;}
.medexp-lbCta__title{font-weight:800;font-size:1.1rem;color:var(--tw-gray-900);margin-bottom:0.35rem;}
.medexp-lbCta__desc{font-size:0.85rem;color:var(--tw-gray-500);font-weight:600;margin-bottom:1.25rem;line-height:1.5;}
.medexp-lbCta__btn{display:inline-flex;align-items:center;gap:0.4rem;padding:0.65rem 1.5rem;border-radius:999px;border:none;background:linear-gradient(135deg,#F59E0B,#FBBF24);color:#fff;font-weight:800;font-size:0.9rem;cursor:pointer;box-shadow:0 4px 12px rgba(245,158,11,.25);transition:transform .1s,box-shadow .15s;}
.medexp-lbCta__btn:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(245,158,11,.3);}
.medexp-lbCta__btn svg.tw-ico{width:16px;height:16px;}

/* Podium */
.medexp-lbPodium{display:flex;align-items:flex-end;justify-content:center;gap:0.5rem;padding:1.5rem 0 0.5rem;}
.medexp-lbPodiumCol{display:flex;flex-direction:column;align-items:center;flex:1;max-width:120px;}
.medexp-lbPodiumCol.is-me .medexp-lbPodiumName{font-weight:800;}
.medexp-lbPodiumMedal{font-size:1.4rem;margin-bottom:0.35rem;}
.medexp-lbPodiumAvatar{border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.12);margin-bottom:0.4rem;}
.medexp-lbPodiumAvatar span{font-weight:800;font-size:1rem;color:#fff;text-transform:uppercase;}
.medexp-lbPodiumName{font-size:0.75rem;font-weight:700;color:var(--tw-gray-700);text-align:center;line-height:1.25;margin-bottom:0.15rem;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.medexp-lbPodiumXP{font-size:0.7rem;font-weight:800;color:#F59E0B;margin-bottom:0.5rem;}
.medexp-lbPodiumBar{width:100%;max-width:64px;border-radius:8px 8px 0 0;min-height:20px;}
.medexp-lbYou{display:inline-block;font-size:0.55rem;font-weight:800;color:#179D99;background:rgba(23,157,153,.1);border-radius:999px;padding:0.05rem 0.35rem;margin-left:0.25rem;vertical-align:middle;}

/* Ranked list (positions 4+) */
.medexp-lbRankedList{margin-top:0.5rem;border-top:1px solid var(--tw-gray-200,#e2e8f0);padding-top:0.5rem;}
.medexp-lbRow{display:flex;align-items:center;gap:0.75rem;padding:0.6rem 0.75rem;border-radius:0.75rem;transition:background .1s;}
.medexp-lbRow.is-me{background:rgba(23,157,153,.05);}
.medexp-lbRankCircle{width:30px;height:30px;border-radius:50%;background:rgba(22,44,85,.06);display:flex;align-items:center;justify-content:center;font-size:0.75rem;font-weight:800;color:var(--tw-gray-500);flex-shrink:0;}
.medexp-lbAvatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,rgba(23,157,153,.15),rgba(22,44,85,.1));display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.medexp-lbAvatar span{font-weight:800;font-size:0.8rem;color:var(--tw-gray-600);text-transform:uppercase;}
.medexp-lbRowInfo{flex:1;min-width:0;}
.medexp-lbRowName{font-weight:700;font-size:0.85rem;color:var(--tw-gray-800);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.medexp-lbRowXP{font-size:0.75rem;font-weight:800;color:#F59E0B;background:rgba(245,158,11,.08);border-radius:999px;padding:0.3rem 0.65rem;white-space:nowrap;}

/* Tip card */
.medexp-lbTip{display:flex;align-items:center;gap:0.5rem;margin-top:1rem;padding:0.85rem 1rem;border-radius:0.85rem;background:rgba(23,157,153,.04);border:1px solid rgba(23,157,153,.1);font-size:0.8rem;font-weight:600;color:var(--tw-gray-600);line-height:1.4;}
.medexp-lbTip svg.tw-ico{width:16px;height:16px;color:#179D99;flex-shrink:0;}

@media (max-width:640px){
 .medexp-lbStats{flex-direction:column;gap:0.5rem;}
 .medexp-lbPodiumCol{max-width:100px;}
 .medexp-lbPodiumAvatar{width:36px!important;height:36px!important;}
 .medexp-lbPodiumAvatar span{font-size:0.85rem;}
}

:where(.medexp-tw) .tw-list{display:flex;flex-direction:column;gap:0.75rem;}

/* Vertical rhythm: stacked cards should never "touch" */
.medexp-tw .tw-main > .tw-card{ margin-bottom:1.25rem; }
.medexp-tw .tw-main > .tw-card:last-child{ margin-bottom:0; }
:where(.medexp-tw) .tw-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;border:1px solid var(--tw-gray-200);border-radius:1.1rem;padding:0.95rem;background:var(--tw-white);}
:where(.medexp-tw) .tw-row__main{min-width:0;}
:where(.medexp-tw) .tw-row__title{font-weight:800;letter-spacing:-0.01em;}
:where(.medexp-tw) .tw-row__meta{margin-top:0.25rem;color:var(--tw-gray-500);font-size:0.8125rem;font-weight:700;}
:where(.medexp-tw) .tw-row__actions{display:flex;gap:0.5rem;flex-wrap:wrap;justify-content:flex-end;}


/* Performance charts */
:where(.medexp-tw) .tw-perfGrid{align-items:stretch;}
:where(.medexp-tw) .tw-chartCard{
 border:1px solid rgba(148,163,184,.18);
 border-radius:18px;
 padding:1rem;
 background:linear-gradient(180deg, rgba(var(--medexp-brand-blue-rgb,26,79,156),.05), transparent 55%), rgba(255,255,255,.92);
 backdrop-filter:blur(10px);
 box-shadow:0 1px 0 rgba(17,24,39,.02), 0 4px 14px rgba(2,6,23,.05), 0 12px 32px rgba(2,6,23,.03);
 transition:box-shadow .2s ease, transform .2s cubic-bezier(.34,1.56,.64,1);
}
:where(.medexp-tw) .tw-chartCard:hover{box-shadow:0 1px 0 rgba(17,24,39,.02), 0 8px 22px rgba(2,6,23,.08), 0 16px 40px rgba(2,6,23,.05);transform:translateY(-2px);}
:where(.medexp-tw) .tw-chartWrap{margin-top:.55rem;position:relative;border-radius:14px;overflow:hidden;}
:where(.medexp-tw) .tw-chartWrap canvas{
 width:100%;
 height:160px;
 display:block;
 background:rgba(249,250,251,.45);
 border:1px solid rgba(148,163,184,.12);
 border-radius:14px;
}
:where(.medexp-tw) .tw-chartWrap canvas[data-chart="study-daily"]{ height:180px; }
:where(.medexp-tw) .tw-chartTip{
 margin-top:.55rem;
 display:flex;
 align-items:baseline;
 justify-content:space-between;
 gap:.75rem;
 color:var(--tw-gray-600);
 font-size:0.875rem;
}
:where(.medexp-tw) .tw-chartTip strong{ color:var(--tw-gray-900); font-weight:800; }
:where(.medexp-tw) .tw-chartTip em{ font-style:normal; color:var(--tw-gray-500); font-weight:700; }

/* Chart theme tokens (read by JS) */
.medexp-tw{
 --tw-chart-grid: rgba(148,163,184,.35);
 --tw-chart-axis: rgba(15,23,42,.62);
 --tw-chart-accent: var(--tw-indigo-600);
 --tw-chart-accent2: var(--tw-emerald-600);
 --tw-chart-accent3: var(--tw-sky-600);
}

/* ══════════════════════════════════════════════════════════════════════
   Performance Chart Wow Animations
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. Staggered Card Entrance ── */
@keyframes chartCardEntrance{
  from{opacity:0;transform:translateY(22px) scale(0.97);}
  to{opacity:1;transform:translateY(0) scale(1);}
}

:where(.medexp-tw) .tw-perfGrid.is-chart-entrance .tw-chartCard{
  opacity:0;
  animation:chartCardEntrance .65s cubic-bezier(.34,1.56,.64,1) both;
}
:where(.medexp-tw) .tw-perfGrid.is-chart-entrance > :nth-child(1) .tw-chartCard{animation-delay:0s;}
:where(.medexp-tw) .tw-perfGrid.is-chart-entrance > :nth-child(2) .tw-chartCard{animation-delay:.1s;}
:where(.medexp-tw) .tw-perfGrid.is-chart-entrance > :nth-child(3) .tw-chartCard{animation-delay:.22s;}

:where(.medexp-tw) .tw-perfGrid.is-chart-entered .tw-chartCard{
  opacity:1;
  transform:none;
}

/* ── 2. Chart Canvas Shimmer Sweep (post-draw) ── */
@keyframes chartShimmer{
  0%{left:-60%;}
  100%{left:120%;}
}

:where(.medexp-tw) .tw-chartWrap.is-chart-drawn::after{
  content:"";
  position:absolute;
  top:0;bottom:0;
  width:60%;
  background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,.18) 50%, transparent 100%);
  pointer-events:none;
  border-radius:14px;
  animation:chartShimmer 1s ease-in-out both;
}

/* ── 3. Subtle glow pulse on card ── */
@keyframes chartGlow{
  0%{box-shadow:0 1px 0 rgba(17,24,39,.02), 0 4px 14px rgba(2,6,23,.05), 0 0 0 rgba(59,198,194,0);}
  50%{box-shadow:0 1px 0 rgba(17,24,39,.02), 0 8px 22px rgba(2,6,23,.08), 0 0 18px rgba(59,198,194,.12);}
  100%{box-shadow:0 1px 0 rgba(17,24,39,.02), 0 4px 14px rgba(2,6,23,.05), 0 0 0 rgba(59,198,194,0);}
}

:where(.medexp-tw) .tw-chartCard.is-chart-glowing{
  animation:chartGlow 1.8s ease-in-out 1;
}

/* ── 4. Tip counter fade-in ── */
:where(.medexp-tw) .tw-perfGrid.is-chart-entrance .tw-chartTip{
  opacity:0;
}
:where(.medexp-tw) .tw-perfGrid.is-chart-entered .tw-chartTip{
  opacity:1;
  transition:opacity .4s ease .1s;
}

/* Better focus + hover affordances */
:where(.medexp-tw) .tw-btn{border-radius:9999px;padding:0.65rem 1.15rem;font-weight:900;letter-spacing:-0.01em;transition:transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s cubic-bezier(0.4,0,0.2,1), filter 0.2s cubic-bezier(0.4,0,0.2,1), background-color 0.2s cubic-bezier(0.4,0,0.2,1), border-color 0.2s cubic-bezier(0.4,0,0.2,1), color 0.2s cubic-bezier(0.4,0,0.2,1);}
:where(.medexp-tw) .tw-navlink:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.16);} 
:where(.medexp-tw) button[disabled]{cursor:not-allowed;}

/* Sidebar polish */
:where(.medexp-tw) .tw-sidebar{background:linear-gradient(180deg, var(--tw-white), rgba(249,250,251,.75));}
:where(.medexp-tw) .tw-navlink{transition:background-color .12s ease, color .12s ease, transform .08s ease;}
:where(.medexp-tw) .tw-navlink:hover{transform:translateY(-1px);} 

/* Use space more efficiently on wide screens */
@media (min-width: 1280px){
 :where(.medexp-tw) .tw-grid-12{gap:1.5rem;}
}

@media (max-width: 640px){
 :where(.medexp-tw) .tw-tiles{grid-template-columns:repeat(2,minmax(0,1fr));}
 :where(.medexp-tw) .tw-badges{grid-template-columns:repeat(2,minmax(0,1fr));}
 :where(.medexp-tw) .tw-badgeGrid{grid-template-columns:1fr;}
}


/* Layout grid helpers */
:where(.medexp-tw) .tw-grid-12{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:1.25rem;align-items:start;}
/* Fill vertical gaps in mixed-height rows by stretching items to the row height */
:where(.medexp-tw) .tw-grid-12.tw-grid-stretch{align-items:stretch;}
:where(.medexp-tw) .tw-col-8{grid-column:span 8 / span 8;}
:where(.medexp-tw) .tw-col-7{grid-column:span 7 / span 7;}
:where(.medexp-tw) .tw-col-6{grid-column:span 6 / span 6;}
:where(.medexp-tw) .tw-col-5{grid-column:span 5 / span 5;}
:where(.medexp-tw) .tw-col-4{grid-column:span 4 / span 4;}
:where(.medexp-tw) .tw-col-3{grid-column:span 3 / span 3;}
:where(.medexp-tw) .tw-col-12{grid-column:span 12 / span 12;}

/* Mobile responsive */
@media (max-width: 1023px){
 :where(.medexp-tw) .tw-navClose{display:inline-flex;}
 :where(.medexp-tw) .tw-sidebar{position:fixed;inset:0 auto 0 0;transform:translateX(-105%);transition:transform .18s ease;z-index:60;box-shadow:0 20px 40px rgba(0,0,0,.18);} 
 :where(.medexp-tw) .tw-shell.is-nav-open .tw-sidebar{transform:translateX(0);} 
 :where(.medexp-tw) .tw-overlay{display:none;position:fixed;inset:0;background:rgba(17,24,39,.35);z-index:50;} 
 :where(.medexp-tw) .tw-shell.is-nav-open .tw-overlay{display:block;} 
 :where(.medexp-tw) .tw-grid-12{grid-template-columns:1fr;}
 :where(.medexp-tw) .tw-heatgrid{grid-template-columns:repeat(2,minmax(0,1fr));}

 :where(.medexp-tw) .tw-col-12,:where(.medexp-tw) .tw-col-8,:where(.medexp-tw) .tw-col-7,:where(.medexp-tw) .tw-col-6,:where(.medexp-tw) .tw-col-5,:where(.medexp-tw) .tw-col-4,:where(.medexp-tw) .tw-col-3{grid-column:auto;} 
}

/* Small, tasteful badges */
:where(.medexp-tw) .tw-pill{display:inline-flex;align-items:center;gap:0.4rem;padding:0.3rem 0.6rem;border-radius:999px;background:rgba(255,255,255,.60);backdrop-filter:blur(6px);border:1px solid rgba(148,163,184,.22);font-size:0.75rem;font-weight:800;color:rgba(15,23,42,.65);} 

/* Support diagnostics status pills */
:where(.medexp-tw) .tw-pillOk{background:rgba(var(--medexp-brand-teal-rgb,0,166,118),.12);border-color:rgba(var(--medexp-brand-teal-rgb,0,166,118),.25);color:rgba(6,95,70,1);} 
:where(.medexp-tw) .tw-pillErr{background:rgba(239,68,68,.10);border-color:rgba(239,68,68,.22);color:rgba(153,27,27,1);} 

/* Keep existing MedEx widgets inside Tailwind shell looking consistent */
:where(.medexp-tw) .medexp-courseSearch{border-radius:1.25rem;}

:where(.medexp-tw) .medexp-courseSearch.medexp-card{border:none;box-shadow:none;padding:0;background:transparent;}

/* ========================================================================== */
/* Princeton Premium dashboard theme overrides */
/* - White sidebar + crisp borders */
/* - Blue active nav pill */
/* - Flatter buttons + cards */
/* ========================================================================== */

/* Palette closer to screenshots */
:where(.medexp-tw){
 --tw-gray-50:#f8fafc;
 --tw-gray-100:#f3f4f6;
 --tw-gray-200:#e5e7eb;
 --tw-gray-700:#374151;
 --tw-gray-900:#111827;
 --tw-indigo-500:var(--medexp-brand-blue);
 --tw-indigo-600:var(--medexp-brand-blue);
}

.medexp-dashboardPage .tw-shell{background:radial-gradient(900px 420px at 20% -10%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.18), transparent 60%), radial-gradient(900px 420px at 80% -10%, rgba(var(--medexp-brand-teal-rgb,0,166,118),.10), transparent 60%), var(--tw-gray-50);}

:where(.medexp-tw) .tw-sidebar{
 background:#fff;
 border-right:1px solid var(--tw-gray-200);
}

:where(.medexp-tw) .tw-navlink{border-radius:0.75rem;}
:where(.medexp-tw) .tw-navlink:hover{background:var(--tw-gray-100);transform:none;}
:where(.medexp-tw) .tw-navlink.is-active{background:var(--tw-indigo-600);color:#fff;}
:where(.medexp-tw) .tw-navlink.is-active .tw-navicon{color:#fff;}

/* Topbar: white, no glass */
:where(.medexp-tw) .tw-topbar{background:#fff;backdrop-filter:none;border-bottom:1px solid var(--tw-gray-200);} 

/* Cards: subtle */
:where(.medexp-tw) .tw-card{border-radius:18px;box-shadow:0 1px 0 rgba(17,24,39,.02), 0 4px 14px rgba(2,6,23,.05), 0 12px 32px rgba(2,6,23,.03);border:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.92);backdrop-filter:blur(10px);}
/* Buttons: solid blue primary; outlined secondary */
:where(.medexp-tw) .tw-btn{border-radius:9999px;padding:0.65rem 1.15rem;font-weight:900;letter-spacing:-0.01em;transition:transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s cubic-bezier(0.4,0,0.2,1), filter 0.2s cubic-bezier(0.4,0,0.2,1), background-color 0.2s cubic-bezier(0.4,0,0.2,1), border-color 0.2s cubic-bezier(0.4,0,0.2,1), color 0.2s cubic-bezier(0.4,0,0.2,1);}
:where(.medexp-tw) .tw-btn-primary{background:var(--medexp-primary-grad, var(--medexp-brand-teal, #00a676));color:#fff;border:1px solid rgba(0,0,0,0.06);box-shadow:0 14px 26px -20px rgba(var(--medexp-brand-teal-rgb,0,166,118),0.95), 0 10px 18px -14px rgba(0,0,0,0.18);text-shadow:0 1px 1px rgba(0,0,0,0.22);}
:where(.medexp-tw) .tw-btn-primary:hover{transform:translateY(-2px);box-shadow:0 20px 32px -22px rgba(var(--medexp-brand-teal-rgb,0,166,118),0.95), 0 18px 26px -18px rgba(0,0,0,0.18);filter:brightness(0.96);}
:where(.medexp-tw) .tw-btn-secondary{background:rgba(255,255,255,0.98);color:var(--medexp-brand-blue, #1a4f9c);border:2px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),0.38);box-shadow:0 10px 18px -16px rgba(var(--medexp-brand-navy-rgb,15,23,42),0.14);}
:where(.medexp-tw) .tw-btn-secondary:hover{background:var(--tw-gray-50);} 

/* Typography */
:where(.medexp-tw) .tw-title{font-size:1.65rem;}
:where(.medexp-tw) .tw-muted{color:#6b7280;}

/* === Enterprise polish additions (Metric strip, Roadmap, Empty states, Skeletons, User menu) === */

/* Metric header strip */
:where(.medexp-tw) .tw-metricStrip,
:where(.medexp-tw) .tw-metrics{
 display:grid;
 grid-template-columns:repeat(12,minmax(0,1fr));
 gap:var(--tw-space-4);
 margin-top:1.25rem;
}

/* Hide KPI strip when non-relevant dashboard subtab is active */
:where(.medexp-tw) .tw-metricStrip[hidden]{display:none !important;}

/* ── Stat metric cards — iOS GameStyle-inspired ─────────────────────
   Each card gets a colorful wash gradient bg, a 2px gradient stroke
   border, frosted glass feel, and a bold shadow.  Per-card accent
   colors mirror the native app's GameStyle.accentPair().
   ─────────────────────────────────────────────────────────────────── */

/* CSS custom props for per-card accent pairs (matching iOS GameStyle) */
:where(.medexp-tw) .tw-metric--streak{    --_a:#FB923C; --_b:#FB7185; color:#EA580C; }
:where(.medexp-tw) .tw-metric--q7{        --_a:#38BDF8; --_b:#8B5CF6; color:#6366F1; }
:where(.medexp-tw) .tw-metric--xp{        --_a:#38BDF8; --_b:#8B5CF6; color:#6366F1; }
:where(.medexp-tw) .tw-metric--acc{       --_a:#A3E635; --_b:#3BC6C2; color:#16A34A; }
:where(.medexp-tw) .tw-metric--time{      --_a:#8B5CF6; --_b:#38BDF8; color:#7C3AED; }
:where(.medexp-tw) .tw-metric--countdown{ --_a:#F472B6; --_b:#A78BFA; color:#9333EA; }
:where(.medexp-tw) .tw-metric--cat{       --_a:#3BC6C2; --_b:#179D99; color:#117673; }

:where(.medexp-tw) .tw-metric{
 grid-column:span 2 / span 2;
 border-radius:18px;
 padding:1.05rem 1.1rem;
 padding-right:3.6rem; /* room for absolute-positioned icon badge */
 position:relative;
 overflow:hidden;
 min-height:148px;
 display:flex;
 flex-direction:column;

 /* Frosted card base */
 background:rgba(255,255,255,.82);
 backdrop-filter:blur(14px);
 -webkit-backdrop-filter:blur(14px);

 /* iOS-style gradient stroke border (2px, 55% opacity) */
 border:2px solid transparent;
 background-clip:padding-box;

 /* Rich depth shadow like iOS */
 box-shadow:
  0 1px 0 rgba(17,24,39,.03),
  0 10px 22px rgba(2,6,23,.07),
  0 24px 48px rgba(2,6,23,.05);

 transition:transform .2s ease, box-shadow .2s ease;
}
:where(.medexp-tw) .tw-metric:hover{
 transform:translateY(-2px);
 box-shadow:
  0 1px 0 rgba(17,24,39,.03),
  0 14px 32px rgba(2,6,23,.10),
  0 32px 56px rgba(2,6,23,.06);
}

/* ── Wash gradient + top shine (iOS washGradient — subtle color wash via ::before) ── */
:where(.medexp-tw) .tw-metric::before{
 content:"";
 position:absolute;
 inset:0;
 pointer-events:none;
 border-radius:inherit;
 background:
  /* Shine / reflection at top-left */
  radial-gradient(ellipse 75% 45% at 20% 0%, rgba(255,255,255,.50) 0%, transparent 60%),
  /* Color wash */
  linear-gradient(
   135deg,
   color-mix(in srgb, var(--_a, #38BDF8) 22%, transparent) 0%,
   color-mix(in srgb, var(--_b, #8B5CF6) 16%, transparent) 45%,
   rgba(255,255,255,.88) 100%
  );
}

/* ── Stroke gradient border (iOS strokeGradient — 2px, 55% opacity) ── */
:where(.medexp-tw) .tw-metric::after{
 content:"";
 position:absolute;
 inset:0;
 border-radius:inherit;
 pointer-events:none;
 padding:2px;
 background:linear-gradient(135deg, var(--_a, #38BDF8), var(--_b, #8B5CF6), var(--_a, #38BDF8));
 -webkit-mask:
  linear-gradient(#fff 0 0) content-box,
  linear-gradient(#fff 0 0);
 -webkit-mask-composite:xor;
 mask-composite:exclude;
 opacity:.55;
}

:where(.medexp-tw) .tw-metric__label{
 font-size:.72rem;
 font-weight:900;
 letter-spacing:.07em;
 text-transform:uppercase;
 color:rgba(15,23,42,.55);
 position:relative;
 z-index:1;
 padding-right:2.6rem; /* prevent overlap with icon badge */
}
:where(.medexp-tw) .tw-metric__value{
 font-size:1.65rem;
 font-weight:900;
 letter-spacing:-0.03em;
 margin-top:.35rem;
 position:relative;
 z-index:1;
 color:rgba(15,23,42,.92);
}
:where(.medexp-tw) .tw-metric__sub{
 font-size:.85rem;
 color:rgba(15,23,42,.55);
 font-weight:700;
 margin-top:.15rem;
 position:relative;
 z-index:1;
}

:where(.medexp-tw) .tw-spark{display:block;margin-top:.6rem;height:34px;width:100%;position:relative;z-index:1}
:where(.medexp-tw) .tw-spark polyline{fill:none;stroke:currentColor;stroke-width:2.5;opacity:.85;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 3px currentColor)}
/* Area fill under sparkline (polygon element) */
:where(.medexp-tw) .tw-spark polygon{fill:currentColor;opacity:.10;}

:where(.medexp-tw) .tw-metric__dots,
:where(.medexp-tw) .tw-streakDots{
 display:flex;
 gap:.4rem;
 margin-top:auto;
 padding-top:.55rem;
 position:relative;
 z-index:1;
}
:where(.medexp-tw) .tw-dot,
:where(.medexp-tw) .tw-streakDot{
 width:30px;
 height:36px;
 border-radius:8px;
 background:rgba(100,116,139,.10);
 border:1px solid rgba(100,116,139,.12);
 display:flex;
 flex-direction:column;
 align-items:center;
 justify-content:center;
 gap:1px;
 transition:all .18s cubic-bezier(.34,1.56,.64,1);
}

/* Day label from data-label attribute */
:where(.medexp-tw) .tw-dot::before{
 content:attr(data-label);
 font-size:.52rem;
 font-weight:800;
 letter-spacing:.02em;
 color:rgba(100,116,139,.45);
 line-height:1;
}

/* Day number dot indicator */
:where(.medexp-tw) .tw-dot::after{
 content:"";
 width:6px;
 height:6px;
 border-radius:999px;
 background:rgba(100,116,139,.20);
}

/* Active day — uses the metric card's accent color */
:where(.medexp-tw) .tw-dot.is-on{
 background:linear-gradient(135deg, color-mix(in srgb, var(--_a) 25%, transparent), color-mix(in srgb, var(--_b) 20%, transparent));
 border-color:color-mix(in srgb, var(--_a) 35%, transparent);
}
:where(.medexp-tw) .tw-dot.is-on::before{
 color:currentColor;
 opacity:.70;
}
:where(.medexp-tw) .tw-dot.is-on::after{
 background:currentColor;
 opacity:.85;
 box-shadow:0 0 4px currentColor;
}

/* Today marker — ring highlight */
:where(.medexp-tw) .tw-dot.is-today{
 border-color:color-mix(in srgb, var(--_a) 55%, transparent);
 box-shadow:0 0 0 2px color-mix(in srgb, var(--_a) 15%, transparent);
}

@media (max-width: 1100px){
 :where(.medexp-tw) .tw-metric{grid-column:span 4 / span 4;}
}
/* On phones + small tablets we still want 2-up KPI cards.
   Compact the internals so labels/values/sparks fit without overlap. */
@media (max-width: 560px){
 :where(.medexp-tw) .tw-metric{
  grid-column:span 6 / span 6;
  padding:0.85rem;
  padding-right:2.9rem; /* keep room for the icon badge */
  min-height:132px;
 }
 :where(.medexp-tw) .tw-metric__label{font-size:.68rem;line-height:1.05;}
 :where(.medexp-tw) .tw-metric__value{font-size:1.35rem;}
 :where(.medexp-tw) .tw-metric__sub{font-size:.78rem;line-height:1.2;}
 :where(.medexp-tw) .tw-spark{height:28px;}
 :where(.medexp-tw) .tw-metric__icon{top:.65rem;right:.65rem;width:2.05rem;height:2.05rem;border-radius:999px;}
 :where(.medexp-tw) .tw-dot,
 :where(.medexp-tw) .tw-streakDot{width:24px;height:30px;}
 :where(.medexp-tw) .tw-dot::before{font-size:.48rem;}
 :where(.medexp-tw) .tw-dot::after{width:5px;height:5px;}
 :where(.medexp-tw) .tw-metric svg,
 :where(.medexp-tw) .tw-metric canvas{max-width:100%;}
}

/* Ultra-small devices can drop back to 1-up if needed */
@media (max-width: 340px){
 :where(.medexp-tw) .tw-metric{grid-column:span 12 / span 12;}
}

/* Top-right user menu */
:where(.medexp-tw) .tw-userMenu{position:relative}
:where(.medexp-tw) .tw-userMenu__btn{
 display:inline-flex;
 align-items:center;
 gap:.6rem;
 padding:.5rem .65rem;
 border-radius:999px;
 border:1px solid rgba(226,232,240,.85);
 background:rgba(255,255,255,.7) !important;
 color:var(--tw-gray-900,#0f172a) !important;
 backdrop-filter:blur(10px);
 box-shadow:var(--tw-shadow);
 cursor:pointer;
}
:where(.medexp-tw) .tw-avatar{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 width:1.9rem;
 height:1.9rem;
 border-radius:999px;
 background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);
 color:var(--tw-indigo-600);
 font-weight:800;
}
:where(.medexp-tw) .tw-userMenu__name{font-weight:800;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:12rem}
:where(.medexp-tw) .tw-userMenu__caret{opacity:.7}
:where(.medexp-tw) .tw-userMenu__drop{
 position:absolute;
 right:0;
 top:calc(100% + .55rem);
 min-width:240px;
 z-index:60;
 background:rgba(255,255,255,.88);
 backdrop-filter:blur(14px);
 border:1px solid rgba(226,232,240,.85);
 border-radius:16px;
 box-shadow:0 18px 55px rgba(2,6,23,.18);
 padding:.55rem;
 display:none;
}
:where(.medexp-tw) .tw-userMenu.is-open .tw-userMenu__drop{display:block}
:where(.medexp-tw) .tw-userMenu__meta{font-size:.82rem;color:var(--tw-slate-600);padding:.55rem .65rem .35rem .65rem;font-weight:800}
:where(.medexp-tw) .tw-userMenu__drop a{display:block;padding:.6rem .65rem;border-radius:12px;font-weight:800;color:var(--tw-slate-900);text-decoration:none}
:where(.medexp-tw) .tw-userMenu__drop a:hover{background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.10)}
:where(.medexp-tw) .tw-userMenu__sep{height:1px;background:rgba(148,163,184,.35);margin:.35rem .35rem}

/* Roadmap timeline */
:where(.medexp-tw) .tw-roadmap{display:grid;grid-template-columns:1fr;gap:1rem}
:where(.medexp-tw) .tw-roadmapNext{border:1px solid rgba(226,232,240,.85);border-radius:16px;padding:1rem;background:rgba(255,255,255,.60);backdrop-filter:blur(12px)}
:where(.medexp-tw) .tw-roadmapNext__kicker{font-size:.72rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--tw-slate-600)}
:where(.medexp-tw) .tw-roadmapNext__title{font-size:1.05rem;font-weight:800;letter-spacing:-0.02em;margin-top:.25rem}
:where(.medexp-tw) .tw-roadmapNext__meta{font-size:.85rem;color:var(--tw-slate-600);margin-top:.15rem}
:where(.medexp-tw) .tw-roadmapNext__actions{display:flex;gap:.6rem;margin-top:.85rem;flex-wrap:wrap}
:where(.medexp-tw) .tw-roadmapList{list-style:none;margin:0;padding:0;display:grid;gap:.7rem}
/* Some WP themes disable grid-gap on lists via legacy resets; add a physical margin so items never "touch" */
:where(.medexp-tw) .tw-roadmapItem{display:grid;grid-template-columns:28px 1fr;gap:.8rem;align-items:flex-start;position:relative;margin-bottom:.7rem}
:where(.medexp-tw) .tw-roadmapItem:last-child{margin-bottom:0}
:where(.medexp-tw) .tw-roadmapDot{width:28px;height:28px;border-radius:999px;display:flex;align-items:center;justify-content:center;font-weight:800;background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);color:var(--tw-indigo-600)}
:where(.medexp-tw) .tw-roadmapItem.is-upcoming .tw-roadmapDot{background:rgba(100,116,139,.15);color:rgba(100,116,139,.8)}
:where(.medexp-tw) .tw-roadmapItem.is-current .tw-roadmapDot{background:linear-gradient(135deg,var(--tw-emerald-600),var(--tw-emerald-500));color:#fff}
:where(.medexp-tw) .tw-roadmapBody{padding:.85rem 1rem;border-radius:16px;border:1px solid rgba(226,232,240,.85);background:rgba(255,255,255,.55);backdrop-filter:blur(10px)}
:where(.medexp-tw) .tw-roadmapLabel{font-weight:800;letter-spacing:-0.02em}
:where(.medexp-tw) .tw-roadmapMeta{margin-top:.15rem;font-size:.85rem;color:var(--tw-slate-600)}


/* Roadmap controls + row affordances */
:where(.medexp-tw) .tw-roadmapTools{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:.75rem;
 flex-wrap:wrap;
}
:where(.medexp-tw) .tw-roadmapTools__left{
 display:flex;
 align-items:center;
 gap:.45rem;
 flex-wrap:wrap;
}
:where(.medexp-tw) .tw-roadmapTools__right{
 display:flex;
 align-items:center;
 gap:.5rem;
 flex-wrap:wrap;
}
:where(.medexp-tw) .tw-roadmapTools__chk{
 display:inline-flex;
 align-items:center;
 gap:.45rem;
 font-weight:800;
 color:var(--tw-slate-600);
 font-size:.86rem;
 user-select:none;
}
:where(.medexp-tw) .tw-roadmapTools__chk input{
 width:18px;
 height:18px;
}

:where(.medexp-tw) .tw-input.tw-input-small{
 padding:.42rem .65rem;
 border-radius:999px;
 font-size:.9rem;
 font-weight:800;
 width:auto;
}

:where(.medexp-tw) .tw-roadmapBodyLink{
 display:block;
 text-decoration:none;
 color:inherit;
}
:where(.medexp-tw) .tw-roadmapBodyHead{
 display:flex;
 align-items:flex-start;
 justify-content:space-between;
 gap:.85rem;
}
:where(.medexp-tw) .tw-roadmapCta{
 flex:0 0 auto;
 padding-left:.2rem;
}
:where(.medexp-tw) .tw-roadmapItem.is-done{
 opacity:.78;
}
:where(.medexp-tw) .tw-roadmapItem.is-done .tw-roadmapBody{
 background:rgba(255,255,255,.40);
}

:where(.medexp-tw) .tw-roadmapFold{
 border:1px solid rgba(226,232,240,.85);
 border-radius:16px;
 padding:.75rem .85rem;
 background:rgba(255,255,255,.45);
 backdrop-filter:blur(10px);
}
:where(.medexp-tw) .tw-roadmapFold summary{
 list-style:none;
 cursor:pointer;
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:.75rem;
 font-weight:900;
 color:var(--tw-slate-900);
}
:where(.medexp-tw) .tw-roadmapFold summary::-webkit-details-marker{display:none;}
:where(.medexp-tw) .tw-roadmapSummary__count{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 min-width:2.05rem;
 height:1.65rem;
 padding:0 .55rem;
 border-radius:999px;
 border:1px solid rgba(148,163,184,.35);
 background:rgba(148,163,184,.12);
 color:var(--tw-slate-700);
 font-size:.85rem;
 font-weight:900;
}

/* Roadmap mode toggle (Roadmap / Schedule) */
:where(.medexp-tw) .tw-roadmapMode{
 display:inline-flex;
 align-items:center;
 gap:.25rem;
 padding:.18rem;
 border-radius:999px;
 border:1px solid rgba(148,163,184,.25);
 background:rgba(148,163,184,.12);
}
:where(.medexp-tw) .tw-roadmapModeBtn{
 appearance:none;
 border:none;
 background:transparent;
 color:var(--tw-slate-700);
 font:inherit;
 font-weight:900;
 font-size:.86rem;
 line-height:1;
 padding:.48rem .72rem;
 border-radius:999px;
 cursor:pointer;
 display:inline-flex;
 align-items:center;
 gap:.35rem;
 user-select:none;
}
:where(.medexp-tw) .tw-roadmapModeBtn:hover{ background:rgba(15,23,42,.04); }
:where(.medexp-tw) .tw-roadmapModeBtn.is-active{
 background:#fff;
 border:1px solid rgba(var(--medexp-brand-blue-rgb,26,79,156), .22);
 color:var(--tw-slate-900);
 box-shadow:0 1px 2px rgba(15,23,42,.06);
}
:where(.medexp-tw) .tw-roadmapTools__sep{
 width:1px;
 height:22px;
 background:rgba(148,163,184,.35);
 margin:0 .25rem;
 border-radius:999px;
}

/* Schedule view (timeline) */
:where(.medexp-tw) .tw-scheduleHead{ max-width: 72ch; }
:where(.medexp-tw) .tw-schedule{
 display:grid;
 gap:1rem;
}
:where(.medexp-tw) .tw-scheduleRow{
 display:grid;
 grid-template-columns:88px 24px 1fr;
 gap:1rem;
 align-items:flex-start;
}
:where(.medexp-tw) .tw-scheduleChip{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 min-height:34px;
 padding:.42rem .8rem;
 border-radius:999px;
 border:1px solid rgba(226,232,240,.95);
 background:rgba(255,255,255,.70);
 color:var(--tw-slate-900);
 font-weight:900;
 font-size:.88rem;
}
:where(.medexp-tw) .tw-scheduleRow.is-today .tw-scheduleChip{
 border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156), .35);
 background:rgba(var(--medexp-brand-blue-rgb,26,79,156), .08);
}
:where(.medexp-tw) .tw-scheduleTrack{
 position:relative;
 display:flex;
 justify-content:center;
 min-height:34px;
 /*
  * Ensure the timeline connects across variable-height day cards.
  * We keep rows top-aligned (so chips and cards align nicely), but
  * the track column must stretch to the full row height so the line can
  * run behind the entire card and into the next row.
  */
 align-self:stretch;
}
:where(.medexp-tw) .tw-scheduleLine{
 position:absolute;
 top:0;
 bottom:-1rem; /* extend into next row gap */
 left:50%;
 transform:translateX(-50%);
 width:2px;
 background:rgba(148,163,184,.35);
 border-radius:999px;
}
/*
 * In the last row we still need a short connector so the line reaches the final dot.
 * We stop the line at the dot center (margin-top + radius) rather than extending
 * into a non-existent next-row gap.
 */
:where(.medexp-tw) .tw-scheduleRow.is-last .tw-scheduleLine{
 bottom: calc(100% - (0.55rem + 7px));
 }
:where(.medexp-tw) .tw-scheduleDot{
 width:14px;
 height:14px;
 border-radius:999px;
 border:2px solid rgba(148,163,184,.55);
 background:#fff;
 margin-top:.55rem;
 position:relative;
 z-index:1;
}
:where(.medexp-tw) .tw-scheduleRow.is-done .tw-scheduleDot{
 background:linear-gradient(135deg,var(--tw-emerald-600),var(--tw-emerald-500));
 border-color:rgba(16,185,129,.25);
}
:where(.medexp-tw) .tw-scheduleRow.is-today .tw-scheduleDot{
 border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156), .45);
 box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156), .12);
}
:where(.medexp-tw) .tw-scheduleCard{
 border:1px solid rgba(226,232,240,.85);
 border-radius:16px;
 padding:.85rem 1rem;
 background:rgba(255,255,255,.55);
 backdrop-filter:blur(10px);
}
:where(.medexp-tw) .tw-scheduleTasks{
 display:grid;
 gap:.65rem;
}
:where(.medexp-tw) .tw-scheduleTask{
 display:flex;
 gap:.65rem;
 align-items:flex-start;
}
:where(.medexp-tw) .tw-scheduleTask__check{
 width:20px;
 height:20px;
 flex:0 0 auto;
 margin-top:.2rem;
 color:rgba(100,116,139,.92);
}
:where(.medexp-tw) .tw-scheduleTask.is-done .tw-scheduleTask__check{ color:var(--tw-emerald-600); }
:where(.medexp-tw) .tw-scheduleTask__main{ flex:1; min-width:0; }
:where(.medexp-tw) .tw-scheduleTask__label{
 font-weight:900;
 text-decoration:none;
 color:inherit;
 display:inline-block;
}
:where(.medexp-tw) .tw-scheduleTask__label:hover{ text-decoration:underline; }
:where(.medexp-tw) .tw-scheduleTask__sub{
 margin-top:.12rem;
 font-size:.86rem;
 color:var(--tw-slate-600);
}

/* Empty states */
:where(.medexp-tw) .tw-empty{display:flex;gap:1rem;align-items:center;padding:1rem;border:1px dashed rgba(148,163,184,.55);border-radius:16px;background:rgba(255,255,255,.45)}
:where(.medexp-tw) .tw-empty__img{width:120px;height:96px;flex:0 0 auto;display:block}
:where(.medexp-tw) .tw-empty__img svg{width:100%;height:100%;display:block}
:where(.medexp-tw) .tw-empty__title{font-weight:800;letter-spacing:-0.02em}
:where(.medexp-tw) .tw-empty__body{margin-top:.15rem;color:var(--tw-slate-600)}
:where(.medexp-tw) .tw-empty__cta{margin-top:.8rem}

/* ── Centered empty state (analytics variants: performance, weak, heatmap) ── */
:where(.medexp-tw) .tw-empty.tw-empty--centered{
  flex-direction:column;
  text-align:center;
  align-items:center;
  padding:2.25rem 1.75rem 1.75rem;
  gap:.6rem;
  border-style:solid;
  border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.08);
  border-radius:20px;
  background:
    radial-gradient(ellipse 60% 50% at 12% 18%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 45% at 88% 78%, rgba(var(--medexp-brand-teal-rgb,0,166,118),.06) 0%, transparent 70%),
    linear-gradient(135deg, rgba(255,255,255,.94) 0%, rgba(248,250,252,.97) 100%);
  box-shadow:0 1px 0 rgba(17,24,39,.02), 0 8px 28px rgba(2,6,23,.06);
  animation:chartCardEntrance .55s cubic-bezier(.34,1.56,.64,1) both;
}
:where(.medexp-tw) .tw-empty--centered .tw-empty__img{
  width:180px;
  height:140px;
  animation:twFloat 5s ease-in-out infinite;
  filter:drop-shadow(0 6px 16px rgba(2,6,23,.06));
}
:where(.medexp-tw) .tw-empty__accent{
  width:40px;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(var(--medexp-brand-teal-rgb,0,166,118),.45), rgba(var(--medexp-brand-blue-rgb,26,79,156),.25));
}
:where(.medexp-tw) .tw-empty--centered .tw-empty__title{
  font-size:1.15rem;
  font-weight:900;
  color:rgba(15,23,42,.88);
}
:where(.medexp-tw) .tw-empty--centered .tw-empty__body{
  font-size:.9rem;
  line-height:1.55;
  color:rgba(15,23,42,.50);
  max-width:280px;
  margin-left:auto;
  margin-right:auto;
  margin-top:.2rem;
}
:where(.medexp-tw) .tw-empty--centered .tw-empty__cta{margin-top:.85rem;}
:where(.medexp-tw) .tw-empty--centered .tw-empty__cta .tw-btn-primary{
  box-shadow:0 2px 8px rgba(var(--medexp-brand-teal-rgb,0,166,118),.18), 0 8px 20px rgba(var(--medexp-brand-teal-rgb,0,166,118),.12);
}

/* Hero empty state: Flashcards — premium look */
:where(.medexp-tw) .tw-empty.tw-empty--hero{
  padding:1.65rem 1.75rem;
  border-style:solid;
  border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.10);
  border-radius:20px;
  background:
   radial-gradient(ellipse 65% 55% at 8% 15%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.08) 0%, transparent 70%),
   radial-gradient(ellipse 50% 50% at 90% 75%, rgba(var(--medexp-brand-teal-rgb,0,166,118),.06) 0%, transparent 70%),
   linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(248,250,252,.96) 100%);
  box-shadow:0 1px 0 rgba(17,24,39,.02), 0 12px 36px rgba(17,24,39,.07);
}
:where(.medexp-tw) .tw-empty.tw-empty--hero .tw-empty__content{min-width:0;flex:1 1 auto;}
:where(.medexp-tw) .tw-empty.tw-empty--hero .tw-empty__title{font-size:1.35rem;font-weight:950;color:rgba(15,23,42,.90);}
:where(.medexp-tw) .tw-empty.tw-empty--hero .tw-empty__body{font-size:.95rem;line-height:1.5;color:rgba(15,23,42,.60);}
:where(.medexp-tw) .tw-empty.tw-empty--flashcards .tw-empty__img{
  width:200px;height:150px;animation:twFloat 5s ease-in-out infinite;
  filter:drop-shadow(0 8px 20px rgba(2,6,23,.08));
}
:where(.medexp-tw) .tw-empty.tw-empty--flashcards .tw-empty__img svg{width:100%;height:100%;display:block;}
@keyframes twFloat{
 0%,100%{transform:translateY(0) scale(1);}
 50%{transform:translateY(-10px) scale(1.02);}
}
:where(.medexp-tw) .tw-empty__badges{margin-top:.75rem;display:flex;gap:.5rem;flex-wrap:wrap;}
:where(.medexp-tw) .tw-empty__badge{
  display:inline-flex;align-items:center;gap:.35rem;
  padding:.3rem .65rem;border-radius:999px;
  border:1px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);
  background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.05);
  color:rgba(15,23,42,.72);
  font-size:.78rem;font-weight:800;
  transition:background .15s ease, border-color .15s ease;
}
:where(.medexp-tw) .tw-empty__badge:hover{
  background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.08);
  border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.20);
}
:where(.medexp-tw) .tw-empty__actions{margin-top:1rem;display:flex;gap:.65rem;flex-wrap:wrap;align-items:center;}
:where(.medexp-tw) .tw-empty__actions .tw-btn-primary{
  box-shadow:0 2px 8px rgba(var(--medexp-brand-teal-rgb,0,166,118),.18), 0 8px 20px rgba(var(--medexp-brand-teal-rgb,0,166,118),.12);
}
:where(.medexp-tw) .tw-empty__meta{margin-top:.75rem;font-size:.86rem;color:rgba(15,23,42,.50);font-weight:700;}
:where(.medexp-tw) .tw-empty__limits{margin-top:.9rem;display:flex;gap:.75rem;flex-wrap:wrap;align-items:flex-end;}
:where(.medexp-tw) .tw-empty__limits label{display:flex;flex-direction:column;gap:.25rem;font-size:.78rem;color:var(--tw-slate-600);font-weight:800;}
:where(.medexp-tw) .tw-empty__limits input{
  width:118px;padding:.55rem .6rem;border-radius:12px;
  border:1px solid rgba(148,163,184,.55);
  background:rgba(255,255,255,.75);
}
:where(.medexp-tw) .tw-empty__reset{
  font-size:.85rem;color:rgba(15,23,42,.72);
  text-decoration:underline;background:none;border:none;padding:0;cursor:pointer;
}


/* ── Skeleton loaders (premium shimmer) ── */
@keyframes twShimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

:where(.medexp-tw) .tw-skelList{display:grid;gap:.7rem}
:where(.medexp-tw) .tw-skelRow{display:flex;gap:.8rem;align-items:center;padding:.65rem .4rem}

:where(.medexp-tw) .tw-skelAvatar{
 width:38px;height:38px;border-radius:14px;
 background:linear-gradient(90deg, rgba(148,163,184,.12) 25%, rgba(148,163,184,.24) 37%, rgba(148,163,184,.12) 63%);
 background-size:400% 100%;
 animation:twShimmer 1.4s ease-in-out infinite;
}
:where(.medexp-tw) .tw-skelLines{flex:1;display:grid;gap:.5rem}
:where(.medexp-tw) .tw-skelLine{
 height:13px;border-radius:8px;
 background:linear-gradient(90deg, rgba(148,163,184,.12) 25%, rgba(148,163,184,.24) 37%, rgba(148,163,184,.12) 63%);
 background-size:400% 100%;
 animation:twShimmer 1.4s ease-in-out infinite;
}
:where(.medexp-tw) .tw-skelLine--sub{height:10px;opacity:.85}
:where(.medexp-tw) .tw-skelPill{
 width:72px;height:24px;border-radius:999px;
 background:linear-gradient(90deg, rgba(148,163,184,.12) 25%, rgba(148,163,184,.24) 37%, rgba(148,163,184,.12) 63%);
 background-size:400% 100%;
 animation:twShimmer 1.4s ease-in-out infinite;
}

/* Generic dashboard skeleton blocks (used for course switching + async loads) */
:where(.medexp-tw) .tw-skelChart{
 height:48px;border-radius:12px;
 background:linear-gradient(90deg, rgba(148,163,184,.12) 25%, rgba(148,163,184,.24) 37%, rgba(148,163,184,.12) 63%);
 background-size:400% 100%;
 animation:twShimmer 1.4s ease-in-out infinite;
}
:where(.medexp-tw) .tw-skelCard .tw-skelBlock{
 margin-top:.8rem;
 border-radius:14px;
 background:rgba(148,163,184,.04);
 padding:.35rem .25rem;
}
:where(.medexp-tw) .tw-skelHead{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
:where(.medexp-tw) .tw-metricStrip.tw-skelStrip .tw-metric{min-height:132px}
:where(.medexp-tw) .tw-metricStrip.tw-skelStrip .tw-metric .tw-skelLines{margin-top:.65rem}

/* Skeleton metric cards — subtle shimmer overlay */
:where(.medexp-tw) .tw-skelMetric{
 position:relative;overflow:hidden;
}
:where(.medexp-tw) .tw-skelMetric::after{
 content:"";position:absolute;inset:0;border-radius:inherit;
 background:linear-gradient(90deg, transparent 25%, rgba(148,163,184,.06) 37%, transparent 63%);
 background-size:400% 100%;
 animation:twShimmer 1.8s ease-in-out infinite;
 pointer-events:none;
}

/* Skeleton card should look clean — no heavy border/shadow while loading */
:where(.medexp-tw) .tw-skelCard{
 border-color:rgba(148,163,184,.10) !important;
 box-shadow:0 1px 4px rgba(2,6,23,.03) !important;
 overflow:hidden;
 position:relative;
}
/* Full-card shimmer sweep */
:where(.medexp-tw) .tw-skelCard::after{
 content:"";position:absolute;inset:0;border-radius:inherit;
 background:linear-gradient(90deg, transparent 25%, rgba(148,163,184,.05) 37%, transparent 63%);
 background-size:400% 100%;
 animation:twShimmer 2s ease-in-out infinite;
 pointer-events:none;
}

/* Shimmer overlays for async charts */
:where(.medexp-tw) .tw-chartCard.is-loading .tw-chartWrap::after{
 content:"";
 position:absolute;
 inset:0;
 border-radius:14px;
 background:linear-gradient(90deg, rgba(148,163,184,.18) 25%, rgba(148,163,184,.35) 37%, rgba(148,163,184,.18) 63%);
 background-size:400% 100%;
 animation:twShimmer 1.2s ease-in-out infinite;
 pointer-events:none;
}
:where(.medexp-tw) .tw-chartCard.is-loading .tw-chartWrap canvas{opacity:0.18}
:where(.medexp-tw) .tw-chartCard.is-loading .tw-chartTip{opacity:0.5}
:where(.medexp-tw) .tw-chartCard.is-loading{
 animation:twSkeletonPulse 1.6s ease-in-out infinite;
}
@keyframes twSkeletonPulse{0%,100%{opacity:1}50%{opacity:.85}}

/* XL layout: widen left column (roadmap + heatmap) */
@media (min-width: 1280px){
 :where(.medexp-tw) .tw-col-8{grid-column:span 9 / span 9;}
 :where(.medexp-tw) .tw-col-4{grid-column:span 3 / span 3;}
}

/* === Iconography + final dashboard polish (0.4.32) === */

/* Inline SVG icon — base styling */
:where(.medexp-tw) svg.tw-ico{
 width:1.15rem;
 height:1.15rem;
 display:block;
 flex-shrink:0;
 fill:none;
 stroke:currentColor;
}
:where(.medexp-tw) .tw-navicon svg.tw-ico{width:1.15rem;height:1.15rem;}
:where(.medexp-tw) .tw-btn svg.tw-ico{width:1.1rem;height:1.1rem;}

:where(.medexp-tw) .tw-inlineIco{
 font-size:1rem;
 display:inline-block;
 vertical-align:-0.18em;
 line-height:1;
}

/* Brand mark (sidebar) */
:where(.medexp-tw) .tw-brandMark{
 width:2.15rem;
 height:2.15rem;
 border-radius:0.9rem;
 background:linear-gradient(135deg,var(--tw-indigo-600),var(--tw-sky-500));
 color:#fff;
 box-shadow:0 12px 26px rgba(79,70,229,.20);
}
:where(.medexp-tw) .tw-brandIco{width:1.25rem;height:1.25rem;}

.tw-brandLink{display:flex;align-items:center;justify-content:flex-start;text-decoration:none;/* Align logo mark with sidebar icon column */padding-left:0.75rem;}
.tw-brandLogo{display:block;height:auto;width:auto;max-height:48px;max-width:140px;object-fit:contain;filter:drop-shadow(0 10px 18px rgba(15,23,42,0.10));}
.tw-topbarLogo{display:none;align-items:center;justify-content:center;text-decoration:none;}
.tw-topbarLogoImg{display:block;height:auto;width:auto;max-height:32px;max-width:120px;object-fit:contain;}
@media (max-width:960px){.tw-topbarLogo{display:flex;}}

/* Metric icon badge — iOS GameIconBadge style (gradient circle, white icon) */
:where(.medexp-tw) .tw-metric__icon{
 position:absolute;
 top:.75rem;
 right:.75rem;
 width:2.2rem;
 height:2.2rem;
 border-radius:999px;
 display:flex;
 align-items:center;
 justify-content:center;
 z-index:2;

 /* Gradient fill using per-card accent vars */
 background:linear-gradient(135deg, var(--_a, #38BDF8), var(--_b, #8B5CF6));
 box-shadow:
  0 2px 6px rgba(0,0,0,.12),
  0 8px 18px rgba(0,0,0,.08);
 overflow:hidden;
}
/* Screen-blend radial shine on badge (iOS) */
:where(.medexp-tw) .tw-metric__icon::before{
 content:"";
 position:absolute;
 inset:0;
 border-radius:inherit;
 background:radial-gradient(
  circle at 30% 25%,
  rgba(255,255,255,.40) 0%,
  transparent 65%
 );
 mix-blend-mode:screen;
 pointer-events:none;
}
:where(.medexp-tw) .tw-metricIco{
 width:1.15rem;
 height:1.15rem;
 color:#fff !important;
 filter:drop-shadow(0 1px 2px rgba(0,0,0,.2));
 position:relative;
 z-index:1;
}

/* Make roadmap/current marker clearer than a mysterious green dot */
:where(.medexp-tw) .tw-roadmapItem.is-current .tw-roadmapDot{
 box-shadow:0 10px 22px rgba(var(--medexp-brand-teal-rgb,0,166,118),.22);
}

/* Dashboard should feel like an "app"—hide theme chrome only on the dashboard */
body.medexp-dashboard header.site-header,
body.medexp-dashboard .site-header,
body.medexp-dashboard #masthead,
body.medexp-dashboard footer,
body.medexp-dashboard .site-footer,
body.medexp-dashboard #colophon{
 display:none !important;
}
body.medexp-dashboard .site-content,
body.medexp-dashboard .content-area,
body.medexp-dashboard #primary{
 padding:0 !important;
 margin:0 !important;
 max-width:none !important;
}

/* Roadmap legend (clarifies current vs upcoming vs done) */
:where(.medexp-tw) .tw-roadmapLegend{
 display:flex;
 flex-wrap:wrap;
 gap:.8rem;
 align-items:center;
 margin:.35rem 0 .75rem;
 color:var(--tw-slate-600);
 font-size:.82rem;
}
:where(.medexp-tw) .tw-legendItem{display:inline-flex;gap:.45rem;align-items:center;}
:where(.medexp-tw) .tw-legendDot{
 width:1.35rem;
 height:1.35rem;
 border-radius:999px;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 font-weight:800;
 background:rgba(100,116,139,.10);
 color:var(--tw-slate-700);
}
:where(.medexp-tw) .tw-legendDot.is-current{background:rgba(var(--medexp-brand-teal-rgb,0,166,118),.14);color:var(--tw-emerald-700);}
:where(.medexp-tw) .tw-legendDot.is-done{background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);color:var(--tw-indigo-700);}


/* === Study Plan / Roadmap visual polish ===================================== */

/* "Next up" card: richer background, more prominent */
:where(.medexp-tw) .tw-roadmapNext{
 border:1px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);
 background:
   radial-gradient(700px 220px at 5% 0%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.06), transparent 55%),
   radial-gradient(500px 200px at 90% 100%, rgba(var(--medexp-brand-teal-rgb,0,166,118),.05), transparent 50%),
   rgba(255,255,255,.75);
 box-shadow:0 1px 0 rgba(17,24,39,.02), 0 10px 28px rgba(17,24,39,.06);
 padding:1.2rem 1.3rem;
}
:where(.medexp-tw) .tw-roadmapNext__kicker{
 font-size:.72rem;
 font-weight:900;
 letter-spacing:.1em;
 text-transform:uppercase;
 color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.7);
}
:where(.medexp-tw) .tw-roadmapNext__title{
 font-size:1.08rem;
 font-weight:900;
 letter-spacing:-0.02em;
 color:var(--tw-slate-900);
}

/* Roadmap item cards: subtle hover lift */
:where(.medexp-tw) .tw-roadmapBody{
 transition:box-shadow .15s ease, border-color .15s ease;
}
:where(.medexp-tw) .tw-roadmapBodyLink:hover .tw-roadmapBody{
 border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.18);
 box-shadow:0 1px 0 rgba(17,24,39,.02), 0 8px 22px rgba(17,24,39,.07);
}

/* Current item: stronger visual emphasis */
:where(.medexp-tw) .tw-roadmapItem.is-current .tw-roadmapBody{
 border-color:rgba(var(--medexp-brand-teal-rgb,0,166,118),.25);
 background:rgba(var(--medexp-brand-teal-rgb,0,166,118),.04);
}

/* Roadmap tools bar: slightly more separation */
:where(.medexp-tw) .tw-roadmapTools{
 padding-bottom:.85rem;
 border-bottom:1px solid rgba(15,23,42,.05);
 margin-bottom:.25rem;
}

/* Week/Later kicker headings */
:where(.medexp-tw) .tw-kicker{
 font-size:.72rem;
 font-weight:900;
 letter-spacing:.08em;
 text-transform:uppercase;
 color:var(--tw-slate-500);
}

/* Goals sidebar card polish */
:where(.medexp-tw) .tw-goalStat{
 background:linear-gradient(135deg, rgba(255,255,255,.70) 0%, rgba(248,250,252,.60) 100%);
 border:1.5px solid rgba(148,163,184,.18);
 border-radius:14px;
 backdrop-filter:blur(6px);
}
:where(.medexp-tw) .tw-goalStat .tw-kicker{font-size:.68rem;color:var(--tw-gray-500);}
:where(.medexp-tw) .tw-goalStat .tw-statNum{
 font-size:1.55rem;
 font-weight:950;
 letter-spacing:-0.03em;
 color:var(--tw-gray-900);
 margin-top:.15rem;
}

/* Tables (sortable/filterable) */
:where(.medexp-tw) .tw-tableTools{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin-bottom:.75rem;}
:where(.medexp-tw) .tw-tableWrap{overflow:auto;border:1px solid var(--tw-gray-200);border-radius:1rem;background:var(--tw-white);}
:where(.medexp-tw) .tw-table{width:100%;border-collapse:separate;border-spacing:0;min-width:640px;}
:where(.medexp-tw) .tw-table thead th{position:sticky;top:0;background:rgba(249,250,251,.92);backdrop-filter:saturate(160%) blur(10px);border-bottom:1px solid var(--tw-gray-200);text-align:left;padding:.7rem .85rem;font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--tw-gray-500);}
:where(.medexp-tw) .tw-table .tw-thNum{text-align:right;}
:where(.medexp-tw) .tw-table tbody td{border-bottom:1px solid var(--tw-gray-100);padding:.8rem .85rem;vertical-align:top;font-size:.9rem;color:var(--tw-gray-800);}
:where(.medexp-tw) .tw-table tbody tr:hover td{background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.04);}
:where(.medexp-tw) .tw-table tbody tr:last-child td{border-bottom:none;}
:where(.medexp-tw) .tw-tdNum{text-align:right;font-variant-numeric:tabular-nums;}
:where(.medexp-tw) .tw-tdTitle{font-weight:800;letter-spacing:-0.01em;}
:where(.medexp-tw) .tw-tdSub{margin-top:.2rem;color:var(--tw-gray-500);font-size:.8rem;font-weight:700;}
:where(.medexp-tw) .tw-tdEmpty{padding:1rem;color:var(--tw-gray-500);font-weight:700;}
:where(.medexp-tw) .tw-thBtn{display:inline-flex;align-items:center;gap:.45rem;background:transparent;border:none;padding:0;color:inherit;font:inherit;cursor:pointer;}
:where(.medexp-tw) .tw-thBtn:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.16);border-radius:.4rem;}
:where(.medexp-tw) .tw-thBtn.is-sort-asc::after{content:'▲';font-size:.65rem;opacity:.75;}
:where(.medexp-tw) .tw-thBtn.is-sort-desc::after{content:'▼';font-size:.65rem;opacity:.75;}

/* Sidebar course switcher */
:where(.medexp-tw) .tw-courseSwitch .tw-input{padding-top:.6rem;padding-bottom:.6rem;}

/* Topbar course switcher */
:where(.medexp-tw) .tw-courseTopSwitch{display:flex;align-items:center;gap:.55rem;min-width:0;}
:where(.medexp-tw) .tw-courseTopSwitch__label{font-size:.85rem;font-weight:800;color:var(--tw-gray-600);white-space:nowrap;}
:where(.medexp-tw) .tw-courseTopSwitch__select{min-width:15rem;max-width:22rem;padding:.5rem .75rem;font-size:.92rem;}
:where(.medexp-tw) .tw-courseTopSwitch__pill{display:inline-flex;align-items:center;max-width:22rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.48rem .75rem;border-radius:.85rem;border:1px solid var(--tw-gray-200);background:#fff !important;font-weight:800;color:var(--tw-gray-900) !important;}
@media (max-width: 640px){
 :where(.medexp-tw) .tw-courseTopSwitch__label{display:none;}
 :where(.medexp-tw) .tw-courseTopSwitch__select{min-width:10rem;max-width:14rem;}
 :where(.medexp-tw) .tw-courseTopSwitch__pill{max-width:14rem;}
}



:where(.medexp-tw) .tw-courseDropdown{position:relative;min-width:0;display:inline-flex;}
:where(.medexp-tw) .tw-courseDropdown__btn{display:flex;align-items:center;justify-content:space-between;gap:.65rem;min-width:15rem;max-width:22rem;width:100%;padding:.56rem .9rem;border:1px solid var(--tw-gray-200);border-radius:9999px;background:#fff;color:var(--tw-gray-900);font-weight:800;box-shadow:0 1px 0 rgba(17,24,39,.03);cursor:pointer;}
:where(.medexp-tw) .tw-courseDropdown__btn:hover{border-color:var(--tw-gray-300);box-shadow:0 1px 0 rgba(17,24,39,.04),0 12px 28px rgba(15,23,42,.10);}
:where(.medexp-tw) .tw-courseDropdown__btn:focus{outline:none;box-shadow:0 0 0 3px rgba(59,130,246,.22),0 12px 28px rgba(15,23,42,.10);}
:where(.medexp-tw) .tw-courseDropdown__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
:where(.medexp-tw) .tw-courseDropdown__chev{flex:0 0 auto;font-size:.9rem;opacity:.65;transform:translateY(-1px);}
.tw-courseDropdown__chevIco{width:18px;height:18px;display:block;}
:where(.medexp-tw) .tw-courseDropdown.is-open .tw-courseDropdown__chev{transform:translateY(-1px) rotate(180deg);opacity:.8;}

:where(.medexp-tw) .tw-courseDropdown__menu{position:absolute;top:calc(100% + .55rem);left:0;right:0;z-index:60;background:#fff;border:1px solid var(--tw-gray-200);border-radius:18px;box-shadow:0 18px 44px rgba(15,23,42,.14);padding:.55rem;}
:where(.medexp-tw) .tw-courseDropdown__searchWrap{padding:.25rem .25rem .45rem;}
:where(.medexp-tw) .tw-courseDropdown__search{width:100%;padding:.55rem .75rem;border:1px solid var(--tw-gray-200);border-radius:14px;background:var(--tw-gray-50);font-weight:700;}
:where(.medexp-tw) .tw-courseDropdown__search:focus{outline:none;background:#fff;border-color:var(--tw-gray-300);box-shadow:0 0 0 3px rgba(59,130,246,.18);}
:where(.medexp-tw) .tw-courseDropdown__list{max-height:340px;overflow:auto;padding:.15rem;}
:where(.medexp-tw) .tw-courseDropdown__opt{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:.62rem .75rem;border-radius:14px;background:transparent;border:0;cursor:pointer;font-weight:800;color:var(--tw-gray-900);}
:where(.medexp-tw) .tw-courseDropdown__opt:hover{background:var(--tw-gray-50);}
:where(.medexp-tw) .tw-courseDropdown__opt[aria-selected="true"]{background:rgba(59,130,246,.10);}
:where(.medexp-tw) .tw-courseDropdown__opt:focus{outline:none;background:var(--tw-gray-50);box-shadow:inset 0 0 0 2px rgba(59,130,246,.25);}

/* -------------------------------------------------------------------------
   Unified dashboard dropdowns (all <select> in dashboard tabs)
   -------------------------------------------------------------------------
   We progressively enhance native selects into the same UI component used by
   the course switcher (button + menu + optional search).
*/
:where(.medexp-tw) .tw-courseDropdown.tw-dd{position:relative;display:inline-flex;min-width:0;max-width:100%;}
:where(.medexp-tw) .tw-courseDropdown.tw-dd .tw-courseDropdown__btn{min-width:0;max-width:100%;width:100%;}
:where(.medexp-tw) .tw-courseDropdown.tw-dd .tw-courseDropdown__menu{left:0;right:0;min-width:12rem;max-width:calc(100vw - 24px);}

/* Hide the native select but keep it in the DOM for form/state semantics. */
:where(.medexp-tw) select.tw-dd__native{position:absolute !important;left:-9999px !important;top:auto !important;width:1px !important;height:1px !important;opacity:0 !important;pointer-events:none !important;}

/* Disabled state */
:where(.medexp-tw) .tw-courseDropdown.tw-dd.is-disabled .tw-courseDropdown__btn{opacity:.6;cursor:not-allowed;box-shadow:none;}
:where(.medexp-tw) .tw-courseDropdown.tw-dd.is-disabled .tw-courseDropdown__btn:hover{border-color:var(--tw-gray-200);box-shadow:none;}

/* Compact variant (maps from tw-input-small) */
:where(.medexp-tw) .tw-courseDropdown.tw-dd.tw-dd--small .tw-courseDropdown__btn{padding:.42rem .65rem;font-size:.9rem;font-weight:800;}
:where(.medexp-tw) .tw-courseDropdown.tw-dd.tw-dd--small .tw-courseDropdown__menu{top:calc(100% + .45rem);}

/* Make dropdowns behave well when used inside labels/stacked forms */
:where(.medexp-tw) .medexp-label .tw-courseDropdown.tw-dd{display:block;width:100%;}
:where(.medexp-tw) .medexp-label .tw-courseDropdown.tw-dd .tw-courseDropdown__btn{width:100%;}

@media (max-width: 640px){
 :where(.medexp-tw) .tw-courseDropdown__btn{min-width:10rem;max-width:14rem;}
 :where(.medexp-tw) .tw-courseDropdown__menu{left:auto;right:0;min-width:18rem;max-width:calc(100vw - 24px);}
}


/* ========================================================================== */
/* LearnQ.ai-inspired dashboard skin */
/* ========================================================================== */

/* Palette alignment (LearnQ look) */
.medexp-tw{
 --tw-gray-50:#f8fafc;
 --tw-gray-100:#f3f4f6;
 --tw-gray-200:#e5e7eb;
 --tw-gray-300:#d1d5db;
 --tw-gray-500:#6b7280;
 --tw-gray-600:#4b5563;
 --tw-gray-700:#374151;
 --tw-gray-800:#1f2937;
 --tw-gray-900:#111827;
 --tw-indigo-600:var(--medexp-brand-blue);
 --tw-indigo-500:#3b82f6;
}

/* Flat shell (remove gradients/glass) */
.medexp-dashboardPage .tw-shell{background:var(--tw-gray-50) !important;}
:where(.medexp-tw) .tw-topbar{background:#fff;backdrop-filter:none;}

/* Sidebar */
:where(.medexp-tw) .tw-sidebar{background:#fff;border-right:1px solid var(--tw-gray-200);}
:where(.medexp-tw) .tw-navlink{border-radius:10px;color:var(--tw-gray-700);font-weight:700;}
:where(.medexp-tw) .tw-navlink:hover{background:var(--tw-gray-100);transform:none;}
:where(.medexp-tw) .tw-navlink.is-active{background:var(--tw-indigo-600);color:#fff;}
:where(.medexp-tw) .tw-navlink.is-active .tw-navicon{color:#fff;}

/* Cards */
:where(.medexp-tw) .tw-card{border-radius:18px;box-shadow:0 1px 0 rgba(17,24,39,.02), 0 4px 14px rgba(2,6,23,.05), 0 12px 32px rgba(2,6,23,.03);border:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.92);backdrop-filter:blur(10px);}
:where(.medexp-tw) .tw-tile,
:where(.medexp-tw) .tw-badgeCard,
:where(.medexp-tw) .tw-row,
:where(.medexp-tw) .tw-chartCard{border-radius:18px;box-shadow:0 1px 0 rgba(17,24,39,.02), 0 4px 14px rgba(2,6,23,.05), 0 12px 32px rgba(2,6,23,.03);background:rgba(255,255,255,.92);backdrop-filter:blur(10px);}

/* Buttons: LearnQ-like (solid blue primary, outlined secondary) */
:where(.medexp-tw) .tw-btn{border-radius:9999px;padding:0.65rem 1.15rem;font-weight:900;letter-spacing:-0.01em;transition:transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s cubic-bezier(0.4,0,0.2,1), filter 0.2s cubic-bezier(0.4,0,0.2,1), background-color 0.2s cubic-bezier(0.4,0,0.2,1), border-color 0.2s cubic-bezier(0.4,0,0.2,1), color 0.2s cubic-bezier(0.4,0,0.2,1);}
:where(.medexp-tw) .tw-btn-primary{background:var(--medexp-primary-grad, var(--medexp-brand-teal, #00a676));color:#fff;border:1px solid rgba(0,0,0,0.06);box-shadow:0 14px 26px -20px rgba(var(--medexp-brand-teal-rgb,0,166,118),0.95), 0 10px 18px -14px rgba(0,0,0,0.18);text-shadow:0 1px 1px rgba(0,0,0,0.22);}
:where(.medexp-tw) .tw-btn-primary:hover{transform:translateY(-2px);box-shadow:0 20px 32px -22px rgba(var(--medexp-brand-teal-rgb,0,166,118),0.95), 0 18px 26px -18px rgba(0,0,0,0.18);filter:brightness(0.96);}
:where(.medexp-tw) .tw-btn-secondary{background:rgba(255,255,255,0.98);color:var(--medexp-brand-blue, #1a4f9c);border:2px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),0.38);box-shadow:0 10px 18px -16px rgba(var(--medexp-brand-navy-rgb,15,23,42),0.14);}
:where(.medexp-tw) .tw-btn-secondary:hover{background:var(--tw-gray-50);} 

/* Typography */
:where(.medexp-tw) .tw-title{font-size:1.4rem;font-weight:800;}
:where(.medexp-tw) .tw-muted{color:var(--tw-gray-600);}


/* -------------------------------------------------------------------------- */
/* LearnQ.ai-inspired user menu dropdown (polished) */
/* -------------------------------------------------------------------------- */

/* Trigger button (top-right) — !important to beat WP theme button{background:blue} */
:where(.medexp-tw) .tw-userMenu__btn{
 border-radius:999px;
 background:#fff !important;
 color:var(--tw-gray-900,#0f172a) !important;
 border:1px solid rgba(226,232,240,1);
 box-shadow:0 1px 2px rgba(2,6,23,.06);
 padding:.45rem .6rem;
 gap:.55rem;
 outline:none;
}
:where(.medexp-tw) .tw-userMenu__btn:hover{background:rgba(248,250,252,1) !important;}
:where(.medexp-tw) .tw-userMenu__btn:focus,
:where(.medexp-tw) .tw-userMenu__btn:focus-visible{
 outline:none;
 background:#fff !important;
 box-shadow:0 0 0 3px rgba(var(--medexp-brand-blue-rgb,26,79,156),.20), 0 1px 2px rgba(2,6,23,.06);
}
:where(.medexp-tw) .tw-userMenu__name{font-weight:700;font-size:.95rem;color:var(--tw-gray-900) !important;}
:where(.medexp-tw) .tw-avatar{width:1.85rem;height:1.85rem;font-weight:800;background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);color:var(--tw-indigo-600);}
:where(.medexp-tw) .tw-userMenu__caret svg.tw-ico{width:18px;height:18px;display:block;}

/* Dropdown card */
:where(.medexp-tw) .tw-userMenu__drop{
 background:#fff;
 border:1px solid rgba(226,232,240,1);
 border-radius:16px;
 box-shadow:0 18px 45px rgba(2,6,23,.18);
 padding:.65rem;
 min-width:270px;
 backdrop-filter:none;
}

/* Menu rows */
/* NOTE: older dashboard CSS earlier in this file styles `.tw-userMenu__drop a` with higher specificity,
 which can override `.tw-userMenu__item`. To ensure consistent alignment, we re-declare the row
 styling with a selector that matches that specificity: `.tw-userMenu__drop a.tw-userMenu__item`. */
:where(.medexp-tw) .tw-userMenu__item,
:where(.medexp-tw) .tw-userMenu__drop a.tw-userMenu__item{
 display:flex;
 align-items:center;
 gap:.7rem;
 padding:.72rem .8rem;
 font-size:.98rem;
 font-weight:650;
 line-height:1.1;
 color:var(--tw-gray-900);
 text-decoration:none;
 border-radius:12px;
}
:where(.medexp-tw) .tw-userMenu__item:hover,
:where(.medexp-tw) .tw-userMenu__drop a.tw-userMenu__item:hover{background:rgba(241,245,249,1);}

/* Label baseline polish */
:where(.medexp-tw) .tw-userMenu__item > span:last-child,
:where(.medexp-tw) .tw-userMenu__drop a.tw-userMenu__item > span:last-child{
 display:block;
 line-height:1.15;
}

:where(.medexp-tw) .tw-userMenu__icon{
 width:22px;
 height:22px;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 flex:0 0 auto;
 color:var(--tw-gray-900);
 opacity:.9;
}
:where(.medexp-tw) .tw-userMenu__icon svg.tw-ico{width:20px;height:20px;display:block;}

:where(.medexp-tw) .tw-userMenu__sep{height:1px;background:rgba(226,232,240,1);margin:.5rem .55rem;}

/* Sign out button */
/* Sign out button */
/* Match the higher specificity of the legacy `.tw-userMenu__drop a` rule as well. */
:where(.medexp-tw) .tw-userMenu__signout,
:where(.medexp-tw) .tw-userMenu__drop a.tw-userMenu__signout{
 display:flex;
 align-items:center;
 justify-content:center;
 gap:.7rem;
 margin:.15rem .35rem .35rem;
 padding:.85rem .9rem;
 border-radius:12px;
 font-weight:650;
 background:rgba(248,250,252,1);
 border:1px solid rgba(226,232,240,1);
 color:var(--tw-gray-900);
 text-decoration:none;
}
:where(.medexp-tw) .tw-userMenu__signout:hover,
:where(.medexp-tw) .tw-userMenu__drop a.tw-userMenu__signout:hover{background:rgba(241,245,249,1);}

/* Footer links */
:where(.medexp-tw) .tw-userMenu__foot{
 display:flex;
 align-items:center;
 justify-content:center;
 gap:.6rem;
 padding:.4rem .75rem .25rem;
 color:rgba(100,116,139,1);
 font-size:.88rem;
 font-weight:600;
}
:where(.medexp-tw) .tw-userMenu__foot a,
:where(.medexp-tw) .tw-userMenu__drop .tw-userMenu__foot a{
 display:inline-flex;
 align-items:center;
 padding:0;
 border-radius:0;
 background:transparent;
 color:rgba(100,116,139,1);
 text-decoration:none;
 font-weight:600;
}
:where(.medexp-tw) .tw-userMenu__foot a:hover{background:transparent;text-decoration:underline;}
:where(.medexp-tw) .tw-userMenu__dot{opacity:.9;}

/* === Notifications (Phase 8.2) === */
:where(.medexp-tw) .medexp-notifyWrap{position:relative;}
:where(.medexp-tw) .medexp-notifyBell{
 position:relative;
 display:inline-flex;align-items:center;justify-content:center;
 width:2.35rem;height:2.35rem;
 border-radius:9999px;
 border:1px solid rgba(148,163,184,.22);
 background:#fff;
 color:var(--tw-gray-600,#475569);
 cursor:pointer;
 transition:background .15s ease, border-color .15s ease, color .15s ease;
 padding:0;
 appearance:none;-webkit-appearance:none;font-family:inherit;
 box-shadow:0 1px 2px rgba(2,6,23,.06);
}
:where(.medexp-tw) .medexp-notifyBell:hover{background:var(--tw-gray-50,#f8fafc);border-color:rgba(148,163,184,.35);color:var(--tw-gray-800,#1e293b);}
:where(.medexp-tw) .medexp-notifyBell:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(var(--medexp-brand-blue-rgb,26,79,156),.18);}
:where(.medexp-tw) .medexp-notifyBell .tw-ico{width:1.1rem;height:1.1rem;display:block;}
:where(.medexp-tw) .medexp-notifyBadge{position:absolute;top:-0.25rem;right:-0.25rem;background:#f43f5e !important;color:#fff !important;-webkit-text-fill-color:#fff !important;border-radius:9999px;font-size:0.55rem;line-height:1;padding:0.15rem 0.3rem;font-weight:900;border:1.5px solid #fff;min-width:0.85rem;text-align:center;box-shadow:0 2px 6px rgba(244,63,94,.35);z-index:2;}
:where(.medexp-tw) .medexp-notifyDrop{position:absolute;right:0;top:calc(100% + .6rem);width:min(22rem, 92vw);background:var(--tw-white);border:1px solid var(--tw-gray-200);border-radius:1.1rem;box-shadow:0 18px 42px rgba(15,23,42,.16);padding:0.85rem;z-index:60;max-height:none;overflow:visible;}
:where(.medexp-tw) .medexp-notifyDrop__top{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.75rem;}
:where(.medexp-tw) .medexp-notifyDrop__title{font-weight:800;letter-spacing:-0.01em;}
:where(.medexp-tw) .medexp-notifyDrop__topActions{display:flex;align-items:center;gap:.5rem;}
:where(.medexp-tw) .medexp-notifyBtn{border:1px solid var(--tw-gray-200);background:var(--tw-gray-50) !important;color:var(--tw-gray-800) !important;padding:.42rem .6rem;border-radius:.85rem;font-weight:800;font-size:.8rem;cursor:pointer;}
:where(.medexp-tw) .medexp-notifyPrimary{border:1px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),.35);background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.10);color:var(--tw-indigo-600);padding:.45rem .75rem;border-radius:.9rem;font-weight:800;cursor:pointer;}
:where(.medexp-tw) .medexp-notifyDrop__section{margin-top:.75rem;}
:where(.medexp-tw) .medexp-notifyDrop__sub{font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--tw-gray-500);font-weight:800;margin-bottom:.45rem;}
:where(.medexp-tw) .medexp-notifyItem{border:1px solid var(--tw-gray-200);border-radius:1rem;padding:.75rem;margin-bottom:.6rem;background:var(--tw-white);}
:where(.medexp-tw) .medexp-notifyItem.is-unread{background:linear-gradient(180deg, rgba(var(--medexp-brand-blue-rgb,26,79,156),.06), transparent 70%), var(--tw-white);}
:where(.medexp-tw) .medexp-notifyItem__head{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;}
:where(.medexp-tw) .medexp-notifyItem__title{font-weight:800;}
:where(.medexp-tw) .medexp-notifyItem__time{font-size:.75rem;color:var(--tw-gray-500);font-weight:800;white-space:nowrap;}
:where(.medexp-tw) .medexp-notifyItem__body{margin-top:.35rem;color:var(--tw-gray-700);font-size:.9rem;line-height:1.25rem;}
:where(.medexp-tw) .medexp-notifyItem__actions{display:flex;align-items:center;gap:.6rem;margin-top:.55rem;}
:where(.medexp-tw) .medexp-notifyLink{font-weight:800;color:var(--tw-indigo-600);text-decoration:none;}
:where(.medexp-tw) .medexp-notifyLink:hover{text-decoration:underline;}
:where(.medexp-tw) .medexp-notifyMark{border:none;background:transparent;color:var(--tw-gray-600);font-weight:800;cursor:pointer;padding:0;}
:where(.medexp-tw) .medexp-notifyMark:hover{color:var(--tw-gray-900);}
:where(.medexp-tw) .medexp-notifyEmpty{color:var(--tw-gray-600);font-weight:700;padding:.4rem 0;}
:where(.medexp-tw) .medexp-notifyPager{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-top:.55rem;}
:where(.medexp-tw) .medexp-notifyPager__info{font-size:.8rem;color:var(--tw-gray-600);font-weight:800;white-space:nowrap;}
:where(.medexp-tw) .medexp-notifyPager .medexp-notifyBtn{padding:.38rem .55rem;border-radius:.8rem;}
:where(.medexp-tw) .medexp-notifySettings{border:1px dashed var(--tw-gray-200);border-radius:1rem;padding:.75rem;background:rgba(249,250,251,.65);position:relative;overflow:hidden;}
:where(.medexp-tw) .medexp-notifySettings.is-loading{opacity:.9;}
:where(.medexp-tw) .medexp-notifySkel{position:absolute;inset:0;padding:.75rem;background:rgba(249,250,251,.78);border-radius:1rem;pointer-events:none;}
:where(.medexp-tw) .medexp-notifySkel .tw-skelList{width:100%;}
:where(.medexp-tw) .medexp-notifyToggle{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem;font-weight:800;color:var(--tw-gray-800);}
:where(.medexp-tw) .medexp-notifyToggle input{transform:translateY(1px);}
:where(.medexp-tw) .medexp-notifyRow{display:flex;gap:.75rem;flex-wrap:wrap;align-items:flex-end;margin-top:.5rem;}
:where(.medexp-tw) .medexp-notifyRow label{display:flex;flex-direction:column;gap:.25rem;font-size:.85rem;font-weight:800;color:var(--tw-gray-700);}
:where(.medexp-tw) .medexp-notifyRow input{border:1px solid var(--tw-gray-200);border-radius:.85rem;padding:.45rem .6rem;background:var(--tw-white);}
:where(.medexp-tw) .medexp-notifyHint{margin-top:.55rem;color:var(--tw-gray-500);font-size:.82rem;line-height:1.15rem;font-weight:700;}

/* Badge: high-specificity guard — always white text on red bg */
.medexp-tw .medexp-notifyBadge,
.medexp-tw span.medexp-notifyBadge{
 background:#f43f5e !important;
 color:#fff !important;
 -webkit-text-fill-color:#fff !important;
 background-clip:border-box !important;
 -webkit-background-clip:border-box !important;
}

/* Bell button: high-specificity guard against WP theme button overrides */
.medexp-tw .medexp-notifyBell,
.medexp-tw button.medexp-notifyBell{
 background:#fff !important;
 color:var(--tw-gray-600,#475569) !important;
 border:1px solid rgba(148,163,184,.22) !important;
 border-radius:9999px !important;
 padding:0 !important;
 width:2.35rem;height:2.35rem;
 box-shadow:0 1px 2px rgba(2,6,23,.06) !important;
}
.medexp-tw .medexp-notifyBell:hover,
.medexp-tw button.medexp-notifyBell:hover{
 background:var(--tw-gray-50,#f8fafc) !important;
 border-color:rgba(148,163,184,.35) !important;
 color:var(--tw-gray-800,#1e293b) !important;
}

/* === Card polish (consistent elevation + radius) === */
.medexp-tw .tw-card{
 border-radius:18px;
 box-shadow:0 12px 32px rgba(2,6,23,.08);
 border-color:rgba(226,232,240,.95);
}
.medexp-tw .tw-card:hover{
 box-shadow:0 18px 52px rgba(2,6,23,.10);
 transform:translateY(-1px);
}
.medexp-tw .tw-card__pad{padding:1.5rem;}

/* -------------------------------------------------------------------------- */
/* Layout guards (higher specificity)
   Some WP themes override our low-specificity :where() rules, collapsing the
   intended padding and making cards touch the sidebar / viewport edges.
*/
.medexp-dashboardPage.medexp-tw .tw-topbar__inner{
 padding:1rem 1.5rem !important;
 max-width:88rem;
 margin:0 auto;
}
.medexp-dashboardPage.medexp-tw .tw-main{
 padding:1.5rem !important;
 max-width:88rem;
 margin:0 auto;
  /* Prevent theme-induced horizontal scroll when a child accidentally exceeds width */
  overflow-x:clip;
}
@media (min-width: 1024px){
 .medexp-dashboardPage.medexp-tw .tw-topbar__inner{padding:1.1rem 2rem !important;}
 .medexp-dashboardPage.medexp-tw .tw-main{padding:1.75rem 2rem !important;}
}

/* Desktop sidebar collapse (burger toggle) */
@media (min-width: 1024px){
 .medexp-dashboardPage.medexp-tw .tw-shell.is-nav-collapsed .tw-sidebar{
  width:0 !important;
  flex:0 0 0 !important;
  padding:0 !important;
  border-right:none !important;
  overflow:hidden !important;
 }
 .medexp-dashboardPage.medexp-tw .tw-shell.is-nav-collapsed .tw-sidebar > *{display:none !important;}
}



:where(.medexp-tw) .tw-metricStrip[hidden]{display:none !important;}
/* === Dashboard subtabs (Overview / Performance / Study plan / Practice / More) === */
.tw-dashSubtabs{ margin-top:1rem; }

/* Dashboard layout resilience (wrapping + overflow) */
:where(.medexp-tw) .tw-sectionhead > div{min-width:0;}
:where(.medexp-tw) .tw-sectionhead .tw-row__actions{max-width:100%;}
:where(.medexp-tw) .medexp-missionCard .flex{flex-wrap:wrap;}

/* Practice page: keep tabs inside the main card and show an intro header (matches reference screenshot). */
.tw-practiceShell .tw-practiceIntro__title{ font-size:1.35rem; font-weight:800; letter-spacing:-.01em; line-height:1.15; }
.tw-practiceShell .tw-practiceIntro__sub{ margin-top:.2rem; }
.tw-practiceShell .tw-practiceIntro__desc{ margin-top:.6rem; max-width:78ch; }
.tw-practiceShell .tw-dashSubtabs{ margin-top:1rem; }
.tw-practiceShell .tw-dashSubtabs__bar{ width:100%; }
.tw-practicePanel{ margin-top:0; }
.tw-practicePanel[hidden]{ display:none !important; }

.tw-dashSubtabs__bar{
 display:flex;
 flex-wrap:wrap;
 gap:.6rem;
 align-items:center;
 padding:0 0 .35rem 0;
 background:transparent;
 border:none;
 border-bottom:1px solid rgba(15, 23, 42, .10);
 border-radius:0;
}
.tw-dashTabBtn{
 appearance:none;
 border:1px solid rgba(15, 23, 42, .12);
 background:#fff;
 color:inherit;
 font:inherit;
 font-weight:700;
 font-size:.9rem;
 line-height:1;
 padding:.55rem .8rem;
 border-radius:999px;
 cursor:pointer;
 user-select:none;
 display:inline-flex;
 align-items:center;
 gap:.35rem;
}
.tw-dashTabBtn:hover{ background:rgba(15, 23, 42, .04); }
.tw-dashTabBtn.is-active{
 border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156), .35);
 background:rgba(var(--medexp-brand-blue-rgb,26,79,156), .08);
}
.tw-dashTabBtn--more{ position:relative; }

.tw-dashSubtabs__panels{ margin-top:.85rem; }


.tw-dashMore{ position:relative; margin-left:auto; }
.tw-dashMoreMenu{
 position:absolute;
 right:0;
 top:calc(100% + .45rem);
 min-width:190px;
 background:#fff;
 border:1px solid rgba(15, 23, 42, .12);
 border-radius:14px;
 box-shadow:0 12px 30px rgba(15, 23, 42, .12);
 padding:.35rem;
 z-index:50;
}
.tw-dashMoreItem{
 width:100%;
 text-align:left;
 appearance:none;
 border:0;
 background:transparent;
 font:inherit;
 font-weight:700;
 padding:.65rem .75rem;
 border-radius:12px;
 cursor:pointer;
}
.tw-dashMoreItem:hover{ background:rgba(15, 23, 42, .04); }
.tw-dashMoreItem.is-active{ background:rgba(var(--medexp-brand-blue-rgb,26,79,156), .08); }

/* === Enrollment expiration pill (Dashboard topbar) ======================= */
.tw-expPillWrap{position:relative;display:inline-flex;align-items:center}
.tw-expPill{display:inline-flex;align-items:center;justify-content:center;padding:.55rem .85rem;border-radius:9999px;font-weight:800;letter-spacing:.02em;font-size:.85rem;line-height:1;background:#1f9d57;color:#fff;box-shadow:0 6px 14px rgba(31, 157, 87, .22);border:0;appearance:none;-webkit-appearance:none;font-family:inherit;cursor:pointer;user-select:none}
.tw-expPill:focus{outline:3px solid rgba(37,99,235,.22);outline-offset:2px}
.tw-expPill.is-expired{background:#c23a3a;box-shadow:0 6px 14px rgba(194, 58, 58, .18)}
.tw-expTooltip{position:absolute;left:50%;transform:translateX(-50%);top:calc(100% + .45rem);background:#fff;border:1px solid rgba(15, 23, 42, .12);border-radius:12px;padding:.55rem .75rem;white-space:nowrap;font-weight:700;font-size:.9rem;color:#0f172a;box-shadow:0 12px 30px rgba(15, 23, 42, .12);opacity:0;pointer-events:none;transition:opacity .12s ease, transform .12s ease;z-index:60}
.tw-expPillWrap:hover .tw-expTooltip,.tw-expPillWrap:focus-within .tw-expTooltip{opacity:1;transform:translateX(-50%) translateY(0)}

/* === Subscription extension modal (opened from EXP pill) ================== */
.medexp-modal .medexp-subModalMeta{display:flex;flex-direction:column;gap:.25rem;}
.medexp-modal .medexp-subModalCourse{font-weight:850;font-size:1.02rem;line-height:1.25;}
.medexp-modal .medexp-subModalEnds{margin-top:.1rem;color:rgba(30,41,59,.78);}
.medexp-modal .medexp-subModalHint{margin-top:.85rem;}
.medexp-modal .medexp-subModalActions{margin-top:.65rem;display:flex;flex-wrap:wrap;gap:.5rem;}
.medexp-modal .medexp-subModalFineprint{margin-top:.6rem;color:rgba(30,41,59,.62);font-size:.9rem;}
.medexp-modal .medexp-subModalFooterLink{margin-top:1rem;}

/* === Expired subscription UX ============================================= */
/* Centered empty state shown when all courses have expired */
:where(.medexp-tw) .tw-expiredEmptyState{text-align:center;padding:2.5rem 1.5rem;}
:where(.medexp-tw) .tw-expiredEmptyState__icon{font-size:48px;line-height:1;margin-bottom:.75rem;}
:where(.medexp-tw) .tw-expiredEmptyState__title{font-size:20px;font-weight:800;color:var(--tw-gray-800,#1e293b);margin-bottom:.5rem;}
:where(.medexp-tw) .tw-expiredEmptyState__body{font-size:15px;color:var(--tw-gray-500,#64748b);max-width:440px;margin:0 auto .75rem;line-height:1.5;}
:where(.medexp-tw) .tw-expiredEmptyState__actions{display:flex;justify-content:center;gap:.5rem;flex-wrap:wrap;margin-top:1rem;}

/* Dismissible renewal banner (top of content area) */
:where(.medexp-tw) .tw-renewalBanner{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#FEF3C7 0%,#FDE68A 100%);border:1px solid rgba(245,158,11,.25);border-radius:12px;padding:.75rem 1rem;margin-bottom:1rem;}
:where(.medexp-tw) .tw-renewalBanner__content{display:flex;align-items:center;gap:.5rem;flex:1;}
:where(.medexp-tw) .tw-renewalBanner__icon{font-size:20px;flex-shrink:0;}
:where(.medexp-tw) .tw-renewalBanner__text{font-size:14px;font-weight:600;color:#92400e;}
:where(.medexp-tw) .tw-renewalBanner__link{color:#1d4ed8;text-decoration:underline;font-weight:700;}
:where(.medexp-tw) .tw-renewalBanner__dismiss{background:none;border:none;cursor:pointer;font-size:20px;color:#92400e;opacity:.6;padding:4px 8px;line-height:1;}
:where(.medexp-tw) .tw-renewalBanner__dismiss:hover{opacity:1;}

/* Renewal card on the overview tab */
:where(.medexp-tw) .tw-renewalCard__header{display:flex;align-items:center;gap:.75rem;}
:where(.medexp-tw) .tw-renewalCard__icon{font-size:36px;flex-shrink:0;}
:where(.medexp-tw) .tw-renewalCard__body{margin-top:1rem;}
:where(.medexp-tw) .tw-renewalCard__perks{display:flex;flex-direction:column;gap:.35rem;}
:where(.medexp-tw) .tw-renewalCard__perk{font-size:14px;font-weight:600;color:var(--tw-gray-700,#334155);}
:where(.medexp-tw) .tw-renewalCard__actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1.25rem;}

/* -----------------------------
   UIX improvements (2026-01)
   ----------------------------- */

/* Course switch dropdown active option (keyboard) */
.tw-courseDropdown__opt.is-active,
.tw-courseDropdown__opt:focus-visible{
  background: rgba(var(--medexp-brand-blue-rgb,26,79,156), 0.10);
  outline: none;
}

/* Performance chart tooltip */
.medexp-perfChart{ position: relative; }
.medexp-perfChart__tip{
  position: absolute;
  z-index: 50;
  display: none;
  min-width: 220px;
  max-width: 280px;
  padding: 0.75rem 0.75rem;
  border-radius: 14px;
  background: rgba(17,24,39,0.96);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.35;
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}
.medexp-perfChart__tip strong{ display:block; margin-bottom: 0.25rem; font-weight: 750; }

@media (prefers-reduced-motion: reduce){
  .tw-courseDropdown__menu{ transition: none !important; }
}

/* Practice: show subtabs in topbar slot */


/* -----------------------------
   Dashboard walkthrough (tour)
   ----------------------------- */


.tw-tourOverlay{
  position: fixed;
  inset: 0;
  z-index: 9998;
  /* slight backdrop blur; keep background almost transparent so spotlight shadow does the darkening */
  background: rgba(2, 6, 23, 0.02);
}

.tw-tourSpotlight{
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.72);
  outline: 2px solid rgba(255,255,255,0.14);
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}

.tw-tourTip{
  position: fixed;
  z-index: 10000;
  width: min(380px, calc(100vw - 2rem));
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0,0,0,0.22);
  overflow: hidden;
  transform: translateY(6px);
  opacity: 1;
}

.tw-tourTip__head{
  position: relative;
  padding: .95rem 1rem .65rem;
  background: linear-gradient(180deg, rgba(var(--medexp-brand-blue-rgb,26,79,156), 0.10), rgba(var(--medexp-brand-blue-rgb,26,79,156), 0.00));
}

.tw-tourTip__title{
  font-weight: 850;
  letter-spacing: -.01em;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.2;
  padding-right: 2rem;
}

button.tw-tourTip__close,
.tw-tourTip__close{
  position: absolute;
  top: .5rem;
  right: .6rem;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  background: rgba(255,255,255,0.85) !important;
  color: #0f172a !important;
  font-size: 1.35rem;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
  outline: none;
}
button.tw-tourTip__close:hover,
.tw-tourTip__close:hover{ background: #f1f5f9 !important; color: #0f172a !important; border-color: transparent !important; outline: none !important; }
button.tw-tourTip__close:focus,
.tw-tourTip__close:focus{ border-color: transparent !important; outline: none !important; }

.tw-tourTip__body{
  padding: 0 1rem 1rem;
  color: #334155;
  font-size: .92rem;
  line-height: 1.45;
}

/* Missing/slow-load notice (shown when a required target isn't found) */
.tw-tourMissing{
  margin: -0.25rem 1rem 1rem;
  padding: .7rem .75rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px dashed rgba(15, 23, 42, 0.16);
  color: #475569;
  font-size: .86rem;
  line-height: 1.35;
}
.tw-tourMissing.is-waiting{
  border-style: solid;
  background: rgba(2, 6, 23, 0.03);
}
.tw-tourMissing__text{
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
}
.tw-tourMissing__btns{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.tw-tourMissing__btn{
  padding: .45rem .65rem !important;
  font-size: .82rem !important;
}

.tw-tourTip__foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.tw-tourProgress{
  font-size: .82rem;
  color: #64748b;
  font-weight: 800;
  letter-spacing: .01em;
}

.tw-tourBtns{
  display: flex;
  align-items: center;
  gap: .5rem;
}

.tw-tourBtn{
  padding: .55rem .8rem !important;
  font-size: .86rem !important;
  line-height: 1 !important;
}

/* Arrow (rotated square) */
.tw-tourArrow{
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ffffff;
  transform: rotate(45deg);
  border-left: 1px solid rgba(15, 23, 42, 0.10);
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  left: 42px;
  top: -7px;
}
.tw-tourArrow.is-none{ display:none; }
.tw-tourArrow.is-top{ top: -7px; }
.tw-tourArrow.is-bottom{
  top: auto;
  bottom: -7px;
  transform: rotate(225deg);
}
.tw-tourArrow.is-left{
  top: 42px;
  left: -7px;
  transform: rotate(315deg);
}
.tw-tourArrow.is-right{
  top: 42px;
  left: auto;
  right: -7px;
  transform: rotate(135deg);
}

@media (max-width: 640px){
  .tw-tourSpotlight{ border-radius: 16px; }
  .tw-tourTip{ width: calc(100vw - 1.25rem); }
}

@media (prefers-reduced-motion: reduce){
  .tw-tourSpotlight{ transition: none; }
  .tw-tourTip{ transform: none; }
}

/* === Support / Help Center ================================================ */
/* FAQs */
:where(.medexp-tw) .tw-faqList{display:flex;flex-direction:column;gap:.6rem;margin-top:.75rem;}
:where(.medexp-tw) details.tw-faq{border:1px solid rgba(15,23,42,.10);border-radius:1rem;padding:.65rem .8rem;background:rgba(15,23,42,.012);}
:where(.medexp-tw) details.tw-faq > summary{cursor:pointer;list-style:none;font-weight:750;letter-spacing:-0.01em;color:var(--tw-slate-900);font-size:.95rem;display:flex;align-items:flex-start;gap:.55rem;position:relative;padding-right:2.0rem;}
:where(.medexp-tw) details.tw-faq > summary::before{content:"";width:.45rem;height:.45rem;margin-top:.42rem;border-radius:999px;background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.85);box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.10);flex:0 0 auto;}
:where(.medexp-tw) details.tw-faq > summary::after{content:"";position:absolute;right:.35rem;top:50%;width:.55rem;height:.55rem;border-right:2px solid rgba(15,23,42,.35);border-bottom:2px solid rgba(15,23,42,.35);transform:translateY(-60%) rotate(45deg);transition:transform .16s ease;}
:where(.medexp-tw) details.tw-faq > summary::-webkit-details-marker{display:none;}
:where(.medexp-tw) details.tw-faq[open] > summary::after{transform:translateY(-35%) rotate(-135deg);}
:where(.medexp-tw) details.tw-faq[open]{border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.22);background:linear-gradient(180deg, rgba(var(--medexp-brand-blue-rgb,26,79,156),.06), rgba(15,23,42,.01) 60%);box-shadow:0 1px 0 rgba(17,24,39,.02),0 12px 26px rgba(17,24,39,.06);}
:where(.medexp-tw) .tw-faq__a{margin-top:.55rem;color:var(--tw-gray-700);font-weight:600;line-height:1.6;font-size:.95rem;}

/* FAQ categories (accordion) */
:where(.medexp-tw) .tw-faqCats{display:flex;flex-direction:column;gap:.75rem;margin-top:.75rem;}
:where(.medexp-tw) .tw-faqCat{border:1px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),.14);border-radius:1.1rem;background:linear-gradient(180deg, rgba(var(--medexp-brand-blue-rgb,26,79,156),.07), rgba(15,23,42,.00) 55%), var(--tw-white);padding:.55rem .75rem;position:relative;overflow:hidden;}
:where(.medexp-tw) .tw-faqCat::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg, rgba(var(--medexp-brand-blue-rgb,26,79,156),.95), rgba(var(--medexp-brand-teal-rgb,0,166,118),.95));opacity:.9;}
:where(.medexp-tw) .tw-faqCat[open]{border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.28);box-shadow:0 1px 0 rgba(17,24,39,.02),0 18px 50px rgba(17,24,39,.08);}
:where(.medexp-tw) .tw-faqCat>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:.75rem;font-weight:900;color:var(--tw-slate-900);padding:.6rem 2.35rem .6rem .75rem;border-radius:.95rem;background:rgba(15,23,42,.02);position:relative;}
:where(.medexp-tw) .tw-faqCat>summary:hover{background:rgba(15,23,42,.03);}
:where(.medexp-tw) .tw-faqCat>summary::-webkit-details-marker{display:none;}
:where(.medexp-tw) .tw-faqCat>summary::after{content:"";position:absolute;right:.95rem;top:50%;width:.6rem;height:.6rem;border-right:2px solid rgba(15,23,42,.40);border-bottom:2px solid rgba(15,23,42,.40);transform:translateY(-60%) rotate(45deg);transition:transform .16s ease;}
:where(.medexp-tw) .tw-faqCat[open]>summary::after{transform:translateY(-35%) rotate(-135deg);}
:where(.medexp-tw) .tw-faqCat__title{font-size:1.02rem;letter-spacing:-0.015em;color:var(--tw-indigo-600);}
:where(.medexp-tw) .tw-faqCat__meta{display:inline-flex;align-items:center;justify-content:center;min-width:2.7rem;margin-right:1.15rem;padding:.18rem .6rem;border-radius:999px;font-size:.75rem;font-weight:900;color:var(--tw-indigo-600);background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.10);border:1px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),.20);}
:where(.medexp-tw) .tw-faqCat__body{padding:.25rem .15rem .15rem .15rem;}
:where(.medexp-tw) .tw-faqCat__body .tw-faqList{margin-top:.65rem;}
:where(.medexp-tw) .tw-faqCat .tw-faq{margin-left:.25rem;}
:where(.medexp-tw) .tw-helpActions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.7rem;}


/* === Dashboard "Continue" hero (dominant CTA) ============================ */
:where(.medexp-tw) .tw-continueHero{
  border:1px solid var(--tw-gray-200);
  border-radius:1rem;
  background:var(--tw-white);
  padding:1.1rem 1.1rem;
  box-shadow:0 1px 0 rgba(17,24,39,.02),0 18px 50px rgba(17,24,39,.06);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}

/* === Dashboard onboarding steps (shown when course is not started yet) ==== */
:where(.medexp-tw) .tw-onboardSteps{
  margin-top:.9rem;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:.75rem;
}
:where(.medexp-tw) .tw-onboardStep{
  min-width:0;
  border:1px solid rgba(15,23,42,.10);
  border-radius:1rem;
  padding:.75rem .8rem;
  background:linear-gradient(180deg, rgba(var(--medexp-brand-blue-rgb,26,79,156),.07), rgba(15,23,42,.01) 70%), var(--tw-white);
  box-shadow:0 1px 0 rgba(17,24,39,.02);
}
/* __header: number + label row (replaced __top/__txt in v2 layout) */
:where(.medexp-tw) .tw-onboardStep__header{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;}
:where(.medexp-tw) .tw-onboardStep__label{font-weight:950;color:var(--tw-slate-900);letter-spacing:-0.01em;line-height:1.25;}
:where(.medexp-tw) .tw-onboardStep__meta{margin-top:.25rem;color:var(--tw-gray-600);font-weight:650;line-height:1.35;font-size:.92rem;}
:where(.medexp-tw) .tw-onboardStep__cta{margin-top:.5rem;}
:where(.medexp-tw) .tw-onboardStep__num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.35rem;
  height:1.35rem;
  border-radius:999px;
  background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);
  border:1px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),.22);
  color:rgba(var(--medexp-brand-blue-rgb,26,79,156),1);
  font-size:.78rem;
  font-weight:950;
  flex:0 0 auto;
}
:where(.medexp-tw) .tw-onboardFoot{margin-top:.55rem;display:flex;justify-content:flex-start;}

/* === Onboarding visual polish =================================================
   The "Start here" block is a guided launcher with a hero header row (title +
   CTA) and a full-width 3-column step grid below it. Steps use a vertical
   layout (number → label → description → button) so text is never cramped.
*/

/* ── Hero card: wrap so steps span full width below header ── */
:where(.medexp-tw) .tw-continueHero{
  flex-wrap:wrap;
  padding:1.65rem 1.85rem;
  border:1px solid rgba(15,23,42,.07);
  border-radius:1.15rem;
  background:
    radial-gradient(1100px 360px at 10% 0%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.09), rgba(255,255,255,0) 58%),
    radial-gradient(900px 280px at 92% 8%, rgba(var(--medexp-brand-teal-rgb,0,166,118),.07), rgba(255,255,255,0) 52%),
    linear-gradient(180deg, rgba(15,23,42,.015), rgba(255,255,255,1) 55%);
  box-shadow:0 1px 0 rgba(17,24,39,.02),0 20px 56px rgba(17,24,39,.07);
}

/* Keep CTA button on one line */
:where(.medexp-tw) .tw-continueHero__actions .tw-btn.tw-btn-lg{
  white-space:nowrap;
  flex:0 0 auto;
  min-width:max-content;
}

/* ── Steps grid: full-width row below the hero header ── */
:where(.medexp-tw) .tw-onboardSteps{
  flex-basis:100%;
  width:100%;
  margin-top:1.25rem;
  padding-top:1.25rem;
  border-top:1px solid rgba(15,23,42,.06);
  gap:1rem;
}

/* ── Individual step card: vertical layout ── */
:where(.medexp-tw) .tw-onboardStep{
  position:relative;
  overflow:visible;
  display:flex;
  flex-direction:column;
  padding:1.2rem 1.25rem 1.1rem;
  border-radius:1.1rem;
  border:1px solid rgba(15,23,42,.09);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(15,23,42,.012) 80%),
    radial-gradient(480px 200px at 18% 0%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.05), rgba(255,255,255,0) 58%),
    var(--tw-white);
  box-shadow:0 1px 0 rgba(17,24,39,.02), 0 8px 22px rgba(17,24,39,.045);
  transition:box-shadow .18s ease, border-color .18s ease;
}
:where(.medexp-tw) .tw-onboardStep:hover{
  border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.22);
  box-shadow:0 1px 0 rgba(17,24,39,.02), 0 12px 32px rgba(17,24,39,.08);
}

/* Step header: number + label inline */
:where(.medexp-tw) .tw-onboardStep__header{
  display:flex;
  align-items:center;
  gap:.6rem;
  flex-wrap:wrap;
}

/* Step number circle — prominent */
:where(.medexp-tw) .tw-onboardStep__num{
  width:2.15rem;
  height:2.15rem;
  font-size:1.05rem;
  border-radius:999px;
  background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.11);
  border:1.5px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),.22);
  color:rgba(var(--medexp-brand-blue-rgb,26,79,156),1);
  box-shadow:0 2px 6px rgba(var(--medexp-brand-blue-rgb,26,79,156),.12);
}

/* Step label text */
:where(.medexp-tw) .tw-onboardStep__label{
  font-size:1.06rem;
  font-weight:950;
  color:var(--tw-slate-900);
  letter-spacing:-0.01em;
  line-height:1.25;
}

/* Step description */
:where(.medexp-tw) .tw-onboardStep__meta{
  margin-top:.45rem;
  font-size:.94rem;
  font-weight:650;
  line-height:1.4;
  color:var(--tw-gray-500);
}

/* Step CTA button area — pushed to bottom */
:where(.medexp-tw) .tw-onboardStep__cta{
  margin-top:auto;
  padding-top:.75rem;
}

/* Make the small buttons feel more tappable */
:where(.medexp-tw) .tw-onboardSteps .tw-btn.tw-btn-small,
:where(.medexp-tw) .tw-onboardFoot .tw-btn.tw-btn-small{
  padding:.45rem .95rem;
  font-size:.9rem;
  font-weight:750;
  border-radius:999px;
}

/* ── Watermark icons per step ── */
:where(.medexp-tw) .tw-onboardStep::after{
  content:"";
  position:absolute;
  right:.85rem;
  bottom:.75rem;
  width:3.5rem;
  height:3.5rem;
  background-repeat:no-repeat;
  background-size:contain;
  opacity:.14;
  pointer-events:none;
}

/* Step 1: document */
:where(.medexp-tw) .tw-onboardSteps .tw-onboardStep:nth-child(1)::after{
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22%231a4f9c%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8z%22/%3E%3Cpath%20d=%22M14%202v6h6%22/%3E%3Cpath%20d=%22M8%2013h8%22/%3E%3Cpath%20d=%22M8%2017h6%22/%3E%3C/svg%3E");
}
/* Step 2: stopwatch */
:where(.medexp-tw) .tw-onboardSteps .tw-onboardStep:nth-child(2)::after{
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22%231a4f9c%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Ccircle%20cx=%2212%22%20cy=%2213%22%20r=%228%22/%3E%3Cpath%20d=%22M12%209v4l2%202%22/%3E%3Cpath%20d=%22M12%205V3M10%203h4%22/%3E%3C/svg%3E");
}
/* Step 3: calendar with checkmark */
:where(.medexp-tw) .tw-onboardSteps .tw-onboardStep:nth-child(3)::after{
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22%231a4f9c%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Crect%20x=%223%22%20y=%224%22%20width=%2218%22%20height=%2218%22%20rx=%222%22/%3E%3Cpath%20d=%22M16%202v4M8%202v4M3%2010h18%22/%3E%3Cpath%20d=%22M9%2016l2%202%204-4%22/%3E%3C/svg%3E");
}

/* ── Footer actions ── */
:where(.medexp-tw) .tw-onboardFoot{margin-top:1rem;gap:.65rem;flex-wrap:wrap;}

/* === Fresh start collapsing (Option A1) ================================= */
/* When a learner has just purchased and has no activity yet, we keep the
   heavier dashboard sections collapsed until they explicitly reveal them. */
:where(.medexp-tw) .tw-dashSubtabs[data-fresh-start="1"][data-fresh-details-open="0"] [data-fresh-details]{
  display:none !important;
}
:where(.medexp-tw) .tw-dashSubtabs[data-fresh-start="1"][data-fresh-details-open="0"] .tw-onboardSummary{display:none !important;}
:where(.medexp-tw) .tw-dashSubtabs[data-fresh-start="1"][data-fresh-details-open="1"] .tw-onboardSteps{display:none !important;}
:where(.medexp-tw) .tw-dashSubtabs[data-fresh-start="1"][data-fresh-details-open="1"] [data-action="fresh-details-reveal"]{display:none !important;}

:where(.medexp-tw) .tw-pill.tw-pill--mini{
  padding:.15rem .45rem;
  font-size:.72rem;
  font-weight:850;
  line-height:1;
}

:where(.medexp-tw) .tw-onboardSummary{
  flex-basis:100%;
  width:100%;
  border:1px solid rgba(15,23,42,.10);
  border-radius:1rem;
  padding:.85rem 1rem;
  background:var(--tw-white);
  box-shadow:0 1px 0 rgba(17,24,39,.02);
}
:where(.medexp-tw) .tw-onboardFoot{
  flex-basis:100%;
  width:100%;
}
:where(.medexp-tw) .tw-onboardSummary__row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;}
:where(.medexp-tw) .tw-onboardSummary__text{min-width:0;}
:where(.medexp-tw) .tw-onboardSummary__kicker{font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--tw-gray-500);}
:where(.medexp-tw) .tw-onboardSummary__title{font-weight:950;color:var(--tw-gray-900);letter-spacing:-0.01em;margin-top:.2rem;line-height:1.25;}
:where(.medexp-tw) .tw-onboardSummary__meta{margin-top:.25rem;color:var(--tw-gray-600);font-weight:650;line-height:1.35;font-size:.92rem;}

@media (max-width: 640px){
  :where(.medexp-tw) .tw-onboardSummary__row{flex-direction:column;align-items:stretch;}
}

@media (max-width: 980px){
  :where(.medexp-tw) .tw-onboardSteps{grid-template-columns:repeat(2, minmax(0, 1fr));}
}
@media (max-width: 640px){
  :where(.medexp-tw) .tw-onboardSteps{grid-template-columns:1fr;}
}
:where(.medexp-tw) .tw-continueHero__left{min-width:0;flex:1 1 0%;}
:where(.medexp-tw) .tw-continueHero__kicker{
  font-size:.74rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.7);
}
:where(.medexp-tw) .tw-continueHero__title{
  font-size:1.5rem;
  font-weight:950;
  letter-spacing:-0.025em;
  margin-top:.3rem;
  color:var(--tw-gray-900);
}
:where(.medexp-tw) .tw-continueHero__meta{
  margin-top:.45rem;
  color:var(--tw-gray-600);
  font-weight:700;
  line-height:1.35;
}
:where(.medexp-tw) .tw-continueHero__meta strong{color:var(--tw-gray-900);}
:where(.medexp-tw) .tw-continueHero__hint{
  margin-top:.35rem;
  color:var(--tw-gray-500);
  font-weight:700;
}
:where(.medexp-tw) .tw-btn.tw-btn-lg{
  padding:.78rem 1.05rem;
  /* Keep large CTA buttons fully pill-shaped (matches base .tw-btn) */
  border-radius:9999px;
  font-size:1.02rem;
  font-weight:900;
}
:where(.medexp-tw) .tw-continueHero__actions{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end;}

@media (max-width: 640px){
  :where(.medexp-tw) .tw-continueHero{flex-direction:column;}
  :where(.medexp-tw) .tw-continueHero__actions{justify-content:flex-start;}
}


/* === Goals + Today's plan widgets (dashboard overview) === */
:where(.medexp-tw) .tw-checkList{
 display:flex;
 flex-direction:column;
 gap:.5rem;
 margin-top:.75rem;
}
:where(.medexp-tw) .tw-checkItem{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:.75rem;
 padding:.6rem .75rem;
 border:1.5px solid rgba(148,163,184,.18);
 border-radius:14px;
 background:rgba(255,255,255,.65);
 backdrop-filter:blur(6px);
 transition:all .15s ease;
}
:where(.medexp-tw) .tw-checkItem:hover{
 border-color:rgba(23,157,153,.25);
 background:rgba(255,255,255,.85);
 box-shadow:0 2px 8px rgba(2,6,23,.05);
}
:where(.medexp-tw) .tw-checkItem label{
 display:flex;
 align-items:center;
 gap:.6rem;
 cursor:pointer;
 user-select:none;
 font-weight:700;
 color:rgba(15,23,42,.80);
}
:where(.medexp-tw) .tw-checkItem input[type="checkbox"]{
 width:18px;
 height:18px;
 accent-color:#179D99;
}
:where(.medexp-tw) .tw-checkItem.is-done{
 opacity:.55;
 border-color:rgba(16,185,129,.20);
 background:rgba(16,185,129,.03);
}
:where(.medexp-tw) .tw-checkItem.is-done span{
 text-decoration:line-through;
 color:rgba(15,23,42,.45);
}
:where(.medexp-tw) .tw-btn.tw-btn-small{
 padding:.3rem .55rem;
 font-size:.85rem;
 border-radius:999px;
}
:where(.medexp-tw) .tw-goalsGrid{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:.65rem;
}
:where(.medexp-tw) .tw-goalStat{
 padding:.65rem .75rem;
 border:1.5px solid rgba(148,163,184,.18);
 border-radius:14px;
 background:linear-gradient(135deg, rgba(255,255,255,.70) 0%, rgba(248,250,252,.60) 100%);
 backdrop-filter:blur(6px);
 transition:border-color .15s ease, box-shadow .15s ease;
}
:where(.medexp-tw) .tw-goalStat:hover{
 border-color:rgba(23,157,153,.22);
 box-shadow:0 2px 8px rgba(2,6,23,.05);
}
:where(.medexp-tw) .tw-goalsForm__grid{
 display:grid;
 grid-template-columns:repeat(3, minmax(0, 1fr));
 gap:.75rem;
 margin-top:.25rem;
}
:where(.medexp-tw) .tw-goalsForm__field{
 display:flex;
 flex-direction:column;
 gap:.35rem;
}
:where(.medexp-tw) .tw-catchup{
 margin-top:.75rem;
 padding:.65rem .8rem;
 border-radius:14px;
 border:1.5px solid rgba(148,163,184,.18);
 background:linear-gradient(135deg, rgba(255,255,255,.65) 0%, rgba(248,250,252,.55) 100%);
 font-size:.9rem;
 color:rgba(15,23,42,.65);
}
:where(.medexp-tw) .tw-catchup.is-behind{
 border-color:rgba(245,158,11,.30);
 background:linear-gradient(135deg, rgba(245,158,11,.06) 0%, rgba(251,191,36,.04) 100%);
 color:rgba(180,83,9,.85);
}

@media (max-width: 900px){
 :where(.medexp-tw) .tw-goalsForm__grid{grid-template-columns:1fr;}
 :where(.medexp-tw) .tw-goalsGrid{grid-template-columns:1fr;}
}


/* =========================================================
   Activity heatmap (GitHub-style)
   ========================================================= */
:where(.medexp-tw) .tw-activityHeatmapCard .tw-row{margin-bottom:.9rem;}
:where(.medexp-tw) .tw-heatTop{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.8rem;}
:where(.medexp-tw) .tw-heatSeg{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem;background:rgba(148,163,184,.12);border:1px solid rgba(148,163,184,.18);border-radius:999px;backdrop-filter:blur(6px);}
:where(.medexp-tw) .tw-heatSegBtn{appearance:none;border:0;background:transparent;color:rgba(15,23,42,.60);padding:.45rem .7rem;border-radius:999px;font-size:.82rem;font-weight:800;cursor:pointer;line-height:1;transition:all .15s ease;}
:where(.medexp-tw) .tw-heatSegBtn:hover{background:rgba(255,255,255,.65);color:rgba(15,23,42,.80);}
:where(.medexp-tw) .tw-heatSegBtn.is-active{background:rgba(255,255,255,.90);box-shadow:0 2px 8px rgba(2,6,23,.08);color:rgba(15,23,42,.90);font-weight:900;}
:where(.medexp-tw) .tw-heatStats{display:flex;align-items:flex-start;gap:1rem;flex-wrap:wrap;}
:where(.medexp-tw) .tw-heatStat{min-width:110px;}
:where(.medexp-tw) .tw-heatWrap{display:flex;align-items:flex-start;gap:.75rem;overflow-x:auto;padding-bottom:.25rem;}
:where(.medexp-tw) .tw-heatY{display:grid;grid-template-rows:repeat(7, 12px);gap:4px;padding-top:calc(.15rem + 18px);font-size:.75rem;color:var(--tw-gray-500);user-select:none;}
:where(.medexp-tw) .tw-heatGridCol{display:flex;flex-direction:column;min-width:0;}
:where(.medexp-tw) .tw-heatMonths{display:grid;grid-auto-flow:column;grid-auto-columns:12px;gap:4px;font-size:.68rem;font-weight:700;color:var(--tw-gray-500);margin-bottom:2px;user-select:none;height:16px;align-items:end;}
:where(.medexp-tw) .tw-heatMonthLabel{white-space:nowrap;letter-spacing:.02em;}
:where(.medexp-tw) .tw-heatGrid{display:grid;grid-auto-flow:column;grid-template-rows:repeat(7, 12px);grid-auto-columns:12px;gap:4px;align-content:start;}
:where(.medexp-tw) .tw-heatCell{appearance:none;-webkit-appearance:none;padding:0;width:13px;height:13px;border-radius:4px;border:1px solid rgba(2,6,23,.06);background-color:#ebedf0;cursor:default;transition:transform .1s cubic-bezier(.34,1.56,.64,1), box-shadow .12s ease, filter .12s ease;}
:where(.medexp-tw) .tw-heatCell:hover{transform:translateY(-2px) scale(1.15);box-shadow:0 4px 10px rgba(2,6,23,.12);filter:saturate(1.1);}
:where(.medexp-tw) .tw-heatCell:focus{outline:2px solid rgba(23,157,153,.45);outline-offset:2px;}

:where(.medexp-tw) .tw-heatCell.is-l0,
:where(.medexp-tw) .tw-heatLegendSwatch.is-l0{background-color:#ebedf0;border-color:rgba(2,6,23,.06);}

:where(.medexp-tw) .tw-heatCell.is-l1,
:where(.medexp-tw) .tw-heatLegendSwatch.is-l1{background-color:#a8e8e5;border-color:#8cd9d6;}

:where(.medexp-tw) .tw-heatCell.is-l2,
:where(.medexp-tw) .tw-heatLegendSwatch.is-l2{background-color:#3bc6c2;border-color:#2fb5b1;}

:where(.medexp-tw) .tw-heatCell.is-l3,
:where(.medexp-tw) .tw-heatLegendSwatch.is-l3{background-color:#179d99;border-color:#128a87;}

:where(.medexp-tw) .tw-heatCell.is-l4,
:where(.medexp-tw) .tw-heatLegendSwatch.is-l4{background-color:#117673;border-color:#0d5f5c;box-shadow:0 0 4px rgba(17,118,115,.30);}

:where(.medexp-tw) .tw-heatFooter{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-top:.85rem;}
:where(.medexp-tw) .tw-heatLegend{display:flex;align-items:center;gap:.35rem;font-size:.75rem;color:var(--tw-gray-500);}
:where(.medexp-tw) .tw-heatLegendSwatch{width:12px;height:12px;border-radius:4px;border:1px solid rgba(2,6,23,.05);}
:where(.medexp-tw) .tw-heatLegendLabel{padding:0 .15rem;}

@media (max-width: 900px){
 :where(.medexp-tw) .tw-heatStat{min-width:96px;}
 :where(.medexp-tw) .tw-heatWrap{gap:.6rem;}
}


/* =========================================================
   Subject radar (mastery map)
   ========================================================= */
:where(.medexp-tw) .tw-subjectRadarCard{position:relative;overflow:hidden;}
:where(.medexp-tw) .tw-subjectRadarCard::before{
 content:'';
 position:absolute;inset:-40% -40% auto -40%;
 height:320px;
 background:radial-gradient(closest-side at 35% 35%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.18), transparent 70%),
            radial-gradient(closest-side at 75% 10%, rgba(var(--medexp-brand-teal-rgb,0,166,118),.10), transparent 65%);
 pointer-events:none;
}
:where(.medexp-tw) .tw-subjectRadarCard > *{position:relative;}

:where(.medexp-tw) .tw-radarBody{margin-top:.85rem;display:grid;gap:.8rem;}
:where(.medexp-tw) .tw-radarChart{position:relative;display:flex;align-items:center;justify-content:center;border-radius:16px;border:1px solid rgba(15,23,42,.10);background:rgba(255,255,255,.65);padding:1rem 1.1rem;}
:where(.medexp-tw) .tw-radarChart svg{display:block;width:100%;height:auto;max-width:360px;overflow:visible;}
:where(.medexp-tw) .tw-radarLists{display:grid;grid-template-columns:1fr;gap:.6rem;}
:where(.medexp-tw) .tw-radarListsGrid{display:grid;grid-template-columns:1fr;gap:.75rem;}
:where(.medexp-tw) .tw-subjectRadarCard .tw-radarListsGrid{grid-template-columns:1fr;}
:where(.medexp-tw) .tw-radarGroup{border-radius:14px;border:1px solid rgba(15,23,42,.08);background:rgba(15,23,42,.02);padding:.65rem;}
:where(.medexp-tw) .tw-radarRow{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem;padding:.35rem 0;border-bottom:1px dashed rgba(15,23,42,.10);}
:where(.medexp-tw) .tw-radarRow:last-child{border-bottom:0;}
:where(.medexp-tw) .tw-radarLeft{display:flex;align-items:center;gap:.5rem;min-width:0;}
:where(.medexp-tw) .tw-radarDot{width:10px;height:10px;border-radius:999px;flex:0 0 auto;background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.8);box-shadow:0 10px 20px rgba(2,6,23,.10);}
:where(.medexp-tw) .tw-radarRow.is-weak .tw-radarDot{background:rgba(245,158,11,.85);} 
:where(.medexp-tw) .tw-radarName{font-weight:750;font-size:.9rem;color:var(--tw-slate-900);min-width:0;white-space:normal;word-break:break-word;}
:where(.medexp-tw) .tw-radarVal{font-weight:800;font-size:.9rem;color:var(--tw-slate-900);} 
:where(.medexp-tw) .tw-radarMeta{margin-top:.35rem;font-size:.78rem;color:var(--tw-gray-600);} 

:where(.medexp-tw) .tw-radarTooltip{position:absolute;z-index:5;pointer-events:none;transform:translate(-50%, -115%);padding:.45rem .6rem;border-radius:12px;border:1px solid rgba(15,23,42,.14);background:rgba(255,255,255,.95);box-shadow:0 20px 40px rgba(2,6,23,.16);font-size:.78rem;color:var(--tw-slate-900);white-space:nowrap;}

@media (max-width: 1023px){
 :where(.medexp-tw) .tw-radarListsGrid{grid-template-columns:1fr;}
}


/* ========================================================================== */
/* Princeton polish: sidebar menu micro-details                               */
/* - reduce heaviness                                                        */
/* - fix contrast on active states                                            */
/* ========================================================================== */

/* Base nav rows */
:where(.medexp-tw) .tw-sidebar a.tw-navlink{
  padding:0.72rem 0.88rem;
  border-radius:14px;
  font-weight:650;
  letter-spacing:-0.01em;
  line-height:1.15;
  color:rgba(15,23,42,0.86);
  border:1px solid transparent;
  transition:background-color .14s ease, color .14s ease, border-color .14s ease, box-shadow .14s ease;
}

:where(.medexp-tw) .tw-sidebar a.tw-navlink .tw-navicon{color:rgba(15,23,42,0.74);}

:where(.medexp-tw) .tw-sidebar a.tw-navlink:hover{
  background:rgba(15,23,42,0.04);
  border-color:rgba(15,23,42,0.06);
  transform:none;
}

:where(.medexp-tw) .tw-sidebar a.tw-navlink:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.14);
}

/* Active row: always high contrast */
:where(.medexp-tw) .tw-sidebar a.tw-navlink.is-active{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(0,0,0,0.10) 100%),
    var(--medexp-brand-blue, #1a4f9c);
  color:#fff;
  border-color:rgba(0,0,0,0.06);
  text-shadow:0 1px 1px rgba(0,0,0,0.20);
  box-shadow:0 14px 26px -20px rgba(var(--medexp-brand-blue-rgb,26,79,156),0.70), 0 10px 18px -14px rgba(0,0,0,0.18);
}

:where(.medexp-tw) .tw-sidebar a.tw-navlink.is-active .tw-navicon{color:#fff;}

/* Subtle improvement: keep the menu readable if the sidebar is narrow */
:where(.medexp-tw) .tw-sidebar a.tw-navlink .truncate{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}


/* -------------------------------------------------------------------------- */
/* Topbar fit: prevent "squeezed" actions when course titles / user emails are long
   Desktop uses CSS grid so the course switcher stays centered-ish and actions stay pinned right.
*/
@media (min-width: 901px){
  .medexp-dashboardPage.medexp-tw .tw-topbar__inner{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(12rem, 32rem) auto;
    align-items:center;
    gap:1rem;
  }
  .medexp-dashboardPage.medexp-tw .tw-topbarLeft{grid-column:1;}
  .medexp-dashboardPage.medexp-tw .tw-courseTopSwitch{grid-column:2;}
  .medexp-dashboardPage.medexp-tw .tw-topbarActions{grid-column:3;}
  .medexp-dashboardPage.medexp-tw .tw-topbarLeft{
    min-width:0;
  }
  .medexp-dashboardPage.medexp-tw .tw-topbarActions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:.75rem;
    min-width:0;
    flex-wrap:nowrap;
    justify-self:end;
  }
  .medexp-dashboardPage.medexp-tw .tw-courseTopSwitch{
    min-width:12rem;
    justify-self:center;
  }
  .medexp-dashboardPage.medexp-tw .tw-courseDropdown__btn{
    max-width:28rem;
  }
}

@media (max-width: 1100px){
 .medexp-dashboardPage.medexp-tw .tw-userMenu__name{display:none;}
}

@media (max-width: 900px){
 .medexp-dashboardPage.medexp-tw .tw-courseTopSwitch__label{display:none !important;}
 .medexp-dashboardPage.medexp-tw .tw-topbarHead [data-dash-subtitle]{display:none;}
}

/* -------------------------------------------------------------------------- */
/* Mobile / tablet topbar layout
   Requirement:
   - Row 1: burger + logo + title on the left
            notification + user menu on the right
   - Row 2: course switcher spans full width
*/
@media (max-width: 900px){
  .medexp-dashboardPage.medexp-tw .tw-courseTopSwitch__label{display:none !important;}
  .medexp-dashboardPage.medexp-tw .tw-topbarHead [data-dash-subtitle]{display:none;}

  .medexp-dashboardPage.medexp-tw .tw-topbar__inner{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    row-gap:.75rem;
  }

  /* Row 1 */
  .medexp-dashboardPage.medexp-tw .tw-topbarLeft{
    order:1;
    flex:1 1 auto;
    min-width:0;
  }
  .medexp-dashboardPage.medexp-tw .tw-topbarActions{
    order:2;
    flex:0 0 auto;
    justify-content:flex-end;
    gap:.6rem;
    flex-wrap:nowrap;
  }

  /* Keep row 1 compact */
  .medexp-dashboardPage.medexp-tw .tw-expPillWrap{display:none;}

  /* Row 2: course switcher full-width */
  .medexp-dashboardPage.medexp-tw .tw-courseTopSwitch{
    order:3;
    flex:1 1 100%;
    width:100%;
    min-width:0;
  }
  .medexp-dashboardPage.medexp-tw .tw-courseDropdown,
  .medexp-dashboardPage.medexp-tw .tw-courseDropdown__btn{
    width:100%;
    max-width:none;
    min-width:0;
  }
  .medexp-dashboardPage.medexp-tw .tw-courseDropdown__menu{
    left:0;
    right:0;
    min-width:0;
    max-width:calc(100vw - 24px);
  }

  /* Title sizing */
  .medexp-dashboardPage.medexp-tw .tw-topbarHead .tw-title{
    font-size:1.35rem;
    line-height:1.15;
  }

  /* Slightly compact burger button */
  .medexp-dashboardPage.medexp-tw button[data-action="nav-toggle"].tw-btn{
    padding:.52rem .68rem !important;
  }
}

@media (max-width: 520px){
  /* On very small screens, hide the large header title to prioritise controls */
  .medexp-dashboardPage.medexp-tw .tw-topbarHead{display:none;}
}


/* -----------------------------
   Dashboard: layout + clarity tweaks (v0.5.48.8)
   ----------------------------- */
:where(.medexp-tw) .tw-courseSnapshotCard .tw-sectionhead .tw-row__actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end;}
:where(.medexp-tw) .tw-courseSnapshotCard .tw-sectionhead .tw-row__actions .tw-btn{padding:.45rem .7rem;font-size:.85rem;border-radius:999px;}
:where(.medexp-tw) .tw-courseSnapshotCard .tw-sectionhead .tw-row__actions .tw-btn-secondary{background:rgba(15,23,42,.02);}

:where(.medexp-tw) .tw-subjectRadarCard .tw-radarChart{overflow:visible;}
:where(.medexp-tw) .tw-subjectRadarCard.is-wide .tw-radarBody{display:grid;gap:1rem;}
@media (min-width: 1024px){
  :where(.medexp-tw) .tw-subjectRadarCard.is-wide .tw-radarBody{grid-template-columns:1fr 1fr;align-items:start;}
  :where(.medexp-tw) .tw-subjectRadarCard.is-wide .tw-radarChart{justify-content:center;padding:1.1rem 1.35rem;}
  :where(.medexp-tw) .tw-subjectRadarCard.is-wide .tw-radarChart svg{max-width:560px;}
  :where(.medexp-tw) .tw-subjectRadarCard.is-wide .tw-radarLists{align-content:start;}
}


/* Auth gate (logged-out dashboard) */
.medexp-tw .tw-authGateWrap{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:3rem 1rem;
  min-height:70vh;
}
.medexp-tw .tw-authGate{
  width:100%;
  max-width:72rem;
}
.medexp-tw .tw-authHero{
  display:flex;
  align-items:center;
  gap:1.25rem;
  padding:1.5rem 1.5rem;
  border-radius:1.25rem;
  border:1px solid rgba(226,232,240,0.85);
  background:
    radial-gradient(900px 420px at 10% -30%, rgba(var(--medexp-brand-blue-rgb,26,79,156),.18), transparent 60%),
    radial-gradient(900px 420px at 80% -20%, rgba(var(--medexp-brand-teal-rgb,0,166,118),.10), transparent 60%),
    rgba(255,255,255,0.95);
  box-shadow:0 18px 32px -28px rgba(2,6,23,.35), 0 10px 18px -16px rgba(2,6,23,.08);
}
.medexp-tw .tw-authBrand{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:64px;
  height:64px;
  border-radius:1.25rem;
  background:rgba(255,255,255,0.96);
  border:1px solid rgba(226,232,240,0.9);
  box-shadow:0 10px 18px -16px rgba(2,6,23,.22);
  flex:0 0 auto;
}
.medexp-tw .tw-authBrandLogo{
  width:40px;
  height:40px;
  object-fit:contain;
  display:block;
}
.medexp-tw .tw-authHeroText{min-width:0;}
.medexp-tw .tw-authTitle{
  margin:0.15rem 0 0;
  font-size:clamp(1.45rem, 2.2vw, 2rem);
  line-height:1.1;
  font-weight:900;
  letter-spacing:-0.02em;
}
.medexp-tw .tw-authSubtitle{
  margin-top:0.4rem;
  color:var(--tw-gray-600);
  max-width:58ch;
  font-size:0.95rem;
}

.medexp-tw .tw-authCards .tw-authCard{height:100%; position:relative; overflow:hidden;}
.medexp-tw .tw-authCard::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:linear-gradient(135deg, rgba(var(--medexp-brand-blue-rgb,26,79,156),.10), rgba(var(--medexp-brand-teal-rgb,0,166,118),.08));
  opacity:0;
  transition:opacity .18s ease;
  pointer-events:none;
}
.medexp-tw .tw-authCard:hover::before{opacity:1;}
.medexp-tw .tw-authCard > *{position:relative;}

.medexp-tw .tw-authCard__icon{
  width:42px;height:42px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  background:rgba(var(--medexp-brand-blue-rgb,26,79,156),.08);
  border:1px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),.18);
  color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.95);
}
.medexp-tw .tw-authCard__icon svg.tw-ico{width:20px;height:20px;}
.medexp-tw .tw-authCard__title{
  margin-top:0.9rem;
  font-size:1.05rem;
  font-weight:900;
  letter-spacing:-0.01em;
}
.medexp-tw .tw-authCard__body{
  margin-top:0.35rem;
  color:var(--tw-gray-600);
  font-size:0.92rem;
}
.medexp-tw .tw-authCard__actions{
  margin-top:1.1rem;
  display:flex;
  gap:0.6rem;
  flex-wrap:wrap;
  align-items:center;
}
.medexp-tw .tw-authSearch{
  margin-top:0.95rem;
  display:flex;
  gap:0.6rem;
  align-items:center;
  flex-wrap:wrap;
}
.medexp-tw .tw-authSearch .tw-input{flex:1 1 16rem; min-width:12.5rem;}
.medexp-tw .tw-authSearch .tw-btn{white-space:nowrap; padding:0.62rem 0.95rem;}
.medexp-tw .tw-authCard__foot{margin-top:0.75rem;}
.medexp-tw .tw-authLink{
  color:var(--tw-indigo-600);
  text-decoration:none;
  font-weight:800;
}
.medexp-tw .tw-authLink:hover{text-decoration:underline;}
.medexp-tw .tw-authFinePrint{
  margin-top:1rem;
  color:var(--tw-gray-500);
  font-size:0.9rem;
  text-align:center;
}

@media (max-width: 640px){
  .medexp-tw .tw-authHero{padding:1.15rem; gap:1rem;}
  .medexp-tw .tw-authBrand{width:56px;height:56px;border-radius:1rem;}
  .medexp-tw .tw-authBrandLogo{width:34px;height:34px;}
  .medexp-tw .tw-authSearch{flex-direction:column; align-items:stretch;}
  .medexp-tw .tw-authSearch .tw-btn{width:100%;}
}

/* --- MedExPrep: left-align dashboard while keeping topbar actions pinned right ---
   The dashboard main content can be left-aligned (no auto-centering gutters), but the
   topbar must remain full-width so the notifications / course switcher / user menu
   stay on the far-right.
*/
.medexp-dashboardPage.medexp-tw .tw-topbar__inner{
  /* override base: max-width:88rem; margin:0 auto; */
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.medexp-dashboardPage.medexp-tw .tw-main{
  /* keep existing max-width (if any) but remove centering */
  margin: 0 !important;
}

/* Tighten vertical rhythm between the sticky topbar and the dashboard subtabs.
   Default .tw-main padding + .tw-dashSubtabs margin produced an oversized gap.
*/
.medexp-dashboardPage.medexp-tw .tw-main{
  padding-top: 0.9rem !important;
}
@media (min-width: 1024px){
  .medexp-dashboardPage.medexp-tw .tw-main{ padding-top: 1rem !important; }
}
.medexp-dashboardPage.medexp-tw .tw-dashSubtabs{ margin-top: 0.35rem !important; }


/* --- WooCommerce "My Account" embeds (Dashboard Billing) ------------------- */
:where(.medexp-tw) .medexp-wcEmbed{
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--tw-gray-900);
}
:where(.medexp-tw) .medexp-wcEmbed .woocommerce-MyAccount-navigation{ display:none !important; }
:where(.medexp-tw) .medexp-wcEmbed .woocommerce-MyAccount-content{
  float:none !important;
  width:100% !important;
}

/* Buttons: map Woo buttons into the dashboard button system */
:where(.medexp-tw) .medexp-wcEmbed .button,
:where(.medexp-tw) .medexp-wcEmbed a.button,
:where(.medexp-tw) .medexp-wcEmbed button.button,
:where(.medexp-tw) .medexp-wcEmbed input[type="submit"],
:where(.medexp-tw) .medexp-wcEmbed input[type="button"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0.45rem;
  border-radius:9999px;
  padding:0.65rem 1.15rem;
  font-weight:900;
  letter-spacing:-0.01em;
  text-decoration:none !important;
  border:2px solid rgba(var(--medexp-brand-blue-rgb,26,79,156),0.38);
  background:rgba(255,255,255,0.98);
  color:var(--tw-gray-900);
  box-shadow:0 10px 18px -16px rgba(var(--medexp-brand-navy-rgb,15,23,42),0.14);
  transition:transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s cubic-bezier(0.4,0,0.2,1), filter 0.2s cubic-bezier(0.4,0,0.2,1), background-color 0.2s cubic-bezier(0.4,0,0.2,1), border-color 0.2s cubic-bezier(0.4,0,0.2,1), color 0.2s cubic-bezier(0.4,0,0.2,1);
}
:where(.medexp-tw) .medexp-wcEmbed .button:hover,
:where(.medexp-tw) .medexp-wcEmbed a.button:hover,
:where(.medexp-tw) .medexp-wcEmbed button.button:hover{
  background-color:var(--tw-gray-50);
}
:where(.medexp-tw) .medexp-wcEmbed .button:active,
:where(.medexp-tw) .medexp-wcEmbed button.button:active{
  transform:translateY(1px);
}

/* Primary actions in Woo typically use .alt */
:where(.medexp-tw) .medexp-wcEmbed .button.alt,
:where(.medexp-tw) .medexp-wcEmbed .woocommerce-button.button,
:where(.medexp-tw) .medexp-wcEmbed button.button.alt,
:where(.medexp-tw) .medexp-wcEmbed input[type="submit"].alt{
  background:var(--medexp-primary-grad, var(--medexp-brand-teal, #00a676));
  color:#fff;
  border:1px solid rgba(0,0,0,0.06);
  box-shadow:0 14px 26px -20px rgba(var(--medexp-brand-teal-rgb,0,166,118),0.95), 0 10px 18px -14px rgba(0,0,0,0.18);
  text-shadow:0 1px 1px rgba(0,0,0,0.22);
}
:where(.medexp-tw) .medexp-wcEmbed .button.alt:hover,
:where(.medexp-tw) .medexp-wcEmbed .woocommerce-button.button:hover{
  transform:translateY(-2px);
  filter:brightness(0.96);
  box-shadow:0 20px 32px -22px rgba(var(--medexp-brand-teal-rgb,0,166,118),0.95), 0 18px 26px -18px rgba(0,0,0,0.18);
}

/* Inputs */
:where(.medexp-tw) .medexp-wcEmbed input.input-text,
:where(.medexp-tw) .medexp-wcEmbed input[type="text"],
:where(.medexp-tw) .medexp-wcEmbed input[type="email"],
:where(.medexp-tw) .medexp-wcEmbed input[type="tel"],
:where(.medexp-tw) .medexp-wcEmbed input[type="password"],
:where(.medexp-tw) .medexp-wcEmbed select:not(.select2-hidden-accessible),
:where(.medexp-tw) .medexp-wcEmbed textarea{
  width:100%;
  max-width:100%;
  border-radius:0.85rem;
  padding:0.65rem 0.85rem;
  border:1px solid var(--tw-gray-200);
  background:var(--tw-white);
  color:var(--tw-gray-900);
  font: inherit;
  box-shadow:none;
}
:where(.medexp-tw) .medexp-wcEmbed input:focus,
:where(.medexp-tw) .medexp-wcEmbed select:not(.select2-hidden-accessible):focus,
:where(.medexp-tw) .medexp-wcEmbed textarea:focus{
  outline:none;
  border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.8);
  box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.16);
}

/* SelectWoo / Select2 (used by Woo country/state fields): prevent dropdown from being clipped/hidden */
:where(.medexp-tw) .medexp-wcEmbed .select2-container{ display:block !important; width:100% !important; max-width:100% !important; pointer-events:auto !important; }
:where(.medexp-tw) .medexp-wcEmbed .select2-container--open{ z-index: 999999 !important; }
:where(.medexp-tw) .medexp-wcEmbed .select2-dropdown{ z-index: 999999 !important; }
:where(.medexp-tw) .medexp-wcEmbed .select2-container .select2-selection{ cursor:pointer; }

/* Woo transforms <select> into SelectWoo/Select2. Our general <select> styling must NOT un-hide the original field. */
:where(.medexp-tw) .medexp-wcEmbed select.select2-hidden-accessible{
  border:0 !important;
  clip:rect(0 0 0 0) !important;
  clip-path:inset(50%) !important;
  height:1px !important;
  width:1px !important;
  margin:-1px !important;
  overflow:hidden !important;
  padding:0 !important;
  position:absolute !important;
  white-space:nowrap !important;
}

/* Make the SelectWoo control match/* Make the SelectWoo control match our input styling */
:where(.medexp-tw) .medexp-wcEmbed .select2-container{
  font: inherit;
}
:where(.medexp-tw) .medexp-wcEmbed .select2-container--default .select2-selection--single,
:where(.medexp-tw) .medexp-wcEmbed .select2-container--default .select2-selection--multiple{
  border-radius:0.85rem;
  border:1px solid var(--tw-gray-200);
  background:var(--tw-white);
  box-shadow:none;
  min-height:44px;
}
:where(.medexp-tw) .medexp-wcEmbed .select2-container--default .select2-selection--single .select2-selection__rendered{
  padding:0.55rem 2.25rem 0.55rem 0.85rem;
  line-height:1.25rem;
  color:var(--tw-gray-900);
  font-weight:600;
}
:where(.medexp-tw) .medexp-wcEmbed .select2-container--default .select2-selection--single .select2-selection__arrow{
  height:44px;
  right:0.75rem;
}
:where(.medexp-tw) .medexp-wcEmbed .select2-container--default.select2-container--focus .select2-selection--single,
:where(.medexp-tw) .medexp-wcEmbed .select2-container--default.select2-container--focus .select2-selection--multiple{
  border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.8);
  box-shadow:0 0 0 4px rgba(var(--medexp-brand-blue-rgb,26,79,156),.16);
}

/* Dropdown panel */
:where(.medexp-tw) .medexp-wcEmbed .select2-dropdown{
  border:1px solid var(--tw-gray-200);
  border-radius:0.85rem;
  overflow:hidden;
  background:var(--tw-white);
  box-shadow:0 18px 44px rgba(15,23,42,.14);
}
:where(.medexp-tw) .medexp-wcEmbed .select2-search--dropdown{
  padding:0.6rem 0.6rem 0.4rem;
  border-bottom:1px solid rgba(15,23,42,0.06);
  background:rgba(249,250,251,.75);
}
:where(.medexp-tw) .medexp-wcEmbed .select2-search--dropdown .select2-search__field{
  width:100% !important;
  margin:0 !important;
  border:1px solid var(--tw-gray-200) !important;
  border-radius:0.75rem !important;
  padding:0.55rem 0.75rem !important;
  background:var(--tw-white) !important;
  font: inherit !important;
  box-shadow:none !important;
}
:where(.medexp-tw) .medexp-wcEmbed .select2-results__options{
  padding:0.4rem;
}
:where(.medexp-tw) .medexp-wcEmbed .select2-results__option{
  border-radius:0.7rem;
  padding:0.55rem 0.65rem;
  font-weight:600;
}
:where(.medexp-tw) .medexp-wcEmbed .select2-results__option--highlighted[aria-selected]{
  background:var(--tw-gray-50);
  color:var(--tw-gray-900);
}
:where(.medexp-tw) .medexp-wcEmbed .select2-results__option[aria-selected="true"]{
  background:rgba(var(--medexp-brand-blue-rgb,26,79,156),0.10);
}

dexp-wcEmbed table.shop_table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid rgba(15,23,42,0.08);
  border-radius:1.1rem;
  overflow:hidden;
  background:#fff;
}
:where(.medexp-tw) .medexp-wcEmbed table.shop_table th,
:where(.medexp-tw) .medexp-wcEmbed table.shop_table td{
  padding:0.85rem 0.95rem;
  border-bottom:1px solid rgba(15,23,42,0.06);
  vertical-align:top;
}
:where(.medexp-tw) .medexp-wcEmbed table.shop_table thead th{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,251,0.98));
  font-weight:900;
  color:var(--tw-gray-800);
}
:where(.medexp-tw) .medexp-wcEmbed table.shop_table tr:last-child td{
  border-bottom:none;
}

/* Notices */
:where(.medexp-tw) .medexp-wcEmbed .woocommerce-error,
:where(.medexp-tw) .medexp-wcEmbed .woocommerce-message,
:where(.medexp-tw) .medexp-wcEmbed .woocommerce-info{
  border-radius:1rem;
  padding:0.9rem 1rem;
  border:1px solid rgba(15,23,42,0.08);
  background:rgba(255,255,255,0.92);
}


/* --------------------------------------------------------------------------
   Flashcards hub (Today + Decks + Start session + Stats)
   -------------------------------------------------------------------------- */
.medexp-tw .tw-fcHubShell{
 width:100%;
 position:relative;
 border-radius:22px;
 padding:1.5rem;
 background:
  linear-gradient(135deg, #E8EFF4 0%, #F2F6F8 40%, #F8FAFB 100%);
 overflow:hidden;
}
.medexp-tw .tw-fcHubShell::before{
 content:"";
 position:absolute;
 inset:0;
 border-radius:inherit;
 background:
  radial-gradient(600px 400px at 90% 0%, rgba(23,157,153,0.14), transparent 65%),
  radial-gradient(500px 350px at 5% 0%, rgba(22,44,85,0.08), transparent 60%),
  radial-gradient(650px 500px at 50% 100%, rgba(59,198,194,0.08), transparent 60%);
 pointer-events:none;
}
.medexp-tw .tw-fcPanel{ width:100%; }
.medexp-tw .tw-fcMount{ width:100%; min-height: 240px; }

/* Session builder grid — wider left column for form, narrower right for preview */
.medexp-tw .tw-fcBuilder{
 display:grid;
 grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
 gap: 1.25rem;
 margin-top: 1rem;
 align-items: start;
}
@media (max-width: 980px){
 .medexp-tw .tw-fcBuilder{ grid-template-columns: 1fr; }
}
/* Prevent form cards from lifting on hover (distracting for forms) */
.medexp-tw .tw-fcBuilder .tw-card:hover{
 transform: none;
 box-shadow: 0 12px 32px rgba(2,6,23,.08);
}

.medexp-tw .tw-fcForm{ display:flex; flex-direction:column; gap:.85rem; }
.medexp-tw .tw-fcFormRow{ margin-bottom:.15rem; }
.medexp-tw .tw-fcFormRow label:not(.tw-fcToggleRow){ display:block; font-weight:700; margin-bottom:.4rem; color:rgba(15,23,42,.78); font-size:.9rem; }
.medexp-tw .tw-fcFormLabel{ font-weight:700; font-size:.9rem; color:rgba(15,23,42,.75); margin-bottom:.4rem; }
.medexp-tw .tw-fcFormRow input[type="text"],
.medexp-tw .tw-fcFormRow input[type="number"],
.medexp-tw .tw-fcFormRow select{
 width:100%;
 padding:.6rem .75rem;
 border:1px solid rgba(15,23,42,.12);
 border-radius:.85rem;
 background:#fff;
 font-weight:700;
 color:rgba(15,23,42,.88);
 transition: border-color .15s ease, box-shadow .15s ease;
}
.medexp-tw .tw-fcFormRow input[type="text"]:focus,
.medexp-tw .tw-fcFormRow input[type="number"]:focus,
.medexp-tw .tw-fcFormRow select:focus{
 outline:none;
 border-color: rgba(var(--medexp-brand-blue-rgb,26,79,156),.4);
 box-shadow: 0 0 0 3px rgba(var(--medexp-brand-blue-rgb,26,79,156),.08);
}

.medexp-tw .tw-fcHelp{ font-size:.84rem; color: rgba(15,23,42,.55); margin-top:.35rem; line-height:1.4; }

/* Toggle rows — solid border, more padding, better checkbox spacing */
.medexp-tw .tw-fcToggleRow{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:1rem;
 padding:.7rem .85rem;
 border:1px solid rgba(15,23,42,.08);
 border-radius:.9rem;
 background: rgba(248,250,252,.7);
 transition: border-color .15s ease, background .15s ease;
}
.medexp-tw .tw-fcToggleRow:hover{
 border-color: rgba(var(--medexp-brand-blue-rgb,26,79,156),.15);
 background: rgba(248,250,252,.95);
}
.medexp-tw .tw-fcToggleLabel{ font-weight:800; font-size:.92rem; color:rgba(15,23,42,.82); }
.medexp-tw .tw-fcToggleRow input[type="checkbox"]{
 width:18px; height:18px; flex:0 0 18px;
 accent-color: var(--medexp-brand-teal, #00a676);
 cursor:pointer;
}

/* Limits grid — 3 columns */
.medexp-tw .tw-fcFormGrid{
 display:grid;
 grid-template-columns: 1fr 1fr 1fr;
 gap:.85rem;
}
@media (max-width: 980px){
 .medexp-tw .tw-fcFormGrid{ grid-template-columns: 1fr; }
}

/* Preview stat tiles */
.medexp-tw .tw-fcTiles{
 display:grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap:.65rem;
 margin-top:.75rem;
}
@media (max-width: 520px){
 .medexp-tw .tw-fcTiles{ grid-template-columns: 1fr; }
}
.medexp-tw .tw-fcTile{
 border:1px solid rgba(15,23,42,.07);
 border-radius: .95rem;
 padding: .85rem .9rem;
 background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(15,23,42,.02));
 box-shadow: 0 1px 4px rgba(15,23,42,.04);
 transition: border-color .15s ease, box-shadow .15s ease;
}
.medexp-tw .tw-fcTile:hover{
 border-color:rgba(var(--medexp-brand-blue-rgb,26,79,156),.15);
 box-shadow:0 2px 8px rgba(15,23,42,.07);
}
.medexp-tw .tw-fcTile__num{ font-size: 1.5rem; font-weight: 900; line-height:1; color:rgba(15,23,42,.90); }
.medexp-tw .tw-fcTile__label{ margin-top:.35rem; font-size:.84rem; color: rgba(15,23,42,.55); font-weight:700; }

/* ── Flashcard Topic Picker ─────────────────────────────────────── */
.medexp-tw .tw-fcTopic{margin-bottom:0.15rem;}

/* Header: "Focus on Topics" + badge + chevron */
.medexp-tw .tw-fcTopic__header{
 display:flex;align-items:center;gap:8px;
 padding:0.7rem 0.85rem;cursor:pointer;user-select:none;
 border:1px solid rgba(15,23,42,0.1);border-radius:0.7rem;
 background:rgba(248,250,252,0.7);transition:background .15s ease;
}
.medexp-tw .tw-fcTopic__header:hover{background:rgba(241,245,249,0.9);}
.medexp-tw .tw-fcTopic__headerLabel{font-weight:800;font-size:0.92rem;flex:1;color:rgba(15,23,42,0.75);}
.medexp-tw .tw-fcTopic__badge{
 font-size:0.72rem;font-weight:800;padding:2px 8px;
 border-radius:999px;background:var(--medexp-brand-teal,#179D99);
 color:#fff;min-width:20px;text-align:center;line-height:1.4;
}
.medexp-tw .tw-fcTopic__badge:empty{display:none;}
.medexp-tw .tw-fcTopic__chevron{
 width:16px;height:16px;transition:transform .25s cubic-bezier(.34,1.56,.64,1);
 color:rgba(15,23,42,0.35);flex-shrink:0;
}
.medexp-tw .tw-fcTopic.is-open .tw-fcTopic__chevron{transform:rotate(180deg);}

/* Chips area */
.medexp-tw .tw-fcTopic__chips{
 display:flex;flex-wrap:wrap;gap:6px;padding:6px 0;
 min-height:28px;align-items:center;
}
.medexp-tw .tw-fcTopic__chip{
 display:inline-flex;align-items:center;gap:4px;
 padding:4px 10px;border-radius:999px;
 background:rgba(23,157,153,0.10);color:var(--medexp-brand-teal,#179D99);
 font-size:0.8rem;font-weight:700;max-width:220px;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.medexp-tw .tw-fcTopic__chipX{
 border:0;background:rgba(23,157,153,0.2);border-radius:999px;
 width:16px;height:16px;display:inline-flex;align-items:center;
 justify-content:center;cursor:pointer;font-size:11px;
 font-weight:900;color:var(--medexp-brand-teal,#179D99);
 line-height:1;flex-shrink:0;transition:background .12s ease;
}
.medexp-tw .tw-fcTopic__chipX:hover{background:rgba(23,157,153,0.35);}
.medexp-tw .tw-fcTopic__allLabel{
 font-size:0.82rem;font-weight:600;color:rgba(15,23,42,0.3);
 font-style:italic;
}
.medexp-tw .tw-fcTopic__clearAll{
 font-size:0.78rem;font-weight:700;color:rgba(15,23,42,0.35);
 cursor:pointer;border:0;background:0;padding:2px 4px;
 transition:color .12s ease;
}
.medexp-tw .tw-fcTopic__clearAll:hover{color:#EF4444;}

/* Collapsible body */
.medexp-tw .tw-fcTopic__body{
 overflow:hidden;max-height:0;opacity:0;
 transition:max-height .3s ease,opacity .2s ease,padding .2s ease;
 padding:0;
}
.medexp-tw .tw-fcTopic.is-open .tw-fcTopic__body{
 max-height:600px;opacity:1;padding-top:6px;
}

/* Search input */
.medexp-tw .tw-fcTopic__search{
 width:100%;padding:0.5rem 0.7rem;margin-bottom:8px;
 border:1px solid rgba(15,23,42,0.12);border-radius:0.5rem;
 font-size:0.85rem;outline:none;box-sizing:border-box;
 transition:border-color .15s ease,box-shadow .15s ease;
}
.medexp-tw .tw-fcTopic__search:focus{
 border-color:rgba(23,157,153,0.4);
 box-shadow:0 0 0 3px rgba(23,157,153,0.08);
}
.medexp-tw .tw-fcTopic__search::placeholder{color:rgba(15,23,42,0.28);}

/* Scrollable tree */
.medexp-tw .tw-fcTopic__tree{
 max-height:280px;overflow-y:auto;padding:2px 0;
 scrollbar-width:thin;
}
.medexp-tw .tw-fcTopic__tree::-webkit-scrollbar{width:5px;}
.medexp-tw .tw-fcTopic__tree::-webkit-scrollbar-thumb{background:rgba(15,23,42,0.12);border-radius:999px;}

/* Chapter row */
.medexp-tw .tw-fcTopic__chRow{
 display:flex;align-items:center;gap:8px;
 padding:6px 8px;border-radius:8px;cursor:pointer;
 font-weight:800;font-size:0.88rem;color:rgba(15,23,42,0.8);
}
.medexp-tw .tw-fcTopic__chRow:hover{background:rgba(241,245,249,0.7);}
.medexp-tw .tw-fcTopic__chRow input[type="checkbox"]{
 width:16px;height:16px;accent-color:var(--medexp-brand-teal,#179D99);
 flex-shrink:0;cursor:pointer;
}
.medexp-tw .tw-fcTopic__chChev{
 width:14px;height:14px;flex-shrink:0;
 color:rgba(15,23,42,0.3);transition:transform .2s ease;
}
.medexp-tw .tw-fcTopic__chRow.is-open .tw-fcTopic__chChev{transform:rotate(90deg);}
.medexp-tw .tw-fcTopic__chTitle{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.medexp-tw .tw-fcTopic__count{
 font-size:0.72rem;font-weight:700;color:rgba(15,23,42,0.28);
 margin-left:auto;white-space:nowrap;flex-shrink:0;
}

/* Children container (collapsible) */
.medexp-tw .tw-fcTopic__children{
 padding-left:20px;border-left:2px solid rgba(148,163,184,0.15);
 margin-left:14px;overflow:hidden;
 max-height:0;transition:max-height .25s ease;
}
.medexp-tw .tw-fcTopic__chRow.is-open + .tw-fcTopic__children{max-height:2000px;}

/* Section row */
.medexp-tw .tw-fcTopic__secRow{
 display:flex;align-items:center;gap:8px;
 padding:5px 8px;border-radius:8px;cursor:pointer;
 font-weight:700;font-size:0.85rem;color:rgba(15,23,42,0.6);
}
.medexp-tw .tw-fcTopic__secRow:hover{background:rgba(241,245,249,0.5);}
.medexp-tw .tw-fcTopic__secRow input[type="checkbox"]{
 width:15px;height:15px;accent-color:var(--medexp-brand-teal,#179D99);
 flex-shrink:0;cursor:pointer;
}
.medexp-tw .tw-fcTopic__secChev{
 width:12px;height:12px;flex-shrink:0;
 color:rgba(15,23,42,0.25);transition:transform .2s ease;
}
.medexp-tw .tw-fcTopic__secRow.is-open .tw-fcTopic__secChev{transform:rotate(90deg);}

/* Leaf topic row */
.medexp-tw .tw-fcTopic__leaf{
 display:flex;align-items:center;gap:8px;
 padding:4px 8px 4px 12px;border-radius:8px;cursor:pointer;
 font-size:0.84rem;font-weight:600;color:rgba(15,23,42,0.5);
}
.medexp-tw .tw-fcTopic__leaf:hover{background:rgba(241,245,249,0.4);}
.medexp-tw .tw-fcTopic__leaf input[type="checkbox"]{
 width:14px;height:14px;accent-color:var(--medexp-brand-teal,#179D99);
 flex-shrink:0;cursor:pointer;
}

/* Search result row (flat, with breadcrumb) */
.medexp-tw .tw-fcTopic__searchRow{
 display:flex;align-items:flex-start;gap:8px;
 padding:6px 8px;border-radius:8px;cursor:pointer;
}
.medexp-tw .tw-fcTopic__searchRow:hover{background:rgba(241,245,249,0.5);}
.medexp-tw .tw-fcTopic__searchRow input[type="checkbox"]{
 width:15px;height:15px;accent-color:var(--medexp-brand-teal,#179D99);
 flex-shrink:0;margin-top:2px;cursor:pointer;
}
.medexp-tw .tw-fcTopic__searchTitle{font-weight:800;font-size:0.85rem;color:rgba(15,23,42,0.75);}
.medexp-tw .tw-fcTopic__searchPath{font-size:0.73rem;color:rgba(15,23,42,0.3);margin-top:1px;}

/* Loading & empty states */
.medexp-tw .tw-fcTopic__empty{
 text-align:center;padding:20px;color:rgba(15,23,42,0.28);
 font-weight:700;font-size:0.85rem;
}

/* ================================================================
   FINAL THEME OVERRIDE LAYER — prevent WP theme CSS bleed
   into the MedexPrep Tailwind dashboard.
   ================================================================ */

/* Button text colors — highest specificity overrides */
.medexp-tw .tw-btn-primary,
.medexp-tw a.tw-btn-primary,
.medexp-tw a.tw-btn-primary:link,
.medexp-tw a.tw-btn-primary:visited,
.medexp-tw a.tw-btn-primary:hover,
.medexp-tw button.tw-btn-primary{
 color:#fff !important;
 text-decoration:none !important;
}
.medexp-tw .tw-btn-primary *{ color:inherit !important; }

.medexp-tw .tw-btn-secondary,
.medexp-tw a.tw-btn-secondary,
.medexp-tw a.tw-btn-secondary:link,
.medexp-tw a.tw-btn-secondary:visited,
.medexp-tw a.tw-btn-secondary:hover{
 color:var(--tw-gray-900, #111827) !important;
 text-decoration:none !important;
}

.medexp-tw .tw-btn-ghost,
.medexp-tw a.tw-btn-ghost,
.medexp-tw a.tw-btn-ghost:link,
.medexp-tw a.tw-btn-ghost:visited{
 color:var(--tw-gray-700, #374151) !important;
 text-decoration:none !important;
}

/* Links inside dashboard: no theme color bleed — exclude navlinks */
.medexp-tw a:not(.tw-navlink):not(.tw-brandLink):not(.tw-topbarLogo),
.medexp-tw a:not(.tw-navlink):not(.tw-brandLink):not(.tw-topbarLogo):link,
.medexp-tw a:not(.tw-navlink):not(.tw-brandLink):not(.tw-topbarLogo):visited{
 text-decoration:none !important;
}

/* Sidebar navigation: guarantee active state colors override everything */
.medexp-tw .tw-sidebar a.tw-navlink{
 color:rgba(15,23,42,0.86) !important;
 text-decoration:none !important;
}
.medexp-tw .tw-sidebar a.tw-navlink:hover{
 color:rgba(15,23,42,0.86) !important;
}
.medexp-tw .tw-sidebar a.tw-navlink.is-active,
.medexp-tw .tw-sidebar a.tw-navlink.is-active:link,
.medexp-tw .tw-sidebar a.tw-navlink.is-active:visited{
 color:#fff !important;
 background:linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(0,0,0,0.10) 100%), var(--medexp-brand-blue, #1a4f9c) !important;
 text-decoration:none !important;
}
.medexp-tw .tw-sidebar a.tw-navlink.is-active .tw-navicon,
.medexp-tw .tw-sidebar a.tw-navlink.is-active *{
 color:#fff !important;
}

/* Fonts: enforce dashboard typography */
.medexp-tw,
.medexp-tw *{
 font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji" !important;
}
.medexp-tw code,
.medexp-tw code *{
 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

/* Headings: prevent theme heading styles from leaking in */
.medexp-tw h1,
.medexp-tw h2,
.medexp-tw h3,
.medexp-tw h4{
 font-family: inherit !important;
 color: var(--tw-gray-900, #111827) !important;
 margin-top: 0 !important;
}

/* ══════════════════════════════════════════════════════════════
   Stat Card Detail Modals (iOS GamDetail parity)
   ══════════════════════════════════════════════════════════════ */
.medexp-statModal{position:fixed;inset:0;z-index:999999;display:flex;align-items:flex-end;justify-content:center;pointer-events:none;}
.medexp-statModal.is-open{pointer-events:auto;}
.medexp-statModal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,0);transition:background .3s ease;}
.medexp-statModal.is-open .medexp-statModal__backdrop{background:rgba(0,0,0,0.55);}
.medexp-statModal__sheet{
 position:relative;z-index:2;
 width:100%;max-width:480px;max-height:85vh;
 background:linear-gradient(180deg, #0B1428 0%, #162C55 50%, #0F1E3D 100%);
 border-radius:24px 24px 0 0;
 overflow:hidden;
 display:flex;flex-direction:column;
 transform:translateY(100%);
 transition:transform .35s cubic-bezier(.34,1.56,.64,1);
 box-shadow:0 -8px 40px rgba(0,0,0,0.4);
}
.medexp-statModal.is-open .medexp-statModal__sheet{transform:translateY(0);}
.medexp-statModal__drag{width:36px;height:4px;border-radius:2px;background:rgba(255,255,255,0.15);margin:10px auto 0;}
button.medexp-statModal__close,
.medexp-statModal__close{position:absolute;top:12px;right:14px;width:32px;height:32px;border-radius:50%;border:none !important;background:rgba(255,255,255,0.08) !important;color:rgba(255,255,255,0.4) !important;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:3;transition:background .15s ease;padding:0;box-shadow:none;}
button.medexp-statModal__close:hover,
.medexp-statModal__close:hover{background:rgba(255,255,255,0.15) !important;color:rgba(255,255,255,0.6) !important;border-color:transparent !important;outline:none !important;}
button.medexp-statModal__close:focus,
.medexp-statModal__close:focus{border-color:transparent !important;outline:none !important;}
.medexp-statModal__body{overflow-y:auto;padding:10px 20px 40px;flex:1;}
.medexp-statModal__loading{text-align:center;padding:40px 0;color:rgba(255,255,255,0.35);font-weight:700;}

/* Hero */
.medexp-statModal__hero{text-align:center;padding:20px 0 8px;}
.medexp-statModal__heroIcon{margin:0 auto 6px;}
.medexp-statModal__heroIcon svg{filter:drop-shadow(0 0 12px rgba(59,198,194,0.4));}
.medexp-statModal__heroValue{font-size:56px;font-weight:900;color:#fff;line-height:1;letter-spacing:-1px;}
.medexp-statModal__heroLabel{font-size:13px;font-weight:700;color:rgba(255,255,255,0.45);text-transform:uppercase;letter-spacing:1px;margin-top:4px;}

/* Level ring (XP detail) */
.medexp-statModal__levelRing{position:relative;width:140px;height:140px;margin:0 auto 8px;}
.medexp-statModal__levelRing svg{width:100%;height:100%;}
.medexp-statModal__levelInner{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}
.medexp-statModal__levelInner .medexp-statModal__heroValue{font-size:28px;}

/* Stats row */
.medexp-statModal__statsRow{display:flex;padding:14px 0;background:rgba(255,255,255,0.05);border-radius:16px;margin:20px 0;}
.medexp-statModal__stat{flex:1;text-align:center;}
.medexp-statModal__statVal{font-size:20px;font-weight:900;color:#fff;letter-spacing:-0.3px;}
.medexp-statModal__statLbl{font-size:10px;font-weight:700;color:rgba(255,255,255,0.35);text-transform:uppercase;letter-spacing:0.3px;margin-top:3px;}

/* Sections */
.medexp-statModal__section{background:rgba(255,255,255,0.04);border-radius:20px;padding:16px;margin-top:16px;}
.medexp-statModal__sectionTitle{font-size:11px;font-weight:800;color:rgba(255,255,255,0.4);text-transform:uppercase;letter-spacing:0.5px;margin-bottom:12px;}

/* Calendar grid */
.medexp-statModal__calGrid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;}
.medexp-statModal__calHeader{
 font-size:9px;font-weight:700;color:rgba(255,255,255,0.35);
 text-align:center;padding-bottom:2px;
}
.medexp-statModal__calDay{
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 height:38px;border-radius:8px;
 background:rgba(255,255,255,0.04);
 transition:all .15s ease;
}
.medexp-statModal__calDay--empty{background:transparent;}
.medexp-statModal__calDay.is-active{background:#179D99;}
.medexp-statModal__calDay.is-today{box-shadow:inset 0 0 0 1.5px #3BC6C2;}
.medexp-statModal__calNum{font-size:12px;font-weight:700;color:rgba(255,255,255,0.25);}
.medexp-statModal__calDay.is-active .medexp-statModal__calNum{color:#fff;font-weight:800;}

/* Milestones */
.medexp-statModal__milestone{display:flex;align-items:center;gap:14px;padding:6px 0;}
.medexp-statModal__milestoneIcon{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,0.06);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:900;color:rgba(255,255,255,0.3);flex-shrink:0;}
.medexp-statModal__milestoneIcon.is-claimed{background:#179D99;color:#fff;}
.medexp-statModal__milestoneIcon.is-reached{background:rgba(23,157,153,0.3);color:rgba(255,255,255,0.6);}
.medexp-statModal__milestoneIcon.is-current{background:#179D99;color:#fff;}
.medexp-statModal__milestoneIcon.is-past{background:rgba(23,157,153,0.3);color:rgba(255,255,255,0.6);}
.medexp-statModal__milestoneText{flex:1;min-width:0;}
.medexp-statModal__milestoneName{font-size:14px;font-weight:800;color:rgba(255,255,255,0.7);}
.medexp-statModal__milestoneIcon.is-claimed + .medexp-statModal__milestoneText .medexp-statModal__milestoneName{color:#fff;}
.medexp-statModal__milestoneSub{font-size:12px;color:rgba(255,255,255,0.3);margin-top:2px;}
.medexp-statModal__milestoneIcon.is-claimed + .medexp-statModal__milestoneText .medexp-statModal__milestoneSub{color:#3BC6C2;}
.medexp-statModal__milestoneDot{width:8px;height:8px;border-radius:50%;background:#3BC6C2;flex-shrink:0;}
.medexp-statModal__currentBadge{font-size:9px;font-weight:900;color:#3BC6C2;background:rgba(59,198,194,0.15);border-radius:999px;padding:3px 8px;flex-shrink:0;}

/* Activity rows */
.medexp-statModal__actRow{display:flex;align-items:center;gap:12px;padding:4px 0;}
.medexp-statModal__actDot{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,0.06);flex-shrink:0;}
.medexp-statModal__actDot.is-on{background:#179D99;}
.medexp-statModal__actLabel{flex:1;font-size:12px;font-weight:600;color:rgba(255,255,255,0.3);}
.medexp-statModal__actLabel.is-on{color:#fff;}
.medexp-statModal__actStatus{font-size:12px;font-weight:700;color:rgba(255,255,255,0.15);}
.medexp-statModal__actStatus.is-on{color:#3BC6C2;}

/* Info rows (shields) */
.medexp-statModal__infoRow{display:flex;align-items:flex-start;gap:12px;padding:4px 0;}
.medexp-statModal__infoIcon{font-size:16px;flex-shrink:0;width:20px;text-align:center;margin-top:1px;}
.medexp-statModal__infoText{font-size:13px;color:rgba(255,255,255,0.55);line-height:1.5;}
.medexp-statModal__infoText strong{color:#fff;}

/* Badge grid */
.medexp-statModal__badgeGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;}
.medexp-statModal__badge{text-align:center;padding:12px;background:rgba(255,255,255,0.05);border-radius:16px;border:1px solid rgba(23,157,153,0.1);}
.medexp-statModal__badgeIcon{font-size:24px;margin-bottom:6px;}
.medexp-statModal__badgeName{font-size:12px;font-weight:800;color:#fff;line-height:1.3;}
.medexp-statModal__badgeDesc{font-size:10px;color:rgba(255,255,255,0.35);margin-top:3px;line-height:1.3;}
.medexp-statModal__badgeTier{display:inline-block;font-size:9px;font-weight:800;color:#3BC6C2;background:rgba(59,198,194,0.15);border-radius:999px;padding:2px 6px;margin-top:5px;}

/* Quick Practice buttons */
.medexp-statModal__quickGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.medexp-statModal__quickBtn{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
 padding:16px 10px;border-radius:16px;text-decoration:none !important;
 background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.08);
 transition:background .15s ease,transform .15s ease,border-color .15s ease;cursor:pointer;
}
.medexp-statModal__quickBtn:hover{background:rgba(255,255,255,0.10);transform:translateY(-1px);border-color:rgba(59,198,194,0.3);}
.medexp-statModal__quickBtn--primary{
 background:linear-gradient(135deg, rgba(23,157,153,0.25), rgba(59,198,194,0.15));
 border-color:rgba(59,198,194,0.3);
}
.medexp-statModal__quickBtn--primary:hover{background:linear-gradient(135deg, rgba(23,157,153,0.35), rgba(59,198,194,0.25));}
.medexp-statModal__quickIcon{font-size:20px;line-height:1;}
.medexp-statModal__quickLabel{font-size:13px;font-weight:800;color:#fff;}
.medexp-statModal__quickSub{font-size:10px;font-weight:600;color:rgba(255,255,255,0.35);}

/* XP bar (compact) */
.medexp-statModal__xpRow{display:flex;align-items:center;gap:10px;}
.medexp-statModal__xpLevel{font-size:16px;font-weight:900;color:#3BC6C2;white-space:nowrap;}
.medexp-statModal__xpBar{flex:1;height:8px;background:rgba(255,255,255,0.08);border-radius:999px;overflow:hidden;}
.medexp-statModal__xpFill{height:100%;border-radius:999px;background:linear-gradient(90deg,#3BC6C2,#179D99);transition:width .6s ease;}
.medexp-statModal__xpLabel{font-size:12px;font-weight:700;color:rgba(255,255,255,0.4);white-space:nowrap;}

/* Performance ring layout */
.medexp-statModal__perfRow{display:flex;align-items:center;gap:20px;}
.medexp-statModal__perfRing{position:relative;width:88px;height:88px;flex-shrink:0;}
.medexp-statModal__perfRing svg{width:100%;height:100%;}
.medexp-statModal__perfRingVal{
 position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
 font-size:18px;font-weight:900;color:#fff;
}
.medexp-statModal__perfStats{flex:1;display:flex;flex-direction:column;gap:8px;}
.medexp-statModal__perfItem{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:rgba(255,255,255,0.6);}
.medexp-statModal__perfDot{width:10px;height:10px;border-radius:50%;flex-shrink:0;}

/* Speed tier rows */
.medexp-statModal__speedRow{
 display:flex;align-items:center;gap:12px;padding:8px 10px;
 border-radius:12px;margin-bottom:4px;transition:background .15s ease;
}
.medexp-statModal__speedRow.is-active{background:rgba(255,255,255,0.08);border:1px solid rgba(59,198,194,0.2);}
.medexp-statModal__speedEmoji{font-size:20px;flex-shrink:0;width:28px;text-align:center;}
.medexp-statModal__speedText{flex:1;min-width:0;}
.medexp-statModal__speedName{font-size:13px;font-weight:800;color:rgba(255,255,255,0.7);}
.medexp-statModal__speedRow.is-active .medexp-statModal__speedName{color:#fff;}
.medexp-statModal__speedDesc{font-size:11px;color:rgba(255,255,255,0.3);margin-top:1px;}

/* Accuracy bar (score breakdown) */
.medexp-statModal__accBar{display:flex;height:14px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,0.06);width:100%;}
.medexp-statModal__accFill{height:100%;transition:width .6s cubic-bezier(.34,1.56,.64,1);}
.medexp-statModal__accFill--correct{background:linear-gradient(90deg,#22c55e,#16a34a);border-radius:999px 0 0 999px;}
.medexp-statModal__accFill--wrong{background:linear-gradient(90deg,#ef4444,#dc2626);border-radius:0 999px 999px 0;}
.medexp-statModal__accLegend{display:flex;justify-content:center;gap:16px;margin-top:8px;}
.medexp-statModal__accLegend span{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:rgba(255,255,255,0.5);}
.medexp-statModal__accLegend span::before{content:'';width:8px;height:8px;border-radius:50%;flex-shrink:0;}
.medexp-statModal__accLegend span:first-child::before{background:#22c55e;}
.medexp-statModal__accLegend span:last-child::before{background:#ef4444;}

/* Shield row (compact) */
.medexp-statModal__shieldRow{display:flex;align-items:center;gap:14px;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.06);}
.medexp-statModal__shieldCount{font-size:28px;font-weight:900;color:#3BC6C2;min-width:36px;text-align:center;line-height:1;}
.medexp-statModal__shieldInfo{flex:1;min-width:0;}
.medexp-statModal__shieldInfo div:first-child{font-size:13px;font-weight:800;color:rgba(255,255,255,0.85);}
.medexp-statModal__shieldInfo div:last-child{font-size:11px;color:rgba(255,255,255,0.35);margin-top:2px;}

/* Stat card clickable indicator */
:where(.medexp-tw) .tw-metric{transition:transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;cursor:pointer;}
:where(.medexp-tw) .tw-metric:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(2,6,23,0.10);}
:where(.medexp-tw) .tw-metric:active{transform:scale(0.98);}

/* Responsive */
@media (min-width:640px){
 .medexp-statModal{align-items:center;}
 .medexp-statModal__sheet{border-radius:24px;max-height:80vh;}
}

/* ── Hero Icon Glow ──────────────────────────────────────────────── */
.medexp-statModal__heroGlow{
 position:relative;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 margin:0 auto 6px;
}
.medexp-statModal__heroGlow::before{
 content:'';
 position:absolute;
 inset:-16px;
 border-radius:50%;
 opacity:0;
 animation:heroGlowIn .8s cubic-bezier(.34,1.56,.64,1) .25s both, heroGlowPulse 3s ease-in-out 1.1s infinite;
 pointer-events:none;
}
@keyframes heroGlowIn{
 from{opacity:0;transform:scale(0.5);}
 to{opacity:1;transform:scale(1);}
}
@keyframes heroGlowPulse{
 0%,100%{opacity:.7;transform:scale(1);}
 50%{opacity:1;transform:scale(1.08);}
}
/* Streak — warm orange glow */
.medexp-statModal__heroGlow--streak::before{
 background:radial-gradient(circle, rgba(251,146,60,0.35) 0%, rgba(239,68,68,0.15) 50%, transparent 70%);
}
/* Shields — teal glow */
.medexp-statModal__heroGlow--shields::before{
 background:radial-gradient(circle, rgba(59,198,194,0.35) 0%, rgba(23,157,153,0.15) 50%, transparent 70%);
}
/* Badges — gold glow */
.medexp-statModal__heroGlow--badges::before{
 background:radial-gradient(circle, rgba(251,191,36,0.35) 0%, rgba(245,158,11,0.15) 50%, transparent 70%);
}
/* XP level ring — teal glow */
.medexp-statModal__heroGlow--xp{
 display:inline-block;
}
.medexp-statModal__heroGlow--xp::before{
 inset:-24px;
 background:radial-gradient(circle, rgba(59,198,194,0.25) 0%, rgba(23,157,153,0.10) 50%, transparent 70%);
}
/* Countdown — warm pink/violet glow */
.medexp-statModal__heroGlow--countdown::before{
 background:radial-gradient(circle, rgba(244,114,182,0.35) 0%, rgba(167,139,250,0.15) 50%, transparent 70%);
}
/* CAT pass probability — teal readiness glow */
.medexp-statModal__heroGlow--cat::before{
 background:radial-gradient(circle, rgba(59,198,194,0.35) 0%, rgba(23,157,153,0.15) 50%, transparent 70%);
}

/* ── CAT Trend Chart ─────────────────────────────────────────────── */
.medexp-statModal__trendSvg{
 border-radius:12px;
 background:rgba(255,255,255,0.03);
 margin:8px 0 6px;
}
.medexp-statModal__trendDirection{
 display:flex;
 align-items:center;
 gap:6px;
 font-size:13px;
 font-weight:700;
 margin-top:4px;
}

/* ── Focus Areas card ──────────────────────────────────────────── */
:where(.medexp-tw) .tw-focusRow{
 display:flex; align-items:center; gap:.5rem; padding:.45rem 0;
 border-bottom:1px solid rgba(15,23,42,.06);
}
:where(.medexp-tw) .tw-focusRow:last-child{ border-bottom:none; }
:where(.medexp-tw) .tw-focusDot{ flex-shrink:0; font-size:14px; line-height:1; }
:where(.medexp-tw) .tw-focusName{ flex:1; font-weight:600; font-size:14px; color:var(--tw-gray-800,#1e293b); }
:where(.medexp-tw) .tw-focusPct{ font-weight:800; font-size:14px; font-variant-numeric:tabular-nums; min-width:40px; text-align:right; }

/* ── Readiness History timeline ────────────────────────────────── */
:where(.medexp-tw) .tw-timelineBody svg{ display:block; width:100%; }
:where(.medexp-tw) .tw-timelineLegend{
 display:flex; flex-wrap:wrap; gap:.75rem; margin-top:.5rem;
 font-size:12px; font-weight:600; color:var(--tw-gray-500,#64748b);
}

/* ── Close Button — perfect circle fix ───────────────────────────── */
button.medexp-statModal__close,
.medexp-statModal__close{
 aspect-ratio:1;
 line-height:1;
 padding:0;
 flex-shrink:0;
 font-family:system-ui,sans-serif;
}

/* ── Scroll Indicator — fade hint + bouncing chevron ─────────────── */
.medexp-statModal__body{
 position:relative;
}
.medexp-statModal__scrollHint{
 position:sticky;
 bottom:0;
 left:0;
 right:0;
 display:flex;
 flex-direction:column;
 align-items:center;
 padding:32px 0 12px;
 background:linear-gradient(to bottom, rgba(11,20,40,0) 0%, rgba(11,20,40,0.85) 40%, rgba(11,20,40,0.98) 100%);
 pointer-events:none;
 z-index:2;
 opacity:1;
 transition:opacity .3s ease;
}
.medexp-statModal__scrollHint.is-hidden{
 opacity:0;
 pointer-events:none;
}
.medexp-statModal__scrollHint span{
 font-size:10px;
 font-weight:700;
 text-transform:uppercase;
 letter-spacing:0.8px;
 color:rgba(255,255,255,0.35);
 margin-bottom:4px;
}
.medexp-statModal__scrollChevron{
 width:20px;
 height:20px;
 color:rgba(255,255,255,0.3);
 animation:scrollBounce 1.6s ease-in-out infinite;
}
@keyframes scrollBounce{
 0%,100%{transform:translateY(0);opacity:.3;}
 50%{transform:translateY(5px);opacity:.7;}
}

/* Reduce motion for glow & scroll hint */
@media (prefers-reduced-motion:reduce){
 .medexp-statModal__heroGlow::before{animation:none !important;opacity:1 !important;}
 .medexp-statModal__scrollChevron{animation:none !important;}
}


/* ══════════════════════════════════════════════════════════════════════
   QBank Progress Ring — animated circular progress on Questions card
   ══════════════════════════════════════════════════════════════════════ */

/* Ring wrapper — centered layout inside the metric card */
:where(.medexp-tw) .tw-metric__ringWrap{
 position:relative;
 display:flex;
 align-items:center;
 justify-content:center;
 width:80px;
 height:80px;
 margin:.3rem auto .15rem;
 z-index:1;
}

/* SVG ring */
:where(.medexp-tw) .tw-metric__ring{
 width:80px;
 height:80px;
 transform:rotate(-90deg);
}
:where(.medexp-tw) .tw-metric__ringTrack{
 fill:none;
 stroke:rgba(148,163,184,0.15);
 stroke-width:7;
}
:where(.medexp-tw) .tw-metric__ringFill{
 fill:none;
 stroke-width:7;
 stroke-linecap:round;
 stroke:#38BDF8;
 transition:stroke-dashoffset 1.4s cubic-bezier(.34,1.56,.64,1), stroke .6s ease;
 filter:drop-shadow(0 0 6px var(--_ring-glow, rgba(56,189,248,0.35)));
}

/* Percentage text inside ring */
:where(.medexp-tw) .tw-metric__ringPct{
 position:absolute;
 inset:0;
 display:flex;
 align-items:center;
 justify-content:center;
 font-size:1.15rem;
 font-weight:900;
 letter-spacing:-0.03em;
 color:rgba(15,23,42,.88);
}
:where(.medexp-tw) .tw-metric__ringUnit{
 font-size:.65rem;
 font-weight:800;
 opacity:.55;
 margin-left:1px;
}

/* Fraction value below ring */
:where(.medexp-tw) .tw-metric__qbCount{
 font-size:1.1rem !important;
 text-align:center;
}

/* Color transitions based on completion percentage (set via JS data attribute) */
/* 0-24%: sky blue */
:where(.medexp-tw) .tw-metric--q7[data-qb-tier="1"]{
 --_ring-glow:rgba(56,189,248,0.35);
}
/* 25-49%: indigo */
:where(.medexp-tw) .tw-metric--q7[data-qb-tier="2"]{
 --_a:#6366F1; --_b:#8B5CF6;
 --_ring-glow:rgba(99,102,241,0.35);
}
/* 50-74%: teal */
:where(.medexp-tw) .tw-metric--q7[data-qb-tier="3"]{
 --_a:#3BC6C2; --_b:#179D99;
 --_ring-glow:rgba(23,157,153,0.4);
 color:#179D99;
}
/* 75-99%: emerald */
:where(.medexp-tw) .tw-metric--q7[data-qb-tier="4"]{
 --_a:#34D399; --_b:#10B981;
 --_ring-glow:rgba(16,185,129,0.4);
 color:#059669;
}
/* 100%: gold celebration */
:where(.medexp-tw) .tw-metric--q7[data-qb-tier="5"]{
 --_a:#FBBF24; --_b:#F59E0B;
 --_ring-glow:rgba(245,158,11,0.5);
 color:#D97706;
}

/* Glow pulse at milestones */
@keyframes qbRingPulse{
 0%,100%{filter:drop-shadow(0 0 6px var(--_ring-glow, rgba(56,189,248,0.35)));}
 50%{filter:drop-shadow(0 0 16px var(--_ring-glow, rgba(56,189,248,0.55))) drop-shadow(0 0 28px var(--_ring-glow, rgba(56,189,248,0.25)));}
}
:where(.medexp-tw) .tw-metric--q7.is-milestone .tw-metric__ringFill{
 animation:qbRingPulse 1.8s ease-in-out 3;
}

/* Shimmer sweep on the ring track */
@keyframes qbRingShimmer{
 0%{opacity:.15;}
 50%{opacity:.28;}
 100%{opacity:.15;}
}
:where(.medexp-tw) .tw-metric--q7.is-animating .tw-metric__ringTrack{
 animation:qbRingShimmer 1.4s ease-in-out;
}

/* 100% celebration — sparkle overlay */
@keyframes qbCelebrate{
 0%{transform:scale(0.8);opacity:0;}
 50%{transform:scale(1.12);opacity:1;}
 100%{transform:scale(1);opacity:1;}
}
:where(.medexp-tw) .tw-metric--q7[data-qb-tier="5"] .tw-metric__ringWrap::after{
 content:"🎉";
 position:absolute;
 top:-6px;
 right:-4px;
 font-size:18px;
 animation:qbCelebrate .6s cubic-bezier(.34,1.56,.64,1) .8s both;
 z-index:2;
}

/* ── QBank card layout adjustment — center content ── */
:where(.medexp-tw) .tw-metric--q7{
 align-items:center;
 text-align:center;
}
:where(.medexp-tw) .tw-metric--q7 .tw-metric__label{
 text-align:center;
 width:100%;
}
:where(.medexp-tw) .tw-metric--q7 .tw-metric__sub{
 text-align:center;
}
/* Hide the sparkline on q7 card (replaced by ring) */
:where(.medexp-tw) .tw-metric--q7 .tw-spark{display:none;}

/* Responsive — shrink ring on small cards */
@media (max-width:680px){
 :where(.medexp-tw) .tw-metric__ringWrap{width:68px;height:68px;}
 :where(.medexp-tw) .tw-metric__ring{width:68px;height:68px;}
 :where(.medexp-tw) .tw-metric__ringPct{font-size:1rem;}
}


/* ══════════════════════════════════════════════════════════════════════
   Metric Card Microanimations — iOS-inspired life & motion
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. Staggered Card Entrance ──────────────────────────────────── */
@keyframes metricEntrance{
 from{opacity:0;transform:translateY(18px) scale(0.96);}
 to{opacity:1;transform:translateY(0) scale(1);}
}

/* Cards invisible until observed */
:where(.medexp-tw) .tw-metricStrip.is-entrance .tw-metric{
 opacity:0;
 animation:metricEntrance .6s cubic-bezier(.34,1.56,.64,1) both;
}
:where(.medexp-tw) .tw-metricStrip.is-entrance .tw-metric:nth-child(1){animation-delay:0s;}
:where(.medexp-tw) .tw-metricStrip.is-entrance .tw-metric:nth-child(2){animation-delay:.08s;}
:where(.medexp-tw) .tw-metricStrip.is-entrance .tw-metric:nth-child(3){animation-delay:.16s;}
:where(.medexp-tw) .tw-metricStrip.is-entrance .tw-metric:nth-child(4){animation-delay:.24s;}

/* After entrance, ensure cards stay visible */
:where(.medexp-tw) .tw-metricStrip.is-entered .tw-metric{
 opacity:1;
}


/* ── 2. Icon Breathing Glow (all cards) ──────────────────────────── */
@keyframes metricIconBreathe{
 0%,100%{box-shadow:0 2px 6px rgba(0,0,0,.12), 0 8px 18px rgba(0,0,0,.08), 0 0 0 0 transparent;transform:scale(1);}
 50%{box-shadow:0 2px 6px rgba(0,0,0,.12), 0 8px 18px rgba(0,0,0,.08), 0 0 14px 4px var(--_icon-glow, rgba(56,189,248,0.25));transform:scale(1.06);}
}

/* Per-card glow colors */
:where(.medexp-tw) .tw-metric--streak{--_icon-glow:rgba(251,146,60,0.3);}
:where(.medexp-tw) .tw-metric--q7{--_icon-glow:rgba(99,102,241,0.25);}
:where(.medexp-tw) .tw-metric--acc{--_icon-glow:rgba(59,198,194,0.3);}
:where(.medexp-tw) .tw-metric--time{--_icon-glow:rgba(139,92,246,0.3);}

:where(.medexp-tw) .tw-metric.is-alive .tw-metric__icon{
 animation:metricIconBreathe 3s ease-in-out infinite;
}


/* ── 3. Streak Dot Staggered Reveal ──────────────────────────────── */
@keyframes dotReveal{
 from{opacity:0;transform:scale(0.3);}
 to{opacity:1;transform:scale(1);}
}

:where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot{
 opacity:0;
 animation:dotReveal .35s cubic-bezier(.34,1.56,.64,1) both;
}
:where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot:nth-child(1){animation-delay:.5s;}
:where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot:nth-child(2){animation-delay:.56s;}
:where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot:nth-child(3){animation-delay:.62s;}
:where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot:nth-child(4){animation-delay:.68s;}
:where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot:nth-child(5){animation-delay:.74s;}
:where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot:nth-child(6){animation-delay:.80s;}
:where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot:nth-child(7){animation-delay:.86s;}


/* ── 4. Active Dot Breathing Glow ────────────────────────────────── */
@keyframes dotGlow{
 0%,100%{box-shadow:0 0 0 2px color-mix(in srgb, var(--_a) 15%, transparent);}
 50%{box-shadow:0 0 8px 3px color-mix(in srgb, var(--_a) 22%, transparent), 0 0 0 2px color-mix(in srgb, var(--_a) 15%, transparent);}
}

:where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-on{
 animation:dotGlow 2.5s ease-in-out infinite;
}
/* Stagger the glow phase so dots don't pulse in sync */
:where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-on:nth-child(2){animation-delay:.3s;}
:where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-on:nth-child(3){animation-delay:.6s;}
:where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-on:nth-child(4){animation-delay:.9s;}
:where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-on:nth-child(5){animation-delay:1.2s;}
:where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-on:nth-child(6){animation-delay:1.5s;}
:where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-on:nth-child(7){animation-delay:1.8s;}


/* ── 5. Today Dot Expanding Ring ─────────────────────────────────── */
@keyframes todayPulse{
 0%,100%{box-shadow:0 0 0 2px color-mix(in srgb, var(--_a) 30%, transparent);}
 50%{box-shadow:0 0 0 5px color-mix(in srgb, var(--_a) 12%, transparent), 0 0 14px 2px color-mix(in srgb, var(--_a) 16%, transparent);}
}

:where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-today{
 animation:todayPulse 2s ease-in-out infinite;
}


/* ── 6. Sparkline Draw-In (accuracy) ─────────────────────────────── */
:where(.medexp-tw) .tw-metric--acc.is-drawing .tw-spark polyline{
 transition:stroke-dashoffset 1.2s ease-out;
}
:where(.medexp-tw) .tw-metric--acc.is-drawing .tw-spark polygon{
 opacity:0;
 transition:opacity .4s ease .9s;
}
:where(.medexp-tw) .tw-metric--acc.is-drawn .tw-spark polygon{
 opacity:.10;
}


/* ── 7. Sparkline Shimmer Sweep ──────────────────────────────────── */
@keyframes sparkShimmer{
 0%{left:-60%;}
 100%{left:120%;}
}

:where(.medexp-tw) .tw-metric--acc.is-drawn .tw-spark{
 position:relative;
 overflow:hidden;
}
:where(.medexp-tw) .tw-metric--acc.is-shimmer .tw-spark::after{
 content:"";
 position:absolute;
 top:0;bottom:0;
 width:60%;
 background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%);
 pointer-events:none;
 animation:sparkShimmer 1.2s ease-in-out both;
}


/* ── 8. Milestone Celebrations ───────────────────────────────────── */
@keyframes metricCelebrate{
 0%,100%{
  box-shadow:
   0 1px 0 rgba(17,24,39,.03),
   0 10px 22px rgba(2,6,23,.07),
   0 24px 48px rgba(2,6,23,.05);
 }
 50%{
  box-shadow:
   0 1px 0 rgba(17,24,39,.03),
   0 10px 22px rgba(2,6,23,.07),
   0 24px 48px rgba(2,6,23,.05),
   0 0 28px 8px var(--_icon-glow, rgba(56,189,248,0.3));
 }
}

/* Streak milestone (7, 14, 21, 28 days) */
:where(.medexp-tw) .tw-metric--streak.is-milestone{
 animation:metricCelebrate 1.8s ease-in-out 3;
}
:where(.medexp-tw) .tw-metric--streak.is-milestone::before{
 /* Override the wash gradient with a slightly brighter version during celebration */
 background:
  radial-gradient(ellipse 75% 45% at 20% 0%, rgba(255,255,255,.55) 0%, transparent 60%),
  linear-gradient(135deg,
   color-mix(in srgb, var(--_a) 30%, transparent) 0%,
   color-mix(in srgb, var(--_b) 22%, transparent) 45%,
   rgba(255,255,255,.85) 100%
  );
}

/* Streak milestone badge — pop then fade out so it never overlaps label text */
@keyframes milestoneBadgePop{
 0%{transform:scale(0) rotate(-12deg);opacity:0;}
 15%{transform:scale(1.2) rotate(4deg);opacity:1;}
 60%{transform:scale(1) rotate(0deg);opacity:1;}
 100%{transform:scale(1) rotate(0deg);opacity:0;pointer-events:none;}
}
:where(.medexp-tw) .tw-metric__milestoneBadge{
 position:absolute;
 top:.55rem;
 left:.55rem;
 font-size:1.1rem;
 z-index:3;
 animation:milestoneBadgePop 2.5s cubic-bezier(.34,1.56,.64,1) .3s both;
 filter:drop-shadow(0 2px 4px rgba(0,0,0,.15));
 pointer-events:none;
}


/* Accuracy milestone (≥80%) */
:where(.medexp-tw) .tw-metric--acc.is-acc-good{
 animation:metricCelebrate 1.8s ease-in-out 2;
}
:where(.medexp-tw) .tw-metric__trendBadge{
 position:absolute;
 top:.55rem;
 left:.55rem;
 font-size:1rem;
 z-index:3;
 animation:milestoneBadgePop 2.5s cubic-bezier(.34,1.56,.64,1) .3s both;
 filter:drop-shadow(0 2px 4px rgba(0,0,0,.15));
 pointer-events:none;
}


/* Time speed badge (<60s) */
:where(.medexp-tw) .tw-metric--time.is-time-fast{
 animation:metricCelebrate 1.8s ease-in-out 2;
}
:where(.medexp-tw) .tw-metric__speedBadge{
 position:absolute;
 top:.55rem;
 left:.55rem;
 font-size:1rem;
 z-index:3;
 animation:milestoneBadgePop 2.5s cubic-bezier(.34,1.56,.64,1) .3s both;
 filter:drop-shadow(0 2px 4px rgba(0,0,0,.15));
 pointer-events:none;
}


/* ── 9. Value Counter Placeholder (prevents layout shift) ────────── */
:where(.medexp-tw) .tw-metric__value{
 min-height:1.65rem; /* Prevents collapse during count-up */
}


/* ── 10. Accessibility — Reduced Motion ──────────────────────────── */
@media (prefers-reduced-motion:reduce){
 :where(.medexp-tw) .tw-metricStrip.is-entrance .tw-metric,
 :where(.medexp-tw) .tw-metric--streak.is-dots-entering .tw-dot{
  animation:none !important;
  opacity:1 !important;
 }
 :where(.medexp-tw) .tw-metric.is-alive .tw-metric__icon,
 :where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-on,
 :where(.medexp-tw) .tw-metric--streak.is-alive .tw-dot.is-today,
 :where(.medexp-tw) .tw-metric--streak.is-milestone,
 :where(.medexp-tw) .tw-metric--acc.is-acc-good,
 :where(.medexp-tw) .tw-metric--time.is-time-fast{
  animation:none !important;
 }
 :where(.medexp-tw) .tw-metric--acc.is-drawing .tw-spark polyline{
  transition:none !important;
  stroke-dashoffset:0 !important;
 }
 :where(.medexp-tw) .tw-metric--acc.is-shimmer .tw-spark::after{
  animation:none !important;
  display:none;
 }
 :where(.medexp-tw) .tw-metric__milestoneBadge,
 :where(.medexp-tw) .tw-metric__trendBadge,
 :where(.medexp-tw) .tw-metric__speedBadge{
  animation:none !important;
  opacity:1;transform:none;
 }
}

/* ─────────────────────────────────────────────────────
   Mochi Briefing Card (Daily Recap)
   ───────────────────────────────────────────────────── */

/* Wrapper — hidden by default until JS hydrates */
:where(.medexp-tw) .tw-briefingWrap{ display:none; }
:where(.medexp-tw) .tw-briefingWrap.is-ready{ display:block; }

/* Card: gradient wash + border */
:where(.medexp-tw) .tw-briefingCard{
 position:relative;
 overflow:hidden;
 border:1px solid transparent;
 background:
  linear-gradient(135deg, rgba(23,157,153,.06) 0%, rgba(22,44,85,.04) 100%),
  rgba(255,255,255,.94);
 border-image:linear-gradient(135deg, rgba(23,157,153,.28), rgba(22,44,85,.14)) 1;
 border-radius:18px;
 padding:0;
 transition:opacity .35s ease, transform .35s ease;
}
/* Override border-image to play nice with border-radius (use box-shadow fallback) */
:where(.medexp-tw) .tw-briefingCard{
 border-image:none;
 border:1px solid rgba(23,157,153,.18);
 box-shadow:
  0 0 0 1px rgba(23,157,153,.06),
  0 4px 20px rgba(23,157,153,.08),
  0 8px 32px rgba(2,6,23,.04);
}
/* Subtle teal glow */
:where(.medexp-tw) .tw-briefingCard::before{
 content:'';
 position:absolute;
 inset:0;
 border-radius:inherit;
 background:linear-gradient(135deg, rgba(23,157,153,.07) 0%, rgba(59,198,194,.04) 40%, transparent 70%);
 pointer-events:none;
 z-index:0;
}

/* Entrance animation — slide up + fade in */
@keyframes medexpBriefingEntrance{
 0%  { opacity:0; transform:translateY(16px) scale(.97); }
 100%{ opacity:1; transform:translateY(0) scale(1); }
}
:where(.medexp-tw) .tw-briefingCard:not(.is-dismissing){
 animation:medexpBriefingEntrance .5s cubic-bezier(.22,1,.36,1) both;
}

/* Avatar — Mochi-style wave (triggered by .is-mochi-waved after content loads) */
@keyframes medexpMochiWave{
 0%      { transform:scale(1)    rotate(0deg)   translateY(0); }
 10%     { transform:scale(1.18) rotate(0deg)   translateY(-5px); }
 20%     { transform:scale(1.18) rotate(-14deg)  translateY(-5px); }
 30%     { transform:scale(1.18) rotate(12deg)   translateY(-5px); }
 40%     { transform:scale(1.18) rotate(-10deg)  translateY(-4px); }
 50%     { transform:scale(1.15) rotate(8deg)    translateY(-2px); }
 60%     { transform:scale(1.08) rotate(-3deg)   translateY(0); }
 72%     { transform:scale(1)    rotate(0deg)   translateY(2px); }
 84%     { transform:scale(1)    rotate(0deg)   translateY(-1px); }
 100%    { transform:scale(1)    rotate(0deg)   translateY(0); }
}
@keyframes medexpMochiGlow{
 0%,100%{ box-shadow:0 4px 14px rgba(23,157,153,.15); }
 25%    { box-shadow:0 6px 28px rgba(23,157,153,.45), 0 0 0 7px rgba(59,198,194,.12); }
 50%    { box-shadow:0 4px 16px rgba(23,157,153,.2); }
 75%    { box-shadow:0 5px 22px rgba(23,157,153,.35), 0 0 0 5px rgba(59,198,194,.08); }
}
:where(.medexp-tw) .tw-briefingCard.is-mochi-waved:not(.is-expanded) .tw-briefingCard__avatar{
 animation:medexpMochiGlow 2.8s ease-in-out 0s 2;
}
:where(.medexp-tw) .tw-briefingCard.is-mochi-waved:not(.is-expanded) .tw-briefingCard__avatarEmoji{
 display:inline-block;
 animation:medexpMochiWave .9s cubic-bezier(.34,1.56,.64,1) .05s both;
}

/* Dismiss animation */
:where(.medexp-tw) .tw-briefingCard.is-dismissing{
 opacity:0;
 transform:translateY(-12px) scale(.97);
 pointer-events:none;
}

/* ── Collapsed state ── */
:where(.medexp-tw) .tw-briefingCard__collapsed{
 display:flex;
 align-items:center;
 gap:1rem;
 padding:1.1rem 1.25rem;
 position:relative;
 z-index:1;
 cursor:pointer;
 min-height:72px;
}

/* Avatar circle */
:where(.medexp-tw) .tw-briefingCard__avatar{
 flex-shrink:0;
 width:48px;
 height:48px;
 border-radius:50%;
 background:linear-gradient(135deg, rgba(23,157,153,.12), rgba(59,198,194,.18));
 display:flex;
 align-items:center;
 justify-content:center;
 box-shadow:0 4px 14px rgba(23,157,153,.15);
}
:where(.medexp-tw) .tw-briefingCard__avatarEmoji{
 font-size:1.6rem;
 line-height:1;
}

/* Preview text area */
:where(.medexp-tw) .tw-briefingCard__preview{
 flex:1;
 min-width:0;
}
:where(.medexp-tw) .tw-briefingCard__title{
 font-weight:900;
 font-size:0.9375rem;
 letter-spacing:-0.01em;
 color:var(--tw-gray-800, #1e293b);
 line-height:1.3;
}
:where(.medexp-tw) .tw-briefingCard__snippet{
 margin-top:0.2rem;
 font-size:0.8125rem;
 font-weight:600;
 color:var(--tw-gray-500, #64748b);
 line-height:1.45;
 overflow:hidden;
 text-overflow:ellipsis;
 display:-webkit-box;
 -webkit-line-clamp:2;
 -webkit-box-orient:vertical;
}
/* "Read more" inline hint */
:where(.medexp-tw) .tw-briefingCard__readMore{
 color:var(--medexp-brand-teal, #179D99);
 font-weight:800;
 font-size:0.8125rem;
 cursor:pointer;
 white-space:nowrap;
}
:where(.medexp-tw) .tw-briefingCard__readMore:hover{
 text-decoration:underline;
}
/* Hide "Read more" when expanded */
:where(.medexp-tw) .tw-briefingCard.is-expanded .tw-briefingCard__readMore{
 display:none;
}

/* Expand chevron button */
:where(.medexp-tw) .tw-briefingCard__expand{
 flex-shrink:0;
 width:32px;
 height:32px;
 border-radius:50%;
 border:none;
 background:rgba(23,157,153,.08);
 display:flex;
 align-items:center;
 justify-content:center;
 cursor:pointer;
 transition:transform .25s ease, background .2s ease;
 color:var(--medexp-brand-teal, #179D99);
}
:where(.medexp-tw) .tw-briefingCard__expand:hover{
 background:rgba(23,157,153,.15);
}
:where(.medexp-tw) .tw-briefingCard__expand svg.tw-ico{
 width:1rem;
 height:1rem;
 transition:transform .3s cubic-bezier(.4,0,.2,1);
}
:where(.medexp-tw) .tw-briefingCard.is-expanded .tw-briefingCard__expand svg.tw-ico{
 transform:rotate(180deg);
}

/* Dismiss X button */
:where(.medexp-tw) .tw-briefingCard__dismiss{
 flex-shrink:0;
 width:28px;
 height:28px;
 border-radius:50%;
 border:none;
 background:transparent;
 display:flex;
 align-items:center;
 justify-content:center;
 cursor:pointer;
 opacity:0.4;
 transition:opacity .2s ease, background .2s ease;
 color:var(--tw-gray-500, #64748b);
}
:where(.medexp-tw) .tw-briefingCard__dismiss:hover{
 opacity:0.8;
 background:rgba(0,0,0,.05);
}
:where(.medexp-tw) .tw-briefingCard__dismiss svg.tw-ico{
 width:0.85rem;
 height:0.85rem;
}

/* ── Expanded body ── */
:where(.medexp-tw) .tw-briefingCard__body{
 padding:0 1.25rem 1.25rem 1.25rem;
 position:relative;
 z-index:1;
 animation:briefingBodyIn .35s ease;
}
@keyframes briefingBodyIn{
 from{ opacity:0; transform:translateY(-8px); }
 to{ opacity:1; transform:translateY(0); }
}

/* Briefing text */
:where(.medexp-tw) .tw-briefingCard__text{
 font-size:0.875rem;
 font-weight:600;
 line-height:1.65;
 color:var(--tw-gray-700, #334155);
 white-space:pre-wrap;
 word-break:break-word;
}
:where(.medexp-tw) .tw-briefingCard__text strong{
 font-weight:900;
 color:var(--tw-gray-800, #1e293b);
}
:where(.medexp-tw) .tw-briefingCard__text ul{
 margin:0.5rem 0;
 padding-left:1.2rem;
 list-style:disc;
}
:where(.medexp-tw) .tw-briefingCard__text li{
 margin:0.25rem 0;
}

/* Typewriter cursor */
:where(.medexp-tw) .tw-briefingCard__typing::after{
 content:'|';
 font-weight:400;
 color:var(--medexp-brand-teal, #179D99);
 animation:briefingBlink .6s step-end infinite;
 margin-left:1px;
}
@keyframes briefingBlink{
 50%{ opacity:0; }
}

/* Suggested action pills */
:where(.medexp-tw) .tw-briefingCard__actions{
 display:flex;
 flex-wrap:wrap;
 gap:0.5rem;
 margin-top:0.85rem;
}
:where(.medexp-tw) .tw-briefingCard__actionPill{
 display:inline-flex;
 align-items:center;
 gap:0.35rem;
 padding:0.45rem 0.85rem;
 border-radius:9999px;
 border:1.5px solid rgba(23,157,153,.22);
 background:rgba(23,157,153,.05);
 color:var(--medexp-brand-teal, #179D99);
 font-size:0.78rem;
 font-weight:800;
 cursor:pointer;
 transition:background .2s ease, transform .15s ease, box-shadow .2s ease;
}
:where(.medexp-tw) .tw-briefingCard__actionPill:hover{
 background:rgba(23,157,153,.12);
 transform:translateY(-1px);
 box-shadow:0 4px 12px rgba(23,157,153,.12);
}

/* Footer (recap history + regenerate) */
:where(.medexp-tw) .tw-briefingCard__footer{
 margin-top:0.75rem;
 padding-top:0.65rem;
 border-top:1px solid rgba(148,163,184,.12);
 display:flex;
 align-items:center;
 gap:0;
}
:where(.medexp-tw) .tw-briefingCard__footer [data-briefing-refresh]{
 font-size:0.72rem;
 opacity:0.4;
 border:none;
 box-shadow:none;
 padding:0.3rem 0.6rem;
 margin-left:0.25rem;
}
:where(.medexp-tw) .tw-briefingCard__footer [data-briefing-refresh]:hover{
 opacity:0.7;
}

/* Loading skeleton */
:where(.medexp-tw) .tw-briefingCard.is-loading .tw-briefingCard__title,
:where(.medexp-tw) .tw-briefingCard.is-loading .tw-briefingCard__snippet{
 background:linear-gradient(90deg, rgba(148,163,184,.1) 25%, rgba(148,163,184,.2) 50%, rgba(148,163,184,.1) 75%);
 background-size:200% 100%;
 animation:briefingSkel 1.5s ease infinite;
 border-radius:6px;
 color:transparent !important;
 min-height:1em;
}
:where(.medexp-tw) .tw-briefingCard.is-loading .tw-briefingCard__title{
 width:65%;
 min-height:1.15em;
}
:where(.medexp-tw) .tw-briefingCard.is-loading .tw-briefingCard__snippet{
 width:85%;
 margin-top:0.35rem;
}
@keyframes briefingSkel{
 0%{ background-position:200% 0; }
 100%{ background-position:-200% 0; }
}

/* ── Inline Study Plan Setup Card ────────────────────────────────── */
@keyframes twPlanSetupIn{
 from{ opacity:0; transform:translateY(10px); }
 to{ opacity:1; transform:translateY(0); }
}

:where(.medexp-tw) .tw-planSetup{
 display:flex;
 flex-direction:column;
 gap:1.35rem;
 animation:twPlanSetupIn .4s cubic-bezier(.34,1.56,.64,1) both;
}

:where(.medexp-tw) .tw-planSetup__header{
 display:flex;
 align-items:center;
 gap:1rem;
}

:where(.medexp-tw) .tw-planSetup__avatar{
 flex-shrink:0;
 width:56px;
 height:56px;
 border-radius:50%;
 background:linear-gradient(135deg, rgba(23,157,153,.12), rgba(59,198,194,.22));
 display:flex;
 align-items:center;
 justify-content:center;
 box-shadow:0 4px 14px rgba(23,157,153,.12);
}

:where(.medexp-tw) .tw-planSetup__emoji{
 font-size:1.75rem;
 line-height:1;
}

:where(.medexp-tw) .tw-planSetup__field{
 display:flex;
 flex-direction:column;
 gap:.55rem;
}

:where(.medexp-tw) .tw-planSetup__label{
 font-weight:800;
 font-size:.88rem;
 color:rgba(30,41,59,.78);
 letter-spacing:0.01em;
}

:where(.medexp-tw) .tw-planSetup__pills{
 display:flex;
 flex-wrap:wrap;
 gap:6px;
}

:where(.medexp-tw) .tw-planSetup__pill{
 padding:.55rem 1rem;
 border-radius:999px;
 border:1.5px solid rgba(148,163,184,.28);
 background:rgba(248,250,252,.9);
 font-weight:700;
 font-size:.88rem;
 color:rgba(30,41,59,.6);
 cursor:pointer;
 transition:all .15s ease;
 white-space:nowrap;
 user-select:none;
}

:where(.medexp-tw) .tw-planSetup__pill:hover{
 border-color:rgba(23,157,153,.45);
 background:rgba(23,157,153,.04);
}

:where(.medexp-tw) .tw-planSetup__pill.is-active{
 background:linear-gradient(135deg, #179D99 0%, #117673 100%);
 color:#fff;
 border-color:transparent;
 box-shadow:0 3px 12px rgba(23,157,153,.40), 0 0 0 3px rgba(23,157,153,.15);
 transform:scale(1.06);
 font-weight:800;
}

:where(.medexp-tw) .tw-planSetup__ctaWrap{
 padding-top:.35rem;
}

:where(.medexp-tw) .tw-planSetup__cta{
 font-size:1rem;
 font-weight:850;
 padding:.75rem 2rem;
 border-radius:14px;
 letter-spacing:0.01em;
}

:where(.medexp-tw) .tw-planSetup__cta.is-loading{
 opacity:.7;
 pointer-events:none;
}

/* Date input styling for the setup card */
:where(.medexp-tw) .tw-planSetup .tw-input[type="date"]{
 max-width:260px;
 font-weight:700;
}

@media(max-width:639px){
 :where(.medexp-tw) .tw-planSetup__header{
  flex-direction:column;
  text-align:center;
  gap:.65rem;
 }
 :where(.medexp-tw) .tw-planSetup__pill{
  padding:.45rem .75rem;
  font-size:.82rem;
 }
 :where(.medexp-tw) .tw-planSetup__cta{
  width:100%;
 }
}

@media(prefers-reduced-motion:reduce){
 :where(.medexp-tw) .tw-planSetup{animation:none !important;}
 :where(.medexp-tw) .tw-planSetup__pill{transition:none !important;transform:none !important;}
}

/* ── Post-Tour Study Plan Celebration Modal ───────────────────────── */

/* Entrance animation for modal */
@keyframes twPlanModalIn{
 0%{opacity:0;transform:scale(.92) translateY(14px);}
 60%{opacity:1;transform:scale(1.02) translateY(-2px);}
 100%{opacity:1;transform:scale(1) translateY(0);}
}
/* Mochi bounce */
@keyframes twPlanModalBounce{
 0%,100%{transform:translateY(0);}
 30%{transform:translateY(-8px);}
 50%{transform:translateY(0);}
 70%{transform:translateY(-4px);}
}
/* Confetti float upward (contained within modal) */
@keyframes twPlanConfetti{
 0%{opacity:1;transform:translateY(0) rotate(0deg) scale(1);}
 50%{opacity:.9;}
 100%{opacity:0;transform:translateY(-60px) rotate(180deg) scale(.5);}
}

/* Overlay entrance */
:where(.medexp-tw).medexp-modalOverlay.is-visible{
 background:rgba(0,0,0,.45);
}

/* Inner celebration wrapper */
:where(.medexp-tw) .tw-planModal{
 display:flex;
 flex-direction:column;
 align-items:center;
 text-align:center;
 gap:1.15rem;
 padding:2.25rem 2rem 1.75rem;
 position:relative;
 overflow:hidden;
 animation:twPlanModalIn .5s cubic-bezier(.34,1.56,.64,1) both;
}

/* Confetti container */
:where(.medexp-tw) .tw-planModal__confetti{
 position:absolute;
 inset:0;
 pointer-events:none;
 overflow:hidden;
}

/* Individual confetti dots */
:where(.medexp-tw) .tw-planModal__dot{
 position:absolute;
 top:65%;
 width:9px;
 height:9px;
 border-radius:50%;
 opacity:0;
 animation:twPlanConfetti 1.6s cubic-bezier(.25,.46,.45,.94) forwards;
}

/* Mochi mascot circle */
:where(.medexp-tw) .tw-planModal__mascot{
 width:68px;
 height:68px;
 border-radius:50%;
 background:linear-gradient(135deg, #179D99 0%, #117673 100%);
 display:flex;
 align-items:center;
 justify-content:center;
 box-shadow:0 4px 16px rgba(23,157,153,.3), 0 0 0 4px rgba(23,157,153,.1);
 animation:twPlanModalBounce .8s cubic-bezier(.34,1.56,.64,1) .2s both;
 flex-shrink:0;
}

/* Heading block */
:where(.medexp-tw) .tw-planModal__heading{
 max-width:340px;
}

/* Form fields inside modal — override text alignment */
:where(.medexp-tw) .tw-planModal .tw-planSetup__field{
 text-align:left;
 width:100%;
 max-width:380px;
}

/* Pills centered in modal */
:where(.medexp-tw) .tw-planModal .tw-planSetup__pills{
 justify-content:center;
}

/* CTA in modal — full width */
:where(.medexp-tw) .tw-planModal .tw-planSetup__ctaWrap{
 width:100%;
 max-width:380px;
}
:where(.medexp-tw) .tw-planModal .tw-planSetup__cta{
 width:100%;
 font-size:1.05rem;
}

/* Skip / "Maybe later" link */
:where(.medexp-tw) .tw-planModal__skip{
 background:none;
 border:none;
 color:#64748B;
 font-size:.9rem;
 font-weight:600;
 cursor:pointer;
 padding:.25rem .5rem;
 transition:color .15s;
 text-decoration:none;
}
:where(.medexp-tw) .tw-planModal__skip:hover{
 color:#334155;
 text-decoration:underline;
}

/* Modal card size for celebration */
:where(.medexp-tw).medexp-modalOverlay .medexp-modal:has(.tw-planModal){
 max-width:460px;
 border-radius:1.25rem;
 padding:0;
 overflow:hidden;
}

/* Mobile adjustments */
@media(max-width:639px){
 :where(.medexp-tw) .tw-planModal{
  padding:1.75rem 1.25rem 1.25rem;
  gap:1rem;
 }
 :where(.medexp-tw) .tw-planModal .tw-planSetup__cta{
  width:100%;
 }
 :where(.medexp-tw).medexp-modalOverlay .medexp-modal:has(.tw-planModal){
  max-width:calc(100vw - 2rem);
  max-height:calc(100vh - 2rem);
  overflow-y:auto;
 }
}

/* Reduced motion */
@media(prefers-reduced-motion:reduce){
 :where(.medexp-tw) .tw-planModal{animation:none !important;}
 :where(.medexp-tw) .tw-planModal__mascot{animation:none !important;}
 :where(.medexp-tw) .tw-planModal__dot{animation:none !important;display:none;}
}

/* Responsive: mobile */
@media (max-width: 639px){
 :where(.medexp-tw) .tw-briefingCard__collapsed{
  gap:0.75rem;
  padding:0.9rem 1rem;
 }
 :where(.medexp-tw) .tw-briefingCard__avatar{
  width:40px;
  height:40px;
 }
 :where(.medexp-tw) .tw-briefingCard__avatarEmoji{
  font-size:1.35rem;
 }
 :where(.medexp-tw) .tw-briefingCard__title{
  font-size:0.875rem;
 }
 :where(.medexp-tw) .tw-briefingCard__body{
  padding:0 1rem 1rem 1rem;
 }
}

/* ══════════════════════════════════════════════════════════════════
   Recap History Panel
   ══════════════════════════════════════════════════════════════════ */
:where(.medexp-tw) .tw-briefingHistory{
 animation:briefingBodyIn 300ms ease both;
}
:where(.medexp-tw) .tw-briefingHistory__header{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:0.75rem;
 margin-bottom:1rem;
 padding-bottom:0.65rem;
 border-bottom:1px solid rgba(148,163,184,.12);
}
:where(.medexp-tw) .tw-briefingHistory__headerTitle{
 font-size:0.95rem;
 font-weight:900;
 color:#1e293b;
 letter-spacing:-0.01em;
}
:where(.medexp-tw) .tw-briefingHistory__backBtn{
 flex-shrink:0;
 font-size:0.76rem !important;
 font-weight:700 !important;
 color:var(--medexp-brand-teal, #179D99) !important;
 padding:0.3rem 0.7rem !important;
 border-radius:999px !important;
 border:1px solid rgba(23,157,153,.18) !important;
 background:rgba(23,157,153,.04) !important;
 cursor:pointer;
 transition:background .15s ease, border-color .15s ease;
}
:where(.medexp-tw) .tw-briefingHistory__backBtn:hover{
 background:rgba(23,157,153,.10) !important;
 border-color:rgba(23,157,153,.30) !important;
}

:where(.medexp-tw) .tw-briefingHistory__list{
 display:flex;
 flex-direction:column;
 gap:0;
 position:relative;
}
/* Vertical timeline line */
:where(.medexp-tw) .tw-briefingHistory__list::before{
 content:'';
 position:absolute;
 left:6px;
 top:10px;
 bottom:10px;
 width:2px;
 background:linear-gradient(to bottom, rgba(23,157,153,.20), rgba(148,163,184,.10));
 border-radius:999px;
}

/* Date group header */
:where(.medexp-tw) .tw-briefingHistory__dateHeader{
 display:flex;
 align-items:center;
 gap:0.6rem;
 padding:0.5rem 0 0.35rem 0;
 font-size:0.72rem;
 font-weight:800;
 color:rgba(30,41,59,.50);
 text-transform:uppercase;
 letter-spacing:0.05em;
 position:relative;
 z-index:1;
}
:where(.medexp-tw) .tw-briefingHistory__dateDot{
 width:14px;
 height:14px;
 border-radius:50%;
 background:var(--medexp-brand-teal, #179D99);
 border:2.5px solid #fff;
 box-shadow:0 0 0 1.5px rgba(23,157,153,.25);
 flex-shrink:0;
}

/* Individual recap item */
@keyframes recapItemIn{
 from{opacity:0;transform:translateX(-8px);}
 to{opacity:1;transform:translateX(0);}
}
:where(.medexp-tw) .tw-briefingHistory__item{
 margin-left:22px;
 padding:0.75rem 1rem;
 border-radius:0.85rem;
 background:rgba(255,255,255,.70);
 border:1px solid rgba(148,163,184,.10);
 margin-bottom:0.45rem;
 cursor:pointer;
 transition:background .15s ease, border-color .15s ease, box-shadow .2s ease, transform .15s ease;
 position:relative;
 animation:recapItemIn 300ms ease both;
 animation-delay:var(--delay, 0ms);
}
:where(.medexp-tw) .tw-briefingHistory__item:hover{
 background:rgba(255,255,255,.95);
 border-color:rgba(23,157,153,.15);
 box-shadow:0 2px 12px rgba(23,157,153,.06);
 transform:translateX(2px);
}
:where(.medexp-tw) .tw-briefingHistory__item.is-current{
 border-color:rgba(23,157,153,.22);
 background:rgba(23,157,153,.03);
}
:where(.medexp-tw) .tw-briefingHistory__item.is-expanded{
 background:rgba(255,255,255,.98);
 border-color:rgba(23,157,153,.25);
 box-shadow:0 4px 18px rgba(23,157,153,.08);
 cursor:default;
}
/* Timeline connector dot for each item */
:where(.medexp-tw) .tw-briefingHistory__item::before{
 content:'';
 position:absolute;
 left:-16px;
 top:1rem;
 width:8px;
 height:8px;
 border-radius:50%;
 background:rgba(148,163,184,.30);
 border:2px solid #fff;
}
:where(.medexp-tw) .tw-briefingHistory__item.is-current::before{
 background:var(--medexp-brand-teal, #179D99);
 box-shadow:0 0 0 2px rgba(23,157,153,.15);
}

:where(.medexp-tw) .tw-briefingHistory__itemHeader{
 display:flex;
 align-items:center;
 gap:0.5rem;
 margin-bottom:0.3rem;
}
:where(.medexp-tw) .tw-briefingHistory__itemTitle{
 font-size:0.84rem;
 font-weight:800;
 color:#1e293b;
 display:flex;
 align-items:center;
 gap:0.45rem;
}
:where(.medexp-tw) .tw-briefingHistory__currentBadge{
 display:inline-flex;
 padding:0.12rem 0.5rem;
 border-radius:999px;
 background:rgba(23,157,153,.10);
 color:var(--medexp-brand-teal, #179D99);
 font-size:0.62rem;
 font-weight:800;
 text-transform:uppercase;
 letter-spacing:0.04em;
}
:where(.medexp-tw) .tw-briefingHistory__itemSnippet{
 font-size:0.78rem;
 color:rgba(51,65,85,.60);
 line-height:1.45;
 display:-webkit-box;
 -webkit-line-clamp:2;
 -webkit-box-orient:vertical;
 overflow:hidden;
}
:where(.medexp-tw) .tw-briefingHistory__item.is-expanded .tw-briefingHistory__itemSnippet{
 display:none;
}

/* Expanded body */
:where(.medexp-tw) .tw-briefingHistory__itemBody{
 margin-top:0.6rem;
 padding-top:0.6rem;
 border-top:1px solid rgba(148,163,184,.10);
 font-size:0.84rem;
 color:#334155;
 line-height:1.65;
}
:where(.medexp-tw) .tw-briefingHistory__itemBody strong{
 color:#1e293b;
 font-weight:800;
}
:where(.medexp-tw) .tw-briefingHistory__itemBody ul{
 margin:0.4rem 0;
 padding-left:1.2rem;
 list-style:disc;
}
:where(.medexp-tw) .tw-briefingHistory__itemBody li{
 margin-bottom:0.25rem;
}

/* Loading & empty */
:where(.medexp-tw) .tw-briefingHistory__loading{
 text-align:center;
 padding:2rem 1rem;
 color:rgba(51,65,85,.50);
 font-size:0.85rem;
 font-weight:600;
}
:where(.medexp-tw) .tw-briefingHistory__empty{
 text-align:center;
 padding:2rem 1rem;
 color:rgba(51,65,85,.45);
 font-size:0.85rem;
 font-weight:600;
}

/* Responsive */
@media (max-width: 639px){
 :where(.medexp-tw) .tw-briefingHistory__item{
  margin-left:18px;
  padding:0.65rem 0.85rem;
 }
 :where(.medexp-tw) .tw-briefingHistory__list::before{
  left:5px;
 }
 :where(.medexp-tw) .tw-briefingHistory__item::before{
  left:-13px;
 }
}

