/* ===== CSS VARIABLES ===== */
:root {
  --bg: #ffffff;
  --bg2: #f7f9fc;
  --bg3: #eef2f7;
  --surface: #ffffff;
  --surface2: #f3f6fb;
  --border: rgba(15,23,42,0.10);
  --border2: rgba(15,23,42,0.16);
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --accent4: #f7971e;
  --text: #111827;
  --text2: #475569;
  /* Darkened from #64748b: the old value dropped to ~4.3:1 on --bg3 and failed AA. */
  --text3: #566274;
  --r: 12px;
  --r2: 20px;
  --shadow: 0 12px 36px rgba(15,23,42,0.08);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Visually hidden, still read by screen readers. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Visible keyboard focus everywhere — the default outline was being lost
   against dark buttons and coloured surfaces. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== GRID NOISE BG ===== */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(15,23,42,0.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(15,23,42,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
body > * { position: relative; z-index: 1; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(15,23,42,0.06);
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 22px;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 16px;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.nav-links > li { position: relative; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
  transition: all .2s;
}
.nav-links a:hover { background: var(--surface2); color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-links .caret { font-size: 9px; opacity: .6; transition: transform .2s; }

/* ── Dropdowns ── */
.drop-toggle { display: none; }   /* only needed on touch/mobile */
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 120;
  min-width: 230px; padding: 8px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15,23,42,.14);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.has-drop:hover > .dropdown,
.has-drop:focus-within > .dropdown,
.has-drop.open > .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.has-drop:hover > a .caret,
.has-drop.open > a .caret { transform: rotate(180deg); }
.dropdown li { width: 100%; }
.dropdown a {
  display: block; width: 100%;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--text2);
}
.dropdown a:hover { background: rgba(108,99,255,.08); color: var(--accent); }
/* Keeps the pointer from falling through the gap between trigger and menu. */
.has-drop::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }

.nav-right { display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s;
  font-family: 'Outfit', sans-serif;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(108,99,255,0.5); }

/* ===== HERO ===== */
.hero {
  padding: 100px 48px 80px;
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.25);
  font-size: 12px; font-weight: 600; color: var(--accent);
  margin-bottom: 24px; letter-spacing: .05em; text-transform: uppercase;
}
.hero-badge span { width:6px; height:6px; border-radius:50%; background:var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 17px; color: var(--text2); line-height: 1.7;
  margin-bottom: 36px; max-width: 480px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 48px; }
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 28px; font-weight: 800; color: var(--text);
}
.stat-num span { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text3); margin-top: 2px; }

/* Hero Visual */
.hero-visual { position: relative; }
.hero-browser {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15,23,42,0.12), 0 0 0 1px var(--border);
}
.browser-bar {
  background: var(--bg3);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.dot { width:12px; height:12px; border-radius:50%; }
.dot.r { background:#ff5f57; } .dot.y { background:#febc2e; } .dot.g { background:#28c840; }
.browser-url {
  flex: 1; background: var(--bg2); border-radius: 6px;
  padding: 6px 12px; font-family: 'DM Mono', monospace;
  font-size: 12px; color: var(--text3); margin: 0 12px;
}
.browser-body { padding: 20px; }

/* Mini Tools Preview */
.mini-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-tool {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  transition: border-color .2s;
}
.mini-tool:hover { border-color: var(--accent); }
.mini-tool-label {
  font-size: 11px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
}
.color-strip { display:flex; gap:4px; height:28px; }
.color-strip span { flex:1; border-radius:4px; }
.shadow-box {
  width:100%; height:36px; border-radius:8px;
  background: var(--surface2);
  box-shadow: 6px 6px 20px rgba(108,99,255,0.4);
}
.gradient-box {
  width:100%; height:36px; border-radius:8px;
  background: linear-gradient(90deg, #6c63ff, #ff6584, #43e97b);
}
.code-mini {
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--text2); line-height: 1.6;
}
/* Syntax colours tuned for the light surface these sit on. */
.code-mini .kw { color: #7c3aed; }
.code-mini .prop { color: #2563eb; }
.code-mini .val { color: #0f766e; }

/* ===== SECTION COMMON ===== */
.section { padding: 80px 48px; max-width: 1280px; margin: 0 auto; }
.section-header { margin-bottom: 48px; }
.section-tag {
  font-size: 12px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px;
}
.section-title {
  font-family: 'Syne', sans-serif; font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800; line-height: 1.15; margin-bottom: 12px;
}
.section-desc { font-size: 16px; color: var(--text2); max-width: 560px; }

/* ===== TOOLS CATEGORIES ===== */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.cat-tab {
  padding: 8px 18px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text2);
  cursor: pointer; transition: all .2s; background: transparent;
  font-family: 'Outfit', sans-serif;
}
.cat-tab:hover, .cat-tab.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ===== TOOLS GRID ===== */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 24px;
  cursor: pointer;
  transition: all .25s;
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--card-accent, var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s;
}
.tool-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 12px 36px rgba(15,23,42,0.10); }
.tool-card:hover::before { transform: scaleX(1); }
.tool-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--card-bg, rgba(108,99,255,0.15));
  display: grid; place-items: center; font-size: 22px;
  margin-bottom: 16px;
}
.tool-name { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.tool-desc { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 16px; }
.tool-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
  background: var(--card-bg, rgba(108,99,255,0.1));
  color: var(--card-color, var(--accent));
}
.tool-arrow {
  position: absolute; top: 20px; right: 20px;
  color: var(--text3); font-size: 18px; transition: all .2s;
}
.tool-card:hover .tool-arrow { color: var(--accent); transform: translate(2px,-2px); }

/* ===== FEATURED TOOL - COLOR PICKER LIVE ===== */
.featured-section { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.featured-inner { max-width: 1280px; margin: 0 auto; padding: 80px 48px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.live-demo {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 28px;
  box-shadow: var(--shadow);
}
.demo-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.demo-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; }
.live-pill {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--accent3);
  text-transform: uppercase; letter-spacing: .06em;
}
.live-pill span { width:6px; height:6px; border-radius:50%; background:var(--accent3); animation:pulse 1.5s infinite; }

/* Color Picker Widget */
.cp-swatch-large {
  width: 100%; height: 80px; border-radius: var(--r);
  margin-bottom: 16px; transition: background .2s;
  background: #6c63ff;
  position: relative; overflow: hidden;
}
.cp-swatch-large::after {
  content: attr(data-hex);
  position: absolute; bottom: 10px; right: 12px;
  font-family: 'DM Mono', monospace; font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.7); letter-spacing: .08em;
}
.cp-controls { display: grid; gap: 12px; }
.cp-slider-group label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px;
}
.cp-slider-group label span { font-family: 'DM Mono', monospace; color: var(--text); }
input[type=range] {
  width: 100%; height: 6px; border-radius: 3px;
  -webkit-appearance: none; appearance: none;
  cursor: pointer; outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(15,23,42,0.18);
  cursor: pointer;
}
.cp-formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.cp-format {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px;
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--text2); text-align: center; cursor: pointer;
  transition: all .2s;
}
.cp-format:hover { border-color: var(--accent); color: var(--accent); }
.cp-format strong { display: block; font-size: 9px; color: var(--text3); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .05em; }

/* ===== LEARNING PATH ===== */
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 28px;
  position: relative;
}
.path-num {
  font-family: 'Syne', sans-serif; font-size: 48px; font-weight: 800;
  color: var(--border2); position: absolute; top: 16px; right: 20px;
  line-height: 1;
}
.path-icon { font-size: 28px; margin-bottom: 14px; }
.path-title { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.path-desc { font-size: 14px; color: var(--text2); line-height: 1.65; margin-bottom: 20px; }
.path-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.path-items li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text2);
}
.path-items li::before { content: '→'; color: var(--accent); font-weight: 700; }

