/* Experiência guiada: cores semânticas, controles confortáveis e leitura responsiva. */
:root {
  --study-blue: #2454be;
  --study-teal: #086d65;
  --study-purple: #6540a8;
}
button,
input,
select,
summary {
  touch-action: manipulation;
}
button,
input,
select {
  min-height: 48px;
}
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #7047b6;
  outline-offset: 4px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}
.primary {
  background: var(--study-blue);
}
.welcome-guide,
.guide-banner {
  padding: 24px 28px;
  margin: 24px 0;
  border: 1px solid #c8d7f0;
  border-radius: 18px;
  background: #f0f5fd;
}
.welcome-guide h2,
.guide-banner h2 {
  margin-top: 0;
  font-size: 23px;
}
.guide-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 18px 0;
  padding: 0;
}
.guide-steps li {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guide-steps b {
  color: #203f7b;
  font-size: 19px;
}
.guide-steps span {
  color: #40536c;
  line-height: 1.6;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
}
.hero {
  min-height: unset;
}
.trail-card {
  margin: 16px 0;
  border: 1px solid #d4deea;
  border-radius: 14px;
  background: white;
  overflow: hidden;
}
.trail-card summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}
.trail-card summary::-webkit-details-marker {
  display: none;
}
.trail-card summary strong,
.trail-card summary small {
  display: block;
}
.trail-card summary strong {
  color: #183453;
  font-size: 18px;
}
.trail-card summary small {
  color: #53647a;
  margin-top: 5px;
  font-size: 14px;
}
.trail-symbol {
  background: #e9f0fd;
  color: var(--study-blue);
  padding: 10px;
  border-radius: 10px;
}
.trail-card summary > span:last-child {
  margin-left: auto;
  font-size: 22px;
}
.trail-card[open] summary > span:last-child {
  transform: rotate(180deg);
}
.trail-card > p {
  padding: 0 18px;
  color: #526175;
}
.trail-card .lesson-row {
  border-radius: 0;
  margin: 0;
  width: 100%;
  border-bottom: 1px solid #e3e9f0;
}
.trail-filter {
  display: block;
  margin: 14px 0 22px;
  max-width: 560px;
}
.trail-filter select {
  width: 100%;
  display: block;
  margin-top: 6px;
}
.lesson-guide {
  padding: 18px 22px;
  border-left: 4px solid var(--study-blue);
  background: #eef4fd;
  border-radius: 10px;
  margin-bottom: 20px;
}
.lesson-guide p {
  margin: 0 0 9px;
}
.learning-steps {
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 12px 24px;
  color: #354a65;
  font-size: 15px;
}
.reading-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 24px;
}
.lesson-recap {
  padding: 22px;
  background: #eef7f3;
  border: 1px solid #c5ded1;
  border-radius: 14px;
  margin: 30px 0;
}
.lesson-recap h2 {
  margin-top: 0;
}
.glossary dt {
  font-weight: 700;
  color: #214a8a;
  margin-top: 22px;
}
.glossary dd {
  margin: 6px 0 0;
  line-height: 1.7;
}
.spacious-reading .book-body p,
.spacious-reading .book-body li {
  line-height: 2;
}
.spacious-reading .book-body p {
  margin-bottom: 1.6em;
}
.reading-focus .sidebar,
.reading-focus .toc,
.reading-focus .section-tabs,
.reading-focus .topbar,
.reading-focus footer {
  display: none;
}
.reading-focus .workspace {
  margin-left: 0;
  padding-bottom: 20px;
}
.reading-focus .reader-layout {
  display: block;
  max-width: 960px;
  margin: auto;
}
.reading-focus #main {
  max-width: 1100px;
  margin: auto;
}
.reading-focus .reader {
  width: 100%;
}
.activity-grid,
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}
.activity-card {
  padding: 28px;
  background: white;
  border: 1px solid #d8e0eb;
  border-top: 5px solid var(--study-teal);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.activity-card.simulation {
  border-top-color: var(--study-purple);
}
.activity-card p {
  line-height: 1.75;
  flex: 1;
}
.activity-card .primary {
  background: var(--study-teal);
}
.activity-card.simulation .primary {
  background: var(--study-purple);
}
.activity-symbol {
  font-size: 26px;
  color: var(--study-teal);
}
.simulation .activity-symbol {
  color: var(--study-purple);
}
.help-grid .panel {
  margin: 0;
}
.help-grid p,
.help-grid li {
  line-height: 1.75;
}
.comparison-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin: 18px 0;
  border-radius: 12px;
  background: #eaf2fa;
}
.compare-choice {
  display: flex;
  gap: 10px;
  align-items: center;
  line-height: 1.5;
  margin-top: 14px;
  cursor: pointer;
  color: #304760;
  font-size: 16px;
}
.compare-choice input {
  min-height: 24px;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.dialog-close {
  float: right;
  margin-bottom: 16px;
}
.danger {
  background: #a22835;
  color: white;
  border: 0;
  padding: 12px 18px;
  border-radius: 10px;
  margin: 12px;
}
.book-table-wrap {
  max-height: 560px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  margin: 18px 0;
  scrollbar-width: thin;
}
.book-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}
.book-table-wrap th,
.book-table-wrap td {
  padding: 10px 14px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.book-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e7eff9;
  color: #203d61;
}
.book-table-wrap tbody th {
  font-weight: 600;
  background: #f6f8fc;
}
.book-table-wrap tbody tr:nth-child(even) td {
  background: #f8fafc;
}
.book-table-wrap td {
  font-variant-numeric: tabular-nums;
}
.tax-guide {
  padding: 24px;
}
.investment-card {
  border: 1px solid #d7e1ec;
  border-top: 4px solid var(--study-teal);
  border-radius: 14px;
  padding: 22px;
}
.home-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.home-path {
  background: white;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  padding: 18px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #183453;
}
.home-path strong,
.home-path small {
  display: block;
}
.home-path small {
  color: #52657b;
  margin-top: 7px;
  font-weight: 400;
}
.home-path > span:last-child {
  margin-left: auto;
}
.path-number {
  padding: 10px 14px;
  border-radius: 9px;
  background: #e9f0fc;
  color: #2554ad;
}
.nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
  display: block;
}
.answer-lesson {
  background: #f4f7fc;
  padding: 14px;
  border-radius: 10px;
  margin-top: 15px;
}
.answer-lesson summary {
  cursor: pointer;
  color: #254c8a;
  font-weight: 600;
}
@media (max-width: 760px) {
  .primary-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .nav-item {
    font-size: 13px;
    padding: 10px 5px;
  }
  .guide-steps,
  .activity-grid,
  .help-grid,
  .home-paths {
    grid-template-columns: 1fr;
  }
  .guide-steps {
    gap: 16px;
  }
  .welcome-guide {
    padding: 20px;
  }
  .reading-tools > button {
    flex: 1 1 170px;
  }
  .reading-focus .workspace {
    padding-left: 0;
  }
  .reading-focus #main {
    padding: 18px;
  }
  .learning-steps {
    display: grid;
    gap: 8px;
  }
  .comparison-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .book-table-wrap .study-table,
  .study-table tbody,
  .study-table tr,
  .study-table td,
  .study-table tbody th {
    display: block;
    width: auto;
  }
  .study-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .study-table tbody tr {
    border-bottom: 2px solid #c6d6e7;
    padding: 8px 0;
  }
  .study-table td::before,
  .study-table tbody th::before {
    content: attr(data-label);
    display: block;
    font-size: 14px;
    color: #50637a;
    font-weight: 700;
    margin-bottom: 4px;
  }
  .study-table tbody th {
    font-size: 17px;
  }
  .book-table-wrap {
    max-height: 70vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
