/* Glitch Gallery — adversarial fixture stylesheet.
   The CSS itself is well-formed; the malformed surface is the HTML.
   A handful of editor-layout properties are included so the parser's
   CSS extraction path is also exercised against the malformed tree. */

.malformed-html {
  --bg: #0e0e14;
  --ink: #f4f4f8;
  --accent: #ff4f8b;
  --grid: rgba(255, 255, 255, 0.08);
  --rule: #2a2a36;
  --pad: 1.5rem;
}

.malformed-html * { box-sizing: border-box; }

.malformed-html {
  margin: 0;
  font: 16px/1.55 ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.malformed-html .glitch-page {
  display: grid;
  gap: 2.5rem;
  padding: 3rem clamp(1rem, 4vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}

.malformed-html .gallery-header h1 { font-size: clamp(2rem, 6vw, 4rem); margin: 0; letter-spacing: -0.02em; }
.malformed-html .gallery-header p  { color: #b9b9c6; max-width: 60ch; }

.malformed-html .exhibit {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: var(--pad);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

.malformed-html .exhibit__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); }
.malformed-html .exhibit__title { margin: 0.25rem 0 0.75rem; font-size: 1.5rem; }
.malformed-html .exhibit__caption { color: #b9b9c6; margin: 0 0 1rem; }

.malformed-html .specimen {
  padding: 1rem;
  border: 1px dashed var(--rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
}

.malformed-html .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.malformed-html .gallery-grid__feature {
  grid-column: 1 / -1;
}

.malformed-html .row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.malformed-html .pill {
  border: 1px solid var(--rule);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.malformed-html .bg-veil {
  position: relative;
  overflow: hidden;
}

.malformed-html .gallery-footer {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  color: #93939f;
}
