/* Russian Doll Test — Recursion Studio.
   Modest visual treatment so the fixture is at least legible if rendered. */

.nesting-bomb {
  --bg: #0d0a14;
  --ink: #f4eee0;
  --muted: #a395b2;
  --accent: #e25822;
  --rule: #3d2c4f;
}

.nesting-bomb * {
  box-sizing: border-box;
}

.nesting-bomb {
  margin: 0;
  font-family: ui-serif, Georgia, "Iowan Old Style", serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.nesting-bomb .studio-header {
  padding: 4rem 2rem 2rem;
  border-bottom: 1px solid var(--rule);
}

.nesting-bomb .studio-title {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.01em;
}

.nesting-bomb .studio-tagline {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 50ch;
}

.nesting-bomb .studio-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
}

.nesting-bomb .studio-nav a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nesting-bomb .studio-nav a:hover {
  border-bottom-color: var(--accent);
}

.nesting-bomb .studio-main {
  max-width: 80ch;
  margin: 0 auto;
  padding: 2rem;
}

.nesting-bomb .attack {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.nesting-bomb .attack__title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  color: var(--accent);
}

.nesting-bomb .attack__note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-style: italic;
}

.nesting-bomb .attack__body {
  font-size: 0.95rem;
}

/* Visualise the doll-chain as nested rounded blocks. */
.nesting-bomb .doll {
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.nesting-bomb .doll__core {
  margin: 0;
  font-weight: bold;
}

/* Nested figure visual treatment. */
.nesting-bomb .russian-figure {
  border: 1px dashed var(--rule);
  margin: 0.5rem 0;
  padding: 0.5rem;
}

.nesting-bomb .russian-figure figcaption {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Tables — keep visible. */
.nesting-bomb .matryoshka-table {
  border-collapse: collapse;
  margin: 0.5rem 0;
  width: 100%;
}

.nesting-bomb .matryoshka-table th,
.nesting-bomb .matryoshka-table td {
  border: 1px solid var(--rule);
  padding: 0.25rem 0.5rem;
  vertical-align: top;
}

/* Recursive lists — slight indent. */
.nesting-bomb .recur-list {
  padding-left: 1rem;
  margin: 0;
}

/* Sibling storm — shrink to keep the page short. */
.nesting-bomb .storm {
  max-height: 200px;
  overflow: auto;
  padding: 0.5rem;
  border: 1px solid var(--rule);
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
}

.nesting-bomb .sibling-p {
  margin: 0;
}

/* Orphans visually distinguishable. */
.nesting-bomb .orphan-host {
  border: 1px solid var(--accent);
  padding: 0.5rem;
  margin: 0.5rem 0;
}

.nesting-bomb .orphan-li,
.nesting-bomb .orphan-dt,
.nesting-bomb .orphan-tr {
  display: block;
  color: var(--accent);
}

/* Mix-host. */
.nesting-bomb .mix-host {
  border: 1px solid var(--rule);
  padding: 0.5rem;
}

.nesting-bomb .mix-div {
  background: rgba(226, 88, 34, 0.15);
  padding: 0.25rem;
  margin: 0.25rem 0;
}

/* Aria/dup attack hosts — keep readable. */
.nesting-bomb .aria-self,
.nesting-bomb .cyc,
.nesting-bomb .dup {
  border: 1px solid var(--rule);
  padding: 0.5rem;
  margin: 0.25rem 0;
}

/* Buttons / forms — minimal. */
.nesting-bomb .outer-btn,
.nesting-bomb .inner-btn,
.nesting-bomb .middle-btn {
  background: var(--rule);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font: inherit;
}

.nesting-bomb .outer-form,
.nesting-bomb .inner-form {
  border: 1px solid var(--rule);
  padding: 0.5rem;
  margin: 0.25rem 0;
}

.nesting-bomb .outer-form label,
.nesting-bomb .inner-form label {
  display: block;
  margin-bottom: 0.25rem;
}

.nesting-bomb .studio-footer {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}
