/* Forkato 2 account and info pages: sign in, reset, welcome, join,
   delete account, unsubscribe, 404/500, privacy, terms, shared
   collection, recipe share preview and the public store-chain pages.
   Tokens only; both themes come from :root in app.css. */

/* --- Shell bits -------------------------------------------- */
.fk-pubnav--min { justify-content: space-between; }
.fk-pubnav--min .fk-pubnav__signin { margin-left: auto; }
.fk-foot--slim { padding-top: var(--s-12); padding-bottom: var(--s-12); }
.fk-foot--slim a { color: var(--c-text-2) !important; text-decoration: underline; text-underline-offset: 3px; }
.fk-foot--slim a:hover { color: var(--c-text) !important; }

.fk-acct-kick { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 600; color: var(--c-accent); }
.fk-acct-kick svg { flex: none; }
.fk-acct-h { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.25rem, 4.6vw, 3.75rem); line-height: 1.02; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.fk-acct-h em { font-style: normal; color: var(--c-accent); }
.fk-acct-h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.08; }
.fk-acct-lede { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.55; color: var(--c-text-2); max-width: 46ch; }
.fk-acct-fine { font-size: 0.875rem; line-height: 1.5; color: var(--c-text-2); }
.fk-acct-acts { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.fk-acct-link { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.fk-acct-link:hover { color: var(--c-text); }

/* Status messages, toned for both themes (the 1.x alert colours were dark-only). */
.fk2 .alert { border-radius: 12px; font-size: 0.9375rem; }
.fk2 .alert--error { background: color-mix(in oklch, var(--c-error) 12%, transparent); color: var(--c-text); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--c-error) 45%, transparent); }
.fk2 .alert--success { background: color-mix(in oklch, var(--c-sage) 12%, transparent); color: var(--c-text); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--c-sage) 45%, transparent); }

/* Hairline check / cross lists */
.fk-ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fk-ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--c-border-hi); line-height: 1.5; }
.fk-ticks li:last-child { border-bottom: 1px solid var(--c-border-hi); }
.fk-ticks svg { margin-top: 3px; color: var(--c-sage); }
.fk-ticks--x svg { color: var(--c-text-2); }
.fk-ticks--bare li, .fk-ticks--bare li:last-child { border: 0; padding: 4px 0; }

/* --- Sign in / reset ---------------------------------------- */
.fk-auth {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: var(--s-16) 80px; align-items: start;
  padding-top: clamp(28px, 6vw, 72px); padding-bottom: var(--s-24);
  min-height: calc(100vh - 180px);
}
@media (min-width: 960px) {
  .fk-auth { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
}
.fk-auth__col { display: flex; flex-direction: column; gap: var(--s-8); width: 100%; max-width: 440px; }
.fk-auth__col .field { margin-bottom: var(--s-10); }
.fk-auth__col .label { font-size: 0.875rem; font-weight: 600; }
.fk-auth__col form .btn { width: 100%; }
.fk-auth__col h1:focus { outline: none; }
.fk-auth__or { display: flex; align-items: center; gap: var(--s-6); margin: var(--s-8) 0; color: var(--c-text-2); font-size: 0.875rem; }
.fk-auth__or::before, .fk-auth__or::after { content: ''; flex: 1; height: 1px; background: var(--c-border-hi); }
.fk-auth__google { gap: 10px; }
.fk-auth__google svg { width: 18px; height: 18px; }
.fk-auth__under { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-4); }
.fk-auth__under .btn--text { width: auto !important; min-height: 44px; padding: 0; color: var(--c-text-2); text-decoration: underline; text-underline-offset: 3px; }
.fk-auth__under .btn--text:hover { color: var(--c-text); }
.fk-auth__switch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); padding-top: var(--s-10); border-top: 1px solid var(--c-border-hi); color: var(--c-text-2); font-size: 0.9375rem; }
.fk-auth__invite { padding: var(--s-8) var(--s-10); border-radius: 14px; background: var(--c-surface); line-height: 1.5; font-size: 0.9375rem; color: var(--c-text-2); }
.fk-auth__invite strong { color: var(--c-accent); font-weight: 600; }
.fk-auth__invite span { color: var(--c-text); font-weight: 600; }
.fk-auth__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fk-auth__pwhint { margin-top: 6px; font-size: 0.8125rem; color: var(--c-text-2); min-height: 1.2em; }
.fk-auth .pw-eye { min-width: 44px; min-height: 44px; justify-content: center; right: 2px; color: var(--c-text-2); }
.fk-auth .pw-eye:hover { color: var(--c-text); }
.fk-auth .pw-strength { background: var(--c-surface-hi); }

