:root{
  --shell-header-offset: 112px;
  --global-dock-reserve: 0px;
}
html{
  scroll-padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 960px){
  :root{
    --shell-header-offset: 168px;
  }
}
@media (max-width: 720px){
  :root{
    --shell-header-offset: 160px;
  }
}

.skip-link{
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: calc(var(--z-route-loader) + 10);
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(calc(-100% - var(--space-4)));
  border: 2px solid var(--si-ink);
  border-radius: var(--si-radius-sm);
  background: var(--si-lime);
  color: var(--si-ink);
  box-shadow: 4px 4px 0 var(--si-ink);
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
  transition: none;
}
.skip-link:focus,
.skip-link:focus-visible{
  transform: translateY(0);
  text-decoration: none;
}
#contenido-principal{
  scroll-margin-top: var(--shell-header-offset);
}
#contenido-principal:focus{
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.topbar{
  --shell-accent: var(--si-lime);
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  background: var(--topbar-bg);
  border-bottom: 2px solid var(--si-ink);
  box-shadow: var(--topbar-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar--summary,
.topbar--plan,
.topbar--about{
  --shell-accent: var(--si-violet);
}
.topbar--assistant,
.topbar--error{
  --shell-accent: var(--si-red);
}
.site-issue{
  max-width: 1320px;
  margin: 0 auto;
  border-inline: 1px solid var(--si-line);
  background: var(--si-panel);
}
.site-folio{
  min-height: 30px;
  padding: 5px var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid var(--si-line);
  color: var(--si-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-folio::before{
  content: "";
  width: 28px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--si-ink);
  background: var(--shell-accent);
}
.site-folio span:last-child{
  margin-left: auto;
  text-align: right;
}
.topbar-inner{
  padding: var(--space-3) var(--space-6);
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
}
.brand{
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--si-ink);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand:hover{
  color: var(--si-ink);
  text-decoration: none;
}
.logo{
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--si-ink);
  border-radius: 10px;
  background-color: var(--shell-accent);
  background-image: url("/img/logo-web.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: 3px 3px 0 var(--si-ink);
}
.site-masthead > span:last-child{
  overflow: hidden;
  font-size: clamp(16px, 1.8vw, 21px);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav{
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: var(--space-1);
}
.nav a{
  min-width: 44px;
  min-height: 44px;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: var(--si-radius-sm);
  color: var(--si-ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}
.nav a:hover{
  border-color: var(--si-ink);
  background: var(--si-paper);
  text-decoration: none;
}
.nav a.active,
.nav a[aria-current="page"]{
  border-color: var(--si-ink);
  background: var(--si-panel);
  box-shadow: inset 0 -5px 0 var(--shell-accent);
}
.actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.actions .icon-btn{
  min-width: 44px;
  min-height: 44px;
}

.editorial-signals{
  --signature-accent: var(--si-lime);
  max-width: 1320px;
  margin: 0 auto;
  border-inline: 1px solid var(--si-line);
  border-bottom: 1px solid var(--si-ink);
  background: var(--si-paper);
  color: var(--si-ink);
}
.editorial-signals[data-shell-family="summary"],
.editorial-signals[data-shell-family="plan"],
.editorial-signals[data-shell-family="about"]{
  --signature-accent: var(--si-violet);
}
.editorial-signals[data-shell-family="assistant"],
.editorial-signals[data-shell-family="error"]{
  --signature-accent: var(--si-red);
}
.editorial-signals-inner{
  min-height: 42px;
  padding: 0 var(--space-6);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.editorial-signal{
  min-width: 0;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--si-line);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.35;
}
.editorial-signal:first-child{
  padding-left: 0;
}
.editorial-signal:last-child{
  padding-right: 0;
  border-right: 0;
}
.editorial-signal strong,
.editorial-signal time,
.editorial-signal-context [data-signature-section]{
  color: var(--si-ink);
  font-weight: 900;
}
.editorial-signal-context [data-signature-section]::before{
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 7px;
  display: inline-block;
  border: 1px solid var(--si-ink);
  background: var(--signature-accent);
}
.editorial-signal-updated{
  flex: 1 1 auto;
  color: var(--si-muted);
}
.editorial-signal-disclaimer{
  margin-left: auto;
  background: var(--si-panel);
  box-shadow: inset 0 -3px 0 var(--signature-accent);
}
@media (prefers-reduced-motion: no-preference){
  .editorial-signals-inner{
    animation: editorial-signals-enter 420ms var(--ease-out) both;
  }
  .editorial-signals[data-shell-family="assistant"] .editorial-signals-inner{
    animation: none;
    opacity: 1;
  }
}
@keyframes editorial-signals-enter{
  from{
    opacity: .35;
  }
  to{
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce){
  .editorial-signals-inner{
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.app{
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--space-6);
  border-inline: 1px solid var(--si-line);
}
@media (max-width: 960px){
  .topbar-inner{
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .nav{
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }
}
@media (max-width: 720px){
  .site-issue{
    border-inline: 0;
  }
  .site-folio{
    padding-inline: var(--space-4);
  }
  .topbar-inner{
    padding: var(--space-2) var(--space-4) var(--space-3);
    gap: var(--space-2);
  }
  .editorial-signals{
    border-inline: 0;
  }
  .editorial-signals-inner{
    padding: 0 var(--space-4);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .editorial-signal{
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--si-line);
  }
  .editorial-signal:nth-child(odd){
    padding-left: 0;
    border-right: 1px solid var(--si-line);
  }
  .editorial-signal:nth-child(even){
    padding-right: 0;
  }
  .editorial-signal:nth-last-child(-n + 2){
    border-bottom: 0;
  }
  .editorial-signal-disclaimer{
    margin-left: 0;
  }
  .nav{
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: var(--space-1);
    scrollbar-width: thin;
  }
  .app{
    padding: var(--space-4);
    border-inline: 0;
  }
}
@media (max-width: 420px){
  .nav{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    gap: 2px;
    overflow: visible;
    overscroll-behavior-inline: auto;
    padding-bottom: 0;
    scrollbar-width: auto;
  }
  .nav a{
    width: 100%;
    min-width: 44px;
    padding: 6px 2px;
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
  }
  .editorial-signals-inner{
    grid-template-columns: minmax(0, 1fr);
  }
  .editorial-signal,
  .editorial-signal:nth-child(odd),
  .editorial-signal:nth-child(even),
  .editorial-signal:nth-last-child(-n + 2){
    padding: 7px 0;
    border-right: 0;
    border-bottom: 1px solid var(--si-line);
  }
  .editorial-signal:last-child{
    border-bottom: 0;
  }
}

.site-footer{
  margin-top: 32px;
  padding: 32px var(--space-6) calc(32px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--si-ink);
  background: var(--si-paper);
}
.site-footer-inner{
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  border: 1px solid var(--si-ink);
  border-radius: var(--si-radius-lg);
  background: var(--si-panel);
  box-shadow: 6px 6px 0 var(--si-ink);
}
.site-footer h2,
.site-footer h3{
  margin: 0 0 10px;
  color: var(--si-ink);
  font-family: var(--font-display);
  letter-spacing: .02em;
}
.site-footer h2{
  font-size: 20px;
}
.site-footer h3{
  font-size: 13px;
  text-transform: uppercase;
}
.footer-col p{
  margin: 0 0 10px;
}
.footer-editorial-note{
  padding: 10px 12px;
  border: 1px solid var(--si-ink);
  border-radius: var(--si-radius-sm);
  background: var(--si-lime);
  color: var(--si-ink);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.footer-editorial-note strong{
  color: var(--si-ink);
}
.site-footer a{
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-editorial-note a{
  color: var(--si-ink);
  font-weight: 800;
}
.footer-links{
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}
.footer-links a{
  color: var(--si-ink);
  border-bottom: 1px dashed transparent;
  text-decoration: none;
}
.footer-links a:hover{
  border-bottom-color: var(--si-ink);
}
@media (max-width: 960px){
  .site-footer-inner{
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px){
  .site-footer{
    padding: 24px var(--space-4) calc(24px + env(safe-area-inset-bottom));
  }
  .site-footer-inner{
    padding: var(--space-4);
    border-radius: var(--si-radius-md);
    box-shadow: 4px 4px 0 var(--si-ink);
  }
}

.route-loader{
  position: fixed;
  top: var(--shell-header-offset);
  right: 24px;
  z-index: var(--z-route-loader);
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--route-loader-bg);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
}
.route-loader.is-visible{
  opacity: 1;
  transform: translateY(0);
}
.route-loader-bar{
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--route-loader-track-bg);
  overflow: hidden;
  position: relative;
}
.route-loader-bar::after{
  content:"";
  position:absolute;
  inset:0;
  width: 40%;
  background: var(--accent);
  animation: route-loader-move 1s ease-in-out infinite;
}
.route-loader-text{
  color: var(--muted);
}
@keyframes route-loader-move{
  0%{ transform: translateX(-100%); }
  100%{ transform: translateX(200%); }
}
@media (max-width: 720px){
  .route-loader{
    right: 12px;
  }
}

.drawer{
  display:none;
}
@media (max-width: 960px){
  .drawer{
    display:block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.40);
    z-index: var(--z-drawer);
    padding: 88px 18px 18px;
    overflow: auto;
  }
  .drawer .panel{
    max-width: 560px;
    margin: 0 auto;
    background: var(--panel);
  }
}
@media (min-width: 961px){
  .drawer{
    display: none !important;
  }
}

.global-dock{
  position: static;
  margin: var(--space-6) calc(var(--space-6) + env(safe-area-inset-right)) 0 calc(var(--space-6) + env(safe-area-inset-left));
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
  border: 1px solid var(--si-ink);
  border-radius: var(--si-radius-md);
  background: var(--global-dock-bg);
  color: var(--global-dock-color);
  box-shadow: var(--global-dock-shadow);
}
.global-dock-assistant,
.global-dock-share-link{
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--si-ink);
  text-decoration: none;
}
.global-dock-assistant{
  gap: 8px;
  padding: 7px 12px 7px 7px;
  border-radius: var(--si-radius-sm);
  background: var(--si-lime);
  color: var(--si-ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
}
.global-dock-assistant:hover,
.global-dock-share-link:hover{
  color: var(--si-ink);
  background-color: var(--si-violet);
  text-decoration: none;
}
.global-dock-assistant:focus-visible,
.global-dock-share-link:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: none;
}
.global-dock-assistant-icon{
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--si-ink);
  border-radius: 50%;
  background: var(--si-panel);
  color: var(--si-ink);
  font-size: 18px;
  font-weight: 900;
}
.global-dock-share{
  display: flex;
  align-items: center;
  gap: 6px;
}
.global-dock-share-link{
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--si-panel);
  color: var(--global-dock-color);
}
.global-dock-share-link svg{
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.global-dock-share-link[data-share-network="facebook"]{ color: var(--share-facebook-color); }
.global-dock-share-link[data-share-network="x"]{ color: var(--share-x-color); }
.global-dock-share-link[data-share-network="linkedin"]{ color: var(--share-linkedin-color); }
.global-dock-share-link[data-share-network="whatsapp"]{ color: var(--share-whatsapp-color); }
@media (max-width: 720px){
  .global-dock{
    margin-block-start: var(--space-4);
    margin-inline: calc(var(--space-4) + env(safe-area-inset-left)) calc(var(--space-4) + env(safe-area-inset-right));
  }
}
@media (max-width: 480px){
  .global-dock-assistant{
    width: 44px;
    height: 44px;
    padding: 0;
  }
  .global-dock-assistant-text{
    display: none;
  }
}
@media (max-width: 320px){
  .global-dock{
    margin-inline: calc(8px + env(safe-area-inset-left)) calc(8px + env(safe-area-inset-right));
    padding: 6px;
    justify-content: center;
    gap: 6px;
  }
  .global-dock-share{
    gap: 4px;
  }
}
