:root{
  --bg: #f5f8ff;
  --card: #ffffff;
  --text: #0d1526;
  --muted: #5b6b86;
  --line: rgba(13,21,38,.10);
  --shadow: 0 18px 50px rgba(13,21,38,.08);
  --shadow2: 0 8px 24px rgba(13,21,38,.08);
  --blue: #2f6bff;
  --blue2: #2458d6;
  --good: #19b36b;
  --bad: #ff3b3b;
  --pill: rgba(47,107,255,.10);
  --radius: 18px;

  --fs: 16px;
  --h1: 44px;
  --h2: 22px;
  --w600: 600;
  --w500: 500;
  --w400: 400;
}

html[data-font="lg"]{
  --fs: 18px;
  --h1: 46px;
  --h2: 24px;
}

html[data-theme="dark"]{
  --bg: #0b1220;
  --card: #0f1a2e;
  --text: #eaf0ff;
  --muted: rgba(234,240,255,.70);
  --line: rgba(234,240,255,.10);
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --shadow2: 0 8px 24px rgba(0,0,0,.35);
  --pill: rgba(47,107,255,.18);
}

*{ box-sizing: border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  font-size: var(--fs);
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 25% 0%, rgba(47,107,255,.15), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, rgba(47,107,255,.08), transparent 60%),
    var(--bg);
}

a{ color: var(--blue); text-decoration: none; }
a:hover{ text-decoration: underline; }