/* Photo beside the form (desktop only) */
.fk-auth__photo { display: none; }
@media (min-width: 960px) {
  .fk-auth__photo {
    display: flex; flex-direction: column; justify-content: flex-end;
    position: sticky; top: var(--s-12);
    height: min(76vh, 720px); min-height: 480px;
    border-radius: 20px; color: var(--c-on-photo);
  }
  .fk-auth__photo:hover .fk-auth__cap b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
}
.fk-auth__cap { position: relative; padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 6px; }
.fk-auth__cap span { font-size: 0.875rem; font-weight: 600; color: var(--c-on-photo-2, var(--c-on-photo)); }
.fk-auth__cap b { color: var(--c-on-photo); font-family: var(--f-display); font-weight: 400; font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1.05; max-width: 18ch; }
.fk-auth__photo--text { background: var(--c-surface); color: var(--c-text); }
.fk-auth__photo--text .fk-auth__cap span { color: var(--c-text-2); }
.fk-auth__photo--text .fk-auth__cap b { color: var(--c-text); }

/* --- Message pages (404, 500, unsubscribe, join, reset done) - */
.fk-msg { padding-top: clamp(40px, 9vw, 120px); padding-bottom: clamp(56px, 9vw, 120px); }
.fk-msg__in { max-width: 680px; display: flex; flex-direction: column; gap: var(--s-8); }
.fk-msg__code { font-family: var(--f-num); font-stretch: 85%; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1rem; color: var(--c-text-2); }
.fk-msg__acts { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-4); }
.fk-msg__more { margin-top: var(--s-12); }
.fk-msg__more b { display: block; font-size: 0.875rem; color: var(--c-text-2); padding-bottom: var(--s-4); font-weight: 600; }
.fk-msg__more a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-8); min-height: 60px; border-top: 1px solid var(--c-border-hi); color: var(--c-text); }
.fk-msg__more a:last-child { border-bottom: 1px solid var(--c-border-hi); }
.fk-msg__more a small { display: block; color: var(--c-text-2); font-size: 0.875rem; }
.fk-msg__more a svg { color: var(--c-text-2); }
.fk-msg__more a:hover svg { color: var(--c-accent); }
.fk-msg__code-inline { font-family: var(--f-num); font-stretch: 85%; font-weight: 600; color: var(--c-text); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.fk-msg__mark { width: 56px; height: 56px; border-radius: var(--r-full); display: grid; place-items: center; background: var(--c-surface); color: var(--c-accent); }
.fk-msg__mark--ok { color: var(--c-sage); }
.fk-msg__mark--muted { color: var(--c-text-2); }

/* Join: household readout */
.fk-join__people { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--c-border-hi); border-bottom: 1px solid var(--c-border-hi); color: var(--c-text-2); }
.fk-join__people .n { font-size: 1.5rem; color: var(--c-text); }
.fk-join__err { padding: var(--s-6) var(--s-8); border-radius: 12px; background: color-mix(in oklch, var(--c-error) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--c-error) 45%, transparent); color: var(--c-text); line-height: 1.5; }

