/* TIO Miniresumo 2.3 — identidade TIO Digital */
.tio-mr {
  --tio-mr-night: #0E022F;
  --tio-mr-deep: #0A1844;
  --tio-mr-blue: #1F4999;
  --tio-mr-indigo: #1D25AD;
  --tio-mr-light: #E8EFFF;
  --tio-mr-glow: #4D83F7;
  --tio-mr-sky: #A9C1FA;
  --tio-mr-ink: #F4F7FF;
  --tio-mr-font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 2rem 0;
  font-family: var(--tio-mr-font);
  color: var(--tio-mr-ink);
  text-align: start;
}
.tio-mr *, .tio-mr *::before, .tio-mr *::after { box-sizing: border-box; }
.tio-mr [hidden] { display: none !important; }

/* Caixa */
.tio-mr .tio-mr-box {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(169, 193, 250, .2);
  border-radius: 20px;
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(77, 131, 247, .30) 0%, rgba(77, 131, 247, 0) 46%),
    radial-gradient(90% 130% at 0% 100%, rgba(29, 37, 173, .38) 0%, rgba(29, 37, 173, 0) 55%),
    linear-gradient(140deg, var(--tio-mr-night) 0%, var(--tio-mr-deep) 62%, #13246B 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 22px 44px -22px rgba(14, 2, 47, .6), 0 2px 6px rgba(14, 2, 47, .12);
  color: var(--tio-mr-ink);
}

/* Botão do resumo (em destaque) */
.tio-mr .tio-mr-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  margin: 0;
  padding: 15px 18px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  color: inherit;
  font: inherit;
}
.tio-mr .tio-mr-toggle::-webkit-details-marker, .tio-mr .tio-mr-toggle::marker { display: none; content: ""; }
.tio-mr .tio-mr-toggle:focus:not(:focus-visible) { outline: none; }
.tio-mr .tio-mr-toggle:focus-visible { outline: 2px solid var(--tio-mr-sky); outline-offset: -4px; border-radius: 18px; }

.tio-mr .tio-mr-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(169, 193, 250, .3);
  border-radius: 15px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 62%);
  box-shadow: 0 0 26px rgba(77, 131, 247, .38), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.tio-mr .tio-mr-icon svg { display: block; animation: tio-mr-glow 3.4s ease-in-out infinite; transform-origin: 45% 45%; }
@keyframes tio-mr-glow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(169, 193, 250, 0)); }
  50% { transform: scale(1.07); filter: drop-shadow(0 0 6px rgba(169, 193, 250, .75)); }
}
.tio-mr .tio-mr-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tio-mr .tio-mr-label { color: #fff; font-size: 1.14rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.tio-mr .tio-mr-sub { color: var(--tio-mr-sky); font-size: .86rem; font-weight: 400; line-height: 1.35; }

.tio-mr .tio-mr-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin-inline-start: auto;
  padding: 10px 15px 10px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--tio-mr-night);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 6px 18px -6px rgba(77, 131, 247, .7);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.tio-mr .tio-mr-open svg { display: block; transition: transform .25s ease; }
.tio-mr .tio-mr-toggle:hover .tio-mr-open { background: var(--tio-mr-light); box-shadow: 0 8px 22px -6px rgba(77, 131, 247, .9); }
.tio-mr .tio-mr-toggle:hover .tio-mr-icon { box-shadow: 0 0 34px rgba(77, 131, 247, .55), inset 0 1px 0 rgba(255, 255, 255, .14); }
.tio-mr .tio-mr-box[open] .tio-mr-open { border-color: rgba(169, 193, 250, .35); background: transparent; color: #fff; box-shadow: none; }
.tio-mr .tio-mr-box[open] .tio-mr-open svg { transform: rotate(180deg); }
.tio-mr .tio-mr-box[open] .tio-mr-open-text { font-size: 0; }
.tio-mr .tio-mr-box[open] .tio-mr-open-text::after { content: "Fechar"; font-size: .88rem; }

/* Corpo */
.tio-mr .tio-mr-body { padding: 16px 18px 20px; border-top: 1px solid rgba(169, 193, 250, .14); }

/* Cards (sem JavaScript, ficam empilhados) */
.tio-mr .tio-mr-cards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: tio-mr; }
.tio-mr .tio-mr-cards > li { margin: 0; list-style: none; counter-increment: tio-mr; }
.tio-mr .tio-mr-cards > li::before, .tio-mr .tio-mr-cards > li::marker { content: none; }
.tio-mr .tio-mr-cards > .tio-mr-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 230px;
  padding: 24px 26px 20px;
  border: 1px solid rgba(169, 193, 250, .2);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .03) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.tio-mr .tio-mr-card-label { margin: 0; color: var(--tio-mr-sky); font-size: .74rem; font-weight: 600; letter-spacing: .09em; line-height: 1.45; text-transform: uppercase; }
