html.hu-mm-open,
html.hu-mm-open body {
  overflow: hidden !important;
}

#huMentalMapsOverlay {
  position: fixed;
  inset: 0;
  z-index: 2147483400;
  overflow-y: auto;
  background: #f4f7f9;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

#huMentalMapsOverlay[hidden] {
  display: none !important;
}

.hu-mm-shell {
  min-height: 100vh;
  color: #183747;
}

.hu-mm-header {
  color: white;
  background:
    linear-gradient(
      135deg,
      #05273d 0%,
      #073e59 65%,
      #0b6370 100%
    );
}

.hu-mm-header-inner {
  width: min(1180px,calc(100% - 36px));
  min-height: 142px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 110px 1fr 120px;
  gap: 24px;
  align-items: center;
}

.hu-mm-back,
.hu-mm-close {
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
  color: #dcebf0;

  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
}

.hu-mm-back {
  width: fit-content;
  min-height: 38px;
  padding: 0 12px;
}

.hu-mm-close {
  justify-self: end;
  width: 38px;
  height: 38px;
  font-size: 19px;
}

.hu-mm-header-inner > div:nth-child(2) > span {
  color: #59d5c9;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.1px;
}

.hu-mm-header h1 {
  margin: 7px 0 4px;
  font-size: 27px;
  letter-spacing: -.7px;
}

.hu-mm-header p {
  margin: 0;
  color: #a4bdc8;
  font-size: 10px;
}

