:root {
  --cq-cream: #F7F1E8;
  --cq-cream-dark: #EFE6D8;
  --cq-ivory: #FBF7F0;
  --cq-paper: #FDFBF7;
  --cq-charcoal: #2C2824;
  --cq-ink: #3A342E;
  --cq-muted: #6B6258;
  --cq-gold: #C5A059;
  --cq-gold-dark: #A8843F;
  --cq-gold-soft: rgba(197, 160, 89, 0.22);
  --cq-line: rgba(197, 160, 89, 0.45);
  --cq-serif: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --cq-serif-body: "Libre Baskerville", "Cormorant Garamond", Georgia, serif;
  --cq-sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --cq-max: 1180px;
  --cq-narrow: 720px;
  --cq-radius: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.cq-body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(197,160,89,0.06), transparent 50%),
    var(--cq-cream);
  color: var(--cq-charcoal);
  font-family: var(--cq-sans);
  font-size: 1.02rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.cq-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--cq-charcoal); color: #fff; padding: .5rem 1rem; z-index: 100;
}
.cq-skip:focus { left: 0; }

.cq-container {
  width: min(100% - 2.5rem, var(--cq-max));
  margin-inline: auto;
}

/* —— Logo —— */
.cq-wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--cq-charcoal);
}
.cq-wordmark-stack { display: flex; flex-direction: column; line-height: 1.15; }
.cq-wordmark-text {
  font-family: var(--cq-serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.cq-wordmark-sub {
  font-family: var(--cq-serif-body);
  font-size: 0.68rem;
  color: var(--cq-muted);
  letter-spacing: 0.02em;
  margin-top: .15rem;
}
.cq-wordmark-cross { display: inline-flex; flex-shrink: 0; }
.cq-cross-svg { width: 28px; height: 36px; display: block; }
.cq-wordmark-cross-sm .cq-cross-svg { width: 20px; height: 26px; }
.cq-cross { color: var(--cq-gold); font-size: 1.35rem; line-height: 1; }

.cq-wordmark-stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
}
.cq-wordmark-stacked .cq-wordmark-cross { margin-bottom: .15rem; }
.cq-wordmark-stacked .cq-wordmark-text { font-size: 1.5rem; }

/* —— Diamonds & rules —— */
.cq-diamond { color: var(--cq-gold); font-size: .7em; }
.cq-rule-diamond,
.cq-ornament-rule,
.cq-header-rule,
.cq-section-rule,
.cq-footer-rule,
.cq-side-rule {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cq-gold), transparent);
  margin: 0;
}
.cq-rule-diamond::before,
.cq-ornament-rule::before,
.cq-header-rule .cq-rule-diamond::before,
.cq-section-rule .cq-rule-diamond::before,
.cq-footer-rule .cq-rule-diamond::before,
.cq-side-rule .cq-rule-diamond::before {
  content: "♦";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--cq-gold);
  font-size: 0.7rem;
  background: var(--cq-cream);
  padding: 0 .45rem;
  line-height: 1;
}
.cq-ornament-rule {
  width: 7rem;
  margin: 1.1rem 0 1.25rem;
}
.cq-header-rule { margin: 0; }
.cq-section-rule { margin: 0 0 2rem; }
.cq-section-rule-bottom { margin: 2.25rem 0 0; }
.cq-flourish { color: var(--cq-gold); }

/* —— Header home —— */
.cq-header-home {
  background: rgba(247, 241, 232, 0.94);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.cq-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0 .95rem;
}
.cq-header-inner .cq-wordmark { justify-self: start; }
.cq-header-inner .cq-nav { justify-self: center; }
.cq-header-inner .cq-btn-entrar { justify-self: end; }

