/* =========================================================================
   Dentaal Tema by Corus — Implantaat Workflow tool
   Klinische, rustige stijl. Alle kleuren/maten als CSS-variabelen,
   zodat Corus-branding later in 1 plek aangepast kan worden.
   ========================================================================= */

:root {
  /* Vlakken */
  --bg:            #eef3f6;
  --surface:       #ffffff;
  --surface-2:     #f4f8fb;
  --surface-3:     #e8f1f6;

  /* Tekst (Corus navy) */
  --ink:           #003057;
  --ink-muted:     #5b7184;
  --ink-soft:      #8aa1b1;

  /* Lijnen */
  --border:        #d6e2ea;
  --border-strong: #b7ccd9;

  /* Corus merk */
  --navy:          #003057;
  --cyan:          #00c9ff;
  --cyan-deep:     #0095c8;

  /* Accent = primaire actie (navy), met cyaan als highlight */
  --accent:        #003057;
  --accent-hover:  #00233f;
  --accent-soft:   #e1f6ff;
  --accent-line:   #9bd9ef;
  --accent-ink:    #ffffff;

  /* Semantisch */
  --warn:          #9c5318;
  --warn-soft:     #fbeede;
  --warn-line:     #e6c39a;
  --ok:            #1f7a43;
  --ok-soft:       #e4f2e9;

  /* Radius + schaduw */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0,48,87,.06);
  --shadow-md: 0 10px 30px -12px rgba(0,48,87,.18);
  --shadow-lg: 0 24px 60px -20px rgba(0,48,87,.24);

  /* Type (Corus = Inter) */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Inter', system-ui, sans-serif;

  /* Ritme (4px basis) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(0,201,255,.12), transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  z-index: 50;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* ---------- Topbar ---------- */
.topbar {
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.brand { display: flex; align-items: center; gap: var(--sp-4); }
.brand__logo { height: 30px; width: auto; display: block; }
.brand__sep { width: 1px; height: 26px; background: var(--border-strong); }
.brand__product { display: flex; flex-direction: column; line-height: 1.18; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.brand__product small { font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--ink-muted); }
.version-pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--cyan-deep);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  line-height: 1.4;
  align-self: center;
}
.tagline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

/* ---------- App shell ---------- */
#app {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-8);
  outline: none;
}

/* ---------- Progress ---------- */
.progress { margin-bottom: var(--sp-4); }
.progress__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  min-height: 32px;
}
.progress__module {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.btn-back:hover { color: var(--ink); border-color: var(--border-strong); background: var(--surface-2); }
.btn-back svg { width: 14px; height: 14px; }
.progress__bar {
  height: 5px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--navy));
  border-radius: var(--r-pill);
  transition: width .4s cubic-bezier(.2,.7,.2,1);
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: var(--sp-6);
  animation: rise .32s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--sp-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}

.card h1 {
  font-size: clamp(22px, 3.4vw, 29px);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 var(--sp-3);
  font-weight: 700;
}
.card .lead {
  color: var(--ink-muted);
  margin: 0 0 var(--sp-5);
  font-size: 16px;
}
.help {
  display: flex;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--ink-muted);
  font-size: 14px;
  margin: 0 0 var(--sp-5);
}
.help svg { flex: none; width: 17px; height: 17px; color: var(--accent); margin-top: 1px; }

/* ---------- Option buttons ---------- */
.options { display: flex; flex-direction: column; gap: var(--sp-3); }
.opt {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  cursor: pointer;
  font-family: var(--font);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease, background .15s ease;
}
.opt:hover { border-color: var(--accent-line); background: var(--surface-2); transform: translateY(-1px); }
.opt:active { transform: translateY(0); }
.opt__body { flex: 1; min-width: 0; }
.opt__label { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.opt__sub { font-size: 13.5px; color: var(--ink-muted); margin-top: 2px; }
.opt__chev { flex: none; color: var(--ink-soft); transition: transform .15s ease, color .15s ease; }
.opt:hover .opt__chev { color: var(--accent); transform: translateX(2px); }
.opt__chev svg { width: 18px; height: 18px; display: block; }

/* mono-waarde marker links (bv. 20 µm) */
.opt__tag {
  flex: none;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  min-width: 64px;
  text-align: center;
}

/* warn-variant (bv. niet aanbevolen) */
.opt--warn .opt__tag { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.opt--warn:hover { border-color: var(--warn-line); }

/* ---------- Lists: checklist + workflow ---------- */
.block-intro {
  color: var(--ink-muted);
  font-size: 15px;
  margin: 0 0 var(--sp-4);
}
.block-note {
  margin: var(--sp-4) 0 0;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-line);
  border-radius: var(--r-md);
}
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 15px;
  font-size: 15.5px;
}
.checklist li::before {
  content: "";
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 6px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23003057' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
  border: 1px solid var(--accent-line);
}
.checklist .sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 4px;
}

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 4px; }
.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 11px 4px;
  font-size: 15.5px;
  position: relative;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
