/* Aulas Método PPE — marca: assets/marca/DESIGN.md (navy é o chão, ouro é a voz) */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/fonts/fraunces-latin.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 900; font-display: swap; src: url(/fonts/fraunces-italic-latin.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2"); }

:root {
  --navy: #0B1622; --navy2: #101F2E; --navy3: #16293C;
  --gold: #D4A24E; --gold2: #EBC57A; --gold3: #F4E2BC; --emer: #2E8B6B;
  --ink: #EDF3FA; --ink2: #C6D5E6; --muted: #89A0BA;
  --line: rgba(255,255,255,.075); --glass: rgba(255,255,255,.045);
  --danger: #E58A7B; --ok: #8FD3B6;
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px; --gut: 16px;
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --gut: 40px; } }
@media (min-width: 1280px) { :root { --gut: 56px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink2);
  background-color: var(--navy);
  background-image:
    radial-gradient(900px 520px at 8% -6%, rgba(212,162,78,.13), transparent 60%),
    radial-gradient(760px 520px at 100% 0%, rgba(40,86,140,.20), transparent 62%),
    radial-gradient(700px 600px at 100% 100%, rgba(46,139,107,.10), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy2) 60%, var(--navy) 100%);
  background-attachment: fixed;
}
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4.2vw, 44px); }
h2 { font-size: clamp(20px, 2.4vw, 26px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
strong { color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { padding: 0 var(--gut); max-width: 1600px; margin: 0 auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--gold2); color: var(--navy); padding: 8px 12px; border-radius: 8px; z-index: 99; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }

/* topo */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(11,22,34,.92), rgba(11,22,34,.72)); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 19px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .dash { width: 22px; height: 2px; background: var(--gold); display: inline-block; }
.brand em { font-style: normal; color: var(--gold2); }
.nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nav a, .nav button { color: var(--ink2); font-size: 14px; padding: 8px 10px; border-radius: 10px; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--glass); color: var(--ink); text-decoration: none; }
.nav form { margin: 0; }
@media (max-width: 520px) { .nav .hide-sm { display: none; } .brand { font-size: 17px; } }

main { padding: 24px 0 56px; }

/* kicker, traço */
.kicker { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(212,162,78,.55); color: var(--gold2);
  border-radius: 999px; padding: 4px 12px; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 8px var(--gold2); }
.rule { width: 76px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); margin: 14px 0 18px; border: 0; }

/* cartão de vidro */
.glass { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.016));
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 34px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.06); padding: 20px; }
.glass.fio::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--gold); }

/* botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px;
  border: 1px solid transparent; font: 600 15px var(--sans); cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1A1206; box-shadow: 0 8px 22px rgba(212,162,78,.22); }
.btn-ghost { background: var(--glass); color: var(--ink); border-color: var(--line); }
.btn-danger { background: rgba(229,138,123,.12); color: var(--danger); border-color: rgba(229,138,123,.35); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
label { display: block; font-size: 13.5px; color: var(--ink2); margin: 0 0 6px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: 16px var(--sans); color: var(--ink); background: rgba(5,12,20,.55);
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,162,78,.18); }
input[type=file] { color: var(--ink2); font-size: 14px; }
.field { margin-bottom: 16px; }
.row2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }

.alert { padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; font-size: 14.5px; border: 1px solid; }
.alert-err { color: #F6C4BB; background: rgba(229,138,123,.10); border-color: rgba(229,138,123,.35); }
.alert-ok { color: #CBEFDF; background: rgba(46,139,107,.14); border-color: rgba(46,139,107,.45); }
.alert-info { color: var(--gold3); background: rgba(212,162,78,.08); border-color: rgba(212,162,78,.35); }

/* ---------- LOGIN ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth-stage { position: relative; overflow: hidden; padding: 36px var(--gut) 8px; display: flex; flex-direction: column; justify-content: flex-end; }
.auth-stage .marks { display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: 5px; text-transform: uppercase; color: var(--muted); margin-bottom: auto; padding-bottom: 28px; }
.auth-stage .kicker { align-self: flex-start; }
.auth-stage .marks .hide-sm { display: none; }
@media (max-width: 959px) { .auth-stage .marks { letter-spacing: 3px; font-size: 10px; } .ghost-num { top: 0; font-size: 46vw; } }
@media (min-width: 960px) { .auth-stage .marks .hide-sm { display: inline; } }
.mosaic { display: none; }
@media (min-width: 960px) {
  .mosaic { display: flex; gap: 14px; margin-top: 34px; -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent); }
  .mosaic img { width: 112px; aspect-ratio: 600 / 1266; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 14px 30px rgba(0,0,0,.45); opacity: .92; }
  .mosaic img:nth-child(even) { transform: translateY(18px); }
}
.course-hero .btn { height: auto; min-height: 46px; padding-top: 10px; padding-bottom: 10px; white-space: normal; text-align: left; }
.auth-stage .marks span:first-child::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--gold); vertical-align: middle; margin-right: 10px; }
.auth-title { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: clamp(40px, 11vw, 96px); line-height: .98; letter-spacing: -.025em; margin: 14px 0 0; }
.auth-title em { font-style: italic; font-weight: 500; color: var(--gold2); }
.auth-lead { font-size: clamp(15px, 1.6vw, 18px); max-width: 30em; margin: 16px 0 0; color: var(--ink2); }
.ghost-num { position: absolute; right: -4vw; top: 4vh; font-family: var(--serif); font-weight: 800; font-size: clamp(200px, 38vw, 520px); line-height: .8;
  color: rgba(255,255,255,.035); pointer-events: none; user-select: none; }
.ecg { display: block; width: 100%; height: 56px; margin-top: 26px; opacity: .22; }
.auth-panel { display: flex; align-items: flex-start; justify-content: center; padding: 18px var(--gut) 40px; }
.auth-card { width: 100%; max-width: 420px; padding: 28px 24px; }
.auth-card h2 { font-size: 24px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw button { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border-radius: 9px; background: transparent; border: 0; color: var(--gold2); font: 600 13px var(--sans); cursor: pointer; }
.auth-foot { margin-top: 18px; font-size: 13.5px; color: var(--muted); text-align: center; }
@media (min-width: 960px) {
  .auth { grid-template-columns: 1.25fr 1fr; }
  .auth-stage { padding: 48px 64px 48px; justify-content: center; border-right: 1px solid var(--line); }
  .auth-stage .marks { position: absolute; top: 40px; left: 64px; right: 64px; }
  .auth-panel { align-items: center; padding: 48px; }
  .auth-card { padding: 40px 36px; }
}

/* ---------- CATÁLOGO ---------- */
.hero { padding-top: 8px; padding-bottom: 18px; }
.hero h1 { margin-top: 12px; }
.hero h1 em { font-style: italic; color: var(--gold2); font-weight: 500; }
.shelf { margin: 22px 0 8px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 var(--gut); max-width: 1600px; margin: 0 auto 10px; }
.shelf-head h2 { margin: 0; font-size: clamp(18px, 2vw, 22px); }
.shelf-head .count { color: var(--muted); font-size: 13px; }
.rowx { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gut) 14px; scroll-padding: 0 var(--gut);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; -webkit-overflow-scrolling: touch; max-width: 1600px; margin: 0 auto; }
.rowx::-webkit-scrollbar { height: 6px; } .rowx::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 6px; }
.card { flex: 0 0 auto; width: 38vw; max-width: 190px; scroll-snap-align: start; position: relative; color: var(--ink); border-radius: 12px; }
.card:hover { text-decoration: none; }
.card .poster { position: relative; aspect-ratio: 600 / 1266; border-radius: 12px; overflow: hidden; background: var(--navy3); border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(0,0,0,.35); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card .poster img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .poster, .card:focus-visible .poster { transform: translateY(-3px) scale(1.02); border-color: rgba(212,162,78,.55); box-shadow: 0 18px 34px rgba(0,0,0,.45); }
.card .meta { padding: 8px 2px 0; font-size: 13.5px; line-height: 1.35; }
.card .meta b { display: block; color: var(--ink); font-weight: 600; }
.card .meta span { color: var(--muted); font-size: 12.5px; }
.bar { height: 4px; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); }
.card .bar { position: absolute; left: 10px; right: 10px; bottom: 10px; }
.card.locked .poster img { filter: grayscale(.85) brightness(.55); }
.lock { position: absolute; inset: auto 10px 10px 10px; background: rgba(11,22,34,.85); border: 1px solid rgba(212,162,78,.4); color: var(--gold2);
  font-size: 12px; padding: 6px 8px; border-radius: 8px; text-align: center; font-weight: 600; }
