@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy:        #152A54;
  --navy-light:  #24417f;
  --navy-dark:   #0c1a38;
  --orange:      #F5821F;
  --orange-light:#ff9d40;
  --orange-dark: #d66c0f;
  --yellow:      #F5A623;
  --yellow-light:#ffc559;
  --purple:      #8B5CF6;
  --purple-light:#a78bfa;
  --white:       #ffffff;
  --bg:          #f5f7fb;
  --bg2:         #eaeef6;
  --text:        #1a2340;
  --text-2:      #4a5480;
  --gray:        #6b7a99;
  --border:      rgba(21,42,84,0.12);
  --border2:     #dde3f0;
  --success:     #22c55e;
  --danger:      #ef4444;
  --shadow:      0 4px 24px rgba(21,42,84,0.10);
  --shadow-lg:   0 12px 40px rgba(21,42,84,0.14);
  --radius:      14px;
  --radius-lg:   20px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { overflow-x:hidden; -webkit-text-size-adjust:100%; scroll-behavior:smooth; font-size:17.5px; }
img, video, iframe { max-width:100%; }
body {
  font-family:'Outfit', sans-serif;
  font-size:1rem;
  line-height:1.65;
  background:var(--bg); color:var(--text);
  min-height:100vh; display:flex; flex-direction:column; overflow-x:hidden;
}

/* ===== HEADER ===== */
header {
  background:rgba(255,255,255,0.97);
  backdrop-filter:blur(14px);
  border-bottom:2px solid rgba(245,130,31,0.18);
  padding:0 2rem;
  padding-top:env(safe-area-inset-top);
  position:sticky; top:0; z-index:100;
  box-shadow:0 4px 24px rgba(21,42,84,0.08);
  overflow:visible;
}
.header-inner {
  max-width:1400px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  height:80px; gap:0.75rem;
  flex-wrap:nowrap;
}
.logo { display:flex; align-items:center; gap:10px; text-decoration:none; flex-shrink:0; }
.logo img {
  width:56px; height:56px; object-fit:contain; border-radius:14px;
  box-shadow:0 4px 14px rgba(21,42,84,0.16);
}
.logo-text {
  font-family:'Nunito', sans-serif; font-size:1.3rem; font-weight:900;
  color:var(--navy); line-height:1.1; white-space:nowrap;
}
.logo-text span { color:var(--orange); }
.logo-sub { display:block; font-size:0.72rem; font-weight:600; color:var(--text-2); margin-top:2px; letter-spacing:0.03em; white-space:nowrap; }

/* Desktop nav */
.header-nav {
  display:flex; gap:0.1rem; align-items:center;
  flex:1; justify-content:center;
  flex-wrap:nowrap; overflow:visible;
}
.header-nav > a,
.header-nav > .dropdown > a {
  color:var(--navy); text-decoration:none;
  font-size:1rem; font-weight:700; letter-spacing:0.01em;
  padding:0.5rem 0.85rem; border-radius:9px;
  transition:color 0.18s, background 0.18s;
  cursor:pointer; white-space:nowrap;
  display:inline-flex; align-items:center; gap:5px;
  flex-shrink:0;
}
.header-nav > a:hover,
.header-nav > .dropdown > a:hover {
  color:var(--orange); background:rgba(245,130,31,0.08);
}
.header-nav > a.active,
.header-nav > .dropdown > a.active {
  color:var(--navy); font-weight:800;
  background:linear-gradient(135deg,rgba(245,130,31,0.15),rgba(21,42,84,0.06));
  box-shadow:inset 0 0 0 1.5px rgba(245,130,31,0.35);
}

/* Hamburger */
.hamburger {
  display:none; flex-direction:column; gap:5px; cursor:pointer;
  padding:10px; border-radius:10px; transition:background 0.18s;
  min-width:44px; min-height:44px; align-items:center; justify-content:center;
  -webkit-tap-highlight-color:transparent; flex-shrink:0; background:none; border:none;
}
.hamburger:hover { background:rgba(245,130,31,0.1); }
.hamburger span {
  display:block; width:24px; height:2.5px;
  background:var(--navy); border-radius:2px; transition:all 0.3s;
}

/* Mobile menu */
.mobile-menu {
  display:none; flex-direction:column;
  background:var(--white); border-top:1px solid var(--border2);
  padding:1rem 1.25rem 1.25rem;
  box-shadow:0 8px 24px rgba(21,42,84,0.12);
  max-height:0; overflow:hidden; transition:max-height 0.35s ease;
}
.mobile-menu.open { display:flex; max-height:100vh; overflow-y:auto; }
.mobile-menu > a {
  padding:0.85rem 1rem; border-radius:10px; font-weight:700;
  color:var(--navy); text-decoration:none; font-size:1.05rem;
  display:flex; align-items:center; gap:0.6rem;
  transition:background 0.15s, color 0.15s;
}
.mobile-menu > a:hover, .mobile-menu > a.active { background:rgba(245,130,31,0.1); color:var(--orange); }
.mobile-section-label {
  font-size:0.8rem; font-weight:800; color:var(--gray); letter-spacing:0.08em;
  text-transform:uppercase; padding:0.85rem 1rem 0.3rem;
}

/* Login button */
.btn-login {
  background:linear-gradient(135deg,var(--navy),var(--navy-light)) !important;
  color:var(--white) !important; padding:9px 18px !important;
  border-radius:10px; font-size:0.9rem !important; font-weight:800 !important;
  box-shadow:0 4px 14px rgba(21,42,84,0.24); white-space:nowrap; flex-shrink:0;
  transition:transform 0.18s, box-shadow 0.18s; text-decoration:none; display:inline-flex; align-items:center;
}
.btn-login:hover { transform:translateY(-1px); box-shadow:0 6px 18px rgba(21,42,84,0.3) !important; }

