:root {
    --advice-ink: #18392b;
    --advice-green: #255b3d;
    --advice-green-dark: #123426;
    --advice-cream: #f5f1e7;
    --advice-paper: #fffdf8;
    --advice-gold: #d9a928;
    --advice-line: #dce2dc;
}

.advice-hero h1,
.advice-search h2,
.advice-library h2,
.advice-card h3,
.advice-help h2,
.advice-results-hero h1,
.advice-results-heading h2,
.advice-empty-state h1,
.advice-empty-state h2,
.advice-article-header h1,
.advice-article-body h2,
.advice-article-body h3,
.advice-article-aside-card h2 {
    text-transform: none;
}

.advice-hero {
    min-height: 460px;
    margin-bottom: 1.5rem;
    border-radius: .45rem;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: var(--advice-green-dark);
}

.advice-hero-image,
.advice-hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.advice-hero-image { object-fit: cover; }
.advice-hero-overlay { background: linear-gradient(90deg, rgba(10, 41, 28, .94) 0%, rgba(10, 41, 28, .65) 48%, rgba(10, 41, 28, .12) 100%); }

.advice-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: clamp(2.4rem, 6vw, 5rem);
}

.advice-eyebrow {
    margin: 0 0 .8rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    font-weight: 700;
    color: #f2ce70;
}

.advice-eyebrow-dark { color: var(--advice-green); }

.advice-hero h1 {
    max-width: 620px;
    margin: 0 0 1rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 6vw, 5.3rem);
    line-height: .98;
    letter-spacing: -.035em;
}

