:root {
  --bg-dark: #0b0b0b;
  --bg-sidebar: #050505;
  --bg-card: #121212;
  --bg-card-alt: #1a1a1a;
  --text: #ffffff;
  --text-mid: rgba(255, 255, 255, 0.76);
  --text-muted: rgba(255, 255, 255, 0.55);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --revo-red: rgb(224, 0, 0);
  --revo-red-soft: rgba(224, 0, 0, 0.12);
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 80px;
  --radius: 6px;
  --font-main: "Inter", sans-serif;
}

body.light-mode {
  --bg-dark: #f2f2f2;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-alt: #e8e8e8;
  --text: #111111;
  --text-mid: #3f3f3f;
  --text-muted: rgba(0, 0, 0, 0.54);
  --border-color: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a.method-card-link {
  color: inherit;
  text-decoration: none;
}

.revo-content-wrap {
  margin-left: var(--sidebar-collapsed-width);
  min-height: 100vh;
}

.method-shell {
  width: 100%;
  padding: 32px 48px 80px;
}

.method-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.eyebrow {
  color: var(--revo-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.method-hero h1 {
  font-size: 34px;
  line-height: 1.05;
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.method-hero p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
  max-width: 840px;
  margin: 0;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-card,
.info-card,
.method-card,
.reference-card,
.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.metric-card {
  padding: 16px;
  min-height: 92px;
}

.metric-card span,
.card-kicker {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.metric-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  color: var(--text);
}

.section {
  margin: 0 0 36px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 19px;
  margin: 0;
  letter-spacing: 0;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.method-card {
  padding: 18px;
  min-height: 100%;
}

.method-card:hover,
.reference-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-alt);
  transform: translateY(-2px);
}

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--revo-red-soft);
  color: var(--revo-red);
  margin-bottom: 14px;
}

.card-icon i { font-size: 20px; }

.method-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.25;
}

.method-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.method-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-mid);
  font-size: 11px;
  line-height: 1;
}

.badge.red {
  color: #ffffff;
  border-color: var(--revo-red);
  background: var(--revo-red);
}

.info-card {
  padding: 18px;
}

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

.ops-card {
  min-width: 0;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.ops-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-alt);
  transform: translateY(-2px);
}

.ops-card h3 {
  font-size: 15px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.ops-card p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.ops-card .info-list {
  margin-top: 12px;
}

.ops-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.ops-metrics span {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--text-mid);
  background: var(--bg-card-alt);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.info-card h3 {
  font-size: 14px;
  margin: 0 0 12px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.info-list li {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.info-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--revo-red);
  position: absolute;
  top: 8px;
  left: 0;
}

.reference-card {
  display: block;
  padding: 16px;
  text-decoration: none;
}

.reference-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.reference-card span {
  color: var(--text-muted);
  font-size: 11px;
  word-break: break-word;
}

.script-card {
  padding: 18px;
}

.script-card pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  line-height: 1.65;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.top-nav a {
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  padding: 8px 10px;
}

.top-nav a.active {
  background: var(--revo-red);
  border-color: var(--revo-red);
  color: #fff;
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.source-table th,
.source-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}

.source-table th {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: var(--bg-card-alt);
}

.source-table tr:last-child td { border-bottom: 0; }

@media (max-width: 1180px) {
  .grid.cards,
  .grid.pillars,
  .ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-hero { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .revo-content-wrap { margin-left: 0; padding-top: 60px; }
  .method-shell { padding: 24px 16px 48px; }
  .method-hero h1 { font-size: 28px; }
  .hero-meta,
  .grid.cards,
  .grid.pillars,
  .grid.two,
  .ops-grid { grid-template-columns: 1fr; }
}