.card.wide { width: 74vw; max-width: 340px; }
.card.wide .poster { aspect-ratio: 16 / 9; }
@media (min-width: 768px) {
  .card { width: 300px; max-width: none; }
  .card .poster { aspect-ratio: 16 / 9; }
  .card.wide { width: 340px; }
  .rowx { gap: 16px; }
}
@media (min-width: 1280px) { .card { width: 320px; } }

.empty { padding: 28px; text-align: center; }
.locked-box { max-width: 640px; }

/* ---------- CURSO ---------- */
.course-hero { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: end; margin-bottom: 26px; }
.course-hero .cover { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 16px 34px rgba(0,0,0,.35); aspect-ratio: 16/9; background: var(--navy3); }
.course-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .course-hero { grid-template-columns: 1.1fr 1fr; gap: 36px; } }
.progress-line { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); margin: 12px 0 18px; }
.progress-line .bar { flex: 1; max-width: 260px; }
.module { margin-bottom: 14px; padding: 0; overflow: hidden; }
.module summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.module summary::-webkit-details-marker { display: none; }
.module summary h3 { margin: 0; flex: 1; font-size: 17px; }
.module summary .n { font-family: var(--serif); color: var(--gold2); font-size: 15px; min-width: 28px; }
.module summary .c { color: var(--muted); font-size: 13px; }
.module summary::after { content: "+"; color: var(--gold2); font-size: 20px; width: 20px; text-align: center; }
.module[open] summary::after { content: "–"; }
.lessons { list-style: none; margin: 0; padding: 0 8px 10px; }
.lessons a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; color: var(--ink2); }
.lessons a:hover { background: var(--glass); text-decoration: none; color: var(--ink); }
.dot { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: 12px; }
.dot.done { background: var(--gold); border-color: var(--gold); color: #1A1206; }
.dot.half { border-color: var(--gold); }
.lessons .t { flex: 1; }
.lessons .d { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(212,162,78,.4); color: var(--gold2); white-space: nowrap; }

/* ---------- AULA ---------- */
.lesson-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 1080px) { .lesson-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.player { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 16px 34px rgba(0,0,0,.4); }
.player iframe, .player > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.soon { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(500px 300px at 30% 20%, rgba(212,162,78,.16), transparent 60%), var(--navy2); }
.soon b { display: block; font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); color: var(--ink); margin: 10px 0 4px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--gold2); }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.prevnext a { display: block; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--ink2); font-size: 14px; }
.prevnext a:hover { border-color: rgba(212,162,78,.5); text-decoration: none; }
.prevnext a span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.prevnext .next { text-align: right; grid-column: 2; }
.files { list-style: none; padding: 0; margin: 0; }
.files a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; color: var(--ink); background: rgba(5,12,20,.35); }
.files a:hover { border-color: rgba(212,162,78,.5); text-decoration: none; }
.files .ext { font-size: 11px; font-weight: 700; color: #1A1206; background: var(--gold2); border-radius: 6px; padding: 4px 6px; }
.files .sz { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.desc { white-space: pre-line; }

/* ---------- ADMIN ---------- */
.adm-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.adm-nav a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink2); font-size: 14px; background: var(--glass); }
.adm-nav a.on { border-color: var(--gold); color: var(--gold2); }
.adm-nav a:hover { text-decoration: none; border-color: rgba(212,162,78,.5); }
.tbl-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: rgba(5,12,20,.4); }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: rgba(143,211,182,.4); }
.pill.warn { color: var(--gold2); border-color: rgba(212,162,78,.45); }
.pill.bad { color: var(--danger); border-color: rgba(229,138,123,.45); }
.stack > * + * { margin-top: 18px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline form { margin: 0; }
.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, monospace; font-size: 13px; }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mini-cover { width: 64px; aspect-ratio: 16/9; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); }

/* rodapé */
.foot { border-top: 1px solid var(--line); padding: 22px 0 32px; font-size: 12.5px; color: var(--muted); }
.foot .wrap { display: grid; gap: 8px; }
.foot .rev { color: var(--gold2); font-weight: 600; }
.foot .ecg { height: 30px; margin: 0 0 6px; opacity: .2; }
