/* ============================================================
   LawnBeast V2 — News article page (docs layout w/ sticky TOC)
   Layered on css/v2/base.css (tokens) + css/v2/public-base.css
   (shell). Renamed from the mockup to dodge base.css collisions:
     .layout  -> .news-grid
     .sidebar -> .news-aside
     .content -> .news-article
   MOBILE-FIRST: base styles = phone; layered at 700px and 1000px.
   ============================================================ */

html {
    /* anchor jumps clear navbar + the pinned mobile TOC strip */
    scroll-padding-top: 128px;
}

/* shared horizontal container (shell provides .nav-inner/.footer-inner) */
.breadcrumb-wrap,
.post-header,
.hero-figure,
.news-grid {
    width: 100%;
    max-width: var(--maxw);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}
.post-header { max-width: 860px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb-wrap { padding-top: 20px; }
.breadcrumb {
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; font-size: 11px; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ---------- Post header ---------- */
.post-header {
    padding-top: 18px;
    padding-bottom: 8px;
    text-align: center;
}
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent-bg);
    color: var(--accent-dark);
    border: 1px solid var(--accent-border);
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
h1.headline {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(30px, 7vw, 50px);
    line-height: 1.12;
    letter-spacing: -.025em;
    margin: 16px 0 0;
    overflow-wrap: break-word;
}
.dek {
    font-size: clamp(16px, 4vw, 20px);
    color: var(--text-muted);
    margin: 16px auto 0;
    max-width: 660px;
    line-height: 1.55;
}
.meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px 16px;
    flex-wrap: wrap;
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-muted);
}
.meta-row .author {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    color: var(--text);
}
.meta-row .avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    display: grid; place-items: center;
    font-size: 14px;
    flex: none;
}
.meta-row .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }

/* ---------- Hero figure ---------- */
.hero-figure { margin-top: 26px; }
.hero-figure figure, .news-article figure { margin: 0; }
.img-placeholder {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        radial-gradient(120% 120% at 0% 0%, var(--accent-bg) 0%, transparent 55%),
        radial-gradient(120% 120% at 100% 100%, var(--accent-subtle) 0%, transparent 50%),
        var(--surface-hover);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: var(--accent-dark);
    box-shadow: var(--shadow-lg);
}
.hero-figure .img-placeholder { aspect-ratio: 16 / 9; }
.hero-figure img.hero-img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.img-placeholder .icon-badge {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    background: var(--surface);
    display: grid; place-items: center;
    font-size: 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    flex: none;
}
.img-placeholder .ph-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}
.hero-figure figcaption, .news-article figcaption {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* ---------- Layout (mobile = simple stacked blocks) ---------- */
.news-grid { padding-top: 28px; }

/* ---------- TOC (mobile = sticky horizontal pill strip) ---------- */
.news-aside {
    position: sticky;
    top: calc(var(--nav-h) - 1px);       /* pin flush under the navbar */
    z-index: 90;
    margin-bottom: 18px;
}
.toc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.toc-head {
    display: none;                        /* label hidden on mobile to keep strip short */
    padding: 16px 18px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-light);
}
.toc-head i { color: var(--accent); }
.toc-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.toc-nav::-webkit-scrollbar { display: none; }
.toc-nav a {
    flex: none;
    white-space: nowrap;
    padding: 9px 14px;
    font-size: 13.5px;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    line-height: 1.3;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.toc-nav a:hover { color: var(--text); background: var(--surface-hover); }
.toc-nav a.active {
    color: var(--accent-dark);
    background: var(--accent-bg);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* share row — lives at the bottom of the toc-card; desktop sidebar only (hidden on mobile) */
.share-row { display: none; padding: 14px 18px 16px; border-top: 1px solid var(--border-light); }
.share-row .share-label {
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.share-btns { display: flex; gap: 9px; }
.share-btns a {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    display: grid; place-items: center;
    color: var(--text-secondary); font-size: 16px;
    transition: all var(--transition-fast);
}
.share-btns a:hover {
    background: var(--accent); color: #fff; border-color: var(--accent);
    transform: translateY(-2px);
}

/* ---------- Article content ---------- */
.news-article {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    font-size: 16px;
}
.news-article .lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    font-weight: 500;
}
.news-article p {
    font-size: 16px;
    margin: 18px 0;
    color: var(--text-secondary);
}
.news-article section { scroll-margin-top: 128px; }
.news-article h2 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(23px, 6vw, 30px);
    line-height: 1.18;
    letter-spacing: -.02em;
    margin: 38px 0 8px;
    padding-top: 8px;
    color: var(--text);
}
.news-article h2 .sec-num {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-dark);
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    padding: 2px 9px;
    vertical-align: middle;
    margin-right: 10px;
    letter-spacing: .03em;
}
.news-article h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 6px;
    letter-spacing: -.01em;
    color: var(--text);
}