/* ===== CODE EDITOR PREVIEW ===== */
.editor-section { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.editor-wrap { max-width: 1280px; margin: 0 auto; padding: 80px 48px; }
.editor-frame {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15,23,42,0.12);
}
.editor-topbar {
  background: var(--bg3); padding: 12px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.editor-tabs { display: flex; gap: 2px; }
.editor-tab {
  padding: 6px 16px; border-radius: 6px 6px 0 0;
  font-size: 12px; font-weight: 500; color: var(--text3);
  cursor: pointer; transition: all .2s;
  background: none; border: none; font-family: 'DM Mono', monospace;
}
.editor-tab:hover { background: rgba(15,23,42,.05); color: var(--text2); }
.editor-tab.active { background: var(--bg); color: var(--text); font-weight: 600; }
.editor-tab.active.html { color: #b93b1d; }
.editor-tab.active.css { color: #264de4; }
/* JS yellow (#f7df1e) was ~1.4:1 on the white tab — unreadable. */
.editor-tab.active.js { color: #7a6000; }
.editor-run {
  margin-left: auto;
  background: var(--accent3); color: #000;
  border: none; border-radius: 8px;
  padding: 6px 16px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: 'Outfit', sans-serif;
  display: flex; align-items: center; gap: 6px;
}
.editor-body { display: grid; grid-template-columns: 1fr 1fr; }
.editor-panes { border-right: 1px solid var(--border); min-height: 280px; }
.editor-pane {
  font-family: 'DM Mono', monospace; font-size: 13px;
  padding: 24px; line-height: 1.8;
  min-height: 280px;
  overflow-x: auto;
}
.editor-pane[hidden] { display: none; }
.editor-pane .ln { color: var(--text3); user-select: none; margin-right: 16px; display: inline-block; width: 20px; text-align: right; }
/* Light-theme syntax palette. The previous values were Material-dark tokens
   (pale green/amber) sitting on a white pane — several were under 2:1. */
.editor-pane .kw   { color: #cf222e; }
.editor-pane .prop { color: #0550ae; }
.editor-pane .val  { color: #0a3069; }
.editor-pane .str  { color: #0a7c4a; }
.editor-pane .cmt  { color: #5b6470; font-style: italic; }
.editor-pane .attr { color: #8250df; }
.editor-pane .fn   { color: #6639ba; }
.editor-pane .obj  { color: #953800; }
.editor-preview {
  padding: 24px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 280px;
}
.preview-card-demo {
  background: linear-gradient(135deg, #6c63ff, #ff6584);
  color: #fff; border-radius: 12px; padding: 24px 32px;
  text-align: center; box-shadow: 0 8px 32px rgba(108,99,255,0.4);
  font-family: 'Outfit', sans-serif;
}
.preview-card-demo h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.preview-card-demo p { font-size: 14px; opacity: 0.85; }

/* ===== TOOLS LIST (ALL) ===== */
.all-tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.at-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: all .2s; cursor: pointer;
}
.at-card:hover { border-color: var(--border2); background: var(--surface2); }
.at-icon { font-size: 24px; flex-shrink: 0; }
.at-name { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.at-cat { font-size: 12px; color: var(--text3); }

/* ===== WHY GIZDEVCRAFT ===== */
.why-section { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.why-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 26px 24px; transition: all .25s;
}
.why-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(15,23,42,.09); }
.why-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-size: 21px; margin-bottom: 16px;
}
.why-card h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.why-card p { font-size: 13.5px; color: var(--text2); line-height: 1.65; }

/* ===== SAVE PROGRESS CTA ===== */
.progress-cta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r2); padding: 44px 48px; box-shadow: var(--shadow);
}
.progress-cta-copy h2 {
  font-family: 'Syne', sans-serif; font-size: clamp(24px, 3vw, 34px);
  font-weight: 800; line-height: 1.2; margin-bottom: 12px;
}
.progress-cta-copy p { font-size: 15px; color: var(--text2); line-height: 1.7; margin-bottom: 26px; }
.progress-cta-visual { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; }
.pcv-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.pcv-check {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: var(--bg3); color: var(--text3);
}
.pcv-check.done { background: var(--accent3); color: #05310f; }
.pcv-label { flex: 1; color: var(--text2); font-weight: 500; }
.pcv-pct { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text3); }
.pcv-bar { height: 5px; background: var(--bg3); border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.pcv-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.pcv-bar:last-child { margin-bottom: 0; }

/* ===== FAQ ===== */
.faq-section { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 22px; transition: border-color .2s;
}
.faq-item[open] { border-color: var(--border2); }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text);
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 20px; font-weight: 400; color: var(--accent);
  flex-shrink: 0; transition: transform .2s; line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 14px; font-size: 14px; color: var(--text2); line-height: 1.75; }

/* ===== AUTH PAGES ===== */
.auth-wrap { max-width: 480px; margin: 0 auto; padding: 64px 24px 88px; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r2); padding: 40px 36px; box-shadow: var(--shadow);
}
.auth-head { margin-bottom: 28px; }
.auth-head h1 { font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.auth-head p { font-size: 14.5px; color: var(--text2); line-height: 1.6; }
.auth-card .field { margin-bottom: 18px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 7px; }
.auth-card input {
  width: 100%; padding: 11px 14px; font-size: 14.5px;
  font-family: 'Outfit', sans-serif; color: var(--text);
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 10px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.auth-card input::placeholder { color: var(--text3); }
.auth-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,.16); }
.field-hint { display: block; font-size: 12px; color: var(--text3); margin-top: 6px; }
.auth-submit { width: 100%; justify-content: center; padding: 12px 20px; font-size: 15px; margin-top: 6px; }
.auth-alt { margin-top: 22px; text-align: center; font-size: 14px; color: var(--text2); }
.auth-alt a { color: var(--accent); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }
.auth-alert {
  background: rgba(220,38,38,.07); border: 1px solid rgba(220,38,38,.3);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 22px;
}
.auth-alert ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.auth-alert li { font-size: 13.5px; color: #b91c1c; line-height: 1.5; }
.auth-warn {
  background: rgba(247,151,30,.09); border: 1px solid rgba(180,83,9,.32);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 22px;
  font-size: 13.5px; line-height: 1.6; color: #8a4b06;
}
.auth-warn strong { display: block; margin-bottom: 4px; color: #7c3f05; }
.auth-warn code {
  font-family: 'DM Mono', monospace; font-size: 12px;
  background: rgba(180,83,9,.12); padding: 1px 5px; border-radius: 4px;
}

.auth-card .label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.label-link { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.label-link:hover { text-decoration: underline; }
.auth-card select {
  width: 100%; padding: 11px 14px; font-size: 14.5px;
  font-family: 'Outfit', sans-serif; color: var(--text);
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 10px; outline: none; cursor: pointer;
}

/* ===== ADMIN AREA ===== */
.admin-card { border-top: 3px solid var(--accent); }
.admin-badge {
  display: inline-block; margin-bottom: 12px;
  padding: 5px 12px; border-radius: 100px;
  background: rgba(108,99,255,.12); color: var(--accent);
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
/* ── Modern Admin Navigation & Dashboard ────────────────────────────── */
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 8px 12px; margin-bottom: 28px;
  box-shadow: 0 4px 20px -8px rgba(0,0,0,0.06);
}
.admin-nav-wrapper {
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.admin-nav-wrapper::-webkit-scrollbar { display: none; }
.admin-nav-pills {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.admin-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--text2);
  text-decoration: none; transition: all .18s ease;
}
.admin-pill i { font-size: 14px; opacity: .8; }
.admin-pill:hover {
  background: var(--surface2); color: var(--text); transform: translateY(-1px);
}
.admin-pill.active {
  background: var(--accent); color: #fff; box-shadow: 0 4px 12px -2px rgba(108,99,255,.35);
}
.admin-pill.active i { opacity: 1; }
.admin-nav-user {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  padding-left: 12px; border-left: 1px solid var(--border);
}
.admin-user-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text3);
  background: var(--bg); padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border);
}
.admin-pill-out {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; color: #ef4444;
  background: rgba(239,68,68,.08); text-decoration: none; transition: all .18s;
}
.admin-pill-out:hover { background: #ef4444; color: #fff; }

/* Dashboard Hero */
.dash-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 32px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border); border-radius: var(--r2); padding: 26px 28px;
}
.dash-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); background: rgba(108,99,255,.12);
  padding: 4px 10px; border-radius: 100px; margin-bottom: 10px;
}
.dash-title {
  font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800;
  color: var(--text); margin-bottom: 6px; line-height: 1.2;
}
.dash-subtitle { font-size: 14.5px; color: var(--text2); line-height: 1.5; margin: 0; }
.dash-hero-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.dash-status-pills {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 100px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text2);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
}
.status-online { border-color: rgba(16,185,129,.3); color: #10b981; }
.status-online .status-dot { background: #10b981; box-shadow: 0 0 6px #10b981; }
.status-offline { border-color: rgba(148,163,184,.3); color: #64748b; }
.status-offline .status-dot { background: #64748b; }
.status-warn { border-color: rgba(245,158,11,.3); color: #f59e0b; }
.dash-quick-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Dashboard Metrics Grid */
.dash-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px; margin-bottom: 36px;
}
.dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 22px; position: relative;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.dash-card:hover {
  transform: translateY(-2px); border-color: var(--border2);
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.08);
}
.stat-card {
  display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon-blue { background: rgba(59,130,246,.12); color: #3b82f6; }
.stat-icon-purple { background: rgba(108,99,255,.12); color: #6c63ff; }
.stat-icon-cyan { background: rgba(6,182,212,.12); color: #06b6d4; }
.stat-icon-amber { background: rgba(245,158,11,.12); color: #f59e0b; }
.stat-icon-emerald { background: rgba(16,185,129,.12); color: #10b981; }
.stat-icon-rose { background: rgba(244,63,94,.12); color: #f43f5e; }

.stat-details { flex: 1; min-width: 0; }
.stat-value {
  font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800;
  line-height: 1.1; color: var(--text);
}
.stat-title { font-size: 13px; font-weight: 600; color: var(--text2); margin: 3px 0 6px; }
.stat-meta { font-size: 11.5px; color: var(--text3); display: flex; align-items: center; gap: 6px; }
.stat-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700;
}
.stat-badge-green { background: rgba(16,185,129,.12); color: #10b981; }
.stat-badge-blue { background: rgba(59,130,246,.12); color: #3b82f6; }
.stat-badge-purple { background: rgba(108,99,255,.12); color: #6c63ff; }
.stat-link {
  color: var(--text3); font-size: 18px; padding: 4px 8px; border-radius: 6px;
  text-decoration: none; transition: all .18s;
}
.stat-card:hover .stat-link { color: var(--accent); transform: translateX(3px); }

/* Quick Action Shortcuts */
.dash-section-header {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px;
}
.dash-section-header h2 {
  font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.dash-section-desc { font-size: 13px; color: var(--text3); }

.dash-actions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; margin-bottom: 36px;
}
.dash-action-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 20px;
  text-decoration: none; transition: all .2s ease;
}
.dash-action-card:hover {
  background: var(--surface2); border-color: var(--border2);
  transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(0,0,0,0.06);
}
.action-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(108,99,255,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; transition: transform .2s;
}
.dash-action-card:hover .action-card-icon { transform: scale(1.08); }
.action-card-text { flex: 1; min-width: 0; }
.action-card-title { font-weight: 700; font-size: 14.5px; color: var(--text); margin-bottom: 2px; }
.action-card-desc { font-size: 12.5px; color: var(--text2); line-height: 1.4; }
.action-card-arrow { color: var(--text3); font-size: 14px; transition: transform .2s, color .2s; }
.dash-action-card:hover .action-card-arrow { color: var(--accent); transform: translateX(3px); }

/* Dual Column Content */
.dash-columns-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px; align-items: start;
}
.content-card { padding: 0; overflow: hidden; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.015);
}
.card-header-title {
  font-family: 'Syne', sans-serif; font-size: 15.5px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.card-header-link {
  font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none;
}
.card-header-link:hover { text-decoration: underline; }

.card-table-wrapper { overflow-x: auto; }
.dash-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px; text-align: left;
}
.dash-table th {
  padding: 12px 20px; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text3); background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.dash-table td {
  padding: 14px 20px; border-bottom: 1px solid var(--border); color: var(--text2);
  vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: rgba(108,99,255,0.02); }
.table-title-link {
  font-weight: 600; color: var(--text); text-decoration: none; transition: color .18s;
}
.table-title-link:hover { color: var(--accent); }
.tag-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11.5px; font-weight: 600; background: var(--surface2);
  border: 1px solid var(--border); color: var(--text2); text-transform: uppercase;
}
.views-count { font-size: 12.5px; color: var(--text3); }
.date-text { font-size: 12px; color: var(--text3); white-space: nowrap; }
.btn-table-edit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--surface2); color: var(--text2); border: 1px solid var(--border);
  text-decoration: none; transition: all .18s;
}
.btn-table-edit:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Learning Paths Widget */
.paths-mini-list { display: flex; flex-direction: column; }
.path-mini-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: background .18s;
}
.path-mini-item:last-child { border-bottom: none; }
.path-mini-item:hover { background: var(--surface2); }
.path-mini-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(108,99,255,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; font-family: 'DM Mono', monospace;
}
.path-mini-info { flex: 1; min-width: 0; }
.path-mini-title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.path-mini-slug { font-size: 11.5px; color: var(--text3); font-family: 'DM Mono', monospace; }
.path-mini-arrow { color: var(--text3); font-size: 12px; transition: transform .18s; }
.path-mini-item:hover .path-mini-arrow { color: var(--accent); transform: translateX(3px); }

/* System Info Widget */
.sys-info-list { padding: 10px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.sys-info-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.sys-info-row:last-child { border-bottom: none; padding-bottom: 0; }
.sys-label { color: var(--text3); font-weight: 500; }
.sys-val { font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.badge-status {
  padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700;
}
.badge-green { background: rgba(16,185,129,.12); color: #10b981; }
.badge-amber { background: rgba(245,158,11,.12); color: #f59e0b; }
.badge-neutral { background: var(--surface2); color: var(--text3); }
.text-accent { color: var(--accent); }
.text-amber { color: #f59e0b; }
.text-blue { color: #3b82f6; }
.font-mono { font-family: 'DM Mono', monospace; font-size: 12px; }

@media (max-width: 960px) {
  .dash-columns-grid { grid-template-columns: 1fr; }
  .dash-hero { flex-direction: column; align-items: stretch; }
  .dash-hero-right { align-items: flex-start; }
}

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-side { display: flex; flex-direction: column; gap: 22px; }
.admin-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 28px 26px;
}
.admin-panel-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.admin-panel-note { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 16px; }
.admin-panel .field { margin-bottom: 18px; }
.admin-panel label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 7px; }
.admin-panel input, .admin-panel select {
  width: 100%; padding: 11px 14px; font-size: 14.5px;
  font-family: 'Outfit', sans-serif; color: var(--text);
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 10px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.admin-panel input::placeholder { color: var(--text3); }
.admin-panel input:focus, .admin-panel select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,.16);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-steps { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.admin-steps li { font-size: 13px; color: var(--text2); line-height: 1.6; }
.admin-steps code {
  font-family: 'DM Mono', monospace; font-size: 12px;
  background: rgba(108,99,255,.1); padding: 1px 5px; border-radius: 4px; color: #5b21b6;
}

@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .admin-nav-out { margin-left: 0; }
}

/* ===== SHOW/HIDE PASSWORD ===== */
.pw-wrap { position: relative; display: block; }
/* Room for the button so the value never runs underneath it. */
.pw-wrap input[type="password"],
.pw-wrap input[type="text"] { padding-right: 44px !important; }
.pw-toggle {
  position: absolute; top: 50%; right: 4px;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 14px; line-height: 1;
  border-radius: 8px; padding: 0;
  transition: color .18s, background .18s;
}
.pw-toggle:hover { color: var(--accent); background: rgba(108,99,255,.09); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-toggle[aria-pressed="true"] { color: var(--accent); }
/* Font Awesome sets its own font; keep the glyph centred if it fails to load. */
.pw-toggle i { pointer-events: none; display: block; }

/* ===== EMAIL VERIFICATION ===== */
.verify-icon { font-size: 42px; line-height: 1; margin-bottom: 14px; }
.verify-tips {
  list-style: none; display: flex; flex-direction: column; gap: 8px;
  margin: 0 0 24px; padding: 16px 18px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
}
.verify-tips li { font-size: 13px; color: var(--text2); line-height: 1.55; padding-left: 18px; position: relative; }
.verify-tips li::before { content: '·'; position: absolute; left: 6px; color: var(--accent); font-weight: 700; }

/* ===== FLASH BANNER ===== */
.flash-banner {
  max-width: 1280px; margin: 16px auto 0; padding: 12px 20px;
  background: rgba(67,233,123,.12); border: 1px solid rgba(16,145,74,.35);
  border-radius: 10px; font-size: 14px; font-weight: 500; color: #0f6a37;
}

/* ===== ACCOUNT DASHBOARD ===== */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.acct-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 22px; transition: all .22s;
}
.acct-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,23,42,.09); }
.acct-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.acct-icon { font-size: 26px; }
.acct-pct { font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; color: var(--accent); }
.acct-name { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.acct-count { font-size: 12px; color: var(--text3); margin-top: 8px; font-family: 'DM Mono', monospace; }
.acct-subhead { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; margin: 48px 0 18px; }
.acct-recent { display: flex; flex-direction: column; gap: 8px; }
.acct-recent-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 18px; transition: all .18s;
}
.acct-recent-row:hover { border-color: var(--border2); background: var(--surface2); }
.acct-check {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: rgba(67,233,123,.2); color: #0f6a37;
}
.acct-recent-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-recent-title { font-size: 14px; font-weight: 600; color: var(--text); }
.acct-recent-path { font-size: 12px; color: var(--text3); }
.acct-recent-date { font-size: 12px; color: var(--text3); font-family: 'DM Mono', monospace; flex-shrink: 0; }
.acct-empty {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 64px 32px; text-align: center;
}
.acct-empty-icon { font-size: 52px; margin-bottom: 18px; }
.acct-empty h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.acct-empty p { color: var(--text2); max-width: 420px; margin: 0 auto 26px; line-height: 1.7; }

/* ===== LESSON COMPLETE TOGGLE ===== */
.lesson-complete-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 32px 0 0; padding: 18px 20px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r);
}
.lesson-complete-bar.is-done { background: rgba(67,233,123,.09); border-color: rgba(16,145,74,.32); }
.lesson-complete-text { flex: 1; font-size: 13.5px; color: var(--text2); min-width: 180px; }
.btn-complete {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; cursor: pointer;
  font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  transition: filter .18s, background .18s, color .18s;
}
.btn-complete:hover { filter: brightness(.93); }
.btn-complete.is-done { background: rgba(67,233,123,.18); color: #0f6a37; border-color: rgba(16,145,74,.4); }
.btn-complete[disabled] { opacity: .6; cursor: default; }
/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, rgba(108,99,255,0.15) 0%, rgba(255,101,132,0.1) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cta-inner { max-width: 700px; margin: 0 auto; padding: 100px 48px; text-align: center; }
.cta-inner h2 { font-family: 'Syne', sans-serif; font-size: clamp(28px,4vw,48px); font-weight: 800; margin-bottom: 16px; }
.cta-inner p { font-size: 16px; color: var(--text2); margin-bottom: 36px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
.footer { background: var(--bg); border-top: 1px solid var(--border); padding: 48px; }
/* Brand column plus FOUR link columns. The old `2fr 1fr 1fr 1fr` only defined
   four tracks, so the fifth child wrapped onto a second row. */
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr));
  gap: 40px; align-items: start;
}
.footer-brand { min-width: 0; }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-logo img { max-height: 40px; width: auto; display: block; }
.footer-logo .logo-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-size: 15px; flex-shrink: 0;
}
.footer-logo-text { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 19px; color: var(--text); }
.footer-logo-text span { color: var(--accent); }
.footer-url {
  display: block; font-size: 13px; font-weight: 600; color: var(--accent);
  margin-bottom: 10px; word-break: break-all;
}
.footer-url:hover { text-decoration: underline; }
.footer-brand p { font-size: 14px; color: var(--text3); margin-top: 0; max-width: 300px; line-height: 1.65; }
.footer-col { min-width: 0; }
.footer-col h4 { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--text2); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: var(--text3); transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1280px; margin: 32px auto 0;
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--text3);
}

/* ===== DIVIDER ===== */
.divider { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.divider hr { border: none; border-top: 1px solid var(--border); }

/* ===== TOOL PAGE ===== */
.tool-page { max-width: 1280px; margin: 0 auto; padding: 60px 48px; }
.tool-header { margin-bottom: 40px; }
.tool-header h1 { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.tool-header p { font-size: 16px; color: var(--text2); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text3); margin-bottom: 20px; }
.breadcrumb a { color: var(--text3); transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text3); }

/* ===== PAGE HERO (Tools, Learn, Editor) ===== */
.page-hero { padding: 60px 48px 40px; max-width: 1280px; margin: 0 auto; }
.page-hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(32px, 4vw, 52px); font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.page-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.page-hero p { font-size: 17px; color: var(--text2); max-width: 560px; line-height: 1.7; }

/* ===== HAMBURGER MENU ===== */
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text2); border-radius: 2px;
  transition: all .25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding: 60px 24px; }
  .hero-visual { display: none; }
  .path-grid { grid-template-columns: 1fr 1fr; }
  .progress-cta { grid-template-columns: 1fr; gap: 36px; padding: 36px 32px; }
  /* Brand on its own row, the four link columns share the next. */
  .footer-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 460px; }
}
@media (max-width: 680px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The nav has more links now, so it collapses earlier than 768px. */
@media (max-width: 1080px) {
  .navbar { padding: 0 20px; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none; flex-direction: column; gap: 2px; align-items: stretch;
    position: absolute; top: 68px; left: 0; right: 0;
    max-height: calc(100vh - 68px); overflow-y: auto;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
    padding: 12px 16px 18px; border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(15,23,42,.12);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; }
  .nav-links li a { padding: 11px 14px; display: flex; }
  .nav-links .caret { display: none; }

  /* Accordion instead of hover menus on touch. */
  .has-drop { display: flex; flex-wrap: wrap; align-items: center; }
  .has-drop > a { flex: 1; }
  .drop-toggle {
    display: block; width: 42px; height: 42px; flex-shrink: 0;
    background: none; border: none; cursor: pointer; position: relative;
    border-radius: 8px;
  }
  .drop-toggle::after {
    content: '▾'; position: absolute; inset: 0;
    display: grid; place-items: center;
    font-size: 12px; color: var(--text3); transition: transform .2s;
  }
  .has-drop.open .drop-toggle::after { transform: rotate(180deg); }
  .dropdown {
    position: static; width: 100%; order: 3;
    min-width: 0; padding: 4px 0 8px 12px; margin: 0;
    background: none; border: none; box-shadow: none; border-radius: 0;
    border-left: 2px solid var(--border);
    display: none; opacity: 1; visibility: visible; transform: none;
  }
  .has-drop.open > .dropdown { display: block; }
  .has-drop:hover > .dropdown { display: none; }
  .has-drop.open:hover > .dropdown { display: block; }
  .has-drop::after { display: none; }
  .dropdown a { padding: 9px 12px; font-size: 13.5px; }
}
@media (max-width: 768px) {
  .nav-right .btn-outline { display: none; }
  .section, .page-hero, .tool-page { padding: 60px 20px; }
  .path-grid { grid-template-columns: 1fr; }
  .editor-body { grid-template-columns: 1fr; }
  .editor-preview { display: none; }
  .featured-inner { grid-template-columns: 1fr; padding: 60px 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer { padding: 40px 20px; }
  .cta-inner { padding: 60px 20px; }
  .editor-wrap { padding: 60px 20px; }
  .progress-cta { padding: 32px 22px; }
  .auth-card { padding: 32px 24px; }
  .auth-wrap { padding: 40px 18px 64px; }
  .flash-banner { margin: 12px 18px 0; }
  .acct-recent-row { flex-wrap: wrap; }
  .acct-recent-date { width: 100%; padding-left: 36px; }
}

/* ===== ROADMAP CARDS (homepage section) ===== */
.roadmap-section { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.roadmap-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.rm-home-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 24px 20px; transition: all .25s;
  position: relative; overflow: hidden;
}
.rm-home-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--rm-c, var(--accent)); transform: scaleX(0);
  transform-origin: left; transition: transform .3s;
}
.rm-home-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(15,23,42,.09); border-color: var(--border2); }
.rm-home-card:hover::before { transform: scaleX(1); }
.rm-home-card-icon { font-size: 30px; margin-bottom: 12px; display: block; }
.rm-home-card-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.rm-home-card-desc { font-size: 12px; color: var(--text3); line-height: 1.55; margin-bottom: 12px; }
.rm-home-card-footer { display: flex; align-items: center; justify-content: space-between; }
.rm-home-card-count { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text3); }
.rm-home-card-arrow { font-size: 13px; color: var(--rm-c, var(--accent)); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
.fade-up { animation: fadeUp .6s ease forwards; }
.fade-up-2 { animation: fadeUp .6s .15s ease both; }
.fade-up-3 { animation: fadeUp .6s .3s ease both; }


/* ===== ADMIN PANELS ===== */
.panel-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; margin-bottom: 22px;
}
.panel-head {
  background: var(--accent); color: #fff; padding: 13px 20px;
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.panel-head i { opacity: .9; }
.panel-head-note { font-size: 12px; font-weight: 500; opacity: .75; }
.panel-body { padding: 24px 22px; }
.panel-body-tight { padding-top: 4px; }
.panel-note { font-size: 13.5px; color: var(--text2); line-height: 1.65; margin-bottom: 18px; }
.panel-subhead {
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700;
  margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--border);
}
.panel-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.panel-actions.spread { justify-content: flex-start; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }

/* form controls inside panels */
.panel-card .field { margin-bottom: 18px; }
.panel-card label,
.panel-card .label-text { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 7px; }
.panel-card input[type="text"], .panel-card input[type="email"], .panel-card input[type="url"],
.panel-card input[type="number"], .panel-card input[type="password"], .panel-card select, .panel-card textarea {
  width: 100%; padding: 10px 13px; font-size: 14px;
  font-family: 'Outfit', sans-serif; color: var(--text);
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 8px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.panel-card textarea { resize: vertical; line-height: 1.6; }
.panel-card input:focus, .panel-card select:focus, .panel-card textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,.16);
}
.panel-card input[type="file"] {
  width: 100%; font-size: 13px; padding: 8px;
  border: 1px solid var(--border2); border-radius: 8px; background: var(--bg);
}
.code-area {
  font-family: 'DM Mono', monospace !important; font-size: 12.5px !important;
  line-height: 1.7 !important; background: var(--bg2) !important;
}
.panel-card code {
  font-family: 'DM Mono', monospace; font-size: 12px;
  background: rgba(108,99,255,.1); color: #5b21b6; padding: 1px 5px; border-radius: 4px;
}

.check-row { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.check-row input { width: auto !important; margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.check-row span { display: flex; flex-direction: column; gap: 3px; }
.check-row strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.check-row em { font-style: normal; font-size: 12.5px; color: var(--text3); line-height: 1.55; }
.check-row.compact { margin-bottom: 8px; }

/* ===== RADIO CARDS ===== */
.radio-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 12px; }
.radio-card {
  border: 1px solid var(--border2); border-radius: 10px; padding: 15px 16px;
  cursor: pointer; display: flex; flex-direction: column; gap: 5px; transition: all .18s;
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card strong { font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.radio-card em { font-style: normal; font-size: 12.5px; color: var(--text3); line-height: 1.5; }
.radio-card.sel { border-color: var(--accent); background: rgba(108,99,255,.06); box-shadow: 0 0 0 3px rgba(108,99,255,.12); }

/* ===== BUTTONS ===== */
.btn-danger-sm {
  background: #dc2626; color: #fff; border: none; border-radius: 8px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: 'Outfit', sans-serif; display: inline-flex; align-items: center; gap: 7px;
}
.btn-danger-sm:hover { filter: brightness(.92); }
.btn-toggle {
  border: none; border-radius: 8px; padding: 10px 18px;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  font-family: 'Outfit', sans-serif; color: #fff;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-toggle.off-green { background: #16a34a; }
.btn-toggle.on        { background: #475569; }
.btn-toggle.warn      { background: #f0a020; color: #3d2800; }
.btn-toggle.on-red    { background: #dc2626; }
.btn-toggle:hover { filter: brightness(.93); }
.btn-mini {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 6px;
  padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Outfit', sans-serif; color: var(--text2); text-decoration: none;
  display: inline-block;
}
.btn-mini:hover { border-color: var(--accent); color: var(--accent); }
.btn-mini.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-mini.warn { background: #f0a020; border-color: #f0a020; color: #3d2800; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline-block; margin: 0; }

/* ===== SYSTEM TOGGLES / STATUS ===== */
.sys-toggles { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 16px; }
.sys-toggle-form { margin: 0; }
.sys-status {
  border-radius: 10px; padding: 13px 16px; font-size: 13.5px; line-height: 1.6;
  background: var(--bg2); border: 1px solid var(--border);
}
.sys-status strong { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; }
.sys-status.ok { background: rgba(67,233,123,.1); border-color: rgba(16,145,74,.32); color: #0f6a37; }
.sys-status.warn { background: rgba(247,151,30,.1); border-color: rgba(180,83,9,.3); color: #8a4b06; }
.sys-status.muted { color: var(--text2); }
.sys-status-sub { font-size: 12.5px; margin-top: 5px; opacity: .85; }
.img-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.img-preview img { max-height: 46px; width: auto; border-radius: 6px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.admin-table thead { background: var(--accent); color: #fff; }
.admin-table th { text-align: left; padding: 11px 14px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.admin-table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:hover { background: var(--bg2); }
.empty-cell { text-align: center; color: var(--text3); padding: 32px !important; }
.email-cell { color: var(--accent); font-weight: 600; }
.actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ad-thumb { max-height: 34px; width: auto; border-radius: 4px; border: 1px solid var(--border); }
.tiny { font-size: 11.5px; }
.muted-text { color: var(--text3); }

.pill {
  display: inline-block; padding: 3px 9px; border-radius: 5px;
  font-size: 11.5px; font-weight: 700;
  background: var(--bg3); color: var(--text2);
}
.pill.ok { background: rgba(67,233,123,.2); color: #0f6a37; }
.pill.warn { background: rgba(247,151,30,.2); color: #8a4b06; }
.pill.danger { background: rgba(220,38,38,.14); color: #b91c1c; }
.pill.muted { background: var(--bg3); color: var(--text3); }

.admin-stat-num.good { color: #0f6a37; }
.admin-stat-num.warn { color: #8a4b06; }
.admin-stat-num.danger { color: #b91c1c; }
.admin-stat-num.muted { color: var(--text3); }

.maint-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 13px;
}
.maint-note { margin-left: auto; font-size: 12px; color: var(--text3); }
.filter-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-tabs .cat-tab { text-decoration: none; }
.pager-wrap { margin-top: 18px; display: flex; justify-content: center; }
.blocked-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.blocked-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.blocked-list em { display: block; }

/* ===== CRON URL ===== */
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row input {
  flex: 1; min-width: 0; font-family: 'DM Mono', monospace !important;
  font-size: 12px !important; background: var(--bg2) !important;
}
.cron-snippet {
  background: #0d1117; color: #e6edf3; border-radius: 8px;
  padding: 12px 14px; font-family: 'DM Mono', monospace; font-size: 11.5px;
  overflow-x: auto; margin: 0 0 6px; line-height: 1.6;
}

/* ===== ADS ON THE PUBLIC SITE (header + footer only) ===== */
.ad-bar { width: 100%; display: flex; justify-content: center; padding: 12px 20px; }
.ad-bar-header { background: var(--bg2); border-bottom: 1px solid var(--border); }
.ad-bar-footer { background: var(--bg2); border-top: 1px solid var(--border); }
.ad-slot { display: flex; flex-direction: column; gap: 12px; align-items: center; width: 100%; max-width: 1100px; }

.ad-unit {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.ad-unit:hover { border-color: var(--border2); box-shadow: 0 8px 24px rgba(15,23,42,.08); }

/* Small "Ad" marker so the unit is clearly labelled as paid placement. */
.ad-label {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text3); background: rgba(255,255,255,.85);
  border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px;
  backdrop-filter: blur(4px); pointer-events: none;
}

.ad-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 18px; text-decoration: none; color: inherit;
}

/* The whole point of the fix: the banner is bounded by HEIGHT, so a big
   upload becomes a leaderboard strip instead of a full-page image. */
.ad-media { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.ad-unit img {
  max-width: 100%;
  max-height: 90px;          /* header/footer leaderboard height */
  width: auto; height: auto;
  object-fit: contain;
  display: block; border-radius: 6px;
}

.ad-copy { flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.ad-headline {
  font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700;
  color: var(--text); line-height: 1.3; max-width: 320px;
}
.ad-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 600;
  padding: 9px 18px; border-radius: 9px;
  white-space: nowrap; transition: filter .18s, transform .18s;
}
.ad-inner:hover .ad-cta { filter: brightness(.93); transform: translateX(2px); }

/* Raw ad-network code gets a plain box — no padding fighting the iframe. */
.ad-type-code .ad-inner { padding: 10px; justify-content: center; }

.nav-logo-img { max-height: 34px; width: auto; }

@media (max-width: 720px) {
  .ad-inner { flex-direction: column; gap: 12px; text-align: center; padding: 14px; }
  .ad-copy { align-items: center; }
  .ad-headline { max-width: none; }
  .ad-unit img { max-height: 70px; }
}
@media (max-width: 860px) {
  .sys-toggles { justify-content: flex-start; }
  .maint-note { margin-left: 0; width: 100%; }
}

/* ===== FOOTER NEWSLETTER ===== */
.news-form { margin-top: 20px; max-width: 280px; }
.news-form > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text2); margin-bottom: 8px; }
.news-row { display: flex; gap: 8px; }
.news-row input {
  flex: 1; min-width: 0; padding: 9px 12px; font-size: 13.5px;
  font-family: 'Outfit', sans-serif; color: var(--text);
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 8px; outline: none;
}
.news-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,.16); }
.news-row button { padding: 9px 16px; font-size: 13.5px; white-space: nowrap; }
/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }.news-note { font-size: 12.5px; line-height: 1.55; margin-bottom: 10px; padding: 8px 11px; border-radius: 7px; }
.news-note.good { background: rgba(67,233,123,.12); border: 1px solid rgba(16,145,74,.32); color: #0f6a37; }
.news-note.bad { background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.3); color: #b91c1c; }
/* ===== FILE INPUT ===== */
.file-field {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1.5px dashed var(--border2);
  border-radius: 10px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.file-field.over { border-color: var(--accent); background: rgba(108,99,255,.06); }
.file-field.has-file { border-style: solid; background: var(--bg); }
/* Keep the native input focusable (not display:none) but out of sight. */
.file-field input[type="file"] {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.file-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,.16); }

/* label.file-btn keeps this above `.panel-card label { display:block }`. */
.file-field label.file-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-family: 'Outfit', sans-serif; font-size: 13.5px; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  margin: 0;
  transition: filter .18s;
}
.file-field label.file-btn:hover { filter: brightness(.93); }
.file-field label.file-btn i { font-size: 12px; }

.file-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.file-thumb { flex-shrink: 0; }
.file-thumb img {
  width: 34px; height: 34px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border2); display: block;
}
.file-name {
  font-size: 13px; color: var(--text3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.file-name.has-file { color: var(--text); font-weight: 500; }

.file-clear {
  flex-shrink: 0; width: 28px; height: 28px;
  display: grid; place-items: center;
  background: none; border: none; border-radius: 7px; cursor: pointer;
  color: var(--text3); font-size: 13px;
  transition: color .18s, background .18s;
}
.file-clear:hover { color: #b91c1c; background: rgba(220,38,38,.1); }

@media (max-width: 520px) {
  .file-field { align-items: flex-start; }
  .file-info { width: 100%; }
}

/* ===== AD FORM PREVIEW ===== */
.ad-preview-wrap { margin-top: 6px; margin-bottom: 18px; }
.ad-preview-wrap .ad-bar { padding: 14px; border: 1px dashed var(--border2); }
.pv-placeholder {
  display: grid; place-items: center;
  width: 260px; height: 62px; border-radius: 6px;
  background: var(--bg3); color: var(--text3);
  font-size: 12.5px; font-weight: 600;
}
.opt {
  font-size: 11px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: .05em; margin-left: 6px;
}
/* ===== AUTHOR / POST FORM LAYOUT ===== */
.profile-grid { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 32px; padding: 26px 24px; }
.profile-avatar { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.avatar-preview { width: 120px; height: 120px; }
.avatar-preview img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border2);
}
.avatar-fallback {
  width: 120px; height: 120px; border-radius: 50%;
  background: #163a5f; color: #fff; display: grid; place-items: center; font-size: 44px;
}
.profile-fields { min-width: 0; }

.slug-row { display: flex; align-items: stretch; }
.slug-prefix {
  display: flex; align-items: center; padding: 0 10px;
  background: var(--bg3); border: 1px solid var(--border2); border-right: none;
  border-radius: 8px 0 0 8px;
  font-family: 'DM Mono', monospace; font-size: 11.5px; color: var(--text3);
  white-space: nowrap; max-width: 55%;
}
.slug-row input { border-radius: 0 8px 8px 0 !important; }

.au-row { display: flex; align-items: center; gap: 10px; }
.au-thumb { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.au-thumb-fallback {
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
}
.au-row span { display: flex; flex-direction: column; }

/* ===== BLOG LISTING ===== */
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; transition: all .22s;
}
.post-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,23,42,.10); }
.post-card-media {
  display: block; aspect-ratio: 16 / 9; background: var(--bg3);
  overflow: hidden; position: relative;
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; }
.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); background: rgba(108,99,255,.1);
  padding: 4px 10px; border-radius: 100px;
}
.post-card-title { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; line-height: 1.35; margin: 0; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt { font-size: 13.5px; color: var(--text2); line-height: 1.6; margin: 0; }
.post-card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--text3); margin-top: auto; padding-top: 8px;
}
.post-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border2); }
.post-author { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); font-weight: 500; }
.post-author img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.post-author:hover { color: var(--accent); }

/* ===== SINGLE POST ===== */
.post-article { margin: 0 auto; }
.post-header { margin-bottom: 26px; }
.post-header h1 {
  font-family: 'Syne', sans-serif; font-size: clamp(26px, 4vw, 40px);
  font-weight: 800; line-height: 1.2; margin: 12px 0 18px;
}
.post-byline { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.post-byline .post-author { align-items: center; gap: 10px; }
.post-byline .post-author img { width: 40px; height: 40px; }
.post-byline .post-author span { display: flex; flex-direction: column; }
.post-byline .post-author strong { font-size: 14px; color: var(--text); }
.post-byline .post-author em { font-style: normal; font-size: 12px; color: var(--text3); }
.post-byline-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text3); }
.post-byline-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border2); }
.post-cover { width: 100%; border-radius: 14px; margin-bottom: 28px; }

.post-body { font-size: 16.5px; line-height: 1.8; color: var(--text2); }
.post-body h2 {
  font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800;
  color: var(--text); margin: 38px 0 14px; line-height: 1.3;
}
.post-body h3 {
  font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 700;
  color: var(--text); margin: 30px 0 12px;
}
.post-body p { margin: 0 0 18px; }
.post-body a { color: var(--accent); text-decoration: underline; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0; }
.post-body blockquote {
  border-left: 3px solid var(--accent); background: rgba(108,99,255,.05);
  padding: 14px 20px; margin: 22px 0; border-radius: 0 10px 10px 0;
  font-style: italic; color: var(--text2);
}
.post-body code {
  font-family: 'DM Mono', monospace; font-size: 13.5px;
  background: rgba(108,99,255,.1); border: 1px solid rgba(108,99,255,.2);
  padding: 1px 6px; border-radius: 4px; color: #5b21b6;
}
/* Highlighted blocks are styled by /assets/prism/vscode-dark.css. This is the
   fallback for any block Prism could not claim. */
.post-body pre:not([class*="language-"]) {
  background: #1e1e1e; border: 1px solid #2d2d2d; border-radius: 10px;
  padding: 20px 22px; overflow-x: auto; margin: 22px 0;
}
/* Beats `.post-body code`, so untokenised text is never the inline-code purple. */
.post-body pre code {
  background: none; border: none; padding: 0; color: #d4d4d4; font-size: 13.5px;
}
.post-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.post-body th { background: var(--bg2); font-weight: 700; color: var(--text); }

.post-authorbox {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; margin: 40px 0 0;
}
.post-authorbox img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pab-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); }
.pab-name { display: inline-block; font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--text); margin: 4px 0 2px; }
.pab-name:hover { color: var(--accent); }
.pab-pos { display: block; font-size: 13px; color: var(--text3); margin-bottom: 8px; }
.post-authorbox p { font-size: 14px; color: var(--text2); line-height: 1.65; margin: 0 0 10px; }
.pab-link { font-size: 13.5px; font-weight: 600; color: var(--accent); }

