/* ===== For You (frontend/js/for-you.js) =====
 * A marketing feed for the Manhattan ecosystem, ranked by configuration fit.
 * Rides the app tokens (app.css / theme-dark.css) with fallbacks; the few
 * tints are Veridian brand colours. Prefix: fy- */
.fy { --fy-navy: var(--primary, #253378); --fy-mblue: var(--primary-light, #474ecb); --fy-orange: #d9531a; --fy-orange-h: #dd4e16;
  --fy-blue: #5398f6; --fy-green: #3cc69a; --fy-lblue: #d7e9ff; --fy-lgreen: #c6ebdb; --fy-lorange: #ffd09e; --fy-tint: #f3f9fe; --fy-ink: #161c4f;
  --fy-border: var(--border-light, #e3eaf6); --fy-card: var(--bg-card, #fff); --fy-text: var(--text, #161c4f); --fy-muted: var(--text-secondary, #676865);
  display: flex; flex-direction: column; gap: 20px; max-width: 1240px; }
[data-theme="dark"] .fy { --fy-lblue: rgba(83,152,246,.18); --fy-lgreen: rgba(60,198,154,.18); --fy-lorange: rgba(255,208,158,.22); --fy-tint: rgba(255,255,255,.04); --fy-ink: var(--text, #e6e8f0); }
.fy h2, .fy h3, .fy p { margin: 0; }
.fy-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fy-chip-btn { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--fy-border); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; background: var(--fy-card); color: var(--fy-navy); }
.fy-chip-btn.on { background: var(--fy-navy); color: #fff; border-color: var(--fy-navy); }
.fy-count { margin-left: auto; font-size: 12.5px; color: var(--fy-muted); }
.fy-count a { color: var(--fy-mblue); }
.fy-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.fy-c4 { grid-column: span 4; } .fy-c6 { grid-column: span 6; } .fy-c8 { grid-column: span 8; } .fy-c12 { grid-column: span 12; }
.fy-card { background: var(--fy-card); border: 1px solid var(--fy-border); border-radius: 12px; box-shadow: var(--shadow-sm, 0 8px 24px rgba(31,36,82,.08)); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.fy-card.fy-sponsored { border-color: var(--fy-lorange); }
.fy-body { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.fy-card h2 { font-size: 23px; line-height: 32px; font-weight: 700; color: var(--fy-navy); letter-spacing: .2px; }
.fy-card h3 { font-size: 16.5px; line-height: 24px; font-weight: 700; color: var(--fy-navy); }
.fy-card h2 a, .fy-card h3 a { color: inherit; text-decoration: none; }
.fy-card h2 a:hover, .fy-card h3 a:hover { color: var(--fy-mblue); }
.fy-card p { font-size: 13.5px; line-height: 21px; color: var(--fy-muted); }
.fy-card p.fy-fine { font-size: 12px; line-height: 18px; }
.fy-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fy-kind { font-size: 12px; font-weight: 500; color: var(--fy-muted); }
.fy-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; color: var(--fy-ink); }
.fy-tag-manh { background: var(--fy-navy); color: #fff; } .fy-tag-ver { background: var(--fy-lorange); } .fy-tag-cust { background: var(--fy-lgreen); } .fy-tag-comm { background: var(--fy-lblue); }
.fy-tag-spon { background: transparent; color: var(--fy-muted); border: 1px dashed var(--fy-muted); }
.fy-fit { margin-left: auto; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--fy-lgreen); color: var(--fy-ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.fy-fit.mid { background: var(--fy-lblue); } .fy-fit.low { background: var(--fy-tint); border: 1px solid var(--fy-border); }
.fy-media { position: relative; display: block; width: 100%; background: var(--fy-lblue); overflow: hidden; height: 180px; text-decoration: none; }
.fy-media.tall { height: 280px; } .fy-media.short { height: 160px; } .fy-media.contain { background: var(--fy-tint); }
.fy-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fy-media.contain img { object-fit: contain; padding: 10px; }
.fy-play { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: var(--fy-orange); box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.fy-dur { position: absolute; right: 12px; top: 12px; background: rgba(22,28,79,.85); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.fy-why { display: flex; gap: 10px; align-items: flex-start; background: var(--fy-lblue); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 19px; color: var(--fy-ink); }
.fy-why svg { flex: none; margin-top: 1px; }
.fy-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fy-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--fy-tint); border: 1px solid var(--fy-border); font-size: 11.5px; font-weight: 600; color: var(--fy-navy); }
.fy-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
.fy-btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 18px; border-radius: 999px; font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.fy-btn-primary { background: var(--fy-orange); color: #fff; border-color: var(--fy-orange); } .fy-btn-primary:hover { background: var(--fy-orange-h); border-color: var(--fy-orange-h); color: #fff; }
.fy-btn-outline { background: var(--fy-card); color: var(--fy-mblue); border-color: var(--fy-mblue); } .fy-btn-outline:hover { background: var(--fy-tint); color: var(--fy-navy); border-color: var(--fy-navy); }
.fy-foot { display: flex; gap: 4px; align-items: center; border-top: 1px solid var(--fy-border); padding: 6px 12px; flex-wrap: wrap; }
.fy-icon-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 999px; border: 0; background: transparent; color: var(--fy-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.fy-icon-btn:hover { background: var(--fy-tint); color: var(--fy-navy); }
.fy-react { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--fy-muted); }
.fy-quote { font-size: 15.5px; line-height: 25px; font-weight: 500; color: var(--fy-ink); }
.fy-author { display: flex; gap: 12px; align-items: center; }
.fy-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--fy-lblue); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--fy-navy); flex: none; }
.fy-bars { display: flex; flex-direction: column; gap: 10px; }
.fy-bar-l { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--fy-navy); margin-bottom: 4px; }
.fy-bar { height: 10px; border-radius: 999px; background: var(--fy-tint); overflow: hidden; }
.fy-bar span { display: block; height: 100%; border-radius: 999px; }
.fy-tone-a { background: var(--fy-mblue); } .fy-tone-b { background: var(--fy-blue); } .fy-tone-good { background: var(--fy-green); } .fy-tone-hot { background: var(--fy-orange); }
.fy-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.fy-stat { display: flex; flex-direction: column; gap: 2px; }
.fy-stat b { font-size: 24px; line-height: 28px; font-weight: 700; color: var(--fy-navy); letter-spacing: -.3px; }
.fy-stat b.good { color: var(--fy-green); }
.fy-stat span { font-size: 11px; font-weight: 600; color: var(--fy-muted); }
.fy-row { display: flex; gap: 16px; align-items: flex-start; }
.fy-thumb { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; flex: none; background: var(--fy-tint); }
.fy-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.fy-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fy-tiles div { display: flex; align-items: center; gap: 8px; background: var(--fy-tint); border-radius: 8px; padding: 8px; font-size: 11px; font-weight: 700; color: var(--fy-navy); line-height: 14px; }
.fy-tiles img { width: 28px; height: 28px; }
.fy-meter { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--fy-tint); border-radius: 8px; }
.fy-chart svg { display: block; width: 100%; font-family: inherit; }
.fy-empty { grid-column: span 12; text-align: center; padding: 40px; }
.fy-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding-top: 4px; font-size: 12px; color: var(--fy-muted); }
/* story */
.fy-crumb { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--fy-muted); flex-wrap: wrap; }
.fy-crumb a { color: var(--fy-navy); text-decoration: none; font-weight: 700; }
.fy-story { display: flex; flex-wrap: wrap; gap: 28px; }
.fy-article { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.fy-rail { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.fy-article h1 { margin: 0; font-size: 32px; line-height: 42px; font-weight: 700; color: var(--fy-navy); letter-spacing: .3px; }
.fy-lede { font-size: 16px; line-height: 27px; color: var(--fy-ink); }
.fy-hero { position: relative; border-radius: 12px; overflow: hidden; height: 320px; background: var(--fy-lblue); }
.fy-hero.contain { background: var(--fy-tint); }
.fy-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fy-hero.contain img { object-fit: contain; padding: 20px; }
.fy-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px; background: rgba(22,28,79,.82); color: #fff; font-size: 12px; font-weight: 600; }
.fy-panel { background: var(--fy-lblue); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.fy-panel .fy-eyebrow { color: var(--fy-orange); }
.fy-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; color: var(--fy-orange); text-transform: uppercase; }
.fy-panel h3 { font-size: 20px; line-height: 28px; color: var(--fy-navy); }
.fy-panel p { color: var(--fy-ink); font-size: 14px; line-height: 23px; }
.fy-white { background: var(--fy-card); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.fy-band { display: flex; gap: 20px; align-items: center; background: var(--fy-lblue); border-radius: 12px; padding: 16px 20px; flex-wrap: wrap; }
.fy-band b { color: var(--fy-navy); font-size: 15px; }
.fy-rail .fy-card { padding: 18px 20px; gap: 10px; }
.fy-score { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; font-size: 10.5px; color: var(--fy-muted); font-weight: 600; }
.fy-score div { background: var(--fy-tint); border-radius: 6px; padding: 6px 8px; border: 1px solid var(--fy-border); }
.fy-score b { display: block; color: var(--fy-navy); font-size: 13px; }
.fy-related { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--fy-border); text-decoration: none; color: var(--fy-navy); font-size: 13px; font-weight: 600; }
.fy-related:last-child { border-bottom: 0; }
.fy-related .sw { width: 56px; height: 44px; border-radius: 8px; flex: none; overflow: hidden; background: var(--fy-lblue); }
.fy-related .sw img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fy-related span.t { flex: 1; }
@media (max-width: 1100px) { .fy-c4 { grid-column: span 6; } .fy-c8 { grid-column: span 12; } }
@media (max-width: 760px) { .fy-c4, .fy-c6, .fy-c8 { grid-column: span 12; } .fy-article h1 { font-size: 26px; line-height: 34px; } .fy-rail { max-width: none; } .fy-hero { height: 220px; } }
