/* Brain State Now — deliberately large, high-contrast and uncluttered.
   Target reading level ~grade 5; target tap size >= 64px. */

.bsn-app {
  --bsn-ink: #16202b;
  --bsn-muted: #5b6b7a;
  --bsn-line: #dfe6ec;
  --bsn-bg: #ffffff;
  --bsn-soft: #f4f7fa;
  --bsn-go: #16a34a;
  --bsn-stop: #dc2626;
  --bsn-wait: #f59e0b;
  --bsn-brand: #2563eb;

  max-width: 640px;
  margin: 0 auto;
  padding: 8px;
  color: var(--bsn-ink);
  font-size: 20px;
  line-height: 1.5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.bsn-card {
  background: var(--bsn-bg);
  border: 2px solid var(--bsn-line);
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
}

.bsn-app h2 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
.bsn-app h3 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
.bsn-app p  { margin: 0 0 16px; }

.bsn-lead { font-size: 22px; }
.bsn-muted { color: var(--bsn-muted); font-size: 17px; }

.bsn-btn {
  display: inline-block;
  min-height: 64px;
  padding: 16px 32px;
  font-size: 22px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--bsn-brand);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  margin: 6px 4px;
  touch-action: manipulation;
}
.bsn-btn:hover { filter: brightness(1.08); }
.bsn-btn:focus-visible { outline: 4px solid #93c5fd; outline-offset: 3px; }
.bsn-btn--ghost { background: var(--bsn-soft); color: var(--bsn-ink); border: 2px solid var(--bsn-line); }
.bsn-btn--wide { display: block; width: 100%; }

.bsn-field { text-align: left; margin: 0 0 18px; }
.bsn-field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 19px; }
.bsn-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 60px;
  padding: 12px 14px;
  font-size: 20px;
  font-family: inherit;
  color: var(--bsn-ink);
  border: 2px solid var(--bsn-line);
  border-radius: 12px;
  background: #fff;
}
.bsn-field input:focus { border-color: var(--bsn-brand); outline: none; }

.bsn-err {
  background: #fef2f2; border: 2px solid #fecaca; color: #991b1b;
  border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: 18px; text-align: left;
}

/* Progress dots */
.bsn-steps { display: flex; gap: 8px; justify-content: center; margin: 0 0 20px; }
.bsn-steps i { width: 12px; height: 12px; border-radius: 50%; background: var(--bsn-line); display: block; }
.bsn-steps i.on { background: var(--bsn-brand); }

/* Playfield */
.bsn-stage {
  position: relative;
  height: 320px;
  border-radius: 16px;
  background: var(--bsn-soft);
  border: 2px solid var(--bsn-line);
  display: flex; align-items: center; justify-content: center;
  user-select: none;
  overflow: hidden;
  margin: 0 0 16px;
  touch-action: manipulation;
}
.bsn-stage--go   { background: #dcfce7; border-color: var(--bsn-go); }
.bsn-stage--wait { background: #fef3c7; border-color: var(--bsn-wait); }
.bsn-stage-msg { font-size: 30px; font-weight: 800; padding: 0 16px; }

/* Go / No-Go critters */
.bsn-critter {
  position: absolute;
  font-size: 64px;
  line-height: 1;
  cursor: pointer;
  background: none; border: 0; padding: 8px;
  touch-action: manipulation;
}

/* Memory pads */
.bsn-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 360px; }
.bsn-pad {
  height: 120px; border-radius: 16px; border: 3px solid rgba(0,0,0,.12);
  cursor: pointer; font-size: 44px; line-height: 120px; text-align: center;
  transition: transform .08s ease, filter .08s ease;
  touch-action: manipulation;
}
.bsn-pad.lit { filter: brightness(1.6); transform: scale(1.04); }
.bsn-pad[data-p="0"] { background: #ef4444; }
.bsn-pad[data-p="1"] { background: #3b82f6; }
.bsn-pad[data-p="2"] { background: #22c55e; }
.bsn-pad[data-p="3"] { background: #eab308; }

/* Results */
.bsn-result { display: flex; align-items: center; gap: 16px; text-align: left;
  border: 2px solid var(--bsn-line); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; }
.bsn-result .ico { font-size: 38px; line-height: 1; }
.bsn-result .lbl { font-weight: 800; font-size: 20px; }
.bsn-result .val { font-size: 17px; color: var(--bsn-muted); }
.bsn-trend { font-weight: 800; margin-left: auto; font-size: 17px; white-space: nowrap; }
.bsn-trend--up   { color: var(--bsn-go); }
.bsn-trend--down { color: #b45309; }
.bsn-trend--same { color: var(--bsn-muted); }

.bsn-snapshot { font-size: 64px; font-weight: 800; line-height: 1; margin: 6px 0 4px; }

.bsn-history { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 17px; }
.bsn-history th, .bsn-history td { padding: 10px 8px; border-bottom: 1px solid var(--bsn-line); text-align: left; }
.bsn-history th { color: var(--bsn-muted); font-weight: 700; }

.bsn-disclaimer {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px;
  background: var(--bsn-soft); color: var(--bsn-muted);
  font-size: 16px; line-height: 1.5; text-align: left;
}

.bsn-countdown { font-size: 80px; font-weight: 800; }

@media (max-width: 480px) {
  .bsn-app { font-size: 19px; }
  .bsn-app h2 { font-size: 26px; }
  .bsn-stage { height: 280px; }
  .bsn-pad { height: 100px; line-height: 100px; }
  .bsn-snapshot { font-size: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .bsn-pad { transition: none; }
}