.topbar{
  position: sticky;
  top:0;
  z-index: 10;
  background: rgba(245,248,255,.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] .topbar{
  background: rgba(11,18,32,.75);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 18px 18px;
  max-width: 1140px;
  margin: 0 auto;
}

/* Logo clicável (substitui o botão "Início") */
.brandBtn{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.brandBtn:focus-visible{
  outline: 3px solid var(--blue);
  outline-offset: 6px;
  border-radius: 14px;
}
.brand__title{
  font-weight: var(--w600);
  letter-spacing: -0.02em;
  font-size: 22px;
}
.brand__title--logo{
  /* o logo já contém o nome; evita altura extra de linha */
  line-height: 0;
}
.brand__logo{
  display:block;
  height: 34px;
  width: auto;
}
@media (max-width: 520px){
  .brand__logo{ height: 30px; }
}
.brand__subtitle{
  margin-top: 4px;
  color: var(--muted);
  font-weight: var(--w400);
  font-size: 14px;
}
.brand__subtitle--mobile{
  display:none;
  padding: 0 18px 14px;
  max-width: 1140px;
  margin: 0 auto;
}

.actions{
  display:flex;
  gap: 10px;
  align-items:center;
}

.iconbtn{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow: var(--shadow2);
  font-size: 18px;
  color: var(--text);
}
html[data-theme="dark"] .iconbtn{
  background: rgba(255,255,255,.04);
}
.iconbtn--ghost{
  box-shadow: none;
  background: transparent;
}

.pillbtn{
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  cursor:pointer;
  box-shadow: var(--shadow2);
  font-weight: var(--w500);
  color: var(--text);
}
html[data-theme="dark"] .pillbtn{
  background: rgba(255,255,255,.04);
}

.page{ padding: 26px 18px 40px; }
.shell{
  max-width: 1140px;
  margin: 0 auto;
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hero{
  padding: 24px 30px;
}

.h1{
  margin:0;
  font-size: var(--h1);
  letter-spacing: -0.03em;
  font-weight: var(--w600);
}
.lead{
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: var(--w400);
}

.grid{
  margin-top: 22px;
  display:grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
}

.subgrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.topGrid{
  margin-top: 22px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas: "meta prova level";
  gap: 18px;
}
.topGrid__meta{ grid-area: meta; }
.topGrid__level{ grid-area: level; }
.provaCard{ grid-area: prova; }
.grid--belowTop{ margin-top: 22px; }

.grid.grid--belowTop{
  grid-template-columns: 1fr 1fr 1fr;
}

.grid.grid--belowTop > .box:first-child{
  grid-column: 1 / span 2;
}

.grid.grid--belowTop > .box:last-child{
  grid-column: 3 / span 1;
}



.box{
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
}
html[data-theme="dark"] .box{
  background: rgba(255,255,255,.03);
}
.box h3{
  margin:0;
  font-size: var(--h2);
  font-weight: var(--w600);
  letter-spacing: -0.02em;
}
.box .muted{ color: var(--muted); margin-top: 6px; }

.sectionTitle{
  margin: 18px 0 10px;
  font-weight: var(--w600);
  color: var(--text);
}

.subjectCard{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.70);
}
html[data-theme="dark"] .subjectCard{
  background: rgba(255,255,255,.03);
}
.subjectCard__name{
  font-weight: var(--w600);
  letter-spacing: -0.01em;
}
.subjectCard__meta{
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.btnRow{
  display:flex;
  gap: 10px;
  align-items:center;
}

.btn{
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  cursor:pointer;
  font-weight: var(--w500);
  color: var(--text);
}

.btn--sm{
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 12px;
}

.btn--lg{
  height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 15px;
}

.btn--block{
  width: 100%;
}

.ctaStack{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.btn--link{
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--blue);
  font-weight: var(--w600);
  cursor: pointer;
}
.btn--link:hover{ text-decoration: underline; }

.miniInline{ font-size: 14px; }
.miniInline .btn--link{ font-size: 14px; }
.miniInline .sep{ opacity: .6; margin: 0 6px; }
.btn--primary{
  background: var(--blue);
  color: #fff;
  border-color: transparent;
}
.btn--primary:hover{ background: var(--blue2); }
.btn--soft{
  background: rgba(47,107,255,.08);
}
.btn--danger{
  background: rgba(255,59,59,.12);
  border-color: rgba(255,59,59,.20);
  color: var(--text);
}

.kpiGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.kpi{
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
}
html[data-theme="dark"] .kpi{ background: rgba(255,255,255,.03); }
.kpi__title{ font-weight: var(--w600); margin-bottom: 10px; }
.kpiRow{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
}
html[data-theme="dark"] .kpiRow{ background: rgba(255,255,255,.02); }
.kpiRow b{ font-weight: var(--w600); }
.kpiHint{ margin-top: 10px; color: var(--muted); font-size: 13px; }

.progress{
  height: 10px;
  border-radius: 999px;
  background: rgba(47,107,255,.12);
  overflow:hidden;
  border: 1px solid var(--line);
}
.progress > div{
  height:100%;
  width: 0%;
  background: var(--blue);
  border-radius: 999px;
}

.miniCards{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.miniCard{
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.65);
  display:flex;
  gap: 10px;
  align-items:center;
  cursor:pointer;
}
html[data-theme="dark"] .miniCard{ background: rgba(255,255,255,.03); }
.miniIcon{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(13,21,38,.92);
  color: #fff;
  display:grid;
  place-items:center;
  font-size: 18px;
}
.miniText b{ font-weight: var(--w600); }
.miniText div{ color: var(--muted); font-size: 13px; }

.hr{ height:1px; background: var(--line); margin: 16px 0; border:0; }

.quizTop{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.quizMeta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
}
.pill{
  display:inline-flex;
  gap: 8px;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--pill);
  font-size: 13px;
  color: var(--text);
}
.pill b{ font-weight: var(--w600); }

.qCard{
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.70);
}
html[data-theme="dark"] .qCard{ background: rgba(255,255,255,.03); }

.qHead{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items:flex-start;
}
.qTitle{
  font-weight: var(--w600);
  letter-spacing: -0.01em;
  margin: 0;
  font-size: 18px;
}
.qStar{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size: 18px;
  color: var(--text);
}
.qStar.is-on{
  background: rgba(255,193,7,.18);
  border-color: rgba(255,193,7,.35);
}

.options{
  margin-top: 14px;
  display:grid;
  gap: 10px;
}
.opt{
  text-align:left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.60);
  cursor:pointer;
  font-weight: var(--w500);
  color: var(--text);
}
html[data-theme="dark"] .opt{ background: rgba(255,255,255,.02); }
.opt small{
  display:block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: var(--w400);
}
.opt.is-correct{
  border-color: rgba(25,179,107,.35);
  background: rgba(25,179,107,.12);
}
.opt.is-wrong{
  border-color: rgba(255,59,59,.30);
  background: rgba(255,59,59,.10);
}
.opt.is-picked{
  border-color: rgba(47,107,255,.35);
  background: rgba(47,107,255,.08);
}