/* Nav user block */
.nav-user {
  display:flex; align-items:center; gap:0.55rem; flex-shrink:0;
  padding:0.35rem 0.55rem;
  background:linear-gradient(135deg,rgba(21,42,84,0.04),rgba(245,130,31,0.06));
  border:1.5px solid rgba(245,130,31,0.25); border-radius:12px;
  max-width:280px;
}
.nav-user-avatar {
  width:36px; height:36px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg,var(--navy),var(--orange));
  color:white; font-size:0.88rem; font-weight:900;
  display:flex; align-items:center; justify-content:center;
  font-family:'Nunito', sans-serif;
}
.nav-user-info { min-width:0; }
.nav-user-name {
  font-size:0.88rem; font-weight:800; color:var(--navy);
  white-space:nowrap; max-width:130px; overflow:hidden; text-overflow:ellipsis; line-height:1.25;
}
.nav-user-group { font-size:0.82rem; color:var(--orange-dark); font-weight:700; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:130px; }
.btn-nav-logout {
  background:var(--white); border:1.5px solid var(--border);
  color:var(--navy); padding:0.35rem 0.75rem; border-radius:8px;
  font-size:0.85rem; font-weight:700; cursor:pointer;
  font-family:'Outfit', sans-serif; transition:all 0.18s; white-space:nowrap; flex-shrink:0;
}
.btn-nav-logout:hover { background:var(--danger); border-color:var(--danger); color:white; }

/* ===== CSS-ONLY + JS DROPDOWN ===== */
.dropdown { position:relative; }
.dropdown::before {
  content:''; position:absolute; top:100%; left:0; right:0; height:14px; z-index:9998;
}
.dropdown:hover > .dropdown-menu,
.dropdown-menu.open {
  display:block !important; opacity:1; visibility:visible; transform:translateY(0);
}
.dropdown-menu {
  display:none;
  position:absolute !important; top:calc(100% + 8px) !important; left:0 !important;
  background:var(--white) !important; border-radius:var(--radius-lg) !important;
  box-shadow:0 16px 48px rgba(21,42,84,0.18) !important;
  border:1.5px solid rgba(245,130,31,0.25) !important; min-width:280px !important; z-index:9999 !important;
  overflow:hidden; animation:dropIn 0.15s ease;
}
@keyframes dropIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.dropdown-menu a {
  display:flex; align-items:center; gap:0.7rem;
  padding:1rem 1.25rem; color:var(--navy); text-decoration:none;
  font-size:1.05rem; font-weight:700;
  border-bottom:1px solid rgba(21,42,84,0.05); transition:background 0.15s;
}
.dropdown-menu a:last-child { border-bottom:none; }
.dropdown-menu a:hover { background:rgba(245,130,31,0.08); color:var(--orange-dark); }
.dropdown-menu a.active { background:rgba(245,130,31,0.12); font-weight:800; }

.header-nav .dropdown > .dd-btn {
  color:var(--navy) !important; background:none !important; border:none !important;
  font-size:1rem !important; font-weight:700 !important; padding:0.45rem 0.7rem !important;
  border-radius:9px !important; cursor:pointer !important; white-space:nowrap !important;
  display:inline-flex !important; align-items:center !important;
  font-family:'Outfit', sans-serif !important; user-select:none;
}
.header-nav .dropdown > .dd-btn::after { content:' ▾'; font-size:0.75em; opacity:0.6; margin-left:2px; }
.header-nav .dropdown:hover > .dd-btn,
.header-nav .dropdown.active > .dd-btn { color:var(--orange) !important; background:rgba(245,130,31,0.08) !important; }

/* ===== SVG ICONS ===== */
.ico-svg { display:inline-block; vertical-align:middle; flex-shrink:0; }
.ico-wrap { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.ico-wrap--info { color:var(--navy); }
.ico-wrap--warn { color:var(--yellow); }
.dm-icon {
  display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; flex-shrink:0;
  background:rgba(245,130,31,0.1); border-radius:9px;
}
.dm-icon .ico-svg { stroke:var(--orange-dark); }
.page-header h1.has-ico, .page-header h1 { display:flex; align-items:center; justify-content:center; gap:0.7rem; flex-wrap:wrap; }
.page-header h1 .ico-svg { stroke:var(--orange-light); flex-shrink:0; }
.header-nav > a.has-ico { display:inline-flex; align-items:center; gap:0.45rem; }
.header-nav > a.has-ico .ico-svg { stroke:var(--navy); }
.mobile-menu > a.has-ico { display:flex; align-items:center; gap:0.55rem; }
.mobile-menu > a.has-ico .ico-svg { stroke:var(--orange-light); }
.footer-logo.has-ico { display:inline-flex; align-items:center; justify-content:center; gap:0.5rem; }
.stage-icon .ico-svg, .feature-icon .ico-svg { stroke:var(--navy); }
.author-avatar .ico-svg, .author-page-avatar .ico-svg { stroke:var(--navy); }
.field label.has-ico { display:flex; align-items:center; gap:0.4rem; }
.dropdown > a .ico-svg { stroke:var(--gray); margin-left:2px; vertical-align:-2px; }

/* ===== PAGE HEADER ===== */
.page-header {
  background:linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #6b3a12 100%);
  color:white; padding:3rem 2rem 2.5rem; text-align:center; position:relative; overflow:hidden;
}
.page-header::before {
  content:''; position:absolute; inset:0;
  background:radial-gradient(ellipse at 70% 50%, rgba(245,130,31,0.2) 0%, transparent 60%);
}
.page-header h1 { font-family:'Nunito',sans-serif; font-size:clamp(1.7rem,4vw,2.5rem); font-weight:900; position:relative; color:white; }
.page-header p { color:rgba(255,255,255,0.82); font-size:1.1rem; margin-top:0.5rem; position:relative; }

/* ===== MAIN ===== */
.main { flex:1; padding:2rem max(1.5rem, env(safe-area-inset-left)); max-width:1320px; margin:0 auto; width:100%; }

/* ===== SECTIONS ===== */
section { padding:5rem 2rem; }
.section-inner { max-width:1200px; margin:0 auto; }
.section-header { text-align:center; margin-bottom:3rem; }
.section-tag {
  display:inline-block; background:rgba(245,130,31,0.12);
  color:var(--orange-dark); font-size:0.85rem; font-weight:800;
  padding:0.4rem 1.1rem; border-radius:20px; letter-spacing:0.08em;
  text-transform:uppercase; margin-bottom:0.75rem;
  border:1px solid rgba(245,130,31,0.25);
}
.section-title { font-family:'Nunito',sans-serif; font-size:clamp(1.9rem,4vw,2.7rem); font-weight:900; color:var(--navy); margin-bottom:0.75rem; }
.section-desc { color:var(--text-2); font-size:1.05rem; max-width:600px; margin:0 auto; line-height:1.7; }

/* ===== BUTTONS ===== */
.btn-primary {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  background:linear-gradient(135deg,var(--orange),var(--orange-dark));
  color:white; padding:0.9rem 2rem; border-radius:12px;
  font-weight:800; font-size:1rem; text-decoration:none;
  box-shadow:0 6px 20px rgba(245,130,31,0.35);
  transition:transform 0.18s, box-shadow 0.18s; cursor:pointer; border:none;
  font-family:'Outfit',sans-serif; -webkit-tap-highlight-color:transparent;
}
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 10px 28px rgba(245,130,31,0.4); color:white; }

