body[data-rebuild="v2"] {
  background:
    radial-gradient(circle at 0% 0%, rgba(86, 186, 126, 0.11), transparent 48%),
    radial-gradient(circle at 100% 18%, rgba(123, 207, 156, 0.09), transparent 40%),
    linear-gradient(180deg, #f8fffb, #f2fbf5 38%, #f7fdf9 100%);
}

body[data-rebuild="v2"][data-theme="metarock"] {
  --detail-accent: #2f7f58;
  --detail-soft: rgba(47, 127, 88, 0.12);
}

body[data-rebuild="v2"][data-theme="demora"] {
  --detail-accent: #28745a;
  --detail-soft: rgba(40, 116, 90, 0.14);
}

body[data-rebuild="v2"][data-theme="investors"] {
  --detail-accent: #3d8f62;
  --detail-soft: rgba(61, 143, 98, 0.14);
}

body[data-rebuild="v2"][data-theme="press"] {
  --detail-accent: #2d8a67;
  --detail-soft: rgba(45, 138, 103, 0.14);
}

body[data-rebuild="v2"][data-theme="core"] {
  --detail-accent: #338a61;
  --detail-soft: rgba(51, 138, 97, 0.13);
}

.rebuild-wrap {
  display: grid;
  gap: 20px;
}

.rebuild-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(233, 250, 239, 0.96));
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: clamp(24px, 3.7vw, 42px);
  box-shadow: 0 20px 50px rgba(30, 86, 58, 0.11);
  display: grid;
  gap: 14px;
}

.rebuild-hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  right: -72px;
  top: -130px;
  background: radial-gradient(circle, rgba(120, 214, 163, 0.24), rgba(120, 214, 163, 0));
  pointer-events: none;
}

.rebuild-breadcrumb {
  position: relative;
  z-index: 1;
  color: var(--text-2);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}

.rebuild-title {
  position: relative;
  z-index: 1;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3.4vw, 2.85rem);
  line-height: 1.1;
  color: var(--text-0);
}

.rebuild-summary {
  position: relative;
  z-index: 1;
  color: var(--text-1);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 90ch;
}

.rebuild-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rebuild-chip {
  display: inline-flex;
  border: 1px solid rgba(49, 139, 94, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.86);
  color: #24563f;
  font-size: 0.78rem;
  font-family: "JetBrains Mono", monospace;
}

.rebuild-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.rebuild-content,
.rebuild-aside {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.rebuild-content {
  padding: 16px;
  box-shadow: 0 16px 36px rgba(34, 89, 62, 0.08);
}

.rebuild-aside {
  padding: 15px;
  position: sticky;
  top: 94px;
  box-shadow: 0 12px 28px rgba(34, 89, 62, 0.07);
}

.rebuild-aside h3 {
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 11px;
  font-size: 1.02rem;
}

.rebuild-toc {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  max-height: 60vh;
  overflow: auto;
}

.rebuild-toc a {
  color: var(--text-1);
  font-size: 0.88rem;
  line-height: 1.35;
}

.rebuild-toc a:hover {
  color: var(--detail-accent, var(--brand));
}

.rebuild-foot {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 11px;
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.6;
}

.rebuild-section {
  position: relative;
  border: 1px solid rgba(63, 148, 100, 0.2);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfffc);
  padding: 15px;
  display: grid;
  gap: 9px;
}

.rebuild-section + .rebuild-section {
  margin-top: 12px;
}

.rebuild-section:nth-child(2n) {
  border-color: rgba(63, 148, 100, 0.29);
  background: linear-gradient(180deg, #fbfffd, #f2fbf5);
}

.rebuild-section h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  line-height: 1.28;
  color: #163828;
}

.rebuild-section p {
  margin: 0;
  color: var(--text-1);
  font-size: 0.94rem;
  line-height: 1.65;
}

.rebuild-list {
  margin: 0;
  padding-left: 19px;
  display: grid;
  gap: 6px;
}

.rebuild-list li {
  color: var(--text-1);
  line-height: 1.6;
  font-size: 0.93rem;
}

.rebuild-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(63, 148, 100, 0.24);
  border-radius: 12px;
}

.rebuild-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 520px;
}

.rebuild-table th,
.rebuild-table td {
  border-bottom: 1px solid rgba(63, 148, 100, 0.14);
  padding: 9px 10px;
  text-align: left;
  color: var(--text-1);
  vertical-align: top;
}

.rebuild-table th {
  color: #1b472f;
  background: rgba(67, 163, 110, 0.14);
  font-weight: 600;
}

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

@media (max-width: 1080px) {
  .rebuild-grid {
    grid-template-columns: 1fr;
  }

  .rebuild-aside {
    position: static;
  }
}
