/* AI4DigiT AI Compliance Portal
   Colour roles follow the reference data-viz palette. Score bars are a single
   sequential hue (magnitude, one measure). Status colours are the fixed status
   palette and always ship with a symbol + text label, never colour alone. */

:root {
  color-scheme: light;
  --surface-1: #fcfcfb;
  --page: #f9f9f7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --muted: #898781;
  --gridline: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --seq: #2a78d6;
  --seq-soft: #cde2fb;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --success-text: #006300;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface-1: #1a1a19;
    --page: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --muted: #898781;
    --gridline: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --seq: #3987e5;
    --seq-soft: #184f95;
    --success-text: #0ca30c;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--seq); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }

/* layout */
header.top {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  padding: 10px 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
/* The wordmark is the way back to the service chooser, from any page. */
header.top .brand {
  font-weight: 700; letter-spacing: -.01em;
  color: inherit; text-decoration: none; border-radius: 7px;
  padding: 4px 6px; margin-left: -6px;
}
header.top .brand:hover { background: var(--page); }
header.top .brand span { color: var(--muted); font-weight: 400; margin-left: 6px; }
nav.main { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
nav.main a {
  padding: 6px 11px; border-radius: 7px; text-decoration: none;
  color: var(--text-secondary); font-size: 14px;
}
nav.main a:hover { background: var(--page); }
nav.main a.on { background: var(--seq); color: #fff; }
main { max-width: 1080px; margin: 0 auto; padding: 26px 22px 70px; }
.wide { max-width: 1240px; }

h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 4px; }
h2 { font-size: 19px; letter-spacing: -.01em; margin: 30px 0 12px; }
h3 { font-size: 16px; margin: 22px 0 8px; }
.sub { color: var(--text-secondary); margin: 0 0 22px; }

.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 16px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* hero score — a stat tile, not a chart */
.hero { display: flex; align-items: baseline; gap: 14px; }
.hero .value { font-size: 58px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.hero .of { color: var(--muted); font-size: 17px; }
.tile-label { color: var(--text-secondary); font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 8px; }

/* domain bars — single sequential hue, direct-labelled, baseline anchored */
.bars { margin-top: 6px; }
.bar-row { display: grid; grid-template-columns: 210px 1fr 46px; gap: 12px;
  align-items: center; padding: 7px 0; border-bottom: 1px solid var(--gridline); }
.bar-row:last-child { border-bottom: 0; }
.bar-name { color: var(--text-secondary); font-size: 13.5px; }
.bar-track { background: var(--seq-soft); height: 12px; border-radius: 3px;
  border-left: 2px solid var(--baseline); position: relative; overflow: hidden; }
.bar-fill { height: 100%; background: var(--seq);
  border-radius: 0 4px 4px 0; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums;
  font-size: 13.5px; color: var(--text-primary); }
.bar-na { color: var(--muted); font-size: 12.5px; }

/* status — always symbol + label */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  font-weight: 600; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-1); }
.badge .dot { font-size: 11px; line-height: 1; }
.badge.good .dot { color: var(--good); }
.badge.warning .dot { color: var(--warning); }
.badge.serious .dot { color: var(--serious); }
.badge.critical .dot { color: var(--critical); }
.badge.neutral .dot { color: var(--muted); }

.finding { border-left: 3px solid var(--critical); background: var(--surface-1);
  border-radius: 0 8px 8px 0; padding: 12px 15px; margin-bottom: 10px; }
.finding .t { font-weight: 650; }
.finding .w { color: var(--text-secondary); font-size: 14px; margin-top: 3px; }

.disclaimer { border-left: 3px solid var(--warning); background: var(--surface-1);
  padding: 11px 15px; border-radius: 0 8px 8px 0; color: var(--text-secondary);
  font-size: 13.5px; margin: 14px 0; }

/* progress */
.prog { height: 6px; background: var(--gridline); border-radius: 3px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--seq); border-radius: 0 3px 3px 0; }

/* tables */
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--gridline);
  vertical-align: top; }