.btn-secondary {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  background:transparent; color:var(--navy);
  padding:0.9rem 2rem; border-radius:12px;
  font-weight:800; font-size:1rem; text-decoration:none;
  border:2px solid rgba(21,42,84,0.25);
  transition:all 0.18s; cursor:pointer; font-family:'Outfit',sans-serif;
  -webkit-tap-highlight-color:transparent;
}
.btn-secondary:hover { background:var(--navy); color:white; border-color:var(--navy); }

.btn-submit {
  background:linear-gradient(135deg,var(--navy),var(--navy-light));
  color:white; padding:0.9rem 2rem; border-radius:12px;
  font-weight:800; font-size:1.05rem; border:none; cursor:pointer;
  width:100%; font-family:'Outfit',sans-serif; transition:all 0.18s;
  box-shadow:0 6px 20px rgba(21,42,84,0.25); min-height:52px;
}
.btn-submit:hover { transform:translateY(-2px); box-shadow:0 10px 28px rgba(21,42,84,0.3); }
.btn-submit:disabled { opacity:0.6; cursor:not-allowed; transform:none; }

/* ===== STAGE / FEATURE CARDS ===== */
.stages-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:1.5rem; }
.stage-card {
  background:white; border-radius:var(--radius-lg); padding:2rem;
  box-shadow:var(--shadow); border:1px solid var(--border2);
  transition:transform 0.22s, box-shadow 0.22s; text-decoration:none; color:inherit; display:block;
}
.stage-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); }
.stage-card-top { display:flex; align-items:center; gap:1rem; margin-bottom:1.25rem; }
.stage-num {
  width:52px; height:52px; border-radius:14px; flex-shrink:0;
  background:linear-gradient(135deg,var(--navy),var(--orange));
  color:white; display:flex; align-items:center; justify-content:center;
  font-family:'Nunito',sans-serif; font-size:1.5rem; font-weight:900;
}
.stage-icon, .feature-icon {
  width:48px; height:48px; border-radius:12px;
  background:rgba(245,130,31,0.1);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:1.5rem;
}
.stage-card h3 { font-family:'Nunito',sans-serif; font-size:1.2rem; font-weight:900; color:var(--navy); margin-bottom:0.6rem; }
.stage-card p { color:var(--text-2); font-size:1rem; line-height:1.65; }