.explain{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.explain b{ color: var(--text); font-weight: var(--w600); }

.resultTop{
  display:flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bigScore{
  font-size: 56px;
  letter-spacing: -0.03em;
  font-weight: var(--w600);
  margin: 6px 0 0;
}
.subScore{
  color: var(--muted);
  font-weight: var(--w500);
}

.list{
  margin-top: 16px;
  display:grid;
  gap: 12px;
}

.tabs{
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.tab{
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.tab:hover{ background: rgba(47,107,255,.06); }
html[data-theme="dark"] .tab:hover{ background: rgba(47,107,255,.10); }
.tab.is-active{
  background: var(--pill);
  border-color: rgba(47,107,255,.40);
}
.tabContent{ margin-top: 6px; }
.item{
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.65);
}
html[data-theme="dark"] .item{ background: rgba(255,255,255,.03); }
.item h4{ margin:0; font-weight: var(--w600); }
.tags{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  font-size: 13px;
}
html[data-theme="dark"] .tag{ background: rgba(255,255,255,.02); }
.tag--bad{ background: rgba(255,59,59,.10); border-color: rgba(255,59,59,.20); }
.tag--good{ background: rgba(25,179,107,.12); border-color: rgba(25,179,107,.22); }

.drawerOverlay, .modalOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 50;
}
.drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 60;
  transform: translateX(110%);
  transition: transform .22s ease;
  display:flex;
  flex-direction: column;
}
.drawer.is-open{ transform: translateX(0); }

.drawer__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.drawer__title{
  font-weight: var(--w600);
  font-size: 18px;
}
.drawer__body{
  padding: 18px;
  overflow:auto;
}

.setRow{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.setRow__label{ font-weight: var(--w600); }
.setRow__hint{ color: var(--muted); font-size: 13px; margin-top: 4px; }

.setRow__actions{display:flex; gap:10px; align-items:center; justify-content:flex-end; flex-wrap:wrap;}
@media (max-width: 520px){.setRow__actions{justify-content:flex-start;}}

.select{
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 0 12px;
  font-weight: var(--w500);
}

.switch{
  position: relative;
  width: 52px;
  height: 30px;
  display:inline-block;
}
.switch input{ display:none; }
.switch__ui{
  position:absolute; inset:0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.45);
  cursor:pointer;
  transition: .18s ease;
}
html[data-theme="dark"] .switch__ui{ background: rgba(255,255,255,.05); }
.switch__ui::after{
  content:"";
  position:absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: .18s ease;
}
.switch input:checked + .switch__ui{
  background: rgba(47,107,255,.25);
  border-color: rgba(47,107,255,.35);
}
.switch input:checked + .switch__ui::after{
  transform: translateX(22px);
}

.supportGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fineprint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(560px, 94vw);
  max-height: calc(100vh - 28px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  z-index: 80;

  display:none;

  overflow: hidden;
  flex-direction: column;
}
@supports (height: 100dvh){
  .modal{ max-height: calc(100dvh - 28px); }
}

.modal.is-open{ display:flex; }
.modal__head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.modal__title{ font-weight: var(--w600); }
.modal__body{ padding: 16px; color: var(--text); overflow:auto; flex:1; min-height:0; }
.modal__foot{
  padding: 12px 16px 16px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
}

/* Inputs/labels (premium) */
.label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  font-weight: var(--w600);
}
.input{
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.70);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
html[data-theme="dark"] .input{ background: rgba(255,255,255,.04); }
.input:focus{
  border-color: rgba(84,132,255,.55);
  box-shadow: 0 0 0 3px rgba(84,132,255,.16);
}
.input::placeholder{ color: rgba(115,127,154,.9); }
html[data-theme="dark"] .input::placeholder{ color: rgba(160,175,210,.65); }

