/* ═══════════════════════════════════════════════════════════
   Promptathon — Main Stylesheet v3 (CSP‑safe, spacing fixed)
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: "SUSE";
  src: url("../fonts/SUSE-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SUSE";
  src: url("../fonts/SUSE-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900; font-style: italic; font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #000; --white: #fff;
  --g50: #fafafa; --g100: #f4f4f4; --g200: #e8e8e8;
  --g300: #d0d0d0; --g400: #a0a0a0; --g500: #707070; --g600: #505050;
  --b1: 1px solid #000; --b2: 2px solid #000; --b3: 3px solid #000;
  --nav-h: 60px; --sw: 248px;
  --font: "SUSE", system-ui, sans-serif;
  --t: 0.15s ease; --mw: 1120px; --px: 32px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--black);
  background: var(--white);
  line-height: 1.5;  /* Minimum 1.5x spacing for all text */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: underline; }
a:hover { opacity: 0.65; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* Headings with consistent bottom margin */
h1 { font-size: clamp(2.8rem,7vw,5.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.8rem,4vw,3rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.1rem,2vw,1.5rem); font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
p  { line-height: 1.5; margin-bottom: 1rem; }

/* Labels */
.label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g500);
  margin-bottom: 0.5rem;
}
.light-label {
  color: rgba(255,255,255,0.4);
}
.small { font-size: 0.82rem; color: var(--g500); }
.mono  { font-family: "Courier New", monospace; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; font-family: var(--font); font-size: 0.9rem; font-weight: 600; cursor: pointer; border: var(--b2); background: none; color: var(--black); text-decoration: none; transition: background var(--t), color var(--t); white-space: nowrap; line-height: 1; }
.btn:hover { background: var(--black); color: var(--white); opacity: 1; }
.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: #222; }
.btn-ghost { border-color: var(--g300); color: var(--g500); }
.btn-ghost:hover { border-color: var(--black); background: var(--black); color: var(--white); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.35; pointer-events: none; }

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  border: var(--b2);
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: box-shadow var(--t);
  appearance: none;
}
.input:focus, .textarea:focus, .select:focus { box-shadow: 3px 3px 0 var(--black); }
.input::placeholder, .textarea::placeholder { color: var(--g400); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23000'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-label { font-size: 0.83rem; font-weight: 600; }
.form-hint  { font-size: 0.78rem; color: var(--g500); }

/* OTP */
.otp-group { display: flex; gap: 10px; justify-content: center; }
.otp-input { width: 54px; height: 68px; font-size: 2rem; font-weight: 700; text-align: center; border: var(--b2); background: var(--white); font-family: var(--font); outline: none; transition: box-shadow var(--t); }
.otp-input:focus { box-shadow: 3px 3px 0 var(--black); }

/* Flash */
.flash-container { position: fixed; top: calc(var(--nav-h) + 12px); right: 20px; z-index: 9900; display: flex; flex-direction: column; gap: 8px; max-width: 380px; pointer-events: none; }
.flash { padding: 13px 18px; border: var(--b2); background: var(--white); font-size: 0.875rem; font-weight: 500; display: flex; align-items: flex-start; gap: 10px; box-shadow: 4px 4px 0 var(--black); pointer-events: all; }
.flash.success, .flash.error { background: var(--black); color: var(--white); }
.flash-close { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; font-size: 1.1rem; line-height: 1; padding: 0 0 0 4px; }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--nav-h); display: flex; align-items: center; padding: 0 var(--px); border-bottom: var(--b2); background: var(--white); gap: 8px; }
.nav-logo { font-size: 1.25rem; font-weight: 800; text-decoration: none; color: var(--black); letter-spacing: -0.02em; margin-right: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link { padding: 7px 14px; font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--g600); border: 1px solid transparent; transition: all var(--t); }
.nav-link:hover { color: var(--black); border-color: var(--black); opacity: 1; }
.nav-link.active { background: var(--black); color: var(--white); border-color: var(--black); }
.nav-cta { margin-left: 10px; padding: 9px 20px; background: var(--black); color: var(--white); font-size: 0.85rem; font-weight: 600; text-decoration: none; border: var(--b2); }
.nav-cta:hover { background: #222; opacity: 1; }
.nav-hamburger { display: none; background: none; border: var(--b2); cursor: pointer; padding: 7px 9px; flex-direction: column; gap: 5px; margin-left: auto; }
.nav-hamburger span { display: block; width: 20px; height: 2px; background: var(--black); }

.mobile-menu { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--white); border-bottom: var(--b3); z-index: 999; padding: 16px var(--px); flex-direction: column; gap: 6px; }
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { padding: 12px 16px; border: var(--b1); }
.mobile-menu .nav-cta  { margin: 4px 0 0; text-align: center; }