/* ===== TOPIC CARDS ===== */
.topics-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:1rem; }
.topic-card {
  background:white; border-radius:var(--radius); padding:1.25rem 1.5rem;
  display:flex; align-items:center; gap:1rem;
  box-shadow:0 2px 12px rgba(21,42,84,0.07);
  border:1.5px solid var(--border2); text-decoration:none; color:var(--text);
  transition:border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.topic-card:hover {
  border-color:var(--orange); box-shadow:0 6px 20px rgba(245,130,31,0.18);
  transform:translateY(-2px);
}
.topic-num {
  width:46px; height:46px; border-radius:12px; flex-shrink:0;
  background:linear-gradient(135deg,rgba(21,42,84,0.08),rgba(245,130,31,0.12));
  color:var(--navy); display:flex; align-items:center; justify-content:center;
  font-family:'Nunito',sans-serif; font-size:1.1rem; font-weight:900;
}
.topic-info h4 { font-size:1rem; font-weight:700; color:var(--navy); line-height:1.4; margin-bottom:2px; }
.topic-info p { font-size:0.93rem; color:var(--gray); }

/* ===== FILE LIST ===== */
.file-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:1rem; }
.file-item {
  background:white; border-radius:var(--radius); padding:1.25rem;
  display:flex; align-items:center; gap:1rem;
  box-shadow:0 2px 10px rgba(21,42,84,0.07);
  border:1.5px solid var(--border2);
  transition:border-color 0.18s, box-shadow 0.18s;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.file-item:hover { border-color:var(--orange); box-shadow:0 4px 16px rgba(245,130,31,0.15); }
.file-num {
  width:46px; height:46px; border-radius:12px; flex-shrink:0;
  background:linear-gradient(135deg,var(--orange),var(--orange-dark));
  color:white; display:flex; align-items:center; justify-content:center;
  font-family:'Nunito',sans-serif; font-size:1rem; font-weight:900;
}
.file-info { flex:1; min-width:0; }
.file-info h4 { font-size:1rem; font-weight:700; color:var(--navy); line-height:1.35; }
.file-info p { font-size:0.93rem; color:var(--gray); margin-top:2px; }
.file-badge {
  display:inline-block; background:rgba(245,130,31,0.1); color:var(--orange-dark);
  font-size:0.78rem; font-weight:800; padding:3px 9px; border-radius:6px;
  border:1px solid rgba(245,130,31,0.2); margin-top:4px; text-transform:uppercase; letter-spacing:0.05em;
}
.file-actions { display:flex; gap:0.5rem; margin-top:0.5rem; flex-wrap:wrap; }
.btn-view, .btn-dl {
  padding:0.5rem 1rem; border-radius:8px; font-size:0.9rem; font-weight:700;
  cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:5px;
  transition:all 0.15s; min-height:38px; border:none; font-family:'Outfit',sans-serif;
  -webkit-tap-highlight-color:transparent;
}
.btn-view { background:linear-gradient(135deg,var(--navy),var(--navy-light)); color:white; }
.btn-view:hover { opacity:0.9; }
.btn-dl { background:rgba(245,130,31,0.1); color:var(--orange-dark); border:1px solid rgba(245,130,31,0.25); }
.btn-dl:hover { background:var(--orange); color:white; }

/* ===== FORMS / AUTH ===== */
.auth-wrap { flex:1; display:flex; align-items:center; justify-content:center; padding:2rem; min-height:60vh; }
.auth-card {
  background:white; border-radius:var(--radius-lg); padding:2.5rem 2.25rem;
  box-shadow:var(--shadow-lg); border:1px solid var(--border2);
  width:100%; max-width:460px;
}
.auth-card h2 { font-family:'Nunito',sans-serif; font-size:1.7rem; font-weight:900; color:var(--navy); margin-bottom:0.4rem; }
.auth-card p { color:var(--text-2); margin-bottom:1.75rem; font-size:1rem; line-height:1.65; }
.field { margin-bottom:1.25rem; }
.field label { display:block; font-size:0.95rem; font-weight:700; color:var(--navy); margin-bottom:0.4rem; }
.field input, .field select, .field textarea {
  width:100%; padding:0.9rem 1rem; border-radius:10px;
  border:1.5px solid var(--border2); background:var(--bg);
  font-size:1rem; font-family:'Outfit',sans-serif; color:var(--text);
  transition:border-color 0.18s, box-shadow 0.18s; outline:none;
  -webkit-appearance:none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color:var(--orange); box-shadow:0 0 0 3px rgba(245,130,31,0.15);
}
.field .hint { font-size:0.85rem; color:var(--gray); margin-top:0.3rem; }
.field .error { font-size:0.85rem; color:var(--danger); margin-top:0.3rem; display:none; }
.field.has-error input, .field.has-error select { border-color:var(--danger); }
.field.has-error .error { display:block; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.auth-link { text-align:center; margin-top:1.25rem; font-size:0.97rem; color:var(--gray); }
.auth-link a { color:var(--orange-dark); font-weight:700; text-decoration:none; }
.auth-link a:hover { text-decoration:underline; }

/* ===== INFO / WARN BOX ===== */
.info-box {
  display:flex; gap:0.75rem; padding:1rem 1.25rem; border-radius:12px;
  background:rgba(21,42,84,0.05); border:1px solid rgba(21,42,84,0.12);
  font-size:1rem; line-height:1.65; margin:1rem 0;
}
.warn-box {
  display:flex; gap:0.75rem; padding:1rem 1.25rem; border-radius:12px;
  background:rgba(245,166,35,0.08); border:1px solid rgba(245,166,35,0.3);
  font-size:1rem; line-height:1.65; margin:1rem 0; color:var(--navy);
}

/* ===== MODAL (PDF) ===== */
.modal-overlay {
  display:none; position:fixed; inset:0; z-index:500;
  background:rgba(12,26,56,0.65); backdrop-filter:blur(4px);
  align-items:center; justify-content:center; padding:1rem;
}
.modal-overlay.open { display:flex; }
.modal {
  background:white; border-radius:var(--radius-lg); width:100%;
  max-width:1200px; max-height:95dvh; height:95dvh; display:flex; flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,0.3); overflow:hidden;
}
.modal-head {
  display:flex; align-items:center; justify-content:space-between;
  padding:1.1rem 1.5rem; border-bottom:1px solid var(--border2); flex-shrink:0;
}
.modal-head span#modalTitle { font-family:'Nunito',sans-serif; font-weight:800; font-size:1.1rem; color:var(--navy); }
.modal-head-actions { display:flex; gap:0.5rem; }
.modal-dl-btn {
  background:rgba(245,130,31,0.1); color:var(--orange-dark);
  border:1px solid rgba(245,130,31,0.25); padding:0.5rem 1rem;
  border-radius:8px; font-size:0.92rem; font-weight:700; text-decoration:none;
  display:inline-flex; align-items:center; gap:5px;
}
.modal-close {
  background:rgba(239,68,68,0.1); border:1px solid rgba(239,68,68,0.2);
  color:var(--danger); border-radius:8px; padding:0.45rem 0.65rem;
  cursor:pointer; font-size:1rem; line-height:1; display:flex; align-items:center; justify-content:center;
}
.modal-close:hover { background:var(--danger); color:white; }
.modal iframe { flex:1; border:none; min-height:0; width:100%; }

/* ===== TOAST ===== */
.toast {
  position:fixed; bottom:max(1.5rem, env(safe-area-inset-bottom)); left:50%;
  transform:translateX(-50%) translateY(80px); opacity:0;
  background:var(--navy); color:white; padding:0.9rem 1.5rem;
  border-radius:12px; font-size:1rem; font-weight:600;
  box-shadow:0 8px 24px rgba(21,42,84,0.25); z-index:600;
  transition:opacity 0.3s, transform 0.3s; max-width:90vw; text-align:center;
  pointer-events:none;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.toast.success { background:var(--success); }
.toast.error { background:var(--danger); }

/* ===== AUTHOR ===== */
.author-profile { max-width:860px; margin:0 auto; }
.author-profile-card { background:white; border-radius:24px; overflow:hidden; box-shadow:var(--shadow-lg); border:1px solid var(--border2); }
.author-profile-head {
  background:linear-gradient(135deg,var(--navy) 0%, var(--navy-light) 100%);
  padding:2.5rem 2rem; display:flex; align-items:center; gap:2rem; flex-wrap:wrap; position:relative; overflow:hidden;
}
.author-profile-head::before { content:''; position:absolute; inset:0; background:radial-gradient(ellipse at 80% 30%, rgba(245,130,31,0.2) 0%, transparent 55%); }
.author-page-avatar {
  width:120px; height:120px; border-radius:22px;
  background:linear-gradient(135deg,var(--orange),var(--orange-dark));
  overflow:hidden; box-shadow:0 0 0 6px rgba(245,130,31,0.25); flex-shrink:0; position:relative; z-index:1;
  display:flex; align-items:center; justify-content:center; color:white; font-family:'Nunito',sans-serif; font-weight:900; font-size:2.2rem;
}
.author-page-avatar img { width:100%; height:100%; object-fit:cover; }
.author-profile-name { font-family:'Nunito',sans-serif; font-size:1.6rem; font-weight:900; color:white; margin-bottom:0.4rem; position:relative; z-index:1; }
.author-profile-title { color:var(--orange-light); font-weight:600; font-size:1rem; margin-bottom:0.75rem; position:relative; z-index:1; }
.author-profile-tags { display:flex; flex-wrap:wrap; gap:0.5rem; position:relative; z-index:1; }
.author-profile-tags span {
  background:rgba(255,255,255,0.12); color:rgba(255,255,255,0.9);
  font-size:0.82rem; font-weight:600; padding:0.35rem 0.85rem; border-radius:20px;
  border:1px solid rgba(255,255,255,0.15);
}
.author-profile-body { padding:2rem; }
.author-profile-section { margin-bottom:1.75rem; }
.author-profile-section h3 {
  font-family:'Nunito',sans-serif; font-size:1.1rem; font-weight:900;
  color:var(--navy); margin-bottom:0.85rem; display:flex; align-items:center; gap:0.5rem;
}
.author-profile-section h3::before { content:''; display:block; width:4px; height:20px; background:var(--orange); border-radius:2px; }
.author-profile-section p { color:var(--text-2); font-size:1rem; line-height:1.7; }
.author-profile-stats { display:grid; grid-template-columns:repeat(4, 1fr); gap:1rem; margin-top:1.25rem; }
.author-profile-stat {
  text-align:center; padding:1.25rem; border-radius:14px;
  background:linear-gradient(135deg,rgba(21,42,84,0.04),rgba(245,130,31,0.06));
  border:1px solid rgba(245,130,31,0.15);
}
.author-profile-stat-num { font-family:'Nunito',sans-serif; font-size:1.75rem; font-weight:900; color:var(--orange-dark); }
.author-profile-stat-label { font-size:0.85rem; color:var(--gray); font-weight:600; margin-top:3px; }
.info-table { width:100%; border-collapse:collapse; }
.info-table tr { border-bottom:1px solid var(--border2); }
.info-table tr:last-child { border-bottom:none; }
.info-table td { padding:0.7rem 0; font-size:1rem; line-height:1.5; vertical-align:top; }
.info-table td:first-child { color:var(--gray); font-weight:700; font-size:0.9rem; text-transform:uppercase; letter-spacing:0.04em; white-space:nowrap; padding-right:1rem; }
.info-table td:last-child { color:var(--text); font-weight:500; }
.kontakt-grid { display:flex; flex-wrap:wrap; gap:0.75rem; }
.kontakt-item {
  display:flex; align-items:center; gap:0.6rem; background:var(--bg);
  border:1.5px solid var(--border2); border-radius:12px; padding:0.75rem 1.1rem;
  text-decoration:none; color:var(--navy); font-size:1rem; font-weight:700; transition:all 0.18s;
}
.kontakt-item:hover { border-color:var(--orange); background:rgba(245,130,31,0.06); color:var(--orange-dark); }

/* ===== HERO (index) ===== */
.hero {
  background:linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, #6b3a12 100%);
  padding:clamp(3rem, 7vw, 6rem) 2rem;
  position:relative; overflow:hidden; min-height:520px;
  display:flex; align-items:center;
}
.hero::before {
  content:''; position:absolute; inset:0; z-index:1;
  background:linear-gradient(135deg, rgba(21,42,84,0.90) 0%, rgba(21,42,84,0.62) 50%, rgba(107,58,18,0.40) 100%);
}
.hero-slide {
  position:absolute; inset:0; z-index:0;
  background-size:cover; background-position:center center; background-repeat:no-repeat;
  opacity:0; transition:opacity 1s ease;
}
.hero-slide.active { opacity:1; }
.hero-inner {
  max-width:1200px; width:100%; margin:0 auto;
  display:grid; grid-template-columns:1fr 1fr; gap:clamp(2rem, 5vw, 4rem);
  align-items:center; position:relative; z-index:2;
}
.hero-dots {
  position:absolute; bottom:1.25rem; left:50%; transform:translateX(-50%);
  display:flex; gap:8px; z-index:3;
}
.hero-dot {
  width:10px; height:10px; border-radius:50%; border:2px solid rgba(255,255,255,0.7);
  background:transparent; cursor:pointer; transition:all 0.25s; padding:0;
}
.hero-dot.active { background:white; border-color:white; transform:scale(1.2); }
.hero-arrow {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,0.18); border:1.5px solid rgba(255,255,255,0.3);
  color:white; font-size:2rem; line-height:1;
  width:46px; height:46px; border-radius:50%; cursor:pointer; z-index:3;
  display:flex; align-items:center; justify-content:center;
  transition:background 0.2s; backdrop-filter:blur(4px);
}
.hero-arrow:hover { background:rgba(255,255,255,0.35); }
.hero-arrow-prev { left:1rem; }
.hero-arrow-next { right:1rem; }
@media (max-width:480px) { .hero-arrow { display:none; } }
.hero-badge {
  display:inline-flex; align-items:center; gap:8px;
  background:rgba(245,130,31,0.15); border:1px solid rgba(245,130,31,0.4);
  border-radius:20px; padding:7px 18px; font-size:0.85rem; color:var(--orange-light);
  margin-bottom:1.5rem; letter-spacing:1.2px; text-transform:uppercase; font-weight:700;
}
.hero h1 {
  font-family:'Nunito',sans-serif; font-size:clamp(2rem, 5vw, 3.3rem);
  font-weight:900; line-height:1.15; margin-bottom:1.25rem; color:white;
}
.hero h1 span { color:var(--orange-light); }
.hero p { font-size:clamp(1rem, 2.5vw, 1.1rem); color:rgba(255,255,255,0.85); line-height:1.8; margin-bottom:2rem; }
.hero-btns { display:flex; gap:0.75rem; flex-wrap:wrap; }
.hero-btns .btn-primary, .hero-btns .btn-secondary { min-height:52px; }
.hero-btns .btn-secondary { border-color:rgba(255,255,255,0.3); color:white; }
.hero-btns .btn-secondary:hover { background:white; color:var(--navy); }
.hero-card {
  background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.15);
  border-radius:var(--radius-lg); padding:clamp(1.25rem, 3vw, 2rem); backdrop-filter:blur(10px);
}
.hero-card h3 { font-family:'Nunito',sans-serif; font-size:1.15rem; color:var(--orange-light); margin-bottom:1.25rem; text-align:center; font-weight:900; }
.stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:0.75rem; margin-bottom:1.25rem; }
.stat-item { background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); border-radius:12px; padding:0.9rem; text-align:center; }
.stat-num { font-family:'Nunito',sans-serif; font-size:clamp(1.4rem, 4vw, 2rem); font-weight:900; color:var(--orange-light); }
.stat-label { font-size:0.82rem; color:rgba(255,255,255,0.55); margin-top:4px; }
.topic-list { display:flex; flex-direction:column; gap:0.5rem; }
.topic-item {
  font-size:0.9rem; color:rgba(255,255,255,0.8); padding:8px 12px;
  background:rgba(255,255,255,0.05); border-radius:8px; border-left:2px solid var(--orange);
  line-height:1.4;
}

