/* ==========================================================================
 * The page of every state (state-benefits.html) -- the owner's approved
 * design: the heading beside a photograph of the Capitol, a card to choose a
 * state in (a search field over a grid of the fifty states and D.C., with a
 * map beside it), the programmes the states run as six cards, and a call to
 * action at the foot. Scoped to .state-index, the page's <main>
 * (build-state-index.js writes the markup).
 *
 * A file of its own, linked from state-benefits.html after styles.css, as
 * guide-hub.css is from the Benefits & Updates page: every other page would
 * otherwise download these rules for nothing. The single-file build
 * (build.js) appends it to the stylesheet it inlines.
 * ========================================================================== */
.doc.state-index {
  position: relative;
  overflow: hidden;
  padding: 0 0 8px;
  background: linear-gradient(180deg, #edf4fe 0, #f6f9fe 460px);
}
.state-index .breadcrumb { position: relative; z-index: 1; background: transparent; border-bottom: 0; padding-top: 14px; }
.state-arrow { flex: none; width: 18px; height: 18px; stroke-width: 2.2; }

/* ---- the heading, its promises, and the Capitol beside them */
/* The photograph sits behind the breadcrumb and the heading, fading into the
   page on its left and at its foot. */
.state-hero__img {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  display: block;
  width: min(60%, 940px);
  height: 430px;
  object-fit: cover;
  object-position: 50% 30%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 26%, #000 52%), linear-gradient(to bottom, #000 62%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 26%, #000 52%), linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-composite: intersect;
}
.state-hero__inner { position: relative; z-index: 1; padding-top: 14px; padding-bottom: 34px; }
.state-hero__kicker {
  margin: 0 0 12px;
  color: #1559c0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.state-index .state-hero__title {
  max-width: 13ch;
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: clamp(2.3rem, 1.2rem + 2.9vw, 3.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #0e2747;
}
.state-hero__accent { display: block; color: #1366d0; }
.state-hero__lede { max-width: 34ch; margin: 0 0 26px; font-size: 1.15rem; line-height: 1.5; color: #3f4c5c; }

/* The three promises: a white disc with the mark, then two lines. */
.state-facts-row { display: flex; flex-wrap: wrap; gap: 14px 0; margin: 0; padding: 0; list-style: none; }
.state-fact { display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.state-fact:first-child { padding-left: 0; }
.state-fact + .state-fact { border-left: 1px solid #d3dce7; }
.state-fact__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sheet);
  color: #1769d6;
  box-shadow: 0 8px 18px -12px rgba(14, 44, 76, 0.55);
}
.state-fact__svg { width: 24px; height: 24px; }
.state-fact__text { display: flex; flex-direction: column; gap: 1px; }
.state-fact__title { font-size: 0.95rem; font-weight: 700; color: #0e2747; }
.state-fact__line { font-size: 0.84rem; color: #4b5868; }

/* ---- choosing a state: the page's main card */
.state-pick { position: relative; z-index: 1; padding: 0 0 26px; }
.state-pick__card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  padding: 28px 30px 26px;
  background: var(--sheet);
  border: 1px solid #e3eaf3;
  border-radius: 22px;
  box-shadow: 0 2px 4px rgba(14, 44, 76, 0.04), 0 22px 44px -30px rgba(14, 44, 76, 0.45);
}
.state-pick__main { min-width: 0; }
.state-pick__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.state-pick__badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e8f1fd;
  color: #1366d0;
}
.state-pick__pin { width: 26px; height: 26px; }
.state-index .state-pick__title {
  margin: 2px 0 4px;
  font-family: var(--font-body);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #0e2747;
}
.state-pick__lede { margin: 0; color: #4b5868; }

/* The search field: a search mark, and the browser's own list of names. */
.state-filter { margin: 0 0 14px; }
.state-filter[hidden] { display: none; }
.state-filter__field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 18px;
  background: var(--sheet);
  /* The site's field edge, 3.5:1 against white: a control's boundary has
     to be seen to be found (WCAG 1.4.11), unlike a card's hairline. */
  border: 1px solid var(--field-border);
  border-radius: 12px;
  cursor: text;
}
.state-filter__field:focus-within { border-color: #1366d0; box-shadow: 0 0 0 3px rgba(19, 102, 208, 0.18); }
.state-filter__icon { flex: none; width: 22px; height: 22px; color: #1366d0; stroke-width: 2.2; }
.state-filter__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0e2747;
  font: inherit;
  font-size: 1rem;
}
.state-filter__input:focus { outline: none; }
.state-filter__input::placeholder { color: #5b6878; opacity: 1; }
.state-filter__status:empty { display: none; }
.state-filter__status {
  margin: -4px 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #eef5fe;
  color: #24364d;
  font-size: 0.92rem;
}

/* The fifty states and D.C., by name, as their two-letter codes. A state
   with a page of its own is a link in the brand's blue; the rest are listed,
   quieter, and say so in the key under them. */
.state-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.state-chip[hidden] { display: none; }
.state-chip,
.state-chip__link {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.state-chip { background: #f3f6fa; color: #5b6878; }
.state-chip--page { background: none; }
.state-chip__link {
  width: 100%;
  background: #e6effd;
  border: 1px solid #b9d0f1;
  color: #1559c0;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.state-chip__link:hover { background: #1366d0; border-color: #1366d0; color: #fff; }
.state-chip__link:focus-visible { outline: 3px solid #1769d6; outline-offset: 2px; }

.state-key { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.86rem; color: #4b5868; }
.state-key__item { display: inline-flex; align-items: center; gap: 8px; }
.state-key__item::before { content: ""; width: 16px; height: 16px; border-radius: 4px; background: #f3f6fa; border: 1px solid #dfe5ee; }
.state-key__item--page::before { background: #e6effd; border-color: #b9d0f1; }
.state-pick__note { margin: 10px 0 0; font-size: 0.88rem; line-height: 1.5; color: #4b5868; }
.state-pick__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1366d0;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.state-pick__all:hover { text-decoration: underline; }
/* The owner's map is drawn on a near-white ground; multiplied, the ground
   takes the card's white and the edge of the picture disappears. */
.state-pick__map { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; mix-blend-mode: multiply; }

/* ---- the programmes the states run */
.state-progs-sec { padding: 6px 0 26px; }
.state-progs-sec__card {
  padding: 26px 28px 28px;
  background: var(--sheet);
  border: 1px solid #e3eaf3;
  border-radius: 22px;
  box-shadow: 0 2px 4px rgba(14, 44, 76, 0.04), 0 22px 44px -32px rgba(14, 44, 76, 0.4);
}
.state-progs-sec__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.state-progs-sec__badge { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: #e8f1fd; }
.state-progs-sec__bars { width: 26px; height: 26px; fill: #1366d0; }
.state-progs-sec__words { flex: 1 1 auto; min-width: 0; }
.state-index .state-progs-sec__title {
  margin: 2px 0 4px;
  font-family: var(--font-body);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #0e2747;
}
.state-progs-sec__lede { margin: 0; color: #4b5868; }
.state-progs-sec__all {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid #b9d0f1;
  border-radius: 999px;
  color: #1366d0;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.state-progs-sec__all:hover { background: #eef5fe; border-color: #1366d0; }
.state-progs-sec__all:focus-visible { outline: 3px solid #1769d6; outline-offset: 2px; }

.state-progs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.state-prog {
  --prog-wash: #e8f1fd;
  --prog-ink: #1366d0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--sheet);
  border: 1px solid #e6edf6;
  border-radius: 14px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.state-prog--energy { --prog-wash: #f0e9fd; --prog-ink: #6a3fc9; }
.state-prog--food { --prog-wash: #e3f5ea; --prog-ink: #1d7f49; }
.state-prog--health { --prog-wash: #fde8ef; --prog-ink: #c42a5e; }
.state-prog--cash { --prog-wash: #fff0df; --prog-ink: #b45309; }
.state-prog--family { --prog-wash: #e6effd; --prog-ink: #1559c0; }
.state-prog--work { --prog-wash: #dff3f3; --prog-ink: #0f6e6e; }
.state-prog:hover { border-color: #c9d9ee; box-shadow: 0 16px 30px -24px rgba(14, 44, 76, 0.55); }
.state-prog:focus-within { outline: 3px solid #1769d6; outline-offset: 2px; }
.state-prog__img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.state-prog__body { display: flex; align-items: center; gap: 14px; padding: 16px 16px 18px; }
.state-prog__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--prog-wash);
  color: var(--prog-ink);
}
.state-prog__svg { width: 26px; height: 26px; }
.state-prog__words { flex: 1 1 auto; min-width: 0; }
.state-index .state-prog__title { margin: 0 0 4px; font-family: var(--font-body); font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.state-prog__link { color: #0e2747; text-decoration: none; }
/* The whole card is the link's target, with no second link inside it. */
.state-prog__link::after { content: ""; position: absolute; inset: 0; }
.state-prog__link:hover { color: #1366d0; text-decoration: underline; }
.state-prog__link:focus-visible { outline: none; }
.state-prog__text { margin: 0; font-size: 0.88rem; line-height: 1.45; color: #4b5868; }
.state-prog__go { flex: none; width: 20px; height: 20px; color: #1366d0; stroke-width: 2.2; }

/* ---- the call to action at the foot */
.state-cta-sec { padding: 6px 0 56px; }
.state-cta {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 46%);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  padding: 0 0 0 30px;
  background: linear-gradient(100deg, #f3f8ff 0%, #e6f0fd 100%);
  border: 1px solid #dbe7f6;
  border-radius: 22px;
  box-shadow: 0 14px 30px -26px rgba(14, 44, 76, 0.45);
}
.state-cta__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--sheet); align-self: start; margin-top: 30px; }
.state-cta__svg { width: 44px; height: 44px; fill: #3b82e0; }
.state-cta__svg .c-post { fill: #1366d0; }
.state-cta__text { padding: 30px 0; }
.state-index .state-cta__title {
  margin: 0 0 6px;
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #0e2747;
}
.state-cta__lede { max-width: 46ch; margin: 0 0 20px; color: #3f4c5c; }
.state-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 30px;
  border-radius: 12px;
  background: #1366d0;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 24px -14px rgba(19, 102, 208, 0.8);
}
.state-cta__btn:hover { background: #0f56b3; color: #fff; }
.state-cta__btn:focus-visible { outline: 3px solid rgba(23, 105, 214, 0.45); outline-offset: 2px; }
.state-cta__img {
  display: block;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  object-position: 50% 45%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%);
  mask-image: linear-gradient(to right, transparent 0%, #000 34%);
}

/* ---- narrower screens */
@media (max-width: 1099px) {
  .state-hero__img { width: 64%; height: 380px; }
  .state-pick__card { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr); gap: 24px; padding: 24px 24px 22px; }
  .state-progs-sec__card { padding: 24px 22px 24px; }
  .state-progs { gap: 16px; }
  .state-prog__body { gap: 12px; padding: 14px 14px 16px; }
  .state-prog__icon { width: 46px; height: 46px; }
  .state-prog__svg { width: 23px; height: 23px; }
  .state-cta { grid-template-columns: auto minmax(0, 1fr) minmax(0, 40%); }
  .state-fact { gap: 10px; padding: 0 14px; }
  .state-fact__icon { width: 42px; height: 42px; }
  .state-fact__svg { width: 21px; height: 21px; }
}
@media (max-width: 959px) {
  /* The map is a picture of what the grid already says; below the width
     where it can stand beside the grid it gives way, and so does the
     picture beside the call to action. */
  .state-pick__card { grid-template-columns: minmax(0, 1fr); }
  .state-pick__map { display: none; }
  .state-progs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state-cta { grid-template-columns: auto minmax(0, 1fr); padding-right: 30px; }
  .state-cta__img { display: none; }
  /* The section's mark, its words, and the button to every programme under
     the words rather than squeezed beside them. */
  .state-progs-sec__head { display: grid; grid-template-columns: auto minmax(0, 1fr); row-gap: 12px; }
  .state-progs-sec__all { grid-column: 2; justify-self: start; }
}
@media (max-width: 699px) {
  /* On a phone the photograph would sit under the heading's words. */
  .state-hero__img { display: none; }
  .state-hero__inner { padding-bottom: 22px; }
  .state-hero__lede { font-size: 1.02rem; margin-bottom: 18px; }
  .state-facts-row { flex-direction: column; gap: 10px; }
  .state-fact { padding: 0; }
  .state-fact + .state-fact { border-left: 0; }
  .state-fact__icon { width: 40px; height: 40px; }
  .state-fact__svg { width: 20px; height: 20px; }
  .state-pick__card, .state-progs-sec__card { padding: 20px 16px; border-radius: 18px; }
  .state-pick__head, .state-progs-sec__head { gap: 12px; }
  .state-pick__badge, .state-progs-sec__badge { width: 40px; height: 40px; }
  .state-index .state-pick__title, .state-index .state-progs-sec__title { font-size: 1.3rem; }
  .state-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .state-cta { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 22px 18px; }
  .state-cta__icon { display: none; }
  .state-cta__text { padding: 0; }
  .state-index .state-cta__title { font-size: 1.35rem; }
  .state-cta__btn { width: 100%; justify-content: center; }
}
@media (max-width: 619px) {
  .state-progs { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .state-prog__icon { width: 40px; height: 40px; }
  .state-prog__svg { width: 20px; height: 20px; }
  .state-prog__body { padding: 12px 14px 14px; }
}
@media (max-width: 379px) {
  .state-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .state-progs-sec__all { grid-column: 1 / -1; }
  .state-filter__field { gap: 10px; padding: 0 14px; }
  .state-filter__input { font-size: 0.94rem; }
}