/* --- Legal (privacy, terms) --------------------------------- */
.fk-legal { padding-top: clamp(28px, 5vw, 64px); padding-bottom: var(--s-24); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-12) 72px; }
@media (min-width: 1080px) { .fk-legal { grid-template-columns: 240px minmax(0, 1fr); } }
.fk-legal__head { display: flex; flex-direction: column; gap: var(--s-6); grid-column: 1 / -1; max-width: 760px; }
.fk-legal__meta { font-size: 0.9375rem; color: var(--c-text-2); }
.fk-legal__toc { display: none; }
@media (min-width: 1080px) {
  .fk-legal__toc { display: block; position: sticky; top: var(--s-12); align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; }
}
.fk-legal__toc b { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--c-text-2); padding-bottom: var(--s-4); }
.fk-legal__toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--c-border-hi); }
.fk-legal__toc a { display: flex; align-items: center; min-height: 36px; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 1px solid transparent; font-size: 0.875rem; line-height: 1.3; color: var(--c-text-2); }
.fk-legal__toc a:hover { color: var(--c-text); }
.fk-legal__toc a[aria-current] { color: var(--c-text); border-left-color: var(--c-accent); }
.fk-legal__body { max-width: 68ch; color: var(--c-text-2); font-size: 1.0625rem; line-height: 1.7; }
.fk-legal__body h3 {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(1.375rem, 2vw, 1.625rem); line-height: 1.12;
  color: var(--c-text); margin: var(--s-16) 0 var(--s-6); padding-top: var(--s-8);
  border-top: 1px solid var(--c-border-hi); scroll-margin-top: var(--s-12);
}
.fk-legal__body h3:first-child { margin-top: 0; }
.fk-legal__body p { margin: 0 0 var(--s-8); }
.fk-legal__body ul { list-style: disc; padding-left: 1.25em; margin: 0 0 var(--s-8); }
.fk-legal__body li { margin: 0 0 var(--s-4); padding-left: 4px; }
.fk-legal__body li::marker { color: var(--c-text-3); }
.fk-legal__body strong, .fk-legal__body b { color: var(--c-text); font-weight: 600; }
.fk-legal__body a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.fk-legal__body a:hover { color: var(--c-text); }

