/* ==========================================================================
   MAKE AI BETTER — AI for Science Stylesheet
   ========================================================================== */

.science-body {
  background: radial-gradient(circle at 50% 0%, #0c1424 0%, #06080e 50%, #040507 100%);
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
}

/* Ambient Glows */
.science-glow-1 {
  top: 150px;
  right: -200px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.12), transparent 70%);
}
.science-glow-2 {
  top: 900px;
  left: -200px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.14), transparent 70%);
}

/* Hero Section */
.science-hero {
  padding-top: 145px;
  padding-bottom: 70px;
  text-align: center;
  position: relative;
  z-index: 2;
}
.science-title {
  font-size: 3.4rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}
.science-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 840px;
  margin: 0 auto 3rem auto;
}

/* Stats Strip */
.science-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  width: 100%;
}
.science-stat-box {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--transition-smooth);
}
.science-stat-box:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: 0 10px 25px rgba(0, 255, 136, 0.15);
}
.stat-num {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.stat-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.2rem;
}
.stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Showcase Section */
.science-showcase-section {
  padding: 40px 0 80px 0;
  position: relative;
  z-index: 2;
}

/* Domain Selector Pills */
.domain-selector-pills {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.domain-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 0.7rem 1.4rem;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all var(--transition-fast);
}
.pill-icon {
  font-size: 1.15rem;
}
.domain-pill:hover {
  color: #ffffff;
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.domain-pill.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--accent-green);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.25);
}

/* Domain Content Card */
.domain-content-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  transition: all var(--transition-smooth);
}
.domain-left-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.domain-theme-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-green);
}
.domain-headline {
  font-size: 2.2rem;
  line-height: 1.25;
}
.domain-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Domain Key Innovations List */
.domain-innovations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.innovation-item {
  display: flex;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.innovation-bullet {
  color: var(--accent-cyan);
  font-weight: bold;
}
.innovation-content h5 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.innovation-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Domain Right Interactive Simulator */
.domain-right-sim {
  background: rgba(8, 10, 18, 0.85);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.6);
}
.sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}
.sim-header h4 {
  font-size: 1.05rem;
  color: #ffffff;
}
.sim-canvas-area {
  flex-grow: 1;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 1.25rem;
}
.sim-footer-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sim-readout-strip {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.readout-label { color: var(--text-muted); }
.readout-val { color: var(--accent-green); font-weight: 700; }

/* Matrix Section */
.science-matrix-section {
  padding: 60px 0 100px 0;
  position: relative;
  z-index: 2;
}
.science-bottom-cta {
  margin-top: 4rem;
  background: linear-gradient(135deg, rgba(13, 19, 36, 0.9) 0%, rgba(10, 13, 25, 0.9) 100%);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 3.5rem 2.5rem;
  text-align: center;
}
.science-bottom-cta h3 {
  font-size: 2rem;
  margin-bottom: 0.85rem;
}
.science-bottom-cta p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2rem auto;
}
.cta-buttons-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Specific Mini Simulator Widgets */
.protein-structure-mock {
  display: flex;
  align-items: center;
  gap: 12px;
}
.amino-acid-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.2);
  border: 2px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
  transition: transform 0.3s;
}
.amino-acid-node.mutated {
  border-color: var(--accent-red);
  background: rgba(255, 51, 102, 0.25);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.5);
}

.transit-curve-box {
  width: 100%;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.star-orb {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, #fbbf24 0%, #f59e0b 60%, transparent 80%);
  box-shadow: 0 0 35px #f59e0b;
  position: relative;
}
.planet-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0f172a;
  border: 1px solid #38bdf8;
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive */
@media (max-width: 992px) {
  .science-title { font-size: 2.6rem; }
  .science-stats-strip { grid-template-columns: repeat(2, 1fr); }
  .domain-content-card { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .science-title { font-size: 2rem; }
  .science-stats-strip { grid-template-columns: 1fr; }
  .domain-selector-pills { justify-content: flex-start; overflow-x: auto; padding-bottom: 0.5rem; }
  .domain-content-card { padding: 1.75rem 1.25rem; }
}

/* ── Astronomy Transit Simulator Improvements ─────────────── */
.star-orb {
  animation: star-pulse 3s ease-in-out infinite;
}
@keyframes star-pulse {
  0%, 100% { box-shadow: 0 0 35px #f59e0b, 0 0 60px rgba(251,191,36,0.3); }
  50%       { box-shadow: 0 0 55px #f59e0b, 0 0 90px rgba(251,191,36,0.5); }
}
.planet-orb {
  /* position driven by motion.dev — override transition to none for motion control */
  transition: none;
  box-shadow: 0 0 6px #38bdf8;
}

/* ── Protein Chain Connectors ─────────────────────────────── */
.protein-structure-mock {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  justify-content: center;
}
.amino-acid-node {
  position: relative;
  flex-shrink: 0;
  transition: transform 0.3s, box-shadow 0.3s;
}
.amino-acid-node:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(0,255,136,0.7);
}
.amino-acid-node:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green), transparent);
  margin: 0 2px;
  vertical-align: middle;
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
}

