/* ==========================================================================
   2026 Senior Discounts & Savings Guide — Aging In The Comfort Of Home®
   Products division (Trust Blue). Self-contained page stylesheet.
   Simplified edition: lettered contents index + quiet appendix rows, each
   carrying its eligibility badge, check date, and official source link.
   Fonts load from assets/brand/styles/fonts.css (link before this file).
   ========================================================================== */

:root {
    /* Shared brand */
    --radiant-gold: #fdd841;
    --radiant-gold-bright: #ffe56a;
    --charcoal: #333333;
    --light-linen: #fffce5;

    /* Products division */
    --trust-blue-dark: #1b477e;
    --trust-blue: #255ea0;
    --trust-blue-light: #d9ecff;
    --trust-blue-wash: #f2f8ff;

    --ink: var(--charcoal);
    --ink-soft: #4d5560;

    --font-heading: 'Montserrat', 'Avenir Next', 'Segoe UI', sans-serif;
    --font-body: 'Source Sans Pro', 'Source Sans 3', 'Segoe UI', sans-serif;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-pill: 999px;

    --hairline: rgba(37, 94, 160, 0.16);
    --shadow-panel: 0 2px 6px rgba(27, 71, 126, 0.06), 0 14px 34px rgba(27, 71, 126, 0.10);

    --container: 1000px;
    --nav-h: 88px; /* sized for the logo below; sticky offsets derive from it */
}

* { box-sizing: border-box; }

html {
    /* 18px base type: comfortable for every reader */
    font-size: 112.5%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 72px);
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: #ffffff;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2 {
    font-family: var(--font-heading);
    color: var(--trust-blue-dark);
    line-height: 1.15;
    margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--trust-blue); }
a:hover { color: var(--trust-blue-dark); }

img { max-width: 100%; height: auto; }

.container {
    width: min(var(--container), calc(100% - 44px));
    margin-inline: auto;
}

.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; }

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

:focus-visible {
    outline: 3px solid var(--trust-blue);
    outline-offset: 3px;
    border-radius: 6px;
}
.hero :focus-visible,
.cta-final :focus-visible,
.site-footer :focus-visible { outline-color: var(--radiant-gold); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 12px;
    z-index: 200;
    background: var(--trust-blue-dark);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus-visible { left: 12px; color: #fff; }

/* Print-only header (hidden on screen) */
.print-header { display: none; }

/* ============================== Buttons ============================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 13px 28px;
    border: 0;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(27, 71, 126, 0.22); }
.btn:active { transform: translateY(0); }

.btn-gold {
    background: linear-gradient(180deg, var(--radiant-gold-bright), var(--radiant-gold));
    color: var(--charcoal);
}
.btn-gold:hover { color: var(--charcoal); }

.btn-outline-light {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.85);
}
.btn-outline-light:hover { color: #ffffff; background: rgba(255, 255, 255, 0.12); }

.btn-compact { min-height: 44px; padding: 9px 20px; font-size: 0.86rem; }

/* ============================ Sticky nav ============================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--nav-h);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hairline);
}

.nav-inner {
    width: min(var(--container), calc(100% - 44px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 10px;
}

.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 63px; width: auto; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.nav-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--trust-blue-dark);
    text-decoration: none;
    white-space: nowrap;
}
.nav-phone:hover { color: var(--trust-blue); }
.nav-phone-short { display: none; }

/* =============================== Hero =============================== */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(138deg, var(--trust-blue-dark) 0%, var(--trust-blue) 62%, #2f6cb4 100%);
    color: #ffffff;
    padding: clamp(44px, 6vw, 68px) 0 clamp(84px, 9vw, 110px);
    text-align: center;
}
.hero::before,
.hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before {
    width: 600px; height: 600px;
    right: -180px; top: -280px;
    background: radial-gradient(circle, rgba(253, 216, 65, 0.24), rgba(253, 216, 65, 0) 65%);
}
.hero::after {
    width: 500px; height: 500px;
    left: -220px; bottom: -320px;
    background: radial-gradient(circle, rgba(217, 236, 255, 0.18), rgba(217, 236, 255, 0) 68%);
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

/* Transparent-background artwork: sits directly on the gradient as a cutout.
   Portrait, full-body crop, so it runs taller than a head-and-shoulders shot
   would; the mask fades the cropped lower edge into the gradient. */
.hero-photo {
    display: block;
    height: clamp(200px, 27vw, 340px);
    width: auto;
    margin: 0 auto 16px;
    -webkit-mask-image: linear-gradient(to bottom, #000 84%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, #000 84%, rgba(0, 0, 0, 0) 100%);
}

.hero-eyebrow {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--radiant-gold);
    margin-bottom: 14px;
}

.hero h1 {
    color: #ffffff;
    font-size: clamp(2rem, 4.6vw, 3.05rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.hero-lead {
    font-size: clamp(1rem, 1.8vw, 1.12rem);
    color: rgba(255, 255, 255, 0.94);
    margin: 0 auto 12px;
    max-width: 36em;
}

.hero-checkline {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--radiant-gold);
    margin: 0;
}

/* ===================== Contents (appendix index) ===================== */

.contents-wrap { background: var(--trust-blue-wash); padding-bottom: clamp(20px, 3vw, 30px); }

.contents {
    background: #ffffff;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    padding: clamp(22px, 3.5vw, 32px);
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.contents-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 14px;
}
.contents-head h2 { font-size: 1.3rem; margin: 0; }
.contents-meta {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.contents-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 36px;
}
.contents-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(37, 94, 160, 0.1);
    text-decoration: none;
    color: var(--ink);
    font-size: 0.99rem;
    border-radius: 8px;
}
.contents-list li:nth-last-child(1) a,
.contents-list li:nth-last-child(2) a { border-bottom: 0; }
.contents-list a:hover { background: var(--trust-blue-wash); color: var(--trust-blue-dark); }

.c-letter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--trust-blue-dark);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
}
.c-label { flex: 1 1 auto; font-weight: 600; }
.c-count {
    flex: 0 0 auto;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--trust-blue-dark);
    background: var(--trust-blue-light);
    border-radius: var(--radius-pill);
    padding: 3px 11px;
}

