/* Try before signup (/try). Rendered by js/fk-try.js inside
   main.fk-try. Tokens only; both themes come from :root in app.css.
   Phone boards FkTry* adapted to the web: one column on a phone, the
   photo beside the recipe from 900px. */

.fk-try { padding-top: clamp(24px, 4vw, 48px); padding-bottom: var(--s-24); display: flex; flex-direction: column; gap: clamp(40px, 5vw, 64px); min-height: 60vh; }
.fk-try h1:focus { outline: none; }
.fk-try__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.fk-try__h { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.04; letter-spacing: -0.01em; max-width: 20ch; }
.fk-try__h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
.fk-try__h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.625rem; line-height: 1.1; }
.fk-try__lede { font-size: 1.0625rem; line-height: 1.55; max-width: 58ch; }
.fk-try__fine { font-size: 0.875rem; line-height: 1.5; max-width: 52ch; }
.fk-try__label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--c-text-2); margin-bottom: var(--s-4); }

.fk-try__pill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  min-height: 36px; max-width: 100%; padding: 0 14px;
  border-radius: var(--r-full); background: var(--c-surface); color: var(--c-text-2);
  font-size: 0.875rem;
}
.fk-try__pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fk-try__pill svg { flex: none; color: var(--c-accent); }

/* --- Start, no-link, limit ---------------------------------- */
.fk-try__intro { display: flex; flex-direction: column; gap: var(--s-8); max-width: 760px; }
.fk-try__quote { font-size: 1.0625rem; font-style: italic; overflow-wrap: anywhere; }
.fk-try__paste { width: 100%; margin-top: var(--s-4); }
.fk-try__pasterow { display: flex; gap: var(--s-4); }
.fk-try__pasterow .input { flex: 1; min-width: 0; min-height: 52px; }
.fk-try__pasterow .btn { flex: none; }
.fk-try__auth { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.fk-try__auth .btn { flex: 1 1 220px; }
@media (max-width: 560px) {
  .fk-try__pasterow { flex-direction: column; }
  .fk-try__pasterow .btn { width: 100%; }
}

.fk-try__how { display: flex; flex-direction: column; gap: var(--s-8); }
.fk-try__how ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--s-8) var(--s-12); }
.fk-try__how li { display: flex; gap: var(--s-6); align-items: flex-start; font-size: 1rem; line-height: 1.5; color: var(--c-text-2); }
.fk-try__how li b { color: var(--c-text); font-weight: 600; }
.fk-try__how .n {
  flex: none; width: 32px; height: 32px; border-radius: var(--r-full);
  display: inline-grid; place-items: center;
  font-family: var(--f-num); font-stretch: 85%; font-weight: 600; font-size: 1.0625rem;
  color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-border-hi);
}

/* --- Photo tiles (starters, similar) ------------------------ */
.fk-try__more { display: flex; flex-direction: column; gap: var(--s-8); }
.fk-try__tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s-8); }
.fk-try__tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; }
.fk-try__tileimg { position: absolute; inset: 0; border-radius: 0; }
.fk-try__tileimg img { transition: transform 400ms var(--ease-expo, ease-out); }
.fk-try__tile:hover .fk-try__tileimg img { transform: scale(1.03); }
.fk-try__tiletxt { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s-8); display: flex; flex-direction: column; gap: 4px; }
.fk-try__tiletxt b { font-weight: 400; font-size: 1.25rem; line-height: 1.12; }
.fk-try__tiletxt .n { font-family: var(--f-num); font-stretch: 85%; font-size: 0.875rem; color: var(--c-on-photo-2); }
.fk-try__tile:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
@media (max-width: 560px) {
  .fk-try__tiles { grid-template-columns: 1fr 1fr; gap: var(--s-4); }
  .fk-try__tiletxt { padding: var(--s-6); }
  .fk-try__tiletxt b { font-size: 1.0625rem; }
}
@media (prefers-reduced-motion: reduce) { .fk-try__tileimg img { transition: none; } }

