[hidden] { display: none !important; }
img { max-width: 100%; }
/* Layout: cabeçalho com o gizmo de eixos da cena do Unity, notas em colunas abertas e uma trilha vertical de passos */
:root {
  --bg: #F2F5F7;
  --surface: #FFFFFF;
  --surface-2: #E8EDF1;
  --line: #D3DCE3;
  --fg: #0F1A22;
  --muted: #4E6272;
  --accent: #0A7F95;
  --accent-ink: #FFFFFF;
  --accent-soft: #CFEBF1;
  --ax-x: #D6453D;
  --ax-y: #2E9B4A;
  --ax-z: #2F6FE0;
  --shadow: 0 1px 2px rgba(15, 26, 34, .06), 0 10px 28px rgba(15, 26, 34, .08);
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1015;
    --surface: #121A21;
    --surface-2: #18232C;
    --line: #26323D;
    --fg: #E7EDF2;
    --muted: #96A6B4;
    --accent: #2EC4DB;
    --accent-ink: #04222A;
    --accent-soft: #14343E;
    --ax-x: #F0655C;
    --ax-y: #5CC97A;
    --ax-z: #5B94FF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1015;
  --surface: #121A21;
  --surface-2: #18232C;
  --line: #26323D;
  --fg: #E7EDF2;
  --muted: #96A6B4;
  --accent: #2EC4DB;
  --accent-ink: #04222A;
  --accent-soft: #14343E;
  --ax-x: #F0655C;
  --ax-y: #5CC97A;
  --ax-z: #5B94FF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  padding: 0;
}
.wrap { max-width: 86rem; margin-inline: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Cabeçalho */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 4.5rem) 2.5rem;
}
.kicker {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  text-wrap: balance;
  margin: .45rem 0 1rem;
}
.lead { color: var(--muted); font-size: 1.15rem; max-width: none; margin: 0; }
.gizmo { width: 100%; max-width: 20rem; justify-self: end; height: auto; }
.gizmo text { font-family: var(--mono); font-size: 13px; font-weight: 500; }

/* Seções */
section { padding-block: 2.25rem; border-top: 1px solid var(--line); }
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.6vw, 1.9rem);
  letter-spacing: -.015em;
  line-height: 1.15;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 1.75rem 2rem;
}
.note { border-top: 1px solid var(--line); padding-top: 1rem; min-width: 0; }
.note h3 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.note p { margin: 0; }

strong { font-weight: 700; }

/* Passo a passo */
.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.tools h2 { margin: 0; }
.ghost {
  font: 500 .9rem var(--body);
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5rem 1rem;
  cursor: pointer;
  transition: border-color .15s;
}
.ghost:hover { border-color: var(--accent); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.75rem; }
.step {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1.25rem;
  scroll-margin-top: 1.5rem;
}
.step-marker { display: flex; flex-direction: column; align-items: center; }
.step-marker span {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-weight: 500;
  font-size: .95rem;
}
.step-marker::after { content: ""; flex: 1; width: 1px; margin-top: .6rem; background: var(--line); }
.step:last-child .step-marker::after { display: none; }
.step-label {
  display: none;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .3rem;
}
.step-body { min-width: 0; }
.step h4 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; letter-spacing: -.01em; line-height: 1.2; margin: .25rem 0 .6rem; }
.caption { font-size: 1.08rem; max-width: none; margin: 0; }

details.shot { margin-top: 1.1rem; }
summary.pill {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font: 500 .9rem var(--body);
  transition: border-color .15s;
}
summary.pill::-webkit-details-marker { display: none; }
summary.pill:hover { border-color: var(--accent); }
.chev {
  width: .5rem;
  height: .5rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s;
}
details[open] .chev { transform: rotate(-135deg) translate(-1px, -1px); }
details[open] .when-closed, details:not([open]) .when-open { display: none; }
figure.print {
  margin: .9rem 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
figure.print picture { display: block; }
figure.print img { display: block; width: 100%; height: auto; }

footer { border-top: 1px solid var(--line); padding-block: 1.75rem 2.5rem; color: var(--muted); font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .gizmo { justify-self: start; max-width: 15rem; }
}
@media (max-width: 600px) {
  .step { grid-template-columns: minmax(0, 1fr); }
  .step-marker { display: none; }
  .step-label { display: block; }
  summary.pill, .ghost { min-height: 44px; padding-inline: 1.1rem; }
  .gizmo { max-width: 11rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Link para a outra parte da aula, no fim da página */
.pager { display: flex; flex-wrap: wrap; gap: 1rem; padding-block: 2rem; border-top: 1px solid var(--line); }
.pager a {
  display: inline-flex;
  flex-direction: column;
  gap: .15rem;
  padding: .9rem 1.25rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  transition: border-color .15s;
}
.pager a:hover { border-color: var(--accent); }
.pager .p-sub { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--muted); }
.pager .p-name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.pager .p-fwd { margin-left: auto; text-align: right; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: 1.25rem 1.5rem; margin: 0; }
@media (max-width: 600px) {
  .pager a { width: 100%; }
}

/* ===== Aulas: barra lateral, menu no celular e partes ===== */
.app { display: grid; grid-template-columns: 18.5rem minmax(0, 1fr); align-items: start; }
.page { min-width: 0; padding-inline: clamp(16px, 3vw, 2rem); }
.topbar, .backdrop, .side-close { display: none; }

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 1.4rem 1rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.side-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
.side-ver { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--muted); margin: .3rem 0 0; }

.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lesson-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .6rem;
  padding: .6rem .75rem;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.lesson-num { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.lesson-name { flex-basis: 100%; font-family: var(--display); font-weight: 600; font-size: .98rem; line-height: 1.25; }
.lesson-count, .badge { margin-left: auto; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--muted); }
.lesson-count { text-transform: none; }
.badge { text-transform: uppercase; border: 1px dashed var(--line); border-radius: 999px; padding: .02rem .55rem; }
.lesson.soon .lesson-row { color: var(--muted); cursor: default; }
.lesson.soon .lesson-num { color: var(--muted); }
.lesson.current > .lesson-row { background: var(--accent-soft); }
a.lesson-row:hover { background: var(--accent-soft); }

.parts { display: grid; gap: 1rem; margin: .75rem 0 .5rem; }
.fold-head { display: flex; align-items: center; gap: .25rem; }
.fold-head > a { flex: 1; min-width: 0; }
.fold {
  flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0;
  background: transparent; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer;
}
.fold:hover { background: var(--surface-2); color: var(--fg); }
.fold .chev { width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; margin-top: -3px; transform: rotate(45deg); transition: transform .2s; }
.fold[aria-expanded="false"] .chev { margin-top: 0; margin-left: -3px; transform: rotate(-45deg); }
.nav-part.has-current > .fold-head .nav-part-title { color: var(--accent); }
.nav-part-title {
  display: block;
  padding: .2rem .75rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.nav-part-title:hover { color: var(--fg); }
.nav-part-title b { color: var(--accent); font-weight: 500; margin-right: .4rem; }
.step-nav { list-style: none; margin: .25rem 0 0; padding: 0; }
.step-nav a {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: .45rem;
  align-items: baseline;
  padding: .32rem .75rem;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: .88rem;
  line-height: 1.3;
}
.step-nav b { font-family: var(--mono); font-weight: 500; font-size: .78rem; color: var(--accent); text-align: right; }
.step-nav a:hover { background: var(--surface-2); }
.step-nav a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.step-nav a[aria-current] b { color: inherit; }

/* Partes da aula */
.part + .part { margin-top: 3.5rem; }
.part-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem 1rem;
  padding-block: 1.1rem;
  margin-bottom: 2rem;
  border-block: 1px solid var(--line);
}
.part-kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.part-head h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.35rem, 3vw, 1.7rem); letter-spacing: -.015em; line-height: 1.15; margin: 0; }
.part-range { margin-left: auto; font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; color: var(--muted); }
.part, .step { scroll-margin-top: 1.5rem; }

