/* "Try Haven's set-up": the page uses the site's look (style.css); the preview screen uses Haven's own
   colours (haven-theme.css, copied from Haven) and sizes, drawn at 1920 × 1080 and scaled to fit. */
.try { padding-top: 40px; padding-bottom: 64px; }
.try-head h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.1; color: var(--night); margin: 0 0 14px; }
.try-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); grid-template-areas: "answers preview"; gap: 28px 36px; align-items: start; }
.answers { grid-area: answers; }
.preview { grid-area: preview; }
.why { margin-top: 36px; max-width: 900px; }
.why h2 { font-size: 24px; margin: 0 0 6px; }

/* The answers */
.answers { display: grid; gap: 14px; }
.answers fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 16px 14px; margin: 0; }
.answers legend { font-weight: 700; padding: 0 6px; color: var(--ink); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; display: inline-flex; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1.25; cursor: pointer; }
.opt input:checked + span { border-color: var(--night); background: var(--surface); font-weight: 700; box-shadow: inset 0 0 0 1px var(--night); }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* The preview */
.preview { position: sticky; top: 16px; }
.summary { font-size: 22px; margin: 0 0 12px; color: var(--ink); }
.frame { --s: 0.5; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); }
.screen { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform: scale(var(--s)); transform-origin: 0 0;
  background: var(--h-bg); color: var(--h-text); font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  display: grid; grid-template-columns: 110px 1fr; grid-template-rows: 88px 1fr; }
.screen svg { fill: currentColor; }
.strip { grid-row: 1 / 3; background: var(--h-surface-2); border-right: 2px solid var(--h-border); display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 14px; }
.round { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.round .circle { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--h-border); background: var(--h-surface); display: grid; place-items: center; }
.round .circle svg { width: 44px; height: 44px; }
.round.primary .circle { background: var(--h-accent); border-color: var(--h-accent); color: var(--h-on-accent); }
.round .word { font-size: 15px; }
.topline { display: flex; align-items: center; gap: 18px; padding: 0 28px; background: var(--h-surface); border-bottom: 2px solid var(--h-border); font-size: 22px; }
.topline .pill { display: inline-flex; align-items: center; gap: 14px; }
.topline .pill svg { width: 60px; height: 60px; padding: 12px; border-radius: 14px; background: var(--h-cat-5); box-sizing: border-box; }
.topline .then svg { width: 34px; height: 34px; color: var(--h-muted); }
.topline .grow { flex: 1; }
.topline .ask { display: inline-flex; align-items: center; gap: 10px; padding: 10px 22px; border-radius: 999px; border: 3px solid var(--h-accent); font-size: 21px; }
.topline .ask svg { width: 32px; height: 32px; }
.tiles { display: grid; gap: 28px; padding: 28px; align-content: start; grid-template-columns: repeat(auto-fill, minmax(calc(var(--target) * 2.6), 1fr)); }
.tile { aspect-ratio: 4 / 3; border-radius: 22px; border: 3px solid var(--h-border); background: var(--cat, var(--h-surface)); color: var(--h-text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; cursor: pointer; font: inherit; }
.tile svg { width: 40%; max-height: 55%; aspect-ratio: 1; }
.tile .word { font-size: clamp(19px, calc(var(--target) * 0.27), 24px); line-height: 1.15; }
.tile:hover { border-color: var(--h-accent); }
.tile:focus-visible { outline: 8px solid var(--h-focus); outline-offset: 4px; }
.screen[data-theme="high-contrast"] .tile, .screen[data-theme="high-contrast"] .round .circle { border-width: 4px; }
.screen.scanning .tile.lit { box-shadow: 0 0 0 10px var(--h-accent); }
.off { position: absolute; right: 28px; bottom: 28px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 22px; border: 3px solid var(--h-border); background: var(--h-surface); font-size: 20px; }
.off svg { width: 30px; height: 30px; }

/* What a tile does, and why */
.about { display: flex; gap: 18px; align-items: flex-start; margin: 18px 0 8px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.about[hidden] { display: none; }
.about-pic svg { width: 48px; height: 48px; fill: var(--night); }
.about h3 { margin: 0 0 4px; }
.about p { margin: 0 0 6px; color: var(--muted); }
.reasons { padding-left: 1.2em; margin: 8px 0 18px; max-width: 70ch; }
.reasons li { margin: 6px 0; }
.reasons .note { color: var(--muted); }

@media (max-width: 900px) {
  /* Phones and tablets: the screen stays at the top while the answers scroll under it. */
  .try-grid { grid-template-columns: 1fr; grid-template-areas: "preview" "answers"; }
  .preview { top: 0; z-index: 2; background: var(--bg); padding: 10px 0 12px; margin: 0 -24px; padding-left: 24px; padding-right: 24px; border-bottom: 1px solid var(--line); }
  .preview .small { display: none; }
  .summary { font-size: 17px; margin-bottom: 8px; }
}
