/* NordicGov AIMS - self-contained UI. No build step, no CDN.
   Direction: a calm Nordic governance console. Ink + a single signal teal,
   with semantic risk colours used only where risk is the actual meaning. */

:root {
  --ink-900: #0f1b2d;
  --ink-800: #16263d;
  --ink-700: #233650;
  --ink-600: #334b6b;
  --slate-500: #5b6b82;
  --slate-400: #7e8da3;
  --slate-300: #aab6c6;
  --line: #e3e8ef;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --canvas-2: #eef1f6;

  --teal-600: #0e7c86;
  --teal-500: #11949f;
  --teal-50: #e6f4f5;

  --risk-low: #2f9e6b;
  --risk-low-bg: #e7f4ee;
  --risk-medium: #c8861a;
  --risk-medium-bg: #fbf1de;
  --risk-high: #c23b3b;
  --risk-high-bg: #f9e6e6;

  --ok: #2f9e6b;
  --ok-bg: #e7f4ee;
  --err: #c23b3b;
  --err-bg: #f9e6e6;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-800);
  background: var(--canvas);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--ink-900);
  color: #c7d2e0;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 20px;
  color: #fff;
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 15px;
}
.brand b { font-size: 15px; letter-spacing: .2px; font-weight: 650; }
.brand small { display: block; color: var(--slate-400); font-size: 11px; font-weight: 500; letter-spacing: .3px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: #aebdce; font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.active { background: var(--teal-600); color: #fff; }
.nav .group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--slate-500); padding: 16px 11px 6px; font-weight: 600;
}
/* Collapsible group header (button) */
.nav-section .group-label {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: 0; cursor: pointer;
  font-family: inherit; text-align: left;
}
.nav-section .group-label:hover { color: var(--slate-300); }
.nav-section .group-label::after {
  content: ""; width: 6px; height: 6px; margin-left: 8px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease; opacity: .7;
}
.nav-section.collapsed .group-label::after { transform: rotate(-45deg); }
.nav-section.collapsed .nav-links { display: none; }
.nav a.disabled { opacity: .42; cursor: default; }
.nav a.disabled:hover { background: none; color: #aebdce; }

.sidebar-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot .lang-switch { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.sidebar-foot .lang-switch a { color: var(--slate-400); font-size: 11.5px; font-weight: 600; padding: 0; }
.sidebar-foot .lang-switch a:hover { color: #fff; background: none; }
.sidebar-foot .lang-switch a.on { color: var(--accent-400, #4fd1c5); }
.sidebar-foot .lang-switch span { color: var(--slate-600); font-size: 11px; }
.sidebar-foot .who { color: #fff; font-weight: 600; font-size: 13px; }
.sidebar-foot .role { color: var(--slate-400); font-size: 11.5px; text-transform: capitalize; }
.sidebar-foot form { margin-top: 10px; }
.linkbtn { background: none; border: 0; color: var(--slate-300); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { color: #fff; }

.main { flex: 1; min-width: 0; }
.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -.2px; color: var(--ink-900); }
.content { padding: 28px; max-width: 1180px; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.page-head .sub { color: var(--slate-500); font-size: 13px; margin-top: 2px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 650; color: var(--ink-900); }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: 1.4fr 1fr; }

/* ---------- Stat tiles ---------- */
.stat { padding: 18px 20px; }
.stat .label { color: var(--slate-500); font-size: 12px; font-weight: 550; letter-spacing: .2px; }
.stat .value { font-size: 30px; font-weight: 680; color: var(--ink-900); margin-top: 6px; letter-spacing: -1px; }
.stat .value.small { font-size: 22px; }

/* score ring as a simple meter */
.score { display: flex; align-items: center; gap: 16px; }
.score .num { font-size: 34px; font-weight: 700; color: var(--ink-900); letter-spacing: -1.5px; }
.meter { height: 8px; background: var(--canvas-2); border-radius: 99px; overflow: hidden; flex: 1; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-500), var(--teal-600)); border-radius: 99px; }

/* risk segmented bar */
.riskbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--canvas-2); margin-top: 12px; }
.riskbar i { display: block; height: 100%; }
.riskbar .low { background: var(--risk-low); }
.riskbar .medium { background: var(--risk-medium); }
.riskbar .high { background: var(--risk-high); }
.risk-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12.5px; color: var(--slate-500); }
.risk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 99px; display: inline-block; }
.dot.low { background: var(--risk-low); } .dot.medium { background: var(--risk-medium); } .dot.high { background: var(--risk-high); }

/* audit timeline area markers */
.dot-area { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 8px; vertical-align: middle; background: var(--slate-400); }
.dot-ai_system { background: var(--teal-500); }
.dot-risk { background: var(--risk-medium); }
.dot-incident { background: var(--risk-high); }
.dot-policy { background: #5b6bd6; }
.dot-training { background: var(--risk-low); }
.dot-vendor { background: #9b6bd6; }
.dot-document { background: #2f9e6b; }
.dot-auth { background: var(--slate-400); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--slate-500); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line);
}
td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--canvas); }
.cell-title { font-weight: 600; color: var(--ink-900); }
.cell-sub { color: var(--slate-500); font-size: 12.5px; }
.id-tag { font-family: var(--mono); font-size: 12px; color: var(--slate-500); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--canvas-2); color: var(--ink-700);
  text-transform: capitalize;
}
.badge.low { background: var(--risk-low-bg); color: var(--risk-low); }
.badge.medium { background: var(--risk-medium-bg); color: var(--risk-medium); }
.badge.high { background: var(--risk-high-bg); color: var(--risk-high); }
.badge.approved { background: var(--ok-bg); color: var(--ok); }
.badge.pending { background: var(--risk-medium-bg); color: var(--risk-medium); }
.badge.rejected { background: var(--err-bg); color: var(--err); }
.badge.open { background: var(--risk-high-bg); color: var(--risk-high); }
.badge.in_progress { background: var(--teal-50); color: var(--teal-600); }
.badge.mitigated { background: var(--risk-low-bg); color: var(--risk-low); }
.badge.accepted { background: var(--canvas-2); color: var(--slate-500); }
.badge.closed { background: var(--ok-bg); color: var(--ok); }
.badge.critical { background: #4a0f12; color: #ffd9d9; }
.badge.investigating { background: var(--risk-medium-bg); color: var(--risk-medium); }
.badge.contained { background: var(--teal-50); color: var(--teal-600); }
.badge.resolved { background: var(--risk-low-bg); color: var(--risk-low); }
.badge.draft { background: var(--canvas-2); color: var(--slate-500); }
.badge.in_review { background: var(--risk-medium-bg); color: var(--risk-medium); }
.badge.published { background: var(--teal-50); color: var(--teal-600); }
.badge.archived { background: var(--canvas-2); color: var(--slate-400); }
.badge.planned { background: var(--canvas-2); color: var(--slate-500); }
.badge.completed { background: var(--ok-bg); color: var(--ok); }
.badge.expired { background: var(--risk-high-bg); color: var(--risk-high); }
.badge.under_review { background: var(--risk-medium-bg); color: var(--risk-medium); }
.badge.conditional { background: var(--teal-50); color: var(--teal-600); }
.badge.offboarded { background: var(--canvas-2); color: var(--slate-400); }
.badge.signed { background: var(--ok-bg); color: var(--ok); }
.badge.not_required { background: var(--canvas-2); color: var(--slate-500); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-800);
  cursor: pointer; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--canvas); text-decoration: none; }
