/* MyWealthNest Learning Area — brand styles (matches www.mywealthnest.com) */
:root{
  --blue:#0284C7; --blue2:#0369A1; --blue-soft:#E0F2FE;
  --red:#DC2626; --red2:#B91C1C;
  --ink:#0F172A; --text:#334155; --muted:#64748B;
  --line:#E2E8F0; --bg:#F4F8FB; --white:#fff;
  --green:#15803D; --green-soft:#DCFCE7;
  --radius:16px; --shadow:0 8px 24px rgba(2,132,199,.08);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.55;-webkit-font-smoothing:antialiased}
a{color:var(--blue2)}
a:hover{color:var(--blue)}
.wrap{max-width:1120px;margin:0 auto;padding:0 20px}
main{padding:28px 0 56px}
h1,h2,h3{line-height:1.25;margin:0 0 8px;color:var(--ink)}
h2{font-size:22px}
h3{font-size:17px}
.small{font-size:13px;color:var(--muted)}

/* Header */
header.top{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.topin{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:66px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:18px;color:var(--ink);text-decoration:none}
.brand::before{content:"";width:34px;height:34px;border-radius:11px;flex:0 0 34px;background:var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' fill='none'%3E%3Ccircle cx='18' cy='18' r='14' stroke='rgba(255,255,255,.9)' stroke-width='2'/%3E%3Ccircle cx='18' cy='18' r='9' stroke='rgba(255,255,255,.6)' stroke-width='2'/%3E%3Cpath d='M8 14 L13 24 L18 14 L23 24 L28 14' stroke='%23DC2626' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/26px no-repeat}
.brand:hover{color:var(--ink)}
.nav{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.nav a{text-decoration:none;font-weight:600;font-size:14px;color:var(--text)}
.nav a:hover{color:var(--blue)}
.nav .logout{border:1px solid var(--line);border-radius:999px;padding:7px 14px}
.nav .logout:hover{border-color:var(--blue)}

/* Hero */
.hero{background:linear-gradient(135deg,#0B3B5C 0%,var(--blue2) 55%,var(--blue) 100%);color:#fff;border-radius:22px;padding:34px 32px;margin-bottom:22px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.hero::after{content:"";position:absolute;right:-60px;top:-60px;width:240px;height:240px;border-radius:50%;border:28px solid rgba(255,255,255,.07)}
.hero .h1,.hero h1{color:#fff;font-size:clamp(26px,4vw,36px);margin:8px 0 8px;font-weight:800}
.hero .lead{color:#DBEAFE;font-size:16px;max-width:680px;margin:0}
.eyebrow{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;background:rgba(255,255,255,.14);color:#fff;padding:6px 11px;border-radius:999px}
.lead{color:var(--text)}

/* Layout */
.grid{display:grid;gap:16px}
.grid2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.pad{padding:22px}

/* Stats + progress */
.stat{padding:20px 22px;display:flex;flex-direction:column;gap:2px}
.stat b{font-size:30px;font-weight:800;color:var(--blue2);line-height:1.1}
.stat span{font-size:13px;color:var(--muted);font-weight:600}
.progress{height:12px;background:#E2E8F0;border-radius:999px;overflow:hidden}
.progress span{display:block;height:100%;background:linear-gradient(90deg,var(--blue),#38BDF8);border-radius:999px;transition:width .4s}

/* Module cards */
.module{padding:20px;display:flex;flex-direction:column;gap:6px;transition:transform .15s,box-shadow .15s;border-top:4px solid var(--blue)}
.module:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(2,132,199,.14)}
.module .num{font-size:11px;font-weight:800;letter-spacing:.12em;color:var(--blue)}
.module h3{margin:2px 0 0}
.module p{margin:0;color:var(--muted);font-size:14px;flex:1}
.module .bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid #F1F5F9}
.badge{font-size:12px;font-weight:700;padding:5px 10px;border-radius:999px;background:var(--blue-soft);color:var(--blue2)}
.badge.done{background:var(--green-soft);color:var(--green)}
.badge.lock{background:#F1F5F9;color:var(--muted)}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:999px;padding:10px 18px;font:inherit;font-weight:700;font-size:14px;background:var(--red);color:#fff;text-decoration:none;cursor:pointer;transition:background .15s}
.btn:hover{background:var(--red2);color:#fff}
.btn.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}
.btn.secondary:hover{border-color:var(--blue);color:var(--blue2)}
.btn[disabled]{background:var(--green-soft);color:var(--green);cursor:default}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}

/* Forms (login / activate) */
.form{display:grid;gap:12px;max-width:420px}
.field{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:10px;font:inherit;font-size:16px;background:#fff}
.field:focus{outline:2px solid var(--blue);outline-offset:1px;border-color:var(--blue)}
.notice{padding:12px 14px;border-radius:12px;font-size:14px;margin-bottom:12px}
.notice.success{background:var(--green-soft);color:#14532D}
.notice.error{background:#FEE2E2;color:#7F1D1D}

/* Footer */
footer{text-align:center;color:var(--muted);font-size:13px;padding:24px 20px 36px;border-top:1px solid var(--line);background:#fff}

/* Module lesson page */
.module-back{margin:0 0 14px}
.module-back a{text-decoration:none;font-weight:600;font-size:14px}
.module-hero{margin-bottom:18px}
.lesson-intro{margin-bottom:18px}
.lesson-intro h2{margin:6px 0 8px}
.lesson-intro p{max-width:850px;color:#475569;line-height:1.75;margin:0}
.section-label{font-size:11px;letter-spacing:.12em;font-weight:800;color:var(--blue2);margin-bottom:7px}
.video-card{margin-bottom:18px}
.video-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}
.video-heading h2{margin:0}
.duration-badge{font-size:12px;font-weight:800;padding:7px 10px;border-radius:999px;background:var(--blue-soft);color:var(--blue2)}
.course-video-wrap{overflow:hidden;border-radius:14px;background:#000}
.course-video{display:block;width:100%;height:auto;max-height:680px;background:#000}
.video-note{font-size:13px;color:var(--muted);margin:10px 0 0}
.module-content-grid{margin-bottom:18px}
.learning-list{margin:12px 0 0;padding-left:22px;color:#334155;line-height:1.75}
.learning-list li{margin-bottom:7px}
.resource-copy{color:#64748b;line-height:1.6}
.completion-card{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px;border-left:4px solid var(--blue)}
.completion-card h2{margin:3px 0 6px}
.completion-card p{margin:0;color:var(--muted);line-height:1.55}
.completion-form{margin:0}
.module-nav{margin-top:8px}

@media(max-width:900px){.grid3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
  .grid2,.grid3{grid-template-columns:1fr}
  .hero{padding:26px 22px;border-radius:18px}
  .topin{padding:10px 0}
  .completion-card{align-items:stretch;flex-direction:column}
  .completion-form .btn{width:100%}
  .video-heading{align-items:flex-start}
}
