:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #fff;
  --wash: #f4f3ec;
  --line: #dcded8;
  --text: #182638;
  --muted: #515d68;
  --accent: #86601f;
  --accent-ink: #745119;
  --gold: #ac7d32;
  --focus: #315d8d;
  --display: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif;
}
main { flex: 1; min-width: 0; }
a { color: inherit; text-decoration: none; }
:where(a, summary, button):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar, .brand { gap: 12px; line-height: 1.12; }
.brand-name { font-size: 1.12rem; font-weight: 620; letter-spacing: -.03em; }
.brand-name strong { font-weight: 820; }
.brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.mark {
  display: grid;
  place-items: center;
  position: relative;
  width: 42px;
  aspect-ratio: 1;
  flex: none;
  color: #f8d58c;
  background: #111d32;
  clip-path: polygon(0 0, 75% 0, 100% 25%, 100% 100%, 25% 100%, 0 75%);
}
.mark::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 36%;
  height: 7%;
  background: #cda360;
}
.mark-symbol {
  width: 60%;
  height: 60%;
  background: currentColor;
  clip-path: polygon(0 12%, 88% 12%, 100% 30%, 61% 30%, 61% 88%, 40% 100%, 40% 30%, 14% 30%);
}
.nav, .back { font-size: .9rem; font-weight: 690; color: var(--text); }
.nav { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 3px; border-bottom: 2px solid var(--gold); }
.nav:hover, .back:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 4px; }
.view { padding-block: 32px 45px; }
.eyebrow {
  color: var(--accent-ink); margin: 0 0 12px;
  font-size: .875rem; font-weight: 720; letter-spacing: .105em; text-transform: uppercase;
}
h1 { margin: 0; font: 500 clamp(2.6rem, 5.75vw, 4.85rem)/.99 var(--display); letter-spacing: -.055em; }
.inner { max-width: 920px; margin-inline: auto; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 13px; }
.heading { margin-bottom: 25px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.inner h1 { font-size: clamp(2.05rem, 5vw, 3.45rem); }
.entry, details { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 12px; }
.entry { padding: clamp(16px, 3vw, 29px); }
.entry h2 { margin: 0; font-size: 1.25rem; line-height: 1.32; }
.entry p { max-width: 72ch; color: var(--muted); margin: 9px 0 0; }
.entry blockquote { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--wash); }
summary { cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 12px 16px; list-style: none; font-weight: 680; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; margin-left: auto; color: var(--accent-ink); }
details[open] summary::after { content: '−'; }
details:hover > summary { background: var(--wash); }
footer { border-top: 1px solid var(--line); color: var(--muted); padding: 17px 0; font-size: .875rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
@media (max-width: 820px) {
  .wrap { width: calc(100% - 40px); }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .bar { min-height: 62px; }
  .view { padding-top: 18px; }
}

.contract-guide { margin-bottom: 36px; }
.contract-guide > h2 { margin: 0 0 8px; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.guide-intro { margin: 0 0 18px; color: var(--muted); }
.contract-topic { margin-bottom: 14px; }
.contract-topic h3 { margin: 0; font-size: 1.2rem; }
.contract-excerpts { display: grid; gap: 10px; margin-top: 16px; }
.contract-excerpt { margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.contract-excerpt a { display: block; background: white; padding: 8px; }
.contract-excerpt a:focus-visible { outline-offset: -3px; }
.contract-excerpt img { display: block; width: 100%; height: auto; }
.contract-excerpt figcaption { padding: 8px 10px; color: var(--muted); font-size: .875rem; }
.contract-answer { margin: 12px 0 0; }
.contract-answer p { margin: 0; padding: 0 16px 14px; }
.guide-source { color: var(--muted); font-size: .875rem; }
.guide-source a { text-decoration: underline; }
@media (max-width: 560px) {
  .contract-topic { padding: 13px; }
}

.class-intro { margin-bottom: 20px; }
.class-intro h2 { margin: 0 0 10px; font-size: clamp(1.45rem, 4vw, 2rem); }
.class-intro p { max-width: 68ch; margin: 8px 0 0; color: var(--muted); }
.contract-topic p { max-width: 68ch; }
.contract-guide strong { color: var(--text); }
.contract-topic .class-equation {
  margin: 14px 0;
  padding: 10px 13px;
  border-left: 3px solid var(--gold);
  background: var(--wash);
}
.class-breakdown { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.class-breakdown div { padding: 10px 13px; border: 1px solid var(--line); border-radius: 6px; }
.class-breakdown dt { color: var(--accent-ink); font-weight: 700; }
.class-breakdown dd { margin: 2px 0 0; color: var(--muted); }
.term-body { padding: 0 14px 14px; }
.term-body p { padding: 0; }
@media (max-width: 560px) {
  .class-breakdown { grid-template-columns: 1fr; }
}

.approach-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  table-layout: fixed;
}
.approach-table th,
.approach-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.approach-table th {
  background: var(--wash);
  color: var(--accent-ink);
}
.approach-table th:first-child { width: 40%; }
@media (max-width: 560px) {
  .approach-table th,
  .approach-table td { padding: 8px; }
}
.script-lines {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 2px solid var(--gold);
  background: var(--wash);
}
.script-lines p { margin: 0 0 5px; white-space: pre-line; }
.script-lines p:last-child { margin-bottom: 0; }
.contract-topic .script-note { margin-top: 14px; }
.script-note strong { color: var(--accent-ink); }

.class-balloon { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.class-balloon h4 { margin: 0; font-size: 1.12rem; }

/* The home page is a film catalog; lesson pages keep their reading layout. */
body { background: #f7f7f5; }
header .bar { min-height: 64px; }
header .mark { background: #f6f2e7; }
.streaming { padding-block: 20px 43px; }
.hero {
  min-height: clamp(344px, 36vw, 438px);
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: end;
  border-radius: 6px; background: #1a1a1a; color: #fff;
}
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%; z-index: -2;
}
.hero::before {
  content: ''; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(90deg, #0a0b0cf2 0%, #0a0b0cd6 28%, #0a0b0c36 64%, #0a0b0c00 83%);
}
.hero-body { position: relative; max-width: 600px; padding: 34px clamp(27px, 5.4vw, 68px) 39px; }
.hero-series { margin: 0 0 12px; color: #ecd09b; font-size: .875rem; font-weight: 740; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { margin: 0; font: 840 clamp(3.35rem, 7vw, 6.5rem)/.85 system-ui, sans-serif; letter-spacing: -.085em; }
.hero-desc { margin: 20px 0; color: #f1eeea; max-width: 32ch; line-height: 1.45; }
.hero-action {
  display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px;
  border-radius: 4px; padding: 10px 16px; background: #f1d194; color: #1d1811; font-weight: 750;
}
.hero-action svg { width: 17px; height: 17px; fill: currentColor; }
.hero-action:hover { background: #ffe4ad; }
.hero-action:focus-visible { outline-color: #ffedc4; }
.shelf { margin-top: 23px; }
.shelf-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 11px; }
.shelf-heading h2 { margin: 0; font-size: clamp(1.27rem, 3vw, 1.62rem); font-weight: 790; line-height: 1.15; letter-spacing: -.033em; }
.shelf-heading > span { display: none; color: var(--muted); font-size: .875rem; }
.poster-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 11px; }
.poster {
  min-width: 0; position: relative; isolation: isolate; overflow: hidden; display: block;
  aspect-ratio: 1.56; border-radius: 5px; background: #22211d; color: #fff;
}
.poster img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 35%; z-index: -2; transition: transform .22s ease;
}
.poster--contrato img, .poster--objecao img, .poster--analise img { filter: grayscale(.9) sepia(.24); }
.poster--sondagem img { object-position: center 40%; filter: grayscale(1); }
.poster::before {
  content: ''; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(0deg, #070809fa 0%, #070809d6 24%, #07080964 52%, #07080900 80%);
}
.poster:hover img, .poster:focus-visible img { transform: scale(1.045); }
.poster:focus-visible { outline-offset: 3px; }
.poster-caption { position: absolute; inset: auto 0 0; padding: 12px 13px; }
.poster-caption > span { display: block; margin-bottom: 4px; color: #f0d8a9; font-size: .875rem; font-weight: 710; letter-spacing: .035em; }
.poster h3 { margin: 0; max-width: 23ch; color: #fff; font-size: clamp(1rem, 1.6vw, 1.23rem); line-height: 1.11; letter-spacing: -.021em; font-weight: 770; text-wrap: pretty; }
.poster-play {
  display: grid; place-items: center; position: absolute; inset: 10px 10px auto auto;
  width: 29px; height: 29px; background: #151515bd; color: white;
  border: 1px solid #ffffffa0; border-radius: 50%;
}
.poster-play svg { width: 15px; height: 15px; fill: currentColor; }
.poster:hover .poster-play, .poster:focus-visible .poster-play { background: #f1d194; border-color: #f1d194; color: #171515; }

@media (max-width: 830px) {
  .hero { min-height: 355px; }
  .poster-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(205px, 35vw, 275px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 10px; margin-inline: -4px; scrollbar-color: #b1aa97 transparent; }
  .poster { scroll-snap-align: start; scroll-margin-inline: 4px; }
  .shelf-heading > span { display: inline; }
}
@media (max-width: 580px) {
  .streaming { padding-top: 14px; }
  .hero { min-height: 359px; }
  .hero-photo { height: 100%; object-position: 73% center; }
  .hero::before { background: linear-gradient(0deg,#08090a 1%,#08090aef 22%,#08090a6b 56%,#08090a07 92%); }
  .hero-body { padding: 20px; }
  .hero-series { margin-bottom: 8px; }
  .hero h1 { font-size: clamp(2.75rem, 12vw, 4.05rem); }
  .hero-desc { margin: 13px 0 14px; }
  .shelf-heading { flex-wrap: wrap; row-gap: 3px; }
  .poster-row { grid-auto-columns: 70%; }
}
@media (prefers-reduced-motion: reduce) { .poster img { transition: none; } .poster:hover img, .poster:focus-visible img { transform: none; } }

.objection-steps { margin: 12px 0 0; padding-left: 1.4em; }
.objection-steps li + li { margin-top: 8px; }

.account-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.account-nav form { margin: 0; }
.account-signout { color: var(--text); cursor: pointer; border: 1px solid var(--line); border-radius: 4px; background: transparent; padding: 8px 12px; font: inherit; }
.account-signout:hover { border-color: var(--gold); }
.access-main { display: grid; place-items: start center; padding-block: clamp(24px, 7vw, 76px); }
.access-panel { width: min(100%, 560px); }
.access-panel h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.access-panel h2 { margin-top: 22px; }
.access-panel form { display: grid; gap: 12px; margin-top: 16px; }
.access-panel label { display: grid; gap: 4px; font-weight: 650; }
.access-panel input { min-height: 44px; width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; }
.access-panel form button:not(.account-signout) { padding: 10px 16px; border: 0; border-radius: 4px; background: var(--gold); color: #151310; font: inherit; font-weight: 700; cursor: pointer; }
.access-panel .access-notice { padding: 10px 12px; border-left: 3px solid var(--gold); }

.auth-page {
  color-scheme: dark;
  --bg: #071020;
  --surface: #0e1b31;
  --wash: #14233c;
  --line: #334663;
  --text: #f3f7ff;
  --muted: #b3c1d9;
  --focus: #9dcaff;
  --gold: #efc57f;
  background: radial-gradient(ellipse at 32% 28%, #193659 0%, #0b162b 38%, var(--bg) 74%);
}
.auth-page header { background: #091426; border-color: #283a57; }
.auth-page .brand .mark { background: #243959; }
.auth-page .access-main {
  grid-template-columns: minmax(0, 1fr) minmax(325px, 440px);
  place-items: center stretch;
  gap: clamp(24px, 6vw, 78px);
  padding-block: clamp(30px, 8vh, 100px);
}
.auth-cover {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 28px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid #385374;
  border-radius: 12px;
  background:
    linear-gradient(0deg, #0a1429 2%, #0a172ad4 25%, transparent 78%),
    repeating-linear-gradient(90deg, transparent 0 39px, #90bdf317 39px 40px),
    repeating-linear-gradient(0deg, transparent 0 39px, #90bdf317 39px 40px),
    linear-gradient(125deg, #0d1c32, #203f64);
}
.auth-cover::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 22px;
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
}
.auth-emblem .mark {
  width: clamp(72px, 10vw, 116px);
  background: linear-gradient(135deg, #4e739d, #112947 72%);
}
.auth-cover p, .auth-page .access-panel h1 {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 760;
  letter-spacing: -.045em;
}
.auth-cover p { font-size: clamp(2.2rem, 5.25vw, 4.2rem); line-height: .98; }
.auth-page .access-panel {
  width: 100%;
  margin: 0;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 12px;
  box-shadow: 0 24px 64px #02071370;
}
.auth-page .access-panel h1 { font-size: clamp(1.8rem, 3.5vw, 2.35rem); line-height: 1.12; }
.auth-page .access-panel form { gap: 15px; margin-top: 24px; }
.auth-page .access-panel input { min-height: 49px; border-radius: 6px; background: #09162a; }
.auth-page .access-panel input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.auth-page .access-panel form button { min-height: 48px; border-radius: 6px; }
.auth-page .access-panel form button:hover { background: #ffda9d; }
@media (max-width: 760px) {
  .auth-page .access-main { grid-template-columns: minmax(0, 480px); justify-content: center; }
  .auth-cover { display: none; }
}

.admin-tabs { display: flex; gap: 18px; margin: 16px 0 12px; border-bottom: 1px solid var(--line); }
.admin-tabs a { padding: 8px 2px; border-bottom: 2px solid transparent; font-weight: 650; }
.admin-tabs a:hover, .admin-tabs a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--gold); }

.admin-tabs { flex-wrap: wrap; gap: 4px 18px; }
.access-panel .approach-table a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.access-panel .delete-link { color: #8b2435; }
.access-panel form button.delete-action { background: #9e2638; color: #fff; }
.admin-row-actions a { display: block; }
.admin-row-actions a + a { margin-top: 4px; }
