:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #142744;
  background: #f3f6fb;
  font-size: 16px;
  line-height: 1.6;
  --ink: #102746;
  --accent: #164fa3;
  --border: #cfd9e8;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .19em; }
:focus-visible { outline: 3px solid #356ed1; outline-offset: 3px; }
.wrap { width: min(100% - 2rem, 69rem); margin-inline: auto; }
.top { position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 1px solid var(--border); }
.bar, nav { display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; }
.bar { justify-content: space-between; column-gap: 1.5rem; row-gap: 0; padding-block: .25rem; }
.wordmark { font-size: 1.2rem; font-weight: 800; text-decoration: none; color: var(--ink); white-space: nowrap; }
nav { gap: 0 .85rem; font-size: .875rem; }
nav a { white-space: nowrap; }
.bar a, .action, .hero-action a, .section-heading a, .directory a, .guide-steps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.bar a { min-width: 44px; justify-content: center; }
.skip { position: absolute; inset-inline-start: .5rem; top: -5rem; }
.skip:focus { top: 0; z-index: 2; background: white; }
.hero { margin-block: 1rem; border-radius: 1rem; padding: clamp(1rem, 4vw, 2.5rem); background: #e6eefb; }
body[data-kind=home] .hero { background: linear-gradient(120deg, #102746, #173f76); color: white; }
.eyebrow { font-weight: 700; color: #30527c; margin-top: 0; font-size: .875rem; }
body[data-kind=home] :is(.hero .hint, .eyebrow) { color: #d5e4fa; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { font-size: clamp(1.65rem, 5vw, 3rem); line-height: 1.2; margin: .4em 0; letter-spacing: -.03em; }
h2, h3 { line-height: 1.25; }
h2 { margin-top: 0; }
p { margin: .45em 0 .8em; }
section[id], #store-suggestions a { scroll-margin-top: 9rem; }
.panel { margin-block: 1rem; padding: clamp(1rem, 3vw, 1.25rem); border: 1px solid var(--border); border-radius: .9rem; background: #fff; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .85rem; margin-block: .8rem 1rem; }
label { display: grid; gap: .3rem; font-weight: 650; min-width: 0; }
select, input[type=search] { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #8497b2; border-radius: .5rem; color: var(--ink); background: #fff; padding: .45rem .7rem; font: inherit; }
button { min-height: 44px; border: 1px solid var(--border); border-radius: .5rem; padding: .4rem .8rem; background: #fff; color: var(--accent); font: inherit; font-weight: 650; cursor: pointer; }
.action, .hero-action a { margin-top: .2rem; padding: .4rem .9rem; border-radius: .55rem; background: var(--accent); color: white; font-weight: 700; text-decoration: none; }
.store-search { max-width: 44rem; margin-block: 1rem .5rem; }
.store-search label { margin-bottom: .35rem; }
#store-query { height: 50px; }
#store-match-status:empty { display: none; }
#store-suggestions { list-style: none; margin: .55rem 0; padding: .25rem .65rem; border-radius: .55rem; background: white; }
#store-suggestions li + li { border-top: 1px solid var(--border); }
#store-suggestions a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 .65rem; min-height: 48px; padding: .35rem .5rem; text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
#store-suggestions a:is(:hover, [aria-selected=true]) { background: #e6eefb; text-decoration: underline; }
small { font-size: .8125rem; font-weight: 500; color: #455b77; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; }
.section-heading h2 { margin: 0; }
.wallet { border: 1px solid var(--border); border-radius: .6rem; margin-block: .8rem; }
summary { padding: .55rem .8rem; min-height: 44px; cursor: pointer; font-weight: 650; }
.wallet-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .5rem; padding: .8rem; }
.wallet-options label { display: flex; align-items: center; gap: .5rem; padding: .4rem; min-height: 44px; font-weight: 550; }
.wallet-options label[hidden] { display: none; }
.wallet-options input { width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--accent); }
.hint { color: #455b77; font-size: .875rem; }
.cards { display: grid; gap: .85rem; list-style: none; margin: .7rem 0 0; padding: 0; }
.card { padding: clamp(1rem, 3vw, 1.25rem); border: 1px solid var(--border); border-radius: .7rem; background: #f8faff; overflow-wrap: anywhere; }
.card-leading { border-color: #247250; border-inline-start-width: 4px; background: #f1faf6; }
.card-leading .rate { color: #146044; font-size: clamp(1.15rem, 3vw, 1.45rem); }
.card-leading .badges .badge:first-child { font-size: 1rem; padding-inline: .7rem; }
.card h3 { margin: .25rem 0 .65rem; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.badge { background: #e7eef8; color: #264264; font-weight: 700; border-radius: 1rem; padding: .12rem .55rem; font-size: .875rem; }
.badge[data-state=conditional] { color: #5b400f; background: #f7ebcd; }
.badge[data-state=eligible] { color: #234e84; background: #e4edfb; }
.card-leading .badge[data-state=eligible]:first-child { color: #124330; background: #d5ecde; }
.badge[data-state=ineligible] { color: #742c22; background: #f7e5e1; }
.rate { color: var(--accent); font-weight: 780; }
.program { border-inline-start: 2px solid var(--border); padding-inline-start: .75rem; margin-block: .85rem; }
.program ul { padding-inline-start: 1.2rem; }
.sources { margin: .35rem 0 .6rem; padding-inline-start: 1.2rem; font-size: .875rem; color: #455b77; }
.directory ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .45rem; list-style: none; margin-block: .65rem 0; padding: 0; }
.directory ul.genre-links { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr)); align-items: stretch; }
.directory li { min-width: 0; }
.directory li a { width: 100%; height: 100%; padding: .4rem .55rem; border-radius: .45rem; background: #edf3fc; overflow-wrap: anywhere; }
.directory-links a { flex-wrap: wrap; column-gap: .6rem; }
.guide-steps { display: flex; flex-wrap: wrap; gap: .25rem 2rem; padding-inline-start: 1.5rem; margin: 0; font-weight: 700; }
details:not(.wallet) { border-top: 1px solid var(--border); }
footer { color: #455b77; padding-block: 1rem 2rem; font-size: .875rem; }
.wallet-return { position: sticky; bottom: 0; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: .65rem; background: #fff; }
.comparison-scope { color: #264264; font-weight: 700; }
.card-reference > p:first-child { font-weight: 700; }
.card-reference .rate { color: inherit; font-weight: 500; }
.comparison-choice { margin-block: .65rem; }
.comparison-guidance button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.evidence > p:first-child { color: var(--ink); font-weight: 700; }
.evidence time { font-variant-numeric: tabular-nums; }
.sources a, main .panel li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}
