/* Redstack Academy: sistema visual.
   Tokens da marca (guia nov/2025). Aluno: escuro por padrão, claro opcional.
   Backoffice: sempre claro com barra lateral meia-noite. */

@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@view-transition { navigation: auto; }

:root {
  --midnight: #000622;
  --ink-900: #161a28;
  --navy: #242e3d;
  --slate: #2f4560;
  --snow: #fbfbfb;
  --muted-d: #d1d1d1;
  --red-500: #ff2a57;
  --red-700: #e31e41;
  --red-900: #800029;
  --wine: #741b3a;
  --red-200: #ff99b9;
  --red-100: #ffccdc;
  --glow: #c9003b;
  --orange: #ff9124;
  --gray-100: #f4f4f4;
  --gray-200: #e5e5e5;
  --hairline: #d5d5d5;

  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --page: clamp(16px, 4vw, 56px);
  --radius-edge: 38px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --t-fast: 160ms;
  --t-med: 420ms;
  --header-h: 72px;
}

/* Tema escuro (padrão do aluno) */
:root,
[data-theme='escuro'] {
  color-scheme: dark;
  --bg: var(--midnight);
  --surface: var(--navy);
  --surface-2: var(--slate);
  --text: var(--snow);
  --text-2: var(--muted-d);
  --line: rgb(251 251 251 / 0.12);
  --line-strong: rgb(251 251 251 / 0.28);
  --accent: var(--red-500);
  --on-accent: var(--midnight);
  --accent-text: var(--red-200);
  --glass: rgb(16 24 54 / 0.55);
  --glass-strong: rgb(10 16 42 / 0.78);
  --glass-line: rgb(255 255 255 / 0.12);
  --scrim: linear-gradient(90deg, rgb(0 6 34 / 0.96) 0%, rgb(0 6 34 / 0.82) 38%, rgb(0 6 34 / 0) 72%);
  --halo: radial-gradient(900px 620px at 100% 0%, rgb(201 0 59 / 0.28), transparent 62%);
  --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.65);
  --btn-primary-bg: var(--snow);
  --btn-primary-fg: var(--midnight);
  --focus: var(--snow);
  --track: rgb(251 251 251 / 0.14);
}

[data-theme='claro'] {
  color-scheme: light;
  --bg: var(--gray-100);
  --surface: #ffffff;
  --surface-2: var(--gray-200);
  --text: var(--midnight);
  --text-2: var(--slate);
  --line: rgb(0 6 34 / 0.12);
  --line-strong: rgb(0 6 34 / 0.3);
  --accent: var(--red-700);
  --on-accent: #ffffff;
  --accent-text: var(--red-700);
  --glass: rgb(255 255 255 / 0.62);
  --glass-strong: rgb(255 255 255 / 0.86);
  --glass-line: rgb(0 6 34 / 0.1);
  --scrim: linear-gradient(90deg, rgb(244 244 244 / 0.97) 0%, rgb(244 244 244 / 0.86) 40%, rgb(244 244 244 / 0) 74%);
  --halo: radial-gradient(900px 620px at 100% 0%, rgb(255 42 87 / 0.14), transparent 62%);
  --shadow: 0 24px 60px -28px rgb(0 6 34 / 0.28);
  --btn-primary-bg: var(--midnight);
  --btn-primary-fg: var(--snow);
  --focus: var(--midnight);
  --track: rgb(0 6 34 / 0.1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--halo), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--accent-text); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--btn-primary-bg); color: var(--btn-primary-fg); padding: 12px 16px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* Tipografia ------------------------------------------------------------ */
.t-strong { font-weight: 800; }
.t-light { font-weight: 300; }
.t-thin { font-weight: 100; }
.display {
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.display .t-light { display: block; }
.h1 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 800; }
.h2 { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.25; font-weight: 700; letter-spacing: -0.005em; }
.h3 { font-size: 17px; line-height: 1.3; font-weight: 700; }
.lead { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--text-2); max-width: 58ch; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent-text); }

/* Layout ---------------------------------------------------------------- */
.page { padding: 0 var(--page); }
.stack > * + * { margin-top: var(--gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, 12px); align-items: center; }
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) 360px; } }
main { padding-bottom: 96px; }
@media (max-width: 899px) { main { padding-bottom: calc(96px + 68px + env(safe-area-inset-bottom)); } }

/* Vidro: só em barras e painéis pequenos, nunca sobre vídeo */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-line);
}

