/* The free public chart tool (/try) and the tools index. Colours only through tokens; light or dark follows the
   visitor's system. The sheet itself is the public song sheet shell (public_sheet.css, perform_songview.css) that the shared
   chart page uses too; this file holds only what /try has of its own: the empty-state hero,
   the editable title, the starting-key bar and the account line. */
.try-main { min-height: 100dvh; background: var(--bg); color: var(--ink); }

/* ---- empty state: one screen, paste box first ---- */
.try-hero {
  width: min(44rem, 100% - 2rem);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3.5rem) 0 clamp(1.5rem, 4vw, 3rem);
}
.try-hero__copy { display: grid; align-content: start; gap: 0.7rem; min-width: 0; }
.try-hero .eyebrow { margin: 0; }
.try-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6.2vw, 2.9rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.try-hero__lede { margin: 0; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); color: var(--muted); max-width: 34rem; }

.try-paste { display: grid; gap: 0.6rem; margin-top: 0.4rem; }
.try-paste__label { font-weight: 700; font-size: 0.95rem; }
.try-paste__box {
  width: 100%;
  min-height: clamp(15rem, 42dvh, 24rem);
  max-height: 48dvh;
  padding: 0.85rem 1rem;
  border: 2px solid var(--hairline);
  border-radius: 0.5rem;
  background: var(--paper);
  color: var(--ink);
  font: 0.95rem/1.45 ui-monospace, "DejaVu Sans Mono", Menlo, monospace;
  resize: vertical;
}
/* The example is a hint, not content: lighter and italic. */
.try-paste__box::placeholder { color: var(--muted); font-style: italic; opacity: 0.75; }
.try-paste__box:focus-visible { outline: 3px solid var(--brand-teal-chord); outline-offset: 2px; border-color: var(--brand-teal-chord); }
.try-paste__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.try-paste__actions .button { min-height: 3rem; padding-inline: 1.5rem; font-size: 1.05rem; }
/* "Try a sample" is a quiet secondary: a text button, not a second block. */
.try-paste__sample {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: 700 1rem/1 var(--font-ui);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}
.try-paste__fine { margin: 0; color: var(--muted); font-size: 0.88rem; }
.try-error {
  margin: 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--shared-key-line);
  border-radius: 0.4rem;
  background: var(--shared-key-fill);
  color: var(--shared-key-ink);
}
.try-error[hidden] { display: none; }

/* Phone: headline, one line of support, the paste box and "Show my chart" all inside the first screen. */
@media screen and (max-width: 40rem) {
  .try-hero { padding-top: 1rem; }
  .try-hero .eyebrow, .try-paste__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .try-paste__box { min-height: clamp(14rem, 39dvh, 20rem); }
  .try-paste__fine { font-size: 0.82rem; }
}

.try-tools a:not(.button) { color: var(--accent); text-underline-offset: 0.2em; }

/* The tools index keeps the narrow reading column. */
.try-intro { width: min(46rem, 100% - 2rem); margin: 0 auto; padding: clamp(1.75rem, 6vw, 4rem) 0 2rem; }
.try-intro h1 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: clamp(2rem, 7.5vw, 3.6rem); font-weight: 400; line-height: 1.02; }
.try-tools__list { display: grid; gap: 1.25rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.try-tools__list li { padding: 1.1rem 1.25rem; border: 1px solid var(--rule); border-radius: 0.6rem; background: var(--surface); }
.try-tools__list h2 { margin: 0 0 0.4rem; font-size: 1.3rem; }
.try-tools__list p { margin: 0 0 0.9rem; color: var(--muted); }

.try-page--busy { cursor: progress; }
.try-sheet-host[hidden], .try-empty[hidden] { display: none; }

/* ---- the sheet: only what a visitor's sheet has that a shared one does not ---- */
body.try-page-body--sheet { overflow: hidden; }
.try-sheet-host .public-sheet.songview.chart-preview { height: 100dvh; }
.try-form { display: none; }

/* The title is editable in place; it is a textarea so a long title wraps to a second line instead of being cut off. */
.sheet-song__title .try-sheet__title {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 1.1em;
  margin: 0 0 0 -6px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  resize: none;
  overflow: hidden;
  field-sizing: content;
}
.sheet-song__title .try-sheet__title::placeholder { color: var(--muted); }
.sheet-song__title .try-sheet__title:hover { border-color: var(--hairline); }
.sheet-song__title .try-sheet__title:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); background: var(--surface); }

.try-keybar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  width: min(84rem, 100%);
  margin: 0 auto;
  padding: 6px clamp(1rem, 3vw, 2rem);
  color: var(--muted);
  font-size: 0.92rem;
}
.try-keybar label { color: var(--ink); font-weight: 700; }
.try-keybar select { min-height: 36px; }
.try-nudge { margin: 0; padding: 4px clamp(8px, 2vw, 20px); background: var(--tint); color: var(--muted); font-size: 0.9rem; text-align: center; }
.try-nudge[hidden], .try-keybar[hidden] { display: none; }

/* ---- print page inside the tool ---- */
.try-interface .print-layout { min-height: 100dvh; }

/* ---- kept chart banner (member side) ---- */
.kept-chart__banner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.kept-chart__banner p { margin: 0; flex: 1 1 14rem; }
.kept-chart [hidden] { display: none; }

.print-keep { margin: 1rem 0 0.5rem; padding: 0.8rem 0.9rem; border: 1px solid var(--rule); border-radius: 0.5rem; background: var(--surface); break-inside: avoid; }
.print-keep p { margin: 0 0 0.5rem; font-weight: 700; }

/* "Paste another" and "Try another sample": always visible on a chart, as two quiet text links sharing one line, so the
   action buttons beside them (Edit text, Print, Save) stay a single row on a phone. */
.try-again {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  flex-basis: 100%;
}

.try-again__link {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 0;
  min-height: 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.try-again__link:hover {
  text-decoration-thickness: 2px;
}

@media screen and (min-width: 48rem) {
  .try-again {
    flex-basis: auto;
    margin-right: 8px;
  }
}