/* generic fragment content: links, lists, images */
.news-article a:not(.cta-btn) { color: var(--accent-dark); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.news-article a:not(.cta-btn):hover { color: var(--accent); }
.news-article ol, .news-article ul:not(.feature-list) {
    margin: 18px 0;
    padding-left: 24px;
    color: var(--text-secondary);
}
.news-article ol li, .news-article ul:not(.feature-list) li { margin: 8px 0; }
.news-article img { max-width: 100%; }

/* feature list */
.news-article ul.feature-list {
    list-style: none; padding: 0; margin: 22px 0;
    display: grid; gap: 12px;
}
.news-article ul.feature-list li {
    position: relative;
    padding: 14px 16px 14px 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    line-height: 1.5;
    box-shadow: var(--shadow-xs);
}
.news-article ul.feature-list li::before {
    content: "\F26E"; /* bi-check-lg */
    font-family: "bootstrap-icons";
    position: absolute;
    left: 14px; top: 15px;
    width: 24px; height: 24px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    display: grid; place-items: center;
    font-size: 13px;
}
.news-article ul.feature-list li b { color: var(--text); }

/* pull-quote */
.pullquote {
    margin: 36px 0;
    padding: 22px 22px;
    border-left: 4px solid var(--accent);
    background: linear-gradient(90deg, var(--accent-bg) 0%, var(--surface) 100%);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.pullquote p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(19px, 5vw, 25px);
    line-height: 1.4;
    color: var(--accent-dark);
    margin: 0;
}
.pullquote .pq-icon { color: var(--accent); font-size: 24px; margin-bottom: 4px; display: block; }

/* inline figure */
.news-article figure.inline-fig { margin: 32px 0; }
.news-article figure.inline-fig .img-placeholder { aspect-ratio: 16 / 9; }
.news-article figure.inline-fig img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

/* iPhone contractor-view gallery */
.ios-shot-grid {
    display: grid;
    gap: 28px;
    max-width: 360px;
    margin: 32px auto 40px;
}
.news-article figure.ios-shot { margin: 0; }
.news-article figure.ios-shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface-hover);
    box-shadow: var(--shadow-md);
}
.news-article figure.ios-shot figcaption {
    text-align: left;
    line-height: 1.5;
}
.news-article figure.ios-shot figcaption b {
    color: var(--text);
    font-style: normal;
}

/* KPI mini tiles — adopts the V2 dashboard .kpi treatment
   (scoped as .kpi-tile so base.css .kpi rules never collide) */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr;          /* single column on mobile */
    gap: 12px;
    margin: 24px 0;
}
.kpi-tile {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 16px 16px 15px;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}
.kpi-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent);
}
.kpi-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.kpi-tile .kpi-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    display: flex; align-items: center; gap: 6px;
    font-weight: 600;
}
.kpi-tile .kpi-label i { color: var(--accent); font-size: 12px; }
.kpi-tile .kpi-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.02em;
    margin-top: 8px;
    color: var(--text);
    line-height: 1.1;
}

/* ---------- CTA block ---------- */
.cta-block {
    margin: 44px 0 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--green-deepest) 0%, var(--accent-dark) 100%);
    color: #fff;
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.cta-block::after {
    content: "\F4F8";
    font-family: "bootstrap-icons";
    position: absolute;
    right: -10px; bottom: -24px;
    font-size: 140px;
    color: rgba(255,255,255,.07);
    line-height: 1;
    pointer-events: none;
}
.cta-block h2 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -.02em;
    font-size: clamp(23px, 5.5vw, 32px);
    line-height: 1.2;
    margin: 0; color: #fff;
    position: relative; z-index: 1;
}
.cta-block .cta-btn {
    display: inline-flex; align-items: center; gap: 9px;
    margin-top: 20px;
    background: #fff; color: var(--accent-dark);
    font-weight: 700; font-size: 15px;
    padding: 12px 24px; border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
    position: relative; z-index: 1;
}
.cta-block .cta-btn:hover { transform: translateY(-2px); }
.cta-block .cta-sub {
    margin-top: 14px; font-size: 14px; color: rgba(255,255,255,.8);
    position: relative; z-index: 1;
}

/* ============================================================
   >= 700px : roomier
   ============================================================ */
@media (min-width: 700px) {
    .news-article p { font-size: 17px; }
    .news-article .lead { font-size: 19px; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .ios-shot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }
}

/* ============================================================
   >= 1000px : DESKTOP — two-column docs layout, sticky LEFT TOC
   ============================================================ */
@media (min-width: 1000px) {
    html { scroll-padding-top: calc(var(--nav-h) + 24px); }

    .post-header { padding-top: 28px; }
    .hero-figure { margin-top: 34px; }
    .hero-figure .img-placeholder { aspect-ratio: 21 / 9; }
    /* Cap the hero to the article column width (760px = #news-article-content)
       and sit it directly over that column (offset by the aside 260 + gap 34)
       rather than page-centering it or stretching to --maxw. */
    .hero-figure figure {
        max-width: 760px;
        margin-left: calc(260px + 34px);
        margin-right: auto;
    }

    .news-grid {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);  /* minmax(0,..) stops text spill */
        gap: 34px;
        align-items: start;
        padding-top: 48px;
    }

    /* TOC reflows into the classic vertical sticky card */
    .news-aside {
        position: sticky;
        top: calc(var(--nav-h) + 24px);
        z-index: 1;
        margin-bottom: 0;
        align-self: start;
    }
    .toc-card { box-shadow: var(--shadow-sm); }
    .share-row { display: block; }
    .toc-head { display: flex; }
    .toc-nav {
        display: block;
        overflow: visible;
        padding: 8px;
    }
    .toc-nav a {
        display: block;
        white-space: normal;
        margin: 2px 0;
        border-bottom: none;
        border-left: 3px solid transparent;
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    }
    .toc-nav a.active {
        border-bottom-color: transparent;
        border-left-color: var(--accent);
    }
    .news-article { max-width: 760px; }
    .news-article section { scroll-margin-top: calc(var(--nav-h) + 24px); }
    .news-article h2 { margin-top: 52px; }
    .news-article h3 { font-size: 19px; }
    .news-article ul.feature-list li { font-size: 16px; }
    .news-article .lead { font-size: 20px; }

    .pullquote { margin: 40px 0; padding: 28px 30px; }
    .kpi-tile .kpi-value { font-size: 28px; }
    .cta-block { margin-top: 56px; padding: 44px 40px; }
    .pub-footer { margin-top: 70px; }
}