.formStack{ display:grid; gap: 10px; }
.field{ display:grid; gap: 6px; }
.hint{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.pwWrap{ position: relative; }
.pwToggle{
  position: absolute;
  right: 10px;
  top: 33px;
  height: 34px;
  width: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--text);
  display:grid;
  place-items:center;
}
.pwToggle:active{ transform: translateY(1px); }

.formError{
  display:none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,77,77,.28);
  background: rgba(255,77,77,.10);
  color: var(--text);
  font-size: 13px;
}

.accSub{
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.accAlt{
  margin-top: 2px;
  font-size: 13px;
}
.accClose{
  display:flex;
  justify-content:center;
  margin-top: 2px;
}
.linklike--subtle{
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor:pointer;
}
.btn.is-loading{ opacity: .85; }
@media (max-width: 480px){
  .modal__body{ padding: 14px; }
  .modal__head{ padding: 14px 14px 10px; }
  .modal__foot{ padding: 10px 14px 14px; }
}

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(13,21,38,.92);
  color:#fff;
  padding: 10px 14px;
  border-radius: 999px;
  z-index: 90;
  box-shadow: var(--shadow2);
  font-size: 14px;
}

/* Responsivo */
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .kpiGrid{ grid-template-columns: 1fr; }
  .topGrid{ grid-template-columns: 1fr; grid-template-areas: "prova" "meta" "level"; }
  /* Mobile/Tablet: empilha a grade abaixo do topo (evita "desconfigurar" no narrow) */
  .grid.grid--belowTop{ grid-template-columns: 1fr; }
  .grid.grid--belowTop > .box:first-child{ grid-column: auto; }
  .grid.grid--belowTop > .box:last-child{ grid-column: auto; }
}

@media (max-width: 720px){
  .brand__subtitle--desktop{ display:none; }
  .brand__subtitle--mobile{ display:block; }
  .topbar__inner{ padding: 14px 14px; }
  .page{ padding: 18px 14px 34px; }
  .hero{ padding: 22px 18px; }
  .h1{ font-size: 36px; }
  .subgrid{ grid-template-columns: 1fr; }
  .miniCards{ grid-template-columns: 1fr; }
  .actions{ gap: 8px; }
  .pillbtn{ padding: 0 14px; }
}

/* ===== PATCH: Dark mode - títulos legíveis ===== */
/* cobre os 2 jeitos comuns de tema: body.dark e html[data-theme="dark"] */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6{
  color: rgba(240,246,255,.96) !important;
}

/* classes comuns de títulos (caso teu HTML use alguma delas) */
html[data-theme="dark"] .title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .modal-title,
html[data-theme="dark"] .drawer-title,
body.dark .title,
body.dark .section-title,
body.dark .panel-title,
body.dark .card-title,
body.dark .modal-title,
body.dark .drawer-title{
  color: rgba(240,246,255,.96) !important;
}

/* textos secundários no dark (mais confortáveis) */
html[data-theme="dark"] .muted,
html[data-theme="dark"] .subtitle,
body.dark .muted,
body.dark .subtitle{
  color: rgba(226,232,240,.72) !important;
}



