:root {
  --navy: #061b33;
  --blue: #0f4c81;
  --blue-2: #1178a5;
  --red: #ba0c2f;
  --gold: #c9963a;
  --cream: #f7f3ea;
  --white: #ffffff;
  --ink: #17202b;
  --muted: #687486;
  --line: #dfe5eb;
  --soft: #edf4f8;
  --shadow: 0 18px 50px rgba(5, 27, 51, .12);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #f7f9fb; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.background-orb { position: fixed; border-radius: 50%; filter: blur(2px); opacity: .22; pointer-events: none; }
.orb-one { width: 320px; height: 320px; background: var(--blue-2); top: -110px; right: -80px; }
.orb-two { width: 240px; height: 240px; background: var(--gold); bottom: -90px; left: -80px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: .74rem; font-weight: 800; letter-spacing: .18em; }
.eyebrow.light { color: rgba(255,255,255,.72); }
.muted { color: var(--muted); line-height: 1.65; }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; position: relative; z-index: 1; }
.brand-panel { padding: clamp(42px, 7vw, 96px); background: radial-gradient(circle at 80% 10%, rgba(255,255,255,.12), transparent 30%), linear-gradient(135deg, #061b33 0%, #0a3558 55%, #0e5278 100%); color: white; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.brand-panel::after { content:"V"; position:absolute; right:-50px; bottom:-190px; font-family: Georgia, serif; font-size: 34rem; color: rgba(255,255,255,.035); line-height:1; }
.brand-topline { display: flex; gap: 14px; align-items: center; font-size: .78rem; letter-spacing: .08em; color: rgba(255,255,255,.72); position:relative; z-index:1; }
.norway-flag { position: relative; overflow: hidden; background: #ba0c2f; box-shadow: 0 8px 18px rgba(0,0,0,.16); flex: 0 0 auto; }
.brand-topline .norway-flag { width: 48px; height: 32px; border-radius: 4px; }
.flag-horizontal-white, .flag-horizontal-blue, .flag-vertical-white, .flag-vertical-blue { position: absolute; display: block; }
.flag-horizontal-white { left:0; top:42%; width:100%; height:26%; background:white; }
.flag-vertical-white { top:0; left:30%; height:100%; width:18%; background:white; }
.flag-horizontal-blue { left:0; top:48%; width:100%; height:14%; background:#00205b; }
.flag-vertical-blue { top:0; left:34%; height:100%; width:10%; background:#00205b; }
.brand-copy { max-width: 740px; position:relative; z-index:1; }
.brand-copy .eyebrow { color: var(--gold); }
.brand-copy h1 { margin:0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.1rem, 7vw, 6.9rem); line-height:.93; font-weight:500; letter-spacing:-.05em; }
.brand-copy h1 span { color:#d9b46c; font-style:italic; }
.hero-text { max-width: 600px; margin: 28px 0 0; font-size: clamp(1rem, 1.6vw, 1.22rem); line-height:1.75; color:rgba(255,255,255,.76); }
.brand-metrics { display:flex; gap:clamp(28px,5vw,72px); position:relative; z-index:1; }
.brand-metrics div { display:flex; flex-direction:column; gap:5px; }
.brand-metrics strong { font-family:Georgia,serif; font-size:2rem; color:#e2c17d; }
.brand-metrics span { color:rgba(255,255,255,.55); font-size:.75rem; text-transform:uppercase; letter-spacing:.1em; }
.login-panel { display:grid; place-items:center; padding:40px; background:rgba(247,249,251,.92); }
.login-card { width:min(100%, 430px); background:white; padding:44px; border:1px solid rgba(6,27,51,.08); border-radius:30px; box-shadow:var(--shadow); }
.login-logo { width:96px; height:96px; object-fit:contain; border-radius:50%; margin-bottom:28px; }
.login-card h2 { font-family:Georgia,serif; font-size:2.35rem; font-weight:500; margin:0; color:var(--navy); }
.login-card label { display:block; font-size:.83rem; font-weight:700; margin:22px 0 8px; color:#344054; }
.input-wrap { display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:14px; padding:0 14px; background:#fbfcfd; transition:.2s; }
.input-wrap:focus-within { border-color:var(--blue-2); box-shadow:0 0 0 4px rgba(17,120,165,.11); background:white; }
.input-wrap > span { color:var(--gold); font-size:.78rem; }
.input-wrap input { min-width:0; flex:1; border:0; background:transparent; outline:0; padding:15px 0; color:var(--ink); }
.icon-button { border:0; background:transparent; color:var(--blue); font-size:.76rem; font-weight:700; padding:6px; }
.primary-button, .secondary-button { border:0; border-radius:13px; padding:14px 18px; font-weight:800; transition:transform .2s, box-shadow .2s; }
.primary-button { width:100%; display:flex; justify-content:center; align-items:center; gap:12px; color:white; background:linear-gradient(135deg,var(--blue),var(--blue-2)); box-shadow:0 12px 24px rgba(15,76,129,.22); }
.primary-button:hover, .secondary-button:hover { transform:translateY(-2px); }
.form-message { min-height:22px; font-size:.82rem; color:#a31535; margin:12px 0; }
.login-note { margin:20px 0 0; padding-top:18px; border-top:1px solid var(--line); font-size:.78rem; color:var(--muted); text-align:center; }

.dashboard { min-height:100vh; display:grid; grid-template-columns:260px 1fr; background:#f6f8fa; }
.sidebar { min-height:100vh; position:sticky; top:0; height:100vh; padding:28px 20px; color:white; background:linear-gradient(180deg,#061b33,#092f50); display:flex; flex-direction:column; z-index:10; }
.sidebar-brand { display:flex; align-items:center; gap:12px; padding:0 8px 30px; border-bottom:1px solid rgba(255,255,255,.1); }
.sidebar-brand img { width:52px; height:52px; border-radius:50%; object-fit:cover; background:white; }
.sidebar-brand div { display:flex; flex-direction:column; letter-spacing:.16em; }
.sidebar-brand strong { font-size:.9rem; }
.sidebar-brand span { font-size:.62rem; color:#d9b46c; }
.sidebar nav { margin-top:26px; display:grid; gap:8px; }
.nav-item { display:flex; align-items:center; gap:12px; width:100%; border:0; color:rgba(255,255,255,.62); background:transparent; padding:13px 14px; border-radius:12px; text-align:left; font-weight:700; }
.nav-item:hover, .nav-item.active { color:white; background:rgba(255,255,255,.1); }
.nav-item.active { box-shadow:inset 3px 0 #d7b36a; }
.nav-item span { color:#d7b36a; width:18px; text-align:center; }
.sidebar-quote { margin-top:auto; padding:18px; border:1px solid rgba(255,255,255,.1); border-radius:16px; background:rgba(255,255,255,.055); }
.mini-flag { width:36px; height:24px; border-radius:3px; }
.sidebar-quote p { font-family:Georgia,serif; font-style:italic; line-height:1.45; margin:14px 0 6px; }
.sidebar-quote > span { font-size:.7rem; color:rgba(255,255,255,.48); }
.logout-button { margin-top:16px; border:1px solid rgba(255,255,255,.15); background:transparent; color:rgba(255,255,255,.7); border-radius:11px; padding:11px; }
.dashboard-main { min-width:0; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:22px clamp(24px,4vw,56px); background:rgba(255,255,255,.92); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; backdrop-filter:blur(12px); }
.topbar h2 { margin:0; font-family:Georgia,serif; font-weight:500; color:var(--navy); }
.topbar .eyebrow { margin-bottom:4px; }
.student-chip { display:flex; align-items:center; gap:11px; }
.student-avatar { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; color:white; background:linear-gradient(135deg,var(--blue),var(--blue-2)); font-weight:800; }
.student-chip div { display:flex; flex-direction:column; }
.student-chip strong { font-size:.85rem; }
.student-chip span:last-child { font-size:.7rem; color:var(--muted); margin-top:3px; }
.menu-button { display:none; border:0; background:transparent; font-size:1.4rem; color:var(--navy); }
.content-section { padding:clamp(24px,4vw,54px); }
.welcome-banner { min-height:290px; padding:clamp(30px,5vw,54px); border-radius:var(--radius); background:radial-gradient(circle at 75% 30%,rgba(255,255,255,.16),transparent 24%),linear-gradient(120deg,#0b3152,#0d5d82); color:white; display:flex; justify-content:space-between; align-items:center; overflow:hidden; position:relative; box-shadow:var(--shadow); }
.welcome-banner h3 { font-family:Georgia,serif; font-size:clamp(2.1rem,4vw,3.5rem); font-weight:500; line-height:1.05; margin:0; }
.welcome-banner p:not(.eyebrow) { max-width:590px; color:rgba(255,255,255,.72); line-height:1.65; }
.secondary-button { background:white; color:var(--navy); padding:13px 20px; }
.welcome-mark { display:grid; place-items:center; gap:14px; margin-left:30px; }
.large-flag { width:190px; height:126px; border-radius:12px; transform:rotate(-3deg); }
.welcome-mark > span { letter-spacing:.42em; font-size:.66rem; color:rgba(255,255,255,.55); }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin:22px 0 44px; }
.stat-card { background:white; border:1px solid var(--line); border-radius:17px; padding:22px; display:flex; flex-direction:column; gap:8px; }
.stat-card > span { color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; }
.stat-card strong { font-family:Georgia,serif; color:var(--navy); font-size:2rem; font-weight:500; }
.stat-card small { color:var(--muted); }
.progress-track { height:7px; background:#e7edf1; border-radius:99px; overflow:hidden; }
.progress-track i { display:block; height:100%; background:linear-gradient(90deg,var(--blue-2),var(--gold)); border-radius:99px; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:0 0 20px; }
.section-heading.compact { margin-bottom:14px; }
.section-heading h3 { margin:0; color:var(--navy); font-family:Georgia,serif; font-size:1.8rem; font-weight:500; }
.text-button { border:0; background:transparent; color:var(--blue); font-weight:800; }
.module-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.module-grid.expanded { grid-template-columns:repeat(3,1fr); }
.module-card { background:white; border:1px solid var(--line); border-radius:18px; padding:24px; transition:.22s; position:relative; overflow:hidden; }
.module-card::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--gold); transform:scaleY(0); transition:.22s; }
.module-card:hover { transform:translateY(-4px); box-shadow:0 14px 30px rgba(6,27,51,.09); }
.module-card:hover::before { transform:scaleY(1); }
.module-number { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:11px; background:var(--soft); color:var(--blue); font-weight:900; }
.module-card h4 { margin:20px 0 10px; font-family:Georgia,serif; color:var(--navy); font-size:1.28rem; font-weight:500; }
.module-card p { color:var(--muted); line-height:1.58; font-size:.9rem; }
.module-card footer { display:flex; justify-content:space-between; align-items:center; margin-top:18px; }
.level-badge { background:#f4ead4; color:#785b20; padding:5px 9px; border-radius:999px; font-size:.68rem; font-weight:800; }
.module-card button { border:0; background:transparent; color:var(--blue); font-weight:800; }
.completed-badge { color:#1d7b55; font-size:.72rem; font-weight:800; }
.two-column-layout { display:grid; grid-template-columns:1.25fr .75fr; gap:20px; margin-top:44px; }
.video-card, .challenge-card { background:white; border:1px solid var(--line); border-radius:20px; padding:22px; }
.video-card video { width:100%; display:block; max-height:420px; border-radius:14px; background:#061b33; }
.challenge-card { background:linear-gradient(145deg,#fff,#f7f2e7); }
.challenge-card h3 { font-family:Georgia,serif; font-size:1.8rem; color:var(--navy); margin:0 0 10px; }
.challenge-card p { color:var(--muted); line-height:1.55; }
.challenge-card blockquote { margin:18px 0; padding:16px; border-left:3px solid var(--gold); background:white; font-family:Georgia,serif; font-style:italic; line-height:1.55; }
textarea { width:100%; resize:vertical; border:1px solid var(--line); border-radius:12px; padding:12px; outline:0; background:white; }
textarea:focus { border-color:var(--blue-2); box-shadow:0 0 0 4px rgba(17,120,165,.09); }
.challenge-card .primary-button { margin-top:12px; }
.feedback { min-height:22px; font-size:.82rem; font-weight:700; }
.quiz-card { max-width:850px; background:white; border:1px solid var(--line); border-radius:20px; padding:clamp(24px,4vw,42px); }
.quiz-progress { color:var(--muted); font-size:.8rem; }
.quiz-card h4 { font-family:Georgia,serif; font-size:1.6rem; color:var(--navy); font-weight:500; }
.option-list { display:grid; gap:10px; margin:22px 0; }
.option-button { text-align:left; border:1px solid var(--line); background:white; border-radius:12px; padding:14px; }
.option-button:hover { border-color:var(--blue-2); background:#f7fbfd; }
.option-button.selected { border-color:var(--blue); background:#edf6fa; }
.quiz-actions { display:flex; justify-content:space-between; gap:12px; }
.quiz-actions .primary-button { width:auto; }
.resource-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.resource-grid article { background:white; border:1px solid var(--line); border-radius:18px; padding:26px; }
.resource-grid article > span { color:var(--gold); font-family:Georgia,serif; font-size:2rem; }
.resource-grid h4 { font-family:Georgia,serif; font-size:1.3rem; color:var(--navy); }
.resource-grid p { color:var(--muted); line-height:1.6; }
.resource-grid button { border:0; background:transparent; color:var(--blue); font-weight:800; padding:0; }
.resource-viewer { margin-top:22px; background:white; border:1px solid var(--line); border-radius:18px; padding:26px; line-height:1.7; }
.module-dialog { width:min(720px,calc(100% - 30px)); border:0; border-radius:22px; padding:36px; box-shadow:0 30px 90px rgba(0,0,0,.28); }
.module-dialog::backdrop { background:rgba(3,18,31,.72); backdrop-filter:blur(4px); }
.module-dialog h2 { font-family:Georgia,serif; font-size:2.2rem; color:var(--navy); font-weight:500; }
.dialog-close { position:absolute; top:15px; right:17px; width:36px; height:36px; border:0; border-radius:50%; background:#edf1f4; font-size:1.4rem; }
.lesson-content { margin:24px 0; padding:22px; background:#f5f8fa; border-radius:14px; line-height:1.7; }
.lesson-content code { background:#e6edf2; padding:2px 6px; border-radius:5px; }

@media (max-width: 1050px) {
  .login-layout { grid-template-columns:1fr; }
  .brand-panel { min-height:58vh; }
  .login-panel { padding:60px 24px; }
  .dashboard { grid-template-columns:220px 1fr; }
  .module-grid, .module-grid.expanded, .resource-grid { grid-template-columns:repeat(2,1fr); }
  .two-column-layout { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .brand-panel { padding:34px 24px; min-height:620px; }
  .brand-metrics { gap:22px; }
  .login-card { padding:30px 24px; }
  .dashboard { display:block; }
  .sidebar { position:fixed; left:-280px; width:260px; transition:left .25s; }
  .sidebar.open { left:0; box-shadow:20px 0 60px rgba(0,0,0,.3); }
  .menu-button { display:block; }
  .student-chip div { display:none; }
  .topbar { padding:16px 20px; }
  .content-section { padding:20px; }
  .welcome-banner { align-items:flex-start; }
  .welcome-mark { display:none; }
  .stats-grid, .module-grid, .module-grid.expanded, .resource-grid { grid-template-columns:1fr; }
  .section-heading { align-items:flex-start; flex-direction:column; }
}
