/*
 * frankstart.com · brand tokens for the shared kit (templates/_shared/site.css), then what this site alone needs.
 *
 * Design: trust without looking governmental. Deep slate navy (#1b2a41) for headings, the mark and dark bands;
 * terracotta (#b9472a) for the one action on a screen; amber only as a small highlight; lots of white. No seals,
 * flags, stars or serif "official" type: the system font stack, 17 px body on phones, 4.5:1 or better on every
 * text colour (muted #5b6878 on white is 5.6:1, terracotta on white 6.1:1, white on terracotta 5.5:1, white on
 * navy 13:1). Every colour used on the site is a token below; the style guide (/styleguide, development only)
 * renders them.
 */
:root {
    --brand: #b9472a;          /* the action colour: buttons, the mark's arrow */
    --brand-ink: #ffffff;
    --brand-hover: #9c3a21;
    --brand-strong: #9c3a21;   /* brand-coloured text on white (6.1:1) */
    --brand-soft: #fbeee9;     /* tinted bands and chips */
    --accent: #d97706;         /* amber: progress, small highlights only */
    --ink: #1b2a41;            /* navy: headings, nav, footer, the mark */
    --text: #26323f;
    --muted: #5b6878;
    --line: #dde3ea;
    --bg: #ffffff;
    --bg-alt: #f4f6f9;
    --dark: #1b2a41;
    --dark-text: #c9d3e0;
    --success: #1f7a4d;

    /* this site's own tokens */
    --navy-soft: #e9eef5;      /* a quiet navy tint for the directory filters and the Frank card */
    --link: #24518a;           /* body links: a readable blue-navy (6.6:1), so terracotta stays the action colour */
    --radius: 12px;
    --radius-sm: 8px;
    --wrap: 72rem;
}

/* 55-plus readers on phones: 17 px body, roomier line height, larger small print */
html { font-size: 106.25%; }
body { line-height: 1.65; }
small, .small, .fine-print { font-size: .9rem; }
.fine-print { line-height: 1.55; color: var(--muted); }
.prose { font-size: 1.05rem; line-height: 1.75; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); }
a { color: var(--link); }
a:hover { color: var(--ink); }
.btn, .nav a, .nav summary, .site-footer a, .tag, .chip, .card h3 a { text-decoration: none; }
.card h3 a, .post-card h3 a { color: var(--ink); }
.btn-soft { color: var(--brand-strong); }
.text-brand { color: var(--brand-strong); }