/* Cabeçalho ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--page);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--glass-line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { height: 26px; width: auto; }
.brand span { font-size: 16px; font-weight: 300; color: var(--text-2); padding-left: 12px; border-left: 1px solid var(--line-strong); line-height: 1; }
[data-theme='claro'] .brand .logo-dark { display: none; }
.brand .logo-light { display: none; }
[data-theme='claro'] .brand .logo-light { display: block; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 12px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--text-2);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current='page'] { color: var(--text); font-weight: 800; }
.nav a[aria-current='page']::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--accent);
}
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chip-stat {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--glass-line); background: var(--glass); font-size: 14px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}
.chip-stat svg { width: 16px; height: 16px; flex: none; }
.chip-stat .flame { color: var(--orange); }
.chip-stat .gem { color: var(--accent); }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; background: transparent;
  border: 0; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--line); }
.icon-btn svg { width: 20px; height: 20px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; text-decoration: none; flex: none;
}
.theme-toggle .sun { display: none; }
[data-theme='claro'] .theme-toggle .sun { display: block; }
[data-theme='claro'] .theme-toggle .moon { display: none; }

@media (max-width: 899px) {
  .topbar { gap: 12px; height: 64px; }
  .topbar .nav, .topbar .hide-sm { display: none; }
  .brand img { height: 22px; }
}

/* Barra inferior do celular */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border-top: 1px solid var(--glass-line);
}
.tabbar a {
  display: grid; justify-items: center; gap: 2px; min-height: 52px; padding-top: 6px;
  text-decoration: none; font-size: 12px; font-weight: 600; color: var(--text-2);
}
.tabbar svg { width: 22px; height: 22px; }
.tabbar a[aria-current='page'] { color: var(--text); font-weight: 800; }
.tabbar a[aria-current='page'] svg { color: var(--accent); }
@media (max-width: 899px) { .tabbar { display: grid; } }

/* Botões ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 0;
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.btn-primary:hover { color: var(--btn-primary-fg); background: color-mix(in srgb, var(--btn-primary-bg) 88%, var(--accent)); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { color: var(--on-accent); background: color-mix(in srgb, var(--accent) 86%, #fff); }
.btn-ghost { background: var(--glass); border-color: var(--glass-line); color: var(--text); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--text); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--text); color: var(--text); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Formulários ------------------------------------------------------------ */
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 0;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line-strong); color: var(--text); font-size: 16px;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--text-2) 75%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; flex: none; }

/* Avisos ------------------------------------------------------------------ */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-strong); background: var(--glass); font-size: 15px; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.notice.ok { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.notice.erro { border-color: var(--accent); }
.notice.erro svg { color: var(--accent); }

/* Billboard (continue de onde parou) ---------------------------------- */
.billboard {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(76vh, 640px);
  display: grid; align-items: end;
  margin: 0 0 8px;
  border-bottom-right-radius: var(--radius-edge);
}
.billboard-art { position: absolute; inset: 0; z-index: -2; }
.billboard-art svg { width: 100%; height: 100%; }
.billboard::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--scrim); }
.billboard::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: -1; background: linear-gradient(0deg, var(--bg), transparent); }
.billboard-body { padding: 48px var(--page) 56px; max-width: 760px; }
.billboard .eyebrow { font-size: 15px; font-weight: 600; color: var(--text-2); }
.billboard .display { margin-top: 10px; }
.billboard .lesson-line { margin-top: 18px; font-size: 18px; max-width: 52ch; }
.billboard .lesson-line strong { font-weight: 800; }
.billboard .meter { margin-top: 22px; max-width: 420px; }
.billboard .actions { margin-top: 26px; }
@media (max-width: 899px) {
  .billboard { min-height: 72vh; border-bottom-right-radius: 0; }
  .billboard::before { background: linear-gradient(0deg, var(--bg) 8%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent 90%); }
  .billboard-art svg { opacity: 0.85; }
}

/* Progresso ------------------------------------------------------------- */
.meter { display: grid; gap: 8px; }
.meter-track { height: 4px; background: var(--track); position: relative; overflow: hidden; }
.meter-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); width: var(--pct, 0%); transition: width 900ms var(--ease-out); }
.meter-label { font-size: 14px; color: var(--text-2); }

