.logo-tech { color: #6366F1; }
.logo-stack { color: #00E1FF; }

.logo-z { position: relative; display: inline-block; font-weight: 800; }
.logo-z .lz-3 { position: absolute; top: 0; left: 0; color: #6366F1; opacity: 0.85; transform: translate(3px, 3px); }
.logo-z .lz-2 { position: absolute; top: 0; left: 0; color: #00E1FF; opacity: 0.92; transform: translate(1.5px, 1.5px); }
.logo-z .lz-1 { position: relative; color: #39FF88; opacity: 1; }

/* Tech Stackz global styles: nav, footer, sidebar, logo, dark base. */

:root {
  --bg: #12151F;
  --bg2: #1A1E2E;
  --surface: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.09);
  --text: #F0F4FF;
  --muted: #7B8DB0;
  --indigo: #6366F1;
  --indigo-light: #818CF8;
  --blue: #0EA5E9;
  --green: #10B981;
  --glow-indigo: rgba(99,102,241,0.15);
  --glow-blue: rgba(14,165,233,0.12);
  --glow-green: rgba(16,185,129,0.12);
  --card-bg: rgba(255,255,255,0.045);
  --nav-bg: rgba(18,21,31,0.88);
  --toggle-bg: #262D42;
}

/* BASE — dark theme everywhere, no exceptions */
html { font-size: 108%; scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(0.8); } }

/* LOGO — layered-Z wordmark, matches techstackz-wordmark SVG exactly */
.logo-tech { color: #6366F1; background: none; -webkit-text-fill-color: #6366F1; }
.logo-stack { color: #00E1FF; background: none; -webkit-text-fill-color: #00E1FF; }
.logo-z { position: relative; display: inline-block; font-weight: 800; }
.logo-z .lz-3 { position: absolute; top: 0; left: 0; color: #6366F1; background: none; -webkit-text-fill-color: #6366F1; opacity: 0.85; transform: translate(3px, 3px); }
.logo-z .lz-2 { position: absolute; top: 0; left: 0; color: #00E1FF; background: none; -webkit-text-fill-color: #00E1FF; opacity: 0.92; transform: translate(1.5px, 1.5px); }
.logo-z .lz-1 { position: relative; color: #39FF88; background: none; -webkit-text-fill-color: #39FF88; opacity: 1; }
.nav-logo, .footer-logo {
  font-family: 'Syne', sans-serif; font-weight: 800; text-decoration: none;
  background: none; -webkit-text-fill-color: var(--text); color: var(--text);
}
.nav-logo { font-size: 1.25rem; }
.footer-logo { font-size: 1.4rem; margin-bottom: 0.5rem; display: block; }

/* NAV — public header */
nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--nav-bg); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem; height: 66px;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.nav-links { display: flex; gap: 0.25rem; list-style: none; flex: 1; justify-content: center; }
.nav-links a {
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 6px 10px; border-radius: 6px; transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.nav-cta {
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  color: white !important; border: none; border-radius: 8px;
  padding: 8px 18px; font-size: 0.82rem; font-weight: 600;
  font-family: 'Outfit', sans-serif; transition: all 0.2s;
  text-decoration: none; display: inline-block;
  box-shadow: 0 0 20px rgba(99,102,241,0.3);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(99,102,241,0.5); }
.mobile-menu-btn {
  display: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--text); font-size: 1rem;
}
.mobile-menu {
  display: none; flex-direction: column;
  border-top: 1px solid var(--border); padding: 1rem 2rem;
  background: var(--nav-bg); gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--muted); text-decoration: none; font-size: 0.9rem;
  padding: 10px 0; border-bottom: 1px solid var(--border); transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--text); }
.mobile-menu .mobile-cta { color: var(--indigo-light) !important; border-bottom: none; font-weight: 600; margin-top: 0.5rem; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-cta { display: none; }
}

/* NAV — member header buttons (Editor's Latest pill, sidebar toggle) */
.toggle-btn {
  background: var(--toggle-bg); border: 1px solid var(--border);
  border-radius: 50px; padding: 7px 14px; cursor: pointer;
  font-size: 0.78rem; color: var(--muted); font-family: 'Outfit', sans-serif;
  font-weight: 500; transition: all 0.2s; display: flex; align-items: center; gap: 6px;
}
.toggle-btn:hover { border-color: var(--indigo); color: var(--text); }
.sidebar-toggle-btn {
  display: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--text); font-size: 1rem;
}
@media (max-width: 1000px) {
  .sidebar-toggle-btn { display: block; }
}

/* SIDEBAR — member pages */
.dash-layout { display: flex; align-items: flex-start; }
.sidebar {
  width: 250px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border);
  padding: 2rem 1rem; position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto;
}
.sidebar-group { margin-bottom: 2rem; }
.sidebar-group:last-child { margin-bottom: 0; }
.sidebar-group-title { font-family: 'Syne Mono', monospace; font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; padding: 0 0.75rem; margin-bottom: 0.6rem; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: all 0.2s; margin-bottom: 2px; }
.sidebar-link:hover { background: var(--surface); color: var(--text); }
.sidebar-link.active { background: var(--glow-indigo); color: var(--indigo-light); font-weight: 600; }
.sidebar-icon { font-size: 0.95rem; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-name { flex: 1; min-width: 0; }
.sidebar-overlay { display: none; }
.main-col { flex: 1; min-width: 0; }
@media (max-width: 1000px) {
  .sidebar {
    position: fixed; top: 66px; left: 0; width: 82%; max-width: 280px; z-index: 250;
    transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: 20px 0 60px rgba(0,0,0,0.3);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; top: 66px; background: rgba(0,0,0,0.5); z-index: 240; }
  .sidebar-overlay.open { display: block; }
}

/* FOOTER */
footer { background: var(--bg2); border-top: 1px solid var(--border); margin-top: 6rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem 3rem; display: flex; gap: 4rem; flex-wrap: wrap; }
.footer-brand { flex: 1; min-width: 180px; }
.footer-tagline { font-size: 0.85rem; color: var(--muted); }
.footer-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; min-width: 120px; }
.footer-col-title { font-family: 'Syne', sans-serif; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.25rem; }
.footer-col a { font-size: 0.85rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 1.5rem 2rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; color: var(--muted); font-family: 'Syne Mono', monospace; }
@media (max-width: 768px) {
  .footer-inner { flex-direction: column; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
}

/* Tech Stackz app styles: sign-up, login, account, courses, lessons, video.
   Uses the variables defined in base.css. */

.gate-pending body { visibility: hidden; }

.app-wrap { max-width: 1100px; margin: 0 auto; padding: 2.5rem 2rem 5rem; position: relative; z-index: 1; }
.app-narrow { max-width: 480px; margin: 0 auto; padding: 3.5rem 1.25rem 5rem; position: relative; z-index: 1; }
.app-hero { text-align: center; padding: 3.5rem 1.5rem 1.5rem; }
.app-hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; color: var(--text); }
.app-hero p { color: var(--muted); max-width: 560px; margin: 0.9rem auto 0; line-height: 1.7; }
.app-hero .gradient-text, .gradient-text { color: var(--indigo-light); }
.eyebrow { font-family: 'Syne Mono', monospace; font-size: 0.72rem; color: var(--green); text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 0.9rem; }

/* buttons */
.btn { display: inline-block; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.92rem; padding: 12px 26px; border-radius: 50px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: all 0.25s; }
.btn-primary { background: var(--indigo); color: #fff; box-shadow: 0 0 24px rgba(99,102,241,0.3); }
.btn-primary:hover { background: var(--indigo-light); transform: translateY(-1px); }
.btn-primary[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo-light); }
.btn-block { display: block; width: 100%; text-align: center; }

/* auth card + forms */
.auth-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; }
.auth-card h2 { font-family: 'Syne', sans-serif; font-size: 1.25rem; color: var(--text); margin-bottom: 0.4rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 0.4rem; }
.field input[type="email"], .field input[type="password"], .field input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: var(--text); font-family: 'Outfit', sans-serif; font-size: 1rem;
}
.field input:focus { outline: 2px solid var(--indigo); outline-offset: 1px; }
.field-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.82rem; color: var(--muted); line-height: 1.5; margin-bottom: 1.1rem; }
.field-check input { margin-top: 3px; }
.field-check a, .auth-links a { color: var(--indigo-light); }
.auth-links { margin-top: 1.1rem; font-size: 0.85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.form-msg { display: none; padding: 10px 14px; border-radius: 10px; font-size: 0.88rem; line-height: 1.5; margin-bottom: 1rem; }
.form-msg.show { display: block; }
.form-msg.err { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35); color: #fca5a5; }
.form-msg.ok { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.35); color: #6ee7b7; }
.off-note { background: rgba(14,165,233,0.1); border: 1px solid rgba(14,165,233,0.3); border-radius: 12px; padding: 1rem 1.25rem; color: var(--text); font-size: 0.9rem; line-height: 1.6; }

/* founder meter */
.founder-meter { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.founder-meter .fm-top { display: flex; justify-content: space-between; gap: 1rem; font-family: 'Syne Mono', monospace; font-size: 0.74rem; color: var(--muted); margin-bottom: 0.6rem; flex-wrap: wrap; }
.founder-meter .fm-top b { color: var(--green); }
.fm-bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,0.08); overflow: hidden; }
.fm-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--indigo), var(--blue), var(--green)); transition: width 0.6s ease; }