.cq-nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--cq-serif);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
}
.cq-nav-list a {
  color: var(--cq-ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.cq-nav-list a:hover { color: var(--cq-gold-dark); border-bottom-color: var(--cq-gold); }
.cq-nav-sep { display: flex; align-items: center; color: var(--cq-gold); font-size: .65rem; }

/* —— Buttons —— */
.cq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--cq-serif);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--cq-radius);
  padding: 0.55rem 1.35rem;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  background: transparent;
  color: var(--cq-charcoal);
}
.cq-btn-outline-gold {
  border-color: var(--cq-gold);
  color: var(--cq-charcoal);
  background: transparent;
  border-radius: 999px;
  padding: 0.45rem 1.35rem;
}
.cq-btn-outline-gold:hover { background: var(--cq-gold-soft); }
.cq-btn-charcoal-pill {
  background: var(--cq-charcoal);
  color: #fff;
  border-color: var(--cq-charcoal);
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-family: var(--cq-sans);
  font-weight: 600;
  font-size: 0.95rem;
}
.cq-btn-charcoal-pill:hover { background: #1a1714; color: #fff; }
.cq-btn-charcoal-pill .cq-diamond { color: var(--cq-gold); font-size: 0.75rem; }
.cq-btn-dark-gold {
  background: var(--cq-charcoal);
  color: #fff;
  border: 1px solid var(--cq-gold);
  border-radius: 4px;
  width: 100%;
  padding: 0.95rem 1.25rem;
  font-family: var(--cq-serif);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cq-btn-dark-gold:hover { background: #1a1714; color: #fff; }
.cq-btn-dark-gold .cq-diamond { color: var(--cq-gold); }
.cq-btn-block { width: 100%; }
.cq-btn-sair {
  border: 1px solid var(--cq-line);
  border-radius: 6px;
  padding: .35rem .85rem;
  font-size: .85rem;
}
.cq-btn-gold {
  background: var(--cq-gold);
  color: #1f1b16;
  border-color: var(--cq-gold-dark);
  border-radius: 4px;
}
.cq-btn-outline {
  background: transparent;
  color: var(--cq-charcoal);
  border-color: var(--cq-gold);
  border-radius: 4px;
}

.cq-main { min-height: 60vh; }

/* —— Hero —— */
.cq-hero {
  padding: 3.25rem 0 2rem;
}
.cq-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.cq-hero-title {
  font-family: var(--cq-serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--cq-charcoal);
  margin: 0;
  font-size: clamp(2.25rem, 4.2vw, 3.35rem);
}
.cq-hero-lead {
  color: var(--cq-ink);
  font-size: 1.05rem;
  max-width: 34rem;
  margin: 0;
  line-height: 1.75;
}
.cq-hero-cta { margin-top: 1.75rem; }
.cq-hero-art { margin: 0; }
.cq-frame {
  position: relative;
  padding: 8px;
  background: var(--cq-ivory);
}
.cq-frame-gold {
  border: 1px solid var(--cq-gold);
  box-shadow:
    inset 0 0 0 5px var(--cq-cream),
    0 0 0 1px var(--cq-gold),
    0 18px 40px rgba(44,40,36,0.12);
}
.cq-frame-flourish::before,
.cq-frame-flourish::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--cq-gold);
  opacity: .7;
}
.cq-frame-flourish::before { top: 4px; left: 4px; border-right: 0; border-bottom: 0; }
.cq-frame-flourish::after { bottom: 4px; right: 4px; border-left: 0; border-top: 0; }
.cq-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: #111;
}