th { color: var(--text-secondary); font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; }
table.doc td, table.doc th { border-bottom: 1px solid var(--gridline); }
tr.done td { opacity: .55; }

/* assessment grid */
.qcard { background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.qid { color: var(--seq); font-weight: 700; font-size: 13px; }
.qprompt { font-weight: 600; margin: 3px 0 12px; }
.opt-head { display: grid; gap: 8px; align-items: end; margin-bottom: 4px; }
.opt-head div { font-size: 11.5px; color: var(--muted); text-align: center;
  line-height: 1.25; }
.stmt-row { display: grid; gap: 8px; align-items: center; padding: 7px 0;
  border-top: 1px solid var(--gridline); }
.stmt-row .s { font-size: 14px; }
.stmt-row label { display: flex; justify-content: center; cursor: pointer; padding: 5px 0; }
.stmt-row label:hover { background: var(--page); border-radius: 6px; }

/* controls */
.btn { display: inline-block; background: var(--seq); color: #fff; border: 0;
  padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--seq); border: 1px solid var(--border); }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
input[type=text], input[type=email], input[type=password], input[type=date],
select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--baseline);
  border-radius: 8px; background: var(--surface-1); color: var(--text-primary); width: 100%;
}
label.fld { display: block; margin-bottom: 12px; }
label.fld > span { display: block; font-size: 12.5px; color: var(--text-secondary);
  margin-bottom: 4px; }
.muted { color: var(--muted); font-size: 13px; }
.pill { font-size: 12px; color: var(--text-secondary); background: var(--page);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
ul.check { list-style: none; padding-left: 0; }
ul.check li::before { content: "☐ "; color: var(--muted); }
blockquote { border-left: 3px solid var(--gridline); margin: 10px 0;
  padding: 4px 0 4px 14px; color: var(--text-secondary); }
.sidebar { position: sticky; top: 16px; }
.sidebar a { display: block; padding: 6px 10px; border-radius: 7px; font-size: 13.5px;
  text-decoration: none; color: var(--text-secondary); }
.sidebar a.on { background: var(--seq); color: #fff; font-weight: 600; }
.sidebar a:hover:not(.on) { background: var(--page); }

@media print {
  header.top, nav.main, .noprint { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}

/* captcha */
.cap { display:inline-flex; border:1px solid var(--border); border-radius:8px;
       overflow:hidden; line-height:0; background:#f0efec; }

/* success confirmation */
.ok-banner { border-left: 3px solid var(--good); background: var(--surface-1);
  padding: 11px 15px; border-radius: 0 8px 8px 0; margin: 0 0 16px;
  font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ok-banner .dot { color: var(--good); font-size: 12px; }

/* ============================================================
   Service chooser — portal entrance
   Two services: AI Compliance (first), GDPR Compliance (second).
   ============================================================ */
.svc-head { text-align: center; margin: 6px 0 26px; }
.svc-title {
  margin: 0 0 6px; letter-spacing: -.02em;
  animation: svc-rise .5s cubic-bezier(.2,.7,.3,1) both;
}
.svc-subtitle {
  max-width: 620px; margin: 0 auto;
  animation: svc-rise .5s cubic-bezier(.2,.7,.3,1) .06s both;
}

.svc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  align-items: stretch;
}

.svc-card {
  --accent: var(--seq);
  --accent-soft: var(--seq-soft);
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  padding: 26px 26px 22px;
  background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 16px;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(11,11,11,.05);
  transition: transform .28s cubic-bezier(.2,.7,.3,1),
              box-shadow .28s ease, border-color .28s ease;
  animation: svc-rise .55s cubic-bezier(.2,.7,.3,1) both;
  animation-delay: calc(.12s + var(--i, 0) * .09s);
}
.svc-card.svc-gdpr { --accent: #0ca30c; --accent-soft: #cfeccf; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .svc-card.svc-gdpr { --accent-soft: #14431a; }
}

.svc-card:hover, .svc-card:focus-visible {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--accent) 42%, transparent),
              0 2px 6px rgba(11,11,11,.06);
}
.svc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.svc-card:active { transform: translateY(-2px); }

/* soft radial glow that fades in on hover */
.svc-glow {
  position: absolute; inset: -40% -20% auto -20%; height: 320px; z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%,
              color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%);
  opacity: .5; transition: opacity .35s ease, transform .45s ease;
}
.svc-card:hover .svc-glow { opacity: 1; transform: translateY(8px); }

/* diagonal light sweep on hover */
.svc-sheen {
  position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, transparent,
              color-mix(in srgb, var(--accent) 14%, transparent), transparent);
  transform: skewX(-14deg); opacity: 0;
}
.svc-card:hover .svc-sheen { animation: svc-sweep .9s ease forwards; }