/* ---- The non-affiliation notice: the first thing on every page, dismissible for the session ---------------- */
/* One slim line on desktop (35 px). The close button draws at 28 px; its ::after keeps the 44 px touch target */
.gov-notice { background: var(--ink); color: #fff; font-size: .8rem; }
.gov-notice .wrap { display: flex; align-items: center; gap: .5rem; padding-block: .2rem; }
.gov-notice p { margin: 0; flex: 1; line-height: 1.35; }
.gov-notice a { color: #fff; text-decoration: underline; }
.gov-notice-close { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: -.4rem; border: 0; background: none; color: #fff; cursor: pointer; border-radius: 6px; }
.gov-notice-close .icon { width: 16px; height: 16px; }
.gov-notice-close { position: relative; }
.gov-notice-close::after { content: ""; position: absolute; inset: -8px; }
.gov-notice-close:hover { background: rgb(255 255 255 / .12); }
.gov-notice.is-dismissed { display: none; }

/* ---- Header: Frank plus the wordmark, one SVG, 40 px tall (36 on small phones) ----------------------------- */
.brand img { height: 40px; }
@media (max-width: 380px) { .brand img { height: 36px; } }
.site-header .wrap { min-height: 68px; }
@media (max-width: 959.98px) { .nav { inset: 68px 0 0; } }

/* ---- Home ----------------------------------------------------------------------------------------------------- */
/* Hero: copy and search on the left, Frank's "checked by a person" card on the right (below on phones). Two soft
   colour washes behind it; the highlighted phrase gets Frank's smile as its underline. */
.hero {
    padding-block: calc(var(--space) * .8) var(--space);
    background:
        radial-gradient(38rem 22rem at 100% 0%, rgb(185 71 42 / .11), transparent 70%),
        radial-gradient(34rem 26rem at 0% 100%, rgb(36 81 138 / .09), transparent 70%),
        linear-gradient(180deg, var(--navy-soft), var(--bg));
}
.hero-grid { display: grid; gap: 3.5rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 20rem; gap: 4rem; } }
.hero-badge { display: inline-block; margin-bottom: 1rem; padding: .3rem .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .85rem; font-weight: 600; }
.hero h1 { color: var(--ink); max-width: 16ch; margin-bottom: .5em; }
.hero .hl { color: var(--brand-strong); padding-bottom: .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M4 4q96 12 192 0' fill='none' stroke='%23b9472a' stroke-width='5' stroke-linecap='round' vector-effect='non-scaling-stroke' opacity='.55'/%3E%3C/svg%3E") no-repeat left bottom / 100% .32em; }
.hero .lead { max-width: 40rem; }

/* The search box: one white panel holding the need, the state and the button; a pill on wide screens */
.hero-search { margin-top: 1.75rem; }
.search-box { display: grid; gap: .5rem; padding: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 2px 4px rgb(16 24 40 / .04), 0 12px 32px rgb(27 42 65 / .10); }
.search-box:focus-within { border-color: var(--brand); }
.search-field { position: relative; display: flex; align-items: center; min-width: 0; }
.search-field .icon { position: absolute; left: .95rem; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-field input, .search-field select { width: 100%; min-height: 52px; padding: .6rem 1rem .6rem 2.8rem; font: inherit; font-size: 1.05rem; color: var(--ink); background-color: var(--bg-alt); border: 1px solid transparent; border-radius: 12px; appearance: none; -webkit-appearance: none; }
.search-field select { padding-right: 2.4rem; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6878' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.search-field input::placeholder { color: #7a8594; }
.search-field input:focus, .search-field select:focus { outline: none; border-color: var(--brand); background-color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.search-box .btn { min-height: 52px; padding-inline: 1.75rem; font-size: 1.05rem; border-radius: 12px; }
@media (min-width: 720px) {
    .search-box { grid-template-columns: minmax(0, 1fr) 13.5rem auto; gap: 0; padding: .4rem; border-radius: 999px; }
    .search-field input, .search-field select { background-color: transparent; border-radius: 999px; }
    .search-field-state::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); }
    .search-box .btn { border-radius: 999px; margin-left: .25rem; }
}
.hero-browse { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.1rem; font-size: .95rem; color: var(--muted); }
.hero-browse .chip { background: rgb(255 255 255 / .8); }

/* Frank's card: his face sits on the top edge */
.hero-card { position: relative; max-width: 26rem; padding: 3.25rem 1.5rem 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 2px 4px rgb(16 24 40 / .04), 0 16px 40px rgb(27 42 65 / .12); }
.hero-card img { position: absolute; top: -44px; left: 1.5rem; width: 88px; height: 88px; border-radius: 50%; box-shadow: 0 0 0 6px #fff; }
.hero-stat { margin: 0 0 1rem; color: var(--ink); font-weight: 600; line-height: 1.4; }
.hero-stat strong { display: block; font-size: 2.6rem; line-height: 1.05; letter-spacing: -.02em; color: var(--brand-strong); }
.hero-trust { display: grid; gap: .6rem; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .95rem; color: var(--text); }
.hero-trust li { display: flex; align-items: flex-start; gap: .55rem; line-height: 1.4; }
.hero-trust .icon { flex: none; width: 20px; height: 20px; color: var(--success); }
.theme-tiles .feature { display: grid; grid-template-columns: 48px 1fr; gap: 0 1rem; align-items: start; padding: 1.25rem; }
.theme-tiles .feature-icon { margin: 0; grid-row: span 2; }
.theme-tiles .feature h3 { font-size: 1.1rem; margin: .1rem 0 .25rem; }
.theme-tiles .feature p { font-size: .95rem; }
.theme-tiles .feature .count { display: block; margin-top: .4rem; font-size: .85rem; color: var(--brand-strong); font-weight: 700; }
.how .feature { position: relative; padding-top: 1.5rem; }
.how .step { position: absolute; top: -14px; left: 1.25rem; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .95rem; }

/* ---- Frank: the persona card. Plain on the site; the voice lives on social. --------------------------------- */
.frank { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: start; padding: 1.25rem; border-radius: var(--radius); background: var(--navy-soft); }
.frank img { width: 72px; height: 72px; }
.frank p { margin: 0 0 .5rem; }
.frank p:last-child { margin-bottom: 0; }
.frank .fine-print { margin: 0; }
@media (max-width: 480px) { .frank { grid-template-columns: 1fr; } .frank img { width: 56px; height: 56px; } }

/* ---- Directory (programs.tpl) --------------------------------------------------------------------------------- */
.dir-search .input-group input { min-height: 56px; font-size: 1.05rem; }
.dir-search .btn { min-height: 56px; }
.dir-layout { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .dir-layout { grid-template-columns: 17rem minmax(0, 1fr); align-items: start; } }
.dir-filters { padding: 1.25rem; border-radius: var(--radius); background: var(--navy-soft); }
.dir-filters h2 { font-size: 1rem; margin-bottom: .75rem; }
.dir-filters .field + .field, .dir-filters fieldset { margin-top: 1rem; }
.dir-filters fieldset { border: 0; padding: 0; min-width: 0; margin-inline: 0; }
.dir-filters legend { padding: 0; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: .4rem; }
.dir-filters .check { min-height: 32px; }
.dir-filters .chips { gap: .4rem; }
.dir-filters .chip { font-size: .85rem; padding: .3rem .7rem; }
.dir-filters .actions { margin-top: 1.25rem; display: grid; gap: .5rem; }
.dir-filters details summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.dir-filters details summary::-webkit-details-marker { display: none; }
.dir-filters details summary::after { content: ""; width: .5em; height: .5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dir-filters details[open] summary::after { transform: rotate(-135deg); }
@media (min-width: 900px) { .dir-filters details summary { pointer-events: none; } .dir-filters details summary::after { display: none; } .dir-filters details { } }
.dir-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1rem; }
.dir-head h2 { font-size: 1.15rem; margin: 0; }
.dir-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.active-filters .chip { background: var(--brand-soft); border-color: transparent; }
.active-filters .chip:hover { border-color: var(--brand); }

/* Program cards (partials/program_card.tpl) */
.program-card .card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; height: 100%; }
.program-card h3 { font-size: 1.15rem; margin: 0; line-height: 1.3; }
.program-card .meta { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.program-card .meta li { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; background: var(--bg-alt); color: var(--text); font-weight: 600; }
.program-card .meta li.where { background: var(--navy-soft); color: var(--ink); }
.program-card .meta li.verified { background: #e7f4ec; color: var(--success); }
.program-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.program-card .elig { color: var(--text); }
.program-card .links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: auto; padding-top: .5rem; font-weight: 700; }
.program-card .links a { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; }
.official::after { content: ""; display: inline-block; width: .8em; height: .8em; margin-left: .1em; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat; }
.empty { padding: 2rem 1.25rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---- Labelled link-outs: sponsored results, partner offers. The label is part of the component. ------------ */
.slot-label { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.rsoc { padding: 1rem 1.25rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); background: var(--bg); }
.rsoc p { margin: 0 0 .5rem; }
.rsoc .btn { margin-top: .25rem; }
.partner { padding: 1.25rem; border-radius: var(--radius); background: var(--brand-soft); }
.partner h3 { font-size: 1.1rem; margin: 0 0 .35rem; }
.partner p { margin: 0 0 .75rem; color: var(--text); }
.partner .price { font-weight: 700; color: var(--brand-strong); }
.call-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--ink); color: #fff; }
.call-bar p { margin: 0; }
.call-bar .fine-print { color: var(--dark-text); }
.call-bar .btn { background: #fff; color: var(--ink); }
.call-bar .btn:hover { background: var(--bg-alt); color: var(--ink); }
.tpmo { padding: 1rem 1.25rem; border-radius: var(--radius-sm); background: var(--bg-alt); font-size: .95rem; }
.tpmo p { margin: 0; }
.tpmo .placeholder { background: #fff3c4; padding: 0 .25rem; border-radius: 3px; }

/* ---- Program page (program.tpl) ------------------------------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .5rem; }
.program-head { padding-block: calc(var(--space) * .6); background: var(--navy-soft); }
.program-head h1 { margin-bottom: .5rem; }
.program-head .meta { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .75rem 0 0; list-style: none; font-size: .9rem; }
.program-head .meta li { padding: .2rem .7rem; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; }
.program-head .agency { color: var(--muted); margin: 0; }
.program-body { display: grid; gap: 2rem; }
@media (min-width: 900px) { .program-body { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; } .program-aside { position: sticky; top: 84px; } }
.program-body h2 { font-size: 1.3rem; margin-top: 0; }
.program-section + .program-section { margin-top: 2rem; }
.elig-list { display: grid; gap: .5rem; padding: 0; margin: .75rem 0 0; list-style: none; }
.elig-list li { display: flex; gap: .6rem; align-items: flex-start; }
.elig-list .icon { flex: none; width: 20px; height: 20px; color: var(--success); margin-top: .2rem; }
.apply-card { padding: 1.25rem; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.apply-card h2 { font-size: 1.1rem; }
.apply-card .btn { width: 100%; }
.apply-card dl { margin: 1rem 0 0; display: grid; gap: .5rem; font-size: .95rem; }
.apply-card dt { font-weight: 600; color: var(--ink); }
.apply-card dd { margin: 0; overflow-wrap: anywhere; }
.verified-line { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.verified-line .icon { flex: none; width: 18px; height: 18px; color: var(--success); margin-top: .15rem; }
.capture { padding: 1.5rem; border-radius: var(--radius); background: var(--brand-soft); }
.capture h2 { font-size: 1.2rem; margin-bottom: .35rem; }
.capture p { margin: 0 0 .75rem; }
.capture .input-group { flex-wrap: wrap; }
.capture .input-group input { flex: 1 1 14rem; }

/* ---- Guide pages (guide.tpl) ----------------------------------------------------------------------------------- */
.guide-head { background: linear-gradient(180deg, var(--navy-soft), var(--bg)); padding-block: calc(var(--space) * .7) calc(var(--space) * .35); }
.guide-head + .section { padding-top: calc(var(--space) * .4); }
.guide-head .eyebrow { color: var(--brand-strong); }
.guide-state { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; }
.guide-state select { min-height: 48px; padding: .5rem 2.4rem .5rem .9rem; font: inherit; border: 1px solid #c3c9d4; border-radius: var(--radius-sm); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235d6779' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .9rem center; appearance: none; color: var(--ink); }
.guide-state .btn { min-height: 48px; }
.guide-body { display: grid; gap: 2rem; }
.guide-body h2 { font-size: 1.35rem; }
.guide-list { display: grid; gap: 1rem; }
.state-grid { columns: 2; column-gap: 1.5rem; padding: 0; margin: 0; list-style: none; font-size: .95rem; }
@media (min-width: 600px) { .state-grid { columns: 3; } }
@media (min-width: 900px) { .state-grid { columns: 4; } }
.state-grid li a { display: block; padding: .35rem 0; min-height: 36px; }

/* ---- Legal and about pages ------------------------------------------------------------------------------------- */
.legal h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal .placeholder, .prose .placeholder { background: #fff3c4; padding: 0 .25rem; border-radius: 3px; }
.toc { padding: 1rem 1.25rem; border-radius: var(--radius-sm); background: var(--bg-alt); }
.toc ul { margin: 0; columns: 2; column-gap: 1.5rem; }

/* ---- Footer: the disclosures block is the last thing on every page ------------------------------------------ */
.site-footer .brand-foot img { height: 36px; width: auto; }
.footer-disclosures { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .12); font-size: .9rem; color: var(--dark-text); display: grid; gap: .5rem; }
.footer-disclosures p { margin: 0; }
.footer-disclosures strong { color: #fff; }

/* ---- Lander (partials/lander.tpl): the same layout as the reference site, with the notice kept on funnel pages */
.lander .fine-print a { color: inherit; }

/* ---- Style guide (styleguide.tpl, development only) ---------------------------------------------------------- */
.sg-swatches { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.sg-swatch { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.sg-swatch > div { height: 64px; }
.sg-swatch p { margin: 0; padding: .5rem .75rem; font-size: .85rem; }
.sg-swatch code { font-size: .8rem; color: var(--muted); }
.sg-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.sg-type > * { margin: 0 0 .5rem; }
.sg-logos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.sg-logos > div { padding: 1.5rem; border-radius: var(--radius-sm); border: 1px solid var(--line); display: grid; place-items: center; }
.sg-logos .on-navy { background: var(--ink); }
