:root {
  --ink: #080b10;
  --ink-soft: #10141b;
  --paper: #f1f0ea;
  --lime: #c8ff3d;
  --lime-dark: #486300;
  --coral: #ff5c4d;
  --muted: #a5a79f;
  --line: rgba(241,240,234,.17);
  --dark-line: rgba(8,11,16,.16);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--ink); color: var(--paper); font-family: Manrope, system-ui, sans-serif; line-height: 1.5; }
a { color: inherit; }
button, input { font: inherit; }
::selection { background: var(--lime); color: var(--ink); }

.quiz-topbar { height: 76px; padding: 0 clamp(20px,4vw,72px); position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; background: rgba(8,11,16,.96); border-bottom: 1px solid var(--line); color: var(--paper); }
.quiz-brand { display: flex; align-items: center; gap: 14px; color: var(--paper); text-decoration: none; font: 500 11px DM Mono,monospace; letter-spacing: .11em; }
.quiz-brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--lime); color: var(--ink); font-weight: 700; }
.quiz-topbar nav { display: flex; gap: 26px; font-size: 12px; color: var(--muted); }
.quiz-topbar nav a { text-decoration: none; }
.quiz-topbar nav a:hover { color: var(--lime); }
.back-home { border: 1px solid var(--line); padding: 9px 12px; color: var(--paper); text-decoration: none; font-size: 12px; }
.back-home:hover { border-color: var(--lime); color: var(--lime); }

