/* CyMon — Huisstijl Feitenpoort mockup + locked D2 typography */
:root {
  --teal: #00a99d;
  --teal-dark: #007a72;
  --dark-teal: #007a72;
  --gray: #bcbec0;
  --white: #ffffff;
  --charcoal: #2a2a2a;
  --ink: #333333;
  --paper: #f7f7f4;
  --line: rgba(42, 42, 42, 0.1);
  --pad-teal: #00a99d;
  --pad-charcoal: #2a2a2a;
  --pad-gray: #bcbec0;
  --pad-teal-dark: #007a72;
  --glow: 0 0 18px rgba(0, 169, 157, 0.55);
  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 12%, rgba(0, 169, 157, 0.17), transparent 29rem),
    linear-gradient(135deg, #182528 0%, #10191c 100%);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

.stage {
  min-height: 100vh;
  padding: 34px 20px;
  display: grid;
  place-items: center;
}

.shell {
  position: relative;
  width: min(100%, 440px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.37), 0 4px 14px rgba(0, 0, 0, 0.18);
}

.shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), #44c7bc 45%, var(--dark-teal));
}

.content {
  padding: 27px 27px 20px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-icon {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 169, 157, 0.12);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(42, 42, 42, 0.08);
}

.brand-icon img {
  width: 58px;
  height: 58px;
  object-fit: cover;
}

.kicker {
  margin: 0 0 3px;
  color: var(--dark-teal);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
.prompt {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.035em;
}

h1 {
  margin: 0;
  color: var(--charcoal);
  font-size: 29px;
  line-height: 0.98;
}

.subtitle {
  margin: 5px 0 0;
  color: #777a7b;
  font-size: 12px;
}

.round-state {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(0, 122, 114, 0.18);
  border-radius: 99px;
  color: var(--dark-teal);
  background: rgba(0, 169, 157, 0.07);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.round-state[hidden] {
  display: none;
}

.round-state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.13);
}

.status {
  margin-bottom: 14px;
  min-height: 2.2rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #5a5d5e;
  font-size: 12px;
  text-align: center;
}

.status[data-mode="fact"] {
  border-color: rgba(0, 169, 157, 0.35);
  color: var(--dark-teal);
  background: rgba(0, 169, 157, 0.06);
}

.status[data-mode="over"] {
  border-color: rgba(196, 68, 68, 0.35);
  color: #a33;
  background: rgba(196, 68, 68, 0.06);
}

.status[data-mode="done"] {
  border-color: rgba(0, 169, 157, 0.45);
  color: var(--dark-teal);
  background: rgba(0, 169, 157, 0.1);
  font-weight: 600;
}

.status[data-mode="playback"],
.status[data-mode="input"] {
  border-color: rgba(0, 169, 157, 0.22);
}

.status[data-mode="ok"] {
  border-color: rgba(0, 169, 157, 0.45);
  color: var(--dark-teal);
  background: rgba(0, 169, 157, 0.12);
  font-weight: 600;
}

.status[data-mode="fail"],
.status[data-mode="strike"] {
  border-color: rgba(196, 68, 68, 0.4);
  color: #a33;
  background: rgba(196, 68, 68, 0.08);
  font-weight: 600;
}

.status[data-mode="playback"] {
  color: var(--dark-teal);
  font-weight: 600;
}