.page { padding-top: var(--nav-h); }
.container    { max-width: var(--mw); margin: 0 auto; padding: 0 var(--px); }
.container-sm { max-width: 740px; margin: 0 auto; padding: 0 var(--px); }
.section      { padding: 96px var(--px); max-width: var(--mw); margin: 0 auto; }
.section-full { padding: 96px var(--px); }

/* Hero */
.hero { min-height: calc(92vh - var(--nav-h)); display: flex; flex-direction: column; justify-content: flex-end; padding: 64px var(--px) 56px; border-bottom: var(--b3); max-width: var(--mw); margin: 0 auto; }
.hero-eyebrow { margin-bottom: 28px; }
.hero h1      { margin-bottom: 28px; }
.hero-sub     { font-size: 1.15rem; max-width: 520px; color: var(--g600); margin-bottom: 44px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 0; }
.hero-meta    { margin-top: 48px; padding-top: 28px; border-top: var(--b1); display: flex; gap: 56px; flex-wrap: wrap; }

/* About section (replaces inline styles) */
.about-section {
  border-top: 3px solid #000;
  border-bottom: 3px solid #000;
  background: #fafafa;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}
.about-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 1.25rem;
}
.about-text:last-child {
  margin-bottom: 0;
}

/* Mission band */
.mission-band { background: var(--black); color: var(--white); padding: 96px var(--px); border-top: var(--b3); border-bottom: var(--b3); }
.mission-title { max-width: 400px; margin-bottom: 2rem; }
.mission-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 0; }
.mission-pillar { border: 1px solid rgba(255,255,255,0.18); padding: 28px 24px; }
.mission-pillar h4 { margin-bottom: 8px; font-size: 0.95rem; }
.mission-pillar p  { font-size: 0.85rem; opacity: 0.7; line-height: 1.6; margin-bottom: 0; }

/* Timeline */
.timeline { padding: 96px var(--px); border-bottom: var(--b3); }
.timeline-inner { max-width: var(--mw); margin: 0 auto; }
.timeline-header { margin-bottom: 48px; }
.timeline-header .label { margin-bottom: 8px; }
.timeline-track { display: flex; overflow-x: auto; gap: 8px; }
.timeline-item  { flex: 1; min-width: 140px; padding: 20px 20px 0 0; position: relative; }
.timeline-item::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--black); }
.timeline-item::after  { content: ""; position: absolute; top: -5px; left: 0; width: 13px; height: 13px; background: var(--black); border-radius: 50%; }
.timeline-date  { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--g500); margin-bottom: 6px; margin-top: 16px; }
.timeline-label { font-size: 0.95rem; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   COMPETITION TASKS SECTION — FIXED SPACING
   ═══════════════════════════════════════════════════════════ */
.tasks-outer {
  border-top: var(--b3);
  padding-bottom: 0;
}
.tasks-header {
  padding: 80px var(--px) 0;
}
.tasks-header .reveal {
  margin-bottom: 0;
}
.tasks-subhead {
  color: #707070;
  max-width: 480px;
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: var(--b3);
  gap: 0;
  margin-top: 48px;
}
.task-card {
  border-right: var(--b2);
  padding: 48px 40px;
  transition: background var(--t), color var(--t);
  display: flex;
  flex-direction: column;
  background: var(--white);
  height: 100%;
}
.task-card:last-child { border-right: none; }
.task-card:hover { background: var(--black); color: var(--white); }
.task-card-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.5;
}
.task-card h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  font-weight: 700;
}
.task-description {
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0.7;
  margin-bottom: 1.25rem;
  flex: 1;
}
.task-signin-note {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 0.8rem;
  opacity: 0.5;
  line-height: 1.4;
}