.contents-tips {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* ============================== Toolbar ============================== */

.toolbar-anchor { position: relative; top: calc(-1 * var(--nav-h) - 8px); }

.toolbar {
    position: sticky;
    top: var(--nav-h);
    z-index: 90;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-block: 1px solid var(--hairline);
    padding: 12px 0;
}

.toolbar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 260px;
    min-width: 200px;
}
.search-icon {
    position: absolute;
    left: 15px;
    color: var(--trust-blue);
    width: 18px; height: 18px;
    pointer-events: none;
}
#deal-search {
    width: 100%;
    min-height: 48px;
    padding: 10px 88px 10px 44px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: #ffffff;
    border: 2px solid rgba(37, 94, 160, 0.3);
    border-radius: var(--radius-pill);
}
#deal-search:focus { border-color: var(--trust-blue); outline: none; box-shadow: 0 0 0 3px rgba(37, 94, 160, 0.18); }
#deal-search::placeholder { color: #7a828c; }

.search-clear {
    position: absolute;
    right: 7px;
    min-height: 36px;
    padding: 5px 14px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--trust-blue-light);
    color: var(--trust-blue-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}
.search-clear:hover { background: #c4e2ff; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-btn {
    min-height: 48px;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 2px solid rgba(37, 94, 160, 0.35);
    background: #ffffff;
    color: var(--trust-blue-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease;
}
.filter-btn:hover { background: var(--trust-blue-wash); }
.filter-btn[aria-pressed="true"] {
    background: var(--trust-blue-dark);
    border-color: var(--trust-blue-dark);
    color: #ffffff;
}

.result-count {
    margin: 0 0 0 auto;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.no-results {
    margin-top: 26px;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--trust-blue-dark);
    background: var(--trust-blue-wash);
    border: 1px dashed rgba(37, 94, 160, 0.4);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}

/* ===================== Appendix sections + rows ===================== */

.appendix { padding: clamp(18px, 2.5vw, 28px) 0 clamp(24px, 3.5vw, 40px); }

.deals-section { padding: 12px 0; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 2px;
    padding-bottom: 9px;
    border-bottom: 3px solid var(--trust-blue-dark);
}
.section-head h2 { font-size: clamp(1.2rem, 2.5vw, 1.42rem); margin: 0; }
.sec-letter { color: var(--trust-blue); }
.sec-count {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.deal-list { list-style: none; margin: 0; padding: 0; }

.deal {
    display: grid;
    grid-template-columns: minmax(150px, 195px) 1fr minmax(170px, auto);
    grid-template-areas: "name text meta";
    align-items: start;
    gap: 3px 18px;
    padding: 13px 8px;
    border-bottom: 1px solid rgba(37, 94, 160, 0.12);
}
.deal:hover { background: var(--trust-blue-wash); }

.deal-name {
    grid-area: name;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--charcoal);
    padding-top: 2px;
}
.deal-text { grid-area: text; }
.deal-benefit {
    margin: 0 0 2px;
    font-size: 0.97rem;
    color: var(--trust-blue-dark);
    font-weight: 600;
    line-height: 1.45;
}
.deal-note { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }

.deal-meta {
    grid-area: meta;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}
.deal-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: var(--radius-pill);
    padding: 3px 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.02em;
}
.badge-age { background: var(--radiant-gold); color: var(--charcoal); }
.badge-aarp {
    background: var(--trust-blue-light);
    color: var(--trust-blue-dark);
    border: 1px solid rgba(37, 94, 160, 0.3);
}
.badge-inline { padding: 1px 10px; font-size: 0.72rem; vertical-align: 1px; }

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 3px 9px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: #eef2f6;
    color: #43536b;
    border: 1px solid rgba(67, 83, 107, 0.2);
}
.tag-flag {
    background: var(--radiant-gold);
    color: var(--charcoal);
    border-color: rgba(51, 51, 51, 0.2);
    font-weight: 700;
}

