/* LaxIT design system - single stylesheet, no external/CDN dependency.
   Dark theme: black base, blue/cyan-to-violet gradient accents, white text. */

:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --ink-soft: #cbd5e1;
  --muted: #8b93a8;
  --line: #232b45;
  --bg: #05070d;
  --surface: #0d1220;
  --surface-2: #141b31;
  --primary: #38bdf8;
  --primary-dark: #0ea5e9;
  --accent: #8b5cf6;
  --gradient-brand: linear-gradient(135deg, #22d3ee, #3b82f6, #8b5cf6);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 45px rgba(0, 0, 0, 0.55);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 760px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- Wordmark logo: "Lax" solid + "IT" gradient ---------- */
.laxit-logo { display: inline-flex; align-items: baseline; font-weight: 800; letter-spacing: -0.02em; font-family: var(--font); color: var(--ink); }
.laxit-logo__accent { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.laxit-logo--md { font-size: 1.4rem; }
.laxit-logo--lg { font-size: 2.1rem; }
.laxit-logo--sm { font-size: 1.1rem; }
.laxit-logo--on-dark { color: #f8fafc; }

/* ---------- Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(5, 7, 13, 0.85); border-bottom: 1px solid var(--line); }
/* backdrop-filter on an ancestor becomes the containing block for any
   position:fixed descendant (the mobile nav drawer below), which would
   clip the drawer to the header's own ~72px height instead of the full
   screen - so the blur only applies once nothing inside the header needs
   position:fixed (see the max-width:720px block further down). */
@media (min-width: 721px) {
  .site-header { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; gap: 10px 16px; }
.nav-collapse { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.nav-links { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.nav-links a { color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.nav-toggle:hover { border-color: var(--primary); color: var(--primary); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 55; }
.nav-backdrop.open { opacity: 1; pointer-events: auto; }
body.nav-open-lock { overflow: hidden; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; order: 2; position: relative; z-index: 70; }
  .nav-collapse {
    display: flex;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(82vw, 320px);
    background: var(--surface);
    border-left: 1px solid var(--line);
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
    box-shadow: -24px 0 48px rgba(0, 0, 0, .55);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 96px 24px 32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    z-index: 60;
  }
  .nav-collapse::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-brand);
  }
  .nav-collapse.open { transform: translateX(0); }
  .nav-links, .nav-cta { flex-direction: column; align-items: stretch; gap: 6px; }
  .nav-links a, .nav-cta a, .nav-cta form { width: 100%; }
  .nav-links a, .nav-cta a { padding: 12px 14px; border-radius: 10px; }
  .nav-links a:hover { background: rgba(56, 189, 248, .12); }
  .nav-cta { margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
  .nav-cta .btn { width: 100%; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 8px 26px rgba(56, 189, 248, .3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(56, 189, 248, .45); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 64px; background: radial-gradient(circle at 80% -10%, rgba(139, 92, 246, .25), transparent 45%), radial-gradient(circle at 0% 10%, rgba(56, 189, 248, .18), transparent 40%); }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 2.75rem; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; }
.hero-stats div span { color: var(--muted); font-size: .9rem; }
.hero-visual { background: var(--gradient-brand); border-radius: 24px; padding: 32px; color: #fff; box-shadow: 0 25px 60px rgba(59, 130, 246, .25), var(--shadow); }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
}

/* ---------- Section headings ---------- */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--primary); }
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--muted); }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: 22px; }

.course-card { display: flex; flex-direction: column; height: 100%; transition: transform .15s ease, border-color .15s ease; }
.course-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.course-card__thumb { aspect-ratio: 16/9; background: var(--surface-2); position: relative; }
.course-card__thumb img { width: 100%; height: 100%; object-fit: contain; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-level { background: rgba(139, 92, 246, .16); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, .3); }
.badge-cat { background: rgba(56, 189, 248, .16); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .3); position: absolute; top: 10px; left: 10px; }
/* Below-the-image info badge (course cards) - a category overlaid on the thumbnail hides
   whatever the admin-uploaded artwork already shows there, so this variant sits in the
   card body as plain inline text instead of floating on top of the image. */
.badge-cat--inline { position: static; }
.course-card__body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card__title { font-size: 1.05rem; font-weight: 700; }
.course-card__meta { color: var(--muted); font-size: .85rem; }
.course-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price { font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.price small { font-weight: 500; color: var(--muted); font-size: .75rem; }

.feature-card { text-align: left; }
.feature-card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gradient-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px; }