/* account */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 0.6rem 1rem; font-size: 0.92rem; margin: 1.1rem 0 1.5rem; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--text); word-break: break-word; }
.pill { display: inline-block; font-family: 'Syne Mono', monospace; font-size: 0.68rem; padding: 3px 10px; border-radius: 50px; background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: var(--green); text-transform: uppercase; letter-spacing: 0.06em; }

/* courses */
.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--indigo-light); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.course-head h1 { font-family: 'Syne', sans-serif; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); margin-bottom: 0.8rem; }
.course-head .intro { color: var(--muted); line-height: 1.75; max-width: 680px; margin-bottom: 1.5rem; }
.progress { height: 8px; background: rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; max-width: 420px; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--indigo), var(--green)); transition: width 0.4s; }
.progress-text { font-family: 'Syne Mono', monospace; font-size: 0.72rem; color: var(--muted); margin: 0.5rem 0 1.5rem; }
.lesson-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 1.5rem 0 2rem; padding: 0; }
.lesson-row { display: flex; align-items: center; gap: 14px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); transition: border-color 0.2s; }
.lesson-row:hover { border-color: var(--indigo); }
.lesson-num { font-family: 'Syne Mono', monospace; font-size: 0.78rem; color: var(--muted); width: 28px; flex-shrink: 0; }
.lesson-title { flex: 1; font-weight: 600; }
.lesson-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: transparent; }
.lesson-row.done .lesson-check { background: var(--green); border-color: var(--green); color: #07130e; }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 3rem; }
.course-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1.6rem; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 0.8rem; transition: all 0.3s; }
.course-card:hover { border-color: var(--indigo); transform: translateY(-3px); }
.course-card h3 { font-family: 'Syne', sans-serif; font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.course-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; flex: 1; }
.course-card .cc-foot { display: flex; justify-content: space-between; align-items: center; font-family: 'Syne Mono', monospace; font-size: 0.68rem; color: var(--muted); padding-top: 0.7rem; border-top: 1px solid var(--border); }
.group-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text); margin: 2rem 0 1rem; }

