/*
 * /for-you in the homepage v2 design. Loaded AFTER /v2/home.css, whose
 * tokens (keyed on html.dark, the site's own toggle) and shared pieces
 * (.hv2-btn, .hv2-tabs, .hv2-viewtoggle, .hv2-price, .hv2-was, .hv2-pct,
 * .hv2-cta, .hv2-offer, .hv2-more) this file builds on. Everything here is
 * scoped under .fy2 or a .fy2-* / .fy-* class. Plain CSS outside the Vite
 * build, so there is no compiled-class trap.
 */

.fy2 { font-family: var(--hv2-font); color: var(--text); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased;
    /* Aliases for the picker partial, which reads --fy-* in a few inline styles. */
    --fy-fg: var(--text); --fy-muted: var(--text-muted); --fy-line: var(--border); --fy-accent: var(--cta); }
:where(.fy2) *, :where(.fy2) *::before, :where(.fy2) *::after { box-sizing: border-box; }
.fy2 :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.fy2-wrap { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }
body.fy-locked { overflow: hidden; }

/* ------------------------------------------------------------- hero */
.fy2-hero { background: var(--bg-raised); border-bottom: 1px solid var(--divider); }
.fy2-hero__in { padding-top: 48px; padding-bottom: 36px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.fy2-hero__title { margin: 0; font-family: var(--hv2-display); font-size: 48px; line-height: 1.08; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.fy2-hero__sub { margin: 12px 0 0; font-size: 17px; color: var(--text-muted); text-wrap: balance; }
.fy2-hero__actions { margin-top: 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 18px; }
.fy2-editbtn { height: 44px; padding: 0 18px; border-radius: 999px; background: var(--surface); border-color: var(--border-strong); color: var(--text) !important; font-weight: 600; }
.fy2-editbtn:hover { border-color: var(--text-faint); }
.fy2-hero__meta { font-size: 14px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- toolbar */
.fy2-toolbar { border-bottom: 1px solid var(--divider); }
.fy2-toolbar__in { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fy2-toolbar__right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fy2-toolbar__count { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------- body */
.fy2-body { padding-top: 24px; padding-bottom: 72px; }
.fy2-btn { height: 44px; }

.fy2-starter { margin-bottom: 20px; padding: 16px 18px; border-radius: 16px; background: var(--notice-bg); border: 1px solid color-mix(in srgb, var(--notice-text) 30%, transparent); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; }
.fy2-starter__title { margin: 0; font-size: 15px; font-weight: 700; color: var(--notice-text); }
.fy2-starter__sub { margin: 2px 0 0; font-size: 14px; color: var(--notice-text); opacity: .9; }
.fy2-starter__btns { display: flex; gap: 8px; flex-shrink: 0; }

/* Filter chips. Wrap on a wide screen (the row is the reader's whole list AND
   the filter control), scroll sideways inside themselves on a phone. */
.fy2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.fy2-chip { height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color .15s var(--hv2-ease), background-color .15s var(--hv2-ease), color .15s var(--hv2-ease); }
.fy2-chip:hover { color: var(--text); border-color: var(--border-strong); }
.fy2-chip.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.fy2-chip__count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fy2-chip.is-on .fy2-chip__count { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }
.fy2-chip--add { background: color-mix(in srgb, var(--cta) 12%, transparent); border-color: color-mix(in srgb, var(--cta) 35%, transparent); color: var(--cta); font-weight: 700; }
html.dark .fy2-chip--add { color: #8FB8FF; }
.fy2-chip--add:hover { background: color-mix(in srgb, var(--cta) 18%, transparent); color: var(--cta); }
.fy2-chip--toggle { border-style: dashed; background: transparent; color: var(--text-faint); }
.fy2-chip--quiet { border-style: dashed; background: transparent; color: var(--text-faint); font-weight: 500; cursor: default; }
.fy2-chip--quiet:hover { color: var(--text-faint); border-color: var(--border); }

.fy2-filterline { margin: -6px 0 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 14px; color: var(--text-muted); }
.fy2-filterline strong { color: var(--text); }
.fy2-linkbtn { border: 0; background: none; padding: 0; min-height: 32px; color: var(--cta) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html.dark .fy2-linkbtn { color: #8FB8FF !important; }

.fy2-section { margin: 0 0 12px; font-family: var(--hv2-display); font-size: 22px; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
.fy2-section__sub { margin: -6px 0 14px; font-size: 14px; color: var(--text-muted); }
.fy2-topup { margin-top: 40px; }

.fy2-empty { margin: 24px auto; max-width: 520px; padding: 40px 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 20px; }
.fy2-empty__title { margin: 0 0 6px; font-family: var(--hv2-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.fy2-empty__text { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }
.fy2-empty .hv2-btn { margin-top: 16px; }

/* ------------------------------------------------------------- feed */
.fy2-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 16px; }
.fy2-feed.is-rows { grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 900px; }
.fy2-section, .fy2-section__sub { max-width: none; }

/* The card: base = grid card. */
.fy2-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s var(--hv2-ease), box-shadow .15s var(--hv2-ease), border-color .15s var(--hv2-ease); }
@media (hover: hover) and (pointer: fine) {
    .fy2-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
}
.fy2-card.is-dim { opacity: .6; }
.fy2-card__media { position: relative; display: block; height: 230px; background: #FFFFFF; }
html:not(.dark) .fy2-card__media { border-bottom: 1px solid var(--divider); }
.fy2-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; display: block; }
.fy2-card__media img.is-placeholder { opacity: .5; }
.fy2-card__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 60%; }
.fy2-badge { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 6px; background: var(--gold-fill); color: var(--gold-ink); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

/* The reason and the age. */
.fy2-stamp { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; --dot: var(--text-faint); }
.fy2-stamp__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); flex-shrink: 0; }
.fy2-stamp.is-drop { --dot: var(--heat-hot); }
.fy2-stamp.is-new { --dot: var(--ok); }
.fy2-stamp.is-you { --dot: var(--cta); }
.fy2-stamp.is-overlay { position: absolute; top: 10px; right: 10px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--overlay-chip); color: #F3F5F9; font-size: 12px; }
.fy2-stamp.is-overlay.is-drop { --dot: #FF6A4D; }
.fy2-stamp.is-overlay.is-new { --dot: #4ADE80; }
.fy2-stamp.is-overlay.is-you { --dot: #8FB8FF; }
.fy2-stamp.is-inline { display: none; }
.fy2-stamp.is-inline.is-drop { color: var(--heat-hot); }
.fy2-stamp.is-inline.is-new { color: var(--ok); }
.fy2-pct-overlay { display: none; }

.fy2-card__main { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 0; min-width: 0; }
.fy2-card__merchant { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--text-faint); }
.fy2-card__title { margin: 0; font-size: 15.5px; line-height: 21px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.fy2-card__title a { text-decoration: none; }
.fy2-card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.fy2-card__price { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; min-width: 0; white-space: nowrap; }
/* One line: the five-across grid is ~220px a card, and the badge dropping
   under the price made rows of cards uneven. */
.fy2-price { font-size: 24px; }
.fy2-card__price .hv2-pct { flex-shrink: 0; height: 22px; padding: 0 6px; font-size: 12px; }
.fy2-card__price .hv2-was { font-size: 14px; }
.fy2-card__notes { display: flex; flex-wrap: wrap; gap: 6px; }
.fy2-note { font-size: 12px; min-height: 26px; }
.fy2-mono { font-family: var(--hv2-mono); letter-spacing: .06em; }

.fy2-card__actions { margin-top: auto; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px; }
.fy2-cta { height: 44px; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.fy2-cta--inline { display: none; }

/* Reactions: quiet until pressed. */
.fy2-react { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.fy2-react__btn { min-height: 36px; min-width: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text-faint); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: color .15s var(--hv2-ease), background-color .15s var(--hv2-ease); }
.fy2-react__btn:hover { color: var(--text); background: var(--surface-2); }
.fy2-react__btn svg { fill: none; }
.fy2-react__btn.is-like { margin-left: -8px; }
.fy2-react__btn.is-on { color: #EF4444; }
.fy2-react__btn.is-on svg { fill: currentColor; }
.fy2-react__btn.is-off { color: var(--text); background: var(--surface-2); font-weight: 600; }

/* Row view (desktop): image left, details middle, CTA and reactions right. */
.fy2-feed.is-rows .fy2-card { display: grid; grid-template-columns: 148px minmax(0, 1fr) 220px; grid-template-areas: "media main actions"; column-gap: 20px; padding: 14px; border-radius: 18px; }
.fy2-feed.is-rows .fy2-card__media { grid-area: media; height: 148px; border-radius: 12px; overflow: hidden; border: 1px solid var(--well-edge, var(--divider)); }
.fy2-feed.is-rows .fy2-card__media img { padding: 8px; }
.fy2-feed.is-rows .fy2-stamp.is-overlay { display: none; }
.fy2-feed.is-rows .fy2-stamp.is-inline { display: inline-flex; }
.fy2-feed.is-rows .fy2-card__main { grid-area: main; padding: 2px 0 0; gap: 6px; }
.fy2-feed.is-rows .fy2-card__title { font-size: 17px; line-height: 23px; min-height: 0; }
.fy2-feed.is-rows .fy2-card__actions { grid-area: actions; align-self: center; margin: 0; padding: 0; }

/* Phone: framed cards inset 12px like the homepage and the app, image left, 44px targets. */
@media (max-width: 639px) {
    .fy2-wrap { padding: 0 16px; }
    .fy2-hero__in { padding-top: 28px; padding-bottom: 22px; }
    .fy2-hero__title { font-size: 34px; }
    .fy2-hero__sub { margin-top: 8px; font-size: 15px; }
    .fy2-hero__actions { margin-top: 16px; }

    .fy2-toolbar__in { min-height: 0; padding-top: 12px; padding-bottom: 12px; flex-direction: column; align-items: stretch; gap: 8px; }
    .fy2-toolbar .hv2-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fy2-toolbar .hv2-tab { height: 40px; padding: 0 8px; }
    .fy2-toolbar .hv2-tab__hot { display: none !important; }
    .fy2-toolbar__right { justify-content: space-between; }
    .fy2-toolbar__count { font-size: 13px; color: var(--text-faint); }
    .fy2-viewtoggle { display: none; }

    .fy2-body { padding: 16px 0 48px; }
    .fy2-body > .fy2-starter, .fy2-body > .fy2-filterline, .fy2-body > .fy2-empty, .fy2-body .fy2-section, .fy2-body .fy2-section__sub { margin-left: 16px; margin-right: 16px; }
    .fy2-starter__btns { width: 100%; }
    .fy2-starter__btns .hv2-btn { flex: 1; }

    .fy2-chips { flex-wrap: nowrap; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; margin-bottom: 16px; }
    .fy2-chips::-webkit-scrollbar { display: none; }
    .fy2-chip { height: 44px; }

    /* Whatever the desktop choice, a phone gets the one phone card. */
    .fy2-feed, .fy2-feed.is-rows { display: flex; flex-direction: column; gap: 12px; max-width: none; margin-left: 12px; margin-right: 12px; }
    .fy2-card, .fy2-feed.is-rows .fy2-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); grid-template-areas: "media main" "actions actions"; column-gap: 14px; padding: 14px 14px 6px; border-radius: 16px; border: 1px solid var(--card-edge, var(--border)); box-shadow: var(--card-shadow, none); }
    .fy2-card:hover { transform: none; }
    .fy2-card__media, .fy2-feed.is-rows .fy2-card__media { grid-area: media; width: 128px; height: 128px; border-radius: 12px; overflow: hidden; border: 1px solid var(--divider); }
    .fy2-card__media img { padding: 6px; }
    .fy2-stamp.is-overlay, .fy2-feed.is-rows .fy2-stamp.is-overlay { display: none; }
    .fy2-stamp.is-inline, .fy2-feed.is-rows .fy2-stamp.is-inline { display: inline-flex; font-size: 12px; }
    .fy2-card__badges { top: 6px; left: 6px; }
    .fy2-badge { height: 20px; font-size: 10px; padding: 0 6px; }
    .fy2-pct-overlay { display: inline-flex; position: absolute; bottom: 6px; left: 6px; height: 22px; padding: 0 7px; font-size: 12px; }
    .fy2-pct-inline { display: none; }
    .fy2-card__main, .fy2-feed.is-rows .fy2-card__main { grid-area: main; padding: 0; gap: 5px; }
    .fy2-card__merchant { display: none; }
    .fy2-card__title, .fy2-feed.is-rows .fy2-card__title { font-size: 15px; line-height: 20px; min-height: 0; }
    .fy2-price { font-size: 26px; }
    .fy2-cta--inline { display: flex; margin-top: 4px; height: 40px; font-size: 14px; }
    .fy2-card__actions, .fy2-feed.is-rows .fy2-card__actions { grid-area: actions; margin: 0; padding: 4px 0 0; align-self: auto; }
    .fy2-card__actions > .fy2-cta { display: none; }
    .fy2-react__btn { min-height: 44px; min-width: 44px; }

    .hv2-more { padding: 8px 16px 0; }
    .hv2-btn--more { width: 100%; }
}
@media (max-width: 359px) {
    .fy2-card, .fy2-feed.is-rows .fy2-card { grid-template-columns: 108px minmax(0, 1fr); column-gap: 12px; }
    .fy2-card__media, .fy2-feed.is-rows .fy2-card__media { width: 108px; height: 108px; }
    .fy2-price { font-size: 23px; }
}

/* ---------------------------------------------------------- picker */
.fy-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; font-family: var(--hv2-font); color: var(--text); }
.fy-modal-back { position: absolute; inset: 0; background: rgba(6, 8, 12, .6); }
.fy-panel { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 44rem; max-height: 92vh; overflow: hidden; border-radius: 20px 20px 0 0; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lift); padding-bottom: env(safe-area-inset-bottom); }
.fy-panel h2 { font-family: var(--hv2-display); letter-spacing: -.015em; }
.fy-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
@media (min-width: 640px) {
    .fy-modal { align-items: center; padding: 24px; }
    .fy-panel { max-height: 86vh; border-radius: 20px; }
}
.fy-tap { min-height: 44px; }
.fy-chip { min-height: 44px; }
.fy-size { min-height: 44px; min-width: 52px; }
.fy-10 { font-size: 10px; }
.fy-dim:disabled { opacity: .5; cursor: default; }
.fy-muted { color: var(--text-muted); }
.fy-strong { color: var(--text); }
.fy-soft { background: var(--surface-inset); border: 1px solid var(--border); }
.fy-dashed { border: 1px dashed var(--border-strong); background: transparent; }
.fy-field { background: var(--surface-inset); border: 1px solid var(--border-strong); color: var(--text); font-family: inherit; }
.fy-field:focus { outline: 2px solid var(--cta); outline-offset: -1px; }
.fy-input::placeholder { color: var(--text-faint); }
.fy-btn { background: var(--cta); color: var(--cta-text); border: 0; cursor: pointer; }
.fy-btn:hover:not(:disabled) { background: var(--cta-hover); }
.fy-btn-dark { background: var(--text); color: var(--bg); border: 0; cursor: pointer; }
.fy-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); font-weight: 600; white-space: nowrap; cursor: pointer; }
.fy-pill:hover { border-color: var(--border-strong); color: var(--text); }
.fy-pill.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.fy-panel input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--cta); }
@media (max-width: 767px) {
    .fy-panel input, .fy-panel select, .fy-panel textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .fy2 *, .fy2 *::before, .fy2 *::after, .fy-modal * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .fy2-card:hover { transform: none; }
}

/* ===== "Get the most from For You" sidebar (2026-10-01) =====
   Sign in, set your sizes, your Aura. A right column on desktop, a card above
   the feed on a phone (left out there while another prompt is asking, and
   once everything is done). */
.fy2-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.fy2-maincol { min-width: 0; }
.fy2-side { order: -1; }
.fy2-side.is-phone-hidden { display: none; }
@media (min-width: 1100px) {
    .fy2-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
    .fy2-side, .fy2-side.is-phone-hidden { display: block; order: 0; position: sticky; top: 88px; }
}
.fy2-journey { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.fy2-journey__title { margin: 0 0 12px; font-family: var(--hv2-display); font-size: 17px; font-weight: 700; color: var(--text); }
.fy2-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); }
.fy2-step:first-of-type { border-top: 0; padding-top: 0; }
.fy2-step__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.fy2-step.is-done .fy2-step__dot { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-edge); }
.fy2-step--aura .fy2-step__dot { background: var(--gold-soft); border-color: var(--gold-edge); font-size: 14px; }
.fy2-step__name { margin: 3px 0 2px; font-size: 14.5px; font-weight: 700; color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fy2-step.is-done .fy2-step__name { color: var(--text-muted); }
.fy2-step__xp { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-edge); }
.fy2-step__text { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.fy2-step__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fy2-step__btns .fy2-btn { min-height: 40px; }
.fy2-link { display: inline-block; margin-top: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--cta); cursor: pointer; text-decoration: none; }
.fy2-link:hover { text-decoration: underline; }
@media (max-width: 639px) {
    .fy2-side { margin: 0 16px; }
}
