/* Caderno digital: azul de tinta, superfícies claras e referências ao cartão-resposta. */
:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-alt: #f9faff;
  --ink: #182746;
  --muted: #5f6c83;
  --line: #e4e9f2;
  --accent: #3859d6;
  --accent-hover: #2947bc;
  --accent-ink: #fff;
  --accent-soft: #edf1ff;
  --teal: #237c70;
  --teal-soft: #eaf6f2;
  --lilac: #7760a8;
  --lilac-soft: #f2eef9;
  --ochre: #936218;
  --ochre-soft: #fbf4e6;
  --good: #1b7860;
  --good-soft: #ebf7f0;
  --bad: #b13f43;
  --bad-soft: #fdf0f0;
  --shadow: 0 4px 24px #1a2d5505;
  --f-display: "Manrope", "Segoe UI", sans-serif;
  --f-ui: "DM Sans", "Segoe UI", sans-serif;
  --f-reading: "Source Serif 4", Georgia, serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101724;
  --surface: #182130;
  --surface-alt: #1c2739;
  --ink: #e6edf9;
  --muted: #a3afc4;
  --line: #2c384d;
  --accent: #a2b5ff;
  --accent-hover: #bfccff;
  --accent-ink: #17254d;
  --accent-soft: #253355;
  --teal: #83cbb9;
  --teal-soft: #1b3634;
  --lilac: #c4b0e9;
  --lilac-soft: #302a43;
  --ochre: #e3be77;
  --ochre-soft: #373023;
  --good: #88d5b2;
  --good-soft: #1b3530;
  --bad: #f1a2a5;
  --bad-soft: #3a282e;
  --shadow: none;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 28px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button,
