/* GENM homepage (Home preview template)
/* ----------------------------------------------------------
Loaded only by home.hbs, custom-home-preview.hbs and custom-research.hbs. Every rule is scoped to
.genm-home (the page's main element), so no other page changes.
The footer's styles are in genm-footer.css (every page).
Colors and fonts come only from genm-tokens.css. Headlines use
Source Serif 4, text uses Inter, figures use IBM Plex Mono with
tabular numbers (.genm-figures). Nothing here animates.
Sizes are in px because Source sets the root font size to 10px.
*/

/* ---------- shared ---------- */
.genm-home {
    font-family: var(--genm-font-sans);
    color: var(--genm-navy);
}

.genm-home * {
    box-sizing: border-box;
}

.genm-home-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.genm-home-section {
    margin: 0 auto 56px;
}

.genm-home-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 max(4vw, 16px);
}

.genm-home .genm-home-h2 {
    margin: 0 0 20px;
    font-family: var(--genm-font-serif);
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--genm-navy);
}

.genm-home .genm-home-lede {
    margin: -8px 0 20px;
    font-size: 16px;
    line-height: 1.5;
}

.genm-home .genm-home-small {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.55;
    color: color-mix(in srgb, var(--genm-navy) 80%, transparent);
}

.genm-home ul[role="list"] {
    margin: 0;
    padding: 0;
    list-style: none;
}

.genm-home a:focus-visible {
    outline: 2px solid var(--genm-gold);
    outline-offset: 2px;
}

/* The sphere band sits right under the navigation */
.genm-home .genm-sphere-band {
    margin-bottom: 40px;
}

/* ---------- C. pace band ---------- */
.genm-home-pace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--genm-navy);
}

.genm-home-pace-item {
    min-width: 0;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--genm-navy-panel);
}

.genm-home-pace-item dt {
    font-size: 13px;
    line-height: 1.4;
    color: var(--genm-muted);
}

.genm-home-pace-item dd {
    margin: 0;
}

.genm-home-pace .genm-home-pace-value {
    margin-top: 6px;
    font-size: clamp(22px, 5vw, 28px);
    font-weight: 500;
    line-height: 1.2;
    color: var(--genm-gold);
    overflow-wrap: anywhere;
}

.genm-home-pace .genm-home-pace-label {
    margin-top: 6px;
    font-size: 11px;
    color: var(--genm-cream);
}

/* ---------- D. featured tools ---------- */
.genm-home-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.genm-home-tool {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px 18px 20px;
    border: 1px solid color-mix(in srgb, var(--genm-navy) 18%, transparent);
    border-top: 3px solid var(--genm-gold);
    border-radius: 8px;
}

.genm-home .genm-home-tool-id {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 500;
    color: color-mix(in srgb, var(--genm-navy) 75%, transparent);
}

.genm-home .genm-home-tool-name {
    margin: 0 0 8px;
    font-family: var(--genm-font-serif);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--genm-navy);
}

.genm-home .genm-home-tool-name a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--genm-gold);
    text-underline-offset: 3px;
}

.genm-home .genm-home-tool-desc {
    flex-grow: 1;
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.5;
}

.genm-home .genm-home-tag {
    align-self: flex-start;
    margin: 0;
    padding: 3px 10px;
    border-radius: 8px;
    background: var(--genm-navy);
    color: var(--genm-gold);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ---------- E. latest research ---------- */
.genm-home-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 20px;
}

.genm-home-head .genm-home-h2 {
    margin-bottom: 0;
}

.genm-home .genm-home-more {
    font-size: 15px;
    font-weight: 600;
    color: var(--genm-navy);
    text-decoration: underline;
    text-decoration-color: var(--genm-gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Research cards (partials/genm-home/research-card.hbs): three equal
columns on desktop, stacked on phones. Every image area is the same height. */
.genm-home-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px 24px;
}

@media (min-width: 768px) {
    .genm-home-cards-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Latest research on the homepage fetches extra posts so it still has three
after FRED and Macro Radar posts are skipped; show only the first three. */
.genm-home-cards-latest > .genm-home-card:nth-child(n+4) {
    display: none;
}

.genm-home-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.genm-home .genm-home-card-link {
    display: block;
    color: var(--genm-navy);
    text-decoration: none;
}

.genm-home .genm-home-card-link:hover {
    opacity: 1;
}

.genm-home-card-media {
    height: 160px;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 8px;
    border-bottom: 3px solid var(--genm-gold);
    background: var(--genm-navy);
}

.genm-home-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.genm-home .genm-home-card-title {
    margin: 0 0 6px;
    font-family: var(--genm-font-serif);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: normal;
    color: var(--genm-navy);
}

.genm-home .genm-home-card-link:hover .genm-home-card-title {
    text-decoration: underline;
    text-decoration-color: var(--genm-gold);
    text-underline-offset: 3px;
}

.genm-home .genm-home-card-date {
    margin: 0 0 8px;
    font-size: 13px;
    color: color-mix(in srgb, var(--genm-navy) 75%, transparent);
}

.genm-home .genm-home-card-excerpt {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* Research page (custom-research.hbs) */
.genm-research {
    padding-top: 40px;
}

.genm-home .genm-home-h1 {
    margin: 0 0 24px;
    font-family: var(--genm-font-serif);
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--genm-navy);
}

.genm-home .genm-research-lede {
    margin: -8px 0 28px;
}

/* ---------- About the Debt Sphere ---------- */
.genm-home-prose {
    max-width: 760px;
}

.genm-home .genm-home-prose p {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.65;
}

.genm-home .genm-home-h3 {
    margin: 28px 0 10px;
    font-family: var(--genm-font-serif);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--genm-navy);
}

/* ---------- F. membership ---------- */
.genm-home-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: var(--genm-navy);
}

.genm-home-tier {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    border-radius: 8px;
    background: var(--genm-navy-panel);
    color: var(--genm-cream);
}

.genm-home .genm-home-tier-name {
    margin: 0 0 6px;
    font-family: var(--genm-font-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--genm-cream);
}

.genm-home .genm-home-tier-price {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0 0 10px;
    font-size: 17px;
    color: var(--genm-gold);
}

.genm-home .genm-home-tier-desc {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
}

.genm-home .genm-home-tier-benefits {
    flex-grow: 1;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;
}

.genm-home-tier-benefits li {
    position: relative;
    margin: 0 0 6px;
    padding-left: 18px;
}

.genm-home-tier-benefits li::before {
    position: absolute;
    left: 0;
    content: "✓";
    color: var(--genm-gold);
}

.genm-home .genm-home-button {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--genm-gold);
    color: var(--genm-navy);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}

.genm-home .genm-home-button:hover {
    opacity: 1;
    background: var(--genm-cream);
}

/* ---------- G. Treasury source line ---------- */
.genm-home-source {
    margin-bottom: 0;
}

.genm-home-source .genm-home-small {
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--genm-navy) 18%, transparent);
}