.deal-source {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--ink-soft);
}
.verify-ok { color: var(--trust-blue-dark); font-weight: 600; }
.verify-pending { color: #7a5800; font-weight: 600; }

.src-link {
    font-weight: 700;
    color: var(--trust-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 94, 160, 0.35);
}
.src-link:hover { color: var(--trust-blue-dark); border-bottom-color: var(--trust-blue-dark); }

/* ============================ Disclaimer ============================ */

.disclaimer-wrap { padding: clamp(20px, 3vw, 32px) 0 clamp(28px, 4vw, 40px); }
.disclaimer {
    border: 1px solid rgba(51, 51, 51, 0.16);
    border-radius: var(--radius-md);
    background: var(--light-linen);
    padding: 20px 26px 8px;
}
.disclaimer h2 { font-size: 1.02rem; margin-bottom: 8px; }
.disclaimer p { font-size: 0.85rem; line-height: 1.6; color: #4a4a4a; }

/* ============================ Closing CTA ============================ */

.cta-final {
    background: linear-gradient(138deg, var(--trust-blue-dark) 0%, var(--trust-blue) 70%);
    color: #ffffff;
    padding: clamp(40px, 5.5vw, 64px) 0;
    text-align: center;
}
.cta-inner { max-width: 720px; }
.cta-final h2 { color: #ffffff; font-size: clamp(1.4rem, 3vw, 1.85rem); }
.cta-final p { color: rgba(255, 255, 255, 0.94); font-size: 1rem; max-width: 40em; margin-inline: auto; }
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

/* ============================== Footer ============================== */

.site-footer {
    background: #24303c;
    color: rgba(255, 255, 255, 0.88);
    padding: 36px 0 32px;
}
.footer-inner { text-align: center; }
.footer-logo { height: 66px; width: auto; margin-bottom: 14px; }
.footer-line { margin: 0 0 6px; font-size: 0.92rem; }
.footer-line a { color: #ffffff; font-weight: 600; }
.footer-fine { margin: 12px 0 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.62); }

/* ============================ Back to top ============================ */

.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 110;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--radiant-gold-bright), var(--radiant-gold));
    color: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(27, 71, 126, 0.28);
}
.to-top .icon { width: 24px; height: 24px; }
.to-top[hidden] { display: none; }

/* ======================== Filtering visibility ======================== */

.deal.is-hidden,
.deals-section.is-hidden { display: none; }

/* ============================ Responsive ============================ */

@media (max-width: 900px) {
    .deal {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "name meta"
            "text text";
    }
}

