/* =====================================================================
   Lifehaki — /lists curated feed  (body.lh-lists-home)

   Everything is prefixed `.lf-*` and lives only on this page, loaded by
   templates/layout.php when bodyClass carries `lh-lists-home`. Same
   pattern as lifehaki-ranking.css / lifehaki-blog.css.

   Palette is the Lifehaki editorial set: ink masthead, paper page,
   red actions, gold accents. Kept local to the sheet so this page can be
   re-toned without touching the global tokens.
   ===================================================================== */

body.lh-lists-home {
    --lf-ink:    #15171c;
    --lf-paper:  #f5f5f9;
    --lf-card:   #ffffff;
    --lf-red:    #ca2128;
    --lf-red-d:  #a81a20;
    --lf-gold:   #fdc949;
    --lf-text:   #20242b;
    --lf-muted:  #565d68;
    --lf-muted2: #767d89;
    --lf-faint:  #9aa0ab;
    --lf-line:   #e3e3ea;
    --lf-line2:  #d2d3dc;
    --lf-chip:   #f0f0f5;
    --lf-ease:   cubic-bezier(.16, 1, .3, 1);
    background: var(--lf-paper);
}

.lf {
    width: 100%;
    overflow-x: clip;
    font-family: 'Urbanist', system-ui, sans-serif;
    color: var(--lf-text);
    background: var(--lf-paper);
}

.lf-wrap { max-width: 1240px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.lf-mono { font-family: 'DM Mono', ui-monospace, monospace; }
.lf-controls-spacer { flex: 1; }
.lf-sep, .lf-dot { color: #c4c8d0; }
.lf-dot { width: 3px; height: 3px; border-radius: 50%; background: #c4c8d0; display: inline-block; }

/* ---------- Masthead ---------- */
.lf-mast { position: relative; overflow: hidden; background: var(--lf-ink); }
.lf-mast-glow { position: absolute; border-radius: 50%; pointer-events: none; }
.lf-mast-glow-a {
    top: -170px; right: -110px; width: 540px; height: 540px;
    background: radial-gradient(circle, rgba(253, 201, 73, .22), rgba(253, 201, 73, 0) 70%);
}
.lf-mast-glow-b {
    bottom: -190px; left: -140px; width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(202, 33, 40, .20), rgba(202, 33, 40, 0) 70%);
}
.lf-mast-inner {
    position: relative; z-index: 2;
    padding-top: 54px; padding-bottom: 34px;
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 40px; flex-wrap: wrap;
}
.lf-mast-copy { max-width: 660px; }
.lf-ticker {
    display: flex; align-items: center; gap: 11px; margin-bottom: 18px;
    font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px;
    letter-spacing: .14em; text-transform: uppercase; color: var(--lf-gold);
}
.lf-pulse {
    width: 7px; height: 7px; border-radius: 50%; background: #2f8f5b; flex-shrink: 0;
    animation: lf-pulse 2.2s infinite;
}
@keyframes lf-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(47, 143, 91, .55); }
    70%  { box-shadow: 0 0 0 7px rgba(47, 143, 91, 0); }
    100% { box-shadow: 0 0 0 0   rgba(47, 143, 91, 0); }
}
@media (prefers-reduced-motion: reduce) { .lf-pulse { animation: none; } }

.lf-mast-title {
    font-family: 'Fraunces', Georgia, serif; font-weight: 900;
    font-size: clamp(38px, 6vw, 60px); line-height: .96; letter-spacing: -.025em;
    color: #fff; margin: 0 0 16px;
}
.lf-mast-title em { color: var(--lf-gold); font-style: italic; }
.lf-mast-sub { font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, .78); margin: 0; max-width: 520px; text-wrap: pretty; }

