/* 1. Reset / base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, dialog { color: inherit; }
figure, blockquote { margin: 0; }
[hidden] { display: none; }

/* 2. Tokens: mockups take precedence over the general institutional guide. */
:root {
  --color-primary: #000000;
  --color-text: #4a4a4a;
  --color-heading: #111d2a;
  --color-muted: #6a6a6a;
  --color-background: #ffffff;
  --color-accent: #a63e27;
  --color-accent-hover: #81301e;
  --color-link: #07599b;
  --color-border: #dedede;
  --color-soft: #f6f3f0;
  --color-teal: #2d717c;
  --color-footer: #31261f;
  --container: 1172px;
  --radius: 5px;
  --shadow: 0 8px 24px rgb(35 25 15 / 9%);
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --font-primary: 'Open Sans', Arial, sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
}

/* 3. Typography */
@font-face { font-family: 'Open Sans'; src: url('../fonts/open-sans.ttf') format('truetype'); font-weight: 300 800; font-style: normal; font-display: swap; }
body { font-family: var(--font-primary); color: var(--color-text); background: var(--color-background); line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 400; color: var(--color-heading); letter-spacing: -.035em; line-height: 1.08; }
h2 { font-size: clamp(2rem, 3.1vw, 2.8rem); }
h3 { color: var(--color-heading); font-size: 1rem; line-height: 1.35; }
p + p { margin-top: var(--space-4); }
a { color: var(--color-link); text-underline-offset: .22em; }
a:hover { text-decoration: underline; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .09em; line-height: 1.4; text-transform: uppercase; color: var(--color-accent); margin-bottom: .65rem; }
.small { font-size: .78rem; }
.muted { color: var(--color-muted); }
.text-link { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; font-size: .85rem; font-weight: 600; text-decoration: none; }
.icon { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--small { width: 18px; height: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-height: 52px; padding: .8rem 1.6rem; border: 1px solid var(--color-accent); border-radius: var(--radius); color: #fff; background: var(--color-accent); text-decoration: none; font-size: .9rem; font-weight: 600; text-align: center; }
.button:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); text-decoration: none; }
.button--outline { color: var(--color-heading); background: transparent; }
.button--outline:hover { color: #fff; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; background: transparent; border: 0; border-radius: 50%; color: inherit; }
.icon-button:hover { background: rgb(130 90 60 / 10%); }

/* 4. Layout (12-column proportions without framework). */
.container { width: min(calc(100% - 3rem), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-7); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.section-heading > div { flex: 1; }
.section-heading > a { flex-shrink: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 1.6rem; }
.accent-rule::after { content: ''; display: block; width: 52px; height: 2px; margin-top: 1rem; background: var(--color-accent); }

/* 5. Header */
.site-header { position: relative; z-index: 20; background: #fff; border-bottom: 1px solid var(--color-border); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; min-height: 48px; flex-shrink: 0; }
.brand img { width: 116px; height: auto; }
.header-controls { display: flex; align-items: center; gap: .5rem; }
.search-toggle { border-radius: 0; border-left: 1px solid #bcb8b5; padding-left: 1.8rem; margin-left: .9rem; }
.search-toggle .icon { width: 30px; height: 30px; }
.menu-toggle { display: none; }

/* 6. Navigation / search */
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 2.6rem; }
.main-nav > a, .region-menu > summary { color: #242424; font-size: .85rem; text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.main-nav > a:hover, .region-menu > summary:hover { color: var(--color-accent); text-decoration: underline; }
.region-menu { position: relative; }
.region-menu summary { cursor: pointer; list-style: none; }
.region-menu summary::-webkit-details-marker { display: none; }
.region-list { position: absolute; top: 100%; right: 0; width: 410px; padding: 1rem; display: grid; grid-template-columns: 1fr 1fr; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--color-border); border-radius: var(--radius); }
.region-list a { font-size: .85rem; min-height: 44px; display: flex; align-items: center; padding: .5rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; padding-block: 1rem; font-size: .75rem; }
.breadcrumb a { color: var(--color-text); min-height: 32px; display: inline-flex; align-items: center; }
.breadcrumb span[aria-current] { overflow-wrap: anywhere; }
.search-dialog { width: min(640px, calc(100% - 2rem)); padding: 2rem; border: 1px solid var(--color-border); border-radius: 8px; max-height: 85dvh; }
dialog::backdrop { background: rgb(15 20 25 / 72%); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.dialog-heading h2 { font-size: 2rem; }
.search-form label { display: block; margin-bottom: .5rem; font-weight: 600; }
.search-field { display: flex; gap: .5rem; }
.search-field input { min-width: 0; width: 100%; border: 1px solid var(--color-muted); border-radius: var(--radius); padding: .7rem; }
.search-status { font-size: .8rem; margin-top: 1rem; }
.search-results { list-style: none; padding: 0; margin: .75rem 0 0; }
.search-results a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--color-border); }
.search-results span { display: block; color: var(--color-muted); font-size: .8rem; }

/* 7. Hero: manual carousel, no automatic movement. */
.hero { position: relative; isolation: isolate; color: #fff; min-height: 495px; display: flex; align-items: center; background: #312b24; }
.hero-photo, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-photo { object-fit: cover; object-position: center 52%; }
.hero::after { content: ''; background: linear-gradient(90deg, rgb(15 15 12 / 83%) 0%, rgb(15 15 12 / 67%) 45%, rgb(15 15 12 / 12%) 78%), linear-gradient(0deg, rgb(15 15 12 / 70%), transparent 35%); }
.hero-content { padding: 4rem 2rem 6rem; }
.hero .eyebrow { color: #fff; font-size: .8rem; }
.hero h1 { color: #fff; font-size: clamp(3rem, 4.8vw, 4.2rem); max-width: 650px; letter-spacing: -.025em; line-height: .99; }
.hero-description { margin-top: 1rem; max-width: 445px; font-size: 1.08rem; line-height: 1.45; }
.hero .button { margin-top: 1.5rem; }
.hero-arrow { position: absolute; top: 46%; background: rgb(255 255 255 / 85%); color: #302a25; width: 44px; height: 44px; }
.hero-arrow:hover { background: #fff; }
.hero-arrow--prev { left: 1.5rem; }
.hero-arrow--next { right: 1.5rem; }
.hero-bottom { position: absolute; bottom: 1.2rem; left: 0; right: 0; display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.hero-dots { display: flex; align-items: center; }
.hero-dot { border: 0; width: 32px; min-height: 44px; background: transparent; display: grid; place-items: center; }
.hero-dot::after { content: ''; width: 8px; height: 8px; border: 1px solid #fff; border-radius: 50%; }
.hero-dot[aria-pressed='true']::after { background: #fff; }
.hero-caption { text-align: right; font-size: .73rem; line-height: 1.5; max-width: 42%; padding: .45rem .65rem; border-radius: var(--radius); background: rgb(0 0 0 / 58%); }
.hero-count { display: block; margin-top: .7rem; letter-spacing: .15em; }
.hero [hidden] { display: none !important; }

/* 8. Stats: counts of elements listed in each public stage. */
.stats { background: #f8f7f6; padding-top: 2.4rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; gap: 1.2rem; padding: 0 1.8rem; text-decoration: none; color: var(--color-text); border-right: 1px solid #c8c5c2; }
.stat:last-child { border-right: 0; }
.stat > .icon { width: 44px; height: 48px; margin-top: .6rem; color: var(--color-accent); stroke-width: 1.3; }
.stat:first-child > .icon { color: var(--color-muted); }
.stat:nth-child(n+3) > .icon { color: var(--color-teal); }
.stat strong { display: block; font-family: var(--font-display); font-size: 2.85rem; color: #000; font-weight: 400; line-height: 1.05; }
.stat span { display: block; font-size: .85rem; line-height: 1.4; margin-top: .35rem; }
.stats-source { margin: 1.4rem 0 .8rem; text-align: right; font-size: .67rem; color: var(--color-muted); }
.stats-process { padding: .9rem 0 1.1rem; border-top: 1px solid #c8c5c2; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 2rem; font-size: .85rem; }
.stats-process a { color: var(--color-accent); }

/* 9. Cards */
.cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.card { position: relative; border: 1px solid #e3e0dd; border-radius: var(--radius); background: #fff; overflow: hidden; transition: box-shadow .18s ease, transform .18s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-media { position: relative; }
.card-media > img { width: 100%; aspect-ratio: 1.32; object-fit: cover; }
.card-tag { position: absolute; top: 1rem; left: 1rem; right: 1rem; width: fit-content; max-width: calc(100% - 2rem); border-radius: var(--radius); padding: .4rem .65rem; background: #fff; font-size: .66rem; color: var(--color-heading); font-weight: 600; line-height: 1.4; }
.card-body { padding: 1rem 1rem 1.1rem; }
.card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.23rem; line-height: 1.16; min-height: 3.55em; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card:focus-within { outline: 3px solid var(--color-link); outline-offset: 3px; }
.card-location { display: flex; align-items: start; gap: .35rem; font-size: .7rem; color: var(--color-muted); margin-top: .9rem; padding-right: 2rem; }
.card-location .icon { color: var(--color-accent); }
.card-arrow { position: absolute; bottom: .85rem; right: .75rem; border: 1px solid #c89987; border-radius: 50%; padding: 5px; width: 31px; height: 31px; color: var(--color-heading); }
.card--cultor .card-media > img { aspect-ratio: 1.6; object-position: center 32%; }
.card--cultor h3 { font-family: var(--font-primary); font-size: .93rem; font-weight: 600; min-height: 2.7em; }
.card-specialty { margin-top: .5rem; font-size: .8rem; padding-right: 1.2rem; }

/* 10. Sections */
.pattern-section { background: var(--color-soft); position: relative; isolation: isolate; overflow: hidden; }
.pattern-section::after { content: ''; position: absolute; z-index: -1; inset: 0; background: url('../icons/trazo.svg') right center / auto 130% no-repeat; opacity: .5; pointer-events: none; }
.citizen-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 4rem; align-items: center; }
.citizen-copy h2 { font-size: clamp(2.4rem, 3.8vw, 3.3rem); margin-bottom: 1.15rem; }
.citizen-copy > p:not(.eyebrow) { font-size: 1.05rem; line-height: 1.55; max-width: 590px; }
.citizen-info { display: grid; gap: 1.6rem; border-left: 1px solid #bdb5af; padding-left: 3rem; }
.info-item { display: grid; grid-template-columns: 44px 1fr; gap: 1.2rem; }
.info-item > .icon { width: 38px; height: 38px; color: var(--color-accent); }
.info-item p { font-size: .84rem; margin-top: .3rem; }
.info-item h3 { font-size: .88rem; font-weight: 600; }
.about-grid { display: grid; grid-template-columns: 8fr 4fr; gap: 3rem; align-items: center; }
.about-grid h2 { margin-bottom: 1rem; font-size: clamp(2.4rem, 3.8vw, 3.3rem); }
.about-grid > div > p:not(.eyebrow) { font-size: .95rem; }
.about-aside { border-left: 1px solid #c8c5c2; padding: 1.5rem 0 1.5rem 3rem; }
.about-aside p { font-family: var(--font-display); font-size: 1.8rem; line-height: 1.2; color: var(--color-heading); letter-spacing: -.03em; }

/* 11. Cultor profile */
.profile { display: grid; grid-template-columns: 4.6fr 7.4fr; gap: 3rem; align-items: start; padding: .4rem 0 2rem; }
.profile-media { grid-column: 1; grid-row: 1 / span 2; border-right: 1px solid var(--color-border); padding-right: 1.75rem; }
.profile-portrait { width: 100%; aspect-ratio: 1.7; object-fit: cover; object-position: center 30%; border-radius: var(--radius); }
.profile-intro { grid-column: 2; }
.profile-intro h1 { font-size: clamp(2.3rem, 3.9vw, 3.5rem); margin-block: 1rem .65rem; }
.profile-intro .eyebrow { display: flex; gap: .6rem; align-items: center; }
.profile-element { display: inline-block; font-family: var(--font-display); font-size: 1.7rem; color: var(--color-heading); text-decoration: none; line-height: 1.2; letter-spacing: -.025em; }
.profile-location { margin-top: .9rem; display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.profile-location .icon { color: var(--color-accent); }
.profile-bio { grid-column: 2; margin-top: -1.5rem; max-width: 70ch; font-size: .98rem; line-height: 1.6; }
.profile-bio h2 { font-family: var(--font-primary); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-accent); margin-bottom: .8rem; font-weight: 600; }
.profile-bio .source-link { display: inline-flex; margin-top: 1rem; font-size: .76rem; min-height: 32px; align-items: center; }
.facts { margin-top: .7rem; background: #f5f3f0; padding: 1rem 1.3rem; }
.facts h2 { font: 600 .73rem var(--font-primary); text-transform: uppercase; letter-spacing: .07em; color: var(--color-accent); margin: 0 0 .6rem; }
.facts dl { margin: 0; font-size: .78rem; }
.fact { display: grid; grid-template-columns: 1fr 1.18fr; gap: .75rem; border-bottom: 1px solid #e4e0dc; padding: .6rem 0; }
.fact:last-child { border-bottom: 0; }
.fact dt { display: flex; gap: .7rem; align-items: start; }
.fact dt .icon { color: var(--color-accent); width: 20px; height: 20px; }
.fact dd { margin: 0; overflow-wrap: anywhere; }
.fact a { color: inherit; }
.recognition { padding-block: 2rem; }
.recognition-inner { display: grid; grid-template-columns: 4fr 8fr; gap: 2.5rem; align-items: center; }
.recognition-title { display: flex; align-items: center; gap: 1.5rem; }
.recognition-title img { width: 40px; height: 67px; flex-shrink: 0; }
.recognition h2 { font: 600 1.25rem/1.4 var(--font-primary); letter-spacing: -.025em; color: var(--color-accent); }
.recognition-copy { border-left: 1px solid #bdb5af; padding-left: 2.5rem; font-size: .9rem; }
.recognition-copy a { display: inline-flex; margin-top: .6rem; font-size: .8rem; }
.territory { padding-bottom: 1.5rem; }
.territory h2 { font-size: 2.5rem; }
.territory-map { position: relative; margin-top: 1rem; min-height: 162px; background: #e9eee6 url('../icons/territorio.svg') center / cover; border: 1px solid #d6dfd6; border-radius: var(--radius); display: grid; place-content: center; text-align: center; padding: 1.25rem; gap: .4rem; }
.map-label { display: flex; justify-content: center; align-items: center; gap: .5rem; font-size: .9rem; color: #283b36; font-weight: 600; }
.map-label .icon { color: var(--color-accent); width: 32px; height: 32px; }
.map-placeholder { font-size: .73rem; background: rgb(255 255 255 / 94%); border-radius: 3px; padding: .3rem .65rem; }
.map-link { font-size: .75rem; }

/* 12. Gallery */
.gallery-section { padding-bottom: 2rem; }
.gallery-section h2 { font: 600 .82rem var(--font-primary); letter-spacing: .07em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 1rem; }
.gallery-grid { display: grid; grid-template-columns: 1.5fr 1.1fr .85fr; grid-template-rows: 145px 145px; gap: .8rem; }
.gallery-item { position: relative; min-width: 0; overflow: hidden; border-radius: var(--radius); background: #332d25; }
.gallery-item:first-child { grid-row: span 2; }
.gallery-item:last-child { grid-column: 3; grid-row: 1 / span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item > a { display: block; width: 100%; height: 100%; }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 2.5rem .85rem .65rem; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / 78%) 45%, rgb(0 0 0 / 90%)); font-size: .72rem; line-height: 1.4; pointer-events: none; }
.gallery-grid--pair { grid-template-columns: 1.25fr 1fr; grid-template-rows: 300px; }
.gallery-grid--pair .gallery-item { grid-column: auto; grid-row: auto; }
.gallery-grid--pair img { object-fit: contain; }
.image--contain { object-fit: contain; background: #25221f; }
.profile-portrait.image--contain { aspect-ratio: 1276 / 533; height: auto; min-height: 0; align-self: start; }
.gallery-note { font-size: .75rem; margin-top: .65rem; color: var(--color-muted); }
.lightbox { width: min(1100px, calc(100% - 2rem)); max-height: 94dvh; border: 0; background: #191919; color: #fff; border-radius: var(--radius); padding: 1rem; }
.lightbox-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.lightbox img { width: 100%; max-height: 72dvh; object-fit: contain; }
.lightbox-caption { margin-top: .75rem; font-size: .85rem; }
.lightbox-nav { display: flex; gap: .5rem; }

/* 13. Multimedia */
.multimedia { display: grid; grid-template-columns: 4.5fr 7.5fr; gap: 2.5rem; align-items: center; padding-bottom: 2rem; }
.multimedia h2 { font-size: 2.3rem; }
.multimedia p:not(.eyebrow) { margin-top: 1rem; font-size: .95rem; }
.video-preview { position: relative; display: block; border-radius: var(--radius); overflow: hidden; color: white; aspect-ratio: 2.15; background: #27251e; }
.video-preview img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.64); }
.play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #b72222; color: #fff; padding: .65rem 1.1rem; border-radius: 9px; }
.play .icon { fill: currentColor; width: 28px; height: 28px; }
.video-caption { position: absolute; bottom: 1rem; left: 1.2rem; right: 1.2rem; font-size: .78rem; width: fit-content; padding: .4rem .6rem; background: rgb(0 0 0 / 68%); border-radius: 3px; }
.video-caption strong { display: block; font: 400 1.2rem var(--font-display); margin-bottom: .3rem; }
.profile-navigation { border-top: 1px solid #c6c3c0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; margin-bottom: .5rem; }
.profile-navigation a { color: var(--color-accent); font-size: .82rem; }
.profile-navigation .adjacent { display: flex; gap: 1.5rem; }

/* 14. Footer */
.site-footer { background: var(--color-footer); color: #f3eeeb; padding-block: 2.7rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 3.9fr 3.1fr 2.8fr; gap: 2rem; align-items: center; }
.footer-grid > * + * { border-left: 1px solid #80756e; padding-left: 2rem; }
.footer-brand img { width: 115px; filter: brightness(0) invert(1); }
.footer-contact { font-style: normal; font-size: .75rem; display: flex; gap: .6rem; line-height: 1.8; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: .25rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { display: grid; gap: .3rem; font-size: .75rem; }
.footer-links a { min-height: 32px; display: flex; align-items: center; }
.footer-social { display: flex; gap: .35rem; margin-top: -.7rem; margin-bottom: .6rem; }
.footer-social .icon { width: 21px; height: 21px; }
.footer-institution { font-size: .86rem; line-height: 1.4; display: inline-block; }
.footer-institution::after { display: block; content: ''; margin-top: .65rem; width: 74px; height: 3px; background: linear-gradient(to right,#0f69b4 0 40%,#fff 40% 60%,#e22c2c 60%); }

/* 15. Responsive */
@media (min-width: 1440px) { .hero-arrow--prev { left: max(1.5rem, calc((100vw - 1350px) / 2)); } .hero-arrow--next { right: max(1.5rem, calc((100vw - 1350px) / 2)); } }
@media (max-width: 1100px) {
  .main-nav { gap: 1.5rem; }
  .hero-content { padding-left: 3rem; }
  .stat { padding-inline: 1.1rem; gap: .85rem; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 2.3rem; }
  .citizen-grid { gap: 2rem; }
  .citizen-info { padding-left: 2rem; }
  .profile { gap: 2rem; grid-template-columns: 4.8fr 7.2fr; }
  .profile-media { padding-right: 1.2rem; }
  .profile-bio { margin-top: -1rem; }
  .fact { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .fact dt { gap: .4rem; }
  .footer-grid { gap: 1.2rem; grid-template-columns: 1.4fr 3.7fr 3fr 2.6fr; }
  .footer-grid > * + * { padding-left: 1.2rem; }
}
@media (max-width: 900px) {
  .header-inner { min-height: 72px; gap: 1rem; flex-wrap: wrap; }
  .header-controls { margin-left: auto; }
  .brand img { width: 102px; }
  .js .menu-toggle { display: inline-flex; }
  .js .main-nav { display: none; }
  .main-nav, .js .main-nav.is-open { display: flex; width: 100%; order: 3; margin: 0; flex-direction: column; gap: 0; align-items: stretch; padding-bottom: 1rem; }
  .main-nav > a, .region-menu > summary { padding: .7rem .5rem; border-top: 1px solid var(--color-border); }
  .region-list { position: static; width: 100%; box-shadow: none; border: 0; background: var(--color-soft); }
  .search-toggle { padding-left: 1rem; margin-left: .25rem; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem; }
  .card h3 { min-height: 2.35em; }
  .card--cultor h3 { min-height: 2.7em; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 2rem 0; }
  .stat:nth-child(2) { border-right: 0; }
  .stat { padding-inline: 2rem; }
  .stats-source { text-align: center; }
  .section-heading { flex-direction: column; gap: .5rem; }
  .citizen-grid { grid-template-columns: 1fr; gap: 2rem; }
  .citizen-info { grid-template-columns: repeat(3,1fr); border-left: 0; border-top: 1px solid #c8c5c2; padding: 1.5rem 0 0; gap: 1.25rem; }
  .info-item { grid-template-columns: 1fr; gap: .6rem; }
  .about-grid { grid-template-columns: 2fr 1fr; gap: 2rem; }
  .about-aside { padding-left: 2rem; }
  .about-aside p { font-size: 1.5rem; }
  .profile { grid-template-columns: 1fr; gap: 1.5rem; }
  .profile-intro { grid-column: 1; grid-row: 1; }
  .profile-media { grid-column: 1; grid-row: 2; border: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .profile-portrait { height: 100%; aspect-ratio: auto; min-height: 300px; }
  .facts { margin: 0; }
  .profile-bio { grid-column: 1; margin: 0; max-width: none; }
  .recognition-inner { grid-template-columns: 1fr 1.5fr; gap: 1.5rem; }
  .recognition-title { gap: 1rem; }
  .recognition-copy { padding-left: 1.5rem; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 210px 210px; }
  .gallery-item:first-child, .gallery-item:last-child { grid-column: auto; grid-row: auto; }
  .gallery-grid--pair { grid-template-rows: 280px; }
  .multimedia { grid-template-columns: 1fr; gap: 1.5rem; }
  .video-preview { aspect-ratio: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-grid > * + * { border-left: 0; padding: 0; }
}
@media (max-width: 540px) {
  .container { width: calc(100% - 2.5rem); }
  .section { padding-block: 2.3rem; }
  .header-inner { min-height: 68px; }
  .hero { min-height: 590px; align-items: start; }
  .hero-photo { object-position: 62% center; }
  .hero::after { background: linear-gradient(90deg,rgb(12 12 10 / 78%),rgb(12 12 10 / 60%)),linear-gradient(0deg,rgb(12 12 10 / 84%),transparent 55%); }
  .hero-content { padding: 3.3rem 0 9rem; }
  .hero .eyebrow { font-size: .68rem; max-width: 270px; }
  .hero h1 { font-size: 3.2rem; line-height: 1.03; }
  .hero-description { font-size: 1rem; max-width: 310px; }
  .hero-arrow { top: auto; bottom: 1.3rem; }
  .hero-arrow--prev { left: 1.2rem; }
  .hero-arrow--next { right: 1.2rem; }
  .hero-bottom { bottom: 1.2rem; display: block; pointer-events: none; }
  .hero-dots { justify-content: center; pointer-events: none; width: 100%; }
  .hero-dot { pointer-events: auto; }
  .hero-caption { position: absolute; bottom: 62px; max-width: 100%; text-align: left; left: 0; }
  .hero-count { display: none; }
  .stats { padding-top: 1.8rem; }
  .stat { padding-inline: .7rem; gap: .6rem; }
  .stat > .icon { width: 30px; height: 36px; }
  .stat strong { font-size: 2.4rem; }
  .stat span { font-size: .73rem; }
  .stats-source { font-size: .65rem; margin-top: 1.4rem; }
  .stats-process { justify-content: start; gap: .2rem; font-size: .8rem; }
  .cards-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .card-media > img { aspect-ratio: 1.55; }
  .card h3, .card--cultor h3 { min-height: 0; }
  .card h3 { font-size: 1.4rem; }
  .card--cultor h3 { font-size: 1.05rem; }
  .card-body { padding: 1.1rem; }
  .card-location { font-size: .8rem; margin-top: .7rem; }
  .card-specialty { font-size: .85rem; }
  .card-tag { font-size: .7rem; }
  .section-heading h2 { font-size: 2.15rem; }
  .actions { align-items: stretch; gap: .85rem; }
  .actions .button { width: 100%; }
  .citizen-copy h2, .about-grid h2 { font-size: 2.7rem; }
  .citizen-info { grid-template-columns: 1fr; gap: 1.5rem; }
  .info-item { grid-template-columns: 36px 1fr; gap: 1rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-aside { padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid #c8c5c2; }
  .about-aside p { max-width: 280px; font-size: 1.8rem; }
  .breadcrumb { font-size: .68rem; line-height: 1.4; gap: .25rem; }
  .profile-intro h1 { font-size: 2.6rem; }
  .profile-element { font-size: 1.5rem; }
  .profile-media { grid-template-columns: 1fr; }
  .profile-portrait { min-height: 0; height: auto; aspect-ratio: 1.3; }
  .facts { padding: 1.2rem; }
  .facts dl { font-size: .81rem; }
  .fact { grid-template-columns: 1fr 1.25fr; }
  .profile-bio { font-size: 1rem; }
  .recognition-inner { grid-template-columns: 1fr; }
  .recognition-copy { border-left: 0; border-top: 1px solid #c8c5c2; padding: 1.2rem 0 0; }
  .territory h2 { font-size: 2rem; }
  .territory-map { min-height: 200px; }
  .gallery-grid, .gallery-grid--pair { grid-template-columns: 1fr; grid-template-rows: none; }
  .gallery-item { aspect-ratio: 1.3; }
  .gallery-caption { font-size: .78rem; }
  .multimedia h2 { font-size: 2rem; }
  .video-preview { aspect-ratio: 1.4; }
  .profile-navigation { align-items: start; flex-direction: column; gap: .25rem; }
  .profile-navigation .adjacent { width: 100%; justify-content: space-between; gap: .7rem; }
  .profile-navigation .text-link { font-size: .75rem; gap: .35rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid > * + * { border-top: 1px solid #80756e; padding-top: 1.25rem; }
  .footer-contact { font-size: .8rem; overflow-wrap: anywhere; }
  .footer-links { font-size: .8rem; }
  .footer-links a { min-height: 44px; }
  .search-dialog { padding: 1.2rem; }
  .search-field { flex-direction: column; }
}

/* 16. Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -100px; padding: .75rem 1rem; background: #fff; color: #000; z-index: 100; border: 2px solid #000; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--color-link); outline-offset: 4px; }
.hero :focus-visible, .site-footer :focus-visible, .lightbox :focus-visible { outline-color: #fff; }
.js-only { display: none; }
.js .js-only { display: inline-flex; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } .card:hover { transform: none; } }
@media (forced-colors: active) { .button, .hero-dot::after, .icon-button { border: 1px solid ButtonText; } }

.storymap-section {
    padding: 0 0 4rem;
}

.storymap-frame {
    width: 100%;
    min-height: 80vh;
    overflow: hidden;
    background: #f3f3f3;
}

.storymap-frame iframe {
    display: block;
    width: 100%;
    height: 80vh;
    min-height: 680px;
    border: 0;
}

@media (max-width: 768px) {
    .storymap-frame iframe {
        height: 75vh;
        min-height: 560px;
    }
}
.card {
    position: relative;
}

.card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
}

.card:hover {
    cursor: pointer;
}

/* Dynamic content keeps the approved card and profile layout. */
.card-storymap { border: 0; background: none; padding: 0; text-align: inherit; font: inherit; line-height: inherit; color: inherit; cursor: pointer; }
.card-storymap::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.card-media > img.portrait-placeholder, .profile-portrait.portrait-placeholder,
.card-media > img[src="/static/sigpa/img/sigpa.png"] { object-fit: scale-down; padding: 12%; background: #f5f3f0; }
.profile-intro, .profile-bio, .card-body { min-width: 0; overflow-wrap: anywhere; }

/* Nearly full-screen StoryMap, with the close control outside the iframe. */
.storymap-dialog { width: 96vw; max-width: 96vw; height: 95vh; height: 95dvh; max-height: 95vh; max-height: 95dvh; margin: auto; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.storymap-dialog[open] { display: flex; flex-direction: column; }
.storymap-dialog::backdrop { background: rgb(15 20 25 / 80%); }
.storymap-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 1rem; flex-shrink: 0; border-bottom: 1px solid var(--color-border); }
.storymap-toolbar h2 { font-family: var(--font-primary); font-size: 1rem; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.storymap-close { flex-shrink: 0; min-height: 44px; padding: .5rem 1rem; }
.storymap-close span { font-size: 1.5rem; line-height: 1; }
.storymap-iframe { display: block; border: 0; width: 100%; flex: 1; min-height: 0; background: #f3f3f3; }
@media (max-width: 600px) {
  .storymap-dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; border: 0; border-radius: 0; }
  .storymap-toolbar { padding: max(.5rem, env(safe-area-inset-top)) .65rem .5rem; gap: .5rem; }
  .storymap-toolbar h2 { font-size: .8rem; }
  .storymap-close { padding: .5rem .75rem; }
}