/* --------- Histórico (Home) --------- */
.historyList{ display:grid; gap:10px; }
.historyItem{
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  cursor: pointer;
  background: rgba(0,0,0,.02);
  transition: transform .08s ease, border-color .12s ease;
}
.historyItem:hover{ transform: translateY(-1px); border-color: rgba(99,102,241,.45); }
html[data-theme="dark"] .historyItem{ background: rgba(255,255,255,.03); }

.historyItem__top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.historyItem__name{ font-weight:700; }
.historyItem__pct{ font-weight:800; }
.historyItem__meta{ margin-top:4px; font-size: 12.5px; color: var(--muted); }

/* --------- Nível (ícone) --------- */
.levelRow{ display:flex; align-items:center; gap:12px; margin-top: 6px; }
.levelIcon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.02);
  object-fit: cover;
}
html[data-theme="dark"] .levelIcon{ background: rgba(255,255,255,.03); }
.levelMain{ font-size: 18px; font-weight: 700; line-height: 1.05; }

/* --------- Lista clicável --------- */
.item--click{ cursor:pointer; }
.itemTop{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.itemTitle{ font-weight:800; }
.itemRight{ font-weight:900; }

/* Conta: abas simples */
.segTabs{display:flex; gap:8px; align-items:center;}
.segTab{flex:1; border:1px solid var(--line); background:rgba(255,255,255,0.70); color:var(--text);
  padding:10px 12px; border-radius:12px; cursor:pointer; font-weight:700;}
.segTab--active{background:var(--blue); color:white;}

/* aviso no modal */
.warn{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,180,0,.10);}

.linklike{color:var(--blue); font-weight:700; cursor:pointer; text-decoration:underline;}
.linklike:hover{opacity:.9;}


.quickBox{ padding-top: 2px; }


/* Step 3f: unify titles + divider + remove quick from prova */

.kpi__title,
.kpi.provaCard h3,
.topGrid__level .levelMain,
.sectionTitle{
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  color: var(--text);
}

.kpi.provaCard h3{ margin:0 0 10px 0 !important; }
.kpi__title{ margin-bottom: 12px !important; }
.sectionTitle{ margin: 18px 0 10px !important; }

.divider{
  height: 1px;
  width: 100%;
  background: var(--line);
  margin: 14px 0;
}

.kpi.provaCard .ctaStack{ margin-bottom: 2px; }


.rowBetween{ display:flex; align-items:center; justify-content:space-between; gap:10px; }


/* Step 3g: compact hero */
.hero .h1{ margin-bottom: 10px; }
.hero .lead{ margin-top: 0; }


/* Step 3h: bank badge inside prova card */

.pill--inline{
  display: inline-flex;
  width: fit-content;
}


