/* ============================================================================
   try.css — styling that exists only on the public /try/ sample pages.

   Deliberately additive: q-single.css is loaded first and owns the question
   card itself, so a sample looks exactly like the real product. Everything
   here is the wrapper around it — the banner, the CTA, the index. Nothing in
   this file may change how a question renders, or the samples stop being an
   honest preview of what someone is buying.

   Hand-written (unlike try/*.html, which is build output).
   ========================================================================= */

:root {
  --try-ink: #1E1B34;
  --try-violet: #5c49e1;
  --try-violet-deep: #4230b8;
  --try-amber: #ffb322;
  --try-muted: #6b6890;
  --try-line: #e3ddfb;
}

/* ── The one-line label above the banner ─────────────────────────────────── */
/* "Free 11+ maths practice question: Two triangles in a rectangle" — the
   only visible text on the page that says what the page is in the words a
   parent would search for (the question's own heading is its stem). Written
   by build-try-pages.mjs; a <p>, because the question keeps the <h1>. */
.try-kicker {
  max-width: 760px;
  margin: 0 auto 10px;
  padding: 0 2px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--try-violet);
  line-height: 1.4;
}

/* ── The "this is a sample" banner ───────────────────────────────────────── */
.try-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 760px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  background: #f4f2fd;
  border: 1.4px solid var(--try-line);
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #3B2CA0;
}
.try-banner strong { color: var(--try-ink); }
.try-banner-dot { color: var(--try-amber); font-size: 15px; line-height: 1.4; }

/* single-screen.js injects an action bar under the question with "Report a
   problem" (writes to Supabase) and "Ask for AI help" (needs an authenticated
   pupil and a Worker call). Neither belongs in front of an anonymous visitor,
   and the AI button would silently do nothing. Hidden here rather than by
   editing the shared runner. */
.ss-action-bar { display: none !important; }

/* ── The sample's own "Ask for AI help" (build-try-pages.mjs AI_NOTE_HTML) ── */
/* Same position and look as the live button (styles copied from the runner's
   .ss-ai-btn, which is injected by JS and so not available to a static page).
   Pressing it opens a note instead of the tutor. */
.try-ai-bar { padding: 10px 0 0; }
.try-ai-btn {
  display: block;
  width: 100%;
  background: none;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  color: #6f5af6;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 600;
  padding: 7px 10px;
  min-height: 40px;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.try-ai-btn:hover, .try-ai-btn.is-open { border-color: #6f5af6; background: #f5f3ff; }
.try-ai-note {
  margin-top: 10px;
  padding: 12px 16px;
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  color: var(--try-ink);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.try-ai-note strong { color: var(--try-violet-deep); }
.try-ai-note[hidden] { display: none; }

/* ── The CTA that replaces prev/next nav ─────────────────────────────────── */
.try-cta {
  max-width: 760px;
  margin: 22px auto 40px;
  padding: 26px 24px 22px;
  background: #fff;
  border: 1.6px solid var(--try-line);
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(20, 10, 60, .10);
  text-align: center;
}
.try-cta-lead {
  font-size: 19px;
  font-weight: 800;
  color: var(--try-ink);
  margin: 0 0 8px;
}
.try-cta-sub {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--try-muted);
  margin: 0 auto 18px;
  max-width: 52ch;
}
.try-cta-btn {
  display: inline-block;
  background: var(--try-amber);
  color: #3a2c00;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  transition: transform .08s, filter .15s;
}
.try-cta-btn:hover { filter: brightness(1.04); }
.try-cta-btn:active { transform: translateY(1px); }
.try-cta-fine {
  font-size: 11.5px;
  color: #9a96b8;
  line-height: 1.5;
  margin: 12px auto 0;
  max-width: 46ch;
}
.try-cta-more { font-size: 13px; margin: 14px 0 0; }
.try-cta-more a { color: var(--try-violet); font-weight: 600; text-decoration: none; }
.try-cta-more a:hover { text-decoration: underline; }

/* ── Index page ──────────────────────────────────────────────────────────── */
.try-index { max-width: 860px; margin: 0 auto; padding: 28px 20px 40px; }

/* The way back to the dashboard, for a parent who opened a sample from the
   Try-it tab. Sits above the hero and left-aligned against the centred hero so it
   reads as an exit rather than part of the pitch -- the ask lives at the foot.
   Revealed by script only for a signed-in parent; see the note in
   tools/build-try-pages.mjs. The [hidden] rule is not redundant: the display
   below would otherwise beat the hidden attribute. */
.try-topbar { min-height: 4px; margin-bottom: 6px; }
.try-signup {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--try-violet);
  text-decoration: none;
  padding: 7px 14px;
  border: 1.5px solid var(--try-violet);
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.try-signup:hover { background: var(--try-violet); color: #fff; }
.try-signup[hidden] { display: none; }

.try-hero { text-align: center; margin-bottom: 30px; }
.try-hero-kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--try-amber);
  margin: 0 0 10px;
}
.try-hero h1 {
  font-size: clamp(24px, 4.2vw, 34px);
  line-height: 1.18;
  font-weight: 800;
  color: var(--try-ink);
  margin: 0 0 12px;
  letter-spacing: -.3px;
}
.try-hero-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--try-muted);
  margin: 0 auto;
  max-width: 60ch;
}
.try-hero-sub em { color: var(--try-ink); font-style: normal; font-weight: 700; }

.try-group { margin-bottom: 26px; }
.try-group h2 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--try-violet);
  margin: 0 0 10px 2px;
}
.try-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.try-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 112px;
  padding: 16px 18px;
  background: #fff;
  border: 1.6px solid var(--try-line);
  border-radius: 16px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .08s;
}
.try-card:hover {
  border-color: var(--try-violet);
  box-shadow: 0 10px 26px rgba(92, 73, 225, .13);
}
.try-card:active { transform: translateY(1px); }
.try-card-blurb {
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--try-ink);
}
.try-card-go { font-size: 13px; font-weight: 700; color: var(--try-violet); }

.try-cta-index { margin-top: 8px; }

@media (max-width: 620px) {
  .try-cards { grid-template-columns: 1fr; }
  .try-cta { padding: 22px 18px 18px; border-radius: 16px; }
  .try-banner { font-size: 13px; }
  .try-kicker { font-size: 11.5px; letter-spacing: .04em; }
}