/* ===== SEARCH BAR + SINGLE-COLUMN LIST ===== */
.search-bar { position:relative; max-width:560px; }
.search-bar input {
  width:100%; padding:0.95rem 3rem 0.95rem 3.1rem; border-radius:14px;
  border:1.5px solid var(--border2); background:white; font-size:1rem;
  font-family:'Outfit',sans-serif; color:var(--text); outline:none;
  transition:border-color 0.18s, box-shadow 0.18s;
}
.search-bar input:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(245,130,31,0.15); }
.search-icon {
  position:absolute; left:1.05rem; top:50%; transform:translateY(-50%);
  color:var(--gray); pointer-events:none; display:flex;
}
.search-clear {
  position:absolute; right:0.65rem; top:50%; transform:translateY(-50%);
  width:30px; height:30px; border-radius:50%; border:none; background:var(--bg2);
  color:var(--gray); font-size:0.95rem; cursor:pointer;
  display:none; align-items:center; justify-content:center; transition:all 0.15s;
}
.search-clear.show { display:flex; }
.search-clear:hover { background:var(--danger); color:white; }
.search-count { font-size:0.88rem; color:var(--gray); margin:0.6rem 0 1.5rem; max-width:560px; text-align:right; }
.search-count strong { color:var(--orange-dark); font-weight:800; }