.hu-mm-count {
  justify-self: end;
  width: 102px;
  height: 66px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.hu-mm-count strong {
  color: #59d5c9;
  font-size: 21px;
}

.hu-mm-count span {
  margin-top: 3px;
  color: #9eb6c1;
  font-size: 7px;
}

.hu-mm-main,
.hu-mm-viewer {
  width: min(1180px,calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.hu-mm-intro {
  padding: 25px 28px;

  display: grid;
  grid-template-columns: 1fr 105px;
  gap: 25px;
  align-items: center;

  border-radius: 18px;
  border: 1px solid #dce7eb;
  background: white;

  box-shadow:
    0 14px 40px
    rgba(6,46,68,.05);
}

.hu-mm-intro > div > span {
  color: #0d9488;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
}

.hu-mm-intro h2 {
  max-width: 700px;
  margin: 7px 0 7px;

  color: #173b4d;
  font-size: 24px;
  line-height: 1.15;
}

.hu-mm-intro p {
  max-width: 720px;
  margin: 0;

  color: #718690;
  font-size: 10px;
  line-height: 1.65;
}

.hu-mm-intro-icon {
  width: 92px;
  height: 92px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: white;
  font-size: 11px;
  font-weight: 950;

  background:
    radial-gradient(
      circle at 35% 30%,
      #68d9ce,
      #0d9488 55%,
      #08766f
    );

  box-shadow:
    0 12px 30px
    rgba(13,148,136,.2);
}

.hu-mm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin: 18px 0;
}

.hu-mm-filter {
  min-height: 36px;
  padding: 0 13px;

  border-radius: 999px;
  border: 1px solid #dce6e9;

  background: white;
  color: #637985;

  font-size: 9px;
  font-weight: 800;
}

.hu-mm-filter.active {
  border-color: #0d9488;
  background: #0d9488;
  color: white;
}

.hu-mm-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}

.hu-mm-card {
  overflow: hidden;

  border: 1px solid #dce6ea;
  border-radius: 16px;

  background: white;

  box-shadow:
    0 10px 30px
    rgba(7,46,68,.04);
}

.hu-mm-card-preview {
  position: relative;
  height: 150px;
  overflow: hidden;

  display: grid;
  place-items: center;

  background:
    radial-gradient(
      circle at center,
      color-mix(
        in srgb,
        var(--map-color) 12%,
        white
      ),
      #f8fafb 70%
    );
}

.hu-mm-card-preview > strong {
  position: relative;
  z-index: 5;

  width: 105px;
  min-height: 48px;
  padding: 8px;

  display: grid;
  place-items: center;

  text-align: center;

  border-radius: 12px;

  background: var(--map-color);
  color: white;

  font-size: 8px;
  line-height: 1.3;
}

.hu-mm-mini {
  position: absolute;

  width: 53px;
  height: 25px;

  border-radius: 7px;

  background: white;
  border: 2px solid
    color-mix(
      in srgb,
      var(--map-color) 45%,
      white
    );
}

.hu-mm-mini.n1 {
  left: 22px;
  top: 27px;
}

.hu-mm-mini.n2 {
  right: 22px;
  top: 27px;
}

.hu-mm-mini.n3 {
  left: 22px;
  bottom: 27px;
}

.hu-mm-mini.n4 {
  right: 22px;
  bottom: 27px;
}

.hu-mm-card-body {
  padding: 16px;
}

.hu-mm-card-body > span {
  color: var(--map-color);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .7px;
}

.hu-mm-card-body h3 {
  margin: 6px 0 5px;
  color: #244555;
  font-size: 13px;
}

.hu-mm-card-body p {
  min-height: 32px;
  margin: 0;

  color: #788b95;
  font-size: 9px;
  line-height: 1.5;
}

.hu-mm-card-actions {
  display: flex;
  gap: 7px;

  margin-top: 14px;
}

.hu-mm-card-actions button,
.hu-mm-card-actions a {
  min-height: 35px;
  padding: 0 11px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  text-decoration: none;

  font-size: 8px;
  font-weight: 850;
}

.hu-mm-card-actions button {
  flex: 1;

  border: 0;
  background: var(--map-color);
  color: white;
}

.hu-mm-card-actions a {
  border: 1px solid #dce6e9;
  background: white;
  color: #647984;
}

.hu-mm-study-actions {
  margin-bottom: 13px;

  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.hu-mm-primary,
.hu-mm-secondary {
  min-height: 39px;
  padding: 0 14px;

  border-radius: 9px;

  font-size: 9px;
  font-weight: 850;
}

.hu-mm-primary {
  border: 0;
  background: #0d9488;
  color: white;
}

.hu-mm-secondary {
  border: 1px solid #d7e3e7;
  background: white;
  color: #637985;
}

.hu-mm-paper {
  --map-color: #0d9488;

  position: relative;

  width: 100%;
  aspect-ratio: 1.414 / 1;

  overflow: hidden;

  border-radius: 18px;
  border: 1px solid #d9e4e8;

  background:
    radial-gradient(
      circle at center,
      color-mix(
        in srgb,
        var(--map-color) 9%,
        white
      ),
      #f8fafb 56%
    );

  box-shadow:
    0 18px 50px
    rgba(5,42,62,.08);
}

.hu-mm-paper-brand {
  position: absolute;
  top: 22px;
  left: 25px;
  z-index: 6;
}

.hu-mm-paper-brand span,
.hu-mm-paper-brand strong {
  display: block;
}

.hu-mm-paper-brand span {
  color: var(--map-color);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .9px;
}

.hu-mm-paper-brand strong {
  margin-top: 3px;
  color: #728690;
  font-size: 7px;
}

.hu-mm-lines {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 1;
}

.hu-mm-lines line {
  stroke: #c7d4d9;
  stroke-width: 4;
}

.hu-mm-center {
  position: absolute;
  z-index: 4;

  left: 50%;
  top: 50%;

  width: 26%;
  min-height: 22%;

  transform:
    translate(-50%,-50%);

  padding: 18px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;

  border-radius: 21px;

  color: white;
  background: var(--map-color);

  box-shadow:
    0 13px 30px
    color-mix(
      in srgb,
      var(--map-color) 25%,
      transparent
    );
}

.hu-mm-center small {
  opacity: .8;
  font-size: 7px;
  font-weight: 900;
}

.hu-mm-center h2 {
  margin: 6px 0 5px;

  font-size: clamp(12px,1.6vw,21px);
  line-height: 1.1;
}

.hu-mm-center p {
  margin: 0;

  opacity: .85;

  font-size: clamp(7px,.8vw,10px);
  line-height: 1.4;
}

.hu-mm-node {
  position: absolute;
  z-index: 4;

  width: 25%;
  min-height: 23%;

  padding: 11px 13px;

  border-radius: 13px;
  border: 1px solid #dce6e9;

  background: rgba(255,255,255,.97);

  box-shadow:
    0 8px 20px
    rgba(6,48,70,.05);
}

.hu-mm-node > span {
  width: 22px;
  height: 22px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: var(--map-color);
  color: white;

  font-size: 8px;
  font-weight: 900;
}

.hu-mm-node h3 {
  margin: 7px 0 5px;

  color: #284958;
  font-size: clamp(8px,1vw,12px);
}

.hu-mm-node p {
  margin: 0;

  color: #6a808a;
  font-size: clamp(6px,.72vw,9px);
  line-height: 1.43;
}

.hu-mm-node-1 {
  left: 4%;
  top: 11%;
}

.hu-mm-node-2 {
  left: 37.5%;
  top: 7%;
}

.hu-mm-node-3 {
  right: 4%;
  top: 11%;
}

.hu-mm-node-4 {
  left: 4%;
  bottom: 9%;
}

.hu-mm-node-5 {
  left: 37.5%;
  bottom: 6%;
}

.hu-mm-node-6 {
  right: 4%;
  bottom: 9%;
}

.hu-mm-view-note {
  text-align: center;
  color: #83969f;

  font-size: 8px;
}

.hu-mm-pilot-entry {
  margin-top: 12px;
  padding: 18px;

  display: grid;
  grid-template-columns: 58px 1fr 80px 130px;
  gap: 15px;
  align-items: center;

  border-radius: 15px;
  border: 1px solid #cae5e1;

  background:
    linear-gradient(
      135deg,
      #f2fbfa,
      #ffffff
    );

  box-shadow:
    0 8px 25px
    rgba(13,148,136,.05);
}

.hu-mm-pilot-entry-icon {
  width: 54px;
  height: 54px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      #0d9488,
      #50cfc3
    );

  color: white;
}

.hu-mm-pilot-entry-icon span {
  font-size: 8px;
  font-weight: 950;
}

.hu-mm-pilot-entry-copy > span {
  color: #0d9488;
  font-size: 7px;
  font-weight: 900;
}

.hu-mm-pilot-entry-copy h2 {
  margin: 4px 0 4px;

  color: #214455;
  font-size: 15px;
}

.hu-mm-pilot-entry-copy p {
  margin: 0;

  color: #718690;
  font-size: 9px;
  line-height: 1.5;
}

.hu-mm-pilot-entry-stat {
  text-align: center;
}

.hu-mm-pilot-entry-stat strong {
  display: block;

  color: #0d9488;
  font-size: 21px;
}

.hu-mm-pilot-entry-stat span {
  color: #8497a0;
  font-size: 7px;
}

.hu-mm-pilot-entry-button {
  min-height: 41px;

  border: 0;
  border-radius: 10px;

  background: #0d9488;
  color: white;

  font-size: 9px;
  font-weight: 850;
}

.hu-mm-home-entry {
  min-height: 130px;
  padding: 18px;

  display: grid;
  grid-template-columns: 48px 1fr 20px;
  gap: 14px;
  align-items: center;

  text-align: left;

  border: 1px solid #cfe6e2;
  border-radius: 15px;

  background: #f5fbfa;
}

.hu-mm-home-mark {
  width: 45px;
  height: 45px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #0d9488;
  color: white;

  font-size: 7px;
  font-weight: 950;
}

.hu-mm-home-entry span {
  color: #0d9488;
  font-size: 7px;
  font-weight: 900;
}

.hu-mm-home-entry h3 {
  margin: 4px 0;
  color: #244555;
  font-size: 13px;
}

.hu-mm-home-entry p {
  margin: 0;
  color: #758a94;
  font-size: 8px;
  line-height: 1.45;
}

.hu-mm-home-entry b {
  color: #0d9488;
}

@media(max-width:800px) {

  .hu-mm-header-inner {
    width: calc(100% - 26px);
    min-height:
      calc(
        135px +
        env(safe-area-inset-top)
      );

    padding-top:
      env(safe-area-inset-top);

    grid-template-columns: 1fr auto;
    gap: 7px;
  }

  .hu-mm-back {
    grid-column: 1/-1;
    margin-top: 10px;
  }

  .hu-mm-header h1 {
    font-size: 21px;
  }

  .hu-mm-count {
    width: 75px;
    height: 55px;
  }

  .hu-mm-main,
  .hu-mm-viewer {
    width: calc(100% - 22px);

    padding:
      15px 0
      calc(
        55px +
        env(safe-area-inset-bottom)
      );
  }

  .hu-mm-intro {
    padding: 18px;
    grid-template-columns: 1fr 70px;
  }

  .hu-mm-intro h2 {
    font-size: 19px;
  }

  .hu-mm-intro-icon {
    width: 65px;
    height: 65px;
  }

  .hu-mm-filters {
    overflow-x: auto;
    flex-wrap: nowrap;

    padding-bottom: 3px;
  }

  .hu-mm-filter {
    flex: 0 0 auto;
  }

  .hu-mm-grid {
    grid-template-columns: 1fr;
  }

  .hu-mm-paper {
    aspect-ratio: auto;
    min-height: 970px;
  }

  .hu-mm-lines {
    display: none;
  }

  .hu-mm-center {
    position: relative;
    left: auto;
    top: auto;

    width: auto;
    min-height: 130px;

    margin: 70px 16px 12px;

    transform: none;
  }

  .hu-mm-node {
    position: relative;
    inset: auto !important;

    width: auto;
    min-height: 0;

    margin: 8px 16px;
  }

  .hu-mm-node p {
    font-size: 10px;
  }

  .hu-mm-node h3 {
    font-size: 12px;
  }

  .hu-mm-study-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hu-mm-pilot-entry {
    grid-template-columns: 48px 1fr;
  }

  .hu-mm-pilot-entry-stat {
    text-align: left;
  }

  .hu-mm-pilot-entry-button {
    grid-column: 1/-1;
  }
}


/* ============================================================
   MAPAS MENTAIS — VISUALIZADOR PDF INTERNO
   ============================================================ */

.hu-mm-pdf-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  background: #e9eef1;
}

