:root {
  color-scheme: light;
  --red-700: #a9182a;
  --red-500: #c62b3b;
  --navy-950: #122033;
  --navy-800: #1a2f4c;
  --navy-700: #27405f;
  --slate-700: #5b6775;
  --slate-300: #d7dee6;
  --gray-100: #f4f6f8;
  --white: #ffffff;
  --ink: #162233;
  --shadow-lg: 0 28px 70px rgba(18, 32, 51, 0.14);
  --shadow-md: 0 14px 34px rgba(18, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(198, 43, 59, 0.06), transparent 14%),
    linear-gradient(180deg, #eef2f5 0%, #f8fafc 48%, #eef2f5 100%);
}

img {
  max-width: 100%;
}

.page-shell {
  width: min(1540px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 36px;
}

.hero-panel,
.panel-card,
.table-card,
.highlight-card,
.metric-card,
.chart-card,
.simulation-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(39, 64, 95, 0.12);
  box-shadow: var(--shadow-md);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
  gap: 12px;
  padding: 8px 16px;
  background:
    radial-gradient(circle at left top, rgba(198, 43, 59, 0.24), transparent 24%),
    radial-gradient(circle at right center, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(120deg, #0f1d31 0%, #18304d 52%, #23466a 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  min-height: 88px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red-500);
}

.hero-panel .eyebrow {
  color: #ffb5be;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Merriweather", serif;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  line-height: 1.1;
}

.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.hero-meta {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 500;
}

.hero-signature {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.84);
  flex-wrap: nowrap;
}

.hero-signature-brand {
  align-items: center;
  margin-right: 4px;
}

.signature-block {
  display: grid;
  gap: 2px;
}

.hero-signature-brand .signature-block {
  text-align: right;
}

.signature-block strong {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.signature-block span {
  font-size: 0.68rem;
  line-height: 1.25;
}

.signature-divider {
  width: 1px;
  min-height: 30px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.58),
    rgba(255, 255, 255, 0.12)
  );
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.logo-frame {
  width: min(100%, 198px);
  height: 98px;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  position: relative;
}

.logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
}

.logo-fallback {
  display: none;
  position: absolute;
  inset: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: rgba(255, 255, 255, 0.72);
}

.logo-fallback.visible {
  display: flex;
}

.metrics-grid,
.summary-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.projection-tabs-card {
  margin-top: 12px;
}

.projection-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.projection-tab {
  display: block;
  border: 1px solid rgba(39, 64, 95, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--white), #f7f9fb);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.projection-tab.active {
  background: linear-gradient(130deg, rgba(39, 64, 95, 0.97), rgba(19, 42, 70, 0.95));
  border-color: rgba(19, 42, 70, 0.92);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(18, 32, 51, 0.22);
}

.projection-tab.testing {
  color: rgba(22, 34, 51, 0.64);
  border-style: dashed;
}

.status-card {
  margin-top: 12px;
}

.status-card p {
  margin: 0;
  color: rgba(22, 34, 51, 0.78);
  line-height: 1.7;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.panel-card,
.table-card,
.highlight-card,
.chart-card,
.simulation-card {
  padding: 16px;
}

.simulation-card {
  margin-top: 12px;
}

.simulation-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.simulation-control label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-700);
}

.range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.range-row input[type="range"] {
  width: 100%;
  accent-color: var(--red-500);
}

.range-row strong,
.sim-current {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-800);
}

.simulation-control p {
  margin: 12px 0 0;
  color: rgba(22, 34, 51, 0.72);
  line-height: 1.65;
}

.simulation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sim-kpi {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafbfd, #f3f6f9);
  border: 1px solid rgba(39, 64, 95, 0.08);
}

.sim-kpi span,
.sim-kpi strong {
  display: block;
}

.sim-kpi span {
  font-size: 0.86rem;
  color: var(--slate-700);
}

.sim-kpi strong {
  margin-top: 8px;
  font-size: 1.05rem;
}

.semester-panel {
  margin-top: 12px;
}

.metric-card {
  min-height: 108px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -18px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  opacity: 0.1;
}

.metric-card.red::after {
  background: var(--red-500);
}

.metric-card.navy::after {
  background: var(--navy-700);
}

.metric-card.slate::after {
  background: var(--slate-700);
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  color: var(--slate-700);
  font-size: 0.92rem;
  font-weight: 600;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  line-height: 1.1;
}

.metric-kpi-input {
  display: block;
  width: min(100%, 132px);
  margin-top: 10px;
  border: 1px solid rgba(39, 64, 95, 0.24);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: clamp(1.2rem, 1.8vw, 1.65rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy-800);
  background: var(--white);
}

.metric-kpi-input:focus {
  outline: none;
  border-color: rgba(198, 43, 59, 0.52);
  box-shadow: 0 0 0 3px rgba(198, 43, 59, 0.13);
}

.metric-card small {
  margin-top: 6px;
  color: rgba(22, 34, 51, 0.7);
  line-height: 1.55;
}

.chart-card {
  margin-top: 12px;
}