/* --- Home: Matérias (modo padrão) --- */
.sectionTitleRow{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.segTabs--sm{ gap:6px; }
.segTabs--sm .segTab{ flex:0; padding:8px 10px; border-radius:12px; font-weight:700; }

/* --- Plano do dia --- */
.planProgressLine{ margin: 6px 2px 10px; font-size: 13px; color: var(--muted); }
.planItem{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.planItem .btn{ white-space:nowrap; }


/* --- Step 4b: Toggle Prova/Treino (seletor) --- */
.segTabs{
  display:inline-flex;
  align-items:center;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  box-shadow: 0 6px 16px rgba(17,24,39,0.06);
}
.segTabs .segTab{
  appearance:none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  transition: transform .05s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.segTabs .segTab:hover{ opacity: 0.92; }
.segTabs .segTab:active{ transform: translateY(1px); }
.segTabs .segTab:focus-visible{
  outline: 3px solid rgba(47,107,255,.35);
  outline-offset: 2px;
}
.segTabs .segTab--active{
  background: var(--blue);
  color: white;
  box-shadow: 0 10px 20px rgba(47, 108, 255, 0.28);
}

/* small variant */
.segTabs--sm{ padding: 3px; border-radius: 13px; }
.segTabs--sm .segTab{ padding: 8px 10px; border-radius: 11px; font-weight: 800; }


/* --- Step 4b: Plano do dia --- */
.planTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 2px 2px 12px;
}
.planKpi{
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.planBonus{
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
  background: rgba(47,108,255,0.10);
  border: 1px solid rgba(47,108,255,0.18);
  padding: 6px 10px;
  border-radius: 999px;
}
.planBar{
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(17,24,39,0.08);
  overflow:hidden;
  margin: 0 0 12px;
}
.planBarFill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(47,108,255,0.65);
  transition: width .25s ease;
}
.planItemDone h4::after{
  content: " ✅";
  font-weight: 900;
}


.planLeft{ display:flex; flex-direction:column; gap:2px; }


/* --- Step 5d: Missões do dia (ultra clean) --- */

.missionCard{ padding: 10px 10px; border-radius: 14px; border: 1px solid rgba(17,24,39,0.08); background: rgba(255,255,255,0.85); }
.missionTitle{ font-size: 13.5px; font-weight: 900; color: var(--text); line-height: 1.1; margin: 0; }
.missionBottom{ display:flex; align-items:center; justify-content:flex-start; }

.missionHeaderIcon{ font-size: 16px; margin-left: 6px; vertical-align: -1px; }

.missionTopRow{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin: 0 2px 4px; }
.missionKpiTop{ font-size: 12.5px; color: var(--muted); font-weight: 700; display:flex; align-items:center; gap:8px; }

.missionBonus{
  font-size: 11px;
  font-weight: 900;
  color: var(--text);
  background: rgba(47,108,255,0.10);
  border: 1px solid rgba(47,108,255,0.18);
  padding: 3px 7px;
  border-radius: 999px;
  animation: missionPulse .35s ease-in-out;
}
@keyframes missionPulse{ 0%{ transform: scale(.96); } 60%{ transform: scale(1.03);} 100%{ transform: scale(1);} }

.missionBar{ width:100%; height: 6px; border-radius: 999px; background: rgba(17,24,39,0.08); overflow:hidden; margin: 0 0 6px; }
.missionBarFill{ height:100%; width:0%; border-radius: 999px; background: rgba(47,108,255,0.65); transition: width .25s ease; }

.missionRows{ display:flex; flex-direction:column; gap:6px; }

.missionRow2{
  display:grid;
  grid-template-columns: 20px 1fr auto;
  align-items:center;
  gap:10px;
  padding: 6px 10px;
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 12px;
  background: rgba(255,255,255,0.42);
  margin-bottom: 0;
}
.missionIcon2{ width:20px; height:20px; display:flex; align-items:center; justify-content:center; font-size: 15px; }
.missionText2{ min-width:0; }
.missionMain{ font-weight: 800; color: var(--text); line-height:1.05; font-size: 14px; }
.missionSub2{ font-size: 12px; color: var(--muted); white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
.missionSub2 b{ color: var(--text); }

.missionBtn2{
  padding: 6px 9px;
  border-radius: 11px;
  font-weight: 900;
  white-space: nowrap;
  font-size: 12.5px;
}

.missionDone2{ opacity: 0.70; }
.missionDone2 .missionMain::after{ content:" ✅"; font-weight: 900; }


/* Step 5e: lighter section titles */
.sectionTitle{ font-weight: 800; }


/* ------------------ PLUS (Upsell Plans) ------------------ */
.planGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
@media (min-width: 720px){
  .planGrid{ grid-template-columns: 1fr 1fr; }
}
.planCard{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  border:1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  padding:14px 14px;
  text-align:left;
  box-shadow: var(--shadow2);
  cursor:pointer;
  transition: transform .06s ease, border-color .2s ease, box-shadow .2s ease;
  position:relative;
}
.planCard:hover{ transform: translateY(-1px); }
.planCard:active{ transform: translateY(0px) scale(.99); }
.planCard:focus-visible{
  outline: 2px solid rgba(47,107,255,.55);
  outline-offset: 2px;
}
.planCard--best{
  border-color: rgba(47,107,255,.45);
  box-shadow: 0 18px 50px rgba(47,107,255,.12);
}

.planBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-bottom: 10px;
  background: rgba(25,179,107,.14);
  color: var(--good);
  border: 1px solid rgba(25,179,107,.28);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}
.planTop{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  flex-wrap: wrap;
  row-gap: 6px;
}
.planName{
  font-weight: 900;
  font-size: 16px;
}
.planPrice{
  font-weight: 950;
  font-size: 18px;
  white-space: nowrap;
}
.planPer{
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}
.planSub{
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 520px){
  .planCard--best .planTop{ padding-right: 0; }
  .planBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-bottom: 10px;
  background: rgba(25,179,107,.14);
  color: var(--good);
  border: 1px solid rgba(25,179,107,.28);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}




}

/* Plus Upsell (Sprint 2 - Conversão) */
.plusUpsell{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.plusSub{
  font-weight: 700;
  color: var(--text);
}
.plusReason{
  font-size: 13px;
  color: var(--muted);
}
.plusBullets{
  list-style: none;
  padding: 0;
  margin: 0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.plusBullets li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-weight: 650;
}
.plusBullets li::before{
  content:"✓";
  font-weight: 900;
  color: var(--good);
}

.planToggle{
  display:flex;
  gap:8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.segBtn{
  border:1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  cursor:pointer;
}
.segBtn.is-on{
  border-color: rgba(47,107,255,.45);
  background: rgba(47,107,255,.10);
}

.btn--full{ width: 100%; }

.linkSubtle{
  appearance:none;
  -webkit-appearance:none;
  border:none;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  font-weight: 650;
  cursor:pointer;
  padding: 8px 4px;
}

.planCard{
  text-align:left;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease;
}
.planCard:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.planCard:active{
  transform: translateY(0px) scale(.99);
}
.planCard:focus-visible{
  outline: 3px solid rgba(47,107,255,.35);
  outline-offset: 2px;
}

.planCard.is-selected{
  border-color: rgba(47,107,255,.55);
  box-shadow: 0 18px 50px rgba(47,107,255,.12);
}

.planCTA{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight: 900;
}
.planArrow{
  font-weight: 900;
  opacity: .9;
}

.planMeta{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}
.planMeta--save{
  color: var(--text);
  font-weight: 850;
}

.plusFooter{
  position: sticky;
  bottom: 0;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.plusTrust{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  text-align:center;
}
.plusFooter .linkSubtle{
  display:block;
  width:100%;
  text-align:center;
  margin-top: 6px;
}



/* ---- Plus Upsell Polish (v2) ---- */
.planGrid--clean{ margin-top: 6px; }
.planHead{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  row-gap:6px;
}
.planCard{ border-radius: 18px; padding: 16px; }
.planCard--best{
  border-color: rgba(47,107,255,.40);
  background: linear-gradient(180deg, rgba(47,107,255,.06), var(--card));
}
.planCard--best .planBadge{ margin-bottom: 12px; }

.plusSub{ font-size: 14px; line-height: 1.35; }
.plusReason{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border:1px solid var(--line);
  background: rgba(47,107,255,.04);
  border-radius: 12px;
}
.plusBullets li{ font-size: 13.5px; }

.plusFooter--light{
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  margin-top: 10px;
  background: var(--card);
}
a.linkSubtle{
  display:inline-block;
  color: var(--muted);
  text-decoration: underline;
  font-weight: 650;
  padding: 6px 0;
}
.plusFooter a.linkSubtle{ width:100%; text-align:center; margin-top: 6px; }

/* Cards stack on narrow */
@media (max-width: 720px){
  .planGrid{ grid-template-columns: 1fr; }
}


/* ------------------ Minha conta (clean) ------------------ */
.pill--good{
  background: rgba(25,179,107,.14);
  color: var(--good);
  border: 1px solid rgba(25,179,107,.22);
}

.link--muted{
  color: var(--muted);
  text-decoration: none;
}
.link--muted:hover{ text-decoration: underline; }

.acctHero{
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(47,107,255,.10), rgba(47,107,255,.02));
  box-shadow: var(--shadow2);
}

.acctHero__top{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.acctPlan__label, .acctStatus__label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.acctPlan__value{
  font-size: 22px;
  font-weight: var(--w600);
  line-height: 1.1;
}
.acctPlan__value.is-plus{ color: var(--blue2); }
.acctPlan__value.is-free{ color: var(--text); }

.acctStatus__value{
  font-size: 15px;
  font-weight: var(--w600);
}
.acctStatus__value.is-active{ color: var(--good); }

.acctHero__line{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.acctExpires{
  font-size: 13px;
  color: var(--muted);
}

.acctUpgrade{
  margin-top: 12px;
  text-align: center;
}
.acctUpgrade__sub{
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.acctSection{
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px 10px;
  background: var(--card);
}

.acctSection__title{
  font-weight: var(--w600);
  margin-bottom: 6px;
}

.acctSection__sub{
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.acctRow{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.acctRow:first-of-type{ border-top: none; padding-top: 0; }
.acctRow__k{ color: var(--muted); font-size: 13px; }
.acctRow__v{ font-size: 14px; font-weight: var(--w500); text-align: right; word-break: break-word; }

.refBox{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  gap: 10px;
}
.refBox__label{
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}
.refBox__value{
  font-size: 14px;
  font-weight: var(--w600);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acctFooter{
  margin-top: 12px;
  display:flex;
  justify-content: center;
}

@media (max-width: 420px){
  .acctHero__top{ grid-template-columns: 1fr; }
  .acctRow{ flex-direction: column; align-items:flex-start; }
  .acctRow__v{ text-align: left; }
}


.acctHero__top--single{ grid-template-columns: 1fr; }

/* Conta modal: botões confortáveis no mobile */
.acctHero .btn, .acctSection .btn{ height:44px; }


.acctSection__titleRow{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.acctTiny{margin-top:6px;font-size:12px;color:var(--muted);}
.pill--muted{background: var(--pill); border: 1px solid var(--line); color: var(--muted); opacity:.9;}

.acctSection .btnRow{ margin-top: 8px; }


/* --- Proteção do banco (anti-cópia básica) --- */
.noCopy, .noCopy *{
  -webkit-user-select: none;
  user-select: none;
}

.qCard{ position: relative; }
.qWatermark{
  position:absolute;
  right: 14px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: .02em;
  opacity: .10;
  pointer-events:none;
  white-space: nowrap;
}
html[data-theme="dark"] .qWatermark{ opacity: .14; }

/* --- KPI: barra de progresso meta diária --- */
.kpiDailyBar{
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(47,107,255,.12);
  overflow: hidden;
  border: 1px solid var(--line);
}
.kpiDailyBar__fill{
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  transition: width .4s ease;
  min-width: 0%;
  max-width: 100%;
}
.kpiDailyBar__fill--done{
  background: #22c55e;
}

/* --- KPI: nível — barra de progresso para próximo nível --- */
.levelBar{
  margin-top: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(47,107,255,.12);
  overflow: hidden;
  border: 1px solid var(--line);
}
.levelBar__fill{
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  transition: width .4s ease;
}

/* --- banco de questões: texto discreto (não parece botão) --- */
.bankStatus{
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* --- "Assinar Plus" CTA para usuários free na home --- */
.plusCTA{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(47,107,255,.10) 0%, rgba(47,107,255,.05) 100%);
  border: 1px solid rgba(47,107,255,.20);
  margin-top: 12px;
}
.plusCTA__text{ font-size: 14px; font-weight: 600; color: var(--text); }
.plusCTA__sub{ font-size: 12px; color: var(--muted); margin-top: 2px; }