.hu-mm-pdf-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;

  min-height: 66px;
  padding:
    env(safe-area-inset-top)
    18px
    0;

  display: grid;
  grid-template-columns: 95px 1fr auto;
  gap: 14px;
  align-items: center;

  background:
    linear-gradient(
      135deg,
      #05273d,
      #073f5b
    );

  color: white;

  box-shadow:
    0 7px 25px
    rgba(0,0,0,.15);
}

.hu-mm-pdf-back {
  min-height: 38px;
  padding: 0 12px;

  border-radius: 9px;
  border:
    1px solid
    rgba(255,255,255,.16);

  background:
    rgba(255,255,255,.07);

  color: #e4eff3;

  font-size: 10px;
  font-weight: 850;
}

.hu-mm-pdf-title {
  min-width: 0;
}

.hu-mm-pdf-title span {
  display: block;

  color: #59d5c9;

  font-size: 7px;
  font-weight: 900;
  letter-spacing: .8px;
}

.hu-mm-pdf-title strong {
  display: block;

  margin-top: 3px;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  font-size: 11px;
}

.hu-mm-pdf-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hu-mm-pdf-actions button,
.hu-mm-pdf-actions a {
  min-height: 35px;
  padding: 0 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
  border:
    1px solid
    rgba(255,255,255,.14);

  background:
    rgba(255,255,255,.07);

  color: white;

  text-decoration: none;

  font-size: 8px;
  font-weight: 800;
}

