/* Gabaritaqui V7 — ajustes incrementais sobre o layout V17. */

body :is(.v17-gate,.plan-access-note,.plan-participation-note,.plan-gate-card,.ranking-plan-banner){
  margin-block:clamp(16px,2vw,24px)!important;
}

.v17-gate,.plan-access-note,.plan-participation-note,.plan-gate-card,.ranking-premium-banner,.ranking-access-card{
  scroll-margin-top:92px;
}

:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid rgba(0,140,104,.32);
  outline-offset:3px;
}

html[data-question-mode="hall"] .question-command{
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
  overflow-wrap:anywhere;
}

html[data-question-mode="hall"] .statement-media{
  min-width:0;
  display:grid;
  place-items:center;
  gap:12px;
  margin:0 20px 20px;
}

html[data-question-mode="hall"] .statement-asset{
  width:100%;
  min-width:0;
  display:grid;
  place-items:center;
  margin:0;
  padding:12px;
  border:1px solid var(--line,#dbe9e3);
  border-radius:16px;
  background:#f8fbfa;
  overflow:hidden;
}

html[data-question-mode="hall"] .statement-asset img{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:min(70vh,760px);
  margin-inline:auto;
  object-fit:contain;
  border-radius:9px;
}

.comment-toolbar{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.comment-toolbar button{
  min-width:42px;
  min-height:36px;
  display:inline-grid;
  place-items:center;
  padding:0 10px;
  border:1px solid var(--line,#dbe9e3);
  border-radius:9px;
  color:var(--ink,#05264d);
  background:#fff;
  font-weight:900;
}

.comment-toolbar button:hover,.comment-toolbar button:focus-visible{
  color:var(--green-dark,#008c68);
  border-color:#83c9a8;
  background:var(--green-soft,#e7fbf1);
}

.comment-toolbar-note{color:var(--muted,#52677a);font-size:10px}
.comment p :is(strong,em,u){color:inherit}
.comment p u{text-underline-offset:2px}

.gabaritai-feature-button{
  min-width:112px!important;
  width:auto!important;
  padding-inline:10px!important;
}

.gabaritai-feature-button.is-locked{
  color:#6b4fb0!important;
  border-color:#d5caf4!important;
  background:#f8f5ff!important;
}

.gabaritai-premium-label{font-size:9px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}

.gabaritai-premium-gate{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:13px;
  align-items:start;
  padding:14px;
  border:1px solid #d8cef6;
  border-radius:14px;
  background:#fff;
}

.gabaritai-premium-gate .button{margin-top:10px}

.question-stat-row.correct .question-stat-label strong{color:#8a5a00}
.question-stat-row.correct .question-stat-label strong::after{content:" ✓";font-size:9px}

.ranking-plan-banner{margin-inline:0}

.ranking-premium-banner{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:20px 22px;
  border:1px solid #d8c681;
  border-radius:22px;
  color:#fff;
  background:radial-gradient(circle at 8% 20%,rgba(255,213,92,.24),transparent 34%),linear-gradient(135deg,#142e4d,#62470f);
  box-shadow:0 18px 45px rgba(46,35,10,.18);
}

.ranking-premium-icon{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.28);
  border-radius:17px;
  color:#ffe28b;
  background:rgba(255,255,255,.09);
  font-size:25px;
}

.ranking-premium-banner .v17-eyebrow{color:#ffe49a}
.ranking-premium-banner h2{margin-top:4px;font-size:clamp(20px,2.6vw,28px)}
.ranking-premium-banner p{max-width:720px;margin-top:7px;color:#f4ead0;font-size:11px;line-height:1.65}
.ranking-premium-banner .button{white-space:nowrap}

.ranking-access-card .v17-card-body{display:grid;justify-items:start;gap:9px}

.v17-row-button[data-user]:not(:disabled),.comment-author[data-comment-profile]:not(:disabled){
  cursor:pointer;
  text-decoration:underline;
  text-decoration-color:transparent;
  text-underline-offset:3px;
}

.v17-row-button[data-user]:not(:disabled):hover,.v17-row-button[data-user]:not(:disabled):focus-visible,.comment-author[data-comment-profile]:not(:disabled):hover,.comment-author[data-comment-profile]:not(:disabled):focus-visible{
  color:var(--green-dark,#008c68);
  text-decoration-color:currentColor;
}

.rank-profile-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.rank-comparison-copy{margin-top:8px;padding:11px 12px;border-left:3px solid var(--green-dark,#008c68);border-radius:0 11px 11px 0;color:var(--muted,#52677a);background:var(--green-soft,#e7fbf1);font-size:10px;line-height:1.65}
.rank-social-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
.rank-social-stats span{padding:10px;border:1px solid var(--line,#dbe9e3);border-radius:12px;color:var(--muted,#52677a);background:#fff;font-size:9px;text-align:center}
.rank-social-stats strong{display:block;margin-bottom:3px;color:var(--ink,#05264d);font-size:16px}
.rank-track-list{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.rank-track-chip{display:inline-flex;align-items:center;min-height:30px;padding:6px 10px;border:1px solid #b9dfcc;border-radius:999px;color:#176b4d;background:var(--green-soft,#e7fbf1);font-size:9px;font-weight:900}
.rank-user-profile>section{display:grid;gap:3px}
.rank-user-profile .rank-subjects,.rank-user-profile .rank-badges{margin-top:8px}

@media(max-width:700px){
  .ranking-premium-banner{grid-template-columns:auto minmax(0,1fr)}
  .ranking-premium-banner .button{grid-column:1/-1;width:100%}
  .rank-profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:520px){
  body :is(.v17-gate,.plan-access-note,.plan-participation-note,.plan-gate-card,.ranking-plan-banner){margin-block:16px!important}
  html[data-question-mode="hall"] .statement-media{margin-inline:12px}
  html[data-question-mode="hall"] .statement-asset{padding:8px}
  html[data-question-mode="hall"] .question-command{hyphens:auto}
  .comment-toolbar-note{flex-basis:100%}
  .gabaritai-premium-gate{grid-template-columns:1fr}
  .ranking-premium-banner{grid-template-columns:1fr;padding:18px}
  .ranking-premium-banner .button{grid-column:auto}
  .rank-profile-stats,.rank-social-stats{grid-template-columns:1fr}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}
