/* CISME. Los controles de las cinco unidades comparten medidas, orden y foco. */
[data-cisme-header], [data-cisme-footer], .ci-skip {
  --ci-accent: #38524c;
  --ci-ink: #21312f;
  --ci-line: #d3ddd7;
  box-sizing: border-box;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  text-align: start;
  line-height: 1.4;
  letter-spacing: normal;
}
[data-cisme-unit=dental] { --ci-accent: #30566c; }
[data-cisme-unit=nutrition] { --ci-accent: #42604c; }
[data-cisme-unit=physio] { --ci-accent: #34615e; }
[data-cisme-unit=mental] { --ci-accent: #63566b; }
#cisme-global-header {
  position: sticky; inset: auto; top: 0; z-index: 45;
  width: 100%; padding: 0; margin: 0;
  color: var(--ci-ink); background: #fff;
  border: 0; border-bottom: 1px solid var(--ci-line);
  box-shadow: none; isolation: isolate;
}
#cisme-global-header *, #review-footer[data-cisme-footer] * { box-sizing: border-box; }
.ci-header a, .ci-header summary, .ci-footer a { color: inherit; text-decoration: none; }
.ci-bar, .ci-foot-inner { width: min(100%, 84rem); margin-inline: auto; padding-inline: clamp(1rem, 3vw, 3rem); }
.ci-bar {
  display: grid; align-items: center; gap: .75rem; min-height: 4.65rem;
  grid-template: "brand nav book portal language menu" auto / minmax(max-content, 1fr) auto auto auto auto auto;
}
.ci-brand { grid-area: brand; display: inline-flex; align-items: center; gap: .6rem; width: fit-content; max-width: 100%; }
.ci-brand img { display: block; width: 2rem; height: 2.45rem; object-fit: contain; }
.ci-header .ci-brand img { filter: brightness(0) opacity(.8); }
@supports (mask-image: url("logo-cisme-d09da84289ff.png")) {
  .ci-header .ci-brand img {
    content: linear-gradient(var(--ci-accent), var(--ci-accent)); filter: none;
    mask: url("logo-cisme-d09da84289ff.png") center / contain no-repeat;
  }
}
.ci-brand span { display: grid; gap: .05rem; }
.ci-brand strong { font: 650 .97rem/1.26 Inter,"Segoe UI",Arial,sans-serif; letter-spacing: .035em; white-space: nowrap; }
.ci-brand small { font-size: .79rem; line-height: 1.2; color: var(--ci-accent); font-weight: 600; }
.ci-shortcuts { grid-area: nav; display: flex; gap: 1.1rem; margin-inline-end: 1rem; }
.ci-shortcuts a { display: inline-flex; align-items: center; min-height: 44px; font-size: .86rem; font-weight: 550; }
#cisme-global-header .ci-book, #cisme-global-header .ci-portal, .ci-header summary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; gap: .42rem; padding: .5rem .85rem;
  font: 600 .85rem/1.23 Inter,"Segoe UI",Arial,sans-serif;
  border-radius: .35rem; white-space: normal; text-align: center;
}
#cisme-global-header .ci-book { grid-area: book; color: #fff; background: var(--ci-accent); border: 1px solid var(--ci-accent); }
#cisme-global-header .ci-portal { grid-area: portal; color: var(--ci-ink); border: 1px solid var(--ci-line); }
.ci-header summary { list-style: none; cursor: pointer; color: var(--ci-ink); }
.ci-header summary::-webkit-details-marker { display:none; }
.ci-header summary[data-cisme-single-language] { cursor: default; }
.ci-language { grid-area: language; position: relative; }
.ci-language summary:not([data-cisme-single-language])::after {
  content: ""; width: .43rem; height: .43rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.1rem) rotate(45deg);
}
.ci-menu { grid-area: menu; }
.ci-menu i { display: inline-block; width: 1.05rem; height: .68rem; border-block: 1.5px solid currentColor; position: relative; }
.ci-menu i::after { content: ""; position: absolute; inset: 45% 0 auto; border-top: 1.5px solid currentColor; }
.ci-header details[open] > summary { background: #eef3ef; }
.ci-header :is(a,summary):hover, .ci-footer a:hover { text-decoration: underline; text-underline-offset: .22em; }
.ci-header :is(a,summary):focus-visible, .ci-footer :is(a,button):focus-visible, .ci-skip:focus {
  outline: 3px solid #b05b34; outline-offset: 3px;
}
.ci-language-options, .ci-menu-panel {
  position: absolute; z-index: 1; background: #fff; color: var(--ci-ink);
  border: 1px solid var(--ci-line); border-radius: .4rem; box-shadow: 0 .6rem 1.6rem #172a211a;
  padding: .65rem; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain;
}
.ci-language-options { inset-block-start: 100%; inset-inline-end: 0; min-width: 9.5rem; }
.ci-language-options a { display: flex; align-items:center; min-height: 44px; padding: .45rem .7rem; }
.ci-language-options a[aria-current=page], .ci-menu-panel a[aria-current=page] { font-weight: 700; }
.ci-menu-panel {
  inset-block-start: calc(100% - .2rem); inset-inline-end: max(1rem, calc((100% - 78rem)/2));
  width: min(calc(100% - 2rem), 36rem); padding: 1.15rem 1.25rem;
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(13rem,100%),1fr)); gap: 1rem;
}
.ci-header details:not([open]) > :not(summary) { display:none; }
.ci-menu-panel nav, .ci-foot-nav nav, .ci-foot-brand nav { display:block; min-width:0; }
.ci-menu-panel p, .ci-footer nav p { margin: 0 0 .45rem; font-size: .82rem; font-weight: 700; letter-spacing: .02em; }
.ci-menu-panel ul, .ci-footer ul { list-style: none; padding: 0; margin: 0; }
.ci-menu-panel a { display: flex; align-items: center; min-height: 44px; padding: .35rem 0; font-size: .9rem; }
.ci-skip { position: fixed; z-index: 100; inset-inline-start: .5rem; top: .5rem; transform: translateY(-200%); padding:.75rem; color:#172821; background:#fff; }
.ci-skip:focus { transform:none; }
#review-footer[data-cisme-footer] { color:#f8fbf9; background:#263c38; border:0; padding: clamp(2.4rem,5vw,4.4rem) 0; }
.ci-foot-inner { display:grid; grid-template-columns:minmax(11rem,.58fr) minmax(0,2.7fr); gap:clamp(2rem,4vw,4.25rem); }
.ci-foot-brand .ci-brand { margin-bottom:1.55rem; }
.ci-foot-brand img { background:transparent; }
.ci-foot-brand .ci-brand small { color:#e4ece7; }
.ci-foot-nav { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(9.4rem,100%),1fr)); gap:1.6rem; }
.ci-footer nav p { color:#fff; }
.ci-footer nav a, .ci-footer nav button { display:inline-block; padding:.28rem 0; color:#e3eae6; font-size:.86rem; overflow-wrap:anywhere; }
@media(max-width:69rem) {
  .ci-shortcuts {display:none;}
  .ci-bar {grid-template:"brand book portal language menu" auto / minmax(0,1fr) auto auto auto auto;}
}
@media(max-width:47rem) {
  .ci-bar {grid-template:"brand brand menu" auto "book portal language" auto / minmax(0,1fr) minmax(0,1.3fr) auto;
    gap:.16rem .45rem; padding-block:.25rem .4rem;}
  .ci-brand strong {font-size:.87rem;}
  .ci-brand img {height:2.1rem;width:1.7rem;}
  .ci-menu {justify-self:end;}
  .ci-header summary, #cisme-global-header .ci-book, #cisme-global-header .ci-portal {font-size:.79rem; padding:.43rem .55rem;}
  .ci-menu-panel { inset-inline: .5rem; width:auto; max-height:calc(100vh - 8rem); max-height:calc(100dvh - 8rem); }
  .ci-foot-inner {display:block;}
  .ci-foot-brand {margin-block-end:2rem;}
  .ci-foot-nav {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:23rem) {
  .ci-bar {padding-inline:.6rem;gap:.12rem .25rem;}
  .ci-foot-nav {column-gap:.8rem;}
}
@media print {
  #cisme-global-header, .ci-skip, #review-footer[data-cisme-footer] {display:none;}
}