.testimonial-card { padding: 22px; }
.testimonial-card .stars { color: #fbbf24; letter-spacing: 2px; margin-bottom: 8px; }
.testimonial-card__author { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.avatar-circle { width: 38px; height: 38px; border-radius: 50%; background: var(--gradient-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }

.founder-card { display: flex; gap: 32px; align-items: flex-start; padding: 32px; }
.founder-photo { width: 180px; height: 220px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; box-shadow: 0 0 0 3px rgba(56, 189, 248, .18), var(--shadow); }
@media (max-width: 640px) { .founder-card { flex-direction: column; align-items: center; text-align: center; } .founder-photo { width: 160px; height: 196px; } }

.pricing-card { text-align: center; padding: 32px 24px; position: relative; }
.pricing-card--featured { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 189, 248, .18), var(--shadow); }
.pricing-card .amount { font-size: 2.4rem; font-weight: 800; margin: 10px 0; }
.pricing-card .amount span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.pricing-card ul { list-style: none; padding: 0; margin: 20px 0; text-align: left; }
.pricing-card ul li { padding: 6px 0; color: var(--ink-soft); }
.pricing-card ul li:before { content: "✓ "; color: var(--success); font-weight: 700; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; font-family: inherit; background: var(--surface-2); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 189, 248, .22); }
.field-error { color: #fca5a5; font-size: .82rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
@media (min-width: 641px) and (max-width: 780px) { .form-row-3 { grid-template-columns: 1fr 1fr; } }
.auth-shell { min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; padding: 48px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 440px; padding: 36px; }
.auth-card h1 { font-size: 1.5rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 24px; }

/* ---------- Quill editor (course description), reskinned for the dark theme ---------- */
.quill-editor { background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.quill-editor .ql-toolbar.ql-snow { border: 1px solid var(--line); border-bottom: none; border-radius: 10px 10px 0 0; background: var(--surface); }
.quill-editor .ql-container.ql-snow { border: 1px solid var(--line); border-radius: 0 0 10px 10px; font-family: inherit; font-size: .95rem; min-height: 160px; }
.quill-editor .ql-editor { color: var(--ink); min-height: 160px; }
.quill-editor .ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
.quill-editor .ql-snow .ql-stroke { stroke: var(--ink-soft); }
.quill-editor .ql-snow .ql-fill, .quill-editor .ql-snow .ql-stroke.ql-fill { fill: var(--ink-soft); }
.quill-editor .ql-snow .ql-picker { color: var(--ink-soft); }
.quill-editor .ql-snow .ql-picker-options { background: var(--surface); border-color: var(--line) !important; }
.quill-editor .ql-snow.ql-toolbar button:hover, .quill-editor .ql-snow .ql-toolbar button:hover,
.quill-editor .ql-snow.ql-toolbar button.ql-active, .quill-editor .ql-snow .ql-toolbar button.ql-active {
  color: var(--primary);
}
.quill-editor .ql-snow.ql-toolbar button:hover .ql-stroke, .quill-editor .ql-snow .ql-toolbar button:hover .ql-stroke,
.quill-editor .ql-snow.ql-toolbar button.ql-active .ql-stroke, .quill-editor .ql-snow .ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--primary);
}
.quill-editor .ql-snow.ql-toolbar button:hover .ql-fill, .quill-editor .ql-snow .ql-toolbar button:hover .ql-fill,
.quill-editor .ql-snow.ql-toolbar button.ql-active .ql-fill, .quill-editor .ql-snow .ql-toolbar button.ql-active .ql-fill {
  fill: var(--primary);
}

/* ---------- Rich-text course description, rendered on the public course page ---------- */
.course-description { color: var(--ink-soft); line-height: 1.7; }
.course-description p { margin: 0 0 1em; }
.course-description h1, .course-description h2, .course-description h3 { color: var(--ink); margin: 1.2em 0 .5em; }
.course-description ul, .course-description ol { margin: 0 0 1em; padding-left: 1.4em; }
.course-description li { margin-bottom: .35em; }
.course-description blockquote { margin: 0 0 1em; padding: 8px 16px; border-left: 3px solid var(--primary); color: var(--muted); }
.course-description pre, .course-description code { background: var(--surface-2); border-radius: 6px; }
.course-description pre { padding: 12px 14px; overflow-x: auto; }
.course-description code { padding: 2px 5px; font-size: .88em; }
.course-description a { text-decoration: underline; }

/* ---------- Blog ---------- */
.blog-badge { background: rgba(56, 189, 248, .16); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .3); }
.blog-card { display: flex; flex-direction: column; height: 100%; transition: transform .15s ease, border-color .15s ease; }
.blog-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.blog-card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card__title { font-size: 1.15rem; font-weight: 700; line-height: 1.35; margin: 0; }
.blog-card__excerpt { font-size: .9rem; line-height: 1.6; flex: 1; margin: 0; }
.blog-card__meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .78rem; }
.blog-card__view { margin-top: 6px; align-self: flex-start; }

