/* Curso de cor: página do curso, aulas e infográficos. Mobile first; layout maior só nos breakpoints. */

/* ---------- página do Aprender ---------- */
/* fileira de temas: no celular é um carrossel com setas; do tablet para cima quebra em linhas e mostra tudo */
.cs-index-wrap { position: relative; margin: var(--sp-lg) 0 0; }
.cs-index { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; scroll-padding-inline: 52px; padding: 2px 0 4px; }
.cs-index::-webkit-scrollbar { display: none; }
.cs-index a { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px 14px 12px 10px; background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 650; font-size: .9rem; }
.cs-index a i { width: 10px; height: 10px; border-radius: 50%; background: var(--ac); }
.cs-index a:hover { background: color-mix(in srgb, var(--ink) 11%, var(--paper)); }
.cs-arrow { position: absolute; top: 2px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 2px 10px rgb(0 0 0 / .14); cursor: pointer; }
.cs-arrow[hidden] { display: none; }
.cs-arrow.prev { left: 0; } .cs-arrow.next { right: 0; }
.cs-index-wrap::before, .cs-index-wrap::after { content: ''; position: absolute; top: 0; bottom: 4px; width: 56px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .15s; }
.cs-index-wrap::before { left: 0; background: linear-gradient(90deg, var(--paper), transparent); }
.cs-index-wrap::after { right: 0; background: linear-gradient(-90deg, var(--paper), transparent); }
.cs-index-wrap.has-prev::before, .cs-index-wrap.has-next::after { opacity: 1; }

.cs-themes { display: grid; gap: var(--sp-2xl); margin-top: var(--sp-xl); }
.cs-theme { scroll-margin-top: 90px; }
.cs-theme-h { display: grid; gap: 6px; margin-bottom: 14px; }
.cs-mod-c { display: block; width: 48px; height: 8px; border-radius: 4px; background: var(--ac); margin-bottom: 4px; }
.cs-theme-h h2 { margin: 0; font-weight: 850; font-stretch: 75%; font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); line-height: 1; text-transform: uppercase; }
.cs-mod-d { margin: 2px 0 0; color: var(--ink-2); line-height: 1.5; max-width: 62ch; }
.cs-cards { display: grid; gap: 12px; }
.cs-card { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px 18px 18px; border-radius: 16px 18px 16px 14px; background: var(--soft); color: inherit; text-decoration: none; transition: box-shadow .18s var(--ease), background .18s; }
.cs-card-c { display: block; width: 32px; height: 6px; border-radius: 3px; background: var(--ac); }
.cs-card b { font-weight: 800; font-size: 1.15rem; line-height: 1.25; }
.cs-card-d { color: var(--ink-2); font-size: .95rem; line-height: 1.45; }
.cs-card:hover { background: var(--paper); box-shadow: var(--lift); }
.cs-more { margin-top: var(--sp-2xl); padding-top: var(--sp-lg); border-top: 1px solid var(--line); }
.cs-more > .label { margin: 0 0 12px; }

/* o que já existia no Aprender: hierarquia mínima, no fim */
.cs-extra { margin-top: var(--sp-2xl); padding-top: var(--sp-lg); border-top: 1px solid var(--line); }
.cs-extra .label { color: var(--ink-3); margin: 0 0 8px; }
.cs-extra ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.cs-extra a { display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; color: var(--ink-2); }

/* ---------- artigo ---------- */
.cs-crumb a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- infográficos ---------- */
.ig { margin: var(--sp-xl) 0; padding: 18px 16px 16px; border-radius: 18px 22px 18px 16px; background: var(--soft); max-width: 860px; }
.ig-label { margin: 0 0 4px !important; font-size: .72rem !important; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); line-height: 1.3 !important; }
.ig-title { margin: 0 0 14px !important; font-weight: 850 !important; font-stretch: 80%; font-size: clamp(1.2rem, 1.05rem + .7vw, 1.5rem) !important; line-height: 1.15 !important; text-wrap: balance; }
.ig-body { min-width: 0; }
.ig figcaption { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; line-height: 1.5; color: var(--ink-2); max-width: 70ch; }
.ig-src { display: block; margin-top: 4px; font-size: .8rem; color: var(--ink-3); }
.ig-body p { font-size: .98rem !important; line-height: 1.5 !important; margin: 0 0 .6em !important; }
.ig-note { padding: 10px 12px; border-radius: 10px; background: var(--paper); }
.ig-chip { display: block; border-radius: 10px 12px 10px 8px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); cursor: pointer; }
.ig-svg { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; color: var(--ink); }