/* Task selection grid (dashboard) - same spacing principles */
.task-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  border: 0;
  margin: 40px 0 48px;
  background: var(--white);
}
.task-select-card {
  position: relative;
  background: var(--white);
}
.task-select-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.task-select-label {
  display: block;
  padding: 36px 32px;
  border-right: var(--b1);
  border-bottom: none;
  cursor: pointer;
  height: 100%;
  transition: background 0.2s ease, color 0.2s ease;
  background: var(--white);
}
.task-select-card:last-child .task-select-label { border-right: none; }
@media (max-width: 960px) {
  .task-select-grid { grid-template-columns: 1fr; }
  .task-select-label { border-right: none; border-bottom: var(--b1); }
  .task-select-card:last-child .task-select-label { border-bottom: none; }
}
.task-select-card input:checked + .task-select-label {
  background: var(--black);
  color: var(--white);
}
.task-select-label:hover { background: var(--g50); }
.task-select-card input:checked + .task-select-label:hover { background: var(--black); }
.task-select-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 12px;
}
.task-select-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}
.task-select-desc {
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.5;
}
.task-select-card input:checked + .task-select-label .task-select-cat,
.task-select-card input:checked + .task-select-label .task-select-desc {
  opacity: 0.85;
}

/* CTA band */
.cta-band {
  background: var(--black);
  color: var(--white);
  padding: 96px var(--px);
  border-top: var(--b3);
}
.cta-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h2 {
  max-width: 480px;
  margin-bottom: 0;
}
.cta-band .btn {
  border-color: var(--white);
  color: var(--white);
  flex-shrink: 0;
}
.cta-band .btn:hover {
  background: var(--white);
  color: var(--black);
}

/* Footer */
.footer { border-top: var(--b3); padding: 40px var(--px); }
.footer-inner { max-width: var(--mw); margin: 0 auto; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.footer-logo  { font-size: 1.1rem; font-weight: 800; text-decoration: none; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; margin-left: auto; }
.footer-link  { font-size: 0.8rem; text-decoration: none; color: var(--g500); }
.footer-link:hover { color: var(--black); opacity: 1; }
.footer-copy  { font-size: 0.78rem; color: var(--g400); width: 100%; margin-top: 4px; }

/* Auth pages (unchanged but with consistent spacing) */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel-left  { background: var(--black); color: var(--white); padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-panel-right { padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; }
.auth-form-box { max-width: 400px; width: 100%; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--g400); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--g200); }
.auth-ms-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 11px 20px; border: var(--b2); background: none; font-family: var(--font); font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--black); transition: background var(--t), color var(--t); }
.auth-ms-btn:hover { background: var(--black); color: var(--white); opacity: 1; }
.auth-left-logo  { font-size: 1.6rem; font-weight: 800; text-decoration: none; color: var(--white); margin-bottom: 48px; display: block; }
.auth-left-title { font-size: clamp(2rem,4vw,3.2rem); font-weight: 800; line-height: 1.08; margin-bottom: 20px; }
.auth-left-sub   { opacity: 0.55; font-size: 0.95rem; line-height: 1.5; margin-bottom: 0; }
.auth-left-meta  { font-size: 0.78rem; opacity: 0.35; }

/* Dashboard shell */
.dash-page { display: flex; min-height: 100vh; padding-top: var(--nav-h); }
.dash-sidebar { width: var(--sw); flex-shrink: 0; border-right: var(--b2); position: fixed; top: var(--nav-h); bottom: 0; display: flex; flex-direction: column; overflow-y: auto; background: var(--white); z-index: 100; transition: transform 0.25s ease; }
.sidebar-user { padding: 20px 20px 18px; border-bottom: var(--b1); }
.sidebar-user-email { font-size: 0.82rem; font-weight: 600; word-break: break-all; line-height: 1.4; }
.sidebar-user-role  { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--g500); margin-top: 3px; }
.dash-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.dash-nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--g600); border: 1px solid transparent; transition: all var(--t); }
.dash-nav-link:hover { color: var(--black); border-color: var(--black); opacity: 1; }
.dash-nav-link.active { border-color: var(--black); background: var(--black); color: var(--white); }
.sidebar-bottom { padding: 10px 10px 16px; border-top: var(--b1); margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar-version { font-size: 0.68rem; color: var(--g400); padding: 6px 12px; }
.dash-main { flex: 1; margin-left: var(--sw); padding: 48px 48px 64px; min-height: calc(100vh - var(--nav-h)); }
.dash-header { margin-bottom: 36px; padding-bottom: 24px; border-bottom: var(--b2); }
.dash-header h1 { font-size: clamp(1.6rem,3vw,2.4rem); margin-bottom: 6px; }
.dash-header p  { color: var(--g500); font-size: 0.9rem; margin-bottom: 0; }

/* Admin sidebar */
.admin-sidebar { background: var(--black); color: var(--white); }
.admin-sidebar .sidebar-user { border-bottom-color: rgba(255,255,255,0.12); }
.admin-sidebar .sidebar-user-email { color: var(--white); }
.admin-sidebar .sidebar-user-role  { color: rgba(255,255,255,0.4); }
.admin-sidebar .sidebar-bottom { border-top-color: rgba(255,255,255,0.12); }
.admin-sidebar .sidebar-version { color: rgba(255,255,255,0.25); }
.admin-nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 0.85rem; font-weight: 600; text-decoration: none; color: rgba(255,255,255,0.55); border: 1px solid transparent; transition: all var(--t); }
.admin-nav-link:hover { color: var(--white); border-color: rgba(255,255,255,0.3); opacity: 1; }
.admin-nav-link.active { border-color: var(--white); background: var(--white); color: var(--black); }
.admin-nav-section { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.28); padding: 16px 12px 4px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); border: var(--b2); margin-bottom: 40px; }
.stat-card { padding: 28px 24px; border-right: var(--b1); }
.stat-card:last-child { border-right: none; }
.stat-card:nth-child(n+5) { border-top: var(--b1); }
.stat-val   { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.stat-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--g500); margin-top: 6px; }