/* lesson body */
.lesson-body { max-width: 720px; font-size: 1.02rem; line-height: 1.85; color: var(--text); }
.lesson-body p { margin: 0 0 1.2rem; opacity: 0.93; }
.lesson-body h2 { font-family: 'Syne', sans-serif; font-size: 1.4rem; margin: 2rem 0 0.8rem; }
.lesson-body h3 { font-family: 'Syne', sans-serif; font-size: 1.15rem; margin: 1.6rem 0 0.6rem; }
.lesson-body ul, .lesson-body ol { margin: 0 0 1.2rem 1.4rem; }
.lesson-body li { margin-bottom: 0.4rem; }
.lesson-body a { color: var(--indigo-light); }
.lesson-body strong { color: var(--text); }
.lesson-body blockquote { border-left: 3px solid var(--indigo); padding: 0.4rem 1rem; color: var(--muted); margin: 1.2rem 0; }
.lesson-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 2rem 0; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.lesson-nav a { flex: 1; min-width: 200px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); font-size: 0.9rem; }
.lesson-nav a:hover { border-color: var(--indigo); }
.lesson-nav small { display: block; font-family: 'Syne Mono', monospace; font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.lesson-nav .next { text-align: right; }
.btn-done.is-done { background: var(--green); color: #07130e; box-shadow: none; }

/* video (any provider) */
.video-wrap { position: relative; width: 100%; max-width: 820px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border); margin: 0 0 1.75rem; }
.video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 900px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .course-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .app-wrap { padding: 1.5rem 1rem 4rem; }
}

/* auth on/off: the site runs fully open until AUTH_ENABLED is switched on in src/config.json */
.auth-off [data-auth-only] { display: none !important; }
html:not(.auth-off) [data-auth-off] { display: none !important; }

/* theme toggle + light theme (dark is the brand default; choice is remembered per browser) */
.theme-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--toggle-bg); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all 0.2s; }
.theme-toggle:hover { border-color: var(--indigo); color: var(--text); }
.theme-toggle .ico-moon { display: none; }
html[data-theme="light"] .theme-toggle .ico-sun { display: none; }
html[data-theme="light"] .theme-toggle .ico-moon { display: inline; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F7FB; --bg2: #ECEFF8; --surface: rgba(18,21,31,0.05); --border: rgba(18,21,31,0.13);
  --text: #141826; --muted: #4E5976;
  --indigo: #4F46E5; --indigo-light: #4338CA; --blue: #0369A1; --green: #047857;
  --glow-indigo: rgba(79,70,229,0.12); --glow-blue: rgba(3,105,161,0.1); --glow-green: rgba(4,120,87,0.1);
  --card-bg: #FFFFFF; --nav-bg: rgba(246,247,251,0.92); --toggle-bg: #E3E7F3; --tag-bg: rgba(79,70,229,0.1);
  --new-bg: rgba(4,120,87,0.12); --new-color: #047857;
}
html[data-theme="light"] body::before { opacity: 0.15; }
html[data-theme="light"] .logo-z .lz-1 { color: #059669; -webkit-text-fill-color: #059669; }
html[data-theme="light"] .logo-z .lz-2 { color: #0891B2; -webkit-text-fill-color: #0891B2; }
html[data-theme="light"] .logo-z .lz-3 { color: #4F46E5; -webkit-text-fill-color: #4F46E5; }