/* --- Delete account (boards FkDeleteAccount) ----------------- */
.fk-del { padding-top: clamp(32px, 6vw, 72px); padding-bottom: var(--s-24); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-12) 80px; }
@media (min-width: 960px) { .fk-del { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.fk-del__intro { display: flex; flex-direction: column; gap: var(--s-8); align-self: start; }
@media (min-width: 960px) { .fk-del__intro { position: sticky; top: var(--s-12); } }
.fk-del__main { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); min-width: 0; }
.fk-del__steps { list-style: none; margin: var(--s-6) 0 0; padding: 0; counter-reset: fkdel; }
.fk-del__steps li { counter-increment: fkdel; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--c-border-hi); line-height: 1.5; color: var(--c-text-2); }
.fk-del__steps li::before { content: counter(fkdel); font-family: var(--f-num); font-stretch: 85%; font-weight: 600; font-size: 1.125rem; color: var(--c-accent); }
.fk-del__steps b { color: var(--c-text); font-weight: 600; }
.fk-del__now { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-8); align-items: center; padding-top: var(--s-8); border-top: 1px solid var(--c-border-hi); }
.fk-del__now p { font-size: 0.875rem; color: var(--c-text-2); }
.fk-del__panel { display: flex; flex-direction: column; gap: var(--s-6); padding: clamp(20px, 3vw, 32px); border-radius: 20px; background: var(--c-surface); color: var(--c-text-2); line-height: 1.6; }
.fk-del__panel .fk-acct-h2 { color: var(--c-text); }
.fk-del__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-16) 48px; }
@media (min-width: 720px) { .fk-del__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fk-del__cols h2 { font-size: 1.125rem; font-weight: 600; font-family: var(--f-body); letter-spacing: 0; margin-bottom: var(--s-6); color: var(--c-text); }
.fk-del__cols p { color: var(--c-text-2); line-height: 1.6; }
.fk-del__cols p + h2 { margin-top: var(--s-12); }
.fk-del__cols a, .fk-del__panel a:not(.btn), .fk-del__main > p a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

/* --- Welcome (signed in onboarding) -------------------------- */
.fk-wel { padding-top: clamp(28px, 5vw, 64px); padding-bottom: var(--s-24); display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); }
.fk-wel__head { display: flex; flex-direction: column; gap: var(--s-6); max-width: 760px; }
.fk-wel__progress { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.fk-wel__progress-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 0.9375rem; color: var(--c-text-2); }
.fk-wel__progress-row b { color: var(--c-text); font-weight: 600; }
.fk-wel__bar { height: 4px; border-radius: var(--r-full); background: var(--c-surface-hi); overflow: hidden; }
.fk-wel__bar span { display: block; height: 100%; width: var(--pct, 0%); background: var(--c-accent); border-radius: inherit; transition: width 400ms var(--ease-out, ease-out); }
.fk-wel__steps { list-style: none; margin: 0; padding: 0; max-width: 960px; }
.fk-wel__step { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 16px; align-items: start; padding: 20px 0; border-top: 1px solid var(--c-border-hi); color: inherit; }
.fk-wel__steps li:last-child .fk-wel__step { border-bottom: 1px solid var(--c-border-hi); }
@media (min-width: 720px) { .fk-wel__step { grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; } }
.fk-wel__num { width: 40px; height: 40px; border-radius: var(--r-full); display: grid; place-items: center; background: var(--c-surface-hi); color: var(--c-accent); font-size: 1rem; }
.fk-wel__step--done .fk-wel__num { background: color-mix(in oklch, var(--c-sage) 18%, transparent); color: var(--c-sage); }
.fk-wel__copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fk-wel__copy b { font-family: var(--f-display); font-weight: 400; font-size: 1.375rem; line-height: 1.12; }
.fk-wel__copy span { color: var(--c-text-2); line-height: 1.55; max-width: 62ch; }
.fk-wel__cta { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--c-accent); font-weight: 600; white-space: nowrap; }
@media (min-width: 720px) { .fk-wel__cta { grid-column: 3; } }
.fk-wel__step--done .fk-wel__cta { color: var(--c-text-2); }
.fk-wel__step:hover .fk-wel__copy b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.fk-wel__step:hover .fk-wel__cta svg { transform: translateX(3px); }
.fk-wel__cta svg { transition: transform var(--dur-fast, 160ms) var(--ease-out, ease-out); }
.fk-confetti { position: fixed; top: -10px; width: 8px; height: 12px; border-radius: 2px; opacity: 0.9; pointer-events: none; z-index: 50; animation: fk-confetti-fall 3s ease-out forwards; }
.fk-confetti--1 { background: var(--c-accent); }
.fk-confetti--2 { background: var(--c-sage); }
.fk-confetti--3 { background: var(--c-ember); }
.fk-confetti--4 { background: var(--c-text-2); }
@keyframes fk-confetti-fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .fk-confetti { display: none; } }

/* --- Shared collection (/c/{token}) -------------------------- */
.fk-coll { padding-bottom: var(--s-24); display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
.fk-coll__head { display: flex; flex-direction: column; gap: var(--s-6); max-width: 760px; padding-top: var(--s-4); }
.fk-coll__by { font-size: 0.9375rem; color: var(--c-text-2); }
.fk-coll__by .n { color: var(--c-text); }
.fk-pub-card__shot.fk-shot--empty svg { width: 32px; height: 32px; }

/* --- Recipe share preview (/recipe/{id}/preview) ------------- */
.fk-rp { padding-bottom: var(--s-24); display: flex; flex-direction: column; gap: clamp(36px, 5vw, 64px); }
.fk-rp__head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-12) 64px; align-items: start; padding-top: var(--s-4); }
@media (min-width: 960px) { .fk-rp__head { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.fk-rp__photo { aspect-ratio: 4 / 3; border-radius: 20px; }
@media (min-width: 960px) { .fk-rp__photo { order: 2; aspect-ratio: 4 / 5; position: sticky; top: var(--s-12); } }
.fk-rp__copy { display: flex; flex-direction: column; gap: var(--s-8); min-width: 0; }
.fk-rp__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.375rem, 4.4vw, 4rem); line-height: 1.02; max-width: 16ch; overflow-wrap: anywhere; }
.fk-rp__by { font-size: 0.9375rem; color: var(--c-text-2); }
.fk-rp__desc { font-size: 1.0625rem; line-height: 1.6; color: var(--c-text-2); max-width: 56ch; }
.fk-rp .fk-read { max-width: 520px; }
.fk-rp__tease h2 { font-size: 0.875rem; font-weight: 600; font-family: var(--f-body); letter-spacing: 0; color: var(--c-text-2); margin-bottom: var(--s-4); }
.fk-rp__tease ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fk-rp__tease li { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--r-full); background: var(--c-surface); font-size: 0.9375rem; }
.fk-rp__tease p { margin-top: var(--s-4); font-size: 0.875rem; color: var(--c-text-2); }
.fk-rp__cta { display: flex; flex-wrap: wrap; gap: var(--s-4); }