.post-related { max-width: 760px; margin: 52px auto 0; }
.post-related h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 20px; }

/* ===== AUTHOR DIRECTORY ===== */
.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.author-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 22px; transition: all .22s;
}
.author-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,.09); }
.author-avatar { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; }
.author-avatar-fallback {
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 30px;
}
.author-name { font-family: 'Syne', sans-serif; font-size: 16.5px; font-weight: 700; color: var(--text); }
.author-position { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.author-bio { font-size: 13px; color: var(--text2); line-height: 1.55; }
.author-count { font-size: 12px; color: var(--text3); font-family: 'DM Mono', monospace; margin-top: 4px; }

/* ===== AUTHOR PAGE ===== */
.author-hero {
  display: flex; gap: 28px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; margin-bottom: 34px;
}
.author-hero-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; flex-shrink: 0; font-size: 42px; }
.author-hero-body { min-width: 0; flex: 1; }
.author-hero-body h1 { font-family: 'Syne', sans-serif; font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; margin: 0 0 6px; }
.author-hero-pos { font-size: 14.5px; font-weight: 600; color: var(--accent); margin: 0 0 12px; }
.author-hero-bio { font-size: 15px; color: var(--text2); line-height: 1.75; margin: 0 0 16px; max-width: 640px; }
.author-hero-count { font-size: 13px; color: var(--text3); font-family: 'DM Mono', monospace; margin: 14px 0 0; }
.author-socials { display: flex; gap: 9px; flex-wrap: wrap; }
.author-socials a {
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text2); font-size: 14px; transition: all .18s;
}
.author-socials a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }

.author-section { margin-bottom: 34px; }
.author-section-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
}
.author-section-head h2 { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 800; margin: 0; }
.author-section-count {
  font-size: 11.5px; font-weight: 700; color: var(--accent);
  background: rgba(108,99,255,.12); padding: 3px 9px; border-radius: 100px;
}
.author-section-link { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent); }
.author-post-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.author-post-list li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 12px 14px; border-radius: 10px; transition: background .18s;
}
.author-post-list li:hover { background: var(--bg2); }
.author-post-list li > a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.apl-title { font-size: 15px; font-weight: 600; color: var(--text); }
.author-post-list li:hover .apl-title { color: var(--accent); }
.apl-excerpt { font-size: 13px; color: var(--text3); line-height: 1.5; }
.author-post-list time { font-size: 12.5px; color: var(--text3); font-family: 'DM Mono', monospace; white-space: nowrap; flex-shrink: 0; }

/* ===== BLOG SIDEBAR (ads) ===== */
.layout-with-sidebar {
  display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 30px;
  max-width: 1280px; margin: 0 auto; padding: 0 20px; margin-bottom: 40px;
}
.layout-main { min-width: 0; }
.layout-main .tool-page { padding-left: 0; padding-right: 0; max-width: none; }
.layout-sidebar { position: sticky; top: 90px; align-self: start; padding-top: 60px; }
.ad-slot-sidebar { align-items: stretch; max-width: none; }
.ad-slot-sidebar .ad-inner { flex-direction: column; text-align: center; gap: 14px; }
.ad-slot-sidebar .ad-unit img { max-height: 250px; }
.ad-slot-sidebar .ad-copy { align-items: center; }
.ad-slot-in-content { margin: 26px 0; max-width: none; }
.ad-slot-in-content .ad-unit img { max-height: 200px; }