.lf-mast-stats { display: flex; gap: 38px; padding-bottom: 8px; }
.lf-stat-n { font-family: 'DM Mono', ui-monospace, monospace; font-size: 30px; line-height: 1; color: #fff; }
.lf-stat-n.is-gold { color: var(--lf-gold); }
.lf-stat-k {
    font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 12px;
    letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin-top: 7px;
}

/* ---------- Sticky controls ---------- */
.lf-controls {
    position: sticky; top: 0; z-index: 30;
    background: rgba(245, 245, 249, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lf-line);
}
.lf-controls-inner {
    padding-top: 12px; padding-bottom: 12px;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.lf-tabs { display: flex; align-items: flex-end; gap: 2px; flex-wrap: wrap; }
.lf-tab {
    height: 40px; padding: 0 16px; display: inline-flex; align-items: center;
    font-weight: 700; font-size: 15px; white-space: nowrap; text-decoration: none;
    color: var(--lf-faint); border-bottom: 3px solid transparent;
    transition: color 120ms, border-color 120ms;
}
.lf-tab:hover { color: var(--lf-text); }
.lf-tab.is-active { color: var(--lf-ink); border-bottom-color: var(--lf-red); }

/* Sort menu — native <details>, so it works with JS off. */
.lf-sort { position: relative; }
.lf-sort-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
    border-radius: 999px; border: 1.5px solid var(--lf-line2); background: #fff;
    color: var(--lf-text); font-weight: 600; font-size: 14px; cursor: pointer;
    list-style: none; white-space: nowrap;
}
.lf-sort-btn::-webkit-details-marker { display: none; }
.lf-sort-lead { color: var(--lf-muted2); font-weight: 500; }
.lf-sort[open] .lf-sort-caret { transform: rotate(180deg); }
.lf-sort-menu {
    position: absolute; top: 46px; right: 0; z-index: 40; min-width: 194px;
    background: #fff; border: 1px solid var(--lf-line); border-radius: 14px;
    box-shadow: 0 12px 34px rgba(21, 23, 40, .16); padding: 6px;
    display: flex; flex-direction: column;
}
.lf-sort-opt {
    text-align: left; padding: 9px 12px; border-radius: 9px; text-decoration: none;
    font-weight: 600; font-size: 14px; color: var(--lf-text); transition: background 120ms;
}
.lf-sort-opt:hover { background: var(--lf-chip); }
.lf-sort-opt.is-active { background: var(--lf-chip); color: var(--lf-red); }

/* ---------- Buttons ---------- */
.lf-cta-red {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px;
    border-radius: 999px; background: var(--lf-red); color: #fffdf8;
    font-weight: 700; font-size: 15px; text-decoration: none; border: 0; cursor: pointer;
    box-shadow: 0 6px 18px rgba(202, 33, 40, .32);
    transition: transform 120ms var(--lf-ease), background 120ms;
}
.lf-cta-red:hover { background: var(--lf-red-d); color: #fffdf8; transform: translateY(-2px); }
.lf-controls-inner .lf-cta-red { height: 38px; padding: 0 18px; font-size: 14px; }

.lf-cta-ink {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px;
    border-radius: 999px; background: var(--lf-ink); color: #fff;
    font-weight: 700; font-size: 15px; text-decoration: none;
    transition: transform 120ms var(--lf-ease), background 120ms;
}
.lf-cta-ink:hover { background: var(--lf-red); color: #fff; transform: translateY(-2px); }

.lf-cta-outline {
    display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px;
    border-radius: 999px; border: 2px solid var(--lf-ink); background: #fff;
    color: var(--lf-ink); font-weight: 700; font-size: 15px; text-decoration: none;
    box-shadow: 4px 4px 0 var(--lf-ink);
    transition: transform 120ms var(--lf-ease), box-shadow 120ms;
}
.lf-cta-outline:hover { color: var(--lf-ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--lf-red); }

/* ---------- Poster fan ---------- */
/* --lf-ov is the overlap; the card's :hover shrinks it so the fan spreads. */
.lf-fan { display: flex; padding: 4px 0; --lf-ov: 30px; --lf-lift: 0px; --lf-rot: 0; min-width: 0; }
.lf-poster {
    position: relative; flex-shrink: 0; border-radius: 10px; overflow: hidden;
    border: 2px solid #fff; box-shadow: 0 3px 12px rgba(21, 23, 40, .18);
    background-size: cover; background-position: center 18%;
    transition: margin-left 220ms var(--lf-ease), transform 220ms var(--lf-ease);
}
.lf-poster + .lf-poster { margin-left: calc(-1 * var(--lf-ov)); }
.lf-fan-sm .lf-poster { width: 88px;  height: 132px; }
.lf-fan-lg .lf-poster { width: 104px; height: 156px; }
.lf-poster-label {
    position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 8px;
    padding-right: calc(var(--lf-ov) + 6px);
    background: linear-gradient(160deg, rgba(21, 23, 40, .16), rgba(21, 23, 40, .44));
    font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 11px; line-height: 1.1;
    color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
    overflow-wrap: anywhere; hyphens: auto;
    transition: padding-right 220ms var(--lf-ease);
}
/* A poster-less entry falls back to its title — clamp it so a long one
   doesn't fill the whole tile. */
.lf-poster-label > span {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    line-clamp: 3; overflow: hidden;
}
.lf-fan-lg .lf-poster-label { font-size: 13px; }
.lf-poster:last-child .lf-poster-label { padding-right: 8px; }

/* Spread + tilt on hover (spotlight fan is spread at rest). */
.lf-card:hover .lf-fan, .lf-spot .lf-fan { --lf-ov: 6px; --lf-lift: -5px; --lf-rot: 1; }
.lf-card:hover .lf-poster, .lf-spot .lf-poster { transform: translateY(var(--lf-lift)); }
.lf-card:hover .lf-poster:nth-child(1), .lf-spot .lf-poster:nth-child(1) { transform: translateY(var(--lf-lift)) rotate(-2.8deg); }
.lf-card:hover .lf-poster:nth-child(2), .lf-spot .lf-poster:nth-child(2) { transform: translateY(var(--lf-lift)) rotate(-1.4deg); }
.lf-card:hover .lf-poster:nth-child(4), .lf-spot .lf-poster:nth-child(4) { transform: translateY(var(--lf-lift)) rotate(1.4deg); }
.lf-card:hover .lf-poster:nth-child(5), .lf-spot .lf-poster:nth-child(5) { transform: translateY(var(--lf-lift)) rotate(2.8deg); }

/* ---------- Spotlight ---------- */
.lf-spot-wrap { padding-top: 40px; padding-bottom: 8px; }
.lf-spot {
    background: #fff; border: 2px solid var(--lf-ink); border-radius: 14px;
    box-shadow: 6px 6px 0 var(--lf-red); padding: 32px 34px;
    display: flex; align-items: center; gap: 38px; flex-wrap: wrap;
}
.lf-spot-art { min-width: 0; }
.lf-spot-body { flex: 1; min-width: 320px; }
.lf-spot-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.lf-spot-kicker .lf-mono { font-size: 13px; color: var(--lf-muted2); }
.lf-chip-gold {
    font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px;
    letter-spacing: .14em; text-transform: uppercase;
    background: var(--lf-gold); color: var(--lf-ink); padding: 4px 10px; border-radius: 999px;
}
.lf-spot-title {
    font-family: 'Fraunces', Georgia, serif; font-weight: 900;
    font-size: clamp(28px, 3.4vw, 38px); line-height: 1.02; letter-spacing: -.02em;
    margin: 0 0 12px; text-wrap: pretty;
}
.lf-spot-title a { color: var(--lf-ink); text-decoration: none; }
.lf-spot-title a:hover { color: var(--lf-red); }
.lf-spot-blurb { font-size: 16px; line-height: 1.55; color: var(--lf-muted); margin: 0 0 22px; max-width: 560px; text-wrap: pretty; }
.lf-spot-foot { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.lf-spot-stats { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--lf-muted); flex-wrap: wrap; }

/* ---------- Curator chips ---------- */
.lf-curator { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.lf-curator-sm { gap: 9px; }
.lf-curator-name { display: block; font-weight: 700; font-size: 15px; color: var(--lf-ink); line-height: 1.2; text-decoration: none; }
.lf-curator-sm .lf-curator-name { font-size: 14px; color: var(--lf-text); }
.lf-curator:hover .lf-curator-name, a.lf-curator-name:hover { color: var(--lf-red); }
.lf-curator-meta { display: block; font-size: 12px; color: var(--lf-faint); margin-top: 3px; }
.lf-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    border-radius: 999px; object-fit: cover; color: var(--lf-gold);
    font-family: 'Fraunces', Georgia, serif; font-weight: 800;
}
.lf-avatar-sm { width: 30px; height: 30px; font-size: 13px; }
.lf-avatar-md { width: 38px; height: 38px; font-size: 16px; }
.lf-avatar-lg { width: 40px; height: 40px; font-size: 17px; box-shadow: 0 0 0 2px var(--lf-red), 0 0 0 4px #fff; }

/* ---------- Main grid ---------- */
.lf-main {
    padding-top: 34px; padding-bottom: 10px;
    display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start;
}
.lf-col { min-width: 0; }
.lf-sec-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    margin-bottom: 22px; padding-bottom: 14px; border-bottom: 2px solid var(--lf-ink);
}
.lf-sec-title { font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 26px; letter-spacing: -.015em; margin: 0; }
.lf-sec-head .lf-mono { font-size: 13px; color: var(--lf-muted2); white-space: nowrap; }

.lf-feed { display: flex; flex-direction: column; gap: 22px; }
.lf-card {
    background: #fff; border: 1px solid var(--lf-line); border-radius: 20px; overflow: hidden;
    box-shadow: 0 2px 14px rgba(21, 23, 40, .06);
    transition: transform 200ms var(--lf-ease), box-shadow 200ms, border-color 200ms;
}
.lf-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(21, 23, 40, .14); border-color: var(--lf-line2); }
.lf-card-art {
    display: flex; align-items: center; padding: 18px 22px 14px;
    background: #f7f7fb; border-bottom: 1px solid #eeeef3; overflow: hidden; text-decoration: none;
}
.lf-card-count { margin-left: auto; padding-left: 16px; font-size: 12px; color: var(--lf-faint); white-space: nowrap; }
.lf-card-body { padding: 18px 22px 20px; display: flex; gap: 22px; align-items: flex-start; }
.lf-rank { font-size: 22px; color: #c4c8d0; line-height: 1; padding-top: 4px; width: 36px; flex-shrink: 0; }
.lf-card-main { flex: 1; min-width: 0; }
.lf-card-tags { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; flex-wrap: wrap; }
.lf-pill {
    display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
    font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 12px;
    letter-spacing: .12em; text-transform: uppercase;
}
.lf-pill-red  { background: #fbe4e5; color: var(--lf-red); }
.lf-pill-gold { background: #fef2d4; color: #8a6410; }
.lf-pill-ink  { background: #ececf1; color: #3a4048; }
.lf-ranked {
    font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 12px;
    letter-spacing: .12em; text-transform: uppercase; color: var(--lf-faint);
}
.lf-card-title {
    font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 24px;
    line-height: 1.12; letter-spacing: -.015em; margin: 0 0 8px; text-wrap: pretty;
}
.lf-card-title a { color: var(--lf-ink); text-decoration: none; }
.lf-card:hover .lf-card-title a { color: var(--lf-red); }
.lf-card-blurb { font-size: 15px; line-height: 1.5; color: var(--lf-muted2); margin: 0 0 16px; text-wrap: pretty; }
.lf-card-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lf-when { font-size: 12px; color: var(--lf-faint); }

.lf-like {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px;
    border-radius: 999px; border: 0; cursor: pointer; background: transparent;
    font-family: inherit; font-weight: 700; font-size: 13px; color: var(--lf-muted2);
    transition: background 120ms, color 120ms;
}
.lf-like:hover { background: var(--lf-chip); color: var(--lf-red); }
.lf-like.is-on { background: #fbe4e5; color: var(--lf-red); }
.lf-comments {
    display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px;
    color: var(--lf-muted2); text-decoration: none;
}
.lf-comments:hover { color: var(--lf-red); }
.lf-bookmark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 999px; color: var(--lf-faint);
}

.lf-more { display: flex; justify-content: center; padding: 36px 0 8px; }
.lf-empty {
    background: #fff; border: 1px dashed var(--lf-line2); border-radius: 20px;
    padding: 44px 24px; text-align: center; color: var(--lf-muted);
}
.lf-empty p { margin: 0 0 14px; }

/* ---------- Right rail ---------- */
.lf-rail { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 82px; }
.lf-panel {
    background: #fff; border: 1px solid var(--lf-line); border-radius: 20px; padding: 22px;
    box-shadow: 0 2px 14px rgba(21, 23, 40, .06);
}
.lf-panel-head {
    display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
    font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--lf-ink);
    padding-bottom: 8px; margin-bottom: 18px;
}
.lf-underline-red  { border-bottom: 2.5px solid var(--lf-red); }
.lf-underline-gold { border-bottom: 2.5px solid var(--lf-gold); }

.lf-curator-list { display: flex; flex-direction: column; gap: 16px; }
.lf-curator-row { display: flex; align-items: center; gap: 12px; }
.lf-curator-id { flex: 1; min-width: 0; }
.lf-follow {
    height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer;
    display: inline-flex; align-items: center; text-decoration: none;
    font-family: inherit; font-weight: 700; font-size: 13px;
    background: var(--lf-ink); color: #fff; border: 1.5px solid var(--lf-ink);
    transition: background 120ms, color 120ms, border-color 120ms;
}
.lf-follow:hover { background: var(--lf-red); border-color: var(--lf-red); color: #fff; }
.lf-follow.is-on { background: #ececf1; color: var(--lf-muted); border-color: var(--lf-line); }
.lf-follow.is-on:hover { background: #fbe4e5; color: var(--lf-red); border-color: #fbe4e5; }

.lf-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-topic {
    display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 999px;
    background: var(--lf-chip); color: var(--lf-muted); font-weight: 600; font-size: 13px;
    text-decoration: none; transition: background 120ms, color 120ms;
}
.lf-topic:hover { background: var(--lf-ink); color: var(--lf-gold); }

.lf-panel-dark { background: var(--lf-ink); border-color: var(--lf-ink); padding: 24px; position: relative; overflow: hidden; }
.lf-panel-glow {
    position: absolute; top: -70px; right: -50px; width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(253, 201, 73, .26), rgba(253, 201, 73, 0) 70%);
}
.lf-panel-dark-inner { position: relative; }
.lf-dark-title { font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 23px; line-height: 1.14; color: #fff; margin-bottom: 10px; }
.lf-dark-title em { color: var(--lf-gold); font-style: italic; }
.lf-dark-sub { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .72); margin: 0 0 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .lf-main { grid-template-columns: minmax(0, 1fr); }
    .lf-rail { position: static; }
}
@media (max-width: 760px) {
    .lf-wrap { padding-left: 18px; padding-right: 18px; }
    .lf-mast-inner { padding-top: 34px; padding-bottom: 26px; }
    .lf-mast-stats { gap: 24px; }
    .lf-stat-n { font-size: 24px; }
    .lf-controls-inner { gap: 10px; }
    .lf-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .lf-tabs::-webkit-scrollbar { display: none; }
    /* Stack the spotlight and re-overlap its fan — spread at 5 x 104px it
       is wider than a phone, which would squeeze the copy to nothing. */
    .lf-spot { padding: 22px; gap: 22px; flex-direction: column; align-items: stretch; }
    .lf-spot-art { max-width: 100%; overflow: hidden; }
    .lf-spot .lf-fan { --lf-ov: 26px; }
    .lf-spot-body { min-width: 0; }
    .lf-spot-foot { gap: 14px; }
    .lf-sec-head { flex-wrap: wrap; }
    .lf-fan-lg .lf-poster { width: 74px; height: 111px; }
    .lf-fan-sm .lf-poster { width: 64px; height: 96px; }
    .lf-card-body { padding: 16px; gap: 12px; }
    .lf-card-art { padding: 14px 16px 12px; }
    .lf-rank { width: 26px; font-size: 18px; }
    .lf-card-title { font-size: 20px; }
    .lf-sort-menu { right: auto; left: 0; }
}