/* --- Loading ------------------------------------------------ */
.fk-try__loading { display: flex; flex-direction: column; gap: var(--s-10); max-width: 620px; }
.fk-try__ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fk-try__ticks li {
  display: flex; align-items: center; gap: var(--s-6);
  min-height: 52px; border-top: 1px solid var(--c-border);
  font-size: 1.0625rem; color: var(--c-text-3);
  transition: color 200ms var(--ease-out, ease-out);
}
.fk-try__ticks li:last-child { border-bottom: 1px solid var(--c-border); }
.fk-try__ticks li[data-s="now"] { color: var(--c-text); }
.fk-try__ticks li[data-s="now"] svg { color: var(--c-accent); animation: fk-try-spin 900ms linear infinite; }
.fk-try__ticks li[data-s="done"] { color: var(--c-text-2); }
.fk-try__ticks li[data-s="done"] svg { color: var(--c-sage); }
.fk-try__ticks svg { flex: none; }
@keyframes fk-try-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fk-try__ticks li[data-s="now"] svg { animation: none; } }

/* --- Result and saved --------------------------------------- */
.fk-try__result { display: grid; gap: var(--s-12); align-items: start; }
.fk-try__photo { aspect-ratio: 4 / 3; border-radius: var(--r-xl); }
.fk-try__body { display: flex; flex-direction: column; gap: var(--s-8); min-width: 0; }
.fk-try__from { font-size: 0.9375rem; }
.fk-try__from a { color: var(--c-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c-border-hi); }
.fk-try__from a:hover { text-decoration-color: currentColor; }
.fk-try__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.125rem, 4.6vw, 3.5rem); line-height: 1.02; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.fk-try__desc { font-size: 1.0625rem; line-height: 1.55; max-width: 60ch; }
.fk-try__note { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9375rem; color: var(--c-text-2); }
.fk-try__note svg { flex: none; margin-top: 2px; color: var(--c-ember); }
.fk-try__read { margin-top: var(--s-2); }
.fk-try__sec { display: flex; flex-direction: column; gap: var(--s-6); margin-top: var(--s-8); }
.fk-try__ings { list-style: none; margin: 0; padding: 0; }
.fk-try__ings li { display: grid; grid-template-columns: minmax(64px, 7.5rem) 1fr; gap: var(--s-8); padding: 12px 0; border-top: 1px solid var(--c-border); font-size: 1rem; line-height: 1.45; }
.fk-try__ings li:last-child { border-bottom: 1px solid var(--c-border); }
.fk-try__amt { font-weight: 700; overflow-wrap: anywhere; }
.fk-try__method { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-10); }
.fk-try__method li { display: flex; gap: var(--s-8); align-items: flex-start; }
.fk-try__method p { font-size: 1.0625rem; line-height: 1.6; max-width: 62ch; }
.fk-try__stepn { flex: none; width: 2ch; font-family: var(--f-num); font-stretch: 85%; font-weight: 600; font-size: 1.375rem; line-height: 1.2; color: var(--c-accent); }

@media (min-width: 900px) {
  .fk-try__result { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 4vw, 64px); }
  .fk-try__media { position: sticky; top: var(--s-12); }
  .fk-try__photo { aspect-ratio: 4 / 5; }
}
@media (max-width: 899px) {
  /* The photo runs edge to edge on a phone, like the board. */
  .fk-try__media { margin: calc(-1 * clamp(24px, 4vw, 48px)) calc(-1 * clamp(16px, 4vw, 64px)) 0; }
  .fk-try__photo { border-radius: 0; aspect-ratio: 16 / 11; }
}

/* Save bar: stays at the bottom of the screen until the footer. */
.fk-try__bar {
  position: sticky; bottom: 0; z-index: 20;
  margin: 0 calc(-1 * clamp(16px, 4vw, 64px));
  padding: var(--s-6) clamp(16px, 4vw, 64px) calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in oklch, var(--c-bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-border);
}
.fk-try__barin { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-8); max-width: 1312px; margin: 0 auto; }
.fk-try__barin p { font-size: 0.9375rem; }
.fk-try__barin .btn { min-width: 220px; }
@media (max-width: 560px) {
  .fk-try__barin { flex-direction: column; align-items: stretch; gap: var(--s-4); }
  .fk-try__barin .btn { width: 100%; }
}
.fk-try[data-state="result"] { gap: var(--s-16); padding-bottom: 0; }