/* —— Feature cards —— */
.cq-section { padding: 2.5rem 0 3.5rem; }
.cq-features { padding-top: .5rem; }
.cq-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.cq-card-framed {
  position: relative;
  background: var(--cq-ivory);
  border: 1px solid var(--cq-gold);
  padding: 1.75rem 1.4rem 1.55rem;
  text-align: center;
  box-shadow: inset 0 0 0 4px var(--cq-cream);
}
.cq-card-framed::before,
.cq-card-framed::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--cq-gold);
  border-style: solid;
  opacity: .85;
}
.cq-card-framed::before { top: 5px; left: 5px; border-width: 1px 0 0 1px; }
.cq-card-framed::after { bottom: 5px; right: 5px; border-width: 0 1px 1px 0; }
.cq-card-icon { margin-bottom: .85rem; display: flex; justify-content: center; }
.cq-card-title {
  font-family: var(--cq-serif);
  font-size: 1.3rem;
  margin: 0 0 .65rem;
  font-weight: 600;
}
.cq-card p {
  margin: 0;
  color: var(--cq-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cq-h1, .cq-h2 {
  font-family: var(--cq-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--cq-charcoal);
  margin: 0 0 1rem;
}
.cq-h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.cq-h2 { font-size: clamp(1.55rem, 2.5vw, 2rem); }
.cq-lead { color: var(--cq-muted); font-size: 1.02rem; max-width: 40rem; }

/* —— Footer —— */
.cq-footer {
  padding: 1.5rem 0 2.25rem;
  margin-top: .5rem;
}
.cq-footer-rule { margin-bottom: 1.25rem; }
.cq-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.cq-footer-brand {
  margin: 0;
  font-family: var(--cq-serif);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.cq-footer-copy {
  margin: 0;
  font-size: 0.88rem;
  color: var(--cq-muted);
}
.cq-footer-links {
  margin: 0;
  text-align: center;
  font-family: var(--cq-serif);
  font-size: 0.95rem;
}
.cq-footer-links a { color: var(--cq-ink); text-decoration: none; }
.cq-footer-links a:hover { color: var(--cq-gold-dark); }
.cq-sep { color: var(--cq-muted); margin: 0 .4rem; }
.cq-footer-flourish { text-align: center; margin: 1rem 0 0; font-size: 1.2rem; color: var(--cq-gold); }

/* —— Cadastro —— */
.cq-header-cadastro { padding: 1.5rem 0 0.5rem; background: transparent; }
.cq-header-cadastro-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.cq-cadastro-motto {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--cq-serif);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--cq-gold-dark);
  padding-top: .35rem;
}
.cq-auth-mockup { padding-top: 1rem; }
.cq-auth-split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}
.cq-auth-left { text-align: center; }
.cq-auth-frame {
  position: relative;
  border: 1px solid var(--cq-gold);
  padding: 8px;
  box-shadow: inset 0 0 0 4px var(--cq-cream);
  background: var(--cq-ivory);
}
.cq-auth-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center top;
  background: #111;
}
.cq-auth-quote { margin-top: 1.25rem; }
.cq-quote-text {
  font-family: var(--cq-serif);
  font-style: italic;
  font-size: 1.2rem;
  margin: .5rem 0 .35rem;
  color: var(--cq-ink);
}
.cq-auth-quote cite {
  font-family: var(--cq-serif);
  font-style: normal;
  color: var(--cq-muted);
  font-size: 0.95rem;
}
.cq-auth-form-panel {
  position: relative;
  background: var(--cq-ivory);
  border: 1px solid var(--cq-gold);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: inset 0 0 0 5px var(--cq-cream);
}
.cq-auth-form-panel::before,
.cq-auth-form-panel::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--cq-gold);
}
.cq-auth-form-panel::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.cq-auth-form-panel::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.cq-auth-panel { margin: 0; padding: 0; border: 0; background: transparent; }
.cq-auth-panel + .cq-auth-panel {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cq-line);
}
.cq-auth-heading {
  font-family: var(--cq-serif);
  font-size: 2rem;
  text-align: center;
  margin: 0 0 .4rem;
  font-weight: 600;
}
.cq-auth-sub {
  text-align: center;
  color: var(--cq-muted);
  margin: 0 0 .75rem;
  font-family: var(--cq-serif-body);
  font-size: 0.98rem;
}
.cq-auth-diamond {
  text-align: center;
  color: var(--cq-gold);
  margin: 0 0 1.25rem;
  font-size: .8rem;
}

.cq-form-row { margin-bottom: 1rem; }
.cq-form-row label {
  display: block;
  font-family: var(--cq-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cq-ink);
  margin-bottom: .4rem;
}
.cq-form-row input {
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid var(--cq-gold);
  background: var(--cq-paper);
  color: var(--cq-charcoal);
  font-family: var(--cq-sans);
  font-size: 1rem;
  border-radius: 2px;
}
.cq-form-row input:focus {
  outline: 2px solid var(--cq-gold-soft);
  border-color: var(--cq-gold-dark);
}
.cq-form-note {
  font-size: 0.88rem;
  color: var(--cq-muted);
  margin: .85rem 0 0;
  text-align: center;
}
.cq-alert {
  font-family: var(--cq-sans);
  padding: .85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--cq-line);
  background: #fff;
}
.cq-alert-error { border-color: #b45a4a; color: #7a2e22; }
.cq-alert-success { border-color: var(--cq-gold); color: var(--cq-ink); }

/* —— Aulas —— */
.cq-header-aulas {
  border-bottom: 1px solid var(--cq-line);
  background: rgba(247,241,232,.95);
}
.cq-header-aulas-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
}
.cq-header-ornament { height: 1px; background: linear-gradient(90deg, transparent, var(--cq-gold), transparent); position: relative; }
.cq-header-ornament .cq-rule-diamond::before {
  content: "♦";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  color: var(--cq-gold);
  background: var(--cq-cream);
  padding: 0 .4rem;
  font-size: .7rem;
}
.cq-userbar { display: flex; align-items: center; gap: .75rem; }
.cq-userbar-name { font-family: var(--cq-serif); color: var(--cq-gold-dark); font-size: .95rem; }