select,
input {
  font: inherit;
}
button,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke-width: 1.7;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--f-display);
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 100;
  background: var(--ink);
  color: var(--surface);
  border-radius: 8px;
  padding: 12px 20px;
}
.skip-link:focus {
  top: 16px;
}
/* Navegação persistente, com uso semanal separado do conteúdo de estudo. */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  padding: 35px 20px 24px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.05;
  text-align: left;
  letter-spacing: -0.6px;
}
.brand-enem {
  display: block;
  font-size: 23px;
  letter-spacing: -0.8px;
  font-weight: 800;
  margin-top: 3px;
}
.brand-period {
  color: var(--accent);
}
.brand-mark {
  width: 40px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  padding: 11px;
  transform: rotate(-5deg);
}
.brand-mark i {
  height: 3px;
  border-radius: 3px;
  width: 19px;
  background: var(--accent-ink);
}
.brand-mark i:nth-child(2) {
  width: 13px;
}
.brand-mark i:nth-child(3) {
  width: 16px;
}
.sidebar-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.6px;
  margin: 49px 10px 13px;
}
.primary-nav {
  display: grid;
  gap: 6px;
}
.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 9px;
  min-height: 46px;
  padding: 11px 14px;
  background: none;
  color: var(--muted);
  text-align: left;
  font-weight: 500;
}
.nav-item:hover {
  background: var(--bg);
  color: var(--ink);
}
.nav-item[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}
.nav-item[aria-current="page"]::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
}
.plan-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.plan-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}
.plan-label svg {
  color: var(--accent);
  width: 16px;
  height: 16px;
}
.plan-meter {
  display: flex;
  gap: 5px;
  margin: 13px 0 9px;
}
.plan-meter i {
  background: var(--accent-soft);
  height: 5px;
  border-radius: 3px;
  flex: 1;
}
.plan-meter i.available {
  background: var(--accent);
}
.plan-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.plan-card p b {
  color: var(--ink);
  font-weight: 600;
}
.sidebar-source {
  margin: 23px 5px 0;
  color: var(--muted);
  font-size: 10px;
}
.sidebar-source > span:last-child {
  display: block;
  font-size: 10px;
  margin: 4px 0 0 12px;
}
.source-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 5px;
  vertical-align: 2px;
}
.workspace {
  margin-left: 224px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  min-height: 80px;
  padding: 0 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.breadcrumb svg {
  width: 13px;
  height: 13px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.local-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.local-badge > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}
.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.icon-button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.icon-button svg {
  width: 17px;
  height: 17px;
}
.main {
  width: 100%;
  max-width: 1240px;
  padding: 40px 44px 44px;
  margin: 0 auto;
  flex: 1;
  outline: 0;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 11px;
}
h1 {
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 750;
  letter-spacing: -1.35px;
  line-height: 1.24;
  text-wrap: balance;
}
.lead {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 10px;
  max-width: 66ch;
}
.edition-note {
  border-left: 1px solid var(--line);
  padding-left: 22px;
  flex: none;
  align-self: center;
}
.edition-note strong {
  display: block;
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.7px;
}
.edition-note span {
  font-size: 11px;
  color: var(--muted);
}
.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 274px;
  gap: 22px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
/* Montagem do treino: foco primeiro, ajustes opcionais por último. */
.builder {
  overflow: hidden;
}
.panel-heading {
  padding: 24px 26px 0;
}
.panel-heading h2 {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.4px;
}
.panel-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin: 22px 26px 0;
}
.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 41px;
  padding: 8px 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.mode-tab svg {
  width: 16px;
  height: 16px;
}
.mode-tab[aria-pressed="true"] {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 2px 4px #18274605;
  font-weight: 700;
}
.builder-body {
  padding: 23px 26px 0;
}
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.field-label .optional {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.area-card {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 12px;
  text-align: left;
}
.area-card:hover {
  border-color: var(--accent);
}
.area-card[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.area-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.area-icon svg {
  width: 19px;
  height: 19px;
}
.area-icon.CN {
  background: var(--teal-soft);
  color: var(--teal);
}
.area-icon.CH {
  background: var(--ochre-soft);
  color: var(--ochre);
}
.area-icon.LC {
  background: var(--lilac-soft);
  color: var(--lilac);
}
.area-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  padding-right: 12px;
}
.area-name small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
}
.area-check {
  position: absolute;
  top: 9px;
  right: 9px;
  color: var(--accent);
  width: 12px;
  height: 12px;
}
.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 14px;
  margin-top: 22px;
}
.field {
  display: block;
  min-width: 0;
}
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  padding: 10px 30px 10px 12px;
  font-size: 13px;
  text-overflow: ellipsis;
}
.field-hint {
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.quantity-field {
  margin-top: 24px;
}
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.seg button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 16px;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.seg button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.seg button:hover {
  border-color: var(--accent);
}
.seg .qty-unit {
  font-weight: 400;
  margin-left: 3px;
}
.advanced {
  margin: 24px -26px 0;
  border-top: 1px solid var(--line);
}
.advanced > summary {
  padding: 17px 26px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
summary::-webkit-details-marker {
  display: none;
}
.advanced > summary > svg:first-child {
  width: 16px;
  height: 16px;
}
.advanced > summary > svg:last-child {
  margin-left: auto;
  width: 14px;
  height: 14px;
}
.advanced[open] > summary > svg:last-child {
  transform: rotate(180deg);
}
.advanced-content {
  padding: 3px 26px 23px;
}
.advanced-content .seg {
  margin-bottom: 20px;
}
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 12px;
}
.check > span {
  display: block;
}
.check small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.check input {
  appearance: none;
  width: 34px;
  height: 20px;
  flex: none;
  background: var(--line);
  border: 1px solid var(--muted);
  border-radius: 20px;
  position: relative;
  margin: 0;
  cursor: pointer;
}
.check input::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  position: absolute;
  left: 2px;
  top: 2px;
}
.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check input:checked::before {
  left: 16px;
  background: var(--accent-ink);
}
.summary-column {
  position: sticky;
  top: 24px;
}
.session-summary {
  padding: 23px;
}
.summary-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.summary-eyebrow svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}
.session-summary h2 {
  font-size: 21px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.7px;
}
.summary-topic {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}
.summary-list {
  margin: 23px 0 20px;
  display: grid;
  gap: 14px;
}
.summary-list > div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.summary-list dt {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}
.summary-list svg {
  width: 16px;
  height: 16px;
}
.summary-list dd {
  margin: 0 0 0 auto;
  font-weight: 600;
}
.summary-rule {
  height: 1px;
  background: var(--line);
  margin-bottom: 20px;
}
.answer-preview {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0 0 18px;
}
.answer-preview i {
  height: 6px;
  border-radius: 3px;
  flex: 1;
  background: var(--accent-soft);
}
.answer-preview i:first-child {
  background: var(--accent);
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 12px 18px;
  min-height: 45px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:disabled {
  opacity: 0.45;
}
.btn.ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn.text {
  padding-inline: 0;
  min-height: 36px;
  color: var(--accent);
  background: transparent;
}
.btn.danger {
  color: var(--bad);
  border-color: var(--bad);
  background: var(--surface);
}
.btn.full {
  width: 100%;
}
.summary-note {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  line-height: 1.7;
  margin-top: 10px;
}
.summary-note strong {
  font-weight: 500;
  color: var(--ink);
}
.study-tip {
  padding: 20px 13px 4px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.study-tip > svg {
  width: 16px;
  height: 16px;
  color: var(--ochre);
  margin-top: 2px;
}
.study-tip h3 {
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 5px;
}
.study-tip p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.inline-alert {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.inline-alert .btn {
  width: 100%;
  margin-top: 9px;
  font-size: 11px;
  padding: 8px;
}
.inline-alert strong {
  color: var(--ink);
  font-weight: 600;
}
.activity {
  margin-top: 29px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.section-heading h2 {
  font-size: 14px;
  letter-spacing: -0.25px;
  font-weight: 750;
}
.text-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 11px;
  color: var(--accent);
}
.text-link svg {
  width: 13px;
  height: 13px;
}
.empty-activity {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 20px 23px;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  flex: none;
}
.empty-activity h3 {
  font-size: 12px;
  font-weight: 650;
}
.empty-activity p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.empty-activity > svg {
  color: var(--muted);
  margin-left: auto;
}
.source-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 16px;
  color: var(--muted);
  font-size: 10px;
  margin-top: 22px;
}
.source-note span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.source-note svg {
  width: 12px;
  height: 12px;
}
.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
  padding: 0 44px 23px;
  font-size: 10px;
  color: var(--muted);
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}
.resume-banner {
  padding: 17px 20px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.resume-banner > svg {
  color: var(--accent);
}
.resume-banner div {
  flex: 1;
  min-width: 0;
}
.resume-banner strong {
  display: block;
  font-size: 12px;
}
.resume-banner p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.resume-banner .btn {
  flex: none;
}
/* O enunciado e as respostas formam uma coluna de leitura. */
.practice-main {
  max-width: 1160px;
}
.practice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.practice-top h1 {
  font-size: 22px;
  letter-spacing: -0.65px;
}
.practice-top p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 22px;
  align-items: start;
}
.question-header {
  padding: 21px 28px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.question-index {
  font-size: 11px;
  color: var(--muted);
}
.question-index strong {
  color: var(--ink);
  font-size: 12px;
}
.question-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 5px;
  max-width: 60%;
  text-align: right;
}
.question-body {
  padding: 26px 28px 28px;
}
.question-source {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.difficulty-filter {
  margin-top: 20px;
}
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-weight: 600;
  font-size: 10px;
}
.difficulty-caption {
  color: var(--muted);
  font-weight: 400;
  white-space: pre;
}
.md {
  font-family: var(--f-reading);
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.md p {
  margin: 0 0 15px;
}
.md p:last-child {
  margin-bottom: 0;
}
.md .fonte {
  font-family: var(--f-ui);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  margin-top: 13px;
}
.md img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 700px;
  object-fit: contain;
  object-position: left;
  background: #fff;
  border-radius: 5px;
  margin: 16px 0;
}
.md ul {
  padding-left: 22px;
  margin: 15px 0;
}
.md li {
  margin-bottom: 6px;
}
.comando {
  font-weight: 600;
  margin-top: 20px;
}
.answer-heading {
  font-family: var(--f-ui);
  font-size: 11px;
  color: var(--muted);
  margin: 26px 0 10px;
}
.opts {
  display: grid;
  gap: 9px;
}
.opt {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) 16px;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 13px 14px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.opt .md {
  font-size: 15px;
  line-height: 1.65;
}
.opt .md p {
  margin-bottom: 6px;
}
.opt .md p:last-child {
  margin-bottom: 0;
}
.opt .md img {
  max-height: 250px;
  margin: 0;
}
.bub {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 600;
}
.opt-state {
  align-self: center;
  color: var(--accent);
}
.opt-state svg {
  width: 16px;
  height: 16px;
}
.opt:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface-alt);
}
.opt[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.opt[aria-checked="true"] .bub {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.opt.right {
  border-color: var(--good);
  background: var(--good-soft);
}
.opt.right .bub {
  color: var(--good);
  border-color: var(--good);
}
.opt.right[aria-checked="true"] .bub {
  color: var(--surface);
  background: var(--good);
}
.opt.wrong {
  border-color: var(--bad);
  background: var(--bad-soft);
}
.opt.wrong .bub {
  background: var(--bad);
  color: var(--surface);
  border-color: var(--bad);
}
.opt.right .opt-state {
  color: var(--good);
}
.opt.wrong .opt-state {
  color: var(--bad);
}
.opt:disabled {
  cursor: default;
}
.na-imagem {
  color: var(--muted);
  font-family: var(--f-ui);
  font-size: 12px;
}
.answer-feedback {
  margin-top: 23px;
}
.verdict {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.verdict.ok {
  background: var(--good-soft);
  color: var(--good);
}
.verdict.no {
  background: var(--bad-soft);
  color: var(--bad);
}
.verdict.blank {
  background: var(--bg);
  color: var(--muted);
}
.verdict svg {
  width: 17px;
  height: 17px;
}
.res {
  border-top: 1px solid var(--line);
  margin-top: 23px;
  padding-top: 20px;
}
.res h3 {
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.res h3 svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.res .dif {
  margin-left: auto;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.res .md {
  font-size: 16px;
}
.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.question-nav .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.answer-sheet {
  padding: 20px;
  position: sticky;
  top: 24px;
}
.answer-sheet h2 {
  font-size: 12px;
  font-weight: 700;
}
.sheet-subtitle {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.dots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}
.dot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  height: 44px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.dot.current {
  border-color: var(--accent);
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  font-weight: 700;
}
.dot.answered {
  background: var(--accent-soft);
  color: var(--accent);
}
.dot.ok {
  background: var(--good-soft);
  border-color: var(--good);
  color: var(--good);
}
.dot.no {
  background: var(--bad-soft);
  border-color: var(--bad);
  color: var(--bad);
}
.sheet-progress {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 10px;
}
.progress-track {
  height: 5px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-track > i {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: 4px;
}
.sheet-footer {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 10px;
  color: var(--muted);
}
.sheet-footer > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.sheet-footer svg {
  width: 12px;
  height: 12px;
}
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  white-space: nowrap;
}
.timer.low {
  color: var(--bad);
  border-color: var(--bad);
}
.keyboard-hint {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  margin-top: 22px;
}
kbd {
  font-family: var(--f-ui);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 4px;
  background: var(--surface);
}
/* Histórico, resultado e preferências. */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  padding: 22px;
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.stat-label svg {
  width: 15px;
  height: 15px;
}
.stat-value {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.stat-value small {
  font-family: var(--f-ui);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 400;
}
.history-panel {
  padding: 25px;
}
.history-panel h2 {
  font-size: 15px;
  font-weight: 750;
}
.spark-wrap {
  margin: 22px 0 28px;
}
.spark {
  display: block;
  width: 100%;
  height: 155px;
  overflow: visible;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  margin-top: 12px;
}
.tbl {
  width: 100%;
  overflow-x: auto;
}
.hist {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
.hist th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 12px;
  background: var(--bg);
}
.hist th:first-child {
  border-radius: 6px 0 0 6px;
}
.hist th:last-child {
  border-radius: 0 6px 6px 0;
}
.hist td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
}
.hist tr:last-child td {
  border-bottom: 0;
}
.hist td:first-child {
  color: var(--muted);
  white-space: nowrap;
}
.hist .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pct-badge {
  display: inline-flex;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
}
.empty-page {
  padding: 65px 24px;
  text-align: center;
}
.empty-page .empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 0;
}
.empty-page h2 {
  font-size: 19px;
  letter-spacing: -0.5px;
}
.empty-page p {
  max-width: 44ch;
  margin: 10px auto 23px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.result-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 32px;
  margin-bottom: 23px;
}
.score-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) calc(var(--pct) * 1%),
    var(--accent-soft) 0
  );
  position: relative;
  display: grid;
  place-items: center;
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  background: var(--surface);
  border-radius: 50%;
}
.score-ring > div {
  z-index: 1;
  text-align: center;
}
.score-ring strong {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -1px;
  line-height: 1.2;
}
.score-ring span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.result-hero h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
}
.result-hero .lead {
  font-size: 13px;
}
.result-counts {
  display: flex;
  gap: 19px;
  flex-wrap: wrap;
  margin-top: 19px;
  font-size: 11px;
  color: var(--muted);
}
.result-counts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.result-counts svg {
  width: 14px;
  height: 14px;
}
.result-counts b {
  color: var(--ink);
  font-weight: 600;
}
.review-heading {
  margin: 27px 0 15px;
}
.review-heading h2 {
  font-size: 16px;
  font-weight: 750;
}
.review-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.rlist {
  display: grid;
  gap: 10px;
}
.review-item {
  overflow: hidden;
}
.rrow {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 13px;
  border: 0;
  background: var(--surface);
  padding: 18px 20px;
  width: 100%;
  text-align: left;
}
.rrow:hover {
  background: var(--surface-alt);
}
.review-status {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.review-status svg {
  width: 16px;
  height: 16px;
}
.review-status.ok {
  color: var(--good);
  background: var(--good-soft);
}
.review-status.no {
  color: var(--bad);
  background: var(--bad-soft);
}
.rrow .t {
  font-size: 12px;
  font-weight: 500;
}
.rrow .t small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.rrow .p {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.rrow > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.rrow[aria-expanded="true"] > svg {
  transform: rotate(180deg);
}
.review-body {
  border-top: 1px solid var(--line);
  padding: 25px;
}
.review-body .opts {
  margin-top: 22px;
}
.review-body .opt {
  cursor: default;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.result-actions {
  margin-top: 25px;
}
.topic-breakdown {
  padding: 23px;
  margin-top: 23px;
}
.topic-breakdown h2 {
  font-size: 14px;
  margin-bottom: 18px;
}
.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 45px;
  gap: 15px;
  align-items: center;
  margin-top: 13px;
  font-size: 11px;
}
.topic-row .progress-track {
  margin: 0;
}
.topic-row > span:last-child {
  text-align: right;
  color: var(--muted);
}
.settings-layout {
  max-width: 780px;
}
.settings-panel {
  padding: 25px;
  margin-bottom: 20px;
}
.settings-panel h2 {
  font-size: 15px;
  margin-bottom: 6px;
}
.settings-panel > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.8;
}
.settings-row {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.settings-row:last-child {
  padding-bottom: 0;
}
.settings-row strong {
  font-size: 12px;
  font-weight: 500;
}
.settings-row p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.settings-row .btn {
  flex: none;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.theme-option {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  text-align: left;
  font-size: 12px;
}
.theme-option[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.theme-swatch {
  height: 55px;
  border-radius: 6px;
  margin-bottom: 12px;
  background: #f5f7fb;
  border: 1px solid #e4e9f2;
  display: flex;
  overflow: hidden;
}
.theme-swatch::before {
  content: "";
  width: 22%;
  height: 100%;
  border-right: 1px solid #e4e9f2;
  background: #fff;
}
.theme-swatch::after {
  content: "";
  width: 50%;
  height: 28px;
  margin: 13px auto;
  border: 1px solid #e4e9f2;
  background: white;
  border-radius: 3px;
}
.theme-swatch.dark {
  background: #101724;
  border-color: #2c384d;
}
.theme-swatch.dark::before,
.theme-swatch.dark::after {
  background: #182130;
  border-color: #2c384d;
}
.theme-swatch.system {
  background: linear-gradient(110deg, #f5f7fb 50%, #101724 50%);
}
.demo-tools {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 20px 25px;
  font-size: 12px;
  color: var(--muted);
}
.demo-tools > summary {
  cursor: pointer;
  font-weight: 500;
}
.demo-tools p {
  font-size: 11px;
  margin: 14px 0;
  line-height: 1.8;
}
.loading-state,
.error-state {
  text-align: center;
  padding: 100px 24px;
}
.loading-state h1,
.error-state h1 {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-top: 20px;
}
.loading-state p,
.error-state p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}
.error-state .btn {
  margin-top: 22px;
}
.loader {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: calc(50% + 112px);
  transform: translate(-50%, 12px);
  z-index: 70;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 40px #0002;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 36px);
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.dialog {
  max-width: 430px;
  width: calc(100% - 36px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  padding: 28px;
  box-shadow: 0 20px 100px #0002;
}
.dialog::backdrop {
  background: #111d3b70;
  backdrop-filter: blur(3px);
}
.dialog-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  margin-bottom: 18px;
}
.dialog h2 {
  font-size: 20px;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}
.dialog p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.dialog .actions {
  justify-content: flex-end;
  margin-top: 25px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.mobile-start {
  display: none;
}
.source-note > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.source-note > a svg {
  width: 11px;
  height: 11px;
}
.keyboard-hint svg {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
}
.image-error {
  min-height: 90px;
  padding: 16px;
  border: 1px dashed var(--bad);
  font-family: var(--f-ui);
  font-size: 12px;
  color: var(--bad);
}
/* As colunas se ajustam antes de reduzir o tamanho do conteúdo. */
@media (min-width: 1500px) {
  .main {
    padding-top: 50px;
  }
  .intro {
    margin-bottom: 36px;
  }
  .study-layout {
    grid-template-columns: minmax(0, 1fr) 294px;
    gap: 26px;
  }
  .area-card {
    min-height: 80px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 196px;
    padding-inline: 15px;
  }
  .workspace {
    margin-left: 196px;
  }
  .main {
    padding: 32px 28px;
  }
  .topbar {
    padding-inline: 28px;
  }
  .study-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 17px;
  }
  .panel-heading,
  .builder-body {
    padding-inline: 20px;
  }
  .mode-tabs {
    margin-inline: 20px;
  }
  .advanced {
    margin-inline: -20px;
  }
  .advanced > summary,
  .advanced-content {
    padding-inline: 20px;
  }
  .session-summary {
    padding: 20px;
  }
  .area-card {
    padding: 10px;
    gap: 8px;
  }
  .area-name {
    font-size: 11px;
  }
  .area-icon {
    width: 29px;
    height: 32px;
  }
  .edition-note {
    display: none;
  }
  .app-footer {
    padding-inline: 28px;
  }
  .toast {
    left: calc(50% + 98px);
  }
  .practice-layout {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 17px;
  }
  .answer-sheet {
    padding: 16px;
  }
  .dots {
    gap: 7px;
  }
  .mode-tab {
    font-size: 11px;
    gap: 5px;
  }
}
@media (max-width: 1020px) and (min-width: 761px) {
  .sidebar {
    width: 84px;
    padding-inline: 14px;
    align-items: center;
  }
  .brand > span:last-child,
  .sidebar-label,
  .sidebar-bottom,
  .nav-item > span,
  .nav-item[aria-current="page"]::after {
    display: none;
  }
  .brand {
    margin-top: 5px;
  }
  .primary-nav {
    margin-top: 48px;
    width: 100%;
  }
  .nav-item {
    justify-content: center;
    padding: 12px;
  }
  .workspace {
    margin-left: 84px;
  }
  .toast {
    left: calc(50% + 42px);
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 15px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    gap: 9px;
    font-size: 14px;
    line-height: 1;
  }
  .brand-enem {
    display: inline;
    margin: 0 0 0 4px;
    font-size: 16px;
    letter-spacing: -0.5px;
  }
  .brand-mark {
    width: 28px;
    height: 31px;
    border-radius: 8px;
    gap: 3px;
    padding: 7px;
  }
  .brand-mark i {
    width: 14px;
    height: 2px;
  }
  .brand-mark i:nth-child(2) {
    width: 9px;
  }
  .brand-mark i:nth-child(3) {
    width: 12px;
  }
  .sidebar-label,
  .sidebar-bottom {
    display: none;
  }
  .primary-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-top: 15px;
  }
  .nav-item {
    justify-content: center;
    gap: 7px;
    border-radius: 6px 6px 0 0;
    min-height: 43px;
    font-size: 11px;
    padding: 10px 4px;
  }
  .nav-item svg {
    width: 16px;
    height: 16px;
  }
  .nav-item[aria-current="page"] {
    background: none;
    box-shadow: inset 0 -2px var(--accent);
  }
  .nav-item[aria-current="page"]::after {
    display: none;
  }
  .workspace {
    margin-left: 0;
    min-height: calc(100dvh - 105px);
  }
  .topbar {
    min-height: 46px;
    padding: 7px 20px;
    border-bottom: 0;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .topbar-right {
    gap: 8px;
  }
  .local-badge {
    font-size: 9px;
  }
  .icon-button {
    width: 31px;
    height: 31px;
  }
  .icon-button svg {
    width: 15px;
    height: 15px;
  }
  .main {
    padding: 21px 20px 32px;
  }
  .intro {
    margin-bottom: 23px;
  }
  h1 {
    font-size: 28px;
    letter-spacing: -1px;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 9px;
  }
  .lead {
    font-size: 12px;
    line-height: 1.8;
    margin-top: 9px;
  }
  .study-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .summary-column {
    position: static;
  }
  .session-summary {
    padding: 20px;
  }
  .session-summary h2 {
    font-size: 20px;
  }
  .summary-eyebrow {
    margin-bottom: 12px;
  }
  .summary-list {
    margin: 17px 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 20px;
  }
  .summary-list > div,
  .summary-list dd {
    font-size: 11px;
  }
  .answer-preview {
    display: none;
  }
  .summary-rule {
    margin-bottom: 17px;
  }
  .study-tip {
    padding: 18px 8px 0;
  }
  .study-tip p {
    font-size: 11px;
  }
  .study-tip h3 {
    font-size: 12px;
  }
  .activity {
    margin-top: 24px;
  }
  .source-note {
    font-size: 9px;
    line-height: 1.8;
  }
  .app-footer {
    padding: 0 20px 22px;
    font-size: 9px;
  }
  .empty-activity {
    padding: 18px;
    gap: 12px;
  }
  .empty-activity > svg {
    display: none;
  }
  .empty-activity p {
    line-height: 1.7;
  }
  .toast {
    left: 50%;
    bottom: 18px;
  }
  .resume-banner {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  .resume-banner > svg {
    width: 17px;
    height: 17px;
    margin-top: 3px;
  }
  .resume-banner .btn {
    width: 100%;
    margin-top: 4px;
  }
  .practice-top {
    margin-bottom: 17px;
  }
  .practice-top h1 {
    font-size: 19px;
  }
  .practice-top p {
    font-size: 10px;
  }
  .practice-layout {
    display: flex;
    flex-direction: column;
    gap: 17px;
  }
  .answer-sheet {
    position: static;
    order: -1;
    width: 100%;
    padding: 16px;
  }
  .answer-sheet h2 {
    font-size: 11px;
  }
  .sheet-subtitle,
  .sheet-footer,
  .keyboard-hint {
    display: none;
  }
  .dots {
    display: flex;
    flex-wrap: wrap;
    margin: 12px 0;
    gap: 8px;
  }
  .dot {
    width: 44px;
    flex: none;
  }
  .sheet-progress {
    margin: 0;
  }
  .question-column {
    width: 100%;
    min-width: 0;
  }
  .question-header {
    padding: 16px 18px;
  }
  .question-body {
    padding: 21px 18px;
  }
  .question-tag {
    font-size: 9px;
  }
  .md {
    font-size: 16px;
    line-height: 1.8;
  }
  .opt {
    padding: 12px;
    gap: 9px;
    grid-template-columns: 26px minmax(0, 1fr) 14px;
  }
  .opt .md {
    font-size: 15px;
  }
  .question-nav {
    align-items: stretch;
  }
  .question-nav .btn {
    font-size: 11px;
    padding: 10px 12px;
  }
  .question-nav .actions {
    gap: 6px;
    justify-content: flex-end;
  }
  .timer {
    font-size: 12px;
    padding: 8px 10px;
  }
  .timer svg {
    width: 15px;
    height: 15px;
  }
  .stats-grid {
    gap: 9px;
  }
  .stat {
    padding: 15px 12px;
  }
  .stat-label {
    font-size: 9px;
    gap: 4px;
    flex-wrap: wrap;
  }
  .stat-label svg {
    width: 13px;
    height: 13px;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-value small {
    font-size: 9px;
  }
  .history-panel {
    padding: 18px;
  }
  .hist {
    font-size: 11px;
  }
  .hist th {
    font-size: 9px;
  }
  .hist td,
  .hist th {
    padding: 12px 8px;
  }
  .hist td:nth-child(2) {
    min-width: 155px;
  }
  .result-hero {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 18px;
  }
  .score-ring {
    width: 92px;
    height: 92px;
  }
  .score-ring::before {
    inset: 6px;
  }
  .score-ring strong {
    font-size: 23px;
  }
  .score-ring span {
    font-size: 8px;
  }
  .result-hero h1 {
    font-size: 21px;
  }
  .result-hero .lead {
    font-size: 11px;
  }
  .result-counts {
    gap: 8px 12px;
    font-size: 10px;
    margin-top: 12px;
  }
  .rrow {
    gap: 10px;
    padding: 15px 13px;
    grid-template-columns: 30px minmax(0, 1fr) 14px;
  }
  .rrow .p {
    display: none;
  }
  .rrow .t {
    font-size: 11px;
  }
  .rrow .t small {
    font-size: 9px;
  }
  .review-body {
    padding: 20px 16px;
  }
  .topic-breakdown {
    padding: 18px;
  }
  .topic-row {
    grid-template-columns: minmax(0, 1fr) 60px 30px;
    gap: 10px;
    font-size: 10px;
  }
  .settings-panel {
    padding: 20px;
  }
  .theme-options {
    gap: 8px;
  }
  .theme-option {
    padding: 9px;
    font-size: 11px;
  }
  .settings-row {
    gap: 12px;
  }
  .settings-row .btn {
    font-size: 10px;
    padding-inline: 12px;
  }
  .demo-tools {
    padding: 18px 20px;
  }
}
@media (max-width: 380px) {
  .main {
    padding-inline: 14px;
  }
  .topbar,
  .sidebar {
    padding-inline: 14px;
  }
  .local-badge {
    display: none;
  }
  .panel-heading,
  .builder-body {
    padding-inline: 16px;
  }
  .mode-tabs {
    margin-inline: 16px;
  }
  .mode-tab {
    font-size: 10px;
    gap: 4px;
  }
  .mode-tab svg {
    width: 13px;
    height: 13px;
  }
  .area-card {
    padding: 10px 8px;
    gap: 7px;
  }
  .area-name {
    font-size: 10px;
  }
  .area-name small {
    font-size: 9px;
  }
  .area-icon {
    width: 26px;
    height: 28px;
  }
  .form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .advanced {
    margin-inline: -16px;
  }
  .advanced > summary,
  .advanced-content {
    padding-inline: 16px;
  }
  .seg button {
    padding-inline: 13px;
  }
  .summary-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .question-nav {
    flex-wrap: wrap;
  }
  .question-nav .actions {
    flex: 1;
  }
  .result-hero {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
  .score-ring {
    margin: 0 auto;
  }
  .result-counts {
    justify-content: center;
  }
}
@media (max-width: 760px) {
  select {
    font-size: 16px;
  }
  .form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .summary-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .breadcrumb {
    white-space: nowrap;
  }
  .local-badge {
    display: none;
  }
  .mobile-start {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 12px 20px max(12px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -4px 20px #18274604;
  }
  .mobile-start strong {
    display: block;
    font-size: 12px;
    font-weight: 650;
  }
  .mobile-start span {
    display: block;
    font-size: 9px;
    color: var(--muted);
    margin-top: 3px;
  }
  .mobile-start .btn {
    flex: none;
    font-size: 11px;
    padding-inline: 15px;
  }
  .workspace:has(.mobile-start) {
    padding-bottom: 82px;
  }
  .summary-column .session-summary .btn {
    min-height: 46px;
  }
  .quantity-field .seg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .quantity-field .seg button {
    padding-inline: 7px;
    font-size: 11px;
  }
  .quantity-field .optional {
    font-size: 10px;
  }
}
@media (max-width: 380px) {
  .mobile-start {
    padding-inline: 14px;
  }
  .mobile-start .btn {
    padding-inline: 12px;
  }
  .mobile-start span {
    max-width: 135px;
    font-size: 9px;
  }
  .quantity-field .optional {
    max-width: 130px;
    text-align: right;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a,
  input,
  .toast {
    transition:
      background-color 0.16s,
      border-color 0.16s,
      color 0.16s,
      opacity 0.16s,
      transform 0.16s;
  }
  .intro {
    animation: arrive 0.28s ease-out;
  }
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .app-footer,
  .answer-sheet,
  .question-nav,
  .keyboard-hint,
  .result-actions,
  .toast {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  .main {
    padding: 0;
    max-width: none;
  }
  .practice-layout {
    display: block;
  }
  body {
    background: #fff;
  }
  .panel {
    border-color: #ddd;
    box-shadow: none;
  }
}

/* Biblioteca e conta mantêm a mesma escala e o mesmo espaço de leitura do treino. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sidebar {
  overflow-y: auto;
}
.nav-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: var(--surface);
  border-radius: 5px;
  padding: 2px 6px;
}
.nav-item:has(.nav-count)::after {
  display: none;
}
.plan-description {
  margin-top: 10px;
}
.plan-card .text-link {
  margin-top: 10px;
  font-size: 11px;
}
.local-badge[data-state="error"] {
  color: var(--bad);
}
.local-badge[data-state="error"] > span {
  background: var(--bad);
}
.exclude-check {
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.question-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 72%;
  min-width: 0;
}
.question-tools .question-tag {
  max-width: none;
  text-align: left;
}
.bookmark-button {
  flex: none;
  width: 38px;
  height: 38px;
}
.bookmark-button.saved {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.bookmark-button.saved svg {
  fill: var(--accent-soft);
  stroke-width: 2;
}
.review-question-tools {
  float: right;
  margin-left: 12px;
}
.review-question-tools + .question-source {
  min-height: 38px;
}
.history-session-link {
  font: inherit;
  text-align: left;
  line-height: 1.6;
  border: 0;
  padding: 8px 0;
  background: none;
  color: var(--accent);
  min-height: 44px;
}
.history-session-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.history-session-link small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.history-note {
  margin-top: 18px;
  max-width: 90ch;
  line-height: 1.8;
}
.library-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  width: fit-content;
  margin-bottom: 27px;
}
.library-tabs > button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: none;
  border-radius: 7px;
  color: var(--muted);
  padding: 10px 16px;
  min-height: 43px;
  font-size: 12px;
  font-weight: 500;
}
.library-tabs > button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft);
}
.library-tabs > button > span {
  font-size: 10px;
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.library-heading h2 {
  font-size: 16px;
  letter-spacing: -0.4px;
}
.library-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  max-width: 68ch;
}
.search-field {
  display: block;
  flex: none;
}
.search-field input,
.auth-form input {
  width: 100%;
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 13px;
  font: inherit;
  font-size: 13px;
}
.search-field input {
  width: 220px;
}
.search-field input::placeholder,
.auth-form input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.library-card {
  overflow: hidden;
}
.library-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 21px;
}
.library-row h3 {
  font-size: 13px;
  letter-spacing: -0.2px;
  font-weight: 650;
}
.library-row p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.7;
}
.library-row .btn {
  font-size: 11px;
  white-space: nowrap;
}
.library-row .btn svg {
  width: 14px;
  height: 14px;
}
.library-row button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.review-schedule {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
  font-family: var(--f-ui);
}
.review-schedule h3 {
  font-size: 13px;
  font-weight: 650;
}
.review-schedule > p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.8;
}
.review-grades {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}
.review-grades .btn {
  font-size: 11px;
  padding: 10px 8px;
}
.review-schedule .schedule-status {
  margin-top: 12px;
  color: var(--accent);
}
.account-profile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.account-profile h2 {
  font-size: 15px;
  overflow-wrap: anywhere;
  margin-bottom: 4px;
}
.account-profile p {
  font-size: 11px;
  color: var(--muted);
}
.account-profile .btn {
  font-size: 11px;
}
.auth-panel {
  max-width: 490px;
}
.auth-form {
  display: grid;
  gap: 16px;
}
.auth-form input {
  font-size: 16px;
  min-height: 48px;
}
.auth-form .field > span {
  font-size: 12px;
}
.auth-secondary {
  margin-top: 15px;
  justify-content: space-between;
}
.form-alert {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--bad);
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 12px;
  line-height: 1.7;
}
.settings-panel > .form-alert {
  color: var(--bad);
}
.settings-panel > .backup-note,
.backup-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 16px 0 0;
}
.sync-status {
  line-height: 1.8;
}
.sync-status.error {
  color: var(--bad);
}
.centered {
  justify-content: center;
}
.account-danger {
  border-color: var(--bad);
}
@media (max-width: 1020px) and (min-width: 761px) {
  .nav-count {
    position: absolute;
    top: 4px;
    right: 2px;
    font-size: 8px;
  }
  .nav-item {
    position: relative;
  }
  .primary-nav {
    gap: 10px;
  }
}
@media (max-width: 760px) {
  .primary-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }
  .nav-item {
    flex-direction: column;
    gap: 5px;
    font-size: 9px;
    min-height: 55px;
    padding: 8px 1px;
    position: relative;
    line-height: 1.2;
  }
  .nav-item > span {
    white-space: nowrap;
  }
  .nav-item svg {
    width: 17px;
    height: 17px;
  }
  .nav-count {
    position: absolute;
    top: 1px;
    right: 7px;
    margin: 0;
    font-size: 8px;
    padding: 1px 3px;
  }
  .question-tools {
    gap: 8px;
    max-width: 65%;
  }
  .question-tag {
    overflow-wrap: anywhere;
  }
  .bookmark-button {
    width: 40px;
    height: 40px;
  }
  .question-tools .question-tag {
    max-width: 22ch;
  }
  .library-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 3px;
    padding: 4px;
  }
  .library-tabs > button {
    justify-content: center;
    flex-wrap: wrap;
    padding: 9px 4px;
    gap: 5px;
    font-size: 10px;
  }
  .library-heading {
    display: block;
  }
  .library-heading h2 {
    font-size: 14px;
  }
  .library-heading p {
    font-size: 11px;
  }
  .search-field {
    margin-top: 16px;
  }
  .search-field input {
    width: 100%;
    font-size: 16px;
  }
  .library-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 18px;
  }
  .library-row .btn {
    grid-column: 2;
    justify-self: start;
    margin-top: 3px;
  }
  .library-row h3 {
    font-size: 12px;
  }
  .review-grades {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .review-grades .btn {
    font-size: 11px;
  }
  .account-profile {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }
  .account-avatar {
    width: 38px;
    height: 38px;
  }
  .account-profile .btn {
    grid-column: 2;
    justify-self: start;
  }
  .account-profile h2 {
    font-size: 13px;
  }
  .account-profile p {
    font-size: 10px;
  }
  .settings-panel .actions .btn {
    font-size: 11px;
  }
  .history-note {
    font-size: 10px;
  }
  .auth-form input {
    font-size: 16px;
  }
  .review-question-tools + .question-source {
    font-size: 9px;
  }
}
@media (max-width: 380px) {
  .nav-item {
    font-size: 8px;
  }
  .nav-item svg {
    width: 16px;
    height: 16px;
  }
  .library-tabs > button {
    font-size: 9px;
  }
  .library-tabs > button > span {
    font-size: 9px;
    padding-inline: 4px;
  }
  .question-tools .question-tag {
    max-width: 16ch;
  }
}
@media print {
  .mobile-start,
  .bookmark-button,
  .review-grades,
  .review-question-tools {
    display: none;
  }
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.pricing-option {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.pricing-option:last-child {
  background: var(--surface-alt);
  border-color: var(--accent);
}
.pricing-option h3 {
  font-size: 13px;
  font-weight: 650;
}
.pricing-option .pricing-amount {
  font-family: var(--f-display);
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -0.8px;
  font-weight: 700;
  margin: 14px 0 9px;
  color: var(--ink);
}
.pricing-amount > span {
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.pricing-detail {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  min-height: 42px;
  margin-bottom: 18px;
}
.pricing-option .btn {
  font-size: 11px;
  white-space: normal;
}
.pricing-option .btn:disabled {
  opacity: 0.65;
}
.account-danger h2 {
  color: var(--bad);
}
@media (max-width: 760px) {
  .pricing-grid {
    gap: 12px;
  }
  .pricing-option {
    padding: 16px;
  }
  .pricing-option .pricing-amount {
    font-size: 22px;
  }
  .pricing-option .pricing-amount > span {
    font-size: 10px;
  }
}
@media (max-width: 460px) {
  .pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pricing-detail {
    min-height: 0;
  }
  .pricing-option .pricing-amount {
    font-size: 27px;
  }
}
.settings-layout > .empty-page {
  margin-bottom: 20px;
}
.nav-compact {
  display: none;
}
@media (max-width: 760px) {
  .nav-item > .nav-full {
    display: none;
  }
  .nav-item > .nav-compact {
    display: block;
    font-size: 11px;
  }
}
@media (max-width: 380px) {
  .nav-item > .nav-compact {
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  .library-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .library-intro > .btn {
    white-space: nowrap;
  }
}

/* Simulado do dia e nota estimada pela TRI. */
.mode-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tri-panel {
  padding: 23px;
  margin-top: 23px;
}
.tri-panel h2 {
  font-size: 14px;
  margin-bottom: 14px;
}
.tri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.tri-score {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.tri-score span {
  font-size: 11px;
  color: var(--muted);
}
.tri-score strong {
  font-size: 26px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tri-panel {
    padding: 18px 16px;
  }
}

/* Assinatura pelo Asaas: dados do pagador e duas formas de pagamento no plano anual. */
.payer-form {
  margin-top: 14px;
}
.pricing-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}
.payer-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 13px;
  font: inherit;
  font-size: 16px;
}
.payer-form input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Rodapé com links legais e identificação do fornecedor (Decreto 7.962/2013). */
.app-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.app-footer a:hover {
  color: var(--accent);
}
.footer-identity {
  flex-basis: 100%;
}
.legal-consent {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.legal-consent a {
  color: var(--accent);
}
