/* ===============================
   AIEI EU AI Act Assessment
   Light theme — corporate, clean
================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg0: #f8fafc;
  --bg1: #ffffff;
  --bg2: #f1f5f9;

  --navy: #1a2744;
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --blue-pale: #eff6ff;

  --text: #1e2a3a;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #3b82f6;

  --shadow: 0 4px 24px rgba(26, 39, 68, 0.08);
  --shadow2: 0 2px 10px rgba(26, 39, 68, 0.06);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.07), 0 8px 24px rgba(26,39,68,0.07);

  --radius: 16px;
  --radius-sm: 10px;
}

/* ===============================
   RESET + BASE
================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: var(--bg0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 15px;
}

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

h1, h2, h3 { letter-spacing: -0.02em; color: var(--navy); }
h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.1; font-weight: 800; }
h2 { margin: 14px 0 10px; font-size: 22px; font-weight: 700; }
h3 { margin: 10px 0 8px; font-size: 17px; font-weight: 700; }
p { margin: 0 0 10px; }

.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }

/* ===============================
   LAYOUT
================================ */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 20px 70px;
}

/* ===============================
   HEADER / TOP BAR
================================ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brandLogo {
  height: 42px;
  width: auto;
  display: block;
}

.brandName {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.brandSub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.topRight {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow2);
}

.pill.pill-navy {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.pill.pill-blue {
  background: var(--blue-pale);
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.25);
}

/* ===============================
   HERO / BANNER
================================ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2d4080 60%, #1e3a6e 100%);
  border-radius: var(--radius);
  padding: 40px 36px;
  color: white;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 30%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.hero h1 {
  color: white;
  font-size: 36px;
  margin-bottom: 10px;
}

.hero .lead {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  line-height: 1.6;
  max-width: 70ch;
  margin: 0 0 18px;
}

.hero .disclaimer {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  line-height: 1.5;
}

.heroBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ===============================
   CARDS
================================ */
.card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.cardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cardTitle {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
}

.cardSub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 4px 0 0;
}

.badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-blue {
  background: var(--blue-pale);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.25);
}

.badge-navy {
  background: var(--navy);
  color: white;
  border: 1px solid var(--navy);
}

/* ===============================
   GRID
================================ */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  .hero { padding: 28px 20px; }
  .hero h1 { font-size: 26px; }
  .topbar { flex-wrap: wrap; }
}

/* ===============================
   DIVIDER
================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ===============================
   FORMS
================================ */
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder { color: #94a3b8; }

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

option { color: var(--text); background: white; }

/* ===============================
   BUTTONS
================================ */
.btnRow {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-size: 14px;
}

.btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow2);
  text-decoration: none;
}

.btnPrimary {
  border: 0;
  background: var(--blue);
  color: white;
  box-shadow: 0 4px 14px rgba(59,130,246,0.25);
}

.btnPrimary:hover {
  background: #2563eb;
  color: white;
  box-shadow: 0 6px 20px rgba(59,130,246,0.35);
  transform: translateY(-1px);
}

.btnNavy {
  border: 0;
  background: var(--navy);
  color: white;
  box-shadow: 0 4px 14px rgba(26,39,68,0.2);
}

.btnNavy:hover {
  background: #1e3060;
  color: white;
  transform: translateY(-1px);
}

/* ===============================
   CHIPS
================================ */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text);
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-pale);
}

/* ===============================
   ASSESSMENT FORM
================================ */
.steps {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  flex-wrap: wrap;
}

.bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--bg2);
  overflow: hidden;
  min-width: 150px;
  border: 1px solid var(--border);
}

.fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #60a5fa);
  transition: width 0.3s ease;
  border-radius: 999px;
}

/* Question styles */
.q {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.q:first-child { border-top: 0; }

.qtitle {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 2px;
}

.qweight {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.radioRow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 780px) {
  .radioRow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.opt {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.12s ease;
}

.opt:hover {
  border-color: var(--blue);
  background: var(--blue-pale);
}

.opt input { width: auto; margin-top: 3px; }

.opt:has(input:checked) {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
  background: var(--blue-pale);
}

.opt-yes:has(input:checked) { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.1); background: #f0fdf4; }
.opt-partial:has(input:checked) { border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,0.1); background: #fffbeb; }
.opt-planned:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); background: var(--blue-pale); }
.opt-no:has(input:checked) { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.1); background: #fef2f2; }

.opt-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
}

.opt-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

/* Section headers in form */
.sectionHeader {
  background: var(--navy);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin: 20px 0 4px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.hide { display: none; }

/* ===============================
   RESULTS PAGE
================================ */
.score {
  font-size: 56px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -2px;
  line-height: 1;
}

.scoreLabel {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}

.scoreGreen { color: #16a34a; }
.scoreAmber { color: #d97706; }
.scoreRed { color: #dc2626; }

.loader {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 14px;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.errorBox {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  white-space: pre-wrap;
}

.mono {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 14px;
  color: var(--text);
}

/* ===============================
   PANEL / INFO BOX
================================ */
.infoPanel {
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 14px;
}

.infoPanelTitle {
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
  margin: 0 0 6px;
}

.infoPanelSub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

ul { margin: 10px 0 0 18px; padding: 0; }
li { margin: 6px 0; font-size: 14px; }

/* ===============================
   FOOTER
================================ */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.footer a { color: var(--blue); }