.btn-primary { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.btn-primary:hover { background: var(--teal-500); }
.btn-danger { color: var(--err); border-color: var(--line); }
.btn-danger:hover { background: var(--err-bg); border-color: var(--err); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-row { display: flex; gap: 10px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-800); }
.field .hint { font-size: 12px; color: var(--slate-400); }
input, select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-900); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50);
}
textarea { resize: vertical; min-height: 84px; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--err); }
.field .err-msg { color: var(--err); font-size: 12px; }

/* Checkboxes and radios opt OUT of the full-width text-input box above and
   render at natural size with the brand accent. One rule fixes alignment
   everywhere: forms, quizzes, exams, checklists and consent boxes. */
input[type="checkbox"], input[type="radio"] {
  width: 17px; height: 17px; flex: 0 0 auto;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
  accent-color: var(--teal-500); cursor: pointer; vertical-align: middle;
}
input[type="checkbox"]:focus, input[type="radio"]:focus {
  outline: 2px solid var(--teal-500); outline-offset: 2px; box-shadow: none; border: 0;
}

/* Quiz & exam — clean, tappable option rows that stay on one line. */
.quiz-head { font-size: 15px; margin: 0 0 12px; color: var(--ink-900); }
.quiz-q { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.quiz-q legend { font-weight: 600; font-size: 14.5px; color: var(--ink-900); padding: 0; margin-bottom: 10px; line-height: 1.4; }
.quiz-opt {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 13px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.quiz-opt > input[type="radio"] { margin-top: 2px; }
.quiz-opt:hover { border-color: var(--teal-500); background: var(--teal-50); }
.quiz-opt:has(input:checked) { border-color: var(--teal-500); background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--teal-500); }
.quiz-opt > span { flex: 1; min-width: 0; line-height: 1.45; color: var(--ink-800); }

/* Check-off rows (checklists, consent) — control aligned to the first line. */
.check-row { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; line-height: 1.5; }
.check-row > input[type="checkbox"] { margin-top: 2px; }
.check-row.is-done > span { color: var(--slate-500); }

/* ---------- Flash ---------- */
.flash { padding: 11px 15px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px; font-weight: 500; }
.flash.success { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }

/* ---------- Detail rows ---------- */
.detail { display: grid; grid-template-columns: 180px 1fr; }
.detail > div { padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail dt { color: var(--slate-500); font-size: 13px; font-weight: 550; }
.detail dd { margin: 0; color: var(--ink-900); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 56px 20px; color: var(--slate-500); }
.empty h3 { color: var(--ink-800); margin-bottom: 6px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(1200px 600px at 50% -10%, #1b3350 0%, var(--ink-900) 55%); padding: 24px; }
.auth-card { width: 100%; max-width: 392px; background: var(--surface); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); padding: 30px; }
.auth-card .brand { padding: 0 0 22px; color: var(--ink-900); }
.auth-card .brand b { color: var(--ink-900); }
.auth-card h2 { margin: 0 0 4px; font-size: 19px; color: var(--ink-900); }
.auth-card p.lead { color: var(--slate-500); margin: 0 0 22px; font-size: 13.5px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .btn-primary { width: 100%; justify-content: center; padding: 11px; }
.seed-hint { margin-top: 18px; font-size: 12px; color: var(--slate-400); text-align: center; line-height: 1.6; }
.seed-hint code { font-family: var(--mono); color: var(--slate-500); }

.muted { color: var(--slate-500); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* Drawer controls are desktop-hidden; shown on mobile below.
   display:none keeps the checkbox out of layout entirely (so global input
   styles never apply) while :checked + sibling selectors still work. */
.nav-toggle { display: none; }
.nav-burger { display: none; }
.nav-scrim { display: none; }

@media (max-width: 880px) {
  /* Off-canvas sidebar drawer, opened by the topbar burger */
  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 4px; width: 40px; height: 40px; margin-left: -8px; border-radius: 9px;
    cursor: pointer; flex: 0 0 auto;
  }
  .nav-burger:hover { background: var(--surface-2, #f1f5f9); }
  .nav-burger span { display: block; height: 2px; width: 20px; background: var(--ink-900, #16222e); border-radius: 2px; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 272px; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease; overflow-y: auto;
    padding-top: 18px;
  }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.45); }
  .nav-toggle:checked ~ .nav-scrim {
    display: block; position: fixed; inset: 0; background: rgba(10,18,28,.5); z-index: 55;
  }

  .topbar { padding: 0 14px; gap: 10px; }
  .topbar h1 { font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 18px 14px; }

  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .detail dt { padding-bottom: 0; }

  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .head-actions, .form-actions { flex-wrap: wrap; }

  /* Keep tables readable: scroll horizontally instead of crushing columns. */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 560px; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .content { padding: 14px 12px; }
  .stat .value { font-size: 24px; }
  .page-head h2 { font-size: 21px; }
}

/* ---------- Dark mode ready ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #16202e; --canvas: #0e151f; --canvas-2: #1d2937;
    --line: #263242; --ink-900: #f1f5f9; --ink-800: #dbe3ec; --ink-700: #c2ccd9;
    --slate-500: #8a99ab; --slate-400: #6f7e90;
  }
  body { color: var(--ink-800); }
  .topbar, .card { background: var(--surface); }
  tbody tr:hover { background: var(--canvas-2); }
}

/* Invoice print */
@media print {
  .sidebar, .topbar, .no-print, .flash { display: none !important; }
  .shell, .main { display: block !important; margin: 0 !important; padding: 0 !important; }
  .invoice-sheet { box-shadow: none !important; border: none !important; max-width: 100% !important; }
  body { background: #fff !important; }
}
.dot-subscription { background: #d68b2f; }
.dot-invoice { background: #2f9e6b; }

/* Impersonation banner */
.imp-banner {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: #8a3d00; color: #fff;
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.imp-banner form { margin: 0; }
.imp-banner button {
  background: #fff; color: #8a3d00; border: 0; border-radius: 6px;
  padding: 4px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.imp-banner button:hover { background: #ffe9d6; }
@media (prefers-color-scheme: dark) {
  .imp-banner { background: #b35311; }
  .imp-banner button { color: #b35311; }
}
.dot-impersonation { background: #b35311; }

/* Auth language switch */
.auth-lang { margin-top: 22px; text-align: center; font-size: 12.5px; }
.auth-lang a { color: var(--slate-500); font-weight: 600; }
.auth-lang a.on { color: var(--accent-600); }
.auth-lang span { color: var(--slate-300); margin: 0 4px; }

/* Academy */
.course-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
.course-card:hover { border-color: var(--accent-500, #2f9e8f); transform: translateY(-2px); }
.course-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.course-meta .muted { font-size: 12px; }
.progress-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.progress-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--slate-200, #e2e8f0); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--accent-600, #2f9e8f); border-radius: 999px; }
.progress-label { font-size: 12px; font-weight: 600; color: var(--ink-700); white-space: nowrap; }

.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { border-bottom: 1px solid var(--line, #eef2f6); }
.lesson-list li:last-child { border-bottom: 0; }
.lesson-list a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink-900); }
.lesson-list a:hover { background: var(--hover, #f6f9fb); }
.lesson-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--slate-200, #e2e8f0); color: var(--ink-700); font-size: 12.5px; font-weight: 700; flex: none; }
.lesson-num.done { background: var(--accent-600, #2f9e8f); color: #fff; }
.lesson-title { flex: 1; font-weight: 500; }
.lesson-go { color: var(--slate-400); }

.lesson-body p { line-height: 1.7; color: var(--ink-800); margin: 0 0 16px; }
.lesson-foot { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line, #eef2f6); }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }

@media (prefers-color-scheme: dark) {
  .progress-bar { background: rgba(255,255,255,.12); }
  .lesson-list a:hover { background: rgba(255,255,255,.04); }
  .lesson-num { background: rgba(255,255,255,.12); color: #cdd9e5; }
}

/* ===== AI Act tiers & expanded register / dashboard ===== */
:root {
  --tier-prohibited: #7c1d1d; --tier-prohibited-bg: #f7e4e4;
  --tier-high: #c23b3b;       --tier-high-bg: #f9e6e6;
  --tier-limited: #c8861a;    --tier-limited-bg: #fbf1de;
  --tier-minimal: #2f9e6b;    --tier-minimal-bg: #e7f4ee;
}
.tier-pill {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
}
.tier-pill.tier-prohibited { background: var(--tier-prohibited-bg); color: var(--tier-prohibited); }
.tier-pill.tier-high { background: var(--tier-high-bg); color: var(--tier-high); }
.tier-pill.tier-limited { background: var(--tier-limited-bg); color: var(--tier-limited); }
.tier-pill.tier-minimal { background: var(--tier-minimal-bg); color: var(--tier-minimal); }

.riskbar i.tier-prohibited { background: var(--tier-prohibited); }
.riskbar i.tier-high { background: var(--tier-high); }
.riskbar i.tier-limited { background: var(--tier-limited); }
.riskbar i.tier-minimal { background: var(--tier-minimal); }
.dot.tier-prohibited { background: var(--tier-prohibited); }
.dot.tier-high { background: var(--tier-high); }
.dot.tier-limited { background: var(--tier-limited); }
.dot.tier-minimal { background: var(--tier-minimal); }

/* Form sections */
.form-section { margin-bottom: 16px; }
.section-title { font-size: 13px; font-weight: 650; color: var(--ink-900); margin: 0 0 4px; }
.form-section .section-title { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line, #eef2f6); }
.section-hint { font-size: 12.5px; color: var(--slate-500); margin: -8px 0 16px; }
.field .hint { font-size: 11.5px; color: var(--slate-500); margin-top: 4px; display: block; }

/* Dashboard score colour */
.score-good .meter > span { background: linear-gradient(90deg, var(--risk-low), #38b27d); }
.score-mid .meter > span { background: linear-gradient(90deg, var(--risk-medium), #e0a52e); }
.score-low .meter > span { background: linear-gradient(90deg, var(--risk-high), #d65454); }
.score .num small { font-size: 16px; font-weight: 600; color: var(--slate-400); margin-left: 1px; }

/* Attention panel */
.attn-list { list-style: none; margin: 12px 0 0; padding: 0; }
.attn-list li { border-bottom: 1px solid var(--line, #eef2f6); }
.attn-list li:last-child { border-bottom: 0; }
.attn-list a { display: flex; align-items: center; gap: 11px; padding: 11px 2px; text-decoration: none; color: var(--ink-900); font-size: 13.5px; }
.attn-list a:hover { color: var(--teal-600); }
.attn-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.attn-dot.high { background: var(--risk-high); }
.attn-dot.medium { background: var(--risk-medium); }
.attn-label { flex: 1; }
.attn-go { color: var(--slate-400); }
.all-clear { display: flex; align-items: center; gap: 14px; padding: 18px 0 6px; }
.all-clear .ac-check { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--risk-low-bg); color: var(--risk-low); font-size: 18px; font-weight: 700; flex: none; }

/* Activity feed */
.activity-feed { list-style: none; margin: 12px 0 0; padding: 0; }
.activity-feed li { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line, #eef2f6); font-size: 13px; }
.activity-feed li:last-child { border-bottom: 0; }
.af-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--slate-400); }
.af-text { flex: 1; color: var(--ink-700); }
.af-time { color: var(--slate-400); font-size: 11.5px; white-space: nowrap; }

/* Warning flash + breach card */
.flash.warn { background: var(--risk-medium-bg); color: #8a5a00; border: 1px solid #f0d9a8; }
.breach-card { border-color: #f0c9c9 !important; box-shadow: inset 3px 0 0 var(--risk-high); }
@media (prefers-color-scheme: dark) {
  .flash.warn { background: rgba(200,134,26,.16); color: #f0c674; border-color: rgba(200,134,26,.35); }
}

/* Onboarding checklist */
.onboarding { margin-bottom: 16px; border-color: var(--teal-300, #9fd8d0); background: linear-gradient(180deg, rgba(47,158,143,.05), transparent); }
.ob-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ob-progress { font-size: 13px; font-weight: 700; color: var(--teal-600, #2f9e8f); background: var(--teal-50, #e7f4ee); padding: 4px 12px; border-radius: 99px; }
.ob-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.ob-step { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line, #eef2f6); border-radius: 10px; text-decoration: none; color: var(--ink-900); font-size: 13.5px; transition: border-color .15s ease; }
.ob-step:hover { border-color: var(--teal-400, #4fd1c5); }
.ob-step.done { color: var(--slate-500); background: var(--canvas-2, #f6f9fb); }
.ob-step.done .ob-label { text-decoration: line-through; }
.ob-check { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--slate-300); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.ob-step.done .ob-check { background: var(--teal-600, #2f9e8f); border-color: var(--teal-600, #2f9e8f); }
.ob-label { flex: 1; }
.ob-go { color: var(--teal-500); font-weight: 700; }

/* ===== Compliance report (print-friendly) ===== */
.report-sheet { max-width: 820px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink-900); padding-bottom: 16px; margin-bottom: 22px; }
.report-head .r-title { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; color: var(--ink-900); }
.report-head .r-org { font-size: 14px; color: var(--slate-600); margin-top: 4px; }
.report-head .r-meta { text-align: right; font-size: 12px; color: var(--slate-500); line-height: 1.7; }
.report-score { display: flex; align-items: center; gap: 22px; padding: 18px 22px; background: var(--canvas-2); border-radius: 12px; margin-bottom: 24px; }
.report-score .rs-num { font-size: 44px; font-weight: 700; letter-spacing: -2px; color: var(--ink-900); line-height: 1; }
.report-score .rs-num small { font-size: 20px; color: var(--slate-400); }
.report-score .rs-meter { flex: 1; }
.report-score .rs-bar { height: 10px; background: #e5ebf0; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.report-score .rs-bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal-500), var(--teal-600)); }
.report-section { margin-bottom: 26px; break-inside: avoid; }
.report-section h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--slate-500); border-bottom: 1px solid var(--line); padding-bottom: 7px; margin: 0 0 12px; }
.report-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.report-metrics .rm { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.report-metrics .rm .rm-label { font-size: 11px; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.4px; }
.report-metrics .rm .rm-value { font-size: 24px; font-weight: 700; color: var(--ink-900); margin-top: 4px; }
.report-metrics .rm.warn .rm-value { color: var(--risk-high); }
.report-list { list-style: none; margin: 0; padding: 0; }
.report-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.report-list li:last-child { border-bottom: 0; }
.report-tierbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--canvas-2); margin-bottom: 10px; }
.report-tierbar i { display: block; height: 100%; }
.report-ok { color: var(--risk-low); font-weight: 600; }
.report-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--slate-400); }
@media print {
  .report-sheet { box-shadow: none !important; border: none !important; max-width: 100% !important; padding: 0 !important; }
  .report-metrics { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ===== Deadlines center ===== */
.dl-count { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--canvas-2); color: var(--slate-600); font-size: 11.5px; font-weight: 700; margin-left: 6px; }
.dl-overdue .dl-count { background: var(--risk-high-bg); color: var(--risk-high); }
.dl-soon .dl-count { background: var(--risk-medium-bg); color: var(--risk-medium); }
.dl-list { display: flex; flex-direction: column; }
.dl-row { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-900); }
.dl-row:last-child { border-bottom: 0; }
.dl-row:hover { background: var(--canvas-2); }
.dl-date { font-size: 12.5px; color: var(--slate-500); font-variant-numeric: tabular-nums; }
.dl-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dl-title { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-rel { font-size: 12px; color: var(--slate-500); white-space: nowrap; }
.dl-rel.overdue { color: var(--risk-high); font-weight: 600; }
.dl-rel.soon { color: var(--risk-medium); font-weight: 600; }
.dl-overdue { box-shadow: inset 3px 0 0 var(--risk-high); }
.dl-soon { box-shadow: inset 3px 0 0 var(--risk-medium); }
@media (max-width: 640px) { .dl-row { grid-template-columns: 1fr auto; } .dl-date { display: none; } }

/* ===== Error pages ===== */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--canvas, #f4f7fa); }
.error-card { background: #fff; border: 1px solid var(--line, #eef2f6); border-radius: 16px; padding: 40px 44px; text-align: center; max-width: 440px; box-shadow: 0 10px 40px rgba(20,40,60,.08); }
.error-card .error-code { font-size: 56px; font-weight: 800; letter-spacing: -2px; color: var(--teal-600, #2f9e8f); line-height: 1; }
.error-card h1 { font-size: 20px; margin: 10px 0 8px; color: var(--ink-900); }
.error-card p { color: var(--slate-500); font-size: 14px; margin: 0 0 22px; }
@media (prefers-color-scheme: dark) {
  .error-card { background: #1a2230; border-color: #2a3545; }
}

/* Sidebar account link */
.sidebar-foot .acct-link { display: inline-block; font-size: 12px; color: var(--teal-400, #4fd1c5); text-decoration: none; margin: 4px 0 8px; }
.sidebar-foot .acct-link:hover { text-decoration: underline; }

/* ===== Policy template library ===== */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tpl-card { display: flex; flex-direction: column; }
.tpl-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--teal-600, #2f9e8f); margin-bottom: 8px; }
.tpl-title { font-size: 15.5px; margin: 0 0 8px; line-height: 1.3; }
.tpl-title a { color: var(--ink-900); text-decoration: none; }
.tpl-title a:hover { color: var(--teal-600, #2f9e8f); }
.tpl-summary { font-size: 13px; color: var(--slate-500); line-height: 1.5; flex: 1; margin: 0 0 16px; }
.tpl-actions { display: flex; align-items: center; gap: 10px; }
.tpl-adopted { font-size: 12.5px; color: var(--risk-low, #2f9e6b); font-weight: 600; }
.policy-body { font-size: 14px; line-height: 1.7; color: var(--ink-700, #2a3744); white-space: normal; }

/* ===== Accessibility ===== */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 1000; background: var(--ink-900, #16222e); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--teal-500, #2fb8a8); outline-offset: 2px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ===== Public layout + landing ===== */
body.public { background: var(--canvas, #f4f7fa); }
.pub-nav { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 18px 24px; }
.pub-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-900, #16222e); }
.pub-brand .mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--teal-500, #2fb8a8), var(--teal-600, #2f9e8f)); color: #fff; font-weight: 800; }
.pub-actions { display: flex; align-items: center; gap: 10px; }
.pub-lang { font-size: 12px; font-weight: 700; color: var(--slate-500); text-decoration: none; padding: 4px 6px; }
.pub-lang.on { color: var(--teal-600, #2f9e8f); }
.pub-foot { max-width: 1100px; margin: 40px auto 0; padding: 24px; border-top: 1px solid var(--line, #eef2f6); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--slate-500); }
.btn-lg { padding: 12px 22px; font-size: 15px; }

.hero { padding: 64px 24px 48px; }
.hero-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; text-align: left; }
.hero-copy { min-width: 0; }
.hero-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--teal-600, #2f9e8f); background: var(--teal-50, #e7f4ee); padding: 5px 14px; border-radius: 99px; margin-bottom: 20px; }
.hero h1 { font-size: 42px; line-height: 1.1; letter-spacing: -1.2px; color: var(--ink-900, #16222e); margin: 0 0 16px; }
.hero-sub { font-size: 18px; line-height: 1.6; color: var(--slate-600, #51626f); margin: 0 auto 28px; max-width: 600px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-frameworks { margin-top: 26px; font-size: 12.5px; font-weight: 600; letter-spacing: .3px; color: var(--slate-400); }

.features { padding: 24px 24px 8px; }
.features-inner { max-width: 1080px; margin: 0 auto; }
.feat-title { text-align: center; font-size: 24px; letter-spacing: -.5px; color: var(--ink-900); margin: 0 0 28px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.feat-card { background: #fff; border: 1px solid var(--line, #eef2f6); border-radius: 14px; padding: 24px; }
.feat-card h3 { font-size: 16px; margin: 14px 0 8px; color: var(--ink-900); }
.feat-card p { font-size: 13.5px; line-height: 1.6; color: var(--slate-500); margin: 0; }
.feat-ic { width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(135deg, var(--teal-500, #2fb8a8), var(--teal-600, #2f9e8f)); position: relative; }
.feat-ic::after { content: ""; position: absolute; inset: 12px; border: 2px solid rgba(255,255,255,.9); border-radius: 4px; }
.feat-dpia::after { border-radius: 50%; }
.feat-risk::after { transform: rotate(45deg); inset: 13px; }
.feat-inc::after { border-radius: 4px 4px 12px 4px; }
.feat-report::after { inset: 11px 14px; border-width: 2px 2px 2px 6px; }
.feat-vendor::after { border-radius: 50% 4px 50% 4px; }

.cta-band { margin: 48px 24px 0; }
.cta-inner { max-width: 760px; margin: 0 auto; text-align: center; background: linear-gradient(135deg, var(--ink-900, #16222e), #1f3340); color: #fff; border-radius: 18px; padding: 44px 28px; }
.cta-inner h2 { font-size: 26px; letter-spacing: -.5px; margin: 0 0 10px; }
.cta-inner p { color: rgba(255,255,255,.75); font-size: 15px; margin: 0 0 22px; }
@media (max-width: 560px) { .hero h1 { font-size: 32px; } }

/* ===== Language picker (flags, top-right) ===== */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.lang-picker { position: relative; }
.lang-picker > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line, #e2e8f0); border-radius: 9px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-900, #16222e); user-select: none; }
.lang-picker > summary::-webkit-details-marker { display: none; }
.lang-picker > summary:hover { border-color: var(--teal-400, #4fd1c5); }
.lang-picker .lp-caret { font-size: 10px; color: var(--slate-400); transition: transform .15s; }
.lang-picker[open] .lp-caret { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 11px; box-shadow: 0 12px 34px rgba(20,40,60,.14); padding: 6px; min-width: 184px; max-height: 60vh; overflow-y: auto; }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: var(--ink-800, #25323d); font-size: 13.5px; }
.lang-menu a:hover { background: var(--surface-2, #f1f5f9); }
.lang-menu a[aria-current="true"] { background: var(--teal-50, #e7f4ee); color: var(--teal-700, #1f8174); font-weight: 600; }
.auth-lang-top { position: absolute; top: 18px; right: 18px; }
.pub-actions .lang-picker > summary { background: transparent; }
@media (prefers-color-scheme: dark) {
  .lang-picker > summary { background: #1a2230; border-color: #2a3545; color: #e7eef5; }
  .lang-menu { background: #1a2230; border-color: #2a3545; }
  .lang-menu a { color: #cdd9e5; }
  .lang-menu a:hover { background: #232f3e; }
}

/* ===== Rich landing page ===== */
.hero { padding: 56px 24px 40px; }
.hero-copy h1 { font-size: 42px; line-height: 1.1; letter-spacing: -1.2px; color: var(--ink-900, #16222e); margin: 0 0 16px; }
.hero-copy .hero-sub { margin: 0 0 26px; }
.hero-copy .hero-cta { justify-content: flex-start; }
.hero-note { margin-top: 18px; font-size: 12.5px; font-weight: 600; color: var(--slate-400); }
.hero-frameworks { text-align: center; }

/* product mock visual */
.hero-visual { perspective: 1400px; }
.mock { background: #fff; border: 1px solid var(--line, #e6ecf2); border-radius: 16px; box-shadow: 0 30px 70px -28px rgba(20,40,60,.45); overflow: hidden; transform: rotateY(-9deg) rotateX(3deg); }
.mock-bar { display: flex; gap: 6px; padding: 11px 14px; background: var(--surface-2, #f1f5f9); border-bottom: 1px solid var(--line, #e6ecf2); }
.mock-bar span { width: 9px; height: 9px; border-radius: 99px; background: #cdd7e1; }
.mock-bar span:nth-child(1){ background:#ef6f6f; } .mock-bar span:nth-child(2){ background:#f4c25b; } .mock-bar span:nth-child(3){ background:#62c98a; }
.mock-body { display: grid; grid-template-columns: 80px 1fr; min-height: 280px; }
.mock-side { background: var(--ink-900, #16222e); padding: 14px 12px; }
.mock-logo { color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; gap: 5px; margin-bottom: 16px; }
.mock-logo b { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, var(--teal-500,#2fb8a8), var(--teal-600,#2f9e8f)); display: inline-flex; align-items: center; justify-content: center; }
.mock-nav { height: 8px; border-radius: 5px; background: rgba(255,255,255,.13); margin-bottom: 10px; }
.mock-nav.on { background: var(--teal-500, #2fb8a8); }
.mock-main { padding: 16px; }
.mock-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 14px; }
.mock-stat { border: 1px solid var(--line,#eef2f6); border-radius: 9px; padding: 10px; }
.mock-score { font-size: 22px; font-weight: 800; color: var(--teal-600,#2f9e8f); }
.mock-score small { font-size: 12px; }
.mock-num { font-size: 22px; font-weight: 800; color: var(--ink-900,#16222e); }
.mock-cap { height: 6px; width: 70%; border-radius: 4px; background: var(--surface-2,#eef2f6); margin-top: 7px; }
.mock-chart { display: flex; align-items: flex-end; gap: 8px; height: 76px; padding: 10px; border: 1px solid var(--line,#eef2f6); border-radius: 9px; margin-bottom: 12px; }
.mock-chart .mb { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--teal-400,#4fd1c5), var(--teal-600,#2f9e8f)); opacity: .85; }
.mock-chart .mb.hi { background: linear-gradient(180deg,#f4c25b,#e0a93f); }
.mock-row { height: 9px; border-radius: 5px; background: var(--surface-2,#eef2f6); margin-bottom: 8px; }
.mock-row.short { width: 60%; }

/* section heading */
.section-head { max-width: 720px; margin: 0 auto 30px; text-align: center; }
.section-head h2 { font-size: 30px; letter-spacing: -.6px; color: var(--ink-900,#16222e); margin: 0 0 10px; }
.section-head p { font-size: 16px; line-height: 1.6; color: var(--slate-500); margin: 0; }

/* stats band */
.stats-band { background: var(--ink-900,#16222e); margin: 44px 0 0; padding: 30px 24px; }
.stats-inner { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; text-align: center; }
.stat-n { font-size: 34px; font-weight: 800; color: #fff; letter-spacing: -1px; }
.stat-l { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.6); margin-top: 4px; }

/* how it works */
.how { padding: 56px 24px 16px; }
.how-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.how-card { background: #fff; border: 1px solid var(--line,#eef2f6); border-radius: 14px; padding: 26px 24px; position: relative; }
.how-num { width: 34px; height: 34px; border-radius: 9px; background: var(--teal-50,#e7f4ee); color: var(--teal-700,#1f8174); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.how-card h3 { font-size: 17px; margin: 0 0 8px; color: var(--ink-900); }
.how-card p { font-size: 13.5px; line-height: 1.6; color: var(--slate-500); margin: 0; }

.features { padding: 56px 24px 16px; }
.features .feat-grid { max-width: 1080px; margin: 0 auto; }
.feat-ai::after, .feat-vendor::after, .feat-report::after { border-radius: 4px; }

/* frameworks */
.frameworks-sec { padding: 56px 24px 16px; }
.fw-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.fw-card { background: linear-gradient(180deg,#fff,var(--surface-2,#f7fafc)); border: 1px solid var(--line,#eef2f6); border-radius: 14px; padding: 26px 24px; }
.fw-check { width: 30px; height: 30px; border-radius: 99px; background: var(--teal-500,#2fb8a8); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.fw-card h3 { font-size: 17px; margin: 0 0 8px; color: var(--ink-900); }
.fw-card p { font-size: 13.5px; line-height: 1.6; color: var(--slate-500); margin: 0; }

/* pricing */
.pricing { padding: 56px 24px 16px; }
.price-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; align-items: start; }
.price-card { background: #fff; border: 1px solid var(--line,#e6ecf2); border-radius: 16px; padding: 28px 24px; position: relative; }
.price-card.popular { border-color: var(--teal-500,#2fb8a8); box-shadow: 0 18px 44px -22px rgba(47,184,168,.6); }
.price-tag { position: absolute; top: -12px; left: 24px; background: var(--teal-500,#2fb8a8); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 4px 12px; border-radius: 99px; }
.price-name { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--teal-600,#2f9e8f); }
.price-tagline { font-size: 13px; color: var(--slate-500); margin: 6px 0 16px; min-height: 34px; }
.price-amount { font-size: 30px; font-weight: 800; color: var(--ink-900,#16222e); letter-spacing: -1px; }
.price-amount .cur { font-size: 14px; font-weight: 600; color: var(--slate-400); }
.price-amount .per { font-size: 14px; font-weight: 500; color: var(--slate-400); }
.price-feats { list-style: none; padding: 18px 0; margin: 0; }
.price-feats li { font-size: 13px; color: var(--slate-600); padding: 7px 0 7px 24px; position: relative; line-height: 1.4; }
.price-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--teal-500,#2fb8a8); font-weight: 800; }
.btn-block { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.price-note { max-width: 1040px; margin: 18px auto 0; text-align: center; font-size: 12.5px; color: var(--slate-400); }

/* faq */
.faq { padding: 56px 24px 16px; }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line,#eef2f6); border-radius: 12px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 20px; font-size: 15px; font-weight: 600; color: var(--ink-900,#16222e); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-caret { font-size: 20px; color: var(--teal-500,#2fb8a8); font-weight: 400; flex: 0 0 auto; transition: transform .15s; }
.faq-item[open] .faq-caret { transform: rotate(45deg); }
.faq-a { padding: 0 20px 18px; font-size: 14px; line-height: 1.65; color: var(--slate-600); }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; text-align: center; }
  .hero-copy .hero-cta { justify-content: center; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .mock { transform: none; }
  .how-grid, .fw-grid, .price-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2,1fr); gap: 26px 20px; }
}
@media (prefers-color-scheme: dark) {
  .mock { background: #131a24; border-color: #283542; }
  .mock-bar { background: #1a2230; border-color: #283542; }
  .how-card, .fw-card, .price-card, .faq-item { background: #131a24; border-color: #283542; }
  .fw-card { background: #131a24; }
  .faq-item summary { color: #e7eef5; }
}

/* ===== Back-office CRM ===== */
.card-title { font-size: 15px; font-weight: 700; color: var(--ink-900, #16222e); margin: 0 0 14px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.text-danger { color: var(--risk-high, #d4554e) !important; }
.badge.sm { font-size: 10px; padding: 2px 7px; }

/* pipeline board */
.pipe-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.pipe-col { flex: 0 0 230px; background: var(--surface-2, #f4f7fa); border: 1px solid var(--line, #e6ecf2); border-radius: 12px; padding: 12px; }
.pipe-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 13px; color: var(--ink-900); padding-bottom: 8px; border-bottom: 2px solid var(--line, #e0e7ee); }
.pipe-head.pipe-won { border-bottom-color: var(--ok, #2f9e8f); }
.pipe-head.pipe-lost { border-bottom-color: var(--err, #d4554e); }
.pipe-count { background: #fff; border: 1px solid var(--line,#e6ecf2); border-radius: 99px; padding: 1px 9px; font-size: 12px; }
.pipe-mrr { font-size: 11.5px; color: var(--slate-400, #8a98a6); margin: 6px 0 10px; font-weight: 600; }
.pipe-cards { display: flex; flex-direction: column; gap: 9px; min-height: 30px; }
.lead-card { display: block; background: #fff; border: 1px solid var(--line,#e6ecf2); border-radius: 10px; padding: 11px 12px; text-decoration: none; transition: border-color .12s, transform .12s; }
.lead-card:hover { border-color: var(--teal-400, #4fd1c5); transform: translateY(-1px); }
.lead-co { font-weight: 600; font-size: 13.5px; color: var(--ink-900, #16222e); }
.lead-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.lead-val { font-size: 12.5px; font-weight: 700; color: var(--teal-600, #2f9e8f); }
.lead-foot { display: flex; gap: 6px; margin-top: 6px; font-size: 11.5px; }
.pipe-empty { text-align: center; padding: 10px 0; font-size: 12px; }

/* metric bar rows */
.bar-row { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-label { font-size: 12.5px; color: var(--slate-600, #51626f); }
.bar-track { height: 8px; background: var(--surface-2, #eef2f6); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--teal-500, #2fb8a8); border-radius: 99px; min-width: 2px; }
.bar-fill.is-won { background: var(--ok, #2f9e8f); }
.bar-fill.is-lost { background: var(--err, #d4554e); }
.bar-n { font-size: 12.5px; font-weight: 700; text-align: right; color: var(--ink-900); }

/* timeline */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.tl-item { display: grid; grid-template-columns: 66px 1fr auto; gap: 10px; align-items: start; }
.tl-type { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; text-align: center; padding: 3px 0; border-radius: 6px; background: var(--surface-2, #eef2f6); color: var(--slate-600, #51626f); height: fit-content; }
.tl-call { background: #e7f0ff; color: #2b6cb0; } .tl-email { background: #e7f4ee; color: #1f8174; }
.tl-meeting { background: #fdf0e0; color: #b9772a; } .tl-note { background: #eef2f6; color: #51626f; }
.tl-subject { font-size: 13.5px; font-weight: 600; color: var(--ink-900, #16222e); }

/* key-value list */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 0; }
.kv dt { font-size: 12.5px; color: var(--slate-400, #8a98a6); }
.kv dd { font-size: 13.5px; color: var(--ink-900, #16222e); margin: 0; }
.note-block { margin-top: 14px; padding: 12px; background: var(--surface-2, #f7fafc); border-radius: 9px; font-size: 13px; line-height: 1.55; color: var(--slate-600); }

/* task / plain lists */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line, #eef2f6); font-size: 13.5px; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list li.is-done span:first-child { text-decoration: line-through; color: var(--slate-400, #8a98a6); }

/* inline forms */
.inline-form, .row-log-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .row-log-form input, .row-log-form select { padding: 7px 9px; }
.activity-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface-2, #f7fafc); border-radius: 10px; }
.activity-form .af-row { display: flex; gap: 8px; }
.activity-form input, .activity-form textarea, .activity-form select { padding: 8px 10px; }
.row-log { position: relative; }
.row-log > summary { list-style: none; cursor: pointer; }
.row-log > summary::-webkit-details-marker { display: none; }
.row-log-form { position: absolute; right: 0; z-index: 20; margin-top: 6px; background: #fff; border: 1px solid var(--line,#e6ecf2); border-radius: 10px; padding: 10px; box-shadow: 0 12px 30px rgba(20,40,60,.16); width: 280px; }
.row-log-form input, .row-log-form select { width: 100%; }
.banner-ok { background: var(--ok-bg, #e7f4ee); color: var(--ok, #1f8174); border: 1px solid rgba(47,158,143,.3); padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; }

@media (max-width: 760px) {
  .pipe-col { flex-basis: 200px; }
  .tl-item { grid-template-columns: 60px 1fr; }
  .tl-item > .cell-sub:last-child { grid-column: 2; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}
@media (prefers-color-scheme: dark) {
  .pipe-col { background: #161d27; border-color: #283542; }
  .pipe-count, .lead-card, .row-log-form { background: #1a2230; border-color: #2a3545; }
  .lead-co, .tl-subject, .kv dd, .bar-n { color: #e7eef5; }
  .note-block, .activity-form { background: #161d27; }
}

/* ===== Site CMS / contact / announcement ===== */
.site-announce { background: var(--ink-900, #16222e); color: #fff; text-align: center; font-size: 13.5px; font-weight: 600; padding: 9px 16px; }
.field-hint { display: block; font-size: 11.5px; color: var(--slate-400, #8a98a6); margin-top: 5px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-900, #16222e); cursor: pointer; }
.check-row input { width: 17px; height: 17px; }

.contact { padding: 56px 24px 8px; }
.contact-inner { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact-copy h2 { font-size: 28px; letter-spacing: -.5px; color: var(--ink-900, #16222e); margin: 0 0 12px; }
.contact-copy p { font-size: 15.5px; line-height: 1.6; color: var(--slate-600, #51626f); margin: 0 0 16px; }
.contact-points { list-style: none; padding: 0; margin: 0; }
.contact-points li { position: relative; padding: 6px 0 6px 26px; font-size: 14px; color: var(--slate-600, #51626f); }
.contact-points li::before { content: "✓"; position: absolute; left: 0; color: var(--teal-500, #2fb8a8); font-weight: 800; }
.contact-form { display: flex; flex-direction: column; gap: 12px; position: relative; }
.contact-form .field { margin: 0; }

@media (max-width: 820px) {
  .contact-inner { grid-template-columns: 1fr; gap: 26px; }
}
@media (prefers-color-scheme: dark) {
  .contact-copy h2 { color: #e7eef5; }
}

/* ===== Vouchers ===== */
.code-chip { display: inline-block; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 700; font-size: 13px; letter-spacing: .5px; color: var(--ink-900, #16222e); background: var(--surface-2, #f1f5f9); border: 1px solid var(--line, #e0e7ee); border-radius: 7px; padding: 3px 9px; text-decoration: none; }
a.code-chip:hover { border-color: var(--teal-400, #4fd1c5); }
.code-chip.lg { font-size: 18px; padding: 6px 14px; letter-spacing: 1px; }
@media (prefers-color-scheme: dark) {
  .code-chip { background: #1a2230; border-color: #2a3545; color: #e7eef5; }
}

/* ===== Mobile polish: public + landing ===== */
@media (max-width: 560px) {
  .pub-nav { padding: 13px 14px; }
  .pub-actions { gap: 7px; }
  .pub-brand small { display: none; }
  .hero { padding: 34px 16px 26px; }
  .hero-copy h1 { font-size: 30px; }
  .stats-band { padding: 22px 16px; }
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .stat-n { font-size: 28px; }
  .section-head h2 { font-size: 23px; }
  .how, .features, .frameworks-sec, .pricing, .faq, .contact, .cta-band { padding-left: 16px; padding-right: 16px; }
  .cta-inner { padding: 32px 20px; }
  .contact-form.card.card-pad { padding: 18px; }
}
@media (max-width: 380px) {
  .pub-actions .btn { padding: 7px 10px; font-size: 12.5px; }
}

/* Academy level filter */
.filter-btn.is-active{background:var(--brand,#2563eb);color:#fff;border-color:var(--brand,#2563eb);}