/* espectro */
.ig-spec { display: grid; gap: 6px; }
.ig-spec-bar { position: relative; height: 56px; border-radius: 12px 14px 12px 10px; }
.ig-spec-pin { position: absolute; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: .75rem; font-weight: 850; box-shadow: 0 1px 4px rgb(0 0 0 / .25); }
.ig-spec-ticks { position: relative; height: 18px; font-size: .75rem; font-weight: 700; color: var(--ink-2); }
.ig-spec-ticks span { position: absolute; transform: translateX(-50%); }
.ig-spec-marks { margin: 8px 0 0; padding: 0 0 0 1.4em; display: grid; gap: 6px; }
.ig-spec-marks li { font-size: .92rem; line-height: 1.4; padding-left: 4px; }
.ig-spec-marks li::marker { font-weight: 850; }
.ig-spec-marks b { text-decoration: underline; text-decoration-color: var(--dot); text-decoration-thickness: 4px; text-underline-offset: 3px; }
.ig-body .ig-unit { margin: 2px 0 0 !important; font-size: .78rem !important; color: var(--ink-3); }

/* amostras e faixas */
.ig-sw { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ig-sw-i { display: grid; gap: 4px; align-content: start; min-width: 0; }
.ig-sw-i .ig-chip { aspect-ratio: 4 / 3; margin-bottom: 4px; }
.ig-sw-i b { font-weight: 800; font-size: .98rem; line-height: 1.25; }
.ig-sw-i span { font-size: .85rem; line-height: 1.4; color: var(--ink-2); }
.ig-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.ig-strip > div { display: grid; gap: 4px; min-width: 0; }
.ig-strip .ig-chip { height: 64px; border-radius: 8px; }
.ig-strip span { font-size: .72rem; font-weight: 700; text-align: center; color: var(--ink-2); overflow-wrap: anywhere; }

/* etapas */
.ig-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ig-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 14px 16px 14px 12px; background: var(--paper); }
.ig-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 850; }
.ig-steps b { display: block; font-weight: 800; line-height: 1.3; }
.ig-steps p { margin: 4px 0 0 !important; color: var(--ink-2); font-size: .93rem !important; }

/* números */
.ig-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ig-nums > div { display: grid; gap: 4px; padding: 14px; border-radius: 14px 16px 14px 12px; background: var(--paper); }
.ig-nums strong { font-weight: 850; font-stretch: 62%; font-size: clamp(2.2rem, 1.8rem + 2vw, 3.2rem); line-height: .9; color: var(--c, var(--ink)); }
.ig-nums span { font-size: .9rem; line-height: 1.4; color: var(--ink-2); }

/* barras */
.ig-bars { display: grid; gap: 12px; }
.ig-bar { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'l v' 't t'; gap: 4px 10px; align-items: center; }
.ig-bar-l { grid-area: l; font-weight: 700; font-size: .93rem; line-height: 1.3; }
.ig-bar-v { grid-area: v; font-weight: 800; font-size: .93rem; white-space: nowrap; }
.ig-bar-v em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.ig-bar-t { grid-area: t; height: 14px; border-radius: 7px; background: var(--paper); overflow: hidden; }
.ig-bar-t i { display: block; height: 100%; border-radius: 7px; background: var(--ac, var(--ink)); }

/* linha do tempo */
.ig-time { list-style: none; margin: 0; padding: 0 0 0 18px; display: grid; gap: 14px; border-left: 2px solid var(--line); }
.ig-time li { position: relative; }
.ig-time li::before { content: ''; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--ac, var(--ink))); box-shadow: 0 0 0 3px var(--soft); }
.ig-year { display: block; font-weight: 850; font-stretch: 75%; font-size: 1.25rem; line-height: 1.1; }
.ig-time p { margin: 2px 0 0 !important; color: var(--ink-2); }

/* comparação e tabela */
.ig-cmp { display: grid; gap: 12px; }
.ig-cmp-s { padding: 14px; border-radius: 14px 16px 14px 12px; background: var(--paper); min-width: 0; }
.ig-cmp-t { margin: 0 0 8px !important; font-weight: 800; }
.ig-table-wrap { overflow-x: auto; }
.ig-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ig-table th, .ig-table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ig-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }

/* legenda */
.ig-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .88rem; }
.ig-legend li { display: inline-flex; align-items: center; gap: 8px; }
.ig-legend i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }

/* ---------- telas maiores ---------- */
@media (min-width: 600px) {
  .ig { padding: 24px 24px 20px; }
  .ig-sw { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
  .ig-nums { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .ig-cmp { grid-template-columns: 1fr 1fr; }
  .ig-bar { grid-template-columns: minmax(120px, 30%) 1fr auto; grid-template-areas: 'l t v'; }
  .cs-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (min-width: 900px) {
  .ig-steps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .ig-steps li { grid-template-columns: 1fr; }
  .ig-time { padding: 18px 0 0; border-left: 0; border-top: 2px solid var(--line); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .ig-time li::before { left: 0; top: -25px; }
}
@media (min-width: 768px) {
  .cs-index { flex-wrap: wrap; overflow: visible; }
  .cs-arrow, .cs-index-wrap::before, .cs-index-wrap::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cs-card { transition: none; } }
.ig-sh { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; margin-bottom: 12px; }
.ig-sh .ig-chip { width: 56px; height: 56px; }
.ig-sh b { display: block; font-weight: 800; line-height: 1.25; }
.ig-sh span { font-size: .85rem; color: var(--ink-2); }
.ig-cmp-s .ig-bar-t, .ig-steps .ig-bar-t { background: var(--soft); }