/* Tables, badges, etc. (unchanged) */
.table-wrap { border: var(--b2); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { padding: 12px 16px; text-align: left; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--black); color: var(--white); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: var(--b1); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--g50); }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.badge { display: inline-block; padding: 3px 9px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; border: 1px solid var(--black); white-space: nowrap; }
.badge-submitted    { background: var(--black); color: var(--white); }
.badge-under-review { border-style: dashed; }
.badge-reviewed     { background: var(--black); color: var(--white); }
.badge-draft        { color: var(--g400); border-color: var(--g300); }
.badge-disqualified { background: var(--black); color: var(--white); opacity: 0.45; }
.badge-admin        { background: var(--black); color: var(--white); }
.badge-judge        { border-style: dashed; }
.badge-participant  { color: var(--g500); border-color: var(--g300); }
.badge-banned       { background: var(--black); color: var(--white); opacity: 0.4; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: flex-end; }
.filters .input  { max-width: 240px; }
.filters .select { max-width: 180px; }

.pagination { display: flex; gap: 4px; margin-top: 24px; flex-wrap: wrap; }
.page-link  { display: inline-block; padding: 8px 13px; border: var(--b1); font-size: 0.8rem; font-weight: 600; text-decoration: none; color: var(--black); transition: all var(--t); }
.page-link:hover  { background: var(--black); color: var(--white); opacity: 1; }
.page-link.active { background: var(--black); color: var(--white); }
.page-link.disabled { opacity: 0.3; pointer-events: none; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9000; justify-content: center; align-items: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border: var(--b3); max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 8px 8px 0 rgba(0,0,0,0.12); }
.modal-header { padding: 20px 24px; border-bottom: var(--b2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-header h3 { font-size: 1.05rem; margin-bottom: 0; }
.modal-close { background: none; border: var(--b1); padding: 4px 10px; cursor: pointer; font-size: 1rem; line-height: 1.2; }
.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: var(--b2); display: flex; gap: 10px; justify-content: flex-end; }

/* GDPR Consent */
#consent-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 99999;
  align-items: center; justify-content: center;
  padding: 20px;
}
#consent-overlay.open { display: flex; }
#consent-box {
  background: var(--white);
  border: var(--b3);
  max-width: 500px; width: 100%;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.25);
  animation: consent-in 0.2s ease;
}
@keyframes consent-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
.consent-header { padding: 28px 28px 0; }
.consent-header h2 { font-size: 1.3rem; margin-bottom: 12px; letter-spacing: -0.01em; }
.consent-header p  { font-size: 0.875rem; color: var(--g600); line-height: 1.5; margin-bottom: 0; }
.consent-choices { padding: 20px 28px; display: flex; flex-direction: column; gap: 14px; border-top: var(--b1); margin-top: 24px; }
.consent-choice { display: flex; align-items: flex-start; gap: 12px; }
.consent-choice input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--black); cursor: pointer; }
.consent-choice-text strong { display: block; font-size: 0.875rem; font-weight: 600; }
.consent-choice-text span   { font-size: 0.78rem; color: var(--g500); line-height: 1.5; }
.consent-choice.required { opacity: 0.5; pointer-events: none; }
.consent-footer { padding: 20px 28px 28px; border-top: var(--b1); display: flex; gap: 10px; }
.consent-footer .btn { flex: 1; }

/* Academy */
.academy-progress { margin-bottom: 36px; }
.progress-header  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-bar-track { height: 6px; background: var(--g200); border: var(--b1); }
.progress-bar-fill  { height: 100%; background: var(--black); transition: width 0.5s ease; }
.progress-text { font-size: 0.78rem; color: var(--g500); margin-top: 6px; }
.module { border: var(--b2); margin-bottom: 12px; }
.module-header { padding: 18px 24px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; }
.module-header:hover { background: var(--g50); }
.module-title { font-weight: 700; font-size: 1rem; }
.module-meta  { font-size: 0.78rem; color: var(--g500); margin-top: 3px; }
.module-chevron { transition: transform 0.2s; flex-shrink: 0; }
.module.open .module-chevron { transform: rotate(180deg); }
.module-body { border-top: var(--b1); display: none; }
.module.open .module-body { display: block; }
.academy-item { border-bottom: var(--b1); }
.academy-item:last-child { border-bottom: none; }
.academy-item-header { padding: 14px 24px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.academy-item-header:hover { background: var(--g50); }
.item-icon { width: 30px; height: 30px; border: var(--b2); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }
.item-icon.video-icon { background: var(--black); color: var(--white); }
.item-text-area { flex: 1; min-width: 0; }
.item-title    { font-weight: 700; font-size: 0.875rem; }
.item-desc     { font-size: 0.78rem; color: var(--g500); margin-top: 2px; }
.item-duration { font-size: 0.72rem; color: var(--g400); flex-shrink: 0; white-space: nowrap; }
.item-check    { width: 20px; height: 20px; border: var(--b2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.item-check.done { background: var(--black); color: var(--white); }
.item-check.done::after { content: "✓"; font-size: 0.7rem; font-weight: 700; }
.academy-item-body { padding: 0 24px 20px 68px; display: none; }
.academy-item.open .academy-item-body { display: block; }
.video-embed { position: relative; padding-top: 56.25%; border: var(--b2); margin-bottom: 14px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Submit */
.submit-task-bar { border: var(--b2); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; background: var(--g50); }
.submit-task-name { font-weight: 700; font-size: 1rem; }
.file-input-wrap { position: relative; }
.file-input-wrap input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.file-label { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: var(--b2); font-size: 0.875rem; cursor: pointer; background: var(--white); transition: background var(--t); }
.file-label:hover { background: var(--g50); }
.deliverables-box { border: var(--b2); padding: 20px 24px; margin-top: 28px; }
.deliverables-box h4 { margin-bottom: 14px; }
.deliverables-box li { font-size: 0.875rem; display: flex; gap: 10px; padding: 5px 0; line-height: 1.5; }
.deliverables-box li::before { content: "→"; font-weight: 700; flex-shrink: 0; }

.code-editor { font-family: "Courier New", monospace; font-size: 0.82rem; min-height: 420px; line-height: 1.5; resize: vertical; }
.audit-action { font-family: "Courier New", monospace; font-size: 0.8rem; }

.health-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; margin-bottom: 28px; }
.health-card { border: var(--b2); padding: 24px; }
.health-card h4 { margin-bottom: 8px; font-size: 0.9rem; }
.disk-bar { height: 6px; background: var(--g200); border: var(--b1); margin-top: 10px; }
.disk-bar-fill { height: 100%; background: var(--black); }

.empty-state { padding: 72px 24px; text-align: center; border: var(--b2); }
.empty-state h3 { margin-bottom: 10px; }
.empty-state p  { color: var(--g500); margin-bottom: 24px; }

.error-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 48px var(--px); }
.error-inner { max-width: 480px; }
.error-code  { font-size: 7rem; font-weight: 900; line-height: 1; letter-spacing: -0.05em; opacity: 0.08; }
.error-inner h1 { font-size: 2rem; margin: -20px 0 12px; }
.error-inner p  { color: var(--g500); margin-bottom: 28px; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  :root { --px: 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .mission-pillars { grid-template-columns: 1fr 1fr; }
  .task-grid { grid-template-columns: 1fr; }
  .task-card { border-right: none; border-bottom: var(--b2); }
  .task-card:last-child { border-bottom: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 40px 24px; }
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open { transform: none; box-shadow: 4px 0 24px rgba(0,0,0,0.12); }
  .dash-main { margin-left: 0; padding: 28px 20px 48px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero-meta { margin-top: 36px; }
  .tasks-header { padding-top: 64px; }
}

@media (max-width: 600px) {
  :root { --px: 16px; }
  .hero { padding: 40px var(--px) 48px; }
  .section-full, .mission-band, .timeline, .cta-band { padding: 64px var(--px); }
  .hero-meta { gap: 24px; margin-top: 28px; }
  .timeline-track { flex-direction: column; gap: 24px; }
  .timeline-item { border-left: 3px solid var(--black); padding: 0 0 24px 20px; min-width: unset; }
  .timeline-item::before, .timeline-item::after { display: none; }
  .timeline-date { margin-top: 0; }
  .otp-group { gap: 6px; }
  .otp-input { width: 44px; height: 56px; font-size: 1.6rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .filters { flex-direction: column; }
  .filters .input, .filters .select { max-width: 100%; }
  .mission-pillars { grid-template-columns: 1fr; }
  .cta-container { flex-direction: column; text-align: center; }
  .cta-band h2 { margin-bottom: 0.5rem; }
  .task-card { padding: 36px 28px; }
  .tasks-header { padding-top: 48px; }
}

/* Additional spacing helpers */
.btn + .btn { margin-left: 12px; }
.btn + p, p + .btn { margin-top: 20px; }
.form-group + .btn { margin-top: 12px; }
.info-box { border: var(--b2); padding: 16px 20px; margin-bottom: 24px; background: var(--g50); font-size: 0.875rem; line-height: 1.5; }
.step-row { padding: 20px 24px; border-bottom: var(--b1); display: flex; align-items: center; gap: 16px; }
.step-row:last-child { border-bottom: none; }
.step-num { width: 36px; height: 36px; border: var(--b2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; flex-shrink: 0; }
.step-num.done { background: var(--black); color: var(--white); }
.step-info { flex: 1; }
.step-info strong { display: block; font-weight: 700; margin-bottom: 2px; }
.step-info span   { font-size: 0.82rem; color: var(--g500); }

/* ─────────────────────────────────────────────────────────────
   VERTICAL SPACING FIX – every block element gets margin top + bottom
   ───────────────────────────────────────────────────────────── */

/* 1. Safe margin for all flow content inside main wrappers */
.page > *,
.section > *,
.container > *,
.container-sm > *,
.dash-main > *:not(.dash-header),
.hero > *,
.tasks-header > *,
.about-section > *,
.mission-band > *,
.timeline-inner > *,
.footer-inner > *,
.auth-panel-right .auth-form-box > *,
.modal-body > * {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* 2. Also target deeply nested typical block elements (cards, text, lists) */
.task-card,
.task-select-label,
.about-text,
.info-box,
.step-row,
.deliverables-box,
.mission-pillar,
.timeline-item,
.module-header,
.module-body > *,
.academy-item-header,
.academy-item-body > *,
.stat-card,
.health-card,
.flash {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* 3. Ensure headings, paragraphs, lists, tables etc. also have both margins */
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, blockquote, pre,
table, fieldset, figure, hr,
address, details, summary {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* 4. Buttons and form controls get spacing when they appear in flow */
.btn,
.input,
.textarea,
.select {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* 5. Reset margins inside flex/grid containers – they handle spacing themselves */
.hero-actions > *,
.task-actions > *,
.dash-nav > *,
.modal-footer > *,
.cta-container > *,
.stat-grid > *,
.task-grid > *,
.filters > *,
.nav-links > *,
.sidebar-bottom > *,
.consent-footer > * {
  margin-top: 0;
  margin-bottom: 0;
}

/* 6. Prevent double margins on first and last child inside containers */
.page > :first-child,
.section > :first-child,
.container > :first-child,
.dash-main > :first-child,
.hero > :first-child,
.task-card:first-child,
.about-section > :first-child {
  margin-top: 0;
}
.page > :last-child,
.section > :last-child,
.container > :last-child,
.dash-main > :last-child,
.hero > :last-child,
.task-card:last-child,
.about-section > :last-child {
  margin-bottom: 0;
}

/* 7. Exclude structural elements that should never have extra spacing */
nav, .nav, .sidebar, .dash-sidebar, .admin-sidebar,
.mobile-menu, .footer, .modal-overlay, #consent-overlay,
nav *, .nav *, .dash-sidebar *, .admin-sidebar *,
.mobile-menu *, .modal-overlay * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Remove all thick black section dividers */
.hero,
.about-section,
.mission-band,
.timeline,
.tasks-outer,
.task-grid,
.cta-band,
.footer {
  border-top: none !important;
  border-bottom: none !important;
}