/* ---------- Variables ---------- */
:root {
  --ink: #000000;
  --navy: #000000;
  --blue: #0a4fe0;
  --blue-dark: #0838a8;
  --teal: #b8bec2;
  --bg: #ffffff;
  --bg-alt: #eef2f7;
  --text: #000000;
  --muted: #3f4b63;
  --green: #4e6959;
  --green-bg: #e5ebe7;
  --red: #895450;
  --red-bg: #eee3e2;
  --yellow-bg: #eeeadc;
  --line: #000000;
  --radius: 0;
  --radius-small: 0;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
h1, h2, h3, h4 { line-height: 1.15; color: var(--ink); letter-spacing: -0.02em; }
h2 {
  font-size: 2.2rem; font-weight: 800; margin: 0 0 10px;
  padding-bottom: 10px; border-bottom: 4px solid var(--ink); display: inline-block;
}
h3 { font-size: 1.3rem; margin-top: 0; font-weight: 800; }
h4 {
  font-size: 0.85rem; margin: 20px 0 8px; text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 800;
}
a { color: var(--blue); font-weight: 600; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #ffb703;
  outline-offset: 2px;
}
code {
  background: var(--ink);
  color: #d9dde0;
  padding: 1px 7px;
  border-radius: 0;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.88em;
  word-break: break-all;
}
.small { font-size: 0.9rem; color: var(--muted); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: #000; color: #fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #bdbdbd;
  border-bottom: 3px solid #606060;
  border-radius: 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; flex-wrap: wrap; }
.logo {
  display: inline-flex; align-items: center; flex-shrink: 0; margin: 6px 0;
  color: #fff; font-size: 1.6rem; font-weight: 900; text-decoration: none;
  letter-spacing: -0.03em; text-transform: uppercase;
}
.logo-image { display: block; width: 160px; height: auto; }
.main-nav ul { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  display: block; padding: 22px 10px; color: var(--ink); text-decoration: none;
  border-radius: 0; font-size: 0.85rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 4px solid transparent; margin-bottom: -3px;
}
.main-nav a:hover { background: #a6a6a6; }
.main-nav a.active { border-bottom-color: var(--ink); color: var(--ink); }
.menu-toggle {
  display: none; background: var(--teal); color: var(--ink); border: 2px solid #606060;
  padding: 10px 16px; border-radius: var(--radius-small); font-size: 0.9rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background-color: var(--ink);
  background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url("assets/intro-background.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff; padding: 80px 0 64px;
  border-bottom: 8px solid var(--teal);
}
.hero h1 {
  color: #fff; font-size: 3.6rem; font-weight: 900; letter-spacing: -0.04em;
  margin: 0 0 16px; line-height: 1.02;
}
.hero h1 span { display: block; color: #92999f; font-size: 0.78em; font-weight: 600; margin-top: 12px; }
.lead { font-size: 1.3rem; max-width: 680px; color: #d5deee; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-link {
  display: inline-block; padding: 16px 28px; font-weight: 800; text-decoration: none;
  color: #fff; border: 2px solid #fff; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem;
}
.btn-link:hover { background: #fff; color: var(--ink); }
.btn-link.primary { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.btn-link.primary:hover { background: #fff; border-color: #fff; }
.level-guide { display: grid; gap: 8px; margin-top: 36px; font-size: 0.95rem; color: #d5deee; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 0; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.7rem; font-weight: 800; color: #fff; vertical-align: middle;
}
.b-beginner { background: var(--green); }
.b-inter { background: #b35a00; }
.b-expert { background: #6a1fb0; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.section-intro { font-size: 1.15rem; color: var(--muted); margin: 8px 0 32px; max-width: 700px; }

/* Rules list */
.rules { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.rules li {
  background: #fff; padding: 22px 24px; border-radius: var(--radius);
  border: 2px solid var(--ink);
}
.rules li:hover { background: var(--ink); color: #fff; }
.rules li:hover h3 { color: var(--teal); }
.rules h3 { margin-bottom: 8px; }
.rules p { margin: 0; }

/* Callouts */
.callout {
  background: var(--yellow-bg); border: 2px solid var(--ink); border-left: 10px solid var(--ink);
  padding: 20px 24px; border-radius: var(--radius); margin: 32px 0;
}
.callout.warn { background: var(--red-bg); border-left-color: var(--red); }
.callout h3, .callout h4 { margin-top: 0; }

/* Topic cards */
.topics { display: grid; gap: 32px; }
.topic {
  background: #fff; padding: 28px; border-radius: var(--radius);
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
}
.topic h3 { font-size: 1.6rem; }
.todo {
  background: var(--green-bg); border: 2px solid var(--green); border-left: 10px solid var(--green);
  padding: 4px 18px 10px; border-radius: var(--radius-small); margin: 20px 0;
}
.todo h4 { color: var(--green); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }

/* Expandable boxes */
details {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-small);
  padding: 0 16px; margin-top: 16px;
}
summary {
  cursor: pointer; font-weight: 800; padding: 14px 0; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem;
}
summary:hover { color: var(--blue); }
details[open] { padding-bottom: 14px; }
details[open] summary { border-bottom: 2px solid var(--ink); margin-bottom: 12px; }

/* Scenarios */
.scenarios details { margin: 14px 0; }
.scenario summary { font-size: 1rem; }

/* Phishing email demo */
.email-demo {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-small);
  padding: 16px 18px; margin: 14px 0; font-family: Arial, sans-serif; font-size: 1rem;
}
.email-line { padding: 5px 0; border-bottom: 1px solid #c3cbd9; }
.email-line .lbl { color: var(--muted); font-weight: 700; }
.email-body { padding-top: 10px; }
.hl { background: #e3d7ac; padding: 1px 4px; border-radius: 0; }
.flag { color: var(--red); font-weight: 800; margin-left: 4px; }
.fake-btn {
  display: inline-block; background: #2b7de9; color: #fff;
  padding: 8px 18px; border-radius: var(--radius-small); font-weight: 700;
}
.flag-list { background: var(--red-bg); border: 2px solid var(--red); padding: 14px 14px 14px 36px; border-radius: var(--radius-small); }
.flag-list li { margin: 6px 0; }

/* Quiz */
.quiz-box { background: #fff; border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 28px; }
.quiz-progress { color: var(--muted); font-weight: 800; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.quiz-question { font-size: 1.35rem; font-weight: 800; margin-bottom: 18px; color: var(--ink); }
.quiz-options { display: grid; gap: 10px; }
.quiz-options button, .btn {
  text-align: left; font: inherit; padding: 14px 16px; border-radius: var(--radius-small);
  border: 2px solid var(--ink); background: #fff; cursor: pointer; color: var(--text);
}
.quiz-options button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.quiz-options button.correct { background: var(--green-bg); border-color: var(--green); color: var(--text); }
.quiz-options button.wrong { background: var(--red-bg); border-color: var(--red); color: var(--text); }
.quiz-feedback { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-small); background: var(--bg-alt); border-left: 6px solid var(--ink); }
.btn {
  background: var(--ink); color: #fff; font-weight: 800; margin-top: 18px; text-align: center;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem;
}
.btn:hover { background: var(--blue); border-color: var(--blue); }
.score { font-size: 3rem; font-weight: 900; color: var(--ink); letter-spacing: -0.04em; }

/* Feedback */
.feedback-form {
  background: var(--bg-alt); border: 2px solid var(--ink);
  border-top: 6px solid var(--teal); border-radius: var(--radius); padding: 24px; margin-top: 24px;
}
.feedback-form label { display: block; font-weight: 800; margin-bottom: 10px; }
.feedback-form textarea {
  display: block; width: 100%; min-height: 160px; resize: vertical;
  border: 2px solid #606060; border-radius: var(--radius-small); padding: 12px;
  background: var(--bg); color: var(--text); font: inherit;
}
.feedback-form textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.feedback-form .btn { margin-top: 0; }
.contact-email { overflow-wrap: anywhere; }
#feedbackStatus:empty { display: none; }

/* Footer */
.site-footer { background: var(--ink); color: #b9c5dc; padding: 32px 0; text-align: center; border-top: 4px solid var(--teal); }
.site-footer a { color: var(--teal); }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  body { font-size: 1.05rem; }
  .hero { padding: 56px 0 44px; }
  .hero h1 { font-size: 2.4rem; }
  h2 { font-size: 1.7rem; }
  .menu-toggle { display: block; }
  .main-nav { display: none; width: 100%; padding-bottom: 12px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 14px; margin-bottom: 0; border-bottom: 0; border-left: 4px solid transparent; }
  .main-nav a.active { border-left-color: #606060; }
  .two-col { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .topic, .quiz-box { padding: 20px; box-shadow: 5px 5px 0 var(--ink); }
  .hero-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .quiz-box, .menu-toggle { display: none; }
  .topic { box-shadow: none; }
}