.cq-aulas-mockup { padding-top: 1.5rem; }
.cq-aulas-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  border: 1px solid var(--cq-gold);
  padding: 1.5rem;
  background: var(--cq-ivory);
  box-shadow: inset 0 0 0 5px var(--cq-cream);
}
.cq-aulas-sidebar {
  border-right: 1px solid var(--cq-line);
  padding-right: 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.cq-side-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cq-side-nav a {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: var(--cq-ink);
  font-family: var(--cq-serif);
  font-size: 0.95rem;
  padding: .55rem .65rem;
  border-radius: 4px;
}
.cq-side-nav .is-active a,
.cq-side-nav a:hover {
  background: var(--cq-cream-dark);
  color: var(--cq-charcoal);
}
.cq-side-ico { color: var(--cq-gold); width: 1.1rem; text-align: center; font-size: .85rem; }
.cq-side-rule { margin: 1rem 0; }
.cq-side-tagline {
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--cq-muted);
  text-align: center;
}
.cq-side-tagline .cq-flourish { display: block; margin-bottom: .35rem; }

.cq-aulas-head { margin-bottom: 1.5rem; }
.cq-aulas-head .cq-h1 { display: flex; align-items: baseline; gap: .55rem; }
.cq-title-flourish { color: var(--cq-gold); font-size: .7em; }

.cq-module-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.cq-module-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--cq-paper);
  border: 1px solid var(--cq-gold);
  padding: .75rem .75rem .85rem;
  position: relative;
  box-shadow: inset 0 0 0 3px var(--cq-cream);
  transition: transform .15s, box-shadow .2s;
  min-height: 100%;
}
.cq-module-card::before,
.cq-module-card::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--cq-gold);
  opacity: .8;
}
.cq-module-card::before { top: 3px; left: 3px; border-right: 0; border-bottom: 0; }
.cq-module-card::after { bottom: 3px; right: 3px; border-left: 0; border-top: 0; }
.cq-module-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 3px var(--cq-cream), 0 10px 24px rgba(44,40,36,0.1);
}
.cq-module-thumb {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(145deg, #3a3228, #1a1612);
  margin-bottom: .65rem;
}
.cq-module-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cq-module-thumb-fallback {
  background:
    radial-gradient(circle at 50% 40%, rgba(197,160,89,.35), transparent 55%),
    linear-gradient(160deg, #2c2824, #4a3f32);
}
.cq-module-title {
  font-family: var(--cq-serif);
  font-size: 1.05rem;
  margin: 0 0 .35rem;
  font-weight: 600;
}
.cq-module-excerpt {
  margin: 0 0 .75rem;
  color: var(--cq-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  flex: 1;
}
.cq-module-progress {
  display: block;
  height: 3px;
  background: rgba(197,160,89,.2);
  margin-bottom: .55rem;
  border-radius: 2px;
  overflow: hidden;
}
.cq-module-progress-bar {
  display: block;
  height: 100%;
  background: var(--cq-gold);
}
.cq-module-cta {
  font-family: var(--cq-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cq-gold-dark);
}

.cq-breadcrumb a {
  font-family: var(--cq-sans);
  color: var(--cq-gold-dark);
  text-decoration: none;
}
.cq-prose p { margin: 0 0 1rem; }
.cq-prose h2, .cq-prose h3 {
  font-family: var(--cq-serif);
  margin: 1.6rem 0 .7rem;
}
.cq-aula-article {
  background: var(--cq-ivory);
  border: 1px solid var(--cq-line);
  padding: 2rem 1.75rem;
}

@media (max-width: 1100px) {
  .cq-module-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .cq-hero-grid,
  .cq-auth-split,
  .cq-cards,
  .cq-aulas-shell {
    grid-template-columns: 1fr;
  }
  .cq-header-inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .cq-header-inner .cq-nav,
  .cq-header-inner .cq-btn-entrar { justify-self: start; }
  .cq-module-grid { grid-template-columns: repeat(2, 1fr); }
  .cq-aulas-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--cq-line);
    padding-right: 0;
    padding-bottom: 1rem;
  }
  .cq-auth-left { order: -1; max-width: 420px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .cq-module-grid { grid-template-columns: 1fr; }
}