/* verbindingslijn tussen stappen */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 39px;
  bottom: -4px;
  width: 1.5px;
  background: var(--accent-line);
}

/* ---------- Register fields ---------- */
.fields { display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.field label.field__label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field input[type="text"] {
  width: 100%;
  font-family: var(--font);
  font-size: 15.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.segmented { display: inline-flex; gap: 6px; }
.segmented button {
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 20px;
  cursor: pointer;
  transition: all .14s ease;
}
.segmented button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.segmented button:hover { border-color: var(--border-strong); }

/* ---------- Generic buttons ---------- */
.actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 15.5px;
  font-weight: 600;
  border-radius: var(--r-md);
  padding: 13px 22px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn--block { width: 100%; }

/* ---------- Info / note panels ---------- */
.note {
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-size: 15.5px;
  margin: 0 0 var(--sp-4);
}
.note--info { background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-muted); }
.note--warn { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); }
.note--warn strong { color: var(--warn); }

.principle { list-style: none; margin: var(--sp-4) 0 0; padding: 0; counter-reset: p; display: flex; flex-direction: column; gap: 8px; }
.principle li {
  display: flex; gap: 12px; align-items: baseline;
  font-size: 15px; color: var(--ink);
}
.principle li::before {
  counter-increment: p;
  content: counter(p);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  flex: none;
  width: 22px; text-align: right;
}

/* ---------- Outcome / summary ---------- */
.outcome-hero {
  text-align: center;
  padding: var(--sp-4) 0 var(--sp-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}
.outcome-hero .check {
  width: 56px; height: 56px;
  margin: 0 auto var(--sp-4);
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: grid; place-items: center;
}
.outcome-hero .check svg { width: 30px; height: 30px; color: var(--accent); }
.outcome-hero h1 { margin-bottom: var(--sp-2); }
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: var(--sp-3); }
.product-tag {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  padding: 6px 14px;
}

.summary { display: flex; flex-direction: column; gap: var(--sp-5); }
.summary section { }
.summary h2 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--sp-3);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.decisions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.decisions li {
  display: flex;
  gap: var(--sp-4);
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
}
.decisions .q { color: var(--ink-muted); flex: 1; }
.decisions .a { font-weight: 600; text-align: right; }
.decisions .a small { display:block; font-weight: 500; color: var(--ink-muted); font-size: 12.5px; }

.summary-group { margin-bottom: var(--sp-4); }
.summary-group h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
}
.summary-group:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: var(--sp-6) var(--sp-5);
  margin-top: var(--sp-6);
  background: var(--navy);
  color: rgba(255,255,255,.72);
  font-size: 12.5px;
}
.footer__mark { height: 24px; width: auto; opacity: .92; margin-bottom: 10px; display: inline-block; }
.footer p { margin: 0; }

/* ---------- Focus visibility ---------- */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Koppen krijgen programmatische focus (voor schermlezers) maar zijn niet
   interactief — geen zichtbare focusring tonen. */
.card h1:focus, .card h1:focus-visible { outline: none; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .topbar__inner { padding: var(--sp-3) var(--sp-4); }
  .tagline { display: none; }
  .brand__sep, .brand__product { display: none; }
  #app { padding: var(--sp-5) var(--sp-4) var(--sp-7); }
  .card { padding: var(--sp-5) var(--sp-4); }
  .opt { padding: 14px 15px; }
  .actions .btn { flex: 1; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Fout melden (report fault) ---------- */
.report-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r-pill);
  padding: 11px 16px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.report-fab:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.report-fab svg { width: 17px; height: 17px; flex: none; }

.report-dialog {
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.report-dialog::backdrop { background: rgba(0, 48, 87, .32); backdrop-filter: blur(2px); }
.report-form { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.report-form h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.report-lead { margin: 0; font-size: 14px; color: var(--ink-muted); line-height: 1.5; }
.report-field { display: flex; flex-direction: column; gap: 6px; }
.report-field span { font-size: 14px; font-weight: 600; }
.report-field textarea {
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  resize: vertical;
}
.report-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.report-context { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.report-context span { color: var(--ink-muted); font-weight: 600; }
.report-actions { display: flex; gap: var(--sp-3); justify-content: flex-end; margin-top: var(--sp-2); }
.report-actions .btn { padding: 10px 18px; font-size: 14.5px; }

@media (max-width: 560px) {
  .report-fab span { display: none; }
  .report-fab { right: 14px; bottom: 14px; padding: 13px; }
}

/* ---------- Print: alleen de samenvatting netjes ---------- */
@media print {
  body { background: #fff; }
  .topbar, .footer, .progress, .actions, .skip-link, .report-fab, .report-dialog { display: none !important; }
  #app { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: none; padding: 0; animation: none; }
  .outcome-hero { border-color: #000; }
  .product-tag, .summary h2 { color: #000; }
}