.list-single { display:flex; flex-direction:column; gap:0.85rem; }
.list-item {
  background:white; border-radius:var(--radius); padding:1.25rem 1.5rem;
  box-shadow:0 2px 10px rgba(21,42,84,0.06); border:1.5px solid var(--border2);
  transition:border-color 0.18s, box-shadow 0.18s;
}
.list-item:hover { border-color:var(--orange); box-shadow:0 4px 16px rgba(245,130,31,0.1); }
.list-item h4 { font-family:'Nunito',sans-serif; font-weight:800; font-size:1.05rem; color:var(--navy); margin-bottom:6px; line-height:1.4; }
.list-item p { color:var(--text-2); font-size:0.98rem; line-height:1.7; }

@media (max-width:480px) {
  .search-count { text-align:left; }
}

/* ===== TASKS LIST ===== */
.tasks-list { display:flex; flex-direction:column; gap:0.75rem; }
.task-item {
  background:white; border-radius:var(--radius); padding:1.1rem 1.35rem;
  display:flex; align-items:flex-start; gap:1rem;
  box-shadow:0 2px 8px rgba(21,42,84,0.06); border:1.5px solid var(--border2);
}
.task-num {
  width:36px; height:36px; border-radius:10px; flex-shrink:0;
  background:linear-gradient(135deg,var(--navy),var(--orange));
  color:white; display:flex; align-items:center; justify-content:center;
  font-family:'Nunito',sans-serif; font-size:0.88rem; font-weight:900;
}
.task-text { font-size:1.02rem; color:var(--text); line-height:1.65; padding-top:3px; }

/* ===== SINGLE PDF WRAP ===== */
.single-pdf-wrap iframe { width:100%; height:75dvh; border:none; border-radius:var(--radius); }

/* ===== FOOTER ===== */
footer {
  background:var(--navy-dark); color:rgba(255,255,255,0.65);
  text-align:center; padding:2rem 1.5rem;
  padding-bottom:max(2rem, env(safe-area-inset-bottom));
}
.footer-logo {
  font-family:'Nunito',sans-serif; font-size:1.25rem; font-weight:900;
  color:white; margin-bottom:0.5rem; display:inline-flex; align-items:center; gap:8px;
}
.footer-logo img { width:32px; height:32px; border-radius:8px; }
.footer-logo span { color:var(--orange-light); }
.footer-text { font-size:0.9rem; line-height:1.6; }
.footer-text a { color:var(--orange-light); text-decoration:none; }
.footer-text a:hover { text-decoration:underline; }
.footer-credit { font-size:0.82rem; color:rgba(255,255,255,0.4); margin-top:0.9rem; }
.footer-credit a { color:rgba(255,255,255,0.55); text-decoration:none; font-weight:600; }
.footer-credit a:hover { color:var(--orange-light); text-decoration:underline; }

/* ===== VIDEO GRID ===== */
.video-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:1.5rem; }
.video-card {
  background:white; border-radius:18px; border:1.5px solid var(--border2);
  box-shadow:0 3px 16px rgba(21,42,84,0.08); display:flex; flex-direction:column; overflow:hidden;
  transition:transform 0.22s, box-shadow 0.22s;
}
.video-card:hover { transform:translateY(-4px); box-shadow:0 10px 32px rgba(21,42,84,0.13); }
.video-thumb { position:relative; padding-top:56.25%; background:var(--navy-dark); overflow:hidden; }
.video-thumb iframe { position:absolute; inset:0; width:100%; height:100%; border:none; }
.video-num-badge {
  position:absolute; top:10px; left:10px; background:linear-gradient(135deg, var(--navy), var(--orange));
  color:white; font-family:'Nunito', sans-serif; font-size:0.75rem; font-weight:900;
  padding:3px 10px; border-radius:20px; z-index:2; pointer-events:none;
}
.video-info { padding:1rem 1.25rem 1.25rem; flex:1; display:flex; flex-direction:column; gap:0.5rem; }
.video-title { font-family:'Nunito', sans-serif; font-size:1.05rem; font-weight:900; color:var(--navy); line-height:1.4; }
.video-author { display:flex; align-items:center; gap:6px; font-size:0.9rem; color:var(--orange-dark); font-weight:700; }
.video-author::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--orange); flex-shrink:0; }
.video-link { display:inline-flex; align-items:center; gap:5px; font-size:0.87rem; font-weight:700; color:var(--gray); text-decoration:none; margin-top:auto; padding-top:0.5rem; transition:color 0.15s; }
.video-link:hover { color:var(--orange-dark); }