.tio-mr .tio-mr-card-label::before { content: counter(tio-mr, decimal-leading-zero); margin-right: .7em; color: #fff; opacity: .55; }
.tio-mr .tio-mr-card-text { margin: 0; color: var(--tio-mr-ink); font-size: 1.2rem; font-weight: 400; line-height: 1.55; letter-spacing: -.005em; }
.tio-mr .tio-mr-card-list { margin: 0; padding: 0 0 0 1.1em; color: var(--tio-mr-ink); font-size: 1.06rem; line-height: 1.5; }
.tio-mr .tio-mr-card-list > li { margin: 0 0 .4em; padding: 0; list-style: disc; }
.tio-mr .tio-mr-card-list > li::marker { color: var(--tio-mr-glow); }

/* Ações do card: "Ler no artigo" + botão do TIO Digital */
.tio-mr .tio-mr-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: auto; padding-top: 10px; }
.tio-mr .tio-mr-source {
  display: inline-flex; align-items: center; gap: .35em; min-height: 36px;
  color: var(--tio-mr-sky); font-size: .9rem; font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
}
.tio-mr .tio-mr-source:hover { color: #fff; }
.tio-mr .tio-mr-site-wrap { display: inline-flex; }
.tio-mr .tio-mr-site {
  display: inline-flex; align-items: center; gap: .45em; min-height: 38px; padding: 8px 15px;
  border-radius: 999px; background: #fff; color: var(--tio-mr-night);
  font-size: .86rem; font-weight: 600; line-height: 1.2; text-decoration: none;
  box-shadow: 0 6px 16px -8px rgba(77, 131, 247, .8);
  transition: background-color .2s ease;
}
.tio-mr .tio-mr-site:hover { background: var(--tio-mr-light); color: var(--tio-mr-night); }

/* Card "Como o TIO ajuda": invertido, claro sobre o fundo escuro */
.tio-mr .tio-mr-cards > .tio-mr-card--tio { border-color: transparent; background: linear-gradient(150deg, #FFFFFF 0%, var(--tio-mr-light) 100%); box-shadow: 0 10px 30px -14px rgba(77, 131, 247, .7); }
.tio-mr .tio-mr-card--tio .tio-mr-card-label { color: var(--tio-mr-blue); }
.tio-mr .tio-mr-card--tio .tio-mr-card-label::before { color: var(--tio-mr-blue); opacity: .5; }
.tio-mr .tio-mr-card--tio .tio-mr-card-text { color: var(--tio-mr-night); font-size: 1.12rem; }
.tio-mr .tio-mr-cta {
  display: inline-flex; align-items: center; gap: .45em; align-self: flex-start;
  min-height: 46px; margin-top: auto; padding: 12px 20px;
  border-radius: 999px; background: var(--tio-mr-blue); color: #fff;
  font-size: .95rem; font-weight: 600; line-height: 1.2; text-decoration: none;
  box-shadow: 0 10px 22px -10px rgba(29, 37, 173, .9);
  transition: background-color .2s ease;
}
.tio-mr .tio-mr-cta:hover { background: var(--tio-mr-indigo); color: #fff; }

.tio-mr a:focus-visible { outline: 2px solid var(--tio-mr-sky); outline-offset: 3px; border-radius: 6px; }
.tio-mr .tio-mr-site:focus-visible, .tio-mr .tio-mr-cta:focus-visible { border-radius: 999px; }
.tio-mr .tio-mr-card--tio a:focus-visible { outline-color: var(--tio-mr-indigo); }

/* Modo stories (ativado pelo reader.js) */
.tio-mr .tio-mr-top { display: flex; align-items: center; gap: 14px; margin: -2px 0 12px; }
.tio-mr .tio-mr-progress { display: flex; flex: 1 1 auto; gap: 5px; margin: 0; }
.tio-mr .tio-mr-count { flex: none; min-width: 3.4em; color: var(--tio-mr-sky); font-size: .8rem; font-variant-numeric: tabular-nums; text-align: end; }
.tio-mr .tio-mr-seg { position: relative; flex: 1 1 0; height: 20px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.tio-mr .tio-mr-seg::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .18); transition: background .25s ease; }
.tio-mr .tio-mr-seg.is-seen::before { background: linear-gradient(90deg, var(--tio-mr-sky), #fff); box-shadow: 0 0 10px rgba(169, 193, 250, .45); }
.tio-mr .tio-mr-seg:hover::before { background: rgba(255, 255, 255, .4); }
.tio-mr .tio-mr-seg.is-seen:hover::before { background: #fff; }

.tio-mr .tio-mr-stage { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 12px; }
.tio-mr .tio-mr-arrow {
  display: grid; place-items: center; width: 42px; height: 42px; margin: 0; padding: 0;
  border: 1px solid rgba(169, 193, 250, .32); border-radius: 50%;
  background: rgba(255, 255, 255, .07); color: #fff;
  cursor: pointer; font: inherit; line-height: 1;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color .15s ease, opacity .15s ease, border-color .15s ease;
}
.tio-mr .tio-mr-arrow:hover:not(:disabled) { background: rgba(255, 255, 255, .16); border-color: rgba(169, 193, 250, .6); }
.tio-mr .tio-mr-arrow:disabled { opacity: .25; cursor: default; }
.tio-mr .tio-mr-arrow svg { display: block; }
.tio-mr .tio-mr-seg:focus:not(:focus-visible), .tio-mr .tio-mr-arrow:focus:not(:focus-visible) { outline: none; }
.tio-mr .tio-mr-seg:focus-visible { outline: 2px solid var(--tio-mr-sky); outline-offset: 1px; border-radius: 4px; }
.tio-mr .tio-mr-arrow:focus-visible { outline: 2px solid var(--tio-mr-sky); outline-offset: 3px; }

.tio-mr.is-stories .tio-mr-cards { display: grid; gap: 0; }
.tio-mr.is-stories .tio-mr-card { grid-area: 1 / 1; visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s; touch-action: pan-y; }
.tio-mr.is-stories .tio-mr-card.is-active { visibility: visible; opacity: 1; transform: none; transition: opacity .22s ease, transform .22s ease; }

/* Destino de "Ler no artigo" */
.tio-mr-destino { scroll-margin-top: 96px; }
.tio-mr-destino:focus { outline: 2px solid #1D25AD; outline-offset: 4px; }
.tio-mr-destino:focus:not(:focus-visible) { outline: none; }

@media (max-width: 480px) {
  .tio-mr .tio-mr-toggle { gap: 12px; min-height: 72px; padding: 13px 14px; }
  .tio-mr .tio-mr-icon { width: 42px; height: 42px; border-radius: 13px; }
  .tio-mr .tio-mr-label { font-size: 1.04rem; }
  .tio-mr .tio-mr-sub { font-size: .8rem; }
  .tio-mr .tio-mr-open { padding: 10px; }
  .tio-mr .tio-mr-open-text { display: none; }
  .tio-mr .tio-mr-body { padding: 14px 12px 16px; }
  .tio-mr .tio-mr-cards > .tio-mr-card { min-height: 260px; padding: 22px 18px 18px; }
  .tio-mr .tio-mr-card-text { font-size: 1.1rem; }
  .tio-mr .tio-mr-card-list { font-size: 1rem; }
  /* No celular, as setas ficam sobre as bordas do card para não estreitar o texto. */
  .tio-mr .tio-mr-stage { position: relative; display: block; }
  .tio-mr .tio-mr-arrow { position: absolute; top: 50%; z-index: 2; width: 34px; height: 34px; margin-top: -17px; background: rgba(14, 2, 47, .78); }
  .tio-mr .tio-mr-arrow--prev { left: -7px; }
  .tio-mr .tio-mr-arrow--next { right: -7px; }
  .tio-mr .tio-mr-arrow:disabled { opacity: 0; pointer-events: none; }
  .tio-mr.is-stories .tio-mr-cards > .tio-mr-card { padding-inline: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .tio-mr .tio-mr-icon svg { animation: none; }
  .tio-mr .tio-mr-open svg, .tio-mr.is-stories .tio-mr-card, .tio-mr .tio-mr-seg::before, .tio-mr .tio-mr-arrow { transition: none; }
  .tio-mr.is-stories .tio-mr-card { transform: none; }
}
@media print {
  .tio-mr { display: none; }
}
