:root {
  --ink: #163c6c;
  --muted: rgba(22, 60, 108, 0.72);
  --paper: #ffffff;
  --soft: #f8f4e2;
  --line: rgba(110, 175, 213, 0.34);
  --teal: #5bc5f2;
  --teal-dark: #163c6c;
  --coral: #5bc5f2;
  --sage: #71add5;
  --plum: #6eafd5;
  --gold: #f8ea46;
  --shadow: 0 18px 50px rgba(22, 60, 108, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(110, 175, 213, 0.34);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-image-link {
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: clamp(142px, 16vw, 218px);
  height: auto;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 8px;
}

.nav-links {
  gap: clamp(12px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--teal-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  min-height: calc(100vh - 170px);
  padding: clamp(28px, 5vw, 58px) clamp(18px, 4vw, 56px) 28px;
  gap: clamp(30px, 5vw, 74px);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.45rem, 5.5vw, 4.55rem);
  line-height: 1.02;
  letter-spacing: 0;
  max-width: 660px;
  overflow-wrap: normal;
}

h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  line-height: 1.05;
  overflow-wrap: normal;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
  overflow-wrap: normal;
}

p {
  overflow-wrap: anywhere;
}

.hero-copy > p:not(.eyebrow),
.plan-copy p,
.care-note p {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action,
.clear-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-action {
  color: #ffffff;
  background: var(--teal);
}

.primary-action:hover {
  background: var(--teal-dark);
}

.secondary-action,
.clear-button {
  color: var(--teal-dark);
  background: transparent;
  border-color: var(--line);
}

.secondary-action:hover,
.clear-button:hover {
  background: rgba(91, 197, 242, 0.12);
}

.hero-visual {
  margin: 0;
  min-width: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  filter: drop-shadow(0 24px 42px rgba(22, 60, 108, 0.12));
}

.support-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.support-strip div {
  display: grid;
  gap: 4px;
  padding: 22px clamp(18px, 4vw, 56px);
  background: var(--soft);
}

.support-strip strong {
  font-size: 1.35rem;
}

.support-strip span {
  color: var(--muted);
}

.hero-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 22px 0 4px;
}

.hero-logo-row img {
  display: block;
  width: auto;
  max-width: min(240px, 42vw);
  max-height: 54px;
  object-fit: contain;
}

.quick-paths {
  padding: clamp(42px, 7vw, 76px) clamp(18px, 4vw, 56px);
  background: var(--paper);
}

.quick-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.quick-path-card {
  display: grid;
  gap: 8px;
  min-height: 170px;
  padding: 20px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(22, 60, 108, 0.06);
}

.quick-path-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(22, 60, 108, 0.1);
}

.quick-path-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-path-card strong {
  font-size: 1.25rem;
  line-height: 1.15;
}

.quick-path-card small {
  color: var(--muted);
  font-size: 0.95rem;
}

.workspace {
  padding: clamp(34px, 6vw, 70px) clamp(18px, 4vw, 56px);
  background: rgba(110, 175, 213, 0.1);
}

.filter-ribbon {
  position: sticky;
  top: 70px;
  z-index: 8;
  display: grid;
  gap: 16px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-block: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(22, 60, 108, 0.06);
  backdrop-filter: blur(18px);
}

.filter-ribbon-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.filter-ribbon-head h2 {
  font-size: clamp(1.28rem, 2.3vw, 2rem);
}

.filter-ribbon-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(260px, 0.95fr) auto;
  align-items: end;
  gap: 16px;
}

.filter-field {
  min-width: 0;
}

.filter-field-wide {
  padding: 14px 0 2px;
  border-top: 1px solid rgba(110, 175, 213, 0.28);
}

.mood-filter legend {
  font-size: 1rem;
}

.panel-heading h2,
.library-head h2 {
  font-size: 1.45rem;
}

legend,
.plan-tool label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(91, 197, 242, 0.34);
  outline-offset: 3px;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.tag-chip-group {
  padding-bottom: 2px;
}

.state-chip-group {
  gap: 10px;
}

.chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.chip.is-active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.chip-tag {
  min-height: 40px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--soft);
}

.chip-tag.is-active {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

.chip-state {
  min-height: 48px;
  padding: 0 16px;
  color: var(--ink);
  background: #ffffff;
  border-width: 2px;
  font-weight: 900;
}

.chip-state[data-value="all"] {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--ink);
}

.chip-state[data-value="sobrecarga"] {
  color: #18595b;
  background: #d8f4f2;
  border-color: #72d2ce;
}

.chip-state[data-value="burnout"] {
  color: #6b3b12;
  background: #f8e1c9;
  border-color: #efb073;
}