.blog-breadcrumb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 28px; }
.blog-breadcrumb a { color: var(--muted); }
.blog-breadcrumb a:hover { color: var(--primary); text-decoration: none; }

.blog-content { color: var(--ink-soft); line-height: 1.8; font-size: 1.02rem; }
.blog-content p { margin: 0 0 1.1em; }
.blog-content h2 { color: var(--ink); font-size: 1.5rem; margin: 1.6em 0 .6em; padding-top: .3em; border-top: 1px solid var(--line); }
.blog-content h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.blog-content h3 { color: var(--ink); font-size: 1.15rem; margin: 1.3em 0 .5em; }
.blog-content ul, .blog-content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.blog-content li { margin-bottom: .45em; }
.blog-content a { text-decoration: underline; }
.blog-content strong { color: var(--ink); }
.blog-cta { margin-top: 44px; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 189, 248, .12), var(--shadow); }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .9rem; border: 1px solid transparent; }
.alert-success { background: rgba(34, 197, 94, .12); color: #86efac; border-color: rgba(34, 197, 94, .3); }
.alert-error { background: rgba(239, 68, 68, .12); color: #fca5a5; border-color: rgba(239, 68, 68, .3); }
.alert-info { background: rgba(56, 189, 248, .12); color: #7dd3fc; border-color: rgba(56, 189, 248, .3); }

/* ---------- Footer ---------- */
.site-footer { background: #000000; color: var(--ink-soft); padding: 56px 0 28px; margin-top: 40px; border-top: 1px solid var(--line); }
.site-footer .grid-4 { margin-bottom: 36px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--primary); }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Dashboard / app shell (student) ---------- */
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 72px); }
.app-sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 24px 16px; }
.app-sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--ink-soft); font-weight: 500; margin-bottom: 4px; }
.app-sidebar a:hover, .app-sidebar a.active { background: rgba(56, 189, 248, .12); color: var(--primary); text-decoration: none; }
.app-main { padding: 32px; }
@media (max-width: 860px) { .app-shell { grid-template-columns: 1fr; } .app-sidebar { display: flex; overflow-x: auto; gap: 4px; border-right: none; border-bottom: 1px solid var(--line); } }

.stat-card { padding: 20px; }
.stat-card .value { font-size: 1.8rem; font-weight: 800; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .label { color: var(--muted); font-size: .85rem; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; }
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table { border: none; }
.table-wrap .card-body { padding: 0; }

.report-city-grid { grid-template-columns: 320px 1fr; }
@media (max-width: 780px) { .report-city-grid { grid-template-columns: 1fr; } }

/* donut_chart_svg() output - let the chart shrink on narrow screens instead of forcing horizontal scroll */
.donut-chart-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-chart-svg { max-width: 100%; height: auto; flex-shrink: 0; }

/* ---------- Course/combo detail page ---------- */
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .detail-layout { grid-template-columns: 1fr; } }