/* ===== TEST STYLES ===== */
.test-wrap { max-width:800px; margin:0 auto; }
.test-progress { background:var(--bg2); border-radius:8px; height:8px; margin-bottom:2rem; overflow:hidden; }
.test-progress-bar { height:100%; background:linear-gradient(90deg,var(--orange),var(--orange-dark)); border-radius:8px; transition:width 0.4s; }
.test-timer {
  display:inline-flex; align-items:center; gap:6px; font-family:'Nunito',sans-serif;
  font-size:1.25rem; font-weight:900; color:var(--navy); background:rgba(21,42,84,0.06);
  padding:0.5rem 1.25rem; border-radius:10px; border:1px solid var(--border);
}
.test-timer.urgent { color:var(--danger); background:rgba(239,68,68,0.08); border-color:rgba(239,68,68,0.25); animation:pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.7} }
.test-question-card { background:white; border-radius:var(--radius-lg); padding:2rem; box-shadow:var(--shadow); border:1px solid var(--border2); margin-bottom:1.5rem; }
.test-q-num { font-size:0.9rem; color:var(--gray); font-weight:700; margin-bottom:0.75rem; text-transform:uppercase; letter-spacing:0.05em; }
.test-q-text { font-size:1.12rem; font-weight:600; color:var(--navy); line-height:1.65; margin-bottom:1.5rem; }
.test-options { display:grid; gap:0.75rem; }
.test-option {
  display:flex; align-items:center; gap:1rem; padding:1rem 1.25rem;
  border-radius:12px; border:2px solid var(--border2); cursor:pointer; transition:all 0.18s; background:white;
  font-size:1.02rem; color:var(--navy); font-weight:600; -webkit-tap-highlight-color:transparent;
  text-align:left; width:100%; font-family:'Outfit',sans-serif;
}
.test-option:hover { border-color:var(--orange); background:rgba(245,130,31,0.05); }
.test-option.selected { border-color:var(--orange); background:rgba(245,130,31,0.1); color:var(--orange-dark); }
.test-option.correct { border-color:var(--success); background:rgba(34,197,94,0.1); color:#16a34a; }
.test-option.wrong { border-color:var(--danger); background:rgba(239,68,68,0.08); color:var(--danger); }
.option-letter {
  width:38px; height:38px; border-radius:10px; flex-shrink:0;
  background:rgba(21,42,84,0.07); display:flex; align-items:center; justify-content:center;
  font-family:'Nunito',sans-serif; font-weight:900; font-size:1rem; color:var(--navy);
}
.test-option.selected .option-letter { background:var(--orange); color:white; }
.test-result-card { background:white; border-radius:var(--radius-lg); padding:3rem 2rem; text-align:center; box-shadow:var(--shadow-lg); border:1px solid var(--border2); }
.test-result-score { font-family:'Nunito',sans-serif; font-size:4rem; font-weight:900; color:var(--orange-dark); line-height:1; }
.test-result-label { font-size:1.15rem; color:var(--text-2); margin:0.5rem 0 2rem; }
.test-result-detail { display:grid; grid-template-columns:repeat(4, 1fr); gap:1rem; margin-bottom:2rem; }
.test-result-item { padding:1rem; background:var(--bg); border-radius:12px; }
.test-result-item-num { font-family:'Nunito',sans-serif; font-size:1.5rem; font-weight:900; color:var(--navy); }
.test-result-item-label { font-size:0.88rem; color:var(--gray); font-weight:600; }
.q-indicator { display:flex; flex-wrap:wrap; gap:6px; margin:1.5rem 0; }
.q-dot { width:34px; height:34px; border-radius:9px; background:var(--bg2); color:var(--text-2); display:flex; align-items:center; justify-content:center; font-size:12.5px; font-weight:700; border:none; font-family:'Outfit',sans-serif; cursor:pointer; }
.q-dot.answered { background:var(--orange); color:#fff; }
.q-dot.current { outline:2px solid var(--navy); outline-offset:2px; }

/* ===== LEADERBOARD ===== */
.lb-wrap { background:white; border-radius:20px; overflow:hidden; box-shadow:0 4px 24px rgba(21,42,84,0.09); border:1.5px solid var(--border2); max-width:900px; margin:0 auto; }
.lb-head { display:grid; grid-template-columns:56px 1fr 90px 100px 90px 110px; background:linear-gradient(135deg,var(--navy-dark),var(--navy)); padding:1rem 1.5rem; gap:1rem; }
.lb-head > div { color:rgba(255,255,255,0.75); font-size:0.85rem; font-weight:800; text-transform:uppercase; letter-spacing:0.07em; }
.lb-row { display:grid; grid-template-columns:56px 1fr 90px 100px 90px 110px; padding:0.95rem 1.5rem; gap:1rem; align-items:center; border-bottom:1px solid var(--border2); transition:background 0.15s; }
.lb-row:last-child { border-bottom:none; }
.lb-row:hover { background:rgba(245,130,31,0.04); }
.lb-row.top1 { background:linear-gradient(135deg, rgba(245,197,26,0.07), rgba(245,197,26,0.02)); }
.lb-row.top2 { background:linear-gradient(135deg, rgba(180,180,180,0.07), rgba(180,180,180,0.02)); }
.lb-row.top3 { background:linear-gradient(135deg, rgba(180,100,30,0.07), rgba(180,100,30,0.02)); }
.lb-rank-badge { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-family:'Nunito', sans-serif; font-size:1rem; font-weight:900; background:var(--bg2); color:var(--navy); }
.rank-1 .lb-rank-badge { background:linear-gradient(135deg,#f5c51a,#e6a800); color:white; font-size:1.2rem; }
.rank-2 .lb-rank-badge { background:linear-gradient(135deg,#b0b8c8,#8a96a8); color:white; font-size:1.2rem; }
.rank-3 .lb-rank-badge { background:linear-gradient(135deg,#cd7f32,#a0632a); color:white; font-size:1.2rem; }
.lb-name-text { font-weight:700; color:var(--navy); font-size:1rem; line-height:1.3; }
.lb-group-text { font-size:0.85rem; color:var(--gray); margin-top:2px; }
.lb-score-val { font-family:'Nunito', sans-serif; font-weight:900; font-size:1rem; color:var(--navy); }
.lb-pct-bar { display:flex; flex-direction:column; gap:3px; }
.lb-pct-val { font-family:'Nunito', sans-serif; font-weight:900; font-size:0.95rem; }
.pct-high { color:#16a34a; }
.pct-mid { color:var(--orange-dark); }
.pct-low { color:var(--yellow); }
.lb-bar { height:4px; border-radius:2px; background:var(--bg2); overflow:hidden; }
.lb-bar-fill { height:100%; border-radius:2px; transition:width 0.6s ease; }
.fill-high { background:linear-gradient(90deg,#22c55e,#16a34a); }
.fill-mid { background:linear-gradient(90deg,var(--orange),var(--orange-dark)); }
.fill-low { background:linear-gradient(90deg,var(--yellow),#d97706); }
.lb-tests-val { font-size:0.9rem; color:var(--gray); }
.lb-loading { display:flex; flex-direction:column; align-items:center; padding:3rem; color:var(--gray); gap:1rem; font-size:0.95rem; }
.lb-spinner { width:36px; height:36px; border:3px solid var(--border2); border-top-color:var(--orange); border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.lb-empty-msg { text-align:center; padding:3rem; color:var(--gray); font-size:1rem; }

@media (max-width:768px) {
  .lb-head { grid-template-columns:44px 1fr 80px 70px; }
  .lb-row { grid-template-columns:44px 1fr 80px 70px; }
  .lb-head > div:nth-child(4), .lb-head > div:nth-child(6),
  .lb-row > div:nth-child(4), .lb-row > div:nth-child(6) { display:none; }
}
@media (max-width:480px) {
  .lb-head { grid-template-columns:40px 1fr 75px; }
  .lb-row { grid-template-columns:40px 1fr 75px; }
  .lb-head > div:nth-child(3), .lb-row > div:nth-child(3) { display:none; }
  .lb-rank-badge { width:30px; height:30px; font-size:0.9rem; }
}

/* ===== TOUCH HELPERS ===== */
.btn-primary, .btn-secondary, .btn-submit, .btn-login, .btn-nav-logout,
.hamburger, .topic-card, .file-item, .test-option { -webkit-tap-highlight-color:transparent; }

/* ===== RESPONSIVE ===== */
@media (max-width:1280px) {
  .header-nav > a, .header-nav > .dropdown > a { padding:0.45rem 0.7rem; font-size:0.95rem; }
  .logo-text { font-size:1.2rem; }
  .nav-user-name { max-width:110px; }
}
@media (max-width:1100px) {
  .header-nav > a, .header-nav > .dropdown > a { padding:0.38rem 0.55rem; font-size:0.9rem; }
  .logo-text { font-size:1.1rem; }
  .logo img { width:48px; height:48px; }
}
@media (max-width:1024px) {
  .header-nav { display:none; }
  .hamburger { display:flex; }
  #navUserBlock { flex-shrink:0; }
  .nav-user { padding:0.3rem 0.45rem; gap:0.4rem; }
  .nav-user-info { display:none; }
  .nav-user .btn-nav-logout { display:none; }
  .btn-login { font-size:0.85rem !important; padding:8px 14px !important; }
  .hero-inner { grid-template-columns:1fr; gap:2rem; }
  .hero-card { max-width:520px; margin:0 auto; width:100%; }
  .stages-grid { grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); }
  .topics-grid { grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); }
  .file-list { grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); }
  .video-grid { grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width:768px) {
  header { padding:0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left)); }
  .header-inner { height:72px; gap:0.5rem; }
  .logo img { width:48px; height:48px; }
  .logo-text { font-size:1.1rem; }
  .main { padding:1.25rem max(1rem, env(safe-area-inset-left)); }
  section { padding:3rem 1rem; }
  .section-title { font-size:clamp(1.6rem, 5vw, 2.1rem); }
  .page-header { padding:2rem 1rem 1.75rem; }
  .page-header h1 { font-size:clamp(1.5rem, 5vw, 2rem); }
  .hero { min-height:auto; padding:2.5rem 1rem 3rem; }
  .hero-card { display:none; }
  .hero-btns { flex-direction:column; width:100%; }
  .hero-btns .btn-primary, .hero-btns .btn-secondary { width:100%; }
  .stages-grid, .topics-grid, .file-list, .video-grid { grid-template-columns:1fr; gap:1rem; }
  .stage-card { padding:1.5rem 1.25rem; }
  .topic-card { padding:1rem 1.25rem; }
  .file-item { flex-wrap:wrap; }
  .file-actions { width:100%; margin-top:0.5rem; padding-top:0.5rem; border-top:1px solid var(--border2); }
  .author-profile-head { flex-direction:column; text-align:center; padding:2rem 1.25rem; }
  .author-profile-stats { grid-template-columns:repeat(2,1fr); }
  .author-profile-body { padding:1.5rem 1.25rem; }
  .modal { height:100dvh; max-height:100dvh; border-radius:0; max-width:100%; }
  .single-pdf-wrap iframe { height:65dvh; }
  .toast { left:1rem; right:1rem; bottom:max(1rem, env(safe-area-inset-bottom)); max-width:none; transform:translateY(80px); }
  .toast.show { transform:translateY(0); }
  .auth-wrap { padding:1rem; }
  .auth-card { padding:2rem 1.25rem; }
  .field-row { grid-template-columns:1fr; }
  .test-result-detail { grid-template-columns:repeat(2, 1fr); gap:0.5rem; }
  .test-option { padding:0.9rem 1rem; }
}
@media (max-width:480px) {
  .header-inner { height:64px; }
  .logo img { width:42px; height:42px; border-radius:10px; }
  .logo-sub { display:none; }
  .logo-text { font-size:1rem; }
  .logo { gap:8px; }
  .nav-user-avatar { width:32px; height:32px; font-size:0.8rem; }
  .nav-user-name { max-width:75px; font-size:0.78rem; }
  .btn-nav-logout { padding:0.3rem 0.5rem; font-size:0.75rem; }
  .file-num, .topic-num { width:40px; height:40px; font-size:0.88rem; border-radius:10px; }
  .topic-info h4 { font-size:0.95rem; }
  .btn-view, .btn-dl { font-size:0.82rem; padding:0.4rem 0.75rem; min-height:38px; }
  .stage-num { width:46px; height:46px; font-size:1.2rem; }
  .test-result-score { font-size:3rem; }
  .test-result-detail { grid-template-columns:1fr 1fr; }
  .test-option { font-size:0.95rem; }
  .option-letter { width:34px; height:34px; font-size:0.9rem; }
  .author-profile-stats { grid-template-columns:1fr 1fr; }
}
@media (max-width:360px) {
  .logo-text { font-size:0.95rem; }
  .nav-user-name { display:none; }
  .nav-user { padding:0.28rem; }
  .hero h1 { font-size:1.7rem; }
  .section-tag { font-size:0.75rem; padding:0.3rem 0.85rem; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration:0.01ms !important; transition-duration:0.01ms !important; }
}