/* Missão do dia --------------------------------------------------------- */
.mission {
  display: grid; gap: 16px; align-items: center;
  margin: 8px var(--page) 40px; padding: 18px 22px;
}
@media (min-width: 900px) { .mission { grid-template-columns: 1fr auto auto; } }
.mission h2 { font-size: 17px; font-weight: 800; }
.mission .tasks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.task { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.task .box { width: 22px; height: 22px; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.task.done .box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.task.done .box svg { width: 14px; height: 14px; }
.task.done span { color: var(--text-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.mission .tally { font-size: 14px; font-weight: 800; color: var(--orange); white-space: nowrap; }
[data-theme='claro'] .mission .tally { color: #a35400; }

/* Fileiras --------------------------------------------------------------- */
.row-section { margin: 0 0 44px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 var(--page); margin-bottom: 14px; }
.row-head a { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--text-2); white-space: nowrap; }
.row-head a:hover { color: var(--text); }
.row-wrap { position: relative; }
.row {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--page);
  padding: 6px var(--page) 18px; scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; flex: 0 0 auto; }
.row-arrow {
  position: absolute; top: 6px; bottom: 18px; width: 52px; z-index: 2; display: none; place-items: center;
  border: 0; cursor: pointer; color: var(--text); background: var(--glass-strong);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity var(--t-fast);
}
.row-arrow svg { width: 22px; height: 22px; }
.row-arrow.prev { left: 0; }
.row-arrow.next { right: 0; }
@media (hover: hover) and (pointer: fine) {
  .row-wrap:hover .row-arrow:not([hidden]) { opacity: 1; }
  .row-arrow { display: grid; }
}

/* Cartaz de curso -------------------------------------------------------- */
.poster {
  position: relative; display: block; width: clamp(200px, 22vw, 260px); aspect-ratio: 3 / 4;
  overflow: hidden; text-decoration: none; color: var(--snow); isolation: isolate;
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.poster.light-art { color: var(--midnight); }
.poster .art { position: absolute; inset: 0; z-index: -1; transition: transform 600ms var(--ease-out); }
.poster .art svg { width: 100%; height: 100%; }
.poster-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; display: grid; gap: 4px; }
.poster-body::before { content: ''; position: absolute; inset: -90px 0 0; z-index: -1; background: linear-gradient(0deg, rgb(0 6 34 / 0.96) 0%, rgb(0 6 34 / 0.88) 45%, transparent); }
.poster.light-art .poster-body::before { background: linear-gradient(0deg, rgb(251 251 251 / 0.92), transparent); }
.poster .kind { font-size: 13px; font-weight: 600; opacity: 0.85; }
.poster .title { font-size: 21px; line-height: 1.08; letter-spacing: -0.01em; }
.poster .title .t-light { display: block; }
.poster .meta { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.poster .tag {
  position: absolute; top: 12px; left: 12px; padding: 4px 8px; font-size: 12px; font-weight: 800;
  background: var(--snow); color: var(--midnight);
}
.poster .lock { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; background: rgb(0 6 34 / 0.6); color: var(--snow); }
.poster .lock svg { width: 16px; height: 16px; }
.poster .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(251 251 251 / 0.2); }
.poster .bar i { display: block; height: 100%; background: var(--red-500); width: var(--pct, 0%); }
.poster:hover { color: var(--snow); }
.poster.light-art:hover { color: var(--midnight); }
@media (hover: hover) and (pointer: fine) {
  .poster:hover { transform: translateY(-6px); box-shadow: 0 30px 70px -26px rgb(0 0 0 / 0.75); }
  .poster:hover .art { transform: scale(1.04); }
}

/* Cartão de "continue assistindo" (horizontal) */
.resume-card {
  position: relative; display: grid; grid-template-rows: auto 1fr; width: clamp(260px, 28vw, 340px);
  text-decoration: none; background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.resume-card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; color: var(--snow); }
.resume-card .thumb svg { width: 100%; height: 100%; }
.resume-card .play {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity var(--t-fast);
  background: rgb(0 6 34 / 0.35);
}
.resume-card .play span { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--snow); color: var(--midnight); }
.resume-card .play svg { width: 20px; height: 20px; margin-left: 3px; }
.resume-card:hover .play, .resume-card:focus-visible .play { opacity: 1; }
.resume-card .body { padding: 14px 16px 18px; display: grid; gap: 4px; }
.resume-card .course { font-size: 13px; color: var(--text-2); font-weight: 600; }
.resume-card .lesson { font-weight: 700; line-height: 1.3; }
.resume-card .left { font-size: 13px; color: var(--text-2); }
.resume-card .bar { height: 4px; background: var(--track); }
.resume-card .bar i { display: block; height: 100%; background: var(--accent); width: var(--pct, 0%); }

/* Etiquetas */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; font-size: 12px; font-weight: 700; border: 1px solid var(--line-strong); white-space: nowrap; }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill.soft { background: var(--line); border-color: transparent; }
.pill svg { width: 12px; height: 12px; }

/* Cabeçalho de curso ------------------------------------------------------ */
.course-hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 24px var(--page) 40px; padding: clamp(28px, 4vw, 56px);
  display: grid; gap: 28px; color: var(--snow);
  border-top-left-radius: var(--radius-edge);
}
.course-hero.light-art { color: var(--midnight); }
.course-hero .art { position: absolute; inset: 0; z-index: -2; }
.course-hero .art svg { width: 100%; height: 100%; }
.course-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(0 6 34 / 0.55), rgb(0 6 34 / 0.1) 70%); }
.course-hero.light-art::before { background: linear-gradient(90deg, rgb(251 251 251 / 0.75), rgb(251 251 251 / 0.05) 70%); }
.course-hero .eyebrow { font-size: 15px; font-weight: 600; opacity: 0.9; }
.course-hero p.desc { max-width: 56ch; font-size: 17px; opacity: 0.92; }
.course-hero .stat { display: grid; gap: 6px; align-content: end; }
.course-hero .big { font-size: clamp(56px, 7vw, 96px); line-height: 0.9; font-weight: 100; letter-spacing: -0.03em; }
.course-hero .meter-track { background: rgb(251 251 251 / 0.25); }
.course-hero.light-art .meter-track { background: rgb(0 6 34 / 0.15); }
.course-hero .meter-fill { background: var(--snow); }
.course-hero.light-art .meter-fill { background: var(--red-700); }
.course-hero .btn-primary { background: var(--snow); color: var(--midnight); }
.course-hero.light-art .btn-primary { background: var(--midnight); color: var(--snow); }
.course-hero .btn-quiet { color: inherit; border-color: currentColor; }
@media (min-width: 900px) { .course-hero { grid-template-columns: 1fr 300px; align-items: end; } }

