/* On-screen target: the stage on the landing page and the guide under it.
   Edit website/try.css; build.mjs publishes it. */
/* The stage can meet the top of the window. With the shared scroll padding, a
   control in its bar counts as hidden there and focusing it scrolls the page.
   home.css gives the landing page's jump targets their room back. */
html {
  scroll-padding-top:0;
}

.try-address {
  color:var(--ink);
  font-weight:650;
  overflow-wrap:anywhere;
}

/* The stage: a drawn outdoor range (scene.mjs) behind the target, which stands
   on two sticks that run out of the bottom. The bar and caption sit on a veil
   so they stay readable over the drawing. --wall shows until the drawing
   arrives and is the text colour of the chosen target's button. */
.try-stage {
  --wall:#191c1e;
  --wall-ink:#eceded;
  --wall-muted:#d3cfc5;
  --wall-line:#ffffff38;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  height:88vh;
  height:min(88svh,940px);
  min-height:480px;
  overflow:hidden;
  background:var(--wall) url(/assets/try-range-v1.svg) center / cover;
  color:var(--wall-ink);
}

.try-bar {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px 32px;
  padding:16px var(--gutter);
  border-bottom:1px solid var(--wall-line);
  background:#16191bcc;
  transition:opacity .3s;
}

.try-choice {
  position:relative;
  display:flex;
  align-items:center;
}

.try-choice-label,.try-caption {
  color:var(--wall-muted);
  font-size:.6875rem;
  font-weight:650;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.try-choice-label {
  margin-right:14px;
}

.try-choice input {
  position:absolute;
  width:1px;
  height:1px;
  margin:0;
  opacity:0;
  pointer-events:none;
}

.try-choice label,.try-fullscreen {
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:8px 17px;
  border:1px solid var(--wall-line);
  background:transparent;
  color:var(--wall-ink);
  font-size:.875rem;
  font-weight:620;
  line-height:1.4;
  cursor:pointer;
  transition:background .18s,color .18s,border-color .18s;
}

.try-choice label+input+label {
  margin-left:-1px;
}

.try-choice input:checked+label,.try-fullscreen:hover {
  border-color:var(--wall-ink);
  background:var(--wall-ink);
  color:var(--wall);
}

.try-choice input:focus-visible+label {
  position:relative;
  outline:3px solid var(--red);
  outline-offset:3px;
}

.try-fullscreen {
  margin-left:auto;
  border-color:var(--wall-muted);
  border-radius:2px;
}

.try-fullscreen[hidden] {
  display:none;
}

.try-floor {
  position:relative;
  min-height:0;
}

/* The drawing scales to fit (viewBox), so the box may be any shape. The sticks
   leave the box and the stage cuts them off. */
.try-target {
  position:absolute;
  top:4%;
  left:5%;
  display:none;
  width:90%;
  height:92%;
  overflow:visible;
}

.try-target-metric,.try-stage:has(#try-classic:checked) .try-target-classic {
  display:block;
}

.try-stage:has(#try-classic:checked) .try-target-metric {
  display:none;
}

/* Positioned so it paints over the sticks. */
.try-caption {
  position:relative;
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:14px var(--gutter) 16px;
  background:#16191bcc;
  transition:opacity .3s;
}

.try-spec {
  display:none;
}

.try-spec-metric,.try-stage:has(#try-classic:checked) .try-spec-classic {
  display:inline;
}

.try-stage:has(#try-classic:checked) .try-spec-metric {
  display:none;
}

.try-stage:fullscreen {
  width:100%;
  height:100%;
  min-height:0;
}

.try-stage:-webkit-full-screen {
  width:100%;
  height:100%;
  min-height:0;
}

/* try.js sets this in full screen once the pointer rests, leaving only the target. */
.try-stage.is-idle {
  cursor:none;
}

.try-stage.is-idle .try-bar,.try-stage.is-idle .try-caption {
  opacity:0;
}

/* Keyboard focus keeps the bar; the click that entered full screen does not. */
.try-stage.is-idle .try-bar:has(:focus-visible) {
  opacity:1;
}

/* The guide under the stage: three steps, then the notes. Type and columns
   follow the landing page (home.css) so it reads as part of the same section:
   the notes' right column starts where the heading's does. */
.try-guide {
  padding-block:64px 96px;
}

.try-guide .eyebrow {
  margin-bottom:22px;
  font-size:.625rem;
}

.try-guide h3 {
  font-size:1.5rem;
  font-weight:620;
}

.try-guide .steps article p,.try-notes-lead {
  font-size:.9375rem;
  line-height:1.85;
}

.try-notes {
  display:grid;
  grid-template-columns:1.25fr 1fr;
  gap:100px;
  margin-top:80px;
}

.try-notes-lead {
  max-width:340px;
  margin-top:13px;
}

@media(max-width:1100px) {
  .try-notes {
    gap:60px;
  }
}

@media(max-width:820px) {
  .try-guide {
    padding-block:52px 76px;
  }
  .try-guide h3 {
    font-size:1.2rem;
  }
  .try-notes {
    gap:35px;
    margin-top:64px;
  }
}

@media(max-width:620px) {
  .try-stage {
    height:84vh;
    height:min(84svh,700px);
    min-height:440px;
  }
  .try-bar {
    gap:10px 14px;
    padding-block:12px;
  }
  .try-choice-label {
    display:none;
  }
  .try-choice label,.try-fullscreen {
    padding-inline:11px;
  }
  .try-caption {
    padding-block:11px 13px;
    font-size:.625rem;
  }
  .try-guide {
    padding-block:44px 60px;
  }
  .try-guide h3 {
    font-size:1.25rem;
  }
  .try-notes {
    grid-template-columns:1fr;
    gap:26px;
    margin-top:52px;
  }
}