.quiz-hero { min-height: 560px; margin: 0; padding: clamp(110px,12vw,160px) clamp(24px,7vw,110px) 80px; display: flex; align-items: flex-end; position: relative; overflow: hidden; background: var(--ink); color: var(--paper); text-align: left; }
.quiz-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px); background-size: 6.25vw 6.25vw; opacity: .32; }
.quiz-hero::after { content: "01"; position: absolute; right: clamp(24px,7vw,110px); bottom: 30px; color: rgba(241,240,234,.05); font-size: clamp(180px,30vw,430px); font-weight: 800; line-height: .7; letter-spacing: -.08em; }
.quiz-hero-content { width: min(100%,var(--max)); min-width: 0; margin: auto; position: relative; z-index: 1; }
.quiz-eyebrow { margin: 0 0 24px; color: var(--lime); font: 500 11px DM Mono,monospace; letter-spacing: .12em; text-transform: uppercase; }
.quiz-eyebrow::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); margin-right: 10px; box-shadow: 0 0 0 6px rgba(255,92,77,.13); }
.quiz-hero h1 { max-width: 1000px; margin: 0; color: var(--paper); font-size: clamp(58px,8vw,118px); line-height: .88; letter-spacing: -.06em; }
.quiz-hero h1 em { color: var(--lime); font-style: normal; }
.quiz-hero-bottom { margin-top: 42px; display: grid; grid-template-columns: minmax(260px,620px) auto; align-items: end; justify-content: space-between; gap: 40px; }
.quiz-hero-bottom p { margin: 0; color: #c1c3bd; font-size: clamp(16px,1.4vw,21px); line-height: 1.6; }
.quiz-stats { display: flex; gap: 36px; }
.quiz-stats div { display: flex; flex-direction: column; gap: 5px; }
.quiz-stats strong { color: var(--lime); font-size: 28px; }
.quiz-stats span { color: var(--muted); font: 9px DM Mono,monospace; text-transform: uppercase; }

#simulados-list.quiz-selection { max-width: none; margin: 0; padding: clamp(90px,10vw,140px) clamp(24px,7vw,110px); background: var(--paper); color: var(--ink); border-radius: 0; box-shadow: none; }
.selection-inner { width: min(100%,var(--max)); min-width: 0; margin: auto; }
.selection-heading { display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: 70px; margin-bottom: 64px; }
.selection-heading .tag { color: var(--lime-dark); font: 500 11px DM Mono,monospace; letter-spacing: .12em; text-transform: uppercase; }
.selection-heading h2 { margin: 18px 0 0; font-size: clamp(44px,6vw,84px); line-height: .98; letter-spacing: -.055em; }
.selection-heading h2 em { color: var(--lime-dark); font-style: normal; }
.selection-heading > p { margin: 0; max-width: 520px; color: #5c5f58; font-size: 17px; line-height: 1.65; }
.quiz-grid { display: grid; grid-template-columns: repeat(3,1fr); list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--dark-line); border-left: 1px solid var(--dark-line); }
.quiz-grid li { margin: 0; min-width: 0; }
.quiz-grid li a { min-height: 250px; padding: 26px; display: flex; flex-direction: column; position: relative; border: 0; border-radius: 0; border-right: 1px solid var(--dark-line); border-bottom: 1px solid var(--dark-line); background: transparent; color: var(--ink); text-decoration: none; transition: background .2s ease,color .2s ease; }
.quiz-grid li a:hover { background: var(--ink); color: var(--paper); }
.quiz-card-meta { display: flex; justify-content: space-between; color: #6d7068; font: 10px DM Mono,monospace; text-transform: uppercase; }
.quiz-grid h3 { max-width: 92%; margin: auto 0 15px; font-size: clamp(22px,2.3vw,33px); line-height: 1.08; letter-spacing: -.04em; }
.quiz-grid p { margin: 0; color: #70736b; font-size: 13px; line-height: 1.5; }
.quiz-grid li a:hover p { color: var(--muted); }
.quiz-arrow { position: absolute; right: 24px; bottom: 22px; color: var(--lime-dark); font-size: 20px; }
.quiz-grid li a:hover .quiz-arrow { color: var(--lime); }
.quiz-grid .certification a { background: #e6e4dd; }
.quiz-grid .certification a:hover { background: var(--lime); color: var(--ink); }
.quiz-grid .certification a:hover p,.quiz-grid .certification a:hover .quiz-card-meta { color: #405300; }
.quiz-grid .certification a:hover .quiz-arrow { color: var(--ink); }

#simulado-container.quiz-workspace { max-width: none; margin: 0; padding: 100px clamp(20px,7vw,110px); background: var(--paper); color: var(--ink); border-radius: 0; box-shadow: none; }
.workspace-inner { width: min(100%,1050px); margin: auto; }
.workspace-top { padding-bottom: 34px; border-bottom: 1px solid var(--dark-line); }
.workspace-top .tag { color: var(--lime-dark); font: 500 10px DM Mono,monospace; letter-spacing: .11em; text-transform: uppercase; }
#simulado-title { margin: 14px 0 0; color: var(--ink); font-size: clamp(38px,5vw,68px); letter-spacing: -.05em; }
#quiz-form { counter-reset: question; margin-top: 42px; }
.question-block { counter-increment: question; margin: 0; padding: 32px 0; border: 0; border-bottom: 1px solid var(--dark-line); border-radius: 0; background: transparent; }
.question-block p { margin: 0 0 24px; padding-left: 52px; position: relative; color: var(--ink); font-size: clamp(17px,1.7vw,22px); line-height: 1.45; }
.question-block p::before { content: counter(question,decimal-leading-zero); position: absolute; left: 0; top: 2px; color: var(--lime-dark); font: 500 11px DM Mono,monospace; }
.question-block label { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; margin: 8px 0 8px 52px; padding: 14px 16px; border: 1px solid var(--dark-line); cursor: pointer; transition: background .15s ease,border-color .15s ease; }
.question-block label:hover { border-color: var(--lime-dark); background: #e6e9d8; }
.question-block input[type="radio"] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--lime-dark); }
.question-block label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
#submit-quiz { width: 100%; min-height: 58px; margin: 38px 0 0; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--paper); font-weight: 800; cursor: pointer; }
#submit-quiz:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }

#popup-overlay { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(8,11,16,.78); }
#popup { display: none; width: min(calc(100% - 40px),560px); max-width: 560px; padding: 42px; position: fixed; left: 50%; top: 50%; z-index: 1000; transform: translate(-50%,-50%); border: 1px solid var(--line); border-radius: 0; background: var(--ink); color: var(--paper); text-align: left; box-shadow: none; }
#popup::before { content: "RESULTADO"; color: var(--lime); font: 500 10px DM Mono,monospace; letter-spacing: .12em; }
#popup h3 { margin: 20px 0 12px; color: var(--paper); font-size: clamp(26px,4vw,42px); line-height: 1.05; letter-spacing: -.04em; }
#popup p { color: var(--muted); font-size: 16px; line-height: 1.6; }
#popup button { width: 100%; min-height: 48px; margin-top: 18px; border: 0; border-radius: 0; background: var(--lime); color: var(--ink); font-weight: 800; cursor: pointer; }
#popup button:hover { background: var(--paper); }

.quiz-footer { min-height: 110px; padding: 28px clamp(24px,4vw,72px); display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font: 10px DM Mono,monospace; }
.quiz-footer p { margin: 0; }
.quiz-footer a { color: var(--paper); text-decoration: none; }
.quiz-footer a:hover { color: var(--lime); }

@media(max-width:900px) {
  .quiz-topbar nav { display: none; }
  .quiz-hero-bottom,.selection-heading { grid-template-columns: 1fr; gap: 30px; }
  .quiz-grid { grid-template-columns: repeat(2,1fr); }
}

@media(max-width:620px) {
  .quiz-topbar { height: 66px; }
  .quiz-brand > span:last-child { display: none; }
  .quiz-hero { min-height: 570px; padding: 110px 20px 70px; }
  .quiz-hero::after { font-size: 220px; right: 8px; }
  .quiz-hero h1 { max-width: 100%; font-size: clamp(44px,12.5vw,52px); letter-spacing: -.045em; }
  .quiz-hero-bottom,.selection-heading { min-width: 0; }
  .quiz-hero-bottom p,.selection-heading > p { max-width: 100%; overflow-wrap: break-word; }
  .quiz-stats { gap: 22px; }
  .quiz-stats strong { font-size: 22px; }
  #simulados-list.quiz-selection { padding: 80px 20px; }
  .selection-heading h2 { max-width: 100%; font-size: 38px; letter-spacing: -.045em; }
  .quiz-grid { grid-template-columns: 1fr; }
  .quiz-grid li a { min-height: 220px; }
  #simulado-container.quiz-workspace { padding: 80px 20px; }
  .question-block p { padding-left: 36px; }
  .question-block label { margin-left: 0; }
  #popup { padding: 30px 24px; }
  .quiz-footer { align-items: flex-start; flex-direction: column; }
}

@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