.chart-wrap {
  width: 100%;
  height: 220px;
  position: relative;
}

.chart-wrap-wide {
  aspect-ratio: 16 / 4.2;
  height: auto;
  min-height: 210px;
}

.chart-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  min-width: 250px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(18, 32, 51, 0.96);
  color: var(--white);
  box-shadow: 0 16px 32px rgba(18, 32, 51, 0.28);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  z-index: 3;
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip strong {
  margin-bottom: 6px;
  font-size: 0.84rem;
}

.chart-tooltip span {
  font-size: 0.74rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading-spread {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.section-heading h2,
.highlight-card h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.chart-legend {
  color: var(--slate-700);
  font-size: 0.82rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--red-500);
}

.legend-dot-turmas {
  background: var(--navy-700);
}

.legend-dot-provas {
  background: var(--red-500);
}

.semester-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.semester-rail-horizontal {
  display: grid;
  overflow: visible;
  padding: 4px 0;
}

.semester-rail-horizontal .semester-chip {
  min-width: 0;
}

.semester-chip {
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(39, 64, 95, 0.14);
  background: linear-gradient(180deg, var(--white), #f7f9fb);
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.semester-chip:hover,
.semester-chip.active {
  transform: translateY(-2px);
  border-color: rgba(198, 43, 59, 0.42);
  box-shadow: 0 16px 28px rgba(169, 24, 42, 0.1);
}

.semester-chip strong,
.semester-chip span {
  display: block;
}

.semester-chip strong {
  font-size: 0.8rem;
  font-weight: 700;
}

.semester-chip span {
  margin-top: 2px;
  color: var(--slate-700);
  font-size: 0.7rem;
  line-height: 1.2;
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insights-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.insights-list article {
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fafbfd, #f4f7fa);
  border: 1px solid rgba(39, 64, 95, 0.08);
}

.insights-list strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.insights-list p,
.highlight-card li {
  margin: 0;
  color: rgba(22, 34, 51, 0.72);
  line-height: 1.65;
}

.highlight-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.mini-ranking {
  display: grid;
  gap: 8px;
}

.mini-ranking div {
  padding: 10px 11px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(198, 43, 59, 0.07), rgba(39, 64, 95, 0.04));
}

.mini-ranking strong,
.mini-ranking span {
  display: block;
}

.mini-ranking strong {
  font-weight: 600;
}

.mini-ranking span {
  margin-top: 4px;
  color: var(--slate-700);
}

.course-scroll-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 4px;
}

.course-scroll-list::-webkit-scrollbar {
  width: 8px;
}

.course-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(39, 64, 95, 0.28);
  border-radius: 8px;
}

.course-row {
  padding: 9px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(198, 43, 59, 0.07), rgba(39, 64, 95, 0.04));
}

.course-row strong,
.course-row span {
  display: block;
}

.course-row strong {
  font-weight: 600;
}

.course-row span {
  margin-top: 4px;
  color: var(--slate-700);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(39, 64, 95, 0.08);
  text-align: left;
}

th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-700);
}

td {
  font-size: 0.82rem;
}

.chart-grid-line {
  stroke: rgba(39, 64, 95, 0.12);
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--slate-700);
  font-size: 11px;
  font-family: "IBM Plex Sans", sans-serif;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: var(--white);
  stroke-width: 2.5;
}

.chart-point-label {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.chart-point-label-turmas {
  fill: var(--navy-700);
}

.chart-point-label-provas {
  fill: var(--red-700);
}

.chart-line-turmas {
  stroke: var(--navy-700);
}

.chart-line-provas {
  stroke: var(--red-500);
}

.chart-point-turmas {
  stroke: var(--navy-700);
}

.chart-point-provas {
  stroke: var(--red-700);
}

.chart-hit-area {
  fill: transparent;
  cursor: pointer;
}

.chart-axis-title {
  font-size: 12px;
  font-weight: 700;
  fill: var(--ink);
}

.selected-guide {
  stroke: rgba(39, 64, 95, 0.28);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.selected-ring {
  fill: #ffffff;
  stroke: #111f34;
  stroke-width: 2.5;
}

.selected-ring-turmas {
  stroke: var(--navy-700);
}

.selected-ring-provas {
  stroke: var(--red-700);
}

@media (max-width: 1080px) {
  .hero-panel,
  .projection-tabs,
  .metrics-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-title-row,
  .hero-signature {
    flex-wrap: wrap;
  }

  .hero-brand {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-signature-brand .signature-block {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 1380px);
    padding-top: 18px;
  }

  .hero-panel,
  .panel-card,
  .table-card,
  .highlight-card,
  .metric-card,
  .chart-card,
  .simulation-card {
    border-radius: 18px;
  }

  .hero-panel {
    padding: 14px 16px;
    gap: 16px;
  }

  .section-heading-spread {
    flex-direction: column;
    align-items: flex-start;
  }

  .simulation-grid,
  .simulation-summary,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-signature {
    gap: 8px;
  }

  .signature-divider {
    min-height: 28px;
  }
}
