:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --teal: #0f172a;
  --primary: #2563eb;
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  color: #0f172a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header, footer {
  background: #e2e8f0;
  color: #0f172a;
  padding: 1rem 1.5rem;
}
header {
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  background: #e2e8f0;
  border-radius: 1rem;
  padding: 0.65rem 1rem;
  gap: 1rem;
}
.header-banner img {
  height: 48px;
  width: auto;
  display: block;
}
.header-metadata {
  font-size: 0.9rem;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}
main {
  flex: 1;
  width: 100%;
  padding: 1.5rem 1rem 3rem;
  display: flex;
  justify-content: center;
}
.shell {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.termometer-shell {
  background: rgba(219, 234, 254, 0.6);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(147, 197, 253, 0.5);
}
.term-area {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.term-label {
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.8);
}
.term-score {
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: #0f172a;
}
.term-bar {
  width: 100%;
  height: 36px;
  border-radius: 999px;
  position: relative;
  margin: 0.8rem 0;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.15);
  /* trilho completo com gradiente de vermelho a verde */
  background-image: linear-gradient(90deg, #dc2626 0%, #f97316 30%, #facc15 55%, #eab308 80%, #16a34a 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.term-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--term-score, 0%);
  background: #e5e7eb; /* cinza claro sólido para destacar o corte */
}
.term-description {
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.8);
  line-height: 1.5;
}
.highlight-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}
.overview-card,
.secondary-card {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.overview-card {
  text-align: center;
}
.overview-card-header {
  background: #0369a1;
  color: #f9fafb;
  padding: 0.85rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.overview-card-body {
  padding: 1.4rem 1.5rem 1.6rem;
  background: #dbeafe;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.overview-card-footer {
  padding: 0 1.5rem 1.4rem;
}
.secondary-card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #0f172a;
}
.secondary-card p {
  margin: 0;
  color: rgba(15, 23, 42, 0.75);
  line-height: 1.4;
}
.secondary-card .small-note {
  font-size: 0.8rem;
  opacity: 0.75;
  color: rgba(15, 23, 42, 0.6);
}
.criteria-bar {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  margin: 0.35rem 0 0;
  /* trilho completo com gradiente de vermelho a verde */
  background-image: linear-gradient(90deg, #dc2626 0%, #f97316 30%, #facc15 55%, #eab308 80%, #16a34a 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.criteria-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--term-score, 0%);
  background: #e5e7eb; /* cinza claro sólido para destacar o corte */
}
.criteria-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.criteria-card {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 500px;
}
.criteria-card-header {
  background: #064e3b;
  color: #f9fafb;
  padding: 0.9rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}
/* Cores da barra de topo correspondentes ao fundo de cada card */
.criteria-card:nth-child(1) .criteria-card-header { background: #064e3b; }  /* verde escuro */
.criteria-card:nth-child(2) .criteria-card-header { background: #0369a1; }  /* azul escuro */
.criteria-card:nth-child(3) .criteria-card-header { background: #5b21b6; }  /* lilás escuro */
.criteria-card:nth-child(4) .criteria-card-header { background: #a16207; }  /* amarelo escuro */
.criteria-card:nth-child(5) .criteria-card-header { background: #991b1b; }  /* vermelho escuro */
.criteria-card:nth-child(6) .criteria-card-header { background: #0c4a6e; }  /* azul muito escuro */
.criteria-card:nth-child(7) .criteria-card-header { background: #27272a; }  /* cinza escuro */
.criteria-card:nth-child(8) .criteria-card-header { background: #701a75; }  /* rosa/lilás escuro */
.criteria-card:nth-child(9) .criteria-card-header { background: #713f12; }  /* creme escuro */
.criteria-card:nth-child(10) .criteria-card-header { background: #3730a3; } /* azul-lilás escuro */
.criteria-card-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}
.criteria-card-left {
  flex: 0 0 350px;
  padding: 1.5rem;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f8fafc;
  align-self: stretch;
  overflow-y: auto;
  flex-shrink: 0;
}
.criteria-card-right {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #ffffff;
  overflow-y: auto;
  align-self: stretch;
  flex-shrink: 0;
}
.criteria-comments {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.criteria-comment {
  background: #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.criteria-comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.criteria-comment-username {
  font-weight: 600;
  font-size: 0.85rem;
  color: #0f172a;
}
.criteria-comment-date {
  font-size: 0.75rem;
  color: #64748b;
}
.criteria-comment-body {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.4;
  white-space: pre-wrap;
}
.criteria-comment-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.criteria-comment-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.criteria-comment-btn:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.25);
}
.criteria-comment-form {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.criteria-comment-form textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 0.5rem;
  font-size: 0.85rem;
  resize: vertical;
  font-family: inherit;
}
.criteria-comment-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.criteria-comment-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  justify-content: flex-end;
}
.criteria-comment-submit {
  background: #064e3b;
  color: #f9fafb;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.criteria-comment-submit:hover {
  background: #065f46;
}
.criteria-desc {
  margin: 0;
  color: rgba(15, 23, 42, 0.7);
  font-size: 0.9rem;
  text-align: center;
}
.criteria-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.criteria-score {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
}
.warning {
  background: #fef3c7;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #92400e;
  font-size: 0.85rem;
}
.legal {
  background: #111827;
  color: #e0f2fe;
  border-radius: 1.25rem;
  padding: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.legal span {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}
.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.7);
}
.no-underline {
  text-decoration: none;
  color: inherit;
}
@media (max-width: 900px) {
  .termometer-shell {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 0.75rem !important;
  }
  .header-banner img {
    height: 40px;
  }
  .header-metadata {
    align-items: center !important;
    font-size: 0.85rem;
  }
  .termometer-shell {
    padding: 1rem !important;
    border-radius: 1rem;
  }
  .highlight-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .overview-card-header,
  .criteria-card-header {
    font-size: 0.8rem;
    padding: 0.7rem 0.9rem;
  }
  .overview-card-body {
    padding: 1rem;
  }
  .term-score {
    font-size: 2rem;
  }
  .term-bar {
    height: 28px;
  }
  .criteria-card {
    min-height: auto !important;
  }
  .criteria-card-body {
    display: flex !important;
    flex-direction: column !important;
  }
  .criteria-card-left {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    padding: 1rem !important;
    min-height: auto !important;
    align-self: stretch !important;
  }
  .criteria-card-right {
    flex: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    min-height: auto !important;
    align-self: stretch !important;
  }
  .criteria-score {
    font-size: 1.5rem;
  }
  .criteria-bar {
    height: 14px;
  }
  .criteria-comment {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }
  .criteria-comment-form {
    padding: 0.6rem;
  }
  .criteria-comment-form textarea {
    font-size: 0.9rem;
  }
  .criteria-comment-form button {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  .warning {
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
  }
  .legal {
    padding: 1rem;
    font-size: 0.85rem;
  }
  .footer-links {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem;
  }
}
@media (max-width: 480px) {
  header, footer {
    padding: 0.75rem 0.5rem;
  }
  .header-inner {
    padding: 0.5rem;
  }
  .header-banner img {
    height: 36px;
  }
  .header-metadata {
    font-size: 0.8rem;
  }
  main {
    padding: 1rem 0.5rem 2rem;
  }
  .termometer-shell {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  .term-score {
    font-size: 1.8rem;
  }
  .term-bar {
    height: 24px;
  }
  .overview-card-header,
  .criteria-card-header {
    font-size: 0.75rem;
    padding: 0.6rem 0.75rem;
  }
  .overview-card-body {
    padding: 0.8rem;
  }
  .criteria-card-left {
    padding: 0.8rem;
  }
  .criteria-card-right {
    padding: 0.8rem;
  }
  .criteria-score {
    font-size: 1.3rem;
  }
  .criteria-bar {
    height: 12px;
  }
  .criteria-comment {
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
  }
  .criteria-comment-form textarea {
    min-height: 60px;
  }
  .legal {
    padding: 0.8rem;
    font-size: 0.8rem;
  }
}