.status[data-mode="input"] {
  color: var(--charcoal);
  font-weight: 600;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.hud-card {
  padding: 11px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.hud-label {
  display: block;
  color: #858788;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hud-value {
  display: block;
  margin-top: 4px;
  color: var(--charcoal);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.hud-value--score {
  color: var(--dark-teal);
}

.strikes {
  display: flex;
  gap: 5px;
  padding-top: 7px;
}

.strike {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  display: block;
}

.strike.off {
  background: #dfe2e2;
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 1px 9px;
  color: #7b7e7f;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-label strong {
  color: var(--dark-teal);
  font-weight: 600;
}

.pads {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pads.is-your-turn {
  animation: your-turn-pulse 1.6s ease-in-out infinite;
}

@keyframes your-turn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 169, 157, 0); }
  50% { box-shadow: 0 0 0 4px rgba(0, 169, 157, 0.18); }
}

.pad {
  min-height: 92px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px 16px;
  border: 0;
  border-radius: 18px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.13), 0 5px 10px rgba(42, 42, 42, 0.08);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 35px;
  font-weight: 600;
  letter-spacing: -0.035em;
  cursor: pointer;
  position: relative;
  transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.pad small {
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  opacity: 0.65;
  text-transform: uppercase;
}

.pad .pad-letter {
  line-height: 1;
}

.pad:focus-visible {
  outline: 3px solid var(--charcoal);
  outline-offset: 3px;
}

.pad:disabled {
  cursor: not-allowed;
  opacity: 0.92;
}

.pad-a,
.pad[data-color="0"] {
  background: var(--pad-teal);
}

.pad-b,
.pad[data-color="1"] {
  background: var(--pad-charcoal);
}

.pad-c,
.pad[data-color="2"] {
  color: var(--charcoal);
  background: var(--pad-gray);
}

.pad-d,
.pad[data-color="3"] {
  background: var(--pad-teal-dark);
}

/* Memory/idle: blank pads — no letter layout padding needed when empty */
.pad:empty {
  padding: 0;
}

.pad.flash {
  filter: brightness(1.35);
  box-shadow: var(--glow), inset 0 -3px 0 rgba(0, 0, 0, 0.13);
  transform: scale(0.98);
}

.pad.wrong {
  filter: brightness(0.65) saturate(0.5);
  box-shadow: 0 0 12px rgba(200, 40, 40, 0.45);
}

.pad.is-chosen {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.pad.is-correct {
  box-shadow: var(--glow), inset 0 -3px 0 rgba(0, 0, 0, 0.13);
  filter: brightness(1.2);
}

.fact-panel {
  display: none;
  margin-top: 18px;
  padding: 19px 18px 16px;
  border: 1px solid rgba(0, 122, 114, 0.17);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(42, 42, 42, 0.05);
  flex-direction: column;
  gap: 0;
}

.fact-panel.visible {
  display: flex;
}

.prompt {
  margin: 0;
  color: var(--charcoal);
  font-size: 23px;
  line-height: 1.08;
}

.prompt-mark {
  color: var(--teal);
}

.choice-list {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.fact-choice {
  min-height: 37px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 9px 5px 6px;
  border: 1px solid #e7e8e7;
  border-radius: 11px;
  background: #fbfbfa;
  color: #484b4b;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  width: 100%;
}

.fact-choice:hover:not(:disabled),
.fact-choice:focus-visible:not(:disabled) {
  border-color: rgba(0, 169, 157, 0.35);
  background: rgba(0, 169, 157, 0.055);
}

.fact-choice:first-child {
  border-color: rgba(0, 169, 157, 0.35);
  background: rgba(0, 169, 157, 0.055);
}

.fact-choice:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.fact-choice:disabled {
  cursor: default;
  opacity: 0.75;
}

.fact-choice-swatch,
.badge {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.fact-choice[data-color="0"] .fact-choice-swatch {
  background: var(--pad-teal);
}

.fact-choice[data-color="1"] .fact-choice-swatch {
  background: var(--pad-charcoal);
}

.fact-choice[data-color="2"] .fact-choice-swatch {
  color: var(--charcoal);
  background: var(--pad-gray);
}

.fact-choice[data-color="3"] .fact-choice-swatch {
  background: var(--pad-teal-dark);
}

.fact-choice-text {
  flex: 1;
  min-width: 0;
}

.fact-choice.is-chosen {
  border-color: rgba(0, 169, 157, 0.55);
  background: rgba(0, 169, 157, 0.08);
}

.fact-choice.is-correct {
  border-color: rgba(0, 122, 114, 0.65);
  background: rgba(0, 169, 157, 0.14);
  opacity: 1;
}

.fact-choice.is-wrong {
  border-color: rgba(196, 68, 68, 0.55);
  background: rgba(196, 68, 68, 0.08);
  opacity: 1;
}

.cite {
  margin: 10px 0 0;
  font-size: 10px;
  color: #888b8b;
}

.done-panel {
  position: relative;
  display: none;
  margin-top: 18px;
  padding: 19px 18px 16px;
  border: 1px solid rgba(0, 122, 114, 0.17);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(42, 42, 42, 0.05);
  flex-direction: column;
  gap: 8px;
  text-align: center;
  overflow: hidden;
}

.done-panel.visible {
  display: flex;
}

.done-panel[hidden] {
  display: none;
}

.done-kicker {
  margin: 0;
  color: var(--dark-teal);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.done-message {
  margin: 0;
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.4;
  text-align: left;
}

.done-score {
  margin: 2px 0 0;
  color: var(--dark-teal);
  font-size: 11px;
  font-weight: 500;
}

.start {
  width: 100%;
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding: 0 17px 0 20px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: var(--teal);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14), 0 7px 14px rgba(0, 169, 157, 0.2);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.start:hover:not(:disabled) {
  filter: brightness(1.05);
}

.start:active:not(:disabled) {
  transform: scale(0.99);
}

.start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.start[hidden] {
  display: none !important;
}

.start-arrow {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: #fff;
  font-size: 17px;
  line-height: 1;
}

.footer {
  padding: 14px 27px 18px;
  border-top: 1px solid var(--line);
  color: #888b8b;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.footer strong {
  color: var(--dark-teal);
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 480px) {
  .stage {
    padding: 14px 10px;
  }

  .content {
    padding-left: 21px;
    padding-right: 21px;
  }

  .footer {
    padding-left: 21px;
    padding-right: 21px;
  }

  h1 {
    font-size: 24px;
  }

  .prompt {
    font-size: 20px;
  }

  .pad {
    min-height: 80px;
    font-size: 28px;
  }
}


.done-row {
  position: relative;
  display: block;
  min-height: 200px;
  padding: 0.35rem 0.15rem 0.5rem;
  z-index: 1;
}
.done-bij {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: auto;
  height: 100%;
  max-height: none;
  max-width: 70%;
  object-fit: contain;
  object-position: left center;
  z-index: 0;
  opacity: 0.28;
  pointer-events: none;
}
/* Full-panel watermark: bij spans the whole white card */
.done-panel > .done-bij,
.done-panel .done-bij {
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  height: calc(100% - 16px);
  width: auto;
  max-width: 72%;
  object-fit: contain;
  object-position: left center;
}
.done-row .done-message {
  position: relative;
  z-index: 1;
  display: block;
  margin: 4.5rem 0 0 auto;
  max-width: 22ch;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
    -2px  0 0 #fff,
     2px  0 0 #fff,
     0 -2px 0 #fff,
     0  2px 0 #fff,
     0  0 8px #fff;
}

.done-panel .done-kicker,
.done-panel .done-row,
.done-panel .done-score {
  position: relative;
  z-index: 1;
}
