/* NIS2 Aware — shared stylesheet. No external fonts or libraries: works offline. */
:root {
  --ink: #12202f;
  --ink-soft: #46586b;
  --line: #dbe3ea;
  --bg: #f6f8fa;
  --card: #ffffff;
  --brand: #0d5c63;       /* deep teal */
  --brand-dark: #083f44;
  --brand-soft: #e3f1f1;
  --accent: #e0a526;      /* amber */
  --ok: #1f7a4d;
  --ok-soft: #e4f4ea;
  --bad: #b3362c;
  --bad-soft: #fbe9e7;
  --warn-soft: #fff5dd;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(18, 32, 47, .06), 0 4px 16px rgba(18, 32, 47, .06);
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 66px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.2rem; }
.logo svg { width: 34px; height: 34px; }
.logo span b { color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.nav a.cta { background: var(--brand); color: #fff; }
.nav a.cta:hover { background: var(--brand-dark); color: #fff; }
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang a { padding: 6px 9px; font-size: .82rem; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 1rem; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; margin-left: 0; }
  .nav.open { display: flex; }
}

/* Hero */
.hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 64px 0 56px; }
.hero p.lead { font-size: 1.2rem; max-width: 680px; opacity: .93; }
.hero .eyebrow { display: inline-block; background: rgba(255,255,255,.14); padding: 4px 12px; border-radius: 99px; font-size: .85rem; font-weight: 600; margin-bottom: 14px; }
.hero h1 { color: #fff; max-width: 820px; }
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 40px 0 28px; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: 8px; }
.breadcrumb a { color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; border-radius: 10px;
  padding: 12px 20px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--brand-dark); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--brand-soft); }
.btn.light { background: #fff; color: var(--brand-dark); }
.btn.light:hover { background: var(--brand-soft); }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Sections, cards, grids */
section.block { padding: 56px 0; }
section.block.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4em; }
.card .grow { flex: 1; }
.card .meta { font-size: .85rem; color: var(--ink-soft); margin-bottom: 10px; }
.tag { align-self: flex-start; display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 10px; letter-spacing: .02em; text-transform: uppercase; }
.tag.soon { background: #eef1f4; color: var(--ink-soft); }
.tag.done { background: var(--ok-soft); color: var(--ok); }
.icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; font-size: 1.35rem; }
.stat { font-size: 2rem; font-weight: 800; color: var(--brand); line-height: 1.1; }

/* Callouts */
.callout { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2em 0; }
.callout.warn { border-color: var(--accent); background: var(--warn-soft); }
.callout.ok { border-color: var(--ok); background: var(--ok-soft); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 32px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h3 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; opacity: .85; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eef3f6; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 1em 0; border-left: 3px solid var(--brand-soft); }
.timeline li { position: relative; padding: 0 0 14px 22px; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--brand); }
.timeline b { display: block; color: var(--brand-dark); }