/* accent bar that grows along the top edge */
.svc-card::before {
  content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent),
              color-mix(in srgb, var(--accent) 35%, transparent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.svc-card:hover::before { transform: scaleX(1); }

.svc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.svc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.svc-icon svg { width: 27px; height: 27px; }
.svc-card:hover .svc-icon { transform: scale(1.07) rotate(-4deg); }
.svc-step {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--muted); font-variant-numeric: tabular-nums;
}

.svc-name { margin: 0 0 3px; font-size: 23px; letter-spacing: -.02em; }
.svc-tag {
  margin: 0 0 12px; font-size: 13px; font-weight: 600;
  color: var(--accent); letter-spacing: .01em;
}
.svc-desc { margin: 0 0 20px; color: var(--text-secondary); font-size: 14.5px; line-height: 1.55; flex: 1; }

.svc-metrics { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.svc-score { display: flex; align-items: baseline; gap: 5px; }
.svc-score-value { font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.svc-score-value.svc-dim { color: var(--muted); }
.svc-score-of { color: var(--muted); font-size: 14px; }
.svc-score-label {
  margin-left: 6px; font-size: 11px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.svc-state {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-secondary);
}
.svc-state .dot { font-size: 9px; line-height: 1; }
.svc-state.is-new  { color: var(--muted); }
.svc-state.is-live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.svc-state.is-done { color: var(--success-text); border-color: color-mix(in srgb, var(--good) 40%, var(--border)); }

.svc-prog { height: 6px; background: var(--gridline); border-radius: 3px; overflow: hidden; }
.svc-prog > i {
  display: block; height: 100%; width: var(--w, 0%); border-radius: 3px;
  background: linear-gradient(90deg, var(--accent),
              color-mix(in srgb, var(--accent) 60%, #fff));
  animation: svc-fill .9s cubic-bezier(.2,.7,.3,1) .35s both;
}
.svc-count { margin: 8px 0 18px; font-size: 12.5px; color: var(--muted); }

.svc-cta {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 10px 20px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14.5px;
  transition: gap .25s ease, box-shadow .25s ease, filter .25s ease;
}
.svc-card:hover .svc-cta {
  gap: 13px; filter: saturate(1.1);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 75%, transparent);
}
.svc-arrow { width: 16px; height: 16px; }

.svc-foot { text-align: center; margin-top: 24px; }
.svc-foot a { color: var(--muted); font-size: 14px; text-decoration: none; border-bottom: 1px solid transparent; }
.svc-foot a:hover { color: var(--seq); border-bottom-color: currentColor; }

@keyframes svc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes svc-fill { from { width: 0; } to { width: var(--w, 0%); } }
@keyframes svc-sweep { 0% { left: -60%; opacity: 0; } 35% { opacity: 1; } 100% { left: 115%; opacity: 0; } }

@media (max-width: 820px) { .svc-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .svc-card, .svc-title, .svc-subtitle, .svc-prog > i { animation: none; }
  .svc-card { transition: none; }
  .svc-card:hover { transform: none; }
  .svc-prog > i { width: var(--w, 0%); }
  .svc-card:hover .svc-sheen { animation: none; }
}
