/* HomelyPet Review Layout v1.1 — Spruce-inspired sticky TOC */
.hp-article {
    --hp: #477B49;
    --hp-dark: #254A32;
    --hp-soft: #F1F6F0;
    --hp-ink: #26332A;
    --hp-muted: #68756B;
    --hp-line: #E2E9E1;
    color: var(--hp-ink);
    font-size: 17px;
    line-height: 1.78;
    width: 100%;
    position: relative;
}
.hp-inner { max-width: 1120px; margin: 0 auto; }
.hp-kicker, .hp-eyebrow {
    color: var(--hp);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    line-height: 1.4;
}
.hp-overview {
    margin: 18px 0 30px;
    padding: 22px 25px;
    background: var(--hp-soft);
    border: 1px solid #DCE8DA;
    border-left: 4px solid var(--hp);
    border-radius: 13px;
}
.hp-overview h2 {
    margin: 7px 0 10px;
    color: var(--hp-dark);
    font-size: 23px;
    line-height: 1.3;
}
.hp-overview p:last-child { margin-bottom: 0; }

/* Main two-column article layout */
.hp-content-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(28px, 4vw, 52px);
    align-items: start;
}
.hp-toc-column {
    min-width: 0;
    align-self: stretch;
}
.hp-toc {
    position: sticky;
    top: 28px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    padding: 18px 17px;
    background: #F4F5F3;
    border: 1px solid #E5E9E3;
    border-radius: 4px;
    scrollbar-width: thin;
    scrollbar-color: #B8C8B5 transparent;
}
.hp-toc-title {
    margin: 0 0 14px;
    color: #26332A;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.35;
}
.hp-toc ol {
    list-style: none;
    margin: 0;
    padding: 0 0 0 14px;
    border-left: 1px solid #C8D1C6;
}
.hp-toc li {
    margin: 0;
    padding: 0;
}
.hp-toc a {
    display: block;
    padding: 8px 0;
    color: #28362B;
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
    transition: color .2s ease;
}
.hp-toc a:hover,
.hp-toc a:focus {
    color: var(--hp);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Article typography */
.hp-body { min-width: 0; }
.hp-body > *:first-child { margin-top: 0; }
.hp-body h2 {
    margin: 42px 0 13px;
    padding-bottom: 10px;
    color: var(--hp-dark);
    font-size: clamp(23px, 2.7vw, 30px);
    line-height: 1.25;
    letter-spacing: -.02em;
    border-bottom: 1px solid var(--hp-line);
    scroll-margin-top: 35px;
}
.hp-body h3 {
    margin: 27px 0 9px;
    color: var(--hp-ink);
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.35;
    scroll-margin-top: 35px;
}
.hp-body p { margin: 0 0 18px; }
.hp-body ul, .hp-body ol { margin: 0 0 22px; padding-left: 25px; }
.hp-body li { margin: 7px 0; padding-left: 3px; }
.hp-body a {
    color: var(--hp-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.hp-body blockquote {
    margin: 24px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--hp);
    background: var(--hp-soft);
    border-radius: 0 12px 12px 0;
}
.hp-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 18px 0 28px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid var(--hp-line);
    border-radius: 10px;
    overflow: hidden;
}
.hp-body th {
    background: #EDF4EB;
    color: var(--hp-dark);
    font-weight: 750;
    text-align: left;
}
.hp-body th, .hp-body td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--hp-line);
    vertical-align: top;
}
.hp-body tr:last-child td { border-bottom: 0; }
.hp-body tr:nth-child(even) td { background: #FAFCF9; }
.hp-body img { max-width: 100%; height: auto; border-radius: 12px; }
.hp-body figure { margin: 22px 0; }
.hp-body figcaption { color: var(--hp-muted); font-size: 13px; text-align: center; }

.hp-footer {
    margin-top: 48px;
    padding: 20px 0;
    border-top: 1px solid var(--hp-line);
    color: var(--hp);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* Reading progress */
.hp-progress {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    pointer-events: none;
}
.hp-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--hp);
}

/* Article type accents */
.hp-type-evaluation .hp-kicker { color: #3C6C8A; }
.hp-type-worth .hp-kicker { color: #8A6A2C; }
.hp-type-evaluation .hp-overview {
    border-left-color: #3C6C8A;
    background: #F1F6F9;
}
.hp-type-worth .hp-overview {
    border-left-color: #A47B31;
    background: #FAF6EC;
}

/* Tablet and mobile: TOC becomes a normal collapsible panel above content */
@media (max-width: 900px) {
    .hp-content-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
    .hp-toc-column { order: 0; }
    .hp-body { order: 1; }
    .hp-toc {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0;
        background: #F4F5F3;
        border: 1px solid #E5E9E3;
        border-radius: 10px;
    }
    .hp-toc-title {
        position: relative;
        margin: 0;
        padding: 15px 42px 15px 16px;
        cursor: pointer;
    }
    .hp-toc-title:after {
        content: "+";
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 22px;
        font-weight: 400;
    }
    .hp-toc.is-collapsed ol { display: none; }
    .hp-toc ol { margin: 0 16px 15px; }
}
@media (max-width: 600px) {
    .hp-article { font-size: 16px; line-height: 1.72; }
    .hp-overview { padding: 18px 17px; }
    .hp-overview h2 { font-size: 21px; }
    .hp-body h2 { margin-top: 34px; font-size: 24px; }
    .hp-body h3 { margin-top: 23px; font-size: 19px; }
    .hp-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .hp-body th, .hp-body td { min-width: 105px; padding: 10px 11px; }
}