@media (max-width: 1024px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .layout-sidebar { position: static; padding-top: 0; padding-bottom: 40px; }
}
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; gap: 22px; }
  .author-hero { flex-direction: column; align-items: center; text-align: center; padding: 26px 20px; }
  .author-socials { justify-content: center; }
  .author-hero-bio { text-align: left; }
  .post-authorbox { flex-direction: column; align-items: center; text-align: center; }
  .author-post-list li { flex-direction: column; gap: 4px; }
  .slug-prefix { display: none; }
  .slug-row input { border-radius: 8px !important; }
}

/* ===== MEDIA LIBRARY ===== */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 18px; }
.media-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
}
.media-thumb {
  display: block; width: 100%; aspect-ratio: 4/3; background: var(--bg3);
  border: none; padding: 0; cursor: pointer; overflow: hidden;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-meta { padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.media-name { font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-size { font-size: 11.5px; color: var(--text3); font-family: 'DM Mono', monospace; }
.media-actions { display: flex; gap: 6px; padding: 0 12px 12px; margin-top: auto; }
.media-actions .btn-mini { flex: 1; text-align: center; }

/* Media picker modal */
.media-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.media-modal[hidden] { display: none; }
.media-modal-box {
  background: var(--surface); border-radius: 16px;
  width: min(920px, 100%); max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(15,23,42,.3);
}
.media-modal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.media-modal-head strong { flex: 1; font-size: 15px; display: flex; align-items: center; gap: 9px; }
.media-close {
  background: none; border: none; font-size: 26px; line-height: 1;
  color: var(--text3); cursor: pointer; padding: 0 4px;
}
.media-close:hover { color: var(--text); }
.media-modal-body {
  padding: 18px 20px 22px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px;
}
.media-modal-body > .field-hint { grid-column: 1 / -1; }

/* ===== RESPONSIVE TABLES IN POSTS ===== */
.table-responsive {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 22px 0; border: 1px solid var(--border); border-radius: 10px;
}
.table-responsive:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table-responsive > table { margin: 0; border: none; min-width: 520px; }
.post-body .table-responsive th,
.post-body .table-responsive td { border: none; border-bottom: 1px solid var(--border); }
.post-body .table-responsive thead th {
  background: var(--bg2); font-weight: 700; color: var(--text);
  position: sticky; top: 0; white-space: nowrap;
}
.post-body .table-responsive tbody tr:last-child td { border-bottom: none; }
.post-body .table-responsive tbody tr:hover { background: var(--bg2); }
/* ===== BLOG SIDEBAR WIDGETS ===== */
.layout-sidebar { display: flex; flex-direction: column; gap: 20px; }
.side-widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
}
.side-widget-ad { padding: 0; background: none; border: none; }
.side-title {
  display: flex; align-items: center; gap: 9px;
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text);
  margin: 0 0 14px; padding-bottom: 11px; border-bottom: 1px solid var(--border);
}
.side-title i { color: var(--accent); font-size: 13px; }

.side-list { list-style: none; display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; }
.side-list li { margin: 0; }
.side-list a { display: block; padding: 9px 10px; border-radius: 9px; transition: background .16s; }
.side-list a:hover { background: var(--bg2); }
.side-post-title {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--text);
  line-height: 1.45; margin-bottom: 3px;
}
.side-list a:hover .side-post-title { color: var(--accent); }
.side-post-meta { display: block; font-size: 11.5px; color: var(--text3); }

/* Popular: numbered */
.side-list-ranked li { display: flex; align-items: flex-start; gap: 11px; padding: 4px 0; }
.side-list-ranked a { flex: 1; min-width: 0; padding: 5px 8px; }
.side-rank {
  flex-shrink: 0; width: 24px; height: 24px; margin-top: 6px;
  display: grid; place-items: center; border-radius: 7px;
  background: rgba(108,99,255,.1); color: var(--accent);
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 12px;
}
.side-list-ranked li:first-child .side-rank { background: var(--accent); color: #fff; }

/* Recent: thumbnail + title */
.side-recent { display: flex; gap: 11px; align-items: flex-start; }
.side-recent img,
.side-recent-fallback {
  width: 54px; height: 46px; border-radius: 7px; object-fit: cover; flex-shrink: 0;
}
.side-recent-fallback { display: grid; place-items: center; background: var(--bg3); font-size: 19px; }
.side-recent > span { min-width: 0; }

.side-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.side-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 100px;
  border: 1px solid var(--border2); background: var(--bg2);
  font-size: 12.5px; font-weight: 600; color: var(--text2); transition: all .18s;
}
.side-tag span {
  font-size: 11px; font-weight: 700; color: var(--text3);
  background: var(--surface); padding: 1px 6px; border-radius: 100px;
}
.side-tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(108,99,255,.06); }
.side-tag:hover span { color: var(--accent); }

.side-widget-cta { background: linear-gradient(160deg, rgba(108,99,255,.09), rgba(255,101,132,.06)); border-color: rgba(108,99,255,.22); }
.side-widget-cta p { font-size: 13px; color: var(--text2); line-height: 1.6; margin: 0 0 13px; }
.side-news { display: flex; flex-direction: column; gap: 9px; }
.side-news input[type="email"] {
  width: 100%; padding: 10px 13px; font-size: 13.5px;
  font-family: 'Outfit', sans-serif; color: var(--text);
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 9px; outline: none;
}
.side-news input[type="email"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,.16); }
.side-news button { width: 100%; justify-content: center; }

/* The in-content ad gets breathing room inside the article */
.post-body .ad-slot-in-content { margin: 30px 0; }
/* ===== POST EDITOR: full-width writing area ===== */
/* The old two-column admin-grid squeezed TinyMCE to ~580px. The editor now
   spans the page and the settings sit in a row underneath. */
.post-editor { display: flex; flex-direction: column; gap: 22px; }
.post-editor > .panel-card { margin-bottom: 0; }
.post-editor-settings {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px; align-items: start;
}
.post-editor-settings > .panel-card { margin-bottom: 0; }

/* Give the editor page more room than a normal admin screen. */
.post-editor-page { max-width: 1500px; }