/* Lesson stepper */
.course-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 32px 0 56px; align-items: start; }
@media (max-width: 860px) { .course-layout { grid-template-columns: 1fr; } }
.course-layout > * { min-width: 0; }
@media (max-width: 600px) { .lesson { padding: 20px; } .cert { padding: 32px 18px; } .cert .cert-name { font-size: 1.5rem; } body { font-size: 16px; } }
.toc { position: sticky; top: 86px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
@media (max-width: 860px) { .toc { position: static; } }
.toc h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.toc li { margin: 0; }
.toc a { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .93rem; line-height: 1.35; }
.toc a:hover { background: var(--bg); }
.toc a .n { flex: 0 0 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--ink-soft); }
.toc a.active { background: var(--brand-soft); }
.toc a.active .n { border-color: var(--brand); color: var(--brand); }
.toc a.seen .n { background: var(--brand); border-color: var(--brand); color: #fff; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 14px 0 4px; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .3s; }
.lesson { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); margin-bottom: 24px; }
.lesson .step-label { font-size: .8rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.js .stepper .lesson { display: none; }
.js .stepper .lesson.current { display: block; animation: fade .25s ease; }
.no-js .lesson-nav { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.keypoints { background: var(--bg); border-radius: var(--radius); padding: 16px 20px; margin-top: 1.2em; }
.keypoints h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.keypoints ul { margin-bottom: 0; }

/* Quiz + scope checker */
.quiz { margin-top: 8px; }
.q { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; background: #fff; }
.q legend, .q .q-title { font-weight: 700; margin-bottom: 12px; padding: 0; font-size: 1.02rem; }
.q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--brand); background: #fbfdfd; }
.opt input { margin-top: 5px; accent-color: var(--brand); flex: 0 0 auto; }
.opt.chosen { border-color: var(--brand); background: var(--brand-soft); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.explain { display: none; margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: .95rem; }
.q.answered .explain { display: block; }
.q .verdict { font-weight: 700; }
.q .verdict.ok { color: var(--ok); }
.q .verdict.bad { color: var(--bad); }
.result-box { border-radius: var(--radius); padding: 24px; margin: 20px 0; border: 1px solid var(--line); background: #fff; }
.result-box.pass { border-color: var(--ok); background: var(--ok-soft); }
.result-box.fail { border-color: var(--accent); background: var(--warn-soft); }
.result-box .score { font-size: 2.2rem; font-weight: 800; }
.result-box.ess { border-color: var(--bad); background: var(--bad-soft); }
.result-box.imp { border-color: var(--accent); background: var(--warn-soft); }
.result-box.out { border-color: var(--ok); background: var(--ok-soft); }
.result-box.chain { border-color: var(--brand); background: var(--brand-soft); }
.checker-step { display: none; }
.checker-step.current { display: block; animation: fade .25s ease; }
.no-js .checker-step { display: block; }
.optgroup-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 700; margin: 16px 0 8px; }
.opt small { display: block; color: var(--ink-soft); font-size: .85rem; }

/* Forms */
label.field { display: block; margin-bottom: 14px; font-weight: 600; font-size: .95rem; }
label.field input, label.field select, label.field textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
label.field input:focus, label.field select:focus, label.field textarea:focus, .opt:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: .93rem; }
.checkbox-row input { margin-top: 5px; accent-color: var(--brand); }

/* Certificate */
.cert {
  background: #fff; border: 2px solid var(--brand); border-radius: 6px; padding: 56px 48px;
  text-align: center; position: relative; max-width: 900px; margin: 24px auto; box-shadow: var(--shadow);
}
.cert::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--brand-soft); border-radius: 3px; pointer-events: none; }
.cert .cert-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; color: var(--brand); font-weight: 700; }
.cert h2 { font-size: 2.1rem; margin: 12px 0 4px; }
.cert .cert-name { font-size: 2rem; font-weight: 800; color: var(--brand-dark); border-bottom: 2px solid var(--line); display: inline-block; padding: 0 24px 6px; margin: 20px 0 6px; min-width: 50%; }
.cert .cert-company { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 20px; }
.cert .cert-course { font-size: 1.25rem; font-weight: 700; margin: 8px 0 24px; }
.cert .cert-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin: 20px 0; font-size: .95rem; }
.cert .cert-grid div b { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.cert .cert-note { font-size: .78rem; color: var(--ink-soft); max-width: 640px; margin: 24px auto 0; line-height: 1.45; }
.cert .cert-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.cert .cert-logo svg { width: 54px; height: 54px; }

/* Footer */
.site-footer { background: var(--ink); color: #c9d4de; padding: 40px 0 28px; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
@media (max-width: 700px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 16px; font-size: .82rem; color: #9fb0bf; }

/* Language chooser (root) */
.chooser { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); padding: 20px; }
.chooser .card { max-width: 520px; width: 100%; text-align: center; }
.chooser .btn { width: 100%; margin-bottom: 10px; }

/* Print */
@media print {
  body { background: #fff; font-size: 11pt; }
  *, *::before { animation: none !important; transition: none !important; }
  .site-header, .site-footer, .toc, .lesson-nav, .no-print, .menu-btn, .btn-row, .cta-band { display: none !important; }
  .js .stepper .lesson { display: block !important; }
  .lesson { box-shadow: none; border: 0; padding: 0 0 12pt; page-break-inside: auto; }
  .lesson { margin: 0 0 10pt; border-top: 1px solid #dbe3ea !important; padding-top: 12pt !important; }
  h2, h3, .step-label { break-after: avoid; }
  table, .keypoints, .callout, .timeline li { break-inside: avoid; }
  .lesson { break-inside: auto; }
  .course-layout { display: block; padding: 0; }
  .page-head { border: 0; padding: 0 0 12pt; }
  .cert { box-shadow: none; margin: 0 auto; page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .print-only { display: block !important; }
  #quiz, .quiz-section { display: none !important; }
}
.print-only { display: none; }
.print-cert main > *:not(.cert-wrap) { display: none !important; }

/* Scenario messages (phishing quiz) */
.scenario { margin: 4px 0 14px; }
.mail { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; font-size: .95rem; }
.mail-h { background: #eef3f6; padding: 10px 14px; border-bottom: 1px solid var(--line); line-height: 1.5; font-size: .88rem; }
.mail-h span { color: var(--ink-soft); display: inline-block; min-width: 64px; }
.mail-b { padding: 14px; }
.mail-b p:last-child { margin-bottom: 0; }
.mail.sms { max-width: 360px; border-radius: 16px; }
.mail.sms .mail-b { background: #f1f4f7; border-radius: 14px; margin: 10px; padding: 12px; }
.fake-link { color: #1a5fb4; text-decoration: underline; word-break: break-all; }
.attach { display: inline-block; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: .85rem; background: #fafbfc; }

/* Maturity check */
.scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scale .opt { margin: 0; justify-content: center; }
@media (max-width: 520px) { .scale { grid-template-columns: 1fr; } .scale .opt { justify-content: flex-start; } }
ol.gaps li { margin-bottom: 12px; }

/* Guides */
.guide h2 { margin-top: 1.6em; }
.qa { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); break-inside: avoid; }
.qa h3 { display: flex; gap: 12px; align-items: baseline; }
.qa h3 .n { flex: 0 0 auto; color: var(--brand); font-weight: 800; }
.qa .why, .qa .good { font-size: .95rem; margin-bottom: .5em; }
.qa .why b, .qa .good b { color: var(--brand-dark); }
table.glossary td.term { font-weight: 700; color: var(--brand-dark); }
table.glossary td { font-size: .9rem; }
@media print { table.glossary { break-inside: auto !important; } table.glossary tr { break-inside: avoid; } .qa { box-shadow: none; } table.glossary td, table.glossary th { font-size: 8.5pt; padding: 5px 7px; } }

@media screen and (max-width: 640px) {
  table.glossary, table.glossary tbody, table.glossary tr, table.glossary td { display: block; width: 100%; }
  table.glossary tr:first-child { display: none; }
  table.glossary tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.glossary td { border: 0; padding: 3px 14px; }
  table.glossary td:not(.term)::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-soft); }
  table.glossary td.term { font-size: 1rem; }
}

/* Checklists */
.cl-bar { position: sticky; top: 66px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow); }
.cl-bar .progress { flex: 1; min-width: 120px; margin: 0; }
.cl-status { font-size: .95rem; white-space: nowrap; }
.cl-actions { display: flex; gap: 8px; }
.cl-actions .btn { padding: 8px 12px; font-size: .9rem; }
ul.cl { list-style: none; padding: 0; margin: 0 0 1.4em; }
ul.cl li { margin: 0 0 8px; }
ul.cl label { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
ul.cl label:hover { border-color: var(--brand); }
ul.cl input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--ok); }
ul.cl .cl-text b { display: block; font-weight: 600; }
ul.cl .cl-text small { display: block; color: var(--ink-soft); font-size: .88rem; margin-top: 2px; line-height: 1.45; }
ul.cl li.done label { background: var(--ok-soft); border-color: #b8dcc6; }
ul.cl li.done .cl-text b { color: var(--ok); }
@media print { ul.cl label { border: 0; padding: 4px 0; } ul.cl li { break-inside: avoid; margin-bottom: 4px; } ul.cl input { width: 13px; height: 13px; } .guide h2 { margin-top: 1em; } }

/* Related links and FAQ */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
a.rel { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
a.rel:hover { border-color: var(--brand); color: var(--brand-dark); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.3rem; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 14px; color: var(--ink-soft); }
.tag.prog { background: var(--ok-soft); color: var(--ok); }
