:root {
  --navy: #141452;
  --navy-2: #1d1d75;
  --bg: #0b0b2b;
  --bg-soft: #12123d;
  --card: #1a1a58;
  --red: #ff3131;
  --red-strong: #d92020;
  --red-2: #ff6b6b;
  --amber: #ffb020;
  --green: #2fd67c;
  --text: #ffffff;
  --muted: #b9b9e8;
  --line: rgba(255, 255, 255, 0.12);
  --radius: 18px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

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

body {
  background: radial-gradient(1100px 560px at 82% -10%, #2a2a8f 0%, var(--bg) 58%) fixed, var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main { padding-bottom: 40px; }
body { padding-bottom: 64px; }

/* NAV */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 40, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand-logo { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.brand-logo:hover { text-decoration: none; }
.brand-logo img { height: 38px; width: auto; }
.brand-divider { width: 1px; height: 26px; background: rgba(255, 255, 255, .28); flex: 0 0 auto; }
.school-logo { height: 30px; width: auto; max-width: 130px; background: #fff; border-radius: 8px; padding: 3px 6px; flex: 0 0 auto; }
.brand-logo .school-logo { height: 30px; }
.footer-school { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: #fff; border-radius: 10px; padding: 8px 12px; max-width: 330px; }
.footer-school img { height: 34px; width: auto; max-width: 150px; }
.footer-school span { color: #141452; font-size: 12px; font-weight: 600; line-height: 1.35; }
.auth-school-logo { height: 64px; width: auto; margin: 0 auto 10px; display: block; border-radius: 8px; }
.cert-school-logo { height: 64px; width: 64px; object-fit: contain; border-radius: 8px; background: #fff; }
.cert-top .cert-school-logo { height: 64px; width: 64px; }
.brand-text { font-weight: 800; font-size: 16px; letter-spacing: .5px; }
.brand-text b { color: var(--red-2); }
.nav-in.nav-compact .brand-text { display: none; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--line); color: #fff; font-size: 20px; padding: 4px 10px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin-left: auto; }
.nav-links a { color: var(--muted); padding: 8px 8px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav-links a.active { color: #fff; background: var(--red-strong); }
.nav-links a.nav-cta { background: rgba(255, 49, 49, .16); border: 1px solid var(--red-2); color: #ffd1d1; }
.xp-pill {
  background: rgba(255, 176, 32, .15); border: 1px solid var(--amber); color: var(--amber);
  font-weight: 800; padding: 6px 12px; border-radius: 20px; font-size: 13px; white-space: nowrap;
}

/* FLASH */
.flash-wrap { margin-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); font-size: 14.5px; background: rgba(255,255,255,.06); }
.flash-success { border-color: var(--green); background: rgba(47, 214, 124, .12); }
.flash-danger { border-color: var(--red-2); background: rgba(255, 49, 49, .14); }
.flash-warning { border-color: var(--amber); background: rgba(255, 176, 32, .12); }
.flash-info { border-color: #6f8dff; background: rgba(111, 141, 255, .12); }

/* TYPE */
h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 900; line-height: 1.18; margin: 12px 0; }
h2 { font-size: clamp(22px, 3.2vw, 31px); font-weight: 800; margin: 6px 0 12px; }
h3 { font-size: 19px; font-weight: 800; }
.em { color: var(--red-2); }
.lead { color: var(--muted); font-size: 17px; max-width: 820px; }
.section { margin-top: 42px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }

/* BUTTONS */
.btn {
  display: inline-block; background: var(--red-strong); color: #fff; border: 1px solid transparent;
  font-weight: 800; padding: 13px 24px; border-radius: 14px; cursor: pointer;
  font-size: 16px; margin: 6px 8px 6px 0; transition: transform .15s, box-shadow .15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(255, 49, 49, .35); text-decoration: none; color: #fff; }
.btn-ghost { background: transparent; border: 2px solid var(--red-2); color: #fff; }
.btn-ghost:hover { color: #fff; }
.btn-amber { background: var(--amber); color: #3a2500; }
.btn-green { background: var(--green); color: #06351c; }
.btn-small { padding: 8px 14px; font-size: 14px; border-radius: 10px; margin: 3px 4px 3px 0; }
.btn-danger { background: #a51f1f; }
.btn-block { display: block; width: 100%; text-align: center; }

/* CARDS */
.card {
  background: linear-gradient(160deg, var(--card), #141448);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 14px 0; box-shadow: var(--shadow);
}
.card-border-red { border-color: rgba(255, 107, 107, .55); }
.card-border-amber { border-color: rgba(255, 176, 32, .55); }
.tag { display: inline-block; background: rgba(255, 49, 49, .16); border: 1px solid var(--red-2); color: #ffb3b3; font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 20px; margin: 4px 6px 4px 0; }

/* HERO HOME */
.hero { padding: 26px 0 0; }
.hero-banner {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(140deg, #2323a8 0%, #14145e 55%, #0b0b33 100%);
  border: 1px solid var(--line); border-radius: 26px; padding: 48px 24px 42px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.hero-banner::before {
  content: ""; position: absolute; left: -110px; bottom: -110px; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(64, 64, 255, .55), transparent 70%); border-radius: 50%;
}
.hero-banner::after {
  content: ""; position: absolute; right: -100px; top: -100px; width: 360px; height: 360px;
  background: radial-gradient(circle, #ff4040 0%, #c81e1e 65%, transparent 72%); border-radius: 50%; opacity: .92;
}
.hero-banner > * { position: relative; z-index: 1; }
.hero-logo { display: block; margin: 0 auto; max-width: min(430px, 82%); height: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); }
.hero-sub {
  display: inline-block; background: rgba(10, 10, 42, .86); border: 1px solid #ffa3a3;
  color: #ffffff; font-weight: 800; letter-spacing: 3px; padding: 8px 20px; border-radius: 30px;
  font-size: 13.5px; margin-top: 14px;
}
.hero h1 { margin: 16px 0 6px; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.hero-slogan { font-weight: 900; letter-spacing: 2px; font-size: clamp(17px, 2.6vw, 24px); margin-top: 6px; }
.hero-slogan .dots { color: var(--red); letter-spacing: 2px; }
.hero-actions { margin-top: 22px; }
.hero-extra { margin-top: 8px; }

/* BRAND STRIP / ORG */
.brand-strip { margin-top: 24px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.brand-title { text-align: center; font-weight: 800; letter-spacing: 2px; font-size: 13px; color: var(--muted); margin-bottom: 14px; text-transform: uppercase; }
.partners-img { width: 100%; display: block; border-radius: 12px; background: #fff; padding: 10px 12px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.org-col h4 { font-size: 14px; letter-spacing: 1.5px; color: var(--amber); text-transform: uppercase; margin-bottom: 8px; }
.org-col ul { list-style: none; }
.org-col li { font-size: 14.5px; padding: 6px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.org-col li:last-child { border-bottom: none; }
.responder { margin-top: 16px; text-align: center; background: rgba(255, 49, 49, .12); border: 1px dashed var(--red-2); padding: 12px; border-radius: 14px; font-weight: 700; }
.responder img { height: 38px; vertical-align: middle; margin-left: 10px; background: #fff; padding: 4px 8px; border-radius: 6px; }

/* EMBLEM 0-1-M */
.emblem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.emblem-card { background: linear-gradient(160deg, #23237c, #151550); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.emblem-letter { font-size: 46px; font-weight: 900; color: var(--red-2); line-height: 1; }
.emblem-card h3 { margin: 10px 0 6px; }
.emblem-card p { color: var(--muted); font-size: 14.5px; }

/* 5 NUT */
.nut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.nut-card { background: linear-gradient(160deg, #23237c, #171754); border: 1px solid var(--line); border-radius: 16px; padding: 20px 16px; }
.nut-card .ic { font-size: 32px; }
.nut-card .t { font-weight: 900; font-size: 16px; margin: 8px 0 6px; }
.nut-card p { color: var(--muted); font-size: 14px; }

/* STATS */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 18px; }
.stat { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.stat .n { font-size: 26px; font-weight: 900; color: var(--amber); }
.stat .d { font-size: 13px; color: var(--muted); }

/* AMBASSADORS */
.amb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.amb { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; font-weight: 700; }
.amb span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 4px; }

/* POSTERS */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 14px; }
.poster-card { background: #151548; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.poster-card img { width: 100%; display: block; }
.poster-card p { padding: 12px 16px; font-size: 14px; color: var(--muted); text-align: center; }

/* DOCS */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 14px; }
.doc-card { background: linear-gradient(160deg, #23237c, #141448); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.doc-card p { color: var(--muted); font-size: 14.5px; margin: 8px 0 12px; }

/* FORMS */
.form-card { max-width: 760px; margin: 24px auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row { margin-bottom: 14px; }
.form-row.full { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; color: #e2e2ff; }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="number"], input[type="search"], input[type="file"], select, textarea {
  width: 100%; background: #101040; border: 1px solid var(--line); border-radius: 12px;
  color: #fff; padding: 12px 14px; font-size: 15px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(255, 176, 32, .55); border-color: var(--amber); }
textarea { min-height: 120px; resize: vertical; }
.help-text { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.required { color: var(--red-2); }
.auth-wrap { max-width: 880px; margin: 34px auto; }
.auth-card { background: linear-gradient(160deg, var(--card), #141448); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head p { color: var(--muted); }
.auth-links { margin-top: 18px; text-align: center; font-size: 14.5px; color: var(--muted); }
.auth-links a { font-weight: 700; }
.role-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.role-tabs a { border: 1px solid var(--line); border-radius: 20px; padding: 7px 16px; font-size: 14px; color: var(--muted); }
.role-tabs a.active { background: var(--red); color: #fff; border-color: var(--red); }

/* DASHBOARD */
.dash-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 26px; }
.dash-hello h1 { font-size: clamp(24px, 3.6vw, 36px); margin: 0 0 8px; }
.dash-hello p { color: var(--muted); }
.xp-card { background: linear-gradient(150deg, #26267f, #141448); border: 1px solid var(--line); border-radius: 18px; padding: 20px; text-align: center; }
.xp-card .num { font-size: 42px; font-weight: 900; color: var(--amber); line-height: 1.1; }
.xp-card .lbl { color: var(--muted); font-size: 13.5px; }
.xp-meta { display: flex; justify-content: space-around; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.xp-meta b { color: #fff; }
.progress-bar { height: 12px; background: rgba(255, 255, 255, .1); border-radius: 8px; overflow: hidden; margin: 12px 0 6px; }
.progress-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--red)); border-radius: 8px; }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.stage-card { background: linear-gradient(160deg, #23237c, #151550); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.stage-card.done { border-color: rgba(47, 214, 124, .55); }
.stage-card .num { font-size: 12px; letter-spacing: 2px; color: var(--amber); font-weight: 800; text-transform: uppercase; }
.stage-card h3 { margin: 6px 0 8px; }
.stage-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.stage-status { display: inline-block; align-self: flex-start; white-space: nowrap; font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 14px; margin: 10px 0; }
.stage-status.ok { background: rgba(47, 214, 124, .16); color: var(--green); border: 1px solid var(--green); }
.stage-status.todo { background: rgba(255, 176, 32, .12); color: var(--amber); border: 1px solid var(--amber); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.badge-item { background: rgba(255, 176, 32, .1); border: 1px dashed var(--amber); border-radius: 14px; padding: 14px; }
.badge-item.locked { opacity: .72; filter: grayscale(.35); }
.badge-item.locked .ic { opacity: .75; }
.badge-item .ic { font-size: 26px; }
.badge-item b { display: block; margin: 4px 0; }
.badge-item p { font-size: 13px; color: var(--muted); }

/* QUIZ */
.quiz-shell { max-width: 820px; margin: 26px auto; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge-pill { display: inline-block; background: var(--amber); color: #3a2500; font-weight: 900; padding: 6px 14px; border-radius: 20px; font-size: 13.5px; }
.question-card { background: #20206e; border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin: 16px 0; }
.narrative { background: rgba(255, 255, 255, .05); border-left: 4px solid var(--amber); border-radius: 0 12px 12px 0; padding: 14px 16px; margin: 12px 0 18px; font-size: 15px; }
.narrative p { margin: 4px 0; }
.narrative .who { color: var(--amber); font-weight: 800; font-size: 13.5px; letter-spacing: .5px; text-transform: uppercase; }
.options { display: grid; gap: 10px; margin-top: 12px; }
.option { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; font-size: 15px; transition: background .15s, border-color .15s; }
.option:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 176, 32, .55); }
.option input { margin-top: 4px; accent-color: var(--red); }
.option .key { font-weight: 900; color: var(--amber); }
.feedback { border-radius: 14px; padding: 16px 18px; margin: 14px 0; font-size: 15px; }
.feedback.ok { background: rgba(47, 214, 124, .12); border: 1px solid var(--green); }
.feedback.bad { background: rgba(255, 49, 49, .12); border: 1px solid var(--red-2); }
.feedback .title { font-weight: 900; margin-bottom: 6px; }

/* RESULT */
.result-hero { text-align: center; padding: 28px; border-radius: 22px; background: linear-gradient(150deg, #26267f, #141448); border: 1px solid var(--line); margin-top: 26px; }
.result-score { font-size: 54px; font-weight: 900; color: var(--amber); line-height: 1.1; }
.result-list { display: grid; gap: 12px; margin-top: 16px; }
.result-item { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: rgba(255, 255, 255, .04); }
.result-item.ok { border-left: 5px solid var(--green); }
.result-item.bad { border-left: 5px solid var(--red-2); }
.result-item .q { font-weight: 700; margin-bottom: 8px; }
.result-item .line { font-size: 14px; color: var(--muted); margin-top: 4px; }
.result-item .line b { color: #fff; }
.result-item .explain { margin-top: 8px; font-size: 14px; color: #ddd; }

/* TABLES */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.data th, table.data td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data .btn { white-space: nowrap; }
table.data th { background: rgba(255, 255, 255, .06); font-size: 12.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
table.data tr:last-child td { border-bottom: none; }
table.data td form { display: inline; }
.rank-1 { color: var(--amber); font-weight: 900; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.filter-bar input, .filter-bar select { width: auto; min-width: 200px; }

/* CERTIFICATE */
.cert-page { max-width: 900px; margin: 28px auto; }
.cert-card { background: #fffaf0; color: #1a1a4e; border-radius: 18px; padding: 42px 46px; border: 10px solid #141452; position: relative; }
.cert-card::before { content: ""; position: absolute; inset: 12px; border: 2px solid #d8b25a; border-radius: 10px; pointer-events: none; }
.cert-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.cert-top img { height: 48px; }
.cert-title { text-align: center; letter-spacing: 2px; font-weight: 900; color: #b01818; font-size: 13px; }
.cert-card h1 { text-align: center; font-size: 32px; color: #141452; margin: 6px 0 4px; }
.cert-sub { text-align: center; color: #44446e; margin-bottom: 24px; }
.cert-name { text-align: center; font-size: 36px; font-weight: 900; color: #b01818; border-bottom: 2px solid #d8b25a; display: inline-block; padding: 0 18px 6px; margin: 0 auto 10px; }
.cert-name-wrap { text-align: center; }
.cert-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin: 24px 0; font-size: 15px; }
.cert-meta b { color: #141452; }
.cert-code { text-align: center; background: #141452; color: #fff; border-radius: 10px; padding: 10px; font-family: Consolas, monospace; letter-spacing: 1.5px; margin-top: 18px; }
.cert-note { text-align: center; font-size: 12.5px; color: #55557d; margin-top: 14px; }
.cert-actions { text-align: center; margin: 20px 0; }
.share-status { border-radius: 12px; padding: 14px; margin: 14px 0; font-size: 14.5px; }

/* HANDBOOK */
.search-bar { display: flex; gap: 10px; margin: 18px 0; }
.search-bar input { flex: 1; }
.accordion { display: grid; gap: 10px; }
details.acc { border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .04); overflow: hidden; }
details.acc summary { padding: 15px 18px; cursor: pointer; font-weight: 700; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; color: var(--amber); font-size: 20px; font-weight: 900; }
details.acc[open] summary::after { content: "−"; }
details.acc .body { padding: 0 18px 18px; color: var(--muted); font-size: 15px; }

/* HELP */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.help-card { background: linear-gradient(160deg, #23237c, #141448); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.help-card.red { border-color: var(--red-2); }
.help-card .big { font-size: 40px; font-weight: 900; color: var(--green); }
.law-list { list-style: none; }
.law-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.law-list li:last-child { border-bottom: none; }

/* ACTIVITY HUBS */
.activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 14px; }
.activity-card { background: linear-gradient(160deg, #23237c, #141448); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.activity-card .ic { font-size: 30px; }
.activity-card h3 { margin: 6px 0; font-size: 18px; }
.activity-card p { color: var(--muted); font-size: 14px; flex: 1; }
.activity-card .btn { align-self: flex-start; }
.activity-status { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 12px; margin: 8px 0; }
.activity-status.done { background: rgba(47, 214, 124, .16); color: var(--green); border: 1px solid var(--green); }
.activity-status.todo { background: rgba(255, 176, 32, .12); color: var(--amber); border: 1px solid var(--amber); }

/* REFLEX SIMULATOR */
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.scenario-card { text-align: left; background: linear-gradient(160deg, #23237c, #141448); border: 1px solid var(--line); border-radius: 16px; padding: 20px; cursor: pointer; color: #fff; font-family: inherit; display: flex; flex-direction: column; gap: 6px; }
.scenario-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.scenario-kicker { font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--amber); font-weight: 800; }
.scenario-card b { font-size: 17px; }
.scenario-card span { color: var(--muted); font-size: 14px; }
.scenario-card .scenario-cta { color: var(--green); font-weight: 800; margin-top: 6px; }
.phone { max-width: 460px; margin: 18px auto; background: #0a0a24; border: 2px solid #33337a; border-radius: 26px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.phone-head { background: #1d1d75; padding: 12px 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.phone-head .ava { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #555, #222); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.phone-head .online { font-size: 11px; color: var(--green); font-weight: 600; }
.chat-body { padding: 16px 12px; min-height: 340px; max-height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; }
.msg.bot { background: #26267f; border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--red-strong); border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.sys { background: rgba(255, 176, 32, .12); border: 1px dashed var(--amber); align-self: center; font-size: 13px; text-align: center; max-width: 94%; }
.chat-choices { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.choice-note { font-size: 12.5px; color: var(--muted); text-align: center; padding-top: 8px; }
.choice-btn { text-align: left; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 12px; color: #fff; padding: 12px 14px; cursor: pointer; font-size: 14.5px; font-family: inherit; line-height: 1.45; }
.choice-btn:hover { background: rgba(255, 255, 255, .14); border-color: var(--amber); }
.flag-wrap { padding: 0 12px 14px; }
.flag-btn { width: 100%; background: transparent; border: 2px solid var(--red-2); color: #ffb3b3; font-weight: 900; padding: 12px; border-radius: 13px; cursor: pointer; font-size: 14.5px; letter-spacing: .3px; }
.flag-btn:hover:not(:disabled) { background: rgba(255, 49, 49, .16); }
.flag-btn:disabled { opacity: .45; cursor: default; }
.flag-alert { border-radius: 12px; padding: 14px 16px; margin: 12px auto; max-width: 760px; font-size: 14.5px; }
.flag-alert.ok { background: rgba(47, 214, 124, .12); border: 1px solid var(--green); }
.flag-alert.warn { background: rgba(255, 176, 32, .1); border: 1px solid var(--amber); color: var(--muted); }

/* STORY */
.story-card { margin-top: 18px; }
.story-title { font-weight: 900; color: var(--amber); letter-spacing: .5px; margin: 12px 0 8px; }
.story-text { font-size: 16px; line-height: 1.75; color: #e9e9ff; }
.story-choices { display: grid; gap: 10px; margin-top: 12px; }
.ending-card { margin-top: 18px; border-width: 2px; }
.ending-card.good { border-color: var(--green); }
.ending-card.bad { border-color: var(--red-2); }
.ending-card.neutral { border-color: var(--amber); }
.ending-label { display: inline-block; font-weight: 900; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; padding: 5px 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); margin: 10px 0; }
.ending-card.good .ending-label { color: var(--green); border: 1px solid var(--green); }
.ending-card.bad .ending-label { color: var(--red-2); border: 1px solid var(--red-2); }
.ending-card.neutral .ending-label { color: var(--amber); border: 1px solid var(--amber); }
.lesson-box { background: rgba(255, 176, 32, .08); border-left: 4px solid var(--amber); border-radius: 0 12px 12px 0; padding: 14px 16px; margin: 16px 0; color: var(--muted); }
.lesson-box b { color: var(--amber); }
.ending-actions { margin-top: 12px; }
.ending-list { margin-top: 14px; }

/* SCANNER */
.scan-groups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.scan-chip { display: inline-flex; flex-direction: column; gap: 2px; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); }
.scan-chip small { font-size: 10.5px; font-weight: 600; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.scan-chip.critical { border-color: var(--red-2); color: #ffc0c0; }
.scan-chip.high { border-color: #ff9f43; color: #ffd7a8; }
.scan-chip.medium { border-color: var(--amber); color: #ffe2ad; }
.risk-banner { border-radius: 16px; padding: 18px 20px; margin: 14px 0; border: 2px solid var(--line); }
.risk-banner.very-high { background: rgba(255, 49, 49, .18); border-color: var(--red-2); }
.risk-banner.high { background: rgba(255, 120, 40, .14); border-color: #ff9f43; }
.risk-banner.medium { background: rgba(255, 176, 32, .12); border-color: var(--amber); }
.risk-banner.low { background: rgba(47, 214, 124, .1); border-color: var(--green); }
.risk-title { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.risk-banner.very-high .risk-title { color: #ff8a8a; }
.risk-banner.high .risk-title { color: #ffb26b; }
.risk-banner.medium .risk-title { color: var(--amber); }
.risk-banner.low .risk-title { color: var(--green); }
.scan-highlight { margin: 14px 0; }
.scan-text { margin-top: 8px; background: #101040; border: 1px solid var(--line); border-radius: 12px; padding: 14px; white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.8; }
.scan-mark { color: #fff; padding: 1px 3px; border-radius: 4px; }
.scan-mark.critical { background: #b31414; }
.scan-mark.high { background: #a85600; }
.scan-mark.medium { background: #7a5600; }
.scan-results .flag-card { background: rgba(255, 49, 49, .1); border: 1px solid var(--red-2); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.scan-results .flag-card .t { color: var(--red-2); }
.scan-results .flag-card .act { font-size: 14px; color: var(--muted); margin-top: 6px; }
.scan-count { font-size: 12px; background: rgba(255, 255, 255, .12); padding: 1px 6px; border-radius: 8px; }

/* ADULT FLIP CARDS */
.flip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-top: 14px; }
.flip-card { position: relative; min-height: 190px; border-radius: 16px; border: 1px solid var(--line); background: #1a1a58; color: #fff; font-family: inherit; text-align: left; cursor: pointer; padding: 18px; transition: transform .15s, border-color .15s; }
.flip-card:hover { border-color: var(--amber); }
.flip-side { display: flex; flex-direction: column; gap: 8px; }
.flip-card .back { display: none; }
.flip-card.flipped .front { display: none; }
.flip-card.flipped .back { display: flex; }
.flip-kicker { font-size: 11.5px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--green); }
.flip-kicker.bad { color: var(--red-2); }
.flip-card b { font-size: 16px; line-height: 1.55; font-weight: 700; }
.flip-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.checklist { list-style: none; margin: 12px 0; }
.checklist li { padding: 10px 2px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.checklist li:last-child { border-bottom: none; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; margin: 0; color: #e9e9ff; }
.checklist input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green); flex: 0 0 auto; }

/* PHASE 3 — AVATAR */
.avatar-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
.avatar-preview-card canvas { width: 100%; max-width: 520px; border-radius: 18px; border: 2px solid var(--line); display: block; margin: 0 auto; background: #14145e; }
.frame-options { display: flex; gap: 8px; flex-wrap: wrap; }
.frame-btn { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: #fff; border-radius: 20px; padding: 8px 16px; cursor: pointer; font-weight: 700; font-family: inherit; }
.frame-btn.active { background: var(--red-strong); border-color: var(--red-strong); }
.avatar-preview-card .hashtags { margin-top: 12px; justify-content: center; }

/* PHASE 3 — PLEDGE WALL */
.pledge-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 18px; }
.pledge-card { position: relative; background: linear-gradient(150deg, #23237c, #141448); border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px; }
.pledge-mark { position: absolute; right: 18px; top: 6px; font-size: 52px; color: rgba(255, 176, 32, .28); font-family: Georgia, serif; line-height: 1; }
.pledge-card p { font-size: 15px; line-height: 1.65; }
.pledge-who { margin-top: 14px; font-size: 13px; color: var(--amber); font-weight: 700; }
.pledge-who span { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; margin-top: 3px; }
.pledge-samples { display: flex; flex-wrap: wrap; gap: 8px; }
.sample-chip { text-align: left; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; color: #e9e9ff; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.sample-chip:hover { border-color: var(--amber); background: rgba(255, 176, 32, .08); }
.pledge-content { font-size: 16px; font-style: italic; margin: 12px 0; }
.pledge-admin-list .card { margin: 12px 0; }

/* PHASE 3 — MOOD JOURNAL */
.mood-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.mood-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); cursor: pointer; margin: 0; }
.mood-tile input { position: absolute; opacity: 0; pointer-events: none; }
.mood-tile:has(input:checked) { border-color: var(--amber); background: rgba(255, 176, 32, .12); box-shadow: 0 0 0 2px rgba(255, 176, 32, .25); }
.mood-emoji { font-size: 30px; }
.mood-label { font-size: 12.5px; font-weight: 700; color: #e9e9ff; text-align: center; }
.mood-alert { border-color: var(--amber); background: rgba(255, 176, 32, .1); }
.week-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.mood-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.mood-day { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; min-height: 150px; }
.mood-day.today { border-color: var(--amber); background: rgba(255, 176, 32, .08); }
.mood-day-head { display: flex; justify-content: space-between; gap: 4px; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.mood-day-head b { color: #fff; }
.mood-day-emoji { font-size: 26px; text-align: center; margin: 6px 0; }
.mood-day-emoji.empty { color: var(--muted); opacity: .5; }
.mood-day-label { text-align: center; font-size: 11.5px; font-weight: 700; color: #e9e9ff; }
.mood-day-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; word-break: break-word; }

/* PHASE 3 — CHATBOT */
.fab-chat { background: #ffb020; color: #3a2500; }
.chat-panel { position: fixed; right: 18px; bottom: 70px; width: min(390px, calc(100vw - 24px)); height: 540px; max-height: 76vh; background: #12124a; border: 2px solid var(--amber); border-radius: 18px; z-index: 61; display: none; flex-direction: column; overflow: hidden; box-shadow: 0 18px 60px rgba(0, 0, 0, .65); }
.chat-panel.open { display: flex; }
.chead { background: var(--amber); color: #3a2500; font-weight: 900; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chat-close { background: transparent; border: none; color: #3a2500; font-size: 24px; cursor: pointer; line-height: 1; }
.cbody { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.chat-msg.bot { background: #26267f; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.me { background: var(--red-strong); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-small { font-size: 12px; color: var(--muted); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; }
.quick button { background: rgba(255, 176, 32, .12); border: 1px solid var(--amber); color: var(--amber); border-radius: 14px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; font-weight: 700; font-family: inherit; }
.cfoot { padding: 8px 10px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.cfoot input { flex: 1; margin: 0; padding: 9px 11px; }
.chat-note { font-size: 10.5px; color: var(--muted); text-align: center; padding: 0 10px 8px; }

/* ADMIN */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.stat-card { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat-card .n { font-size: 28px; font-weight: 900; color: var(--amber); }
.stat-card .d { font-size: 13px; color: var(--muted); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.inline-form input, .inline-form select { width: auto; }
.admin-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.admin-links a { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px; font-size: 14px; color: #fff; }
.admin-links a:hover { border-color: var(--amber); text-decoration: none; }
.admin-links a.active { border-color: var(--amber); color: var(--amber); }
.code-badge { font-family: Consolas, monospace; background: rgba(255, 176, 32, .12); border: 1px solid var(--amber); color: var(--amber); padding: 3px 8px; border-radius: 8px; font-size: 12.5px; }
.section-title { margin: 30px 0 6px; }
.muted-box { background: rgba(255, 255, 255, .04); border: 1px dashed var(--line); border-radius: 14px; padding: 16px; color: var(--muted); font-size: 14px; }

/* FAB + MODAL */
.fab-stack {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  padding: 8px 18px; background: rgba(8, 8, 32, .96);
  border-top: 1px solid var(--line); backdrop-filter: blur(8px);
}
.fab {
  min-width: 118px; height: 44px; border-radius: 999px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); border: none; cursor: pointer;
  font-size: 14px;
}
.fab:hover { text-decoration: none; transform: translateY(-1px); }
.fab-sos { background: #b31414; color: #fff; }
.fab-111 { background: var(--green); color: #06351c; }
.modal { position: fixed; inset: 0; background: rgba(5, 5, 20, .9); z-index: 70; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-box { position: relative; background: linear-gradient(160deg, #1d1d75, #101042); border: 2px solid var(--red-2); border-radius: 22px; padding: 30px; max-width: 540px; width: 100%; text-align: center; }
.modal-box.small { max-width: 420px; border-color: var(--amber); }
.modal-box h2 { color: var(--red-2); }
.modal-box.small h2 { color: var(--amber); }
.modal-close { position: absolute; right: 12px; top: 8px; background: transparent; border: none; color: #fff; font-size: 26px; cursor: pointer; }
.sos-steps { text-align: left; margin: 16px auto; padding-left: 20px; color: var(--muted); }
.sos-steps li { margin: 8px 0; }
.btn-call { display: block; background: var(--green); color: #06351c; font-size: 24px; font-weight: 900; padding: 16px; border-radius: 14px; margin-top: 12px; }
.btn-call:hover { text-decoration: none; }
.modal-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 34px 0 24px; color: var(--muted); font-size: 13.5px; background: rgba(5, 5, 25, .45); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-logo { height: 44px; margin-bottom: 12px; }
.footer-title { color: #fff; font-weight: 800; margin-bottom: 8px; letter-spacing: .5px; text-transform: uppercase; font-size: 12.5px; }
.footer-note { font-size: 12.5px; opacity: .85; margin-top: 8px; }
.hashtags { display: flex; flex-wrap: wrap; gap: 6px; }
.hashtags span { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 14px; padding: 4px 10px; font-size: 12px; color: #ddd; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; font-size: 12px; }

/* EMPTY / ERRORS */
.empty { text-align: center; padding: 30px; color: var(--muted); }
.error-page { text-align: center; padding: 70px 20px; }
.error-code { font-size: 76px; font-weight: 900; color: var(--red-2); line-height: 1; }

/* RESPONSIVE */
@media (max-width: 1180px) {
  .brand-text { display: none; }
}
@media (max-width: 960px) {
  .dash-head { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .avatar-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .brand-text { display: none; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 12px; }
  .brand-logo img { height: 32px; }
  .brand-logo .school-logo { height: 24px; max-width: 105px; padding: 2px 5px; }
  .brand-divider { height: 20px; }
  .cert-school-logo { height: 52px; width: 52px; }
  .cert-top { flex-wrap: wrap; gap: 10px; }
  .cert-top .cert-title { flex: 1 1 100%; order: 3; font-size: 12px; margin-top: 4px; }
  .cert-top > img:first-child { height: 44px; }
  .cert-top .cert-school-logo { height: 52px; width: 52px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-banner { padding: 34px 18px 30px; border-radius: 20px; }
  .hero-banner::after { width: 240px; height: 240px; right: -90px; top: -90px; }
  .hero-actions .btn { display: block; width: 100%; margin: 8px 0; }
  .hero-extra .btn { display: block; width: 100%; margin: 6px 0; }
  .cert-card { padding: 26px 20px; border-width: 6px; }
  .cert-card h1 { font-size: 24px; }
  .cert-name { font-size: 26px; }
  .cert-meta { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .fab-stack { padding: 6px 12px; gap: 8px; }
  .fab { flex: 1; min-width: 0; height: 42px; font-size: 13px; padding: 0 10px; }
  .question-card { padding: 18px; }
  .result-score { font-size: 44px; }
  .partners-scroll { overflow-x: auto; }
  .partners-img { min-width: 720px; }
  .mood-grid { grid-template-columns: repeat(3, 1fr); }
  .mood-week { grid-template-columns: repeat(2, 1fr); }
  .chat-panel { left: 10px; right: 10px; bottom: 60px; width: auto; height: 72vh; max-height: 72vh; }
}

/* PRINT CERTIFICATE */
@media print {
  body { background: #fff !important; color: #000; }
  .site-nav, .site-footer, .fab-stack, .modal, .flash-wrap, .cert-actions, .no-print { display: none !important; }
  .cert-page { max-width: none; margin: 0; }
  .cert-card { border-color: #141452; box-shadow: none; page-break-inside: avoid; }
  main { padding: 0; }
}