.hu-mm-pdf-actions .hu-mm-pdf-save {
  background: #0d9488;
  border-color: #0d9488;
}

.hu-mm-pdf-actions .hu-mm-pdf-x {
  width: 35px;
  padding: 0;

  font-size: 19px;
}

.hu-mm-pdf-stage {
  flex: 1;

  min-height:
    calc(
      100vh -
      66px -
      env(safe-area-inset-top)
    );

  padding: 10px;
}

.hu-mm-pdf-stage iframe {
  width: 100%;
  height:
    calc(
      100vh -
      90px -
      env(safe-area-inset-top)
    );

  display: block;

  border: 0;
  border-radius: 10px;

  background: white;

  box-shadow:
    0 8px 30px
    rgba(0,0,0,.12);
}

.hu-mm-pdf-mobile-tools {
  display: none;
}


/* ============================================================
   MOBILE / IPHONE
   ============================================================ */

@media(max-width:760px) {

  .hu-mm-pdf-toolbar {
    min-height:
      calc(
        61px +
        env(safe-area-inset-top)
      );

    padding:
      env(safe-area-inset-top)
      10px
      0;

    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .hu-mm-pdf-back {
    min-height: 35px;
    padding: 0 9px;

    font-size: 9px;
  }

  .hu-mm-pdf-title span {
    font-size: 6px;
  }

  .hu-mm-pdf-title strong {
    font-size: 9px;
  }

  .hu-mm-pdf-actions
    > *:not(.hu-mm-pdf-x) {
    display: none;
  }

  .hu-mm-pdf-actions {
    display: block;
  }

  .hu-mm-pdf-actions .hu-mm-pdf-x {
    display: inline-flex;

    width: 35px;
    height: 35px;
  }

  .hu-mm-pdf-mobile-tools {
    position: sticky;
    top:
      calc(
        61px +
        env(safe-area-inset-top)
      );

    z-index: 45;

    min-height: 48px;
    padding: 6px 10px;

    display: grid;
    grid-template-columns:
      repeat(3,1fr);
    gap: 6px;

    background: white;

    border-bottom:
      1px solid #dce5e9;

    box-shadow:
      0 4px 12px
      rgba(0,0,0,.06);
  }

  .hu-mm-pdf-mobile-tools button,
  .hu-mm-pdf-mobile-tools a {
    min-height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    border: 1px solid #d6e2e6;

    background: #f8fafb;
    color: #345563;

    text-decoration: none;

    font-size: 8px;
    font-weight: 850;
  }

  .hu-mm-pdf-mobile-tools
    button:first-child {
    border-color: #bce1dc;

    background: #eef9f7;
    color: #0b8179;
  }

  .hu-mm-pdf-stage {
    min-height:
      calc(
        100vh -
        109px -
        env(safe-area-inset-top)
      );

    padding: 5px;
  }

  .hu-mm-pdf-stage iframe {
    height:
      calc(
        100vh -
        120px -
        env(safe-area-inset-top) -
        env(safe-area-inset-bottom)
      );

    border-radius: 6px;
  }
}

@media print {

  .hu-mm-pdf-toolbar,
  .hu-mm-pdf-mobile-tools {
    display: none !important;
  }

  .hu-mm-pdf-stage {
    padding: 0;
  }
}
