/* try.css — the public Try funnel. Builds on the Aditor tokens in styles.css (dark-first, orange
   accent, glass). Only the try page loads this. Works at 375px with no horizontal scroll. */

/* Any author-level `display` beats the UA sheet's `[hidden] { display: none }`, so a section styled
   `display:flex` stays on screen however many times the JS sets .hidden = true. That is how the
   admin login and the dashboard once rendered stacked on top of each other (PR #3). The page steps
   are toggled by the hidden attribute, so state it once here and never think about it again. */
[hidden] { display: none !important; }

/* Match the approved FreeFrame front door without changing the shared editor stylesheet. */
.try-page {
  --bg: oklch(0.145 0.002 286);
  --ink: oklch(0.971 0.003 286);
  --muted: oklch(0.769 0.007 286);
  --accent: oklch(0.685 0.208 34);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  letter-spacing: normal;
  line-height: 1.5;
  color-scheme: dark;
}
.try-halo {
  position: absolute; inset: 0 0 auto; height: 520px; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 0%, oklch(0.685 0.208 34 / .16), transparent 70%);
}
.try-nav {
  position: relative; max-width: 1152px; height: 64px; margin: 0 auto; padding: 0 16px;
  align-items: center; justify-content: space-between;
  background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.try-brand, .try-sign-in {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); font-size: .9375rem; text-decoration: none;
}
.try-brand { gap: 10px; font-weight: 600; letter-spacing: -.025em; }
.try-brand img { object-fit: contain; }
.try-sign-in { padding: 0 16px; border-radius: 999px; font-weight: 500; }
.try-sign-in:hover { background: oklch(1 0 0 / .06); }
.try-sign-in:active { transform: scale(.97); }
.try-page a:focus-visible, .try-page button:focus-visible, .try-drop:focus-within {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
#try { position: relative; max-width: 1152px; margin: 0 auto; padding: 0 16px 96px; }
.try-hero { max-width: 672px; margin: 0 auto; padding-top: 40px; text-align: center; }
.try-h1 { font-size: 2.125rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.try-lede { max-width: 448px; margin: 16px auto 0; font-size: 1.0625rem; line-height: 1.625; color: var(--muted); text-wrap: balance; }
.try-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; margin: 40px auto 0; padding: 56px 32px; width: 100%;
  border: 1px dashed oklch(1 0 0 / .2); border-radius: 20px; cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease;
}
/* Keep the real input focusable: click, Enter and Space all use the native file picker. */
.try-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.try-drop:hover, .try-drop.dragover { border-color: var(--accent); background: oklch(0.685 0.208 34 / .05); }
.folder-lift { display: block; line-height: 0; transition: transform 240ms ease; }
.try-drop.dragover .folder-lift { transform: translateY(-6px); }
.drop-lead { display: block; font-size: 1.25rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.5; }
.drop-limits { display: block; margin-top: 6px; font-size: .9375rem; color: var(--muted); }
.try-benefits { display: grid; gap: 16px; max-width: 896px; margin: 80px auto 0; }
.try-benefits article { padding: 20px; border: 1px solid oklch(1 0 0 / .12); border-radius: 20px; }
.try-benefits svg { display: block; width: 20px; height: 20px; color: var(--accent); }
.try-benefits h2 { margin-top: 12px; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.025em; }
.try-benefits p { margin-top: 6px; color: var(--muted); font-size: .9375rem; line-height: 1.625; }
@media (min-width: 640px) {
  #try, .try-nav { padding-left: 24px; padding-right: 24px; }
  .try-hero { padding-top: 64px; }
  .try-h1 { font-size: 3.25rem; }
  .try-drop { padding-top: 64px; padding-bottom: 64px; }
  .try-benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .try-drop, .folder-lift { transition: none; }
  .try-drop.dragover .folder-lift, .try-sign-in:active { transform: none; }
}
.try-error {
  color: var(--blocker);
  font-size: 14px;
  margin: 16px auto 0;
  max-width: 560px;
}
#drop-error-cta {
  margin-top: 14px;
}

/* 2 · Wait — the editors' loading scene; everything visual comes from .ls-* in styles.css. */
#wait-section .ls-dash { margin-top: 8px; }
/* styles.css centres the scan panel with auto margins under 680px but gives it no width, so the
   9:16 box collapses to 0 and the first frame disappears on a phone. Width it here (240px tall). */
@media (max-width: 680px) { #wait-section .ls-scan { width: 135px; } }

/* 3 · Result */
/* The header is sticky, so scrollIntoView({block:"start"}) would park "The review" underneath it. */
#result-section { scroll-margin-top: 72px; }
.result-wrap { padding: 20px; }
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.try-player {
  width: 100%;
  border-radius: 12px;
  background: #000;
  aspect-ratio: 16 / 9;
  position: sticky;
  top: 76px;
}
.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  flex-wrap: wrap; /* at 375px "N free reviews left today" drops under the heading instead of squeezing it */
  margin-bottom: 12px;
}
.result-h2 { font-size: 18px; font-weight: 680; letter-spacing: -0.01em; }
.comments { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.comment {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--muted);
}
.comment.must-fix { border-left-color: var(--blocker); }
.comment.optional { border-left-color: var(--polish); }
.c-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
.tc {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 640;
  color: var(--accent);
  background: var(--accent-soft);
  border: 0;
  border-radius: 7px;
  padding: 2px 8px;
  min-height: 44px; min-width: 44px;
  cursor: pointer;
  font-family: inherit;
}
.tc:hover { opacity: 0.85; }
.weight {
  font-size: 11px;
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.comment.must-fix .weight { color: var(--blocker); }
.comment.optional .weight { color: var(--polish); }
.c-body { font-size: 14px; line-height: 1.5; color: var(--ink2); }
.clean-note { font-size: 15px; padding: 8px 0; }

/* Fallback result only: the pitch itself lives on /card/<id> now (src/reviewpage.ts). */
.trial-btn { display: inline-block; text-decoration: none; padding: 11px 22px; font-size: 15px; margin-top: 18px; }

@media (max-width: 720px) {
  .result-grid { grid-template-columns: 1fr; }
  .try-player { position: static; }
}

/* Team-only Foreplay link (L5). Tokens only; 44px targets. */
.foreplay-form { max-width: 560px; margin: 24px auto 0; text-align: left; }
.foreplay-form label { display: block; margin-bottom: 8px; font-size: .9375rem; color: var(--ink); }
.foreplay-form label span { margin-left: 8px; color: var(--muted); }
.foreplay-row { display: flex; gap: 8px; }
.foreplay-row .link-input { flex: 1; min-width: 0; min-height: 44px; }
.foreplay-row .btn-primary { min-height: 44px; white-space: nowrap; }
@media (max-width: 480px) { .foreplay-row { flex-direction: column; } }
