/* 4QLS site styles — pastel look carried over from the original static site.
   Component classes: .section .eyebrow .hero .card .card-grid .btn(.btn-primary/.btn-ghost/.btn-sm/.btn-danger)
   .form .field .table .alert(-success/-error/-info) .badge(-green/-pink/-gray) .stats .stat .dash .dash-nav .progress .muted .pill */
:root {
  --primary: #7fb3ff;
  --accent: #ffb3c6;
  --accent-2: #b2f2bb;
  --accent-3: #ffeaae;
  --bg: #fdfcff;
  --text: #1f2933;
  --muted: #6b7280;
  --card-bg: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --indigo: #6366f1;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #e3f2ff 0, #fdfcff 40%, #ffe6f2 100%) fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
p a, .prose a, td a, .link { color: var(--indigo); }
p a:hover, .prose a:hover, td a:hover, .link:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin-bottom: 12px; }
h2 { font-size: 1.45rem; line-height: 1.25; margin-bottom: 10px; }
h3 { font-size: 1.1rem; margin-bottom: 6px; }
p { margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.gradient-text { background: linear-gradient(135deg, #6c8cff, #ff7eb3); -webkit-background-clip: text; background-clip: text; color: transparent; }

.page-wrapper { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; }
.page-wrapper.wide { max-width: 1280px; }

/* Header + nav */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; position: relative; z-index: 20; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.03em; }
.logo small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); letter-spacing: 0; }
.logo-mark { width: 40px; height: 40px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 0.95rem; box-shadow: var(--shadow-soft); }
.main-nav { display: flex; gap: 6px; font-size: 0.95rem; align-items: center; }
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; transition: background .2s; }
.nav-item:hover > .nav-link, .nav-item.active > .nav-link, .nav-item:focus-within > .nav-link { background: rgba(255,255,255,.85); }
.caret { font-size: 0.7rem; opacity: .6; }
.menu { display: none; position: absolute; right: 0; top: 100%; padding-top: 8px; min-width: 260px; }
.menu::before { content: ""; position: absolute; inset: 8px 0 0 0; background: #fff; border-radius: 14px; box-shadow: var(--shadow-soft); border: 1px solid var(--line); z-index: -1; }
.menu a { display: block; padding: 9px 14px; font-size: 0.9rem; border-radius: 10px; margin: 0 4px; }
.menu a:first-child { margin-top: 6px; }
.menu a:last-child { margin-bottom: 6px; }
.menu a:hover { background: #f1f5ff; }
.menu a span { display: block; color: var(--muted); font-size: 0.8rem; }
.menu .menu-all { color: var(--indigo); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.nav-item.has-menu:hover .menu, .nav-item.has-menu:focus-within .menu, .nav-item.open .menu { display: block; }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-radius: 16px; box-shadow: var(--shadow-soft); padding: 8px; margin-top: 8px; }
  .main-nav.open { display: flex; }
  .menu { position: static; display: block; padding: 0 0 6px 12px; min-width: 0; }
  .menu::before { display: none; }
  .nav-item.has-menu:hover .menu { display: block; }
  .logo small { display: none; }
}

/* Sections */
.section { margin: 48px 0; }
.section:first-child { margin-top: 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); margin-bottom: 10px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero p.lead { font-size: 1.05rem; color: var(--muted); max-width: 52ch; }
.hero-img { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-soft); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }

.card { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 22px; border: 1px solid var(--line); }
.card.tinted { background: linear-gradient(145deg, #e3f2ff, #ffe3f3); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.bullet-list { list-style: none; display: grid; gap: 8px; font-size: .95rem; margin: 8px 0; }
.bullet-list li { padding-left: 16px; position: relative; }
.bullet-list li::before { content: "•"; position: absolute; left: 0; color: var(--indigo); }
.prose p, .prose ul, .prose ol { margin-bottom: 12px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose h2, .prose h3 { margin-top: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .92rem; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: transform .15s, box-shadow .15s; color: var(--text); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15,23,42,.08); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border: 0; }
.btn-ghost { background: transparent; }
.btn-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Forms */
.form { display: grid; gap: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #d6dbe6; background: #fff; font: inherit; font-size: .95rem; color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.checkbox input { margin-top: 4px; }
.auth-box { max-width: 440px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; background: #eef2ff; padding: 4px; border-radius: 999px; margin-bottom: 18px; }
.tabs a { flex: 1; text-align: center; padding: 7px 10px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.tabs a.active { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(15,23,42,.08); }

/* Alerts, badges */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: .92rem; border: 1px solid; }
.alert-success { background: #ecfdf3; border-color: #b2f2bb; color: #14532d; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef2ff; color: #3730a3; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-pink { background: #ffe4ef; color: #9d174d; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-yellow { background: #fef9c3; color: #854d0e; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* Dashboards */
.dash { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-nav { position: sticky; top: 16px; display: grid; gap: 2px; padding: 12px; }
.dash-nav .dash-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 10px; }
.dash-nav a { padding: 8px 12px; border-radius: 10px; font-size: .92rem; }
.dash-nav a:hover { background: #f1f5ff; }
.dash-nav a.active { background: linear-gradient(135deg, #e3f2ff, #ffe3f3); font-weight: 600; }
@media (max-width: 820px) { .dash { grid-template-columns: 1fr; } .dash-nav { position: static; grid-auto-flow: column; overflow-x: auto; } .dash-nav .dash-title { display: none; } .dash-nav a { white-space: nowrap; } }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.stat { background: #fff; border-radius: 16px; padding: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.stat .label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.7rem; font-weight: 700; line-height: 1.2; margin-top: 4px; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.progress { height: 8px; border-radius: 999px; background: #eef2ff; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* Course bits */
.course-card { display: flex; flex-direction: column; gap: 8px; }
.course-card .code { font-weight: 800; font-size: .8rem; letter-spacing: .06em; color: var(--indigo); }
.course-card .actions { margin-top: auto; padding-top: 8px; }
.lesson-list { list-style: none; display: grid; gap: 8px; }
.lesson-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.lesson-list .num { font-weight: 700; color: var(--indigo); min-width: 28px; }
.lesson-list .done { color: #16a34a; font-weight: 700; }
.video-frame { position: relative; padding-top: 56.25%; border-radius: 18px; overflow: hidden; background: #0f172a; box-shadow: var(--shadow-soft); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.quarters { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.quarter { padding: 16px; border-radius: 16px; background: #fff7ed; border: 1px solid rgba(248,180,139,.7); font-size: .92rem; }
.quarter:nth-child(2) { background: #eff6ff; border-color: #bfdbfe; }
.quarter:nth-child(3) { background: #f0fdf4; border-color: #b2f2bb; }
.quarter:nth-child(4) { background: #fdf2f8; border-color: #fbcfe8; }
.quarter span { display: block; font-weight: 700; margin-bottom: 2px; }

.site-footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.site-footer a:hover { color: var(--text); }