/* --- Store chain (/stores/{slug}) ---------------------------- */
.fk-chain { padding-bottom: var(--s-24); display: flex; flex-direction: column; gap: clamp(36px, 5vw, 64px); }
.fk-chain__head { display: flex; flex-direction: column; gap: var(--s-8); max-width: 820px; padding-top: var(--s-4); }
.fk-chain .fk-read { max-width: 640px; }
.fk-chain .fk-read__v { font-size: 1.25rem; }
.fk-chain__map { height: clamp(300px, 46vh, 460px); width: 100%; border-radius: 20px; background: var(--c-surface); overflow: hidden; z-index: 0; }
.fk-chain__states { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s-12) 48px; margin-top: var(--s-8); }
.fk-chain__state h3 { font-family: var(--f-body); font-weight: 600; font-size: 1rem; letter-spacing: 0; color: var(--c-text); padding-bottom: var(--s-4); display: flex; justify-content: space-between; gap: 8px; }
.fk-chain__state h3 .n { color: var(--c-text-2); font-size: 0.9375rem; }
.fk-chain__state ul { list-style: none; margin: 0; padding: 0; }
.fk-chain__state li { padding: 10px 0; border-top: 1px solid var(--c-border-hi); line-height: 1.45; }
.fk-chain__state li small { display: block; color: var(--c-text-2); font-size: 0.875rem; }
.fk-chain__note { color: var(--c-text-2); line-height: 1.55; max-width: 60ch; }
.fk-chain__note a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
/* Leaflet sits inside our theme: popups and controls read the tokens. */
.fk-chain__map .leaflet-popup-content-wrapper, .fk-chain__map .leaflet-popup-tip { background: var(--c-surface-hi); color: var(--c-text); box-shadow: 0 0 0 1px var(--c-border-hi); }
.fk-chain__map .leaflet-popup-content { font: 0.875rem/1.45 var(--f-body); }
.fk-chain .fk-chain__map .leaflet-bar a { background: var(--c-surface-hi); color: var(--c-text); border-color: var(--c-border-hi); }
.fk-chain .fk-chain__map .leaflet-bar a:hover { background: var(--c-surface); }
.fk-chain__map .leaflet-control-attribution { background: color-mix(in oklch, var(--c-bg) 82%, transparent); color: var(--c-text-2); }
.fk-chain__map .leaflet-control-attribution a { color: var(--c-text); }
.fk-chain__map .leaflet-container a.leaflet-popup-close-button { color: var(--c-text-2); }
.fk-auth--solo { grid-template-columns: minmax(0, 1fr) !important; }

/* Three-value readouts stay on one row on a phone (the kit wraps to 2x2). */
@media (max-width: 520px) {
  .fk-rp .fk-read, .fk-chain .fk-read { grid-auto-flow: column; grid-template-columns: none; }
  .fk-rp .fk-read > div:nth-child(3), .fk-chain .fk-read > div:nth-child(3) { border-left: 1px solid var(--c-border-hi); padding-left: 12px; border-top: 0; }
}
.fk-rp { padding-top: clamp(16px, 3vw, 40px); }
