/* Shared theme: use this file on every page in the site. */
:root {
  --brand-primary: #d81b72;
  --brand-primary-text: #c2185b;
  --brand-primary-hover: #b80f5d;
  --brand-primary-soft: #fff0f7;
  --brand-primary-border: #f3b9d5;
  --brand-secondary: #174676;
  --brand-secondary-deep: #102f57;
  --brand-secondary-soft: #edf5ff;
  --brand-accent: #4d93cd;
  --brand-accent-soft: #e4f2ff;
  --surface-page: #fff9fc;
  --surface-raised: #ffffff;
  --surface-hero: #f6ddea;
  --text-primary: #17385f;
  --text-secondary: #59677b;
  --border-default: #eadde5;
  --focus-ring: #d81b72;
  --text-on-dark: #f7f1f7;

  /* Compatibility aliases for the current mockup. */
  --g: var(--brand-primary);
  --g2: var(--brand-primary-hover);
  --gs: var(--brand-primary-soft);
  --b: var(--brand-secondary);
  --bs: var(--brand-secondary-soft);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-default);
  --bg: var(--surface-page);
  --white: var(--surface-raised);
  --amber: var(--brand-accent);
  --as: var(--brand-accent-soft);
}

/* Accessibility pass: readable pink text and independently sized footer targets. */
.text-link,
.article-topic span,
.guide-meta span,
.trust-grid article > span,
.faq-grid details a,
.audience-card > span {
  color: var(--brand-primary-text);
}
.footer li + li { margin-top: 4px; }
.footer li > a,
.footer .footer-trust-links > a {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 4px;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer li > a:hover,
.footer li > a:focus-visible,
.footer .footer-trust-links > a:hover,
.footer .footer-trust-links > a:focus-visible {
  color: var(--brand-primary-text);
}
.footer li > a:active,
.footer .footer-trust-links > a:active {
  background: var(--brand-primary-soft);
}
.copyright { color: #59677b; font-size: .78rem; }
@media (max-width: 740px), (pointer: coarse) {
  .footer li > a,
  .footer .footer-trust-links > a {
    min-height: 48px;
    padding-block: 10px;
  }
}

body { background: var(--surface-page); color: var(--text-primary); }
.top-note,
.rules { background: var(--brand-secondary-deep); }
.top-note { color: #f8eaf2; }
.hero {
  background: linear-gradient(
    145deg,
    var(--surface-hero),
    #dfe9ff 52%,
    #f8d7e8
  );
}
/* Keep the desktop hero's second line together without changing the grid columns. */
@media (min-width: 1021px) {
  .hero h1 {
    max-width: none;
    font-size: clamp(2.7rem, 3.15vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -.045em;
  }

  .hero h1 span {
    display: block;
    white-space: nowrap;
  }
}

@media (min-width: 1200px) {
  .hero h1 { font-size: 60px; }
}
.status { border-color: var(--brand-primary-border); }
.status i { background: var(--focus-ring); }
.search,
.side { border-color: #e6bed2; }
.category.featured { border-color: var(--brand-primary-border); }
.btn:focus-visible,
.official:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
::selection { background: #f3b9d5; color: var(--text-primary); }

.mark,
.btn,
.step { box-shadow: 0 8px 22px rgba(216, 27, 114, .18); }
.action {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 0 23px 23px;
}
.action-image {
  display: block;
  width: calc(100% + 46px);
  height: 150px;
  margin: 0 -23px 20px;
  object-fit: cover;
}
.action .text-link { margin-top: auto; }
.brand-logo {
  display: block;
  width: 174px;
  height: auto;
  flex: 0 0 auto;
}
.footer .brand-logo { width: 190px; }
@media (max-width: 420px) {
  .brand-logo { width: 168px; }
}
.category:nth-child(3n) .cicon,
.qicon { color: var(--brand-secondary); }
.warning,
.verify { color: #855313; background: #fff7e7; }
.schedule-link {
  min-width: 0;
  border-radius: 8px;
}
.schedule-link:hover b,
.schedule-link:focus-visible b { color: var(--brand-primary-text); }
.verify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  white-space: nowrap;
  text-decoration: none;
}
.rules .eyebrow { color: #ffb7d7 !important; }
.rule b { background: #ffe0ef; color: var(--brand-primary-text); }
.source { color: var(--text-on-dark); }
.category::before {
  content: "";
  display: block;
  width: 100%;
  height: 128px;
  margin-bottom: 18px;
  border-radius: 13px;
  background-position: center;
  background-size: cover;
}
.category:nth-child(1)::before {
  background-image: url("assets/welfare-card-v3.png");
  background-image: -webkit-image-set(url("assets/welfare-card-v3-png-480.webp") 1x, url("assets/welfare-card-v3-png-800.webp") 2x);
  background-image: image-set(url("assets/welfare-card-v3-png-480.webp") 1x, url("assets/welfare-card-v3-png-800.webp") 2x);
  background-position: center;
}
.category:nth-child(2)::before {
  background-image: url("assets/sso-v3.png");
  background-image: -webkit-image-set(url("assets/sso-v3-png-480.webp") 1x, url("assets/sso-v3-png-800.webp") 2x);
  background-image: image-set(url("assets/sso-v3-png-480.webp") 1x, url("assets/sso-v3-png-800.webp") 2x);
  background-position: center;
}
.category:nth-child(3)::before {
  background-image: url("assets/unemployment-v2.jpg");
  background-image: -webkit-image-set(url("assets/unemployment-v2-jpg-480.webp") 1x, url("assets/unemployment-v2-jpg-800.webp") 2x);
  background-image: image-set(url("assets/unemployment-v2-jpg-480.webp") 1x, url("assets/unemployment-v2-jpg-800.webp") 2x);
}
.category:nth-child(4)::before {
  background-image: url("assets/co-pay-v3.jpg");
  background-image: -webkit-image-set(url("assets/co-pay-v3-jpg-480.webp") 1x, url("assets/co-pay-v3-jpg-800.webp") 2x);
  background-image: image-set(url("assets/co-pay-v3-jpg-480.webp") 1x, url("assets/co-pay-v3-jpg-800.webp") 2x);
  background-position: center;
}
.category:nth-child(5)::before {
  background-image: url("assets/healthcare-v5.png");
  background-image: -webkit-image-set(url("assets/healthcare-v5-png-480.webp") 1x, url("assets/healthcare-v5-png-800.webp") 2x);
  background-image: image-set(url("assets/healthcare-v5-png-480.webp") 1x, url("assets/healthcare-v5-png-800.webp") 2x);
}
.category:nth-child(6)::before {
  background-image: url("assets/elderly-family-v3.png");
  background-image: -webkit-image-set(url("assets/elderly-family-v3-png-480.webp") 1x, url("assets/elderly-family-v3-png-800.webp") 2x);
  background-image: image-set(url("assets/elderly-family-v3-png-480.webp") 1x, url("assets/elderly-family-v3-png-800.webp") 2x);
}
.category:nth-child(7)::before {
  background-image: url("assets/tax-v3.png");
  background-image: -webkit-image-set(url("assets/tax-v3-png-480.webp") 1x, url("assets/tax-v3-png-800.webp") 2x);
  background-image: image-set(url("assets/tax-v3-png-480.webp") 1x, url("assets/tax-v3-png-800.webp") 2x);
}
.category { min-height: auto; }

/* SEO content hubs: clear internal-link paths without adding visual noise. */
.audience { background: #fff7fb; }
.audience-grid,
.guide-grid,
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.audience-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 3px 13px;
  min-height: 132px;
  padding: 19px;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  background: var(--surface-raised);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.audience-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary-border);
  box-shadow: var(--shadow);
}
.audience-card > span {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary-text);
  font-size: .75rem;
  font-weight: 800;
}
.audience-card strong { align-self: end; font-size: .96rem; }
.audience-card small { color: var(--text-secondary); line-height: 1.55; }
.guide-card {
  display: flex;
  min-height: 268px;
  flex-direction: column;
  padding: 23px;
  border: 1px solid var(--border-default);
  border-radius: 18px;
  background: var(--surface-raised);
  box-shadow: 0 10px 28px rgba(23, 56, 95, .04);
}
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  color: var(--text-secondary);
  font-size: .7rem;
}
.guide-meta span { color: var(--brand-primary-text); font-weight: 800; }
.guide-card h3 { margin: 18px 0 9px; font-size: 1.08rem; line-height: 1.45; }
.guide-card h3 a:hover { color: var(--brand-primary-text); }
.guide-card p { margin: 0 0 22px; color: var(--text-secondary); font-size: .84rem; }
.guide-card > .text-link { margin-top: auto; }
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.faq-grid details {
  align-self: start;
  border: 1px solid var(--border-default);
  border-radius: 15px;
  background: var(--surface-raised);
}
.faq-grid summary {
  min-height: 58px;
  padding: 16px 48px 16px 18px;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 700;
}
.faq-grid details[open] { border-color: var(--brand-primary-border); }
.faq-grid details > div {
  padding: 0 18px 18px;
  color: var(--text-secondary);
  font-size: .86rem;
}
.faq-grid details a { color: var(--brand-primary-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.about { background: linear-gradient(145deg, #fff7fb, #f3f7ff); }
.trust-grid article {
  padding: 22px;
  border: 1px solid var(--border-default);
  border-radius: 17px;
  background: rgba(255, 255, 255, .85);
}
.trust-grid article > span {
  color: var(--brand-primary-text);
  font-size: .75rem;
  font-weight: 800;
}
.trust-grid h3 { margin: 10px 0 6px; font-size: 1rem; }
.trust-grid p { margin: 0; color: var(--text-secondary); font-size: .84rem; }

@media (max-width: 860px) {
  .audience-grid,
  .guide-grid,
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-card:last-child,
  .trust-grid article:last-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .audience-grid,
  .guide-grid,
  .trust-grid,
  .faq-grid { grid-template-columns: 1fr; }
  .guide-card,
  .guide-card:last-child,
  .trust-grid article:last-child { grid-column: auto; }
}

.article-categories { background: linear-gradient(180deg, #fff, #fdf5f9); }
.article-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.article-topic {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--border-default);
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--text-primary);
  transition: .2s;
}
.article-topic:hover {
  border-color: var(--brand-primary-border);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.article-topic.featured {
  grid-column: span 2;
  background: linear-gradient(145deg, #fff0f7, #fff);
  border-color: var(--brand-primary-border);
}
.article-topic span {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary-text);
  font-size: .72rem;
  font-weight: 800;
}
.article-topic h3 { margin: 0 0 7px; color: var(--heading); font-size: 1.05rem; line-height: 1.4; }
.article-topic p { margin: 0; color: var(--text-secondary); font-size: .84rem; }

@media (max-width: 1020px) {
  .article-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 740px) {
  .article-topic-grid { grid-template-columns: 1fr; }
  .article-topic.featured { grid-column: auto; }
  .article-topic { min-height: 0; }
}