.chip-state[data-value="depressao"] {
  color: #385925;
  background: #e9f4dc;
  border-color: #a9cf88;
}

.chip-state[data-value="trauma"] {
  color: #163c6c;
  background: #e1edf8;
  border-color: #8fb9dc;
}

.chip-state[data-value="culpa"] {
  color: #685c08;
  background: #fbf4ce;
  border-color: #eadb78;
}

.chip-state.is-active {
  box-shadow: 0 8px 20px rgba(22, 60, 108, 0.12);
}

.chip-state[data-value="all"].is-active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.chip-state[data-value="sobrecarga"].is-active {
  color: #103e40;
  background: #72d2ce;
}

.chip-state[data-value="burnout"].is-active {
  color: #4f2a0b;
  background: #efb073;
}

.chip-state[data-value="depressao"].is-active {
  color: #263f17;
  background: #a9cf88;
}

.chip-state[data-value="trauma"].is-active {
  color: #163c6c;
  background: #8fb9dc;
}

.chip-state[data-value="culpa"].is-active {
  color: #4f4505;
  background: #eadb78;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.library-shell {
  min-width: 0;
  max-width: 1440px;
  margin: 0 auto;
}

.library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.result-count {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.show-more-button {
  display: block;
  min-height: 48px;
  margin: 22px auto 0;
  padding: 0 22px;
  color: #ffffff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.show-more-button:hover {
  background: #5bc5f2;
  border-color: #5bc5f2;
}

.show-more-button[hidden] {
  display: none;
}

.care-card {
  display: grid;
  gap: 16px;
  min-height: 246px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 60, 108, 0.06);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.duration-pill,
.state-pill {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.duration-pill {
  color: var(--muted);
  background: rgba(113, 173, 213, 0.14);
  border-color: rgba(113, 173, 213, 0.22);
}

.state-sobrecarga {
  color: #18595b;
  background: #d8f4f2;
  border-color: #72d2ce;
}

.state-burnout {
  color: #6b3b12;
  background: #f8e1c9;
  border-color: #efb073;
}

.state-depressao {
  color: #385925;
  background: #e9f4dc;
  border-color: #a9cf88;
}

.state-trauma {
  color: #163c6c;
  background: #e1edf8;
  border-color: #8fb9dc;
}

.state-culpa {
  color: #685c08;
  background: #fbf4ce;
  border-color: #eadb78;
}

.card-summary {
  margin: 0;
  color: var(--muted);
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.text-button,
.favorite-button {
  min-height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.text-button {
  padding: 0 12px;
  color: var(--teal-dark);
  background: rgba(91, 197, 242, 0.14);
  border: 1px solid rgba(91, 197, 242, 0.32);
}

.favorite-button {
  display: grid;
  width: 42px;
  place-items: center;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 1.15rem;
}

.favorite-button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.plan-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 520px);
  gap: clamp(22px, 5vw, 70px);
  padding: clamp(42px, 7vw, 86px) clamp(18px, 4vw, 56px);
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.plan-tool {
  display: grid;
  gap: 12px;
  align-self: start;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.plan-result {
  display: grid;
  gap: 10px;
  min-height: 88px;
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(91, 197, 242, 0.32);
  border-radius: 8px;
}

.plan-result strong {
  color: var(--ink);
}

.care-note {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(22px, 5vw, 70px);
  padding: clamp(42px, 7vw, 86px) clamp(18px, 4vw, 56px);
  background: rgba(113, 173, 213, 0.18);
}

.cta-stack {
  display: grid;
  gap: 18px;
}

.cta-stack p {
  margin: 0;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-card {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-card:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 28px rgba(22, 60, 108, 0.08);
}

.contact-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-stack .safety-copy {
  justify-self: center;
  max-width: 760px;
  padding: 16px 18px;
  text-align: center;
  color: var(--ink);
  background: rgba(248, 234, 70, 0.2);
  border: 1px solid rgba(248, 234, 70, 0.78);
  border-radius: 8px;
  font-size: 0.98rem;
  font-weight: 900;
}

.contact-card strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.contact-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-brand img {
  display: block;
  width: 120px;
  max-height: 52px;
  object-fit: contain;
}

.contact-brand span {
  color: var(--muted);
  font-weight: 800;
}

.about-hero {
  display: grid;
  align-items: center;
  min-height: calc(82vh - 62px);
  padding: clamp(42px, 8vw, 96px) clamp(18px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.76) 58%),
    url("assets/cuidador-bem-estar.png") right center / min(56vw, 780px) auto no-repeat,
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.about-hero-copy {
  max-width: 720px;
}

.about-hero-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 660px;
}

.about-section,
.program-section,
.join-section,
.funding-section,
.faq-section {
  padding: clamp(42px, 7vw, 86px) clamp(18px, 4vw, 56px);
}

.about-section,
.join-section,
.faq-section {
  background: var(--paper);
}

.program-section {
  background: rgba(110, 175, 213, 0.1);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.text-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 54px);
  max-width: 1120px;
}

.text-columns p,
.program-card p,
.join-card p,
.funding-main p {
  color: var(--muted);
  margin: 0;
}

.program-grid,
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.join-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.program-card,
.join-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 60, 108, 0.06);
}

.featured-program {
  border-color: rgba(248, 234, 70, 0.9);
  box-shadow: 0 18px 44px rgba(22, 60, 108, 0.1);
}

.program-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  background: var(--gold);
  border-radius: 8px;
  font-weight: 900;
}

.join-card .primary-action,
.join-card .secondary-action {
  justify-self: start;
  margin-top: 8px;
}

.home-join {
  border-bottom: 1px solid var(--line);
}

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 980px;
}

.faq-list details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 60, 108, 0.04);
}

.faq-list summary {
  min-height: 56px;
  padding: 16px 18px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.faq-list summary::marker {
  color: var(--teal);
}

.faq-list details p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
}

.funding-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.75fr);
  gap: clamp(22px, 5vw, 70px);
  align-items: start;
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.funding-main {
  display: grid;
  gap: 14px;
}

.funding-logo {
  display: block;
  width: min(430px, 100%);
  height: auto;
  margin: 2px 0 8px;
}

.municipality-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.municipality-list a {
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(91, 197, 242, 0.16);
  border: 1px solid rgba(91, 197, 242, 0.32);
  border-radius: 999px;
  font-weight: 800;
}

.municipality-list a:hover {
  background: rgba(91, 197, 242, 0.28);
  border-color: var(--teal);
}

.partners-section {
  padding: clamp(42px, 7vw, 86px) clamp(18px, 4vw, 56px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.partner-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.partner-logo-grid img {
  width: 100%;
  height: 96px;
  object-fit: contain;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 60, 108, 0.04);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(22px, 5vw, 70px);
  padding: 28px clamp(18px, 4vw, 56px);
  color: var(--paper);
  background: var(--ink);
}

.footer-main {
  display: grid;
  gap: 12px;
  max-width: 680px;
}

.site-footer .brand-mark {
  color: var(--ink);
  background: var(--paper);
}

.footer-logo {
  display: block;
  width: min(220px, 58vw);
  height: auto;
}

.footer-partner-logo {
  display: block;
  width: 108px;
  max-height: 44px;
  object-fit: contain;
  margin-right: 4px;
}

.footer-main p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: start;
  gap: 10px;
}

.footer-links a {
  min-height: 38px;
  padding: 8px 10px;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  font-weight: 800;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.48);
}

dialog {
  width: min(760px, calc(100% - 28px));
  padding: 0;
  background: transparent;
  border: 0;
}

dialog::backdrop {
  background: rgba(22, 60, 108, 0.46);
  backdrop-filter: blur(4px);
}

.dialog-frame {
  position: relative;
  max-height: min(82vh, 780px);
  overflow: auto;
  padding: clamp(22px, 4vw, 36px);
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.close-dialog {
  position: absolute;
  top: 14px;
  right: 14px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.dialog-meta {
  margin: 10px 0 20px;
  color: var(--muted);
  font-weight: 700;
}

.steps-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.steps-list li {
  padding: 14px;
  background: var(--soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}

@media (max-width: 900px) {
  .hero,
  .workspace,
  .plan-band,
  .care-note,
  .funding-section,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .about-hero {
    min-height: auto;
    background:
      linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)),
      url("assets/cuidador-bem-estar.png") center bottom / 100% auto no-repeat,
      var(--paper);
    padding-bottom: min(58vw, 280px);
  }

  .text-columns,
  .program-grid,
  .join-grid,
  .quick-path-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual img {
    max-height: none;
  }

  .filter-ribbon {
    position: static;
  }

  .filter-ribbon-grid {
    grid-template-columns: 1fr;
  }

  .tag-chip-group {
    padding-bottom: 0;
  }

  .support-strip {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    font-size: 0.9rem;
    gap: 10px;
    overflow-x: auto;
  }

  .library-head,
  .filter-ribbon-head,
  .card-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-actions {
    justify-content: flex-start;
  }

  .result-count {
    white-space: normal;
  }

  .favorite-button {
    width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