/* Módulos e aulas -------------------------------------------------------- */
.modules { display: grid; gap: 10px; }
.module { background: var(--surface); border: 1px solid var(--line); }
.module > summary {
  list-style: none; display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
  padding: 16px 18px; cursor: pointer; min-height: 64px;
}
.module > summary::-webkit-details-marker { display: none; }
.module .mnum { font-size: 30px; font-weight: 100; line-height: 1; color: var(--text-2); }
.module .mtitle { font-weight: 700; }
.module .mmeta { font-size: 13px; color: var(--text-2); text-align: right; white-space: nowrap; }
.module[open] > summary { border-bottom: 1px solid var(--line); }
.module .chev { transition: transform var(--t-fast); width: 18px; height: 18px; }
.module[open] .chev { transform: rotate(90deg); }
.lessons { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.lesson-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center;
  padding: 12px; text-decoration: none; min-height: 56px;
}
a.lesson-row:hover { background: var(--line); color: inherit; }
.lesson-row .state {
  width: 32px; height: 32px; display: grid; place-items: center; font-size: 13px; font-weight: 800;
  border: 1px solid var(--line-strong);
}
.lesson-row .state svg { width: 14px; height: 14px; }
.lesson-row.concluida .state { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lesson-row.atual { background: var(--surface-2); }
[data-theme='claro'] .lesson-row.atual { background: var(--red-100); }
.lesson-row.atual .state { background: var(--snow); color: var(--midnight); border-color: var(--snow); }
[data-theme='claro'] .lesson-row.atual .state { background: var(--midnight); color: var(--snow); border-color: var(--midnight); }
.lesson-row.atual .ltitle { font-weight: 800; }
.lesson-row.bloqueada { color: var(--text-2); }
.lesson-row .ltitle { font-weight: 600; line-height: 1.35; }
.lesson-row .lmeta { font-size: 13px; color: var(--text-2); text-align: right; }
.lesson-row.atual .lmeta { color: var(--orange); font-weight: 800; }
[data-theme='claro'] .lesson-row.atual .lmeta { color: #a35400; }

/* Painel lateral */
.panel { background: var(--surface); border: 1px solid var(--line); padding: 22px; }
.panel h2 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.facts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.facts .n { font-size: 40px; font-weight: 100; line-height: 1; }
.facts .what { font-size: 14px; color: var(--text-2); line-height: 1.35; }
.chev-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.chev-list li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
.chev-list li::before { content: '>'; font-weight: 800; color: var(--accent); }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.file-list a, .file-list .file {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0;
  text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px;
}
.file-list svg { width: 18px; height: 18px; }

/* Aula ------------------------------------------------------------------- */
.lesson-layout { display: grid; gap: 28px; padding: 20px var(--page) 0; }
@media (min-width: 1100px) { .lesson-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: var(--text-2); align-items: center; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs svg { width: 14px; height: 14px; }
.player {
  position: relative; aspect-ratio: 16 / 9; background: var(--ink-900); overflow: hidden; color: var(--snow);
  border-top-left-radius: var(--radius-edge);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .art { position: absolute; inset: 0; }
.player .art svg { width: 100%; height: 100%; }
.player .pending {
  position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(18px, 3vw, 32px);
  display: grid; gap: 6px; background: linear-gradient(0deg, rgb(0 6 34 / 0.92), transparent);
}
.player .pending strong { font-size: clamp(18px, 2vw, 24px); font-weight: 800; }
.player .pending span { color: var(--muted-d); max-width: 54ch; }
.lesson-head { display: grid; gap: 18px; margin-top: 22px; }
@media (min-width: 760px) { .lesson-head { grid-template-columns: 1fr auto; align-items: start; } }
.lesson-head h1 { font-size: clamp(26px, 3vw, 40px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; }
.lesson-head .sub { color: var(--text-2); margin-top: 8px; font-size: 15px; }
.done-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; font-weight: 800; border: 1px solid var(--accent); color: var(--accent-text); }
.done-badge svg { width: 18px; height: 18px; }

.tabs { display: flex; gap: 4px; margin-top: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; min-height: 48px; padding: 0 14px; background: none; border: 0; cursor: pointer;
  font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.tab[aria-selected='true'] { color: var(--text); font-weight: 800; }
.tab[aria-selected='true']::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--accent); }
.tabpanel { padding: 24px 0 0; }
.tabpanel[hidden] { display: none; }
.prose { max-width: 70ch; display: grid; gap: 16px; }
.prose p { color: var(--text-2); }
.prose h3 { font-size: 17px; font-weight: 800; margin-top: 8px; }

.prompt-box { position: relative; padding: 20px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.prompt-box .ptitle { font-weight: 800; margin-bottom: 8px; }
.prompt-box pre { margin: 0; white-space: pre-wrap; font: inherit; line-height: 1.6; color: var(--text); }
.prompt-box .copy { position: absolute; top: 12px; right: 12px; }
.prompt-box pre .ph { color: var(--accent-text); font-weight: 700; }
.cmds { display: flex; flex-wrap: wrap; gap: 8px; }
.cmd { display: inline-grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-strong); max-width: 280px; }
.cmd b { font-weight: 800; }
.cmd b::first-letter { color: var(--accent-text); }
.cmd span { font-size: 13px; color: var(--text-2); line-height: 1.35; }

.material { display: grid; gap: 10px; }
.mat-item { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); background: var(--surface); }
@media (min-width: 700px) { .mat-item { grid-template-columns: 40px 1fr auto; } }
.mat-item .ico { width: 40px; height: 40px; display: grid; place-items: center; background: var(--line); }
.mat-item .ico svg { width: 20px; height: 20px; }
.mat-item .mname { font-weight: 800; overflow-wrap: anywhere; }
.mat-item .mdesc { font-size: 13px; color: var(--text-2); }
.mat-item .acts { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
@media (min-width: 700px) { .mat-item .acts { grid-column: auto; justify-content: flex-end; } }

.side-list { position: sticky; top: calc(var(--header-h) + 16px); }
.side-list .lessons { padding: 0; }
.side-list .next-up { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 1099px) { .side-list { position: static; } }

/* Notas e exercício */
.save-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.status-text { font-size: 14px; color: var(--text-2); }

/* Biblioteca --------------------------------------------------------------- */
.lib-head { display: grid; gap: 20px; padding: 40px var(--page) 24px; }
@media (min-width: 900px) { .lib-head { grid-template-columns: 1fr 320px; align-items: end; } }
.toolbar { display: grid; gap: 12px; padding: 0 var(--page); margin-bottom: 28px; }
@media (min-width: 900px) { .toolbar { grid-template-columns: 1fr auto; align-items: end; } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-weight: 700; font-size: 14px;
}
.seg button[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.grid-cards { display: grid; gap: 14px; padding: 0 var(--page); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.grid-cards .skill-card { width: auto; }
.lib-section { margin-bottom: 44px; }
.lib-section > h2 { padding: 0 var(--page); margin-bottom: 14px; }
.empty { padding: 40px var(--page); color: var(--text-2); }
.empty strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* Conquistas ------------------------------------------------------------- */
.profile {
  margin: 24px var(--page) 32px; padding: clamp(24px, 4vw, 44px); display: grid; gap: 28px; align-items: center;
  border-top-left-radius: var(--radius-edge);
}
@media (min-width: 900px) { .profile { grid-template-columns: auto 1fr minmax(280px, 380px); } }
.profile .avatar { width: 84px; height: 84px; font-size: 28px; }
.profile .who h1 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.05; }
.profile .xp { font-size: clamp(48px, 6vw, 72px); font-weight: 100; line-height: 1; letter-spacing: -0.02em; }
.profile .xp small { font-size: 18px; font-weight: 800; margin-left: 6px; letter-spacing: 0; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week .d { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border: 1px solid var(--line-strong); font-size: 13px; text-align: center; }
.week .d b { font-weight: 800; }
.week .d.ok { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.week .d.hoje { border-color: var(--text); border-width: 2px; }
.badges { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.badge { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); background: var(--surface); }
.badge.off { background: transparent; }
.badge .bname { font-weight: 800; font-size: 15px; }
.badge .bhow { font-size: 13px; color: var(--text-2); }
.diamond { width: 56px; height: 56px; display: grid; place-items: center; position: relative; }
.diamond::before { content: ''; position: absolute; width: 38px; height: 38px; transform: rotate(45deg); border-radius: 7px; background: var(--accent); }
.diamond span { position: relative; font-weight: 800; font-size: 15px; color: var(--on-accent); }
.badge.off .diamond::before { background: transparent; border: 2px solid var(--line-strong); }
.badge.off .diamond span { color: var(--text-2); }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ranking li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); }
.ranking li.me { background: var(--text); color: var(--bg); font-weight: 800; }
.ranking .pos { font-size: 22px; font-weight: 100; }
.ranking .x { font-weight: 800; font-size: 14px; }

/* Toast de XP ----------------------------------------------------------- */
.toasts { position: fixed; right: 16px; top: calc(var(--header-h) + 12px); z-index: 60; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 12px 16px; box-shadow: var(--shadow); animation: toast-in 520ms var(--ease-out) both; }
.toast.out { animation: toast-out 320ms var(--ease-in) both; }
.toast .t1 { font-weight: 800; }
.toast .t2 { font-size: 14px; color: var(--text-2); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }
.diamond.pop::before { animation: spin-in 700ms var(--ease-out) both; }
@keyframes spin-in { from { transform: rotate(-135deg) scale(0.4); opacity: 0; } }

/* Login e páginas de conta ----------------------------------------------- */
.auth { min-height: 100dvh; display: grid; }
@media (min-width: 1000px) { .auth { grid-template-columns: 1.1fr minmax(440px, 0.9fr); } }
.auth-brand { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: space-between; gap: 40px; padding: clamp(28px, 5vw, 64px); }
.auth-brand .art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.auth-brand .art svg { position: absolute; right: -8%; bottom: -12%; width: 70%; height: auto; opacity: 0.9; }
.auth-brand .display { font-size: clamp(40px, 5.2vw, 76px); }
.auth-brand .lead { margin-top: 20px; }
.auth-brand .chev-list { margin-top: 26px; font-weight: 600; }
.auth-form-wrap { display: grid; place-items: center; padding: clamp(20px, 4vw, 56px); }
.auth-card { width: min(100%, 460px); padding: clamp(24px, 4vw, 40px); display: grid; gap: 20px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.sso { display: grid; gap: 10px; }
.sso .btn { justify-content: flex-start; gap: 14px; font-weight: 600; }
.sso .btn svg { width: 20px; height: 20px; }
.divider { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; font-size: 13px; color: var(--text-2); }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line-strong); }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
@media (max-width: 999px) {
  .auth-brand { padding-bottom: 8px; }
  .auth-brand .art svg { width: 60%; right: -14%; bottom: auto; top: -10%; opacity: 0.35; }
  .auth-brand .chev-list, .auth-brand .foot { display: none; }
}

/* Landing pública -------------------------------------------------------- */
.pub-top { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; gap: 20px; height: var(--header-h); padding: 0 var(--page); }
.pub-top.scrolled { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%); border-bottom: 1px solid var(--glass-line); }
.hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 100svh;
  display: grid; align-items: center; padding: calc(var(--header-h) + 32px) var(--page) 64px;
}
.hero .art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero .art svg { position: absolute; right: -6vw; top: 50%; transform: translateY(-50%); height: min(92vh, 900px); width: auto; }
.hero-body { max-width: 820px; }
.hero .display { font-size: clamp(44px, 7.4vw, 112px); }
.hero .lead { margin-top: 24px; font-size: clamp(17px, 1.5vw, 21px); }
.hero .actions { margin-top: 32px; }
.hero .sig { margin-top: 40px; font-size: 15px; color: var(--text-2); max-width: 46ch; }
@media (max-width: 899px) {
  .hero { align-items: end; }
  .hero .art svg { height: 62vh; right: -30vw; top: 12%; transform: none; opacity: 0.55; }
}
.section { padding: clamp(64px, 9vw, 128px) var(--page); }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: 40px; }
.section-head .h1 { font-size: clamp(30px, 4vw, 56px); }
.stack-map { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line-strong); }
.stack-map li {
  display: grid; grid-template-columns: 1fr; gap: 6px 32px; padding: 22px 0; border-bottom: 1px solid var(--line-strong);
}
@media (min-width: 900px) { .stack-map li { grid-template-columns: 320px 1fr auto; align-items: baseline; } }
.stack-map .layer { font-size: clamp(26px, 3vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.stack-map .layer .t-light { font-weight: 300; }
.stack-map .what { color: var(--text-2); max-width: 58ch; }
.stack-map .where { font-size: 14px; font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.numbers { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); background: var(--line-strong); border: 1px solid var(--line-strong); }
.numbers > div { background: var(--bg); padding: 28px; display: grid; gap: 6px; }
.numbers .n { font-size: clamp(56px, 6vw, 88px); font-weight: 100; line-height: 0.95; letter-spacing: -0.03em; }
.numbers .w { color: var(--text-2); font-size: 15px; }
.how { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.how > div { padding: 26px; display: grid; gap: 10px; align-content: start; }
.how svg { width: 28px; height: 28px; color: var(--accent); }
.how h3 { font-size: 20px; font-weight: 800; }
.how p { color: var(--text-2); }
.author { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .author { grid-template-columns: 0.9fr 1.1fr; } }
.author .art { aspect-ratio: 4 / 5; max-width: 460px; overflow: hidden; border-top-right-radius: var(--radius-edge); }
.author .art svg { width: 100%; height: 100%; }
.faq { display: grid; border-top: 1px solid var(--line-strong); max-width: 900px; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; transition: transform var(--t-fast); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .a { padding: 0 0 22px; color: var(--text-2); max-width: 70ch; }
.cta-band { margin: 0 var(--page); padding: clamp(32px, 5vw, 64px); display: grid; gap: 24px; border-bottom-left-radius: var(--radius-edge); }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr 420px; align-items: center; } }
.footer { padding: 48px var(--page) 40px; display: grid; gap: 20px; color: var(--text-2); font-size: 14px; }
@media (min-width: 900px) { .footer { grid-template-columns: 1fr auto; align-items: end; } }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { text-decoration: none; font-weight: 600; }

/* Documentos (termos, privacidade) */
.doc { max-width: 760px; margin: 0 auto; padding: calc(var(--header-h) + 40px) var(--page) 80px; display: grid; gap: 18px; }
.doc h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.1; }
.doc h2 { font-size: 20px; font-weight: 800; margin-top: 12px; }
.doc p, .doc li { color: var(--text-2); }

/* Entrada orquestrada (uma só, no carregamento) -------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .enter > * { animation: rise 760ms var(--ease-out) both; }
  .enter > *:nth-child(2) { animation-delay: 70ms; }
  .enter > *:nth-child(3) { animation-delay: 140ms; }
  .enter > *:nth-child(4) { animation-delay: 210ms; }
  .enter > *:nth-child(5) { animation-delay: 280ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }

  /* Símbolo que se monta: os chevrons deslizam de lados opostos e encaixam (o "stack") */
  .assemble .ch-outer { animation: slide-l 1100ms var(--ease-out) 120ms both; }
  .assemble .ch-inner { animation: slide-r 1100ms var(--ease-out) 260ms both; }
  .assemble .echo { animation: echo 1400ms var(--ease-out) 500ms both; }
  @keyframes slide-l { from { transform: translateX(14%); opacity: 0; } }
  @keyframes slide-r { from { transform: translateX(-22%); opacity: 0; } }
  @keyframes echo { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

/* Estados vazios, carregamento */
.skeleton { background: linear-gradient(90deg, var(--line) 0%, var(--line-strong) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.state-page { min-height: 70vh; display: grid; place-items: center; padding: 40px var(--page); text-align: left; }
.state-page .box { max-width: 520px; display: grid; gap: 16px; }
.state-page .code { font-size: 96px; font-weight: 100; line-height: 1; }

/* Utilidades de seção do app */
.page-head { padding: 40px var(--page) 24px; display: grid; gap: 10px; }
.cols-2 { display: grid; gap: 28px; padding: 0 var(--page); }
@media (min-width: 1000px) { .cols-2 { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.block-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-title h2 { font-size: 20px; font-weight: 800; }

/* ===== Mídia: fotos tratadas em duotom ================================== */
.media-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.billboard-art { overflow: hidden; }
/* No computador a ilustração ocupa a direita e o texto fica sobre o fundo limpo */
@media (min-width: 900px) {
  .billboard-art:has(.media-img) { left: 34%; }
  .billboard-art .media-img {
    object-position: 50% 45%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
  }
}
.course-hero .art .media-img { opacity: 0.95; }
.course-hero:has(.media-img)::before {
  background:
    linear-gradient(90deg, rgb(0 6 34 / 0.95) 0%, rgb(0 6 34 / 0.8) 40%, rgb(0 6 34 / 0.1) 78%),
    linear-gradient(0deg, rgb(0 6 34 / 0.75) 0%, transparent 50%);
}
@media (max-width: 899px) {
  .course-hero:has(.media-img)::before { background: linear-gradient(0deg, rgb(0 6 34 / 0.97) 30%, rgb(0 6 34 / 0.72) 62%, rgb(0 6 34 / 0.25) 100%); }
  .course-hero .art .media-img { object-position: 60% 30%; }
}
@media (min-width: 900px) {
  .course-hero .art:has(.media-img) { left: 30%; }
  .course-hero .art .media-img { -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
}
.player .art .media-img { opacity: 0.55; }
.lesson-n {
  position: absolute; right: clamp(14px, 3vw, 32px); top: clamp(6px, 2vw, 18px);
  font-weight: 100; font-size: clamp(56px, 11vw, 160px); line-height: 1; letter-spacing: -0.04em;
  color: var(--snow); opacity: 0.9; pointer-events: none;
}
.resume-card .lesson-n { font-size: 64px; top: 8px; right: 14px; }
.resume-card .thumb .media-img, .resume-card .thumb svg { transition: transform 700ms var(--ease-out); }

/* Cartaz largo (quando a fileira tem poucos cursos) */
.poster.wide { width: clamp(300px, 44vw, 640px); aspect-ratio: 16 / 9; }
.poster.wide .poster-body { padding: clamp(18px, 2.4vw, 28px); max-width: 74%; }
.poster.wide .title { font-size: clamp(24px, 2.6vw, 36px); }
.poster.wide .poster-body::before { inset: -80px -40% 0 0; background: linear-gradient(20deg, rgb(0 6 34 / 0.92) 10%, transparent 70%); }
.poster .pct { font-size: 12px; font-weight: 700; margin-top: 6px; opacity: 0.9; }
.poster .art .media-img { transition: transform 900ms var(--ease-out), filter 400ms; }

/* Cartão de skill: imagem em cima, texto embaixo */
.skill-card {
  display: grid; grid-template-rows: auto 1fr; width: clamp(240px, 23vw, 300px);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; overflow: hidden;
  transition: transform 320ms var(--ease-out), border-color var(--t-fast), box-shadow 320ms var(--ease-out);
}
.skill-card .media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-900); }
.skill-card .media .media-img { transition: transform 900ms var(--ease-out); }
.skill-card .corner { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; display: grid; place-items: center; background: rgb(0 6 34 / 0.7); color: var(--snow); }
.skill-card .corner.on { background: var(--red-500); color: var(--midnight); }
.skill-card .corner svg { width: 15px; height: 15px; }
.skill-card .body { display: grid; gap: 6px; align-content: start; padding: 14px 16px 16px; }
.skill-card .kicker { font-size: 12px; font-weight: 600; color: var(--text-2); }
.skill-card .name { font-weight: 800; font-size: 17px; line-height: 1.2; color: var(--text); }
.skill-card .does { font-size: 14px; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.skill-card .foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 700; }
.skill-card:hover { color: inherit; border-color: var(--line-strong); }
.grid-cards .skill-card { width: auto; }

/* Bloco tipográfico para prompts, comandos e PDFs */
.type-tile {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 10%, var(--wine), transparent 60%), linear-gradient(160deg, var(--slate), var(--midnight));
  color: var(--snow);
}
.type-tile.k-comando { background: radial-gradient(120% 90% at 10% 100%, var(--red-900), transparent 60%), linear-gradient(200deg, var(--navy), var(--midnight)); }
.type-tile.k-pdf { background: linear-gradient(135deg, var(--wine), var(--midnight) 70%); }
.type-tile .glyph { font-size: clamp(34px, 4vw, 52px); font-weight: 200; letter-spacing: -0.02em; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-tile.k-comando .glyph { font-weight: 300; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: clamp(24px, 2.6vw, 34px); color: var(--red-200); }
.res-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; max-width: 560px; border-top-left-radius: var(--radius-edge); background: var(--ink-900); }

/* Movimento que responde ao gesto: só com ponteiro fino */
@media (hover: hover) and (pointer: fine) {
  .poster:hover .art .media-img { transform: scale(1.06); }
  .skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
  .skill-card:hover .media .media-img { transform: scale(1.07); }
  .resume-card:hover .thumb .media-img { transform: scale(1.05); }
  .resume-card { transition: transform 320ms var(--ease-out); }
  .resume-card:hover { transform: translateY(-4px); }
}

/* Entrada: o destaque respira devagar; fileiras chegam uma vez, em cascata curta */
@media (prefers-reduced-motion: no-preference) {
  .billboard-art .media-img, .course-hero .art .media-img { animation: drift 22s var(--ease-out) both; transform-origin: 70% 40%; }
  @keyframes drift { from { transform: scale(1.12); } to { transform: scale(1.0); } }
  .js .reveal .row > * { opacity: 0; transform: translateX(28px); }
  .js .reveal.in .row > * { opacity: 1; transform: none; transition: opacity 620ms var(--ease-out), transform 720ms var(--ease-out); }
  .js .reveal.in .row > :nth-child(2) { transition-delay: 50ms; }
  .js .reveal.in .row > :nth-child(3) { transition-delay: 100ms; }
  .js .reveal.in .row > :nth-child(4) { transition-delay: 150ms; }
  .js .reveal.in .row > :nth-child(5) { transition-delay: 200ms; }
  .js .reveal.in .row > :nth-child(n + 6) { transition-delay: 250ms; }
  ::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
}
.toast-big { font-size: 28px; font-weight: 200; color: var(--accent-text); text-align: center; }
.pop { animation: pop 420ms var(--ease-out) both; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } }
