/* CRIF design tokens + shared mobile-first styles */
@import url("https://fonts.googleapis.com/css2?family=Overpass:wght@700;900&family=Inter:wght@400;600;700&display=swap");

:root {
  --blue: #003671;
  --orange: #EF7B10;
  --coral: #0073AF;
  --sky: #0685C8;
  --light-blue: #B0CEEC;
  --honey: #F6B746;
  --green: #5C9524;
  --ink-900: #1D1E20;
  --ink-700: #4A4D50;
  --ink-500: #7B8085;
  --ink-300: #B8BBBE;
  --ink-100: #ECEDED;
  --surface: #FFFFFF;
  --surface-alt: #F9F9F9;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --shadow-sm: 0 2px 8px rgba(0,54,113,.06);
  --shadow-md: 0 8px 24px rgba(0,54,113,.10);
  --font-display: "Overpass", "Inter", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink-700);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--blue); line-height: 1.1; margin: 0; overflow-wrap: break-word; hyphens: auto; }
h1 { font-weight: 900; font-size: clamp(28px, 7vw, 44px); }
h2 { font-weight: 900; font-size: clamp(22px, 5.5vw, 32px); }
h3 { font-weight: 700; font-size: 19px; line-height: 1.25; }
p { margin: 0; }
a { color: var(--coral); }
button { font: inherit; }

/* Language switching: elements carry data-l="de" or data-l="en" */
html[data-lang="de"] [data-l="en"], html[data-lang="en"] [data-l="de"] { display: none !important; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.muted { color: var(--ink-500); font-size: 14px; }

/* App shell */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--blue); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; text-decoration: none; }
.brand-mark { width: 10px; height: 26px; background: var(--orange); border-radius: 2px; flex: none; }
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.1; }
.brand-text small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--light-blue); }
.lang { display: flex; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; overflow: hidden; flex: none; }
.lang button { background: transparent; border: 0; color: #fff; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--blue); }

.wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.card { background: var(--surface-alt); border-radius: var(--r-xl); padding: 20px; }
.card-link { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.card-link:active { transform: scale(.98); }
.card-link:hover { box-shadow: var(--shadow-md); }
.card-link .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--blue); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; flex: none; }
.card-link .ico.o { background: var(--orange); }
.card-link b { display: block; color: var(--blue); font-family: var(--font-display); }
.card-link span.sub { display: block; font-size: 14px; color: var(--ink-700); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 999px; border: 0;
  background: var(--orange); color: #fff; font-weight: 700; font-size: 17px; cursor: pointer;
  transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.secondary { background: var(--surface); color: var(--blue); border: 2px solid var(--ink-100); }
.btn.block { width: 100%; }

.option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 60px; padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 2px solid var(--ink-100); color: var(--ink-900);
  font-size: 17px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.option:active { transform: scale(.98); }
.option .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-300); flex: none; display: grid; place-items: center; }
.option.multi .dot { border-radius: 6px; }
.option[aria-pressed="true"] { border-color: var(--orange); background: #FFF6EC; }
.option[aria-pressed="true"] .dot { border-color: var(--orange); background: var(--orange); }
.option[aria-pressed="true"] .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.option.correct { border-color: var(--green); background: #EEF6E6; }
.option.wrong { border-color: var(--ink-300); opacity: .7; }

.input {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--r-md);
  border: 2px solid var(--ink-100); font: inherit; font-size: 17px; color: var(--ink-900); background: #fff;
}
.input:focus { outline: none; border-color: var(--coral); }

input[type="range"] { width: 100%; accent-color: var(--orange); height: 36px; }
.range-labels { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-700); }
.range-labels span:last-child { text-align: right; }
.big-value { font-family: var(--font-display); font-weight: 900; font-size: 48px; color: var(--blue); text-align: center; }

.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--light-blue); }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.status-pill.off i { background: var(--honey); }

.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--orange); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239,123,16,.5); } 70% { box-shadow: 0 0 0 16px rgba(239,123,16,0); } 100% { box-shadow: 0 0 0 0 rgba(239,123,16,0); } }

.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.notice { font-size: 13px; color: var(--ink-500); line-height: 1.45; }
.thanks { text-align: center; padding: 28px 16px; }
.thanks .check { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 34px; animation: pop .4s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Simulator/page shell */
.page-head { padding: 24px 16px 8px; max-width: 760px; margin: 0 auto; }
.page-head p { margin-top: 8px; }
details.pro { border: 1px solid var(--ink-100); border-radius: var(--r-lg); background: var(--surface); }
details.pro > summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--blue); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.pro > summary::-webkit-details-marker { display: none; }
details.pro > summary::after { content: "+"; font-size: 22px; color: var(--orange); }
details.pro[open] > summary::after { content: "–"; }
details.pro > .pro-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; color: var(--ink-900); font-size: 15px; display: flex; justify-content: space-between; gap: 12px; }
.field label output { font-family: var(--font-display); font-weight: 900; color: var(--blue); white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.kpi { background: var(--surface-alt); border-radius: var(--r-lg); padding: 14px; }
.kpi b { display: block; font-family: var(--font-display); font-weight: 900; font-size: 26px; color: var(--blue); line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--ink-700); }

.verdict { border-radius: var(--r-xl); padding: 20px; color: #fff; display: flex; gap: 16px; align-items: center; transition: background .3s; }
.verdict .light { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.25); flex: none; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 24px; }
.verdict h2 { color: inherit; }
.verdict.green { background: var(--green); }
.verdict.yellow { background: var(--honey); color: var(--blue); }
.verdict.red { background: var(--ink-700); }

.footer-note { max-width: 760px; margin: 0 auto; padding: 16px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Embedded in the deck: no top bar, no outer chrome */
html.embed .topbar, html.embed .hide-embed { display: none !important; }
html.embed body { background: #fff; }
