/* Page CSS — post #38 */
/* Compact Instructions disclosure on mobile; preserve the desktop note layout. */
.mlp-instructions { margin-top: 4px; }
.mlp-instructions__summary { display: none; }
.mlp-instructions .mlp-card__note { margin-top: 0; }
@media (max-width: 599px) {
  .mlp-instructions { border-top: 1px solid hsl(220 15% 25% / 0.7); }
  .mlp-instructions__summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 4px; color: var(--mlp-primary); font-family: var(--font-body); font-size: 12px; line-height: 16px; font-style: normal; cursor: pointer; list-style: none; }
  .mlp-instructions__summary::-webkit-details-marker { display: none; }
  .mlp-instructions__summary::after { content: ""; width: 7px; height: 7px; flex: none; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
  .mlp-instructions[open] .mlp-instructions__summary::after { transform: rotate(225deg) translate(-1px, -1px); }
  .mlp-instructions .mlp-card__note { margin: 4px 0 0; }
}


@media (max-width: 599px) {
  #tusortlinks01, .tuli-c-tusortlinks01 {
    gap: 4px;
    margin-top: 16px;
  }
  #tusortlinks02, .tuli-c-tusortlinks02 {
    margin-right: 2px;
    font-size: 13px;
    line-height: 18px;
  }
  #tusortlinks03, .tuli-c-tusortlinks03, #tusortlinks04, .tuli-c-tusortlinks04, #tusortlinks05, .tuli-c-tusortlinks05, #tusortlinks06, .tuli-c-tusortlinks06, #tusortlinks07, .tuli-c-tusortlinks07 {
    padding: 3px 8px;
    font-size: 11px;
    line-height: 15px;
  }
}

@media (max-width: 599px) {
  #tusortlinks01, .tuli-c-tusortlinks01 {
    gap: 5px;
  }
  #tusortlinks01 .mlp-pill, .tuli-c-tusortlinks01 .mlp-pill {
    padding: 3px 8px;
    font-size: 11px;
    line-height: 15px;
  }
}

@media (max-width: 599px) {
  #tusortlinks01 .mlp-pill, .tuli-c-tusortlinks01 .mlp-pill {
    padding: 2px 7px;
    font-size: 10px;
    line-height: 14px;
  }
}

@media (max-width: 599px) {
  #tusortlinks01, .tuli-c-tusortlinks01 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
  }

  #tusortlinks01 > .tuli-svg-block, .tuli-c-tusortlinks01 > .tuli-svg-block, #tusortlinks01 > .mlp-sort__label, .tuli-c-tusortlinks01 > .mlp-sort__label {
    grid-column: 1 / -1;
  }

  #tusortlinks01 > .tuli-svg-block, .tuli-c-tusortlinks01 > .tuli-svg-block {
    display: none;
  }

  #tusortlinks01 > .mlp-pill, .tuli-c-tusortlinks01 > .mlp-pill {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 3px 4px;
    font-size: 11px;
    line-height: 15px;
    white-space: nowrap;
  }
}

@media (max-width: 599px) {
  #tusortlinks01, .tuli-c-tusortlinks01 {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    scrollbar-width: thin;
    scrollbar-color: var(--mlp-border) transparent;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  #tusortlinks01 > *, .tuli-c-tusortlinks01 > * {
    flex: 0 0 auto;
  }
  #tusortlinks01 .mlp-pill, .tuli-c-tusortlinks01 .mlp-pill {
    white-space: nowrap;
  }
}

@media (max-width: 599px) {
  #tusortlinks01, .tuli-c-tusortlinks01 {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #tusortlinks01::-webkit-scrollbar, .tuli-c-tusortlinks01::-webkit-scrollbar {
    display: none;
  }

  #tusortlinks01 .mlp-sort__label, .tuli-c-tusortlinks01 .mlp-sort__label, #tusortlinks01 .mlp-pill, .tuli-c-tusortlinks01 .mlp-pill {
    flex: 0 0 auto;
  }
}


@media (max-width: 599px) {
  #tusortlinks01, .tuli-c-tusortlinks01 {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  #tusortlinks01::-webkit-scrollbar, .tuli-c-tusortlinks01::-webkit-scrollbar {
    display: none;
  }
  #tusortlinks01 > svg, .tuli-c-tusortlinks01 > svg, #tusortlinks01 > .tuli-svg-block, .tuli-c-tusortlinks01 > .tuli-svg-block, #tusortlinks01 > .mlp-sort__label, .tuli-c-tusortlinks01 > .mlp-sort__label, #tusortlinks01 > .mlp-pill, .tuli-c-tusortlinks01 > .mlp-pill {
    flex: 0 0 auto;
  }
  #tusortlinks01 .mlp-pill, .tuli-c-tusortlinks01 .mlp-pill {
    padding: 3px 10px;
    font-size: 11px;
    line-height: 16px;
  }
}