/* ── Domain Content Card Animations ──────────────────────── */
#domain-content-card {
  will-change: transform, opacity;
}
.innovation-item {
  transition: background 0.2s;
}
.innovation-item:hover {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}

/* ==========================================================================
   GRÁFICOS — tokens, moldura, interação
   Paleta de séries validada contra a superfície #101322 (modo escuro):
   banda de luminosidade, piso de croma, separação para daltonismo (pior par
   adjacente ΔE 9,5 deutan), piso de visão normal e contraste — todos passando.
   Vermelho fica de fora das séries: é reservado para estado de erro.
   ========================================================================== */
:root {
  --chart-c1: #02a6b0;  /* ciano   */
  --chart-c2: #bd8701;  /* âmbar   */
  --chart-c3: #ab68fe;  /* roxo    */
  --chart-c4: #09ae5c;  /* verde   */
  --chart-c5: #d94fa0;  /* magenta */
  --chart-c6: #0b8fd0;  /* azul    */

  --chart-grid: rgba(255, 255, 255, 0.07);
  --chart-ink: #94a3b8;
  --chart-ink-strong: #cbd5e1;
}

.chart-slot {
  flex-grow: 1;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* gráfico ancorado no topo, não boiando no meio */
  position: relative;
  padding-top: 0.35rem;
}

.chart-figure {
  margin: 0;
  position: relative;
  width: 100%;
}

.mab-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Grade e eixos recessivos: o dado é a figura, a grade é o fundo. */
.chart-gridline {
  stroke: var(--chart-grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.chart-tick {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--chart-ink);
}
.chart-tick-y { text-anchor: end; }
.chart-tick-x { text-anchor: middle; }
.chart-tick-cat {
  font-family: var(--font-body);
  font-size: 12px;
  fill: var(--chart-ink-strong);
}
.chart-axis-label {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--chart-ink);
  letter-spacing: 0.02em;
}
.chart-value-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--chart-ink-strong);
}

.chart-line { transition: opacity var(--transition-fast); }
.chart-bar { transition: opacity var(--transition-fast); }
.chart-crosshair {
  stroke: var(--chart-ink);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}
.chart-focus-dot {
  stroke: #0b0e18;           /* anel da superfície: separa o ponto da linha */
  stroke-width: 2;
  pointer-events: none;
}
.chart-capture { cursor: crosshair; }

/* Tooltip em HTML (não em SVG): herda fonte, quebra linha e fica acima de tudo */
.chart-tooltip {
  position: absolute;
  z-index: 10;
  transform: translate(-50%, calc(-100% - 14px));
  pointer-events: none;
  background: rgba(8, 11, 20, 0.96);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: nowrap;
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.15rem 0.9rem;
}
.chart-tooltip[hidden] { display: none; }
.chart-tooltip .tip-head {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.3rem;
  margin-bottom: 0.15rem;
}
.chart-tooltip .tip-key {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
}
.chart-tooltip .tip-key i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: 0 0 auto;
}
.chart-tooltip b {
  font-family: var(--font-mono);
  color: #ffffff;
  text-align: right;
}

/* Legenda — presente sempre que houver 2+ séries */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; }

.chart-caption {
  margin-top: 0.75rem;
  font-size: 0.73rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.chart-caption a { color: var(--text-link); }

/* Controles do explorador de trânsito */
.chart-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
  margin-top: 1rem;
}
.chart-control { display: flex; flex-direction: column; gap: 0.35rem; }
.control-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-secondary);
}
.control-label output {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
}
.chart-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;                /* alvo de toque, não a espessura visível */
  background: transparent;
  cursor: pointer;
}
.chart-control input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.chart-control input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.chart-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2px solid #050811;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
.chart-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2px solid #050811;
}
.chart-control input[type="range"]:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