@media (max-width: 860px) {
    .contents-list { grid-template-columns: 1fr; }
    .contents-list li:nth-last-child(2) a { border-bottom: 1px solid rgba(37, 94, 160, 0.1); }
    .result-count { margin-left: 0; flex-basis: 100%; }
}

@media (max-width: 640px) {
    :root { --nav-h: 76px; }
    .container { width: calc(100% - 30px); }
    .nav-inner { width: calc(100% - 30px); }
    .cta-buttons .btn { width: 100%; }
    .nav-actions { gap: 10px; }
    .contents { margin-top: -46px; }

    /* Filter bar is not sticky on small screens: it never covers content */
    .toolbar { position: static; }
    .filters { width: 100%; }
    .filter-btn { flex: 1 1 auto; }

    .deal { padding: 12px 4px; }
    .deal-meta { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 12px; text-align: left; }
    .deal-badges { justify-content: flex-start; }
}

@media (max-width: 400px) {
    .nav-phone-num { display: none; }
    .nav-phone-short {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 6px 16px;
        border-radius: var(--radius-pill);
        background: var(--trust-blue-light);
        color: var(--trust-blue-dark);
    }
    .nav-logo img { height: 51px; }
    .deal {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "name" "text" "meta";
    }
    .deal-name, .deal-text, .deal-meta { min-width: 0; }
    .tag { white-space: normal; }
}

/* ========================== Reduced motion ========================== */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .to-top { transition: none; }
    .btn:hover { transform: none; }
}

/* =============================== Print ===============================
   One print behavior: the complete guide, whatever is filtered on screen. */

@media print {
    .site-nav,
    .toolbar,
    .hero-photo,
    .hero-checkline,
    .no-results,
    .to-top,
    .cta-final { display: none !important; }

    .deal.is-hidden { display: grid !important; }
    .deals-section.is-hidden { display: block !important; }

    .print-header {
        display: block;
        border-bottom: 1.5pt solid #000;
        margin-bottom: 10pt;
        padding-bottom: 6pt;
    }
    .print-brand { font-family: var(--font-heading); font-weight: 700; font-size: 10pt; margin: 0 0 3pt; color: #000; }
    .print-disclaimer { font-size: 8pt; color: #333; margin: 0; }

    body { background: #fff; color: #000; }
    .hero { background: none; color: #000; padding: 0 0 8pt; text-align: left; }
    .hero h1 { color: #000; font-size: 17pt; }
    .hero-lead { color: #000; margin-left: 0; font-size: 10pt; }
    .hero-eyebrow { color: #000; }

    .contents-wrap { background: none; }
    .contents { box-shadow: none; border: 1pt solid #bbb; margin-top: 0; }
    .c-letter { background: none; color: #000; border: 1pt solid #999; }
    .c-count { background: none; border: 1pt solid #999; color: #000; }
    .contents-tips { font-size: 8pt; }

    .section-head { border-bottom-color: #000; }
    .section-head h2, .disclaimer h2, .contents-head h2 { color: #000; }
    .sec-letter { color: #000; }

    .deal {
        grid-template-columns: 1.35in 1fr 1.55in;
        grid-template-areas: "name text meta";
        border-bottom: 0.5pt solid #999;
        padding: 5pt 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .deal:hover { background: none; }
    .deal-name { font-size: 9.5pt; }
    .deal-benefit { color: #000; font-size: 9.5pt; }
    .deal-note { color: #333; font-size: 8pt; }
    .badge-age, .badge-aarp { border: 1pt solid #999; background: none; color: #000; padding: 0 6pt; font-size: 7pt; }
    .tag { border: 1pt solid #999; background: none; color: #000; font-size: 6.5pt; }
    .deal-source, .verify-ok, .verify-pending { color: #000; font-size: 7.5pt; }
    .src-link { color: #000; border-bottom: 0; }
    .src-link::after { content: " (" attr(data-domain) ")"; font-weight: 400; }

    .disclaimer { background: none; border: 1pt solid #bbb; }
    .site-footer { background: none; color: #000; padding: 10pt 0 0; }
    .footer-logo { display: none; }
    .footer-line a, .site-footer { color: #000; }
    a { text-decoration: none; color: #000; }
}
