:root {
  --ink: #102333;
  --muted: #607080;
  --paper: #f6f3ec;
  --white: #fffdf8;
  --navy: #071b2c;
  --blue: #1e5c83;
  --cyan: #8dd7dc;
  --gold: #e6b75c;
  --line: rgba(16, 35, 51, 0.14);
  --shadow: 0 24px 70px rgba(7, 27, 44, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: white;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 50%;
  width: min(1180px, calc(100% - 3rem));
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #eef7f6;
  transform: translateX(-50%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
}

/* Marca: o algarismo duvidoso de uma leitura */
.brand-mark {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: var(--navy);
  background: var(--cyan);
  border-radius: 50%;
  font-family: "Newsreader", serif;
}

.mark-value {
  position: absolute;
  top: 12px;
  left: 0;
  display: block;
  width: 100%;
  font-size: 19px;
  font-style: italic;
  line-height: 1;
  text-align: center;
}

.mark-value b { font-weight: 500; border-bottom: 2px solid var(--navy); }

nav { display: flex; gap: 2rem; }

nav a {
  color: rgba(238, 247, 246, 0.78);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 160ms ease;
}

nav a:hover, nav a:focus-visible { color: white; }

.hero {
  position: relative;
  min-height: 700px;
  padding: 190px max(1.5rem, calc((100vw - 1180px) / 2)) 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 6rem;
  align-items: center;
  overflow: hidden;
  color: #f5fbfa;
  background:
    radial-gradient(circle at 78% 25%, rgba(32, 116, 148, 0.28), transparent 25%),
    linear-gradient(135deg, #061927 0%, #0a2b42 60%, #092236 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: radial-gradient(rgba(255,255,255,.75) 0.7px, transparent 0.7px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, black, transparent 70%);
}

/* Escalas decorativas — a régua no lugar das órbitas */
.scale-deco {
  position: absolute;
  right: -80px;
  width: 620px;
  height: 1px;
  background: rgba(141, 215, 220, 0.25);
}

.scale-deco::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(141, 215, 220, 0.35) 1px, transparent 1px);
  background-size: 26px 100%;
  height: 14px;
}

.scale-one { top: 150px; transform: rotate(-14deg); }
.scale-two { top: 330px; width: 460px; right: -40px; transform: rotate(-14deg); }
.scale-two::after { background-size: 13px 100%; height: 9px; }

.scale-three {
  position: absolute;
  right: 40px;
  top: 245px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 24px var(--gold);
}

.hero-copy, .equation-card { position: relative; z-index: 2; min-width: 0; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--blue);
  font-family: "DM Mono", monospace;
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero .eyebrow { color: var(--cyan); }

h1, h2, h3 { text-wrap: balance; }

h1 {
  margin: 0 0 1.2rem;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(3.4rem, 7vw, 6.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.hero-lead {
  max-width: 670px;
  margin: 0;
  color: rgba(238, 247, 246, 0.72);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.75;
}

.hero-actions, .card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0.8rem 1.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary { color: #071b2c; background: var(--gold); }
.button-primary:hover { background: #f1c76f; }

.button-secondary {
  color: white;
  background: transparent;
  border-color: rgba(255,255,255,.3);
}

.button-secondary:hover { border-color: white; }

.button-small { min-height: 40px; padding: .6rem .85rem; color: white; background: var(--blue); font-size: .74rem; }
.button-small:hover { background: #174a6a; }

.equation-card {
  padding: 2.2rem;
  background: rgba(4, 17, 28, 0.66);
  border: 1px solid rgba(141, 215, 220, 0.2);
  box-shadow: 0 30px 100px rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
}

.equation-label {
  color: var(--cyan);
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.equation {
  margin: 1.6rem 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 2.7vw, 2.2rem);
  white-space: nowrap;
}

.equation u { color: var(--gold); text-decoration-color: var(--gold); text-underline-offset: 5px; }
.equation sub { font-size: 0.58em; }

.equation-rule { width: 44px; height: 1px; margin-bottom: 1.4rem; background: var(--gold); }
.equation-card p { margin: 0; color: rgba(238,247,246,.6); font-size: .88rem; line-height: 1.65; }

.section {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 110px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 3.2rem;
}

h2 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ---------- Cartão de aula ---------- */

.aula-card {
  display: grid;
  grid-template-columns: 330px 1fr;
  min-height: 430px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.aula-cover {
  position: relative;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: white;
  background: linear-gradient(145deg, #0a3854, #071b2c);
}

.cover-scale {
  position: absolute;
  right: -60px;
  top: 120px;
  width: 340px;
  height: 12px;
  border-top: 1px solid rgba(141,215,220,.4);
  background-image: linear-gradient(90deg, rgba(141,215,220,.4) 1px, transparent 1px);
  background-size: 17px 100%;
  transform: rotate(-20deg);
}

.cover-kicker, .cover-author {
  position: relative;
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cover-kicker { color: var(--cyan); }

.aula-cover strong {
  position: relative;
  font-family: "Newsreader", Georgia, serif;
  font-size: 2.7rem;
  font-weight: 500;
  line-height: 0.98;
}

.cover-author { color: rgba(255,255,255,.65); }

.aula-card + .aula-card { margin-top: 1.25rem; }

.aula-info { padding: 3.3rem; align-self: center; }

.status {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  color: #246444;
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status i { width: 7px; height: 7px; background: #3a9b69; border-radius: 50%; }

.aula-info h3 {
  margin: 1rem 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.aula-info > p { max-width: 650px; color: var(--muted); line-height: 1.75; }

.aula-topics { margin: 1.5rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .88rem; line-height: 1.85; }

.card-meta { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 2rem 0 0; }
.card-meta div { display: grid; gap: .25rem; }
.card-meta dt { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.card-meta dd { margin: 0; font-size: .86rem; font-weight: 700; }

.text-link {
  padding: .45rem 0;
  color: var(--blue);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(30,92,131,.25);
}

.text-link:hover { border-color: var(--blue); }
.text-link span { margin-left: .25rem; }

/* ---------- Grades de material ---------- */

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

/* Grades com exatamente dois cartões não devem deixar uma coluna órfã */
.doc-grid-2 { grid-template-columns: repeat(2, 1fr); }

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.6rem 1.7rem;
  border: 1px solid var(--line);
  background: var(--white);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.doc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.doc-num { color: var(--blue); font-family: "DM Mono", monospace; font-size: .74rem; }

.doc-card h3 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
}

.doc-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.doc-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; margin-top: auto; padding-top: .6rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span { padding: .28rem .5rem; color: var(--blue); background: #e7f0f2; font-size: .63rem; font-weight: 700; text-transform: uppercase; }

/* ---------- Números da disciplina ---------- */

.fatos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 0 1.6rem;
  background: var(--line);
  border: 1px solid var(--line);
}

.fatos > div { padding: 1.4rem 1.5rem; background: var(--white); }
.fatos dt { color: var(--muted); font-family: "DM Mono", monospace; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; }

.fatos dd {
  margin: .55rem 0 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}

.fatos dd small { display: block; margin-top: .4rem; color: var(--muted); font-family: "Manrope", sans-serif; font-size: .74rem; font-weight: 500; letter-spacing: 0; }

/* ---------- Unidades de aprendizagem ---------- */

.tabela-ua { width: 100%; margin: 0 0 1.6rem; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); }

.tabela-ua th {
  padding: .8rem 1.1rem;
  color: var(--blue);
  background: #e9f0f2;
  border-bottom: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-align: left;
  text-transform: uppercase;
}

.tabela-ua td { padding: .85rem 1.1rem; border-bottom: 1px solid rgba(16, 35, 51, .08); font-size: .88rem; line-height: 1.5; vertical-align: top; }
.tabela-ua tr:last-child td { border-bottom: 0; }
.tabela-ua td:first-child { color: var(--blue); font-family: "DM Mono", monospace; font-size: .74rem; white-space: nowrap; }
.tabela-ua td:last-child { color: var(--muted); font-size: .82rem; white-space: nowrap; }

.toolbox {
  margin-top: 3rem;
  padding: 2.2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: white;
  background: var(--navy);
}

.toolbox .eyebrow { margin-bottom: .6rem; color: var(--cyan); }
.toolbox h3 { margin: 0; font-family: "Newsreader", Georgia, serif; font-size: 1.6rem; font-weight: 500; }
.toolbox p { margin: 0; max-width: 60ch; color: rgba(255,255,255,.65); font-size: .88rem; line-height: 1.7; }

.tool-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.tool-list span { padding: .45rem .7rem; color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.18); font-family: "DM Mono", monospace; font-size: .68rem; }

.pdf-preview { margin-top: 2rem; border-bottom: 1px solid var(--line); }
.pdf-preview summary { padding: 1.1rem 0; color: var(--blue); cursor: pointer; font-size: .86rem; font-weight: 700; }
.pdf-frame { height: 75vh; min-height: 520px; margin: 0 0 2rem; background: #d9dde0; }
.pdf-frame object { width: 100%; height: 100%; }
.pdf-frame p { padding: 2rem; }

footer {
  padding: 3rem max(1.5rem, calc((100vw - 1120px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  color: rgba(255,255,255,.65);
  background: #04121d;
  font-size: .78rem;
}

footer strong { color: white; }
footer p { margin: .35rem 0 0; }
footer a { color: var(--cyan); text-decoration: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; padding-top: 160px; }
  .equation-card { max-width: 480px; }
  .section-heading { grid-template-columns: 1fr; gap: 1.2rem; }
  .aula-card { grid-template-columns: 260px 1fr; }
  .aula-info { padding: 2.3rem; }
  .fatos { grid-template-columns: 1fr 1fr; }
  .toolbox { align-items: flex-start; flex-direction: column; gap: 1.4rem; }
  .tool-list { justify-content: flex-start; }
}

@media (max-width: 650px) {
  .site-header { width: calc(100% - 2rem); height: 72px; }
  .brand > span:last-child { display: none; }
  nav { gap: 1rem; }
  nav a:last-child { display: none; }
  .hero { min-height: 720px; padding: 130px 1.25rem 80px; }
  /* "Experimental" é a palavra mais longa: precisa caber em 390px sem
     empurrar a página para a rolagem horizontal. */
  h1 { font-size: clamp(2rem, 10vw, 3.2rem); }
  .equation-card { padding: 1.5rem; }
  /* A equação não quebra linha; em telas muito estreitas ela rola dentro do
     cartão, em vez de empurrar a página para a rolagem horizontal. */
  .equation { font-size: 1.2rem; overflow-x: auto; }
  .section { width: calc(100% - 2rem); padding: 80px 0; }
  .aula-card { grid-template-columns: 1fr; }
  .aula-cover { min-height: 300px; }
  .aula-info { padding: 2rem 1.4rem; }
  .card-meta { gap: 1rem; justify-content: space-between; }
  .card-actions { align-items: flex-start; flex-direction: column; }
  .pdf-frame { min-height: 430px; }
  .doc-grid { grid-template-columns: 1fr; }
  .fatos { grid-template-columns: 1fr; }
  .tabela-ua { display: block; overflow-x: auto; }
  .toolbox { padding: 1.6rem; }
  footer { align-items: flex-start; flex-direction: column; gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
