:root {
  --teal-900: #004d47;
  --teal-800: #006f66;
  --teal-700: #00877b;
  --teal-600: #009d8e;
  --teal-100: #d9f1ed;
  --teal-050: #eef9f7;
  --gold-700: #806d45;
  --gold-600: #a08b5e;
  --gold-300: #d8c89f;
  --ink: #172525;
  --muted: #5d6c6b;
  --line: #dce5e3;
  --paper: #fffefa;
  --surface: #ffffff;
  --success: #147a52;
  --success-soft: #e8f7ef;
  --danger: #a33a31;
  --danger-soft: #fff0ed;
  --warning: #996714;
  --shadow: 0 18px 55px rgba(20, 65, 60, .09);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
main { flex: 1; }
a { color: inherit; }
button, input { font: inherit; }
img { max-width: 100%; }
.shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(0, 111, 102, .12); background: rgba(255, 254, 250, .92); backdrop-filter: blur(16px); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px 12px 12px 4px; background: var(--teal-600); color: #fff; font-size: 23px; font-weight: 800; box-shadow: inset -4px -4px 0 rgba(0,0,0,.08); }
.brand strong, .brand small { display: block; }
.brand strong { line-height: 1.05; letter-spacing: -.025em; }
.brand small { margin-top: 3px; color: var(--gold-700); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: 24px; }
nav a, .nav-button { border: 0; background: transparent; color: var(--teal-900); font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.inline-form { display: inline; margin: 0; }

.eyebrow { display: block; margin-bottom: 10px; color: var(--teal-700); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(36px, 6vw, 68px); }
h2 { font-size: clamp(25px, 3vw, 36px); }
p { color: var(--muted); }

.hero { position: relative; overflow: hidden; padding: 90px 0 100px; background: radial-gradient(circle at 88% 8%, rgba(160,139,94,.18), transparent 29%), linear-gradient(135deg, #fffefa 0%, #f4faf8 100%); }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -230px; bottom: -320px; border: 1px solid rgba(0,157,142,.22); border-radius: 50%; box-shadow: 0 0 0 60px rgba(0,157,142,.035), 0 0 0 130px rgba(0,157,142,.025); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(40px, 8vw, 110px); }
.hero-copy h1 { max-width: 780px; margin-bottom: 24px; }
.hero-copy h1 em { color: var(--teal-600); font-style: normal; }
.hero-copy > p { max-width: 680px; margin-bottom: 32px; font-size: 18px; }
.button-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.invite-note { max-width: 250px; color: var(--muted); font-size: 12px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--teal-700); color: #fff; box-shadow: 0 10px 24px rgba(0,111,102,.18); }
.button.primary:hover { background: var(--teal-800); }
.button.secondary { border-color: var(--line); background: #fff; color: var(--teal-900); }
.button.full { width: 100%; }
.text-link { display: inline-block; margin-left: 16px; color: var(--teal-800); font-size: 13px; font-weight: 700; }
.hero-card { position: relative; padding: 30px; border: 1px solid rgba(160,139,94,.25); border-radius: 28px 28px 28px 8px; background: rgba(255,255,255,.84); box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1; border: 1px solid var(--gold-300); border-radius: inherit; }
.card-topline { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.live-dot { color: var(--teal-700); }
.live-dot::before { content: ""; width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--teal-600); }
.clinical-icon { width: 82px; height: 82px; display: grid; place-items: center; margin: 42px 0 28px; border-radius: 50%; background: var(--teal-050); color: var(--gold-600); font-size: 38px; }
.hero-card h2 { margin-bottom: 12px; }
.pilot-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.pilot-summary strong { color: var(--ink); font-size: 14px; }
.pilot-summary span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.feature-band { padding: 44px 0; background: var(--teal-900); color: #fff; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px; }
.feature-grid article { position: relative; padding-left: 50px; }
.feature-grid article > span { position: absolute; left: 0; top: 2px; color: var(--gold-300); font-weight: 800; }
.feature-grid h3 { margin-bottom: 7px; font-size: 19px; }
.feature-grid p { margin: 0; color: rgba(255,255,255,.7); font-size: 13px; }

.site-footer { padding: 32px 0; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-inner strong, .footer-inner span { display: block; }
.footer-inner span { color: var(--muted); font-size: 12px; }
.powered-by { text-align: center; }
.powered-by > span { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.powered-by > strong { font-size: 13px; }
.social-links { display: flex; justify-content: center; gap: 12px; margin-top: 3px; }
.social-links a { color: var(--teal-800); font-size: 10px; font-weight: 700; text-decoration: none; }
.social-links a:hover { text-decoration: underline; }
.faculty-signature img { width: 210px; max-height: 70px; }

.page-head { padding: 62px 0 44px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #f1faf8, #fffefa 70%); }
.page-head h1 { margin-bottom: 10px; font-size: clamp(34px, 5vw, 54px); }
.page-head p { max-width: 720px; margin-bottom: 0; }
.content-section { min-height: 45vh; padding: 48px 0 76px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 24px; }
.topic-card, .panel, .question-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.topic-card { padding: 28px; }
.topic-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 28px; color: var(--gold-700); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.topic-card h2 { margin-bottom: 12px; }
.progress-line { height: 7px; overflow: hidden; margin: 28px 0 14px; border-radius: 999px; background: #e7efed; }
.progress-line span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--teal-600), #23bcae); }
.topic-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.topic-stats span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.topic-stats strong { display: block; color: var(--ink); font-size: 16px; }
.panel { padding: 28px; }
.panel.centered { text-align: center; }
.panel.compact { padding: 24px; }
.narrow-page { min-height: calc(100vh - 180px); display: grid; place-items: center; padding: 54px 0; background: radial-gradient(circle at 20% 20%, var(--teal-100), transparent 30%); }
.narrow-shell { width: min(540px, calc(100% - 32px)); }
.form-panel h1 { margin-bottom: 12px; font-size: 38px; }
.lede { margin-bottom: 28px; font-size: 14px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #cbd8d5; border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus { outline: 3px solid rgba(0,157,142,.15); border-color: var(--teal-600); }
.field input[type="checkbox"] { margin-right: 8px; accent-color: var(--teal-700); }
.field small, .field-error { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.field-error { color: var(--danger); }
.has-error input { border-color: var(--danger) !important; }
.form-error { margin-bottom: 18px; padding: 12px 14px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.form-foot { margin: 20px 0 0; text-align: center; font-size: 12px; }
.form-foot a { color: var(--teal-700); font-weight: 700; }
.status-icon { width: 42px; height: 42px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: currentColor; color: #fff; font-size: 24px; font-weight: 800; }
.status-icon.warning { margin-bottom: 15px; background: var(--warning); }
.messages { position: fixed; top: 88px; left: 50%; z-index: 30; transform: translateX(-50%); }
.message { width: fit-content; margin-left: auto; padding: 11px 16px; border-radius: 10px; background: var(--teal-900); color: #fff; box-shadow: var(--shadow); font-size: 13px; }

.back-link { display: inline-block; margin-bottom: 22px; color: var(--teal-800); font-size: 13px; font-weight: 700; text-decoration: none; }
.head-split { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.score-orbit { width: 142px; height: 142px; display: grid; flex: 0 0 auto; place-content: center; border: 9px solid var(--teal-100); border-top-color: var(--teal-600); border-radius: 50%; text-align: center; }
.score-orbit strong { display: block; font-size: 30px; line-height: 1; }
.score-orbit span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-title h2 { margin: 0; }
.section-spaced { margin-top: 54px; }
.question-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.question-list li + li { border-top: 1px solid var(--line); }
.question-list a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 20px; text-decoration: none; }
.question-list a:hover { background: var(--teal-050); }
.question-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: #edf3f2; color: var(--teal-900); font-size: 12px; font-weight: 800; }
.question-list strong, .question-list small { display: block; }
.question-list strong { margin-bottom: 4px; font-size: 14px; }
.question-list small { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.question-state { color: var(--muted); font-size: 11px; font-weight: 700; }
.question-list .correct .question-number { background: var(--success-soft); color: var(--success); }
.question-list .wrong .question-number { background: var(--danger-soft); color: var(--danger); }
.question-list .correct .question-state { color: var(--success); }
.question-list .wrong .question-state { color: var(--danger); }
.empty-row { padding: 22px; color: var(--muted); }
.side-stack { display: grid; align-content: start; gap: 16px; }
.big-stat { margin: 18px 0 0; color: var(--teal-800); font-size: 52px; font-weight: 800; line-height: 1; }
.big-stat small { margin-left: 5px; color: var(--muted); font-size: 15px; }
.metric-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 17px; border-top: 1px solid var(--line); }
.metric-pair span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.metric-pair strong { display: block; color: var(--ink); font-size: 17px; }
.ranking-callout { display: flex; align-items: center; gap: 13px; padding: 18px 20px; text-decoration: none; }
.ranking-callout > span:nth-child(2) { flex: 1; }
.ranking-callout strong, .ranking-callout small { display: block; }
.ranking-callout small { color: var(--muted); font-size: 10px; }
.trophy { color: var(--gold-600); font-size: 24px; }

.question-page { min-height: calc(100vh - 180px); padding: 34px 0 70px; background: #f4f8f7; }
.question-shell { width: min(900px, calc(100% - 32px)); }
.question-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.question-toolbar .back-link { margin: 0; }
.question-panel { padding: clamp(24px, 5vw, 48px); }
.question-panel > header { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.question-panel h1 { margin-bottom: 0; font-size: clamp(25px, 4vw, 36px); }
.source-chip { min-width: 44px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--teal-050); color: var(--teal-800); font-size: 11px; font-weight: 800; }
.prompt { padding: 30px 0 24px; font-size: 16px; line-height: 1.8; }
.prompt p { color: var(--ink); }
.answer-form fieldset { margin: 0; padding: 0; border: 0; }
.answer-form legend { margin-bottom: 14px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.answer-form ul { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.answer-form label { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 12px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border .15s ease, background .15s ease; }
.answer-form label:hover { border-color: var(--teal-600); background: var(--teal-050); }
.answer-form input { margin-top: 4px; accent-color: var(--teal-700); }
.question-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 26px; }
.question-actions > span { margin-right: auto; color: var(--muted); font-size: 11px; }
.result-box { margin-top: 28px; padding: 24px; border: 1px solid; border-radius: 16px; }
.result-box.success { border-color: #b7dfcc; background: var(--success-soft); }
.result-box.error { border-color: #edc6bf; background: var(--danger-soft); }
.result-title { display: flex; align-items: center; gap: 14px; }
.result-box.success .status-icon { background: var(--success); }
.result-box.error .status-icon { background: var(--danger); }
.result-title span:not(.status-icon) { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.result-title h2 { margin: 2px 0 0; font-size: 24px; }
.answer-line { margin: 20px 0 0; padding: 13px 15px; border-radius: 10px; background: rgba(255,255,255,.65); color: var(--ink); font-size: 13px; }
.correct-answer { border-left: 4px solid var(--success); }
.explanation { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(23,37,37,.12); }
.explanation p { color: var(--ink); }
.reference { margin-top: 18px; font-size: 12px; }
.reference p { margin: 3px 0 0; }
.result-box > small { display: block; margin-top: 18px; color: var(--muted); }

.narrow-table { width: min(900px, calc(100% - 32px)); }
.table-panel { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); font-size: 10px; }
.is-me { background: var(--teal-050); }
.rank-position { color: var(--gold-700); font-weight: 800; }
.teacher-head { background: linear-gradient(120deg, #f8f2e7, #fffefa 65%); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 52px; }
.kpi-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.kpi-grid span, .kpi-grid strong { display: block; }
.kpi-grid span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.kpi-grid strong { margin-top: 5px; color: var(--teal-800); font-size: 30px; }
.validity { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #edf1f0; font-size: 10px; font-weight: 700; white-space: nowrap; }
.validity.adequado { background: var(--success-soft); color: var(--success); }
.validity.incompativel, .validity.com-inadequacoes { background: var(--danger-soft); color: var(--danger); }
.method-note { margin-top: 16px; font-size: 11px; }

@media (max-width: 820px) {
  .hero { padding: 64px 0 74px; }
  .hero-grid, .two-column { grid-template-columns: 1fr; }
  .hero-card { max-width: 560px; }
  .feature-grid { grid-template-columns: 1fr; gap: 24px; }
  .side-stack { grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .head-split { align-items: flex-end; }
}

@media (min-width: 821px) {
  .landing-page .header-inner { min-height: 64px; }
  .landing-page main { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .landing-page .hero { display: flex; align-items: center; padding: clamp(34px, 5vh, 62px) 0; }
  .landing-page .hero-copy h1 { margin-bottom: 16px; font-size: clamp(44px, 5.2vw, 64px); }
  .landing-page .hero-copy > p { margin-bottom: 24px; font-size: 16px; }
  .landing-page .hero-card { padding: 24px; }
  .landing-page .clinical-icon { width: 64px; height: 64px; margin: 22px 0 18px; font-size: 30px; }
  .landing-page .hero-card h2 { font-size: 30px; }
  .landing-page .pilot-summary { margin-top: 18px; padding-top: 14px; }
  .landing-page .feature-band { padding: 24px 0; }
  .landing-page .site-footer { padding: 14px 0; }
  .landing-page .faculty-signature img { width: 175px; max-height: 54px; }
}

@media (max-width: 580px) {
  .shell { width: min(100% - 28px, 1160px); }
  .site-header nav a:not(:last-child) { display: none; }
  .brand strong { font-size: 14px; }
  .faculty-signature img { width: 145px; }
  .footer-inner { align-items: flex-start; flex-wrap: wrap; }
  .powered-by { order: 3; width: 100%; padding-top: 10px; border-top: 1px solid var(--line); text-align: left; }
  .social-links { justify-content: flex-start; }
  .pilot-summary { align-items: flex-start; flex-direction: column; gap: 2px; }
  .topic-stats { grid-template-columns: 1fr 1fr 1fr; }
  .head-split { display: block; }
  .score-orbit { width: auto; height: auto; display: flex; align-items: baseline; gap: 8px; margin-top: 24px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .score-orbit strong { font-size: 24px; }
  .side-stack { grid-template-columns: 1fr; }
  .section-title { align-items: stretch; flex-direction: column; }
  .section-title .button { width: 100%; }
  .question-list a { grid-template-columns: 42px minmax(0, 1fr); }
  .question-state { grid-column: 2; }
  .question-actions { align-items: stretch; flex-direction: column; }
  .question-actions > span { margin-right: 0; text-align: center; }
  .question-actions .button { width: 100%; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-grid article { padding: 15px; }
  .topic-card .text-link { display: block; margin: 14px 0 0; }
}
