:root{
  /* Calm, friendly, SEN-first palette */
  --bg1:#eefcff;
  --bg2:#fff7ea;
  --card:#ffffff;
  --ink:#0b2239;
  --muted:#244b66;

  --outline:#0b2239;
  --softBorder: rgba(11,34,57,.14);
  --shadow: 0 14px 28px rgba(11,34,57,.10);

  --radius: 20px;
  --pad: 22px;
  --gap: 16px;

  /* SEN readability */
  --fs-title: clamp(2rem, 3.1vw, 2.8rem);
  --fs-body: clamp(1.35rem, 2.1vw, 1.65rem);
  --fs-helper: clamp(1.05rem, 1.6vw, 1.2rem);
  --lh: 1.6;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(96,165,250,.22), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(167,243,208,.28), transparent 30%),
    radial-gradient(circle at 70% 85%, rgba(255,214,165,.35), transparent 32%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px; top:10px;
  background:#fff;
  color:#000;
  padding:10px 14px;
  border:3px solid #000;
  border-radius:12px;
  z-index: 1000;
}
.skip-link:focus{ left:10px; }

/* Top bar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #60a5fa, #a7f3d0, #fde68a);
  border-bottom: 2px solid rgba(0,0,0,.10);
}
.topbar__inner{
  width: 100%;
  max-width: 1400px;          /* fill more of the screen */
  margin: 0 auto;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.brand{
  font-weight: 950;
  letter-spacing: .2px;
  font-size: 1.35rem;
  display:flex;
  align-items:center;
  gap: 10px;
  background: rgba(255,255,255,.35);
  border: 2px solid rgba(0,0,0,.10);
  padding: 10px 14px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
}
.brand__badge{
  width: 28px;
  height: 28px;
  display:grid;
  place-items:center;
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.7);
}

/* Layout */
.wrap{
  width: 100%;
  max-width: 1400px;          /* removes big empty sides */
  margin: 0 auto;
  padding: 18px 18px 30px;
  display:flex;
  flex-direction:column;
  gap: var(--gap);
}

/* Cards */
.card{
  background: var(--card);
  border: 2px solid var(--softBorder);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--pad);
  min-height: 320px; 
}
/* === THINNER / CLEANER STORY BORDER === */
.card--story{
  border: 1.5px solid rgba(245, 158, 11, .25);
  padding: 18px;              /* was 22px */
  border-radius: 18px;        /* slightly smaller */
  box-shadow: 0 10px 22px rgba(11,34,57,.08);
}

.card--image{
  padding: 14px;
}

.title{
  margin: 0 0 10px;
  font-size: var(--fs-title);
  line-height: 1.12;
}
.helper{
  margin: 0 0 6px;
  font-size: var(--fs-helper);
  color: var(--muted);
  font-weight: 800;
}
.body-text{
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: var(--lh);
  max-width: 70ch;
}

/* Story header area (title + tools) */
.story__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.tools{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

/* Buttons (big + clear) */
.btn{
  appearance:none;
  border: 4px solid var(--outline);
  background: #dbeafe;
  color: #071528;
  font-weight: 950;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 1.05rem;
  cursor:pointer;
  min-height: 54px;
}
.btn--ghost{
  background: rgba(255,255,255,.75);
}
.btn:hover{ filter: brightness(0.98); }
.btn:active{ transform: translateY(1px); }
.btn:focus{
  outline: 5px solid #000;
  outline-offset: 3px;
}
.btn[disabled]{
  opacity: .55;
  cursor: not-allowed;
}

/* Main image (kept short to avoid scrolling) */
.main-image{
  width: 100%;
  height: auto;
  max-height: 32vh;           /* keeps pages feeling “one-screen” */
  object-fit: contain;
  border-radius: 16px;
  border: 2px solid rgba(0,0,0,.10);
  background: #f8fafc;
}

/* Choices layout */
#choicesContainer{
  width: 100%;
}

/* Choice grid: side-by-side */
/* ===== CHOICES GRID (THIS IS THE ONLY GRID YOU NEED) ===== */
#choicesContainer.choices-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  gap: 22px;
}

@media (max-width: 950px){
  #choicesContainer.choices-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== CHOICE CARDS (BIGGER + CLEANER) ===== */
.choice-card{
  background: #ecfeff;
  border: 3px solid var(--outline);  /* slightly thinner than 4px */
  border-radius: 20px;
  padding: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
  text-align: left;
  box-shadow: 0 18px 36px rgba(11,34,57,.18);
}

.choice-img{
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(0,0,0,.10);
  background: #f1f5f9;
}

.choice-label{
  font-size: 1.55rem;
  font-weight: 950;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 4px;
}


/* Next button (FULL width of container, thinner) */
.next-btn{
  width: 100%;
  min-height: 72px;           /* thinner than before */
  background: #ffeb8f;
  border: 4px solid var(--outline);
  border-radius: 20px;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 950;
  text-align: center;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; }
}

.story-image{
  width: 100%;
  margin: 18px 0;
  display: flex;
  justify-content: center;
}

.story-image img{
  /* keep the image’s natural shape */
  width: auto;
  height: auto;

  /* stop it being massive */
  max-width: 100%;
  max-height: 260px;          /* change this number to taste */

  /* no cropping */
  object-fit: contain;

  /* nice + SEN friendly */
  border-radius: 16px;
}

/* Hide broken/empty images so you never see the broken-image icon */
img:not([src]),
img[src=""] {
  display: none !important;
}


@media (min-width: 900px){
  .story-image img{ max-height: 320px; }
}

/* === BIGGER CHOICE CARDS (override) === */
#choicesContainer .choices-grid{
  gap: 22px;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
}

@media (max-width: 950px){
  #choicesContainer .choices-grid{
    grid-template-columns: 1fr;
  }
}

#choicesContainer .choice-card{
  min-height: 320px;
  padding: 18px;
  gap: 14px;
  justify-content: flex-start;
}

#choicesContainer .choice-img{
  height: 230px;       /* makes the card feel bigger instantly */
  object-fit: cover;
}

#choicesContainer .choice-label{
  font-size: 1.55rem;
  margin-top: 6px;
}