@media (max-width: 900px) {
  .app { display: block; }
  .page { padding-inline: 16px; }
  .topbar {
    display: flex;
    align-items: center;
    gap: .9rem;
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 30;
    padding: .5rem 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
    min-width: 44px;
    padding: 0 1.1rem 0 .95rem;
    font: 500 .95rem var(--body);
    color: var(--fg);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
  }
  .menu-btn:hover { border-color: var(--accent); }
  .burger, .burger::before, .burger::after { display: block; width: 1.05rem; height: 2px; border-radius: 2px; background: var(--accent); content: ""; }
  .burger { position: relative; }
  .burger::before { position: absolute; top: -5px; left: 0; }
  .burger::after { position: absolute; top: 5px; left: 0; }
  .topbar-title { margin: 0; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
  .topbar-title strong { font-family: var(--display); font-weight: 700; font-size: 1rem; }
  .topbar-title span { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }

  .backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(5, 10, 14, .55); }
  .backdrop[hidden] { display: none; }
  .side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    width: min(88vw, 22rem);
    height: auto;
    padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 2rem);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }
  .side.open { transform: none; visibility: visible; transition: transform .22s ease, visibility 0s; }
  html.menu-open { overflow: hidden; }
  .side-close {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: -.2rem -.3rem 0 0;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
  }
  .x, .x::before { display: block; width: 1rem; height: 2px; background: var(--fg); content: ""; border-radius: 2px; }
  .x { position: relative; transform: rotate(45deg); }
  .x::before { position: absolute; top: 0; left: 0; transform: rotate(90deg); }
  .step-nav a { min-height: 44px; align-items: center; font-size: .95rem; padding-block: .4rem; }
  .nav-part-title { display: flex; align-items: center; min-height: 44px; padding-block: .3rem; }
  .lesson-row { min-height: 44px; }
  .fold { width: 44px; height: 44px; }
  .part, .step { scroll-margin-top: 5rem; }
}
@media (max-width: 600px) {
  .part-range { margin-left: 0; flex-basis: 100%; }
}

/* Rodapé com redes sociais */
footer.site-footer { display: grid; gap: 1.25rem; padding-block: 2rem 2.5rem; font-family: var(--body); font-size: .92rem; letter-spacing: 0; color: var(--muted); }
.site-footer p { margin: 0; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.foot-course { display: grid; gap: .1rem; }
.foot-name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; color: var(--fg); line-height: 1.2; }
.foot-ver { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; }
.foot-copy { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; padding-top: 1.25rem; border-top: 1px solid var(--line); line-height: 1.6; }
.foot-copy a { color: var(--accent); font-weight: 700; text-decoration: none; }
.foot-copy a:hover { text-decoration: underline; }
.social { --ico-bg: var(--fg); list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--fg); color: var(--bg); transition: transform .15s, background .15s; }
.social a:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); --ico-bg: var(--accent); }
.social svg { width: 22px; height: 22px; }

/* Barra de rolagem sutil na barra lateral (a rolagem continua funcionando) */
.side { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.side:hover, .side:focus-within { scrollbar-color: var(--line) transparent; }
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-track { background: transparent; }
.side::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
.side:hover::-webkit-scrollbar-thumb, .side:focus-within::-webkit-scrollbar-thumb { background: var(--line); }
.side::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Imagens não passam de uma largura confortável, mesmo com o conteúdo largo */
figure.print { max-width: 56rem; }
