:root {
  --green-950: #17483b;
  --green-900: #205b4a;
  --green-800: #26705a;
  --green-700: #318368;
  --green-600: #429678;
  --green-100: #dff4e7;
  --green-50: #f0faf3;
  --cream: #f8fcf8;
  --yellow: #eecb66;
  --yellow-soft: #fff3c9;
  --ink: #173c32;
  --muted: #5f796e;
  --line: #d9e9df;
  --line-strong: #c8ddcf;
  --white: #fff;
  --red: #9c493f;
  --red-soft: #f9e9e6;
  --orange: #96651f;
  --orange-soft: #fbf0d8;
  --blue: #37657b;
  --blue-soft: #e7f1f5;
  --shadow-sm: 0 2px 4px rgba(19, 50, 40, .04), 0 8px 25px rgba(19, 50, 40, .05);
  --shadow-lg: 0 28px 80px rgba(12, 43, 34, .18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 11px 14px; color: white; background: var(--green-950); border-radius: 9px; transform: translateY(-160%); text-decoration: none; font-weight: 850; }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 264px; padding: 27px 20px 22px; display: flex; flex-direction: column; color: var(--ink); background: linear-gradient(165deg, #e1f4e8 0%, #eff8e9 58%, #fff8df 125%); border-right: 1px solid #cee4d5; }
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 30px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--green-950); text-decoration: none; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 18px; letter-spacing: -.03em; }
.brand small { margin-top: 2px; color: #5c8474; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.brand-symbol { position: relative; width: 35px; height: 35px; display: block; transform: rotate(-6deg); }
.brand-symbol span { position: absolute; bottom: 4px; width: 8px; background: var(--yellow); border-radius: 3px 3px 1px 1px; }
.brand-symbol span:nth-child(1) { left: 3px; height: 17px; }
.brand-symbol span:nth-child(2) { left: 14px; height: 27px; }
.brand-symbol span:nth-child(3) { left: 25px; height: 22px; }
.sidebar-close { display: none; width: 35px; height: 35px; color: var(--green-950); background: rgba(255,255,255,.65); border: 1px solid #cce1d3; border-radius: 50%; font-size: 22px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { min-height: 46px; padding: 0 13px; display: flex; align-items: center; gap: 12px; color: #477363; background: transparent; border: 0; border-radius: 11px; cursor: pointer; text-align: left; font-size: 13px; font-weight: 750; }
.nav-item > span { width: 21px; color: #5f947f; font-size: 20px; text-align: center; }
.nav-item b { min-width: 24px; margin-left: auto; padding: 3px 6px; color: #557b6d; background: rgba(255,255,255,.62); border-radius: 999px; text-align: center; font-size: 10px; }
.nav-item:hover { color: var(--green-950); background: rgba(255,255,255,.58); }
.nav-item.active { color: var(--green-950); background: white; box-shadow: inset 3px 0 var(--green-600), 0 6px 18px rgba(38,112,90,.09); }
.nav-item.active > span { color: var(--green-700); }
.nav-item.active b { color: var(--green-800); background: var(--green-100); }
.sidebar-divider { height: 1px; margin: 23px 9px; background: #c9dfd1; }
.nav-label { margin: 0 11px 10px; color: #648a7b; font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.territory-button { width: 100%; padding: 12px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; color: var(--green-950); background: rgba(255,255,255,.72); border: 1px solid #c8e0d0; border-radius: 12px; cursor: pointer; text-align: left; box-shadow: 0 5px 16px rgba(38,112,90,.05); }
.territory-button:hover { background: white; border-color: #a8cdb8; }
.territory-button > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.territory-button small { color: #6b8d7f; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.territory-button strong { margin-top: 3px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.territory-pin { display: grid; place-items: center; width: 30px; height: 30px; color: var(--green-800); background: var(--yellow-soft); border-radius: 9px; font-size: 19px; }
.sidebar-spacer { flex: 1; }
.coverage-card { padding: 14px; display: flex; align-items: flex-start; gap: 10px; background: rgba(255,255,255,.72); border: 1px solid #cce3d4; border-radius: 13px; box-shadow: 0 6px 20px rgba(38,112,90,.05); }
.coverage-icon { flex: 0 0 auto; display: grid; place-items: center; width: 25px; height: 25px; color: var(--green-950); background: var(--yellow); border-radius: 7px; font-weight: 900; }
.coverage-card strong { color: var(--green-950); font-size: 11px; }
.coverage-card p { margin: 4px 0 0; color: #648477; font-size: 10px; line-height: 1.45; }
.sidebar-links { margin-top: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.sidebar-links a, .sidebar-links button { padding: 0; color: #52786a; background: transparent; border: 0; cursor: pointer; font-size: 12px; text-decoration: none; }
.sidebar-links a:hover, .sidebar-links button:hover { color: var(--green-950); text-decoration: underline; }
.privacy-chip { margin-top: 13px; display: flex; align-items: center; gap: 7px; color: #638679; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.privacy-chip > span { width: 6px; height: 6px; background: #62bf92; border-radius: 50%; box-shadow: 0 0 0 3px rgba(98,191,146,.11); }
.sidebar-overlay { display: none; }

.main-content { min-height: 100vh; margin-left: 264px; }
.topbar { height: 68px; padding: 0 clamp(22px, 4vw, 55px); display: flex; align-items: center; gap: 14px; background: rgba(250,255,250,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-title { display: flex; flex-direction: column; }
.topbar-title strong { font-size: 13px; }
.topbar-title span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.sync-status { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #557168; font-size: 11px; font-weight: 700; }
.sync-status > span { width: 7px; height: 7px; background: #53a77e; border-radius: 50%; box-shadow: 0 0 0 4px rgba(83,167,126,.11); }
.topbar-app-link { margin-left: 10px; padding: 9px 12px; color: white; background: var(--green-700); border-radius: 9px; text-decoration: none; font-size: 12px; font-weight: 850; white-space: nowrap; }
.topbar-app-link:hover { background: var(--green-900); }
.menu-button { display: none; width: 38px; height: 38px; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.menu-button span { display: block; height: 2px; margin: 3px 0; background: var(--ink); border-radius: 2px; }

.hero { padding: 68px clamp(24px, 5.2vw, 82px) 58px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); align-items: center; gap: clamp(38px, 6vw, 90px); background: radial-gradient(circle at 82% 8%, rgba(255,218,111,.26), transparent 25%), radial-gradient(circle at 18% 100%, rgba(136,207,170,.2), transparent 30%), linear-gradient(135deg, #ebf9f0 0%, #fffaf0 58%, #eef7ff 100%); border-bottom: 1px solid var(--line); }
.hero-copy { max-width: 770px; }
.eyebrow { margin-bottom: 19px; color: #567168; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.eyebrow > span { margin-right: 8px; padding: 6px 8px; color: var(--green-950); background: var(--yellow); border-radius: 6px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
h1, h2, h3 { margin: 0; letter-spacing: -.045em; }
h1 { max-width: 750px; font-size: clamp(46px, 5.5vw, 74px); line-height: .99; font-weight: 820; }
h1 em { color: var(--green-700); font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.hero-copy > p { max-width: 690px; margin: 23px 0 0; color: #5d6b65; font-size: 17px; line-height: 1.62; }
.hero-search { max-width: 755px; height: 67px; margin-top: 31px; padding: 7px 7px 7px 21px; display: flex; align-items: center; gap: 14px; background: white; border: 1px solid #d8e3dc; border-radius: 16px; box-shadow: 0 16px 45px rgba(30,72,57,.1); }
.search-glyph { position: relative; flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid #64746e; border-radius: 50%; }
.search-glyph::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 7px; height: 2px; background: #64746e; transform: rotate(45deg); border-radius: 2px; }
.hero-search input { flex: 1; min-width: 0; height: 100%; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 15px; }
.hero-search input::placeholder { color: #89938f; }
.hero-search button, .primary-button { height: 51px; padding: 0 21px; color: white; background: var(--green-700); border: 0; border-radius: 11px; cursor: pointer; font-size: 12px; font-weight: 850; }
.hero-search button:hover, .primary-button:hover { background: var(--green-900); transform: translateY(-1px); }
.popular-searches { margin-top: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #7b8782; font-size: 10px; }
.popular-searches button { padding: 4px 8px; color: #52655e; background: transparent; border: 0; border-bottom: 1px solid #b8c8bf; cursor: pointer; font-size: 10px; }
.popular-searches button:hover { color: var(--green-700); border-color: var(--green-700); }
.hero-app-link { width: fit-content; margin-top: 19px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; color: var(--green-950); background: rgba(255,255,255,.76); border: 1px solid #cfe3d6; border-radius: 12px; text-decoration: none; box-shadow: 0 8px 22px rgba(38,112,90,.06); }
.hero-app-link > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; color: white; background: var(--green-700); border-radius: 8px; font-size: 12px; }
.hero-app-link > span:nth-child(2) { display: flex; flex-direction: column; }
.hero-app-link strong { font-size: 12px; }
.hero-app-link small { margin-top: 2px; color: #648477; font-size: 11px; }
.hero-app-link > b { margin-left: 5px; color: var(--green-700); }
.hero-app-link:hover { transform: translateY(-2px); background: white; border-color: #a8cdb8; }

.hero-panel { padding: 23px; color: var(--ink); background: linear-gradient(150deg, rgba(255,255,255,.96), #e4f6ea); border: 1px solid #c9e4d4; border-radius: 21px; box-shadow: 0 24px 60px rgba(38,112,90,.13); }
.panel-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; color: var(--green-900); font-size: 10px; }
.panel-head small { color: #648678; }
.live-dot { width: 7px; height: 7px; background: #67c395; border-radius: 50%; box-shadow: 0 0 0 4px rgba(103,195,149,.11); }
.catalog-total { margin-top: 26px; padding-bottom: 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #d4e8dc; }
.catalog-total > strong { color: var(--green-700); font-size: 58px; line-height: .85; letter-spacing: -.07em; }
.catalog-total > span { color: #668378; font-size: 11px; line-height: 1.4; }
.catalog-split { padding: 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-bottom: 1px solid #d4e8dc; }
.catalog-split > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.catalog-split p { margin: 0; color: #668378; font-size: 10px; }
.catalog-split p strong { display: block; color: var(--ink); font-size: 17px; }
.stat-icon { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 9px; font-weight: 900; }
.stat-icon.state { color: var(--green-950); background: var(--yellow); }
.stat-icon.region { color: var(--blue); background: var(--blue-soft); }
.panel-foot { padding-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.panel-foot span { padding: 6px 8px; color: #537568; background: rgba(255,255,255,.75); border: 1px solid #d7e9de; border-radius: 7px; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }

.discovery, .catalog { padding-left: clamp(24px, 5.2vw, 82px); padding-right: clamp(24px, 5.2vw, 82px); }
.discovery { padding-top: 54px; padding-bottom: 49px; background: white; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-heading.compact { align-items: center; }
.section-kicker { margin: 0 0 7px; color: var(--green-700); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
h2 { font-size: clamp(29px, 3vw, 42px); line-height: 1.08; }
.section-heading > div > p:last-child:not(.section-kicker) { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.text-button { color: var(--green-700); background: transparent; border: 0; cursor: pointer; font-size: 11px; font-weight: 850; }
.text-button:hover { color: var(--green-950); transform: translateX(2px); }
.need-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 11px; }
.need-card { min-height: 109px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; background: #fbfffc; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; text-align: left; transition: 180ms ease; }
.need-card:hover { transform: translateY(-3px); background: white; border-color: #bdd1c6; box-shadow: var(--shadow-sm); }
.need-card.active { background: var(--green-50); border-color: #a5c9b7; }
.need-icon, .category-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; font-size: 15px; }
.need-card strong { margin-top: 12px; font-size: 12px; letter-spacing: -.02em; }
.need-card small { margin-top: 3px; color: #84908b; font-size: 9px; }

.category-desempleo { color: #805829; background: #f7ebd9; }
.category-sociales { color: #23664f; background: #deefe7; }
.category-vivienda { color: #3b6381; background: #e2edf5; }
.category-familia { color: #8b4e63; background: #f5e4eb; }
.category-educacion { color: #514f8a; background: #e9e7f7; }
.category-emprendedores { color: #7a5c1c; background: #f5edcf; }
.category-discapacidad { color: #496b50; background: #e4eee5; }
.category-energia { color: #4d6e25; background: #edf3d8; }
.category-agricultura { color: #496c38; background: #e7f0df; }
.category-cultura { color: #7c4c7b; background: #f0e4f0; }

.catalog { padding-top: 63px; padding-bottom: 130px; }
.view-actions { display: flex; gap: 6px; }
.icon-button { width: 35px; height: 35px; color: #82908a; background: white; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 16px; }
.icon-button.active, .icon-button:hover { color: white; background: var(--green-800); border-color: var(--green-800); }
.filter-shell { margin-top: 27px; background: #fffefa; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 7px 25px rgba(38,112,90,.05); }
.scope-tabs { padding: 0 18px; display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.scope-tab { flex: 0 0 auto; min-height: 51px; padding: 0 2px; color: #7c8883; background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.scope-tab span { margin-left: 4px; color: #9da7a3; font-size: 9px; }
.scope-tab.active { color: var(--green-800); border-bottom-color: var(--green-700); }
.scope-tab.active span { color: var(--green-700); }
.filter-row { padding: 14px; display: grid; grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(155px, 1fr)) 41px; gap: 9px; }
.filter-control { min-width: 0; height: 48px; padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; background: #f1faf4; border: 1px solid #d4e8dc; border-radius: 10px; }
.filter-control.search-filter { padding: 0 14px; flex-direction: row; align-items: center; gap: 12px; }
.filter-control.search-filter .search-glyph { width: 15px; height: 15px; border-width: 1.5px; }
.filter-control input, .filter-control select { width: 100%; min-width: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 11px; font-weight: 700; }
.filter-control input::placeholder { color: #939d99; font-weight: 500; }
.filter-label { margin-bottom: 2px; color: #8b9691; font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.reset-button { width: 41px; height: 48px; color: var(--green-700); background: var(--yellow-soft); border: 1px solid #eadba8; border-radius: 10px; cursor: pointer; font-size: 18px; }
.reset-button:hover { color: var(--green-700); background: var(--green-50); }
.results-toolbar { margin: 25px 1px 13px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 10px; }
.results-toolbar strong { color: var(--ink); font-size: 14px; }
.results-toolbar label { display: flex; align-items: center; gap: 6px; }
.results-toolbar select { color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 10px; font-weight: 800; }
.active-filters { min-height: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.active-filters:not(:empty) { margin-bottom: 13px; }
.filter-chip { padding: 6px 9px; color: var(--green-800); background: var(--green-100); border: 0; border-radius: 999px; font-size: 9px; font-weight: 800; }
.filter-chip button { margin-left: 4px; padding: 0; color: inherit; background: transparent; border: 0; cursor: pointer; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card-grid.list-view { grid-template-columns: 1fr; }
.aid-card { position: relative; min-width: 0; padding: 19px; display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(180deg, #ffffff 0%, #fbfffc 100%); border: 1px solid #d7e8dd; border-radius: var(--radius-md); transition: 180ms ease; }
.aid-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #72bf96, #f0cf65, #82b8d2); opacity: .75; }
.aid-card:hover { transform: translateY(-3px); border-color: #c4d4cb; box-shadow: var(--shadow-sm); }
.aid-card-head { min-height: 35px; display: flex; align-items: center; gap: 9px; }
.status-badge { margin-left: auto; padding: 5px 7px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-size: 8px; font-weight: 850; white-space: nowrap; }
.status-badge > span { width: 5px; height: 5px; border-radius: 50%; }
.status-badge.open { color: #25654d; background: #e1f1e8; }
.status-badge.open > span { background: #3c9870; }
.status-badge.closed { color: var(--red); background: var(--red-soft); }
.status-badge.closed > span { background: #c26c60; }
.status-badge.check { color: var(--orange); background: var(--orange-soft); }
.status-badge.check > span { background: #c58b35; }
.save-button { width: 29px; height: 29px; display: grid; place-items: center; color: #81908a; background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 17px; }
.save-button:hover { color: var(--red); background: var(--red-soft); }
.save-button.saved { color: white; background: var(--red); }
.aid-meta { margin-top: 15px; display: flex; align-items: center; gap: 7px; color: #89948f; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.aid-meta span + span::before { content: "·"; margin-right: 7px; }
.aid-card h3 { margin-top: 9px; min-height: 48px; font-size: 18px; line-height: 1.3; }
.aid-description { min-height: 57px; margin: 9px 0 0; color: #66736e; font-size: 10.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aid-facts { margin-top: 15px; padding: 13px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid #edf0ed; border-bottom: 1px solid #edf0ed; }
.aid-facts > div { min-width: 0; }
.aid-facts > div + div { padding-left: 10px; border-left: 1px solid #edf0ed; }
.aid-facts span { display: block; margin-bottom: 4px; color: #919a96; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.aid-facts strong { color: #3d4e47; font-size: 9.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.simulator-badge { margin-top: 11px; padding: 10px 11px; align-items: center; gap: 9px; color: var(--green-900); background: linear-gradient(110deg, #e3f6e9, #fff5ce); border: 1px solid #cce6d5; border-radius: 10px; text-decoration: none; transition: 160ms ease; }
.simulator-badge:not([hidden]) { display: flex; }
.simulator-badge:hover { transform: translateY(-1px); border-color: #9fcbb0; box-shadow: 0 7px 18px rgba(38,112,90,.08); }
.simulator-badge .simulator-mark { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; color: white; background: var(--green-700); border-radius: 8px; font-size: 14px; }
.simulator-badge > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.simulator-badge strong { font-size: 8.5px; line-height: 1.25; }
.simulator-badge small { margin-top: 3px; color: #668378; font-size: 7.5px; font-weight: 700; }
.simulator-badge small b { color: var(--green-800); }
.detail-simulator { margin-top: 22px; padding: 13px; }
.detail-simulator strong { font-size: 10px; }
.detail-simulator small { font-size: 8.5px; }
.aid-card-actions { margin-top: auto; padding-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-button { padding: 0; color: var(--green-700); background: transparent; border: 0; cursor: pointer; font-size: 10px; font-weight: 850; }
.detail-button:hover { color: var(--green-950); }
.compare-toggle { display: flex; align-items: center; gap: 6px; color: #7c8883; cursor: pointer; font-size: 9px; font-weight: 750; }
.compare-toggle input { position: absolute; opacity: 0; }
.compare-toggle > span { width: 16px; height: 16px; display: grid; place-items: center; border: 1.5px solid #bcc7c1; border-radius: 5px; }
.compare-toggle input:checked + span { background: var(--green-700); border-color: var(--green-700); }
.compare-toggle input:checked + span::after { content: "✓"; color: white; font-size: 10px; font-weight: 900; }
.compare-toggle input:focus-visible + span { outline: 3px solid rgba(44,128,99,.18); }
.card-grid.list-view .aid-card { display: grid; grid-template-columns: 60px minmax(190px, .7fr) minmax(210px, 1fr) minmax(260px, .8fr) auto; align-items: center; gap: 15px; }
.card-grid.list-view .aid-card-head { grid-column: 1; grid-row: 1 / span 2; }
.card-grid.list-view .aid-card-head .status-badge, .card-grid.list-view .aid-card-head .save-button { position: absolute; top: 17px; }
.card-grid.list-view .aid-card-head .status-badge { right: 56px; }
.card-grid.list-view .aid-card-head .save-button { right: 18px; }
.card-grid.list-view .aid-meta { grid-column: 2; margin: 0; }
.card-grid.list-view h3 { grid-column: 2; min-height: 0; margin: 0; }
.card-grid.list-view .aid-description { grid-column: 3; grid-row: 1 / span 2; min-height: 0; margin: 0; }
.card-grid.list-view .aid-facts { grid-column: 4; grid-row: 1 / span 2; margin: 0; padding: 0 15px; border: 0; border-left: 1px solid var(--line); }
.card-grid.list-view .simulator-badge { display: none; }
.card-grid.list-view .aid-card-actions { grid-column: 5; grid-row: 1 / span 2; flex-direction: column; padding: 0; }
.empty-state { padding: 70px 24px; text-align: center; background: white; border: 1px dashed #c7d2cb; border-radius: var(--radius-md); }
.empty-icon { display: grid; place-items: center; width: 47px; height: 47px; margin: 0 auto; color: var(--green-700); background: var(--green-50); border-radius: 50%; font-size: 22px; }
.empty-state h3 { margin-top: 14px; }
.empty-state p { margin: 7px 0 18px; color: var(--muted); font-size: 11px; }
.load-more-wrap { margin-top: 25px; text-align: center; }
.load-more { padding: 12px 19px; color: var(--green-800); background: white; border: 1px solid #bfd0c6; border-radius: 10px; cursor: pointer; font-size: 10px; font-weight: 850; }
.load-more:hover { color: white; background: var(--green-800); }
.orientation-note { margin-top: 38px; padding: 16px 18px; display: flex; align-items: flex-start; gap: 11px; color: #68756f; background: #f0f2eb; border-radius: 12px; font-size: 9px; line-height: 1.6; }
.orientation-note > span { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; color: var(--green-800); border: 1px solid #aabdb2; border-radius: 50%; font-family: Georgia, serif; font-weight: 800; }
.orientation-note p { margin: 1px 0 0; }

.compare-bar { position: fixed; z-index: 30; left: calc(264px + (100vw - 264px)/2); bottom: 18px; width: min(740px, calc(100vw - 310px)); padding: 11px 12px 11px 15px; transform: translateX(-50%); align-items: center; justify-content: space-between; gap: 15px; color: white; background: var(--green-950); border: 1px solid rgba(255,255,255,.09); border-radius: 15px; box-shadow: 0 18px 55px rgba(8,37,29,.3); }
.compare-bar:not([hidden]) { display: flex; }
.compare-bar-copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
.compare-counter { flex: 0 0 auto; display: grid; place-items: center; width: 29px; height: 29px; color: var(--green-950); background: var(--yellow); border-radius: 8px; font-size: 11px; font-weight: 900; }
.compare-bar-copy p { min-width: 0; margin: 0; display: flex; flex-direction: column; }
.compare-bar-copy strong { font-size: 10px; }
.compare-bar-copy p span { max-width: 360px; margin-top: 2px; overflow: hidden; color: #88a89b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.compare-bar > div:last-child { display: flex; gap: 6px; }
.bar-ghost, .bar-primary { height: 37px; padding: 0 13px; border: 0; border-radius: 9px; cursor: pointer; font-size: 9px; font-weight: 850; }
.bar-ghost { color: #aac0b7; background: transparent; }
.bar-primary { color: var(--green-950); background: white; }

dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; background: rgba(7,31,24,.42); border: 0; }
dialog::backdrop { background: rgba(7,31,24,.42); backdrop-filter: blur(5px); }
dialog[open] { display: flex; }
.detail-dialog { justify-content: flex-end; }
.detail-sheet { position: relative; width: min(690px, 100%); height: 100%; overflow-y: auto; padding: 37px 39px 50px; background: var(--cream); box-shadow: -25px 0 70px rgba(8,34,27,.18); animation: slide-in 220ms ease; }
@keyframes slide-in { from { transform: translateX(35px); opacity: .5; } }
.dialog-close { position: absolute; z-index: 2; top: 22px; right: 22px; width: 38px; height: 38px; color: #596962; background: white; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.dialog-close.static { position: static; flex: 0 0 auto; }
.detail-topline { display: flex; align-items: center; gap: 8px; padding-right: 48px; }
.detail-category { padding: 6px 8px; border-radius: 7px; font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.detail-scope { color: #7e8b85; font-size: 9px; font-weight: 800; }
.detail-sheet h2 { max-width: 570px; margin-top: 18px; padding-right: 30px; font-size: clamp(30px, 4vw, 45px); }
.detail-lead { margin: 15px 0 0; color: #5e6d66; font-size: 13px; line-height: 1.65; }
.detail-organism { margin-top: 13px; color: #82908a; font-size: 9px; font-weight: 700; }
.detail-stats { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-stat { padding: 15px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.detail-stat > span { display: block; margin-bottom: 5px; color: #8d9893; font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.detail-stat strong { font-size: 11px; line-height: 1.45; }
.detail-section { margin-top: 25px; }
.detail-section h3 { margin-bottom: 11px; font-size: 16px; }
.detail-list { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.detail-list li { position: relative; padding: 11px 12px 11px 38px; color: #5f6e67; background: white; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; line-height: 1.5; }
.detail-list li::before { content: "✓"; position: absolute; left: 13px; top: 11px; display: grid; place-items: center; width: 16px; height: 16px; color: var(--green-800); background: var(--green-100); border-radius: 50%; font-size: 8px; font-weight: 900; }
.source-panel { margin-top: 25px; padding: 18px; color: white; background: var(--green-900); border-radius: 13px; }
.source-panel > div:first-child { display: flex; align-items: flex-start; gap: 10px; }
.source-check { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; color: var(--green-950); background: var(--yellow); border-radius: 7px; font-weight: 900; }
.source-panel strong { font-size: 11px; }
.source-panel p { margin: 3px 0 0; color: #a7c0b6; font-size: 9px; }
.source-actions { margin-top: 14px; display: flex; gap: 8px; }
.source-actions a { padding: 10px 12px; color: var(--green-950); background: white; border-radius: 8px; text-decoration: none; font-size: 9px; font-weight: 900; }
.source-actions a.secondary { color: #d7e7e0; background: rgba(255,255,255,.08); }
.detail-warning { margin: 15px 0 0; color: #78857f; font-size: 8.5px; line-height: 1.55; }
.compare-dialog { align-items: center; justify-content: center; padding: 18px; }
.compare-sheet { width: min(1100px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 31px; background: var(--cream); border-radius: 20px; box-shadow: var(--shadow-lg); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.compare-content { margin-top: 25px; overflow-x: auto; }
.comparison-table { width: 100%; min-width: 800px; border-collapse: separate; border-spacing: 0; background: white; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.comparison-table th, .comparison-table td { width: 28%; padding: 13px; text-align: left; vertical-align: top; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 9.5px; line-height: 1.45; }
.comparison-table th:first-child, .comparison-table td:first-child { width: 16%; color: #798680; background: #fafbf8; font-weight: 850; }
.comparison-table thead th { color: var(--ink); background: #edf4ef; font-size: 12px; }
.comparison-table th:last-child, .comparison-table td:last-child { border-right: 0; }
.comparison-table tr:last-child td { border-bottom: 0; }
.comparison-table a { color: var(--green-700); font-weight: 850; }
.compare-note { margin: 15px 0 0; color: #78857f; font-size: 9px; }

.app-promo { margin: 0 clamp(24px, 5.2vw, 82px) 54px; padding: 28px 30px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; color: var(--ink); background: linear-gradient(120deg, #e5f6eb, #fff7d8 70%, #edf7ff); border: 1px solid #cfe4d6; border-radius: 20px; }
.app-promo-mark { width: 64px; height: 64px; padding: 13px; display: flex; align-items: flex-end; gap: 5px; background: var(--green-800); border-radius: 17px; box-shadow: 0 12px 28px rgba(38,112,90,.18); }
.app-promo-mark span { flex: 1; background: var(--yellow); border-radius: 3px 3px 1px 1px; }
.app-promo-mark span:nth-child(1) { height: 46%; }
.app-promo-mark span:nth-child(2) { height: 78%; }
.app-promo-mark span:nth-child(3) { height: 62%; }
.app-promo h2 { font-size: clamp(24px, 3vw, 36px); }
.app-promo p:last-child { max-width: 680px; margin: 8px 0 0; color: #557168; font-size: 14px; line-height: 1.55; }
.app-promo > a { padding: 13px 16px; color: white; background: var(--green-700); border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 850; white-space: nowrap; }
.app-promo > a:hover { background: var(--green-900); transform: translateY(-1px); }

.site-footer { padding: 36px clamp(24px, 5.2vw, 82px) 28px; color: #4f6a60; background: white; border-top: 1px solid var(--line); }
.site-footer > div:first-child { display: flex; align-items: baseline; gap: 14px; }
.site-footer > div:first-child strong { color: var(--green-950); font-size: 17px; }
.site-footer > div:first-child p { margin: 0; font-size: 13px; }
.site-footer nav { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.site-footer a, .site-footer button { padding: 0; color: var(--green-700); background: transparent; border: 0; cursor: pointer; font-size: 13px; font-weight: 750; text-decoration: none; }
.site-footer a:hover, .site-footer button:hover { color: var(--green-950); text-decoration: underline; }
.site-footer > p { margin: 22px 0 0; color: #789087; font-size: 12px; }

.consent-banner { position: fixed; z-index: 80; right: 18px; bottom: 18px; left: calc(264px + 18px); padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #eaf6f0; background: #123e33; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; box-shadow: 0 24px 70px rgba(8,37,29,.34); }
.consent-banner[hidden] { display: none; }
.consent-banner strong { color: white; font-size: 15px; }
.consent-banner p { margin: 5px 0 2px; color: #bdd4ca; font-size: 13px; line-height: 1.45; }
.consent-banner a { color: var(--yellow); font-size: 12px; }
.consent-actions, .consent-dialog-actions { display: flex; align-items: center; gap: 8px; }
.consent-primary, .consent-secondary { min-height: 42px; padding: 0 14px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 850; white-space: nowrap; }
.consent-primary { color: var(--green-950); background: var(--yellow); border: 1px solid var(--yellow); }
.consent-secondary { color: white; background: transparent; border: 1px solid rgba(255,255,255,.32); }
.consent-dialog { align-items: center; justify-content: center; padding: 18px; }
.consent-sheet { width: min(610px, 100%); padding: 28px; color: var(--ink); background: white; border-radius: 18px; box-shadow: var(--shadow-lg); }
.consent-sheet > div:first-child > p:last-child { margin: 9px 0 22px; color: var(--muted); font-size: 14px; }
.consent-option { min-height: 72px; margin-top: 10px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--green-50); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.consent-option > span { display: flex; flex-direction: column; }
.consent-option strong { font-size: 14px; }
.consent-option small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.consent-option input { width: 20px; height: 20px; accent-color: var(--green-700); }
.consent-dialog-actions { margin-top: 22px; justify-content: flex-end; }
.consent-dialog .consent-secondary { color: var(--green-800); border-color: var(--line-strong); }

/* Tamaños de lectura para la versión pública. */
.nav-item { font-size: 14px; }
.coverage-card p, .popular-searches, .popular-searches button, .topbar-title span, .sync-status, .catalog-total > span, .catalog-split p, .section-heading > div > p:last-child:not(.section-kicker), .results-toolbar, .results-toolbar select, .detail-button, .compare-toggle { font-size: 12px; }
.coverage-card strong, .topbar-title strong, .panel-head, .scope-tab, .filter-control input, .filter-control select, .load-more { font-size: 13px; }
.privacy-chip, .nav-label, .section-kicker, .panel-foot span, .filter-label, .aid-meta, .aid-facts span, .status-badge { font-size: 11px; }
.need-card strong { font-size: 14px; }
.need-card small, .aid-facts strong, .source-panel p, .detail-organism, .detail-warning, .compare-note, .comparison-table th, .comparison-table td { font-size: 12px; }
.aid-description { font-size: 14px; }
.aid-card h3 { font-size: 20px; }
.simulator-badge strong { font-size: 12px; }
.simulator-badge small { font-size: 11px; }
.orientation-note { font-size: 12px; }
.detail-lead { font-size: 16px; }
.detail-list li { font-size: 14px; }
.source-panel strong { font-size: 14px; }

@media (max-width: 1200px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .need-grid { grid-template-columns: repeat(5, minmax(105px, 1fr)); }
  .filter-row { grid-template-columns: 1.2fr 1fr 1fr 41px; }
  .filter-row .filter-control:nth-of-type(4) { grid-column: 1 / 4; }
  .card-grid.list-view .aid-card { grid-template-columns: 55px minmax(180px, .7fr) 1fr minmax(220px, .8fr); }
  .card-grid.list-view .aid-card-actions { grid-column: 4; grid-row: 3; flex-direction: row; justify-content: flex-end; }
}

@media (max-width: 1020px) {
  .sidebar { transform: translateX(-100%); transition: transform 220ms ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .sidebar-overlay { display: block; position: fixed; z-index: 19; inset: 0; background: rgba(5,26,20,.46); }
  .sidebar-close, .menu-button { display: block; }
  .main-content { margin-left: 0; }
  .consent-banner { left: 18px; }
  .compare-bar { left: 50%; width: min(740px, calc(100vw - 28px)); }
  .need-grid { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; padding-bottom: 5px; }
}

@media (max-width: 760px) {
  .topbar { height: 62px; padding: 0 15px; }
  .topbar-title span, .sync-status { display: none; }
  .topbar-app-link { margin-left: auto; padding: 9px 10px; }
  .hero { padding: 48px 17px 38px; grid-template-columns: 1fr; gap: 28px; }
  h1 { font-size: 45px; }
  .hero-copy > p { font-size: 15px; }
  .hero-search { height: auto; padding: 9px 12px; flex-wrap: wrap; }
  .hero-search input { height: 43px; }
  .hero-search button { width: 100%; }
  .hero-panel { max-width: 500px; }
  .discovery, .catalog { padding-left: 15px; padding-right: 15px; }
  .discovery { padding-top: 42px; }
  .section-heading { align-items: flex-start; }
  .section-heading.compact { align-items: flex-end; }
  .text-button { max-width: 120px; text-align: right; }
  .filter-row { grid-template-columns: 1fr 41px; }
  .filter-row .filter-control { grid-column: 1 / -1; }
  .filter-row .reset-button { grid-column: 2; grid-row: 1; }
  .filter-row .search-filter { grid-column: 1; grid-row: 1; }
  .scope-tabs { gap: 17px; }
  .card-grid { grid-template-columns: 1fr; }
  .view-actions { display: none; }
  .results-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .card-grid.list-view { grid-template-columns: 1fr; }
  .card-grid.list-view .aid-card { display: flex; }
  .card-grid.list-view .aid-card-head .status-badge, .card-grid.list-view .aid-card-head .save-button { position: static; }
  .card-grid.list-view .aid-description, .card-grid.list-view .aid-facts { margin-top: 12px; padding: 13px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .card-grid.list-view .aid-card-actions { flex-direction: row; justify-content: space-between; }
  .compare-bar { bottom: 9px; }
  .compare-bar-copy p span, .bar-ghost { display: none; }
  .detail-sheet { padding: 28px 18px 45px; }
  .detail-stats { grid-template-columns: 1fr; }
  .source-actions { flex-direction: column; }
  .app-promo { margin-right: 15px; margin-left: 15px; padding: 22px; grid-template-columns: auto 1fr; gap: 16px; }
  .app-promo > a { grid-column: 1 / -1; text-align: center; }
  .site-footer > div:first-child { align-items: flex-start; flex-direction: column; gap: 6px; }
  .consent-banner { right: 10px; bottom: 10px; left: 10px; align-items: stretch; flex-direction: column; }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .consent-actions .consent-primary { grid-column: 1 / -1; grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