.fk-try__saved {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  min-height: 40px; padding: 6px 16px 6px 12px; border-radius: var(--r-full);
  background: var(--c-surface); font-size: 0.9375rem; line-height: 1.35;
}
.fk-try__saved svg { flex: none; color: var(--c-sage); }
.fk-try__saved .fk-mut { margin-left: 4px; }
.fk-try__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.fk-try__actions .btn { flex: 1 1 200px; }
.fk-try__kitchen { display: flex; flex-direction: column; gap: var(--s-6); }
.fk-try__kitchen .fk-chip { min-height: 44px; }
.fk-try__app {
  display: flex; align-items: center; gap: var(--s-8);
  min-height: 72px; padding: var(--s-6) 0; border-top: 1px solid var(--c-border);
}
.fk-try__app > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fk-try__app b { font-weight: 600; }
.fk-try__app .fk-mut { font-size: 0.875rem; }
.fk-try__appic { width: 44px; height: 44px; border-radius: var(--r-full); background: var(--c-surface); display: grid; place-items: center; flex: none; }

/* --- Fail --------------------------------------------------- */
.fk-try__fail { display: flex; flex-direction: column; gap: var(--s-8); }
.fk-try__fail > .btn { align-self: flex-start; }
.fk-try__failgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--s-8); margin-top: var(--s-6); }
.fk-try__textform, .fk-try__other { display: flex; flex-direction: column; gap: var(--s-6); }
.fk-try__textform textarea { min-height: 150px; resize: vertical; font: inherit; line-height: 1.5; }
.fk-try__textform .btn { align-self: flex-start; }
.fk-try__other .fk-try__paste { margin-top: 0; }
.fk-try__other .fk-try__label { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; color: var(--c-text); margin-bottom: var(--s-6); }
.fk-try__other .fk-try__pasterow { flex-direction: column; }
.fk-try__other .fk-try__pasterow .btn { align-self: flex-start; }
@media (max-width: 560px) {
  .fk-try__textform .btn, .fk-try__other .fk-try__pasterow .btn, .fk-try__fail > .btn { align-self: stretch; }
}

/* --- Sign-up sheet ------------------------------------------ */
.fk-try__sheet .fk-sheet__body { display: flex; flex-direction: column; gap: var(--s-8); }
.fk-try__sheet .fk-sheet__body > p { line-height: 1.5; }
.fk-try__chip { display: flex; align-items: center; gap: var(--s-6); padding: 8px; padding-right: 16px; border-radius: var(--r-lg); background: var(--c-surface); }
.fk-try__chip > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fk-try__chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fk-try__chip .fk-mut { font-size: 0.8125rem; }
.fk-try__chipimg { width: 52px; height: 52px; flex: none; border-radius: var(--r-md); }
.fk-try__warn { display: flex; gap: var(--s-6); align-items: flex-start; padding: var(--s-6) var(--s-8); border-radius: var(--r-lg); background: var(--c-surface-hi); font-size: 0.9375rem; line-height: 1.45; }
.fk-try__warn > svg { flex: none; color: var(--c-ember); margin-top: 2px; }
.fk-try__warn > div { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); }
.fk-try__email, [data-code] { display: flex; flex-direction: column; gap: var(--s-4); }
.fk-try__email .btn, [data-code] .btn { width: 100%; margin-top: var(--s-2); }
.fk-try__err { min-height: 1.25em; font-size: 0.875rem; color: var(--c-error); }
.fk-try__err:empty { min-height: 0; }
.fk-try__alt { font-size: 0.9375rem; line-height: 1.5; }
.fk-try__alt .fk-link { min-height: 0; display: inline; }
.fk-try__addr { color: var(--c-text); overflow-wrap: anywhere; }
.fk-try__row { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.fk-try__row .btn { min-height: 44px; }

/* Six boxes drawn from one real input, so paste and autofill work. */
.fk-try__code { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-4); }
.fk-try__code input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; font-size: 16px; color: transparent; caret-color: transparent;
}
.fk-try__code span {
  height: 60px; border-radius: var(--r-md);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--c-ctl);
  font-family: var(--f-num); font-stretch: 85%; font-weight: 600; font-size: 1.75rem;
  pointer-events: none;
}
.fk-try__code span.is-on { box-shadow: inset 0 0 0 2px var(--c-accent); }
@media (max-width: 400px) { .fk-try__code span { height: 52px; font-size: 1.5rem; } }