.advice-hero-content > p:not(.advice-eyebrow) { max-width: 570px; font-size: 1.16rem; }
.advice-hero-link { display: inline-flex; gap: .65rem; align-items: center; margin-top: .5rem; color: #fff; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.65); padding-bottom: .25rem; }
.advice-hero-link:hover { color: #fff; text-decoration: none; }

.advice-search {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    margin-bottom: 4rem;
    padding: clamp(2rem, 5vw, 4rem);
    border-radius: .45rem;
    background: var(--advice-cream);
}

.advice-search h2,
.advice-library h2,
.advice-help h2 { font-family: Georgia, "Times New Roman", serif; color: var(--advice-ink); }
.advice-search h2 { margin-bottom: .6rem; font-size: clamp(2rem, 3.5vw, 3.2rem); line-height: 1.05; }
.advice-search-copy > p:last-child { margin: 0; color: #516158; }

.advice-search-form { display: flex; padding: .4rem; border-radius: .35rem; background: #fff; box-shadow: 0 10px 30px rgba(24,57,43,.08); }
.advice-search-form input { min-width: 0; flex: 1; height: 58px; padding: 0 1rem; border: 0; outline: 0; font-size: 1rem; color: #243a30; }
.advice-search-form input:focus { box-shadow: inset 0 0 0 2px var(--advice-green); border-radius: .2rem; }
.advice-search-form button { min-width: 126px; border: 0; border-radius: .25rem; background: var(--advice-green); color: #fff; font-weight: 700; transition: background .2s, transform .2s; }
.advice-search-form button:hover { background: var(--advice-green-dark); transform: translateY(-1px); }
.advice-search-form button i { margin-right: .5rem; }

.advice-topics { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: 1rem; font-size: .82rem; }
.advice-topics span { color: #68756e; }
.advice-topics a { padding: .3rem .65rem; border: 1px solid #cbd5cd; border-radius: 2rem; color: var(--advice-ink); background: rgba(255,255,255,.5); }
.advice-topics a:hover { border-color: var(--advice-green); text-decoration: none; }

.advice-library { margin-bottom: 4rem; }
.advice-library-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.2rem; border-bottom: 1px solid var(--advice-line); }
.advice-library h2 { margin: 0 0 .35rem; font-size: clamp(2.4rem, 4vw, 4rem); line-height: 1; }
.advice-library-intro { max-width: 620px; margin-bottom: 1.6rem; color: #657169; }
.advice-tabs { display: flex; gap: 1.6rem; white-space: nowrap; }
.advice-tabs a { position: relative; padding: 1rem 0 1.35rem; color: #66736b; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.advice-tabs a:hover { color: var(--advice-green); text-decoration: none; }
.advice-tabs a.active { color: var(--advice-green); }
.advice-tabs a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--advice-green); }

.advice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.advice-card { min-width: 0; overflow: hidden; border: 1px solid var(--advice-line); border-radius: .4rem; background: var(--advice-paper); box-shadow: 0 4px 18px rgba(20,48,35,.04); transition: transform .22s, box-shadow .22s; }
.advice-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(20,48,35,.11); }
.advice-card-image { display: block; overflow: hidden; aspect-ratio: 16/10; background: #dfe7df; }
.advice-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.advice-card:hover .advice-card-image img { transform: scale(1.035); }
.advice-card-body { display: flex; flex-direction: column; min-height: 285px; padding: 1.35rem; }
.advice-card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; min-height: 1.2rem; margin-bottom: .8rem; color: #6e7a73; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.advice-card-meta i { margin-right: .3rem; color: var(--advice-green); }
.advice-card h3 { margin: 0 0 .7rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; line-height: 1.15; }
.advice-card h3 a { color: var(--advice-ink); }
.advice-card h3 a:hover { color: var(--advice-green); text-decoration: none; }
.advice-card-body > p { margin-bottom: 1.1rem; color: #5f6b64; font-size: .92rem; }
.advice-read-more { margin-top: auto; color: var(--advice-green); font-size: .83rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.advice-read-more span { display: inline-block; margin-left: .35rem; transition: transform .2s; }
.advice-read-more:hover { color: var(--advice-green-dark); text-decoration: none; }
.advice-read-more:hover span { transform: translateX(4px); }

.advice-help { display: flex; align-items: center; justify-content: space-between; gap: 3rem; margin-bottom: 1rem; padding: clamp(2.5rem, 6vw, 5rem); border-radius: .45rem; background: var(--advice-green-dark); color: #fff; }
.advice-help h2 { margin-bottom: .7rem; color: #fff; font-size: clamp(2.4rem, 4vw, 4rem); }
.advice-help p:last-child { max-width: 650px; margin: 0; color: #dfe9e2; }
.advice-help > a { flex: 0 0 auto; padding: .9rem 1.3rem; border: 1px solid rgba(255,255,255,.65); border-radius: .25rem; color: #fff; font-weight: 700; }
.advice-help > a:hover { background: #fff; color: var(--advice-green-dark); text-decoration: none; }

/* Search results */
.advice-results-hero {
    margin-bottom: 4rem;
    padding: clamp(2.5rem, 6vw, 5rem);
    border-radius: .45rem;
    background: var(--advice-green-dark);
    color: #fff;
}

.advice-results-hero h1 {
    margin: 0 0 .8rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    line-height: 1;
}

.advice-results-hero > p:not(.advice-eyebrow) { max-width: 650px; margin-bottom: 2rem; color: #dfe9e2; font-size: 1.08rem; }
.advice-results-hero .advice-search-form { max-width: 760px; }
.advice-results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--advice-line); }
.advice-results-heading h2 { margin-bottom: 0; }
.advice-back-link { flex: 0 0 auto; padding-bottom: .35rem; color: var(--advice-green); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.advice-back-link:hover { color: var(--advice-green-dark); text-decoration: none; }

.advice-empty-state { max-width: 720px; margin: 2rem auto 5rem; padding: clamp(2.5rem, 6vw, 5rem); border-radius: .45rem; background: var(--advice-cream); text-align: center; }
.advice-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 1.2rem; border-radius: 50%; background: #dce8de; color: var(--advice-green); font-size: 1.5rem; }
.advice-empty-state h1, .advice-empty-state h2 { margin-bottom: .8rem; font-family: Georgia, "Times New Roman", serif; color: var(--advice-ink); font-size: clamp(2.2rem, 4vw, 3.4rem); }
.advice-empty-state p { margin: 0 auto 1.7rem; color: #5f6b64; }
.advice-empty-button { display: inline-block; padding: .85rem 1.25rem; border-radius: .25rem; background: var(--advice-green); color: #fff; font-weight: 700; }
.advice-empty-button:hover { background: var(--advice-green-dark); color: #fff; text-decoration: none; }

/* Article reading experience */
.advice-breadcrumb { display: flex; gap: .65rem; align-items: center; margin: .4rem 0 2.2rem; color: #79837d; font-size: .8rem; }
.advice-breadcrumb a { color: var(--advice-green); font-weight: 700; }
.advice-breadcrumb span[aria-current="page"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.advice-article { margin-bottom: 3rem; }
.advice-article-header { max-width: 900px; margin: 0 auto 2.4rem; text-align: center; }
.advice-article-header h1 { margin: 0 0 1.2rem; font-family: Georgia, "Times New Roman", serif; color: var(--advice-ink); font-size: clamp(2.8rem, 6vw, 5.2rem); line-height: 1.02; letter-spacing: -.035em; }
.advice-article-meta { margin: 0; color: #6d7871; font-size: .86rem; text-transform: uppercase; letter-spacing: .06em; }
.advice-article-figure { overflow: hidden; margin: 0 0 clamp(2.5rem, 6vw, 5rem); border-radius: .45rem; background: #dfe7df; }
.advice-article-figure img { display: block; width: 100%; max-height: 650px; object-fit: cover; }
.advice-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; max-width: 980px; margin: 0 auto; }
.advice-article-body { min-width: 0; color: #34453c; font-family: Georgia, "Times New Roman", serif; font-size: 1.16rem; line-height: 1.75; }
.advice-article-body > p:first-child { font-size: 1.3rem; color: var(--advice-ink); }
.advice-article-body p { margin-bottom: 1.45rem; }
.advice-article-body h2 { margin: 2.7rem 0 1rem; color: var(--advice-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.5vw, 2.8rem); line-height: 1.1; }
.advice-article-body h2:first-child { margin-top: 0; }
.advice-article-body h3 { margin-top: 2rem; color: var(--advice-ink); }
.advice-article-body a { color: var(--advice-green); text-decoration: underline; text-decoration-color: #a6bcae; text-underline-offset: .15em; }
.advice-article-body ul, .advice-article-body ol { margin-bottom: 1.6rem; padding-left: 1.4rem; }
.advice-article-body li { margin-bottom: .65rem; padding-left: .3rem; }
.advice-article-body img { max-width: 100%; height: auto; }
.advice-article-aside { position: sticky; top: 85px; display: grid; gap: 1rem; }
.advice-article-aside-card { padding: 1.5rem; border: 1px solid var(--advice-line); border-radius: .4rem; background: var(--advice-cream); }
.advice-article-aside-card h2 { margin-bottom: 1rem; font-family: Georgia, "Times New Roman", serif; color: var(--advice-ink); font-size: 1.65rem; line-height: 1.1; }
.advice-article-search { display: flex; margin-bottom: 1rem; padding: .25rem; border: 1px solid #cad4cc; border-radius: .25rem; background: #fff; }
.advice-article-search input { min-width: 0; flex: 1; width: 100%; padding: .65rem; border: 0; outline: 0; }
.advice-article-search input:focus { box-shadow: inset 0 0 0 2px var(--advice-green); }
.advice-article-search button { width: 42px; border: 0; border-radius: .2rem; background: var(--advice-green); color: #fff; }
.advice-aside-link, .advice-article-expert > a { color: var(--advice-green); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.advice-article-expert { border-color: var(--advice-green-dark); background: var(--advice-green-dark); color: #dfe9e2; }
.advice-article-expert .advice-eyebrow { color: #f2ce70; }
.advice-article-expert h2 { color: #fff; }
.advice-article-expert > a { color: #fff; }
.advice-article-footer-nav { display: flex; justify-content: space-between; gap: 2rem; max-width: 980px; margin: 3rem auto 1rem; padding-top: 1.5rem; border-top: 1px solid var(--advice-line); }
.advice-article-footer-nav a { color: var(--advice-green); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 900px) {
    .advice-search { grid-template-columns: 1fr; gap: 1.5rem; }
    .advice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .advice-library-header { align-items: flex-start; flex-direction: column; }
    .advice-article-layout { grid-template-columns: 1fr; }
    .advice-article-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    .advice-hero { min-height: 500px; }
    .advice-hero-overlay { background: linear-gradient(0deg, rgba(10,41,28,.96), rgba(10,41,28,.3)); }
    .advice-hero-content { padding: 2rem; }
    .advice-search { padding: 1.5rem; }
    .advice-search-form button { min-width: 58px; }
    .advice-search-form button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .advice-search-form button i { margin: 0; }
    .advice-tabs { width: 100%; justify-content: space-between; gap: .8rem; }
    .advice-grid { grid-template-columns: 1fr; }
    .advice-card-body { min-height: 0; }
    .advice-help { align-items: flex-start; flex-direction: column; }
    .advice-results-hero { padding: 2rem; }
    .advice-results-heading { align-items: flex-start; flex-direction: column; }
    .advice-article-header { text-align: left; }
    .advice-article-header h1 { font-size: 2.75rem; }
    .advice-article-figure { margin-left: -15px; margin-right: -15px; border-radius: 0; }
    .advice-article-layout { gap: 2rem; }
    .advice-article-body { font-size: 1.08rem; }
    .advice-article-body > p:first-child { font-size: 1.16rem; }
    .advice-article-aside { grid-template-columns: 1fr; }
    .advice-article-footer-nav { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .advice-card, .advice-card-image img, .advice-read-more span, .advice-search-form button { transition: none; }
}