/* ---------- Video player page ---------- */
.watch-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
@media (max-width: 960px) { .watch-layout { grid-template-columns: 1fr; } }
.tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab-btn { white-space: nowrap; }
.video-frame { background: #000; border-radius: var(--radius); overflow: hidden; }
.video-frame video { width: 100%; display: block; max-height: 70vh; }
.curriculum-list { max-height: 480px; overflow-y: auto; }
.curriculum-item { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.curriculum-item.active { background: rgba(56, 189, 248, .12); }
.curriculum-item .dur { margin-left: auto; color: var(--muted); font-size: .78rem; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab-btn { padding: 12px 18px; border: none; background: none; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--primary); border-color: var(--primary); }
.tab-panel { display: none; padding: 18px; max-height: 420px; overflow-y: auto; }
.tab-panel.active { display: block; }
.chat-message { margin-bottom: 12px; font-size: .88rem; }
.chat-message .who { font-weight: 700; margin-right: 6px; }
.chat-message .who.admin { color: var(--primary); }
.chapter-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; cursor: pointer; }
.chapter-row:hover { color: var(--primary); }
.qa-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.qa-reply { margin-left: 16px; margin-top: 8px; padding: 8px 12px; background: var(--surface-2); border-radius: 8px; font-size: .85rem; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.flex { display: flex; flex-wrap: wrap; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.flex.justify-between { row-gap: 10px; }
.progress-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--gradient-brand); }
.lock-icon { color: var(--muted); }
.jitsi-wrap { background: #000; border-radius: var(--radius); overflow: hidden; min-height: 560px; }
@media (max-width: 640px) { .jitsi-wrap { min-height: 360px; } }

/* ---------- Integrated IDE ---------- */
.ide-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 980px) { .ide-layout { grid-template-columns: 1fr; } }

.ide-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ide-toolbar select { width: auto; min-width: 190px; }
.ide-toolbar .spacer { flex: 1; }

.ide-lang-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.ide-lang-badge .dot { width: 8px; height: 8px; border-radius: 50%; }
.ide-lang-badge[data-lang="python"] { background: rgba(56, 189, 248, .14); color: #7dd3fc; } .ide-lang-badge[data-lang="python"] .dot { background: #3776ab; }
.ide-lang-badge[data-lang="java"] { background: rgba(239, 68, 68, .12); color: #fca5a5; } .ide-lang-badge[data-lang="java"] .dot { background: #ea2d2e; }
.ide-lang-badge[data-lang="javascript"] { background: rgba(245, 158, 11, .14); color: #fcd34d; } .ide-lang-badge[data-lang="javascript"] .dot { background: #f0db4f; }
.ide-lang-badge[data-lang="cpp"] { background: rgba(139, 92, 246, .14); color: #c4b5fd; } .ide-lang-badge[data-lang="cpp"] .dot { background: #659ad2; }
.ide-lang-badge[data-lang="csharp"] { background: rgba(34, 197, 94, .12); color: #86efac; } .ide-lang-badge[data-lang="csharp"] .dot { background: #68217a; }
.ide-lang-badge[data-lang="sql"] { background: rgba(251, 191, 36, .14); color: #fcd34d; } .ide-lang-badge[data-lang="sql"] .dot { background: #f29111; }

.ide-editor-wrap { border-top: 1px solid var(--line); }
.ide-editor-wrap .CodeMirror { height: 440px; font-family: 'Cascadia Code', 'Fira Code', Consolas, 'Courier New', monospace; font-size: .92rem; line-height: 1.55; background: var(--bg); color: var(--ink); }
.ide-editor-wrap .CodeMirror-gutters { background: var(--surface); border-right: 1px solid var(--line); }
.ide-editor-wrap .CodeMirror-linenumber { color: var(--muted); }
.ide-editor-wrap .CodeMirror-cursor { border-left: 1.5px solid var(--primary); }
.ide-editor-wrap .CodeMirror-selected { background: rgba(56, 189, 248, .18); }
.ide-editor-wrap .CodeMirror-activeline-background { background: rgba(255, 255, 255, .03); }
@media (max-width: 640px) { .ide-editor-wrap .CodeMirror { height: 320px; } }

.ide-stdin-wrap { padding: 14px 16px; border-top: 1px solid var(--line); }
.ide-stdin-wrap label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ide-stdin-wrap textarea { font-family: Consolas, 'Courier New', monospace; font-size: .85rem; min-height: 64px; resize: vertical; }

.ide-actions { display: flex; align-items: center; gap: 10px; padding: 14px 16px; flex-wrap: wrap; }

.ide-console { margin: 0; padding: 16px; background: var(--bg); font-family: Consolas, 'Courier New', monospace; font-size: .85rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; min-height: 120px; max-height: 340px; overflow-y: auto; }
.ide-console .stderr { color: #fca5a5; }
.ide-console .placeholder { color: var(--muted); }
.ide-run-meta { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.ide-run-meta strong { color: var(--ink-soft); }
.ide-run-meta .status-ok { color: var(--success); }
.ide-run-meta .status-err { color: var(--danger); }

.ai-panel { padding: 4px 4px 16px; }
.ai-block { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.ai-block:last-child { border-bottom: none; }
.ai-block h4 { margin: 0 0 8px; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.ai-block p { color: var(--ink-soft); margin: 0; }
.ai-suggestion-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ai-suggestion-list li { display: flex; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: .88rem; color: var(--ink-soft); }
.ai-suggestion-list li::before { content: "💡"; flex-shrink: 0; }
.ai-error-block { background: rgba(239, 68, 68, .08); border: 1px solid rgba(239, 68, 68, .25); border-radius: 10px; padding: 12px 14px; }
.ai-error-block p { color: #fca5a5; }
.ide-flowchart { background: var(--surface-2); border-radius: 10px; padding: 16px; overflow-x: auto; text-align: center; }
.ide-flowchart svg { max-width: 100%; height: auto; }
.ai-empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.ai-empty-state .icon { font-size: 2rem; margin-bottom: 10px; }

.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.snippet-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.snippet-list li { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.snippet-list li:last-child { border-bottom: none; }
.snippet-list .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.snippet-list .name:hover { color: var(--primary); }
.snippet-list .meta { color: var(--muted); font-size: .72rem; }
.snippet-empty { padding: 16px; color: var(--muted); font-size: .85rem; }

/* ---------- Small-phone tightening ---------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 44px 0; }
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 1.75rem; }
  .hero p.lead { font-size: 1rem; }
  .section-head h2 { font-size: 1.5rem; }
  .card-body { padding: 16px; }
  .auth-card { padding: 24px; }
  .pricing-card { padding: 24px 18px; }
  .pricing-card .amount { font-size: 2rem; }
  .app-main { padding: 18px; }
  .ide-toolbar select { min-width: 0; flex: 1; }
  .ide-console { max-height: 240px; }
}

/* ---------- T-shirt promo modal (homepage) ---------- */
.tshirt-modal-backdrop {
  position: fixed; inset: 0; z-index: 200; background: rgba(2, 4, 9, .78);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.tshirt-modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.tshirt-modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0,0,0,.6); max-width: 780px; width: 100%;
  max-height: 90vh; max-height: 90dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  position: relative; margin: auto;
  transform: translateY(12px); transition: transform .25s ease;
}
.tshirt-modal-backdrop.is-open .tshirt-modal { transform: translateY(0); }
.tshirt-modal__close {
  position: absolute; top: 8px; right: 8px; background: transparent; border: none;
  color: var(--ink-soft); font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 1;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}
.tshirt-modal__close:hover { color: var(--ink); }
.tshirt-modal__grid { display: grid; grid-template-columns: 240px 1fr; min-width: 0; }
.tshirt-modal__visual { background: #05070d; display: flex; align-items: center; justify-content: center; padding: 20px; min-width: 0; }
.tshirt-modal__visual img { max-width: 100%; height: auto; border-radius: 10px; }
.tshirt-modal__body { padding: 28px 28px 24px; min-width: 0; }
.tshirt-modal__body h2 { font-size: 1.4rem; margin: 10px 0 6px; word-break: break-word; }
.tshirt-modal__combos { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.tshirt-modal__combo { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.tshirt-modal__combo img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.tshirt-modal__combo-info { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.tshirt-modal__combo-info strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tshirt-modal__combo .btn { flex-shrink: 0; white-space: nowrap; }

@media (max-width: 900px) {
  .tshirt-modal { max-width: 92vw; }
}
@media (max-width: 640px) {
  .tshirt-modal-backdrop { padding: 12px; align-items: flex-start; }
  .tshirt-modal { max-width: 100%; margin-top: 12px; }
  .tshirt-modal__grid { grid-template-columns: 1fr; }
  .tshirt-modal__visual { padding: 16px; }
  .tshirt-modal__visual img { max-height: 160px; }
  .tshirt-modal__body { padding: 44px 18px 20px; }
  .tshirt-modal__body h2 { font-size: 1.2rem; }
}
@media (max-width: 420px) {
  .tshirt-modal__combo { flex-direction: column; align-items: stretch; text-align: center; }
  .tshirt-modal__combo img { width: 100%; height: 100px; margin: 0 auto; }
  .tshirt-modal__combo-info { align-items: center; }
  .tshirt-modal__combo-info strong { white-space: normal; }
  .tshirt-modal__combo .btn { width: 100%; text-align: center; }
}
@media (max-height: 560px) {
  .tshirt-modal__visual { display: none; }
}

/* ---------- Notification bell ----------
   Icon-only button, badge for the unread count, no in-place dropdown -
   clicking it navigates straight to the "all notifications" page. */
.notif-wrap { display: inline-flex; flex-shrink: 0; }
.notif-bell {
  position: relative; background: transparent; border: 1px solid var(--line); border-radius: 10px;
  width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink); text-decoration: none;
  transition: border-color .15s ease, color .15s ease; line-height: 1;
}
.notif-bell:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.notif-bell__icon { flex-shrink: 0; display: block; }
.notif-badge {
  display: none; position: absolute; top: -6px; right: -6px; background: #ef4444; color: #fff;
  font-size: .66rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
  align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--bg);
}

/* Keep the bell a small square icon everywhere - don't let it get stretched
   to the full-width row treatment other .nav-cta links get in the mobile
   slide-in drawer. */
@media (max-width: 720px) {
  .nav-cta .notif-wrap { width: auto; }
  .nav-cta .notif-bell { width: 38px; padding: 0; justify-content: center; }
}