/* Useful Links: compact mobile sort pills */
@media (max-width: 599px) {
  #tusortlinks01 {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  #tusortlinks01::-webkit-scrollbar { display: none; }
  #tusortlinks01 .mlp-sort__label,
  #tusortlinks01 > svg,
  #tusortlinks01 > .tuli-svg-block { flex: 0 0 auto; }
  #tusortlinks01 .mlp-pill {
    flex: 0 0 auto;
    padding: 3px 8px;
    font-size: 11px;
    line-height: 14px;
    white-space: nowrap;
  }
}

@media (max-width: 599px) {
  #tusortlinks01, .tuli-c-tusortlinks01 {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  #tusortlinks01::-webkit-scrollbar, .tuli-c-tusortlinks01::-webkit-scrollbar { display: none; }
  #tusortlinks01 .mlp-sort__label, .tuli-c-tusortlinks01 .mlp-sort__label, #tusortlinks01 .mlp-pill, .tuli-c-tusortlinks01 .mlp-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  #tusortlinks01 .mlp-pill, .tuli-c-tusortlinks01 .mlp-pill {
    width: auto;
    min-height: 0;
    height: auto;
    padding: 2px 8px;
    line-height: 16px;
  }
}

/* Keep the instruction dropdown above the full-card destination link, especially on touch screens. */
.mlp-card--link .mlp-card__link {
  z-index: 1;
}
.mlp-card--link .mlp-instructions {
  position: relative;
  z-index: 3;
}
.mlp-card--link .mlp-instructions__summary {
  position: relative;
  z-index: 4;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  touch-action: manipulation;
}
.mlp-card--link .mlp-instructions__summary:focus-visible {
  outline: 2px solid var(--mlp-primary);
  outline-offset: 3px;
}
@media (max-width: 599px) {
  .mlp-card--link .mlp-instructions__summary {
    width: 100%;
  }
}

#tutitlerow001, .tuli-c-tutitlerow001 {
  align-items: flex-start;
  min-width: 0;
  flex-wrap: wrap;
}

#tutitlerow001 .mlp-card__title, .tuli-c-tutitlerow001 .mlp-card__title {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#tutitlerow001::after, .tuli-c-tutitlerow001::after {
  width: 12px;
  height: 12px;
  margin-top: 5px;
}

@media (max-width: 599px) {
  #tutitlerow001::after, .tuli-c-tutitlerow001::after {
    width: 11px;
    height: 11px;
    margin-top: 6px;
  }
}

#tutitlerow001::after, .tuli-c-tutitlerow001::after {
  flex: 0 0 12px;
  width: 12px;
  min-width: 12px;
  max-width: 12px;
  height: 12px;
  min-height: 12px;
  max-height: 12px;
  align-self: flex-start;
  margin-top: 5px;
}

@media (max-width: 599px) {
  #tutitlerow001::after, .tuli-c-tutitlerow001::after {
    flex-basis: 11px;
    width: 11px;
    min-width: 11px;
    max-width: 11px;
    height: 11px;
    min-height: 11px;
    max-height: 11px;
    margin-top: 6px;
  }
}

/* Fix Useful Links card proportions: keep logos from consuming the title column. */
.mlp-card--link .mlp-card__logo {
  flex: 0 0 220px;
  width: 220px;
  min-width: 0;
  overflow: hidden;
}
.mlp-card--link .mlp-card__logo img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 84px;
  object-fit: contain;
}
.mlp-card--link .mlp-card__body {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
}
.mlp-card--link .mlp-card__titlerow {
  width: 100%;
  min-width: 0;
  align-items: flex-start;
}
.mlp-card--link .mlp-card__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}
.mlp-card--link .mlp-card__titlerow::after {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-top: 5px;
}
@media (max-width: 639px) {
  .mlp-card--link .mlp-card__logo {
    flex: 0 0 auto;
    width: 100%;
    max-width: 220px;
  }
  .mlp-card--link .mlp-card__logo img {
    max-width: 100%;
  }
}

@media (max-width: 599px) {
  #mlp-links-list .mlp-card--link .mlp-card__body, .tuli-c-mlp-links-list .mlp-card--link .mlp-card__body {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #mlp-links-list .mlp-card--link .mlp-card__desc, .tuli-c-mlp-links-list .mlp-card--link .mlp-card__desc {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
  }
}

#useful-links-page .mlp-card--link .mlp-card__logo img, .tuli-c-useful-links-page .mlp-card--link .mlp-card__logo img { height: 104px; width: auto; }