.chart-readout {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.chart-readout b {
  font-family: var(--font-mono);
  color: #ffffff;
}

/* Tabela de apoio — mesma informação fora do canal visual */
.chart-table-toggle { margin-top: 0.9rem; }
.chart-table-toggle summary {
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
}
.chart-table-toggle summary:hover { color: #ffffff; }
.chart-data-table {
  width: 100%;
  margin-top: 0.6rem;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.chart-data-table th,
.chart-data-table td {
  padding: 0.3rem 0.5rem;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.chart-data-table thead th,
.chart-data-table tbody th { text-align: left; color: var(--text-primary); }

/* Estado pendente — honesto sobre o que ainda não tem fonte */
.chart-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 2.5rem 1.5rem;
  min-height: 260px;
  border: 1px dashed var(--border-light);
  border-radius: 14px;
  color: var(--text-muted);
}
.chart-pending-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-secondary);
}
.chart-pending-desc {
  margin: 0;
  max-width: 34ch;
  font-size: 0.82rem;
  line-height: 1.6;
}
.chart-pending-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* Ícones de domínio (substituem os emoji) */
.domain-icon { flex: 0 0 auto; }
.domain-pill .domain-icon { opacity: 0.75; transition: opacity var(--transition-fast); }
.domain-pill.active .domain-icon,
.domain-pill:hover .domain-icon { opacity: 1; }

.matrix-row-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}
.matrix-row-head .domain-icon { color: var(--accent-cyan); opacity: 0.8; }

.table-caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 0.9rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Foco visível em todo controle operável do painel */
.domain-pill:focus-visible,
.chart-table-toggle summary:focus-visible,
.domain-content-card:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .chart-controls { grid-template-columns: 1fr; }
  .chart-slot { min-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .chart-line,
  .chart-bar { transition: none; }
}

/* A navbar é fixa (73px): sem isto, rolar até uma seção por âncora deixa o topo
   dela — inclusive a primeira fileira de abas — coberto pelo header, e o clique
   acerta a navbar em vez do alvo. */
.science-hero,
.science-showcase-section,
.science-matrix-section,
section[id] {
  scroll-margin-top: 96px;
}

/* Superfície usada como anel de separação nas marcas sobrepostas */
:root { --chart-surface: #0b0e18; }

.chart-leader {
  stroke: var(--chart-grid);
  stroke-width: 1.5;
}
.chart-dot,
.chart-marker { transition: r var(--transition-fast); }

/* Alternador de vistas dentro de um painel */
.view-switcher {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  margin-bottom: 0.9rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}
.view-switch {
  padding: 0.38rem 0.8rem;
  min-height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.view-switch:hover { color: #ffffff; }
.view-switch.active {
  background: rgba(0, 240, 255, 0.16);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.35);
}
.view-switch:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* Ressalvas metodológicas — sempre disponíveis, nunca escondidas do leitor */
.chart-caveats { margin-top: 0.55rem; }
.chart-caveats summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.72rem;
}
.chart-caveats summary:hover { color: #ffffff; }
.chart-caveats ul {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.chart-caveats li { line-height: 1.55; }

/* Seção comparativa entre domínios */
.matrix-chart {
  margin-bottom: 2rem;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: rgba(8, 10, 18, 0.55);
}

/* Base de comparação de cada fator: "Nx" sem denominador não informa nada */
.matrix-basis {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.73rem;
  line-height: 1.5;
}
.matrix-basis dt { color: var(--text-secondary); font-weight: 600; }
.matrix-basis dd {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.speedup-cell { white-space: nowrap; }
.score-basis {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  line-height: 1.4;
  color: var(--text-muted);
  white-space: normal;
}
.score-absent {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  cursor: help;
}

@media (max-width: 860px) {
  .matrix-chart { padding: 1.25rem 0.9rem; }
  .matrix-basis { grid-template-columns: 1fr; gap: 0.15rem; }
  .matrix-basis dd { margin-bottom: 0.5rem; }
}

/* ==========================================================================
   Acervo de recursos por domínio
   ========================================================================== */
.resources-section { padding-top: 1rem; }
.resources { display: flex; flex-direction: column; gap: 2.6rem; }

.res-group-title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 0.9rem;
}

.res-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.res-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}
.res-card:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.res-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}
.res-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.35;
  color: var(--text-primary);
}
.res-host {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-what {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* A primeira ação concreta: é o que separa "li sobre" de "usei" */
.res-try {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
  padding: 0.6rem 0.7rem;
  border-left: 2px solid var(--accent-cyan);
  background: rgba(0, 240, 255, 0.045);
  border-radius: 0 8px 8px 0;
}
.res-try b { color: var(--accent-cyan); font-weight: 600; }

.res-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.15rem; }
.res-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.res-badge.is-good {
  color: var(--accent-green);
  border-color: rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.07);
}

.res-note {
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
}
.res-note a { color: var(--text-link); }

@media (max-width: 560px) {
  .res-grid { grid-template-columns: 1fr; }
  .res-head { flex-direction: column; gap: 0.2rem; }
  .res-host { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .res-card { transition: none; }
  .res-card:hover { transform: none; }
}

/* Sequências biológicas e identificadores longos não têm espaço para quebrar:
   sem isto, um `try_this` com uma sequência de aminoácidos vaza do card. */
.res-try, .res-what { overflow-wrap: anywhere; }
