/* The homepage puzzle reuses the One Stroke board styles. */

.bento {
  background: linear-gradient(#fff, var(--paper));
  padding-block: 24px 48px;
}

.bento-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .95fr);
  grid-template-areas:
    "hero facts contact"
    "puzzle steps steps";
}

.tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: clamp(20px, 2.2vw, 30px);
  display: flex;
  flex-direction: column;
}

.tile-hero {
  grid-area: hero;
  background: var(--paper);
  padding: clamp(22px, 2.5vw, 38px);
  gap: 16px;
}
.tile-hero .hero-eyebrow { margin: 0; color: var(--green); font-size: .71rem; line-height: 1.5; }
.hero-copy-b h1 { font-size: clamp(2.4rem, 3.5vw, 3.25rem); color: var(--green); margin: 0 0 12px; line-height: 1.04; }
.tile-hero .hero-copy-b p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--ink); }
.tile-hero .hero-photo { width: min(100%, 220px); align-self: center; margin-block: auto; }

/* Photo slots: placeholders where photographs of events and students will go. */
.photo-slot { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 4 / 3; width: 100%; padding: 20px; border: 1.5px dashed #c9c1b0; border-radius: 14px; background: #efeadf; color: #55626a; text-align: center; }
.photo-slot svg { width: 40px; height: 40px; }
.photo-slot figcaption { font-size: .85rem; line-height: 1.45; max-width: 22em; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.photo-slot-dark { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .28); color: #d1dade; }
.tile-facts { grid-area: facts; }
.tile-puzzle { grid-area: puzzle; }
.tile-steps { grid-area: steps; }
.tile-contact { grid-area: contact; }

.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.tile-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.tile-head .tile-kicker { margin: 0; }
h2.tile-kicker { font-family: var(--sans); font-size: .9375rem; font-weight: 600; line-height: 1.7; letter-spacing: .14em; margin: 0 0 14px; }
.tile-title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -.03em;
  color: var(--green);
  margin: 0 0 14px;
}
.tile p { color: #5c6c74; font-size: .9375rem; line-height: 1.7; }

.tile-link {
  margin-top: auto;
  align-self: flex-start;
  display: inline-block;
  padding-block: 10px;
  color: var(--green);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.tile-link + .tile-link { margin-top: 0; }
.tile-link:hover { text-decoration-thickness: 2px; }
.tile-link span { display: inline-block; margin-left: 6px; transition: transform .2s; }
.tile-link:hover span { transform: translateX(3px); }

/* The same two competition marks appear on the overview and homepage. */
.comp-mark { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: .75rem; background: var(--green); color: #f6e09f; font: 700 .9rem/1 var(--sans); letter-spacing: .06em; }
.comp-mark-square::before { content: ""; width: 47%; aspect-ratio: 1; border: 2.5px solid currentColor; border-radius: 2px; box-sizing: border-box; }
.competition-options { display: grid; gap: 12px; flex: 1; }
.competition-option { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.competition-option:hover, .competition-option:focus-visible { border-color: var(--green); }
.competition-option:hover h3, .competition-option:focus-visible h3 { text-decoration: underline; text-underline-offset: 4px; }
.competition-option .comp-mark { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; width: 2.1rem; height: 2.1rem; border-radius: 7px; font-size: .65rem; transform: rotate(6deg); }
.competition-option h3 { margin: 0 2.35rem 4px 0; font: 400 clamp(1.45rem,2.1vw,1.85rem)/1.1 var(--serif); letter-spacing: -.025em; color: var(--green); }
.tile .competition-option p { margin: 0; color: var(--ink); font-size: .9rem; line-height: 1.5; }
.tile .competition-option .option-format { margin-top: 8px; font-size: .78rem; color: var(--muted); }
.tile .competitions-soon { margin: 16px 0 0; font-size: .85rem; color: var(--muted); }

/* Competition details on the overview page. */
.facts-list { margin: 8px 0 18px; display: grid; gap: 0; }
.facts-list div { padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 0; display: block; }
.facts-list div:last-child { border-bottom: 1px solid var(--line); }
.facts-list dt { font-size: .75rem; color: var(--muted); line-height: 1.5; }
.facts-list dd { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--ink); line-height: 1.5; text-wrap: balance; }

/* Puzzle: a dark game tile */
.tile-puzzle { background: #fffdf8; border-color: #f6f2e9; color: #22313a; }
.tile-puzzle .tile-kicker { color: #4b5b63; }
.tile-puzzle .tile-title { color: #22313a; margin-bottom: 6px; }
.tile-link-light { margin-top: 0; color: #f6e09f; padding-block: 4px; }
/* The board fills whatever height the row gives the tile, so the tile never
   ends in empty space: it grows or shrinks with the tiles beside it. */
.tile-puzzle .os-stage { flex: 1 1 0; min-height: 220px; display: flex; justify-content: center; align-items: center; }
.tile-puzzle .os-board { height: 100%; max-height: 380px; width: auto; max-width: 100%; aspect-ratio: 1; }
.tile-puzzle .tile-title { font-size: clamp(1.25rem, 1.6vw, 1.5rem); margin-bottom: 12px; }
.puzzle-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin-top: 10px; font-size: .875rem; font-variant-numeric: tabular-nums; }
.puzzle-count { color: #22313a; font-weight: 600; white-space: nowrap; }
.puzzle-count[data-tone="good"] { color: #7d5a10; }
.puzzle-count[data-tone="warn"] { color: #7d5a10; }
.puzzle-tools { display: flex; gap: 6px; }
.puzzle-tool {
  min-height: 44px;
  min-width: 44px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #4b5b63;
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.puzzle-tool:hover:not(:disabled) { color: #22313a; }
.puzzle-tool:disabled { color: #7b8e97; text-decoration: none; }
.puzzle-noscript { color: #22313a; font-size: .875rem; margin: 6px 0 0; }
.puzzle-button { margin-top: auto; align-self: stretch; }
.button-light { background: #f6e09f; border-color: #f6e09f; color: #2f414a; }
.button-light:hover { background: #ebe4d4; border-color: #ebe4d4; }
.tile-puzzle .puzzle-bar { margin-bottom: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* How it works */
.steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.step-number {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff; font-weight: 600; font-size: .875rem;
}
.steps h3 { margin: 0 0 4px; font-size: 1rem; color: var(--ink); }
.steps p { margin: 0; font-size: .875rem; }
.step-button { margin-top: 12px; min-height: 44px; }
.label-dark { background: #334a56; color: #f6e09f; }

/* About */
.tile-button { margin-top: auto; align-self: flex-start; }
.facts-button { margin-top: auto; align-self: stretch; }
.definition-mini { margin: 0 0 12px; padding-left: 12px; border-left: 2px solid var(--red); font-size: .875rem !important; }
.definition-mini strong { font-family: var(--serif); font-size: 1.05rem; color: var(--green); font-weight: 400; }
.definition-mini span { color: var(--muted); }

/* Contact */
.tile-contact {
  background: #f5f2e9;
  border-color: #d8d0be;
  border-block-start: 3px solid #a99875;
}
.enquiry-form { color: var(--ink); }
.enquiry-form fieldset { min-width: 0; }
.enquiry-form .field { gap: 5px; margin-bottom: 12px; }
.enquiry-form .field label { font-size: .85rem; }
.enquiry-form .field input, .enquiry-form .field select, .enquiry-form .field textarea { border: 1px solid #8d9291; border-radius: 6px; background-color: #fff; color: var(--ink); min-width: 0; width: 100%; font: inherit; font-size: 1rem; line-height: 1.45; padding: 10px 12px; }
.enquiry-form .field select { padding-inline-end: 32px; }
.enquiry-form textarea { display: block; resize: vertical; min-height: 80px; }
.tile-contact .enquiry-form :is(input, select, textarea, button):focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.enquiry-form .button { width: 100%; }
.tile-contact .enquiry-status { margin: 10px 0 0; font-size: .85rem; line-height: 1.5; color: var(--ink); }
.enquiry-status:empty { display: none; }
.enquiry-form [data-copy-fallback] { margin-top: 12px; }

.tile a:focus-visible, .tile button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 3px; }
.tile-puzzle a:focus-visible, .tile-puzzle button:focus-visible { outline-color: #f0d78c; }

/* Gentle one-time reveal, added by bento.mjs only when motion is allowed */
.bento.can-reveal .tile { opacity: 0; transform: translateY(14px); transition: opacity .5s ease-out, transform .5s ease-out; }
.bento.can-reveal .tile.is-shown { opacity: 1; transform: none; }


@media (max-width: 1100px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "hero contact"
      "facts puzzle"
      "steps steps";
  }
  .tile-hero { min-height: 0; }
}

@media (max-width: 700px) {
  .bento { padding-block: 14px 36px; }
  .bento-grid {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "facts" "contact" "puzzle" "steps";
  }
  .tile { border-radius: 14px; }
  .tile-hero .hero-photo { width: 100%; }
  .tile-puzzle .os-stage { flex: none; min-height: 0; }
  .tile-puzzle .os-board { width: min(100%, 320px); height: auto; aspect-ratio: 3 / 4; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .steps li { flex-direction: row; align-items: flex-start; }
  .step-number { flex-shrink: 0; }
  .tile-hero { min-height: 0; }
  .tile-hero .hero-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bento.can-reveal .tile { opacity: 1; transform: none; transition: none; }
  .tile-link span, 
}

/* Exemplar papers page (coming soon) */
.papers-page { padding-block: 56px 88px; }
.papers-tile { max-width: 760px; margin-inline: auto; }
.papers-tile .tile-title { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.papers-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 10px; }

@media (min-width: 1101px) and (max-width: 1240px) {
  .tile-facts { padding-inline: 20px; }
  .facts-list dd { font-size: .8125rem; }
}

/* Condensed sections below the board: Emirates Math Trophy, Why Conjecture
   (with the founders) and Bring your school into the picture. */
.compact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: end;
}
.compact h2 { margin-bottom: 0; font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
.compact-copy p { margin: 0 0 12px; color: var(--muted); line-height: 1.75; }
.compact-copy p:last-child { margin-bottom: 0; }
.compact-copy .lead { font-family: var(--serif); font-size: clamp(1.2rem, 1.6vw, 1.45rem); line-height: 1.4; color: var(--green); }

.competition-section.compact { padding-block: 64px; border-top: 1px solid var(--line); }

.about-section.compact { padding-block: 64px 72px; }
.about-section.compact .compact-copy p { color: #e8e3d7; }
.about-section.compact .compact-copy .lead { color: #fff; }
.about-section.compact .compact-grid { align-items: start; }
.about-copy-b p { font-size: 1.0625rem; line-height: 1.8; }
.about-kicker { white-space: nowrap; }
.about-section.compact .about-title { font-size: clamp(2.6rem, 5.4vw, 4.8rem); line-height: 1.02; }
.about-copy-b p + p { margin-top: 14px; }

.founders-block { margin-top: 48px; padding-top: 36px; border-top: 1px solid rgba(255, 255, 255, .18); }
.founders-label { margin: 0 0 22px; font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #f6e3a8; }
.founders-block .founders-grid { gap: clamp(20px, 3vw, 40px); }
.founders-block .founder-role { color: #b9c6cd; margin-bottom: 4px; }
.founders-block .founder-copy h3 { color: #fff; font-size: 1.6rem; margin-bottom: 10px; }
.founders-block [data-founder-bio] p { color: #e8e3d7; font-size: .9375rem; line-height: 1.7; margin-bottom: 10px; }
.founders-block .founder-portrait { background: rgba(255, 255, 255, .07); }
.founders-block .founder-photo-placeholder { color: #d1dade; border-color: rgba(255, 255, 255, .22); }

.interest-section.compact { padding-block: 64px 72px; }
.interest-section.compact .interest-grid { align-items: start; gap: clamp(28px, 6vw, 80px); }
.interest-section.compact h2 { margin-bottom: 14px; }
.interest-section.compact .preview-notice { margin-top: 18px; }
.faq-compact { margin-top: 30px; max-width: 480px; }
.faq-label { margin: 0 0 6px; font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.faq-compact .faq-list summary { padding-block: 14px; font-size: .9375rem; }
.faq-compact .faq-list details > p { font-size: .9rem; }

@media (max-width: 900px) {
  .compact-grid { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; }
  .competition-section.compact, .about-section.compact, .interest-section.compact { padding-block: 48px 52px; }
  .founders-block { margin-top: 36px; padding-top: 28px; }
}

/* Homepage puzzle tile, framed and matted like the puzzle pages: a light
   tile, with the dark board in a greige mat. */
.tile-puzzle { background: #fff; border-color: var(--line); }
.tile-puzzle .tile-title { color: var(--green); }
.tile-puzzle .os-stage { padding: 26px 18px; }
.tile-puzzle .os-board { box-shadow: 0 0 0 22px #ddd6c7, 0 0 0 23px #cfc7b6, 0 16px 32px rgba(45, 66, 77, .16); }
.tile-puzzle .puzzle-button { background: var(--green); border-color: var(--green); color: #fff; }
.tile-puzzle .puzzle-button:hover { background: #22343d; border-color: #22343d; }

/* Homepage puzzle question: bold, with a fixed break after "house". */
.tile-puzzle .puzzle-title { font-weight: 700; letter-spacing: -.02em; }

/* Homepage puzzle: a louder question and an invitation to play.
   The question is as large as the tile allows on two lines; "house" gets
   a chalk highlighter; "Try it" points at the board. */
.tile-puzzle { container-type: inline-size; }
.tile-puzzle .puzzle-title { font-size: clamp(1.45rem, 7.6cqi, 2.4rem); line-height: 1.12; }
/* "Try it" is a small sticker just below the end of "pen?", tilted like a
   sticker, with a curved arrow pointing down and left, at the board. */
.puzzle-head { position: relative; margin-bottom: 14px; }
.puzzle-head .puzzle-title { margin-bottom: 0; }
.try-it { position: absolute; right: -6px; top: calc(100% - 4px); z-index: 2; transform: rotate(-7deg); transform-origin: right center; box-shadow: 0 4px 10px rgba(45, 66, 77, .16); margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #f6e09f; font-size: .75rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green) !important; line-height: 1.4 !important; }
.try-it svg { fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
/* Sticker arrow: starts with the ghost pen and makes 16 bobs of 1.375s, so both stop together at 23s. */
.tile-puzzle.is-attracting .try-it svg { animation: try-bob 1.375s ease-in-out 1s 16; }
@keyframes try-bob { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-2px, 3px); } }

/* Ghost pen: draws the roof, holds, fades (0.86s); 5.5s per loop, four loops (1s to 23s). */
.os-ghost {
  fill: none; stroke: #fff6c9; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 246, 201, .55));
  animation: os-ghost 5.5s ease-in-out 1s 4;
}
@keyframes os-ghost {
  0% { stroke-dashoffset: 1; opacity: 0; }
  8% { opacity: .75; }
  42% { stroke-dashoffset: 0; opacity: .75; }
  62% { stroke-dashoffset: 0; opacity: .75; }
  77.66%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .os-ghost { display: none; }
  .tile-puzzle.is-attracting .try-it svg { animation: none; }
}

/* Why Conjecture: summary first, full story on request */
.about-photo { margin-top: 40px; aspect-ratio: 32 / 9; }
@media (max-width: 700px) { .about-photo { aspect-ratio: 16 / 9; margin-top: 28px; } }
.tile-facts { scroll-margin-top: 110px; }
.story { margin-top: 18px; }
.story summary { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-weight: 600; color: #fff; border-bottom: 1.5px solid #f6e09f; padding-bottom: 3px; }
.story summary::-webkit-details-marker { display: none; }
.story summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.story[open] summary::after { transform: rotate(-135deg) translateX(-2px); }
.story summary:focus-visible { outline: 3px solid #f0d78c; outline-offset: 4px; }
.story[open] summary { margin-bottom: 14px; }
.about-section.compact .story p { color: #e8e3d7; }

/* Founders: one-sentence teaser, full biography on request */
.founder-teaser { color: #e8e3d7; }
.founder-more summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-weight: 600; font-size: .92rem; color: #fff; border-bottom: 1.5px solid #f6e09f; padding-bottom: 2px; }
.founder-more summary::-webkit-details-marker { display: none; }
.founder-more summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.founder-more[open] summary::after { transform: rotate(-135deg) translateX(-2px); }
.founder-more summary:focus-visible { outline: 3px solid #f0d78c; outline-offset: 4px; }
.founder-more[open] summary { margin-bottom: 12px; }
.founder-more p { color: #e8e3d7; }

/* The conjecture definition now sits under "Why Conjecture" */
.definition-dark { margin-top: 18px; max-width: 26em; border-left-color: #f6e09f; color: #e8e3d7; }
.definition-dark strong { color: #fff; }
.definition-dark span { color: #c9d3d7; }
.definition-note summary {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  color: #f6e09f;
  cursor: pointer;
  list-style: none;
}
.definition-note summary::-webkit-details-marker { display: none; }
.definition-note summary:hover { background: rgba(255, 255, 255, .1); }
.definition-note summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.definition-mark {
  width: 23px;
  height: 23px;
  background: currentColor;
  mask: url("assets/conjecture-mark.svg") center / contain no-repeat;
  forced-color-adjust: none;
}
/* The note opens beside the square, taken out of the flow so nothing below it moves. */
.definition-note { position: relative; display: inline-block; vertical-align: top; }
.definition-note p { position: absolute; left: 54px; top: 50%; transform: translateY(-50%); width: max-content; max-width: min(26em, calc(100vw - 120px)); margin: 0; color: #e8e3d7; font-size: .875rem; line-height: 1.35; }
.definition-note[open] summary { background: rgba(255, 255, 255, .1); }

@media (max-width: 700px) { .hero-photo { aspect-ratio: 16 / 9; } }

/* Yellow labels in the dark section, 20% larger (12px to 14.4px; 11px to 13.2px on phones) */
.about-section .about-kicker, .founders-block .founders-label { font-size: .9rem; }
@media (max-width: 720px) { .about-section .about-kicker { font-size: .825rem; } }

/* Home layout (25 Nov): hero beside Contact; the puzzle beside a block of
   Competitions (EMT and Square Up side by side) above How it works. Six columns
   so the puzzle tile is exactly as wide as the block next to it. */
.bento-grid {
  /* 17 : 10 : 13. The hero keeps two-thirds of the width beside Contact; the
     puzzle tile is about 15% narrower than half, so Competitions and How it
     works get the extra room. */
  grid-template-columns: minmax(0, 17fr) minmax(0, 10fr) minmax(0, 13fr);
  grid-template-areas:
    "hero hero contact"
    "puzzle facts facts"
    "puzzle steps steps";
}
.tile-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 3vw, 40px); }
.tile-hero .hero-text { display: flex; flex-direction: column; gap: 16px; }
.tile-hero .hero-photo { width: 100%; max-width: none; margin: 0; align-self: center; }
.competition-options { grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 0 0 auto; }
.competition-option { justify-content: flex-start; padding: 18px 18px 16px; }
.tile .competitions-soon { margin-top: 14px; }
.tile-steps h2.tile-kicker { margin-bottom: 12px; }
.tile-puzzle .os-board { max-height: 470px; }

@media (max-width: 1100px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "hero hero"
      "facts facts"
      "puzzle contact"
      "steps steps";
  }
}
@media (max-width: 700px) {
  .bento-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "facts" "contact" "puzzle" "steps"; }
  .tile-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
  .competition-options { grid-template-columns: minmax(0, 1fr); }
}
.step-button { white-space: nowrap; }

/* Puzzle text sized for the narrower tile, so the board keeps its size. */
@media (min-width: 1101px) {
  .tile-puzzle .puzzle-title { font-size: clamp(1.35rem, 6.4cqi, 2rem); }
  /* The board's frame is drawn as a shadow 23px wide, so the stage keeps room for it. */
  .tile-puzzle .os-stage { flex: 1 0 auto; min-height: 0; padding: 27px 18px; }
  .tile-puzzle .os-board { height: 330px; max-height: none; }
}

/* Hero (25 Nov): the eyebrow stays on one line with a vertical red rule; the
   photo slot runs the full height of the hero. */
.tile-hero .hero-eyebrow { white-space: nowrap; letter-spacing: .12em; gap: 10px; }
.tile-hero .hero-eyebrow .short-rule { width: 3px; height: 1.6em; border-radius: 2px; flex: none; }
@media (min-width: 701px) {
  .tile-hero { grid-template-columns: minmax(min-content, 1fr) minmax(0, 1fr); align-items: stretch; }
  .tile-hero .hero-text { justify-content: center; }
  .tile-hero .hero-photo { aspect-ratio: auto; height: 100%; min-height: 320px; align-self: stretch; }
}
@media (max-width: 700px) {
  .tile-hero .hero-eyebrow { font-size: .62rem; letter-spacing: .08em; }
  .tile-hero .hero-photo, .hero-photo { aspect-ratio: 4 / 3; }
}

/* Register your school pop-up (Option B, 28 Nov) */
.tile-hero .hero-actions { margin: -2px 0 0; }
/* Keep the first row the same height as before the button was added (28 Nov). */
.tile-hero .hero-text:has(.hero-actions) { gap: 10px; }
@media (min-width: 1500px) {
  .tile-hero .hero-text:has(.hero-actions) { gap: 8px; }
  .tile-hero .hero-text:has(.hero-actions) .hero-copy-b h1 { margin-bottom: 8px; }
  .tile-hero .hero-actions { margin: -1px 0 0; }
}

.register-dialog { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #d6cfbf; border-radius: 12px; background: #f4f1e9; color: var(--ink); box-shadow: 0 18px 48px #1a262d40; }
.register-dialog::backdrop { background: #1a262d73; }
.register-dialog .enquiry-form { padding: 22px 24px 24px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-head .tile-title { margin: 0; }
.dialog-close { display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin: -6px -8px 0 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.dialog-close:hover { background: #e7e2d6; }
.dialog-close:focus-visible, .register-dialog :is(input, select, textarea, button):focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.dialog-intro { margin: 8px 0 16px; font-size: .92rem; line-height: 1.5; }
.register-dialog .enquiry-status { margin: 10px 0 0; font-size: .85rem; }
@media (max-width: 560px) { .register-dialog .enquiry-form { padding: 18px 16px 20px; } }
.dialog-privacy { margin: 2px 0 12px; font-size: .82rem; line-height: 1.5; color: var(--muted); }
