:root {
  --bg: #05060f;
  --bg-soft: #090c18;
  --panel: rgba(13, 17, 34, .84);
  --panel-solid: #0d1122;
  --panel-light: rgba(255, 255, 255, .045);
  --text: #f2f4fb;
  --muted: #a5aec8;
  --faint: #727c9d;
  --line: rgba(157, 174, 222, .16);
  --line-strong: rgba(157, 174, 222, .28);
  --blue: #6aa9ff;
  --violet: #a98bff;
  --mint: #55d6b3;
  --yellow: #ffd166;
  --coral: #ff7c8c;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(0, 0, 0, .42);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(900px 620px at 12% 5%, rgba(75, 102, 190, .17), transparent 70%),
    radial-gradient(840px 700px at 92% 15%, rgba(87, 211, 180, .08), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(rgba(180, 194, 232, .5) .55px, transparent .55px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  z-index: -1;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.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;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  background: white;
  color: #101326;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(106, 169, 255, .85); outline-offset: 3px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(157, 174, 222, .11);
  background: rgba(5, 6, 15, .78);
  backdrop-filter: blur(18px);
}
.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #080a14;
  background: linear-gradient(135deg, var(--blue), #b38cff 55%, var(--mint));
  font: 700 14px var(--font-display);
  box-shadow: 0 0 24px rgba(106, 169, 255, .34);
}
.brand-lockup strong, .footer-brand strong {
  display: block;
  font: 600 15px/1.1 var(--font-display);
}
.brand-lockup small, .footer-brand small {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
}
.topnav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topnav a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.topnav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.support-link {
  padding: 8px 14px;
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 10px;
  color: var(--yellow);
  background: rgba(255, 209, 102, .08);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.territory-view, .explorer-view { animation: fade-in .35s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(5px); } }
.hero-shell, .explorer-shell, .rights-shell, .contact-shell, .journey-section {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}
.hero-shell { padding: 82px 0 52px; }
.hero-copy { max-width: 780px; margin-bottom: 44px; }
.eyebrow, .section-kicker {
  color: #8f9abd;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 14px rgba(85, 214, 179, .8);
}
.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  font: 700 clamp(48px, 7vw, 88px)/.98 var(--font-display);
  letter-spacing: -.055em;
}
.hero-copy h1 em {
  color: transparent;
  background: linear-gradient(95deg, var(--blue), #b792ff 55%, var(--mint));
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}
.hero-lead {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}
.hero-stats { display: flex; gap: 12px; margin-top: 30px; }
.hero-stats div {
  min-width: 116px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}
.hero-stats strong {
  display: block;
  font: 700 23px/1 var(--font-display);
  color: var(--text);
}
.hero-stats span { display: block; margin-top: 5px; color: var(--faint); font-size: 11px; }
.hero-note { margin: 22px 0 0; color: #8a94b5; font-size: 13px; }
.hero-note span { color: var(--yellow); margin-right: 5px; }

.atlas-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .72fr); gap: 18px; align-items: stretch; }
.map-card, .territory-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(16, 21, 42, .9), rgba(8, 11, 23, .92));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.map-card { min-height: 610px; padding: 24px; display: flex; flex-direction: column; }
.map-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.map-card h2, .territory-panel h2, .section-heading h2 {
  margin: 6px 0 0;
  font: 600 22px/1.2 var(--font-display);
  letter-spacing: -.02em;
}
.map-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: var(--faint); font-size: 11px; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.available { background: var(--mint); box-shadow: 0 0 10px rgba(85,214,179,.6); }
.legend-dot.planned { background: #303852; }
.spain-map { position: relative; flex: 1; min-height: 470px; display: grid; place-items: center; padding: 12px 0 0; }
.spain-map svg { width: min(100%, 690px); height: 100%; max-height: 500px; overflow: visible; filter: drop-shadow(0 20px 32px rgba(0,0,0,.35)); }
.spain-map svg path {
  fill: #222a43;
  stroke: #0b0e1b;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
  transition: fill .2s ease, filter .2s ease, opacity .2s ease, transform .2s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.spain-map svg path.region { cursor: pointer; }
.spain-map svg path.region.available { fill: var(--region-color); filter: saturate(.92) brightness(.94); }
.spain-map svg path.region.available:hover,
.spain-map svg path.region.available:focus-visible { filter: brightness(1.22) drop-shadow(0 0 9px var(--region-color)); transform: translateY(-2px); }
.spain-map svg path.region.planned:hover,
.spain-map svg path.region.planned:focus-visible { fill: #35405f; }
.map-loading { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; }
.map-loading span { width: 18px; height: 18px; border: 2px solid rgba(157,174,222,.2); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-live { min-height: 20px; margin: 0; color: #8e99b9; text-align: center; font-size: 12px; }

.territory-panel { display: flex; flex-direction: column; min-height: 610px; }
.territory-panel-head { padding: 24px 22px 18px; border-bottom: 1px solid var(--line); }
.territory-panel-head p { margin: 10px 0 0; color: var(--faint); font-size: 12px; line-height: 1.5; }
.community-list { padding: 10px; overflow: auto; max-height: 500px; scrollbar-width: thin; }
.community-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.community-button:hover { background: rgba(255,255,255,.04); border-color: rgba(157,174,222,.1); }
.community-button .community-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #303852; }
.community-button.available .community-dot { background: var(--community-color); box-shadow: 0 0 10px var(--community-color); }
.community-button strong { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #c9cfe1; }
.community-button.available strong { color: var(--text); }
.community-button small { color: #606b8c; font-size: 10px; }
.community-button.available small { color: var(--community-color); font-weight: 700; }

.journey-section { padding: 62px 0 90px; }
.section-heading { text-align: center; margin-bottom: 26px; }
.section-heading h2 { font-size: clamp(26px, 4vw, 38px); }
.journey-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.journey-grid article {
  display: flex;
  gap: 15px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.025);
}
.journey-grid article > span { color: #536084; font: 700 12px var(--font-display); }
.journey-grid h3 { margin: 0 0 7px; font: 600 15px var(--font-display); }
.journey-grid p { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.55; }

.decretos-section { padding: 0 0 90px; }
.decretos-lead { max-width: 720px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.decretos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.decreto-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.026); text-decoration: none; transition: border-color .2s ease, background .2s ease; }
.decreto-card:hover { border-color: color-mix(in srgb, var(--blue) 35%, transparent); background: rgba(106,169,255,.06); }
.decreto-card strong { font: 600 16px var(--font-display); color: #e8ecf9; }
.decreto-card span { color: var(--faint); font-size: 12px; }

/* Explorer */
.explorer-view { min-height: 100vh; padding: 40px 0 90px; }
.back-button {
  margin-bottom: 18px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #9ba5c4;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.back-button:hover { color: var(--text); }
.community-hero {
  --community-color: var(--blue);
  position: relative;
  min-height: 245px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 42px;
  border: 1px solid color-mix(in srgb, var(--community-color) 32%, transparent);
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(600px 250px at 15% 50%, color-mix(in srgb, var(--community-color) 18%, transparent), transparent 75%),
    linear-gradient(135deg, #10152a, #090c18);
  box-shadow: var(--shadow);
}
.community-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--community-color) 40%, transparent) .6px, transparent .6px); background-size: 25px 25px; opacity: .25; pointer-events: none; }
.community-orbit { position: relative; z-index: 1; width: 116px; height: 116px; flex: none; border: 1px solid color-mix(in srgb, var(--community-color) 38%, transparent); border-radius: 50%; display: grid; place-items: center; }
.community-orbit::before { content: ''; position: absolute; inset: 17px; border: 1px dashed color-mix(in srgb, var(--community-color) 48%, transparent); border-radius: 50%; }
.community-orbit span { width: 42px; height: 42px; border-radius: 50%; background: var(--community-color); box-shadow: 0 0 35px var(--community-color); }
.community-orbit i { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: white; box-shadow: 0 0 13px white; transform: translate(47px, -24px); }
.community-hero-copy { position: relative; z-index: 1; flex: 1; }
.community-hero h1 { margin: 7px 0 8px; font: 700 clamp(34px, 5vw, 54px)/1 var(--font-display); letter-spacing: -.045em; }
.community-hero-copy p { max-width: 650px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.community-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(100px, 1fr)); gap: 8px; flex: none; }
.community-metrics div { min-width: 110px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(5,7,15,.36); }
.community-metrics strong { display: block; font: 700 21px var(--font-display); color: var(--community-color); }
.community-metrics span { color: var(--faint); font-size: 10px; }

.catalog-toolbar { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: rgba(12,16,31,.82); position: sticky; top: 82px; z-index: 30; backdrop-filter: blur(14px); }
.toolbar-pickers { display: flex; flex-wrap: wrap; gap: 10px; }
.stage-picker, .view-switcher { display: flex; gap: 5px; }
.lang-picker:empty { display: none; }
.stage-picker button, .view-switcher button { border: 1px solid transparent; border-radius: 10px; padding: 9px 13px; background: transparent; color: #8893b3; cursor: pointer; font-size: 12px; font-weight: 700; }
.stage-picker button.active { border-color: color-mix(in srgb, var(--community-color, var(--blue)) 35%, transparent); background: color-mix(in srgb, var(--community-color, var(--blue)) 13%, transparent); color: var(--community-color, var(--blue)); }
.catalog-actions { display: flex; align-items: center; gap: 9px; }
.catalog-search { position: relative; display: block; }
.catalog-search span[aria-hidden] { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #6f7998; }
.catalog-search input { width: min(280px, 32vw); height: 38px; padding: 0 12px 0 32px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: rgba(5,7,15,.5); color: var(--text); font-size: 12px; }
.catalog-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(106,169,255,.1); }
.view-switcher { padding: 3px; border: 1px solid var(--line); border-radius: 11px; }
.view-switcher button { padding: 6px 10px; border-radius: 8px; }
.view-switcher button.active { background: rgba(255,255,255,.08); color: var(--text); }
.catalog-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 2px 14px; }
.catalog-meta p { margin: 0; color: var(--faint); font-size: 12px; }
.proposal-shortcut { border: 0; background: none; color: var(--community-color, var(--blue)); cursor: pointer; font-size: 12px; font-weight: 600; }
.catalog-content { min-height: 280px; }

.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.matrix-card { border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: linear-gradient(145deg, rgba(16,21,41,.8), rgba(9,12,24,.85)); transition: border-color .18s, transform .18s; }
.matrix-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.matrix-card-head { display: flex; align-items: center; gap: 12px; padding: 17px 17px 13px; }
.area-symbol { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--area-color) 15%, transparent); color: var(--area-color); font: 700 15px var(--font-display); border: 1px solid color-mix(in srgb, var(--area-color) 22%, transparent); }
.matrix-card-head h3 { flex: 1; min-width: 0; margin: 0; font: 600 14px/1.3 var(--font-display); }
.matrix-count { color: #687391; font-size: 10px; white-space: nowrap; }
.download-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 17px 17px; }
.download-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 10px; border: 1px solid rgba(157,174,222,.16); border-radius: 9px; background: rgba(255,255,255,.035); color: #cdd3e6; text-decoration: none; font-size: 11px; font-weight: 600; }
.download-link::before { content: '↓'; color: var(--area-color); font-weight: 800; }
.download-link:hover { border-color: color-mix(in srgb, var(--area-color) 45%, transparent); background: color-mix(in srgb, var(--area-color) 10%, transparent); color: white; }
.download-link.review { border-color: rgba(255,209,102,.25); color: var(--yellow); }
.download-link.review::before { content: '△'; color: var(--yellow); }
.level-stack { display: flex; flex-direction: column; gap: 13px; }
.level-section { border: 1px solid var(--line); border-radius: 18px; background: rgba(12,16,31,.66); overflow: hidden; }
.level-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025); }
.level-section-head h3 { margin: 0; font: 600 16px var(--font-display); }
.level-section-head span { color: var(--faint); font-size: 10px; }
.level-area-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.level-area-row { display: flex; align-items: center; gap: 10px; padding: 13px 17px; border-bottom: 1px solid rgba(157,174,222,.08); }
.level-area-row:nth-child(odd) { border-right: 1px solid rgba(157,174,222,.08); }
.level-area-row .area-symbol { width: 31px; height: 31px; border-radius: 9px; font-size: 12px; }
.level-area-row strong { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; }
.level-area-row .download-link { min-height: 29px; flex: none; }
.empty-state { padding: 60px 20px; border: 1px dashed var(--line-strong); border-radius: 18px; text-align: center; color: var(--faint); }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--text); font: 600 17px var(--font-display); }