/* Sticky action bar */
.editor-bar {
  position: sticky; top: 68px; z-index: 50;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(15,23,42,.07);
}
.editor-bar-title {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.editor-bar-title i { color: var(--accent); flex-shrink: 0; }
.editor-bar .btn { padding: 8px 16px; font-size: 13.5px; }

/* TinyMCE fills its container */
.post-editor .tox-tinymce {
  width: 100% !important;
  border-radius: 10px !important;
  border-color: var(--border2) !important;
}
.post-editor .tox .tox-editor-header { z-index: 40; }

@media (max-width: 700px) {
  .editor-bar { position: static; }
  .editor-bar-title { width: 100%; flex: none; }
}
/* ===== PROJECTS ARCHIVE ===== */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.project-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; transition: all .22s;
}
.project-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,23,42,.10); }
.project-card-media { display: block; aspect-ratio: 16/10; background: var(--bg3); position: relative; overflow: hidden; }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'DM Mono', monospace; font-size: 30px; color: var(--text3);
}
.project-card-body { padding: 17px 19px 19px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.project-card-title { font-family: 'Syne', sans-serif; font-size: 16.5px; font-weight: 700; line-height: 1.35; margin: 0; }
.project-card-title a { color: var(--text); }
.project-card-title a:hover { color: var(--accent); }
.project-card-excerpt { font-size: 13px; color: var(--text2); line-height: 1.6; margin: 0; }
.project-card-meta {
  display: flex; gap: 14px; font-size: 12px; color: var(--text3);
  margin-top: auto; padding-top: 8px;
}

/* Tags — tech ones colour-coded */
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tag {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: var(--bg3); color: var(--text2); border: 1px solid transparent;
}
a.project-tag:hover { border-color: currentColor; }
.project-tag.tag-html { background: rgba(227,76,38,.12); color: #b93b1d; }
.project-tag.tag-css { background: rgba(38,77,228,.12); color: #264de4; }
.project-tag.tag-javascript { background: rgba(247,223,30,.2); color: #7a6000; }
.project-tag.tag-no-js { background: rgba(15,23,42,.07); color: var(--text3); }

/* ===== SINGLE PROJECT ===== */
.project-page { padding-bottom: 110px; }   /* room for the sticky bar */
.project-head { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.project-head h1 { font-family: 'Syne', sans-serif; font-size: clamp(24px,3.4vw,36px); font-weight: 800; line-height: 1.2; margin: 0 0 10px; }
.project-lede { font-size: 15.5px; color: var(--text2); line-height: 1.7; margin: 0 0 12px; max-width: 640px; }
.project-head-meta { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--text3); }
.project-head-meta a { color: var(--text3); }
.project-head-meta a:hover { color: var(--accent); }

.project-preview { border: 1px solid var(--border2); border-radius: 14px; overflow: hidden; margin-bottom: 28px; }
.project-preview-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--bg3); padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.pp-dots { display: flex; gap: 6px; }
.pp-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--border2); display: block; }
.pp-label { font-size: 12.5px; font-weight: 600; color: var(--text3); }
.pp-sizes { display: flex; gap: 4px; margin-left: auto; }
.pp-sizes button {
  width: 32px; height: 30px; border-radius: 7px; cursor: pointer;
  background: none; border: 1px solid transparent; color: var(--text3); font-size: 13px;
}
.pp-sizes button:hover { background: var(--surface); color: var(--text); }
.pp-sizes button.active { background: var(--surface); border-color: var(--border2); color: var(--accent); }
.pp-open { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.project-preview-stage { background: #fff; display: flex; justify-content: center; padding: 0; }
#projectFrame { width: 100%; height: 520px; border: 0; display: block; transition: width .25s; background: #fff; }

.project-description { margin-bottom: 30px; }

.project-source { border: 1px solid var(--border2); border-radius: 14px; overflow: hidden; margin-bottom: 34px; }
.code-tabs { display: flex; align-items: center; gap: 4px; background: var(--bg3); padding: 9px 12px; border-bottom: 1px solid var(--border); }
.code-tab {
  padding: 6px 14px; border-radius: 7px; cursor: pointer;
  background: none; border: none;
  font-family: 'DM Mono', monospace; font-size: 12.5px; color: var(--text3);
}
.code-tab:hover { color: var(--text2); }
.code-tab.active { background: var(--surface); color: var(--accent); font-weight: 600; }
.code-copy {
  margin-left: auto; background: none; border: 1px solid var(--border2);
  border-radius: 7px; padding: 5px 12px; cursor: pointer;
  font-family: 'Outfit', sans-serif; font-size: 12.5px; color: var(--text2);
}
.code-copy:hover { border-color: var(--accent); color: var(--accent); }
.code-pane { margin: 0; background: #0d1117; padding: 20px 22px; overflow-x: auto; max-height: 520px; }
.code-pane code { font-family: 'DM Mono', monospace; font-size: 13px; color: #e6edf3; line-height: 1.7; }
.code-pane[hidden] { display: none; }
.admin-code-tabs { border-radius: 8px 8px 0 0; }
.code-editor-pane[hidden] { display: none; }

/* Sticky download bar */
.download-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(255,255,255,.96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 26px rgba(15,23,42,.09);
}
.download-bar-inner {
  max-width: 1280px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.db-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.db-info strong { font-family: 'Syne', sans-serif; font-size: 14.5px; color: var(--text); }
.db-info span { font-family: 'DM Mono', monospace; font-size: 11.5px; color: var(--text3); }
.db-btn { padding: 11px 24px; font-size: 14.5px; }

/* ===== TAG PICKER (admin) ===== */
.tag-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-check { position: relative; margin: 0 !important; }
.tag-check input { position: absolute; opacity: 0; pointer-events: none; }
.tag-check span {
  display: inline-block; padding: 6px 13px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--border2); background: var(--bg2);
  font-size: 12.5px; font-weight: 600; color: var(--text2); transition: all .16s;
}
.tag-check input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== LEARN PAGE CROSS-LINKS ===== */
.path-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 24px; margin-top: 44px; }
.path-extra { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.path-extra-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.path-extra-head h2 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; margin: 0; flex: 1; display: flex; align-items: center; gap: 9px; }
.path-extra-head h2 i { color: var(--accent); font-size: 14px; }
.path-extra-head a { font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.path-extra-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.path-extra-list li { display: flex; align-items: baseline; gap: 14px; padding: 9px 10px; border-radius: 9px; }
.path-extra-list li:hover { background: var(--bg2); }
.path-extra-list li > a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pe-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; }
.path-extra-list li:hover .pe-title { color: var(--accent); }
.pe-desc { font-size: 12.5px; color: var(--text3); line-height: 1.5; }
.path-extra-list time { font-size: 12px; color: var(--text3); font-family: 'DM Mono', monospace; white-space: nowrap; }
.path-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.path-project { display: flex; flex-direction: column; gap: 8px; }
.path-project img, .path-project-fallback {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 9px;
  background: var(--bg3); display: grid; place-items: center;
  font-family: 'DM Mono', monospace; color: var(--text3); font-size: 18px;
}

@media (max-width: 700px) {
  .download-bar-inner { padding: 10px 16px; gap: 10px; }
  .db-info { flex: none; width: 100%; }
  .db-btn { width: 100%; justify-content: center; }
  .project-page { padding-bottom: 150px; }
  #projectFrame { height: 400px; }
}
/* ===== ADMIN: LEARNING PATHS ===== */
.path-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.path-admin-card {
  display: flex; align-items: center; gap: 15px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; transition: all .2s;
}
.path-admin-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15,23,42,.08); }
.path-admin-card.empty { border-style: dashed; }
.pac-icon { font-size: 26px; flex-shrink: 0; }
.pac-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pac-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; color: var(--text); }
.pac-slug { font-family: 'DM Mono', monospace; font-size: 11.5px; color: var(--text3); }
.pac-count { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; gap: 1px; }
.pac-count strong { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: var(--accent); }
.pac-count span { font-size: 11px; color: var(--text3); }
.pac-count em { font-style: normal; font-size: 12px; color: var(--text3); }

/* Chapter list with drag handles */
.chapter-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; }
.chapter-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.chapter-row:hover { border-color: var(--border2); }
.chapter-row.dragging { opacity: .45; border-style: dashed; border-color: var(--accent); }
.ch-handle { cursor: grab; color: var(--text3); font-size: 14px; flex-shrink: 0; padding: 4px; }
.ch-handle:active { cursor: grabbing; }
.ch-num {
  flex-shrink: 0; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 8px;
  background: var(--bg3); color: var(--text2);
  font-family: 'DM Mono', monospace; font-size: 12px; font-weight: 600;
}
.ch-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ch-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.ch-title:hover { color: var(--accent); }
.ch-meta { font-family: 'DM Mono', monospace; font-size: 11.5px; color: var(--text3); }
.ch-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

@media (max-width: 760px) {
  .chapter-row { flex-wrap: wrap; }
  .ch-body { flex-basis: 100%; order: 3; }
  .ch-actions { margin-left: auto; }
}
/* System Configuration — official profile links */
.social-grid {
  display: grid; gap: 12px; margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.social-field label {
  display: block; margin-bottom: 5px;
  font-size: 12px; font-weight: 600; color: var(--text2);
}
.social-field input {
  width: 100%; padding: 9px 11px; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
.social-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, .15);
}
/* ===== OUR NETWORK — footer button + modal ===== */
/* The footer on this site is white, so the button is tinted brand-on-light.
   White-on-translucent-white would be invisible here. */
.network-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  background: rgba(108,99,255,.10); border: 1px solid rgba(108,99,255,.32);
  /* A darkened --accent: the brand violet itself only reaches 3.9:1 on this
     tint and fails AA. Measured at 5.1:1. */
  color: #4a40c9; font-family: 'Outfit', sans-serif; font-size: 13.5px; font-weight: 600;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s;
}
.network-btn:hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 6px 18px rgba(108,99,255,.3);
}
.network-btn i { font-size: 12.5px; }

.network-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 20px; }
.network-modal[hidden] { display: none; }
.network-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }

.network-box {
  position: relative; width: min(620px, 100%);
  max-height: min(80vh, 720px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); box-shadow: 0 30px 70px rgba(15,23,42,.28);
  padding: 26px 26px 24px;
  animation: netIn .18s ease-out;
}
@keyframes netIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .network-box { animation: none; } }

.network-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.network-mark {
  flex: none; width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; color: #fff; font-size: 19px;
  background: var(--accent);
}
.network-head-text { flex: 1; min-width: 0; }
.network-head h2 {
  font-family: 'Syne', sans-serif; font-size: 21px; font-weight: 800;
  letter-spacing: -.01em; color: var(--text); margin: 2px 0 0;
}
.network-head p { margin: 3px 0 0; font-size: 13px; color: var(--text3); }
.network-head p a { color: var(--accent); font-weight: 600; }
.network-head p a:hover { text-decoration: underline; }

.network-close {
  flex: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: var(--bg2); border: 1px solid var(--border); color: var(--text2);
  transition: background .15s, color .15s;
}
.network-close:hover { background: var(--bg3); color: var(--text); }

.network-list { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.network-card {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px; border-radius: var(--r);
  background: var(--bg2); border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: border-color .16s, background .16s, transform .16s;
}
.network-card:hover {
  background: var(--surface); border-color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 10px 26px rgba(108,99,255,.14);
}
/* A featured site spans the full width and leads the list. */
.network-card.is-featured {
  grid-column: 1 / -1;
  border-color: rgba(108,99,255,.28);
}

.network-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 17px; color: #fff;
  background: var(--accent);
}
.network-card.is-featured .network-icon {
  background: var(--accent);
}

