﻿/* ============================================================
   thedrift.css — "The Drift" blog (EW2027).
   Standard blog layout: main feed + recent-posts sidebar.
   Uses ew-theme.css tokens. Dark-mode aware.
   ============================================================ */

.drift-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

/* ---- Header ---- */
.drift-head {
    text-align: left;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.drift-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 .4rem;
    line-height: 1.15;
}

.drift-title-paren {
    color: var(--ew-color);
    font-weight: 700;
}

.drift-sub {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 60ch;
}

/* ---- Layout ---- */
.drift-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 860px) {
    .drift-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ---- Main feed ---- */
.drift-feed {
    min-width: 0;
}

.drift-loading,
.drift-empty {
    color: var(--text-muted);
    padding: 3rem 1rem;
    text-align: center;
}

.drift-post {
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

    .drift-post:last-child {
        border-bottom: none;
    }

.drift-cat {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ew-color);
    margin-bottom: .5rem;
}

.drift-post-title {
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin: 0 0 .5rem;
}

.drift-meta {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: .85rem;
}

/* ticker chips */
.drift-tickers {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: 1.25rem;
}

.drift-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .6rem .2rem .3rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    font-size: .8rem;
    font-weight: 600;
    transition: border-color 120ms ease;
}

    .drift-chip:hover {
        border-color: var(--ew-color);
    }

.drift-chip-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    object-fit: contain;
}

/* image */
.drift-figure {
    margin: 0 0 1.25rem;
}

.drift-img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
}

/* body copy */
.drift-body {
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.7;
}

    .drift-body p {
        margin: 0 0 1rem;
    }

    .drift-body img {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
        margin: 1rem 0;
    }

    .drift-body a {
        color: var(--ew-color);
        text-decoration: underline;
    }

/* locked teaser */
.drift-lock {
    background: var(--surface-alt, var(--surface));
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: .5rem;
}

.drift-lock-msg {
    color: var(--text-muted);
    margin: 0 0 1rem;
    font-size: .95rem;
}

.drift-lock-btn {
    display: inline-block;
    padding: .55rem 1.4rem;
    background: var(--ew-color);
    color: #1b1b1b;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: filter 120ms ease;
}

    .drift-lock-btn:hover {
        filter: brightness(1.06);
    }

/* ---- Sidebar ---- */
.drift-side {
    position: sticky;
    top: 1.5rem;
}

@media (max-width: 860px) {
    .drift-side {
        position: static;
    }
}

.drift-side-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}

.drift-side-item {
    display: block;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

    .drift-side-item:last-child {
        border-bottom: none;
    }

    .drift-side-item:hover .drift-side-item-title {
        color: var(--ew-color);
    }

    /* compact ticker pills in the sidebar */
    .drift-side-item .drift-tickers {
        gap: .35rem;
        margin-top: .4rem;
        margin-bottom: 0;
    }

    .drift-side-item .drift-chip {
        padding: .12rem .45rem .12rem .2rem;
        font-size: .72rem;
        gap: .25rem;
    }

    .drift-side-item .drift-chip-logo {
        width: 16px;
        height: 16px;
    }

.drift-side-item-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: .25rem;
    transition: color 120ms ease;
}

.drift-side-item-date {
    font-size: .75rem;
    color: var(--text-muted);
}

/* ============================================================
   Home-page Drift promo (_HomeDrift partial)
   ============================================================ */
.drift-home {
    max-width: 1300px;
    margin: 2.5rem auto 0;
    padding: 0 1rem;
}

.drift-home-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.drift-home-title {
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.drift-home-all {
    font-size: .9rem;
    font-weight: 600;
    color: var(--ew-color);
    text-decoration: none;
    white-space: nowrap;
}

    .drift-home-all:hover {
        text-decoration: underline;
    }

.drift-home-card {
    display: flex;
    gap: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

    .drift-home-card:hover {
        border-color: var(--ew-color);
        box-shadow: 0 4px 16px -10px rgba(0, 0, 0, 0.4);
    }

@media (max-width: 700px) {
    .drift-home-card {
        flex-direction: column;
        gap: 1rem;
    }
}

.drift-home-figure {
    flex: 0 0 240px;
}

@media (max-width: 700px) {
    .drift-home-figure {
        flex: none;
    }
}

.drift-home-img {
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.drift-home-body {
    min-width: 0;
    flex: 1;
}

.drift-home-cat {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ew-color);
    margin-bottom: .4rem;
}

.drift-home-post-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin: 0 0 .35rem;
}

.drift-home-date {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .7rem;
}

.drift-home-tickers {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .8rem;
}

.drift-home-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .15rem .5rem .15rem .25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text);
}

.drift-home-chip-logo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    object-fit: contain;
}

.drift-home-summary {
    color: var(--text);
    font-size: .95rem;
    line-height: 1.6;
    margin-bottom: .6rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drift-home-read {
    font-size: .88rem;
    font-weight: 600;
    color: var(--ew-color);
}