/* Rights */
.rights-section { padding: 96px 0; border-top: 1px solid rgba(157,174,222,.08); background: radial-gradient(700px 420px at 15% 50%, rgba(106,169,255,.08), transparent 70%); }
.rights-shell { display: grid; grid-template-columns: .9fr 1.3fr; gap: 54px; align-items: start; }
.rights-intro h2, .contact-copy h2 { margin: 9px 0 16px; font: 700 clamp(34px, 5vw, 52px)/1.04 var(--font-display); letter-spacing: -.045em; }
.rights-intro p, .contact-copy > p { color: var(--muted); font-size: 15px; line-height: 1.68; }
.license-badge { display: inline-flex; gap: 10px; align-items: center; margin-top: 14px; padding: 9px 13px; border: 1px solid rgba(106,169,255,.26); border-radius: 10px; color: #a9caff; background: rgba(106,169,255,.08); text-decoration: none; font: 700 12px var(--font-display); }
.rights-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.rights-grid article { min-height: 165px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.026); }
.right-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 10px; background: rgba(106,169,255,.1); color: #96bcff; font: 700 15px var(--font-display); }
.rights-grid h3 { margin: 0 0 8px; font: 600 15px var(--font-display); }
.rights-grid p { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.55; }
.attribution-copy { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin-top: -24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(5,7,15,.48); }
.attribution-copy div { flex: 1; min-width: 0; }
.attribution-copy span { display: block; margin-bottom: 5px; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.attribution-copy code { display: block; overflow: hidden; color: #c8d0e7; font: 11px/1.5 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.attribution-copy button { flex: none; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(255,255,255,.05); color: var(--text); cursor: pointer; font-size: 11px; font-weight: 700; }
.trademark-notice { grid-column: 1 / -1; margin: 0; padding: 14px 18px; color: var(--faint); font-size: 11px; line-height: 1.6; }
.trademark-notice strong { color: var(--text); }

/* Contact */
.contact-section { padding: 100px 0; border-top: 1px solid rgba(157,174,222,.08); background: linear-gradient(180deg, rgba(12,15,30,.72), rgba(5,6,15,.6)); }
.contact-shell { display: grid; grid-template-columns: .8fr 1.25fr; gap: 60px; align-items: start; }
.contact-promises { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 23px; }
.contact-promises span { padding: 6px 9px; border: 1px solid rgba(85,214,179,.16); border-radius: 8px; color: #91d8c6; background: rgba(85,214,179,.05); font-size: 10px; }
.contact-form { padding: 24px; border: 1px solid var(--line); border-radius: 21px; background: rgba(12,16,31,.84); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contact-form label { display: block; margin-bottom: 13px; color: #c4cbe0; font-size: 11px; font-weight: 600; }
.contact-form label small { color: #66718f; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; margin-top: 6px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(4,6,14,.52); color: var(--text); outline: none; font-size: 12px; }
.contact-form input, .contact-form select { height: 40px; }
.contact-form select option { color: #101326; background: white; }
.contact-form textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(106,169,255,.1); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #525d7c; }
.form-help { margin: -5px 0 14px; color: #697492; font-size: 10px; }
.contact-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.privacy-check { display: flex !important; align-items: flex-start; gap: 9px; color: #7f89a7 !important; font-weight: 400 !important; line-height: 1.45; }
.privacy-check input { width: 14px; height: 14px; margin: 2px 0 0; accent-color: var(--mint); flex: none; }
.privacy-check a { color: #a9bde8; }
.form-actions { display: flex; align-items: center; gap: 13px; min-height: 42px; }
.form-actions button { flex: none; display: inline-flex; gap: 12px; align-items: center; padding: 10px 15px; border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--blue), #a98bff); color: #080a14; cursor: pointer; font-size: 12px; font-weight: 800; }
.form-actions button:disabled { opacity: .55; cursor: wait; }
.form-actions p { margin: 0; color: var(--faint); font-size: 11px; }
.form-actions p.success { color: var(--mint); }
.form-actions p.error { color: var(--coral); }

.support-strip { width: min(1180px, calc(100% - 32px)); margin: 0 auto 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border: 1px solid rgba(255,209,102,.17); border-radius: 17px; background: rgba(255,209,102,.055); }
.support-strip > div { display: flex; align-items: center; gap: 13px; }
.support-strip > div > span { color: var(--yellow); font-size: 25px; }
.support-strip p { margin: 0; color: #949db9; font-size: 12px; }
.support-strip strong { display: block; margin-bottom: 3px; color: #e7e9f2; font-size: 13px; }
.support-strip a { flex: none; padding: 9px 14px; border-radius: 10px; background: var(--yellow); color: #17140a; text-decoration: none; font-size: 11px; font-weight: 800; }

.site-footer { width: min(1180px, calc(100% - 32px)); margin: auto; padding: 30px 0 40px; border-top: 1px solid rgba(157,174,222,.11); display: flex; align-items: center; gap: 24px; color: #626d8d; font-size: 10px; }
.footer-brand { display: flex; align-items: center; gap: 9px; margin-right: auto; }
.brand-mark.small { width: 30px; height: 30px; border-radius: 8px; font-size: 10px; }
.site-footer p { margin: 0; }
.site-footer a { color: #8994b4; text-decoration: none; }
.map-credit { text-align: right; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #12172b; box-shadow: 0 14px 42px rgba(0,0,0,.45); color: var(--text); font-size: 12px; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .atlas-layout { grid-template-columns: 1fr; }
  .territory-panel { min-height: 0; }
  .community-list { display: grid; grid-template-columns: repeat(2, 1fr); max-height: none; }
  .community-hero { align-items: flex-start; flex-wrap: wrap; }
  .community-hero-copy { min-width: calc(100% - 160px); }
  .community-metrics { width: 100%; grid-template-columns: repeat(4, 1fr); }
  .rights-shell, .contact-shell { grid-template-columns: 1fr; gap: 30px; }
  .attribution-copy { margin-top: 0; }
}

@media (max-width: 760px) {
  .topbar-inner { min-height: 60px; }
  .brand-lockup small, .topnav, .support-link { display: none; }
  .hero-shell { padding-top: 56px; }
  .hero-copy h1 { font-size: clamp(45px, 14vw, 68px); }
  .hero-lead { font-size: 16px; }
  .hero-stats { overflow-x: auto; padding-bottom: 4px; }
  .map-card { padding: 18px; min-height: 470px; }
  .map-card-head { flex-direction: column; }
  .map-legend { justify-content: flex-start; }
  .spain-map { min-height: 350px; }
  .community-list { grid-template-columns: 1fr; }
  .journey-grid, .area-grid, .decretos-grid { grid-template-columns: 1fr; }
  .journey-grid article { padding: 18px; }
  .explorer-view { padding-top: 22px; }
  .community-hero { padding: 26px 22px; }
  .community-orbit { width: 82px; height: 82px; }
  .community-orbit span { width: 30px; height: 30px; }
  .community-orbit i { transform: translate(33px, -16px); width: 8px; height: 8px; }
  .community-hero-copy { min-width: calc(100% - 115px); }
  .community-hero-copy p { font-size: 13px; }
  .community-metrics { grid-template-columns: repeat(2, 1fr); }
  .catalog-toolbar { position: static; flex-direction: column; align-items: stretch; }
  .stage-picker { overflow-x: auto; }
  .catalog-actions { align-items: stretch; }
  .catalog-search { flex: 1; }
  .catalog-search input { width: 100%; }
  .catalog-meta { align-items: flex-start; flex-direction: column; }
  .level-area-list { grid-template-columns: 1fr; }
  .level-area-row:nth-child(odd) { border-right: 0; }
  .rights-section, .contact-section { padding: 72px 0; }
  .form-row, .rights-grid { grid-template-columns: 1fr; }
  .attribution-copy { align-items: stretch; flex-direction: column; }
  .attribution-copy code { white-space: normal; }
  .attribution-copy button { align-self: flex-start; }
  .support-strip { align-items: flex-start; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .map-credit { text-align: left; }
}

@media (max-width: 480px) {
  .hero-shell, .explorer-shell, .rights-shell, .contact-shell, .journey-section, .support-strip, .site-footer { width: min(100% - 22px, 1180px); }
  .hero-copy h1 { font-size: 44px; }
  .hero-stats div { min-width: 102px; }
  .map-card { min-height: 430px; }
  .spain-map { min-height: 305px; }
  .community-hero { gap: 15px; }
  .community-orbit { display: none; }
  .community-hero-copy { min-width: 100%; }
  .community-hero h1 { font-size: 34px; }
  .catalog-actions { flex-direction: column; }
  .view-switcher button { flex: 1; }
  .level-area-row { align-items: flex-start; flex-wrap: wrap; }
  .level-area-row strong { min-width: calc(100% - 44px); }
  .level-area-row .download-link { margin-left: 41px; }
  .contact-form { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== Mejoras de navegación / UX (aditivas) ===== */

/* Menú móvil */
.nav-cluster { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-cluster .topnav { margin-left: 0; }
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.04); cursor: pointer; padding: 0; align-items: center; justify-content: center; }
.nav-toggle span { position: relative; display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: background .2s ease; }
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s ease; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.topbar.nav-open .nav-toggle span { background: transparent; }
.topbar.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.topbar.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* Estado activo del menú (scrollspy) */
.topnav a.active { color: var(--text); background: rgba(106,169,255,.14); }

/* Filtro de comunidades */
.community-filter { display: flex; align-items: center; gap: 8px; margin: 0 10px 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,7,15,.5); }
.community-filter span[aria-hidden] { opacity: .55; }
.community-filter input { flex: 1; height: 34px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.community-filter-empty { margin: 0 10px 10px; color: #606b8c; font-size: 12px; }
.community-button[hidden] { display: none; }

/* Migas y barra del explorador */
.explorer-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #7a83a3; }
.breadcrumb a { color: #9daede; text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb #breadcrumb-community { color: var(--community-color, var(--text)); font-weight: 600; }

/* Nombre de comunidad en la toolbar pegajosa */
.toolbar-community { display: none; align-self: center; padding-right: 6px; color: var(--community-color, var(--text)); font-size: 13px; font-weight: 600; white-space: nowrap; }
.toolbar-community:not(:empty) { display: inline-flex; }

/* Botón flotante volver arriba */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 120; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: #12172b; color: var(--text); font-size: 18px; cursor: pointer; box-shadow: 0 12px 30px rgba(0,0,0,.4); opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; }
.to-top.visible { opacity: 1; transform: translateY(0); }
.to-top[hidden] { display: none; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-cluster { position: absolute; top: calc(100% + 8px); right: 12px; left: 12px; flex-direction: column; align-items: stretch; gap: 6px; margin: 0; padding: 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: #0b0f1e; box-shadow: 0 20px 50px rgba(0,0,0,.5); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
  .topbar.nav-open .nav-cluster { opacity: 1; visibility: visible; transform: translateY(0); }
  .topbar .nav-cluster .topnav { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .topbar .nav-cluster .topnav a { padding: 10px 12px; border-radius: 9px; }
  .topbar .nav-cluster .support-link { display: inline-flex; justify-content: center; margin-top: 4px; }
  .to-top { right: 14px; bottom: 14px; }
}

/* Etiquetas de ciudades autónomas (Ceuta / Melilla) */
.spain-map .city-label { fill: #7a83a3; font-size: 11px; font-weight: 600; pointer-events: none; }