.network-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.network-text strong {
  font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700;
  color: var(--text); letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.network-text em {
  font-style: normal; font-size: 12.5px; color: var(--text3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.network-go { flex: none; font-size: 12px; color: var(--text3); transition: color .16s; }
.network-card:hover .network-go { color: var(--accent); }

@media (max-width: 560px) {
  .network-list { grid-template-columns: 1fr; }
  .network-box { padding: 20px 18px 18px; }
  .network-head h2 { font-size: 19px; }
}
/* ===== ADMIN — Our Network form ===== */
/* Matched on the element too: `.panel-card label { display:block }` outranks a
   bare `.switch-row`, which left the track inline and 2px wide. */
label.switch-row {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  margin-bottom: 0;
  font-size: 14.5px; font-weight: 600; color: var(--text);
}
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
/* inline-flex, not the default inline: a plain inline span ignores width, so
   the track would collapse again if the row ever stopped being a flex parent. */
.switch-track {
  display: inline-flex; flex: none;
  width: 44px; height: 25px; border-radius: 999px; position: relative;
  background: var(--bg3); border: 1px solid var(--border2);
  transition: background .18s, border-color .18s;
}
.switch-dot {
  position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.28);
  transition: transform .18s;
}
.switch-row input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch-row input:checked + .switch-track .switch-dot { transform: translateX(19px); }
.switch-row input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.net-rows { display: flex; flex-direction: column; gap: 10px; }

.net-row {
  display: grid; align-items: end; gap: 10px;
  grid-template-columns: 150px 1fr 1fr 1.3fr 78px 42px;
  padding: 12px 13px; border-radius: var(--r);
  background: var(--bg2); border: 1px solid var(--border);
}
.net-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.net-cell label {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text3);
}
.net-cell input[type="text"] {
  width: 100%; padding: 8px 10px; font-size: 13.5px; font-family: 'Outfit', sans-serif;
  border: 1px solid var(--border2); border-radius: 8px;
  background: var(--surface); color: var(--text);
}
.net-cell input[type="text"]:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}
.net-cell-icon input { font-family: 'DM Mono', monospace; font-size: 12.5px; }

/* Matches the height of a text input, so the labels across the row line up. */
.net-cell-flag input[type="checkbox"] {
  width: 19px; height: 19px; margin: 0; accent-color: var(--accent); cursor: pointer;
  align-self: flex-start;
}
/* 19px box + 7px above and below = the 33px a text input occupies. */
.net-cell-flag > input[type="checkbox"] { margin-block: 7px; }

.net-del {
  width: 38px; height: 38px; border-radius: 9px; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255,101,132,.09); border: 1px solid rgba(255,101,132,.32);
  color: var(--accent2); font-size: 14px;
  transition: background .15s, color .15s;
}
.net-del:hover { background: var(--accent2); color: #fff; }

#netAdd[disabled] { opacity: .5; cursor: not-allowed; }

@media (max-width: 1000px) {
  .net-row { grid-template-columns: 1fr 1fr; }
  .net-cell-url { grid-column: 1 / -1; }
  .net-del { grid-column: 2; justify-self: end; }
}
@media (max-width: 560px) {
  .net-row { grid-template-columns: 1fr; }
  .net-cell-url, .net-del { grid-column: 1; }
  .net-del { justify-self: start; }
}
/* ===== FOOTER — official profile links ===== */
.footer-social {
  display: flex; flex-wrap: wrap; gap: 9px;
  list-style: none; margin: 16px 0 0; padding: 0;
}
.footer-social a {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text2); font-size: 15px;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}
.footer-social a:hover {
  background: var(--accent); border-color: var(--accent);
  color: #fff; transform: translateY(-2px);
}
.footer-social a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
/* ===== PAGINATION ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.pager__num,
.pager__step {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--text2);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.pager__num:hover,
.pager__step:hover { background: var(--bg2); color: var(--text); }

.pager__num.is-current {
  background: var(--accent);
  color: #fff;
}

.pager__num.is-current:hover { background: var(--accent); color: #fff; }

.pager__step { font-size: 17px; line-height: 1; }
.pager__step.is-off { color: var(--border2); cursor: default; }
.pager__step.is-off:hover { background: none; color: var(--border2); }

.pager__num:focus-visible,
.pager__step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 520px) {
  .pager__num, .pager__step { min-width: 34px; height: 34px; padding: 0 8px; font-size: 13px; }
}

/* ===== LOAD MORE ===== */
.load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.load-more__count {
  font-size: 13px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

.load-more__track {
  width: min(220px, 60vw);
  height: 4px;
  border-radius: 999px;
  background: var(--bg3);
  overflow: hidden;
}

.load-more__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

.load-more__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 30px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}

.load-more__btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.load-more__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.load-more__btn[aria-busy="true"] { pointer-events: none; opacity: .7; }

.load-more__btn .spin {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: lm-spin .7s linear infinite;
  display: none;
}

.load-more__btn[aria-busy="true"] .spin { display: block; }
.load-more__btn[aria-busy="true"] .lm-label { opacity: .8; }

.load-more__done {
  font-size: 13.5px;
  color: var(--text3);
}

@keyframes lm-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .load-more__btn, .load-more__fill { transition: none; }
  .load-more__btn .spin { animation-duration: 2.4s; }
}

/* ==========================================================================
   USER COMMENT & DISCUSSION SYSTEM
   ========================================================================== */

.comments-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.comments-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comments-header-title h3 {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
}

.comments-count-pill {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent, #38bdf8);
}

.comments-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  background: var(--bg3, rgba(255,255,255,0.05));
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}

/* Auth Gate Prompt */
.comment-auth-gate {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--surface, #161e2e);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.cag-icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 12px;
  flex-shrink: 0;
}

.comment-unverified-gate .cag-icon {
  background: rgba(245, 158, 11, 0.1);
}

.cag-text {
  flex: 1;
  min-width: 220px;
}

.cag-text h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
}

.cag-text p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted, #94a3b8);
}

.cag-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Comment Form Card */
.comment-form-card {
  background: var(--surface, #161e2e);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 36px;
}

.comment-form-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #38bdf8), #6366f1);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comment-form-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.comment-form-user strong {
  font-size: 14px;
  color: var(--text, #f1f5f9);
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-admin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

.comment-form-card textarea {
  width: 100%;
  background: var(--bg2, #0b0f19);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text, #f1f5f9);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 90px;
  transition: border-color .16s, box-shadow .16s;
}

.comment-form-card textarea:focus {
  outline: none;
  border-color: var(--accent, #38bdf8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.comment-guideline {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.char-counter {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  font-family: monospace;
}

/* Comments List */
.comments-empty {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface, #161e2e);
  border: 1px dashed var(--border, rgba(255,255,255,0.1));
  border-radius: 12px;
  color: var(--text-muted, #94a3b8);
}

.comments-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.6;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--surface, #161e2e);
  border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: 12px;
  transition: border-color .16s;
}

.comment-item:hover {
  border-color: var(--border2, rgba(255,255,255,0.12));
}

.comment-admin {
  border-left: 3px solid var(--accent, #38bdf8);
  background: rgba(56, 189, 248, 0.03);
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #475569, #334155);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reply-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
  background: linear-gradient(135deg, var(--accent, #38bdf8), #6366f1);
}

.comment-content-box {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.comment-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #f1f5f9);
}

.comment-meta time {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

.btn-comment-delete {
  background: none;
  border: none;
  color: #ef4444;
  opacity: 0.6;
  font-size: 11.5px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: opacity .16s, background .16s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-comment-delete:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.1);
}

.comment-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary, #cbd5e1);
  word-break: break-word;
}

/* Replies styling */
.comment-replies {
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid var(--border, rgba(255,255,255,0.08));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-reply-item {
  padding: 12px 14px;
  background: rgba(0,0,0,0.2);
}

/* ==========================================================================
   ADMIN SECURITY & ACCOUNT DASHBOARD
   ========================================================================== */

.sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 28px;
  max-width: 1040px;
  margin-top: 10px;
}

.sec-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.sec-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.09);
}

.sec-card-header {
  padding: 20px 24px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  display: flex;
  align-items: center;
  gap: 14px;
}

.sec-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sec-icon-blue {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.sec-icon-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.sec-card-title {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.sec-card-subtitle {
  margin: 2px 0 0 0;
  font-size: 12.5px;
  color: #64748b;
}

.sec-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.sec-current-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  margin-bottom: 22px;
}

.sec-pulse-dot {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  box-shadow: 0 0 8px #16a34a;
  animation: sec-pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes sec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.sec-current-text {
  font-size: 13px;
  color: #166534;
  line-height: 1.4;
}

.sec-current-email {
  color: #0f172a;
  font-weight: 700;
  word-break: break-all;
}

.sec-form-group {
  margin-bottom: 20px;
}

.sec-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.sec-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.sec-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #64748b;
  pointer-events: none;
  transition: color .2s;
  z-index: 2;
}

.sec-input {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 44px 12px 42px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-family: inherit !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  letter-spacing: normal !important;
  transition: border-color .2s, box-shadow .2s, background .2s, color .2s;
}

.sec-input:focus {
  outline: none !important;
  background: #ffffff !important;
  border-color: #6366f1 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.15) !important;
}

.sec-input:-webkit-autofill,
.sec-input:-webkit-autofill:hover,
.sec-input:-webkit-autofill:focus,
.sec-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 50px #ffffff inset !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
  caret-color: #0f172a !important;
}

.sec-input-wrap:focus-within .sec-input-icon {
  color: #6366f1;
}

/* Hide browser default password reveal / clear buttons (Edge, IE, Chrome) */
::-ms-reveal,
::-ms-clear,
input::-ms-reveal,
input::-ms-clear,
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
.sec-input::-ms-reveal,
.sec-input::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
}

.sec-pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  cursor: pointer;
  padding: 8px 10px !important;
  font-size: 15px;
  line-height: 1;
  transition: color .18s, background .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 6px;
}

.sec-pwd-toggle:hover {
  color: #0f172a !important;
  background: #e2e8f0 !important;
}

.sec-hint {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

.sec-btn-submit {
  width: 100%;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  color: #fff;
  transition: transform .18s, box-shadow .18s, filter .18s;
  margin-top: 8px;
}

.sec-btn-blue {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.sec-btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  filter: brightness(1.05);
}

.sec-btn-amber {
  background: linear-gradient(135deg, #d97706, #ea580c);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.25);
}

.sec-btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35);
  filter: brightness(1.05);
}