/* Mission-K Umfrage – iPad kiosk in the mission-k.de look:
   black, Inter, white pill buttons with indigo text, dark 10px cards, uppercase kickers.
   Fonts are served locally (no external requests). */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/Inter-Regular.ttf) format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(fonts/Inter-Medium.ttf) format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(fonts/Inter-SemiBold.ttf) format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(fonts/Inter-Bold.ttf) format("truetype"); }

:root {
  --bg: #000000;
  --card: #1a1a1a;
  --card-2: #262626;
  --line: #333333;
  --text: #ffffff;
  --text-2: #d9d9d9;          /* mission-k.de kicker grey */
  --text-muted: #a3a3a3;
  --indigo: #4e46e5;          /* mission-k.de button text / accent */
  --indigo-soft: rgba(78, 70, 229, .28);
  --indigo-line: #7b75ff;
  --danger: #e56c70;          /* mission-k.de ACSS action colour */
  --radius: 10px;
  --pill: 100px;
  --tap: 64px;
  --gutter: clamp(20px, 4vw, 56px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

textarea { -webkit-user-select: text; user-select: text; }

button { font: inherit; color: inherit; touch-action: manipulation; }

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* --- Header ------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
}
.logo { display: block; width: auto; height: 40px; }
.brand-uni {
  text-align: right;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.brand-uni strong { color: var(--text); font-weight: 600; }

.progressbar { height: 3px; background: var(--card); }
.progressbar-fill { height: 100%; width: 0; background: var(--indigo-line); transition: width .25s ease; }

/* --- Screen ------------------------------------------------------------- */

.screen {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(28px, 4.5vh, 56px) var(--gutter);
  outline: none;
}

.kicker {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.start {
  max-width: 860px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 26px;
}
.start-title { margin: 0; font-size: clamp(42px, 6.2vw, 64px); line-height: 1.08; font-weight: 700; letter-spacing: -.01em; }
.intro { margin: 0; font-size: 22px; line-height: 1.55; color: var(--text-2); font-weight: 400; }
.muted { margin: 0; color: var(--text-muted); }
.warning { margin: 0; color: var(--danger); font-weight: 600; }

.step {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
}
.question { margin: 0; font-size: clamp(30px, 3.8vw, 40px); line-height: 1.18; font-weight: 700; letter-spacing: -.01em; }
.help { margin: -4px 0 4px; color: var(--text-2); font-size: 19px; font-weight: 400; }
.answer { flex: 1; }

/* --- Buttons (mission-k.de pills) ---------------------------------------- */

.btn {
  min-height: var(--tap);
  padding: 0 32px;
  border-radius: var(--pill);
  border: 2px solid var(--text);
  font-weight: 600;
  font-size: 20px;
  cursor: pointer;
}
.btn:disabled { opacity: .3; cursor: default; }
.btn-primary { background: var(--text); color: var(--indigo); }
.btn-secondary { background: transparent; color: var(--text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); padding: 0 12px; }
.btn-xl { min-height: 76px; padding: 0 48px; font-size: 23px; }
.btn:active:not(:disabled) { transform: scale(.98); }

.actions {
  position: sticky;
  bottom: calc(-1 * clamp(28px, 4.5vh, 56px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0 clamp(28px, 4.5vh, 56px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg) 26%);
}
.spacer { flex: 1; }

.linklike {
  background: none;
  border: 0;
  padding: 12px 4px;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 15px;
  cursor: pointer;
}

/* --- Choices (dark cards) ----------------------------------------------- */

.choices { display: grid; gap: 12px; }
.choices-row { grid-template-columns: 1fr 1fr; max-width: 600px; }
.choices-row .choice { justify-content: center; min-height: 104px; font-size: 26px; font-weight: 600; }

.choice {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--tap);
  padding: 16px 22px;
  text-align: left;
  background: var(--card);
  border: 2px solid var(--card);
  border-radius: var(--radius);
  font-size: 21px;
  cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
.choice-mark {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
}
.choice.is-selected { background: var(--indigo-soft); border-color: var(--indigo-line); }
.choice.is-selected .choice-mark {
  border-color: var(--text);
  background: var(--text);
  box-shadow: inset 0 0 0 6px var(--indigo);
}
.choices-compact .choice { font-size: 18px; padding: 14px 18px; font-weight: 400; }
.choices-row .choice-mark { display: none; }

/* Q3 tiles: square check marks signal multi-select */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tile { min-height: 78px; font-size: 19px; }
.tile .choice-mark { border-radius: 6px; }
.tile.is-selected .choice-mark {
  box-shadow: none;
  background: var(--text) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%234e46e5' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 20px no-repeat;
}
.tile-none { background: transparent; border: 2px dashed var(--line); }

/* --- Q1 target ---------------------------------------------------------- */

.q1-layout { display: grid; gap: 24px; align-items: center; }
.target-wrap { display: flex; justify-content: center; }
.target { width: min(100%, 360px, 30dvh); height: auto; touch-action: manipulation; }
.ring { stroke: var(--bg); stroke-width: 3; cursor: pointer; transition: fill .15s; }
.ring-4 { fill: #1a1a1a; }
.ring-3 { fill: #1f1c52; }
.ring-2 { fill: #2d2890; }
.ring-1 { fill: #4e46e5; }
.ring.is-selected { fill: #ffffff; }
.ring-label { fill: var(--text); font-family: var(--font); font-size: 26px; font-weight: 700; text-anchor: middle; pointer-events: none; }
.ring-core { font-size: 30px; }
.ring-core-sub { fill: var(--text); font-family: var(--font); font-size: 11px; font-weight: 600; text-anchor: middle; pointer-events: none; }
.ring-label.is-on, .ring-core-sub.is-on { fill: var(--indigo); }

@media (orientation: landscape) and (min-width: 900px) {
  .q1-layout { grid-template-columns: 360px 1fr; }
}

/* --- Text fields -------------------------------------------------------- */

.fields { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 10px; position: relative; }
.field-label { font-weight: 600; font-size: 21px; }
textarea {
  width: 100%;
  min-height: 112px;
  padding: 16px 18px 32px;
  font: inherit;
  font-weight: 400;
  font-size: 20px;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--card-2);
  border-radius: var(--radius);
  resize: none;
  outline: none;
}
textarea:focus { border-color: var(--indigo-line); }
textarea::placeholder { color: var(--text-muted); }
.counter {
  position: absolute;
  right: 14px;
  bottom: 9px;
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* --- Footer ------------------------------------------------------------- */

.footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 4px var(--gutter);
}
body:not([data-screen="start"]):not([data-screen="closed"]) .footer .linklike { display: none; }
.queue { margin-left: auto; font-size: 13px; color: var(--text-muted); }

/* --- Overlay ------------------------------------------------------------ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .8);
}
.overlay[hidden] { display: none; }
.overlay-card {
  width: min(760px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  padding: 36px;
  background: var(--card);
  border-radius: var(--radius);
  -webkit-user-select: text;
  user-select: text;
}
.overlay-card h2 { margin: 0 0 12px; font-size: 30px; font-weight: 700; }
.overlay-card p { font-size: 20px; color: var(--text-2); }
.legal h3 { margin: 24px 0 6px; font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.legal p { margin: 0 0 10px; font-size: 17px; font-weight: 400; color: var(--text-2); }
.overlay-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }

/* --- Honeypot ----------------------------------------------------------- */

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
