/* Unicorn Bench catalog styles (light and dark). */
:root {
  --bg: #fbf8ff;
  --surface: #ffffff;
  --text: #241c36;
  --muted: #6c6383;
  --border: #e7e0f3;
  --accent: #8b5cf6;
  --accent-soft: #efe7ff;
  --rainbow: linear-gradient(90deg, #ff9fcf, #ffd08a, #fff1a0, #9fe6bd, #9fcbff, #c9a8ff);
  --radius: 16px;
  --shadow: 0 8px 24px rgba(60, 40, 110, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15111f;
    --surface: #1f1a2d;
    --text: #efe9fb;
    --muted: #aaa1c0;
    --border: #342c47;
    --accent: #b794ff;
    --accent-soft: #2c2342;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--accent); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.site-header { padding: 56px 0 32px; border-bottom: 1px solid var(--border); position: relative; }
.site-header::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--rainbow); }
.site-header--small { padding: 36px 0 24px; }
.site-header h1 { margin: 0.2em 0 0.3em; font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; }
.lead { max-width: 46rem; font-size: 1.08rem; color: var(--muted); margin: 0 0 0.6rem; }
.eyebrow { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { color: inherit; text-decoration: none; }
.task-prompt { margin: 0; }

main section { margin: 40px 0; }
h2 { font-size: 1.4rem; margin: 0 0 16px; }
.muted { color: var(--muted); }

/* Comparison tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.compare thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--accent-soft); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody th a { font-weight: 700; text-decoration: none; }

/* Catalog cards */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card__preview { position: relative; height: 220px; overflow: hidden; border-bottom: 1px solid var(--border); background: #fff; }
.card__preview iframe { width: 400%; height: 400%; border: 0; transform: scale(0.25); transform-origin: 0 0; pointer-events: none; }
.card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__body h3 { margin: 0; font-size: 1.2rem; }
.card__body p { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0; padding: 0; }
.chips li { font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.button { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.button:hover, .button:focus-visible { filter: brightness(1.1); }
.button--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* Entry page */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 18px; }
.facts dt { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding-top: 12px; }
.facts dd { margin: 2px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.facts dd:last-of-type { border-bottom: 0; }
.note { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

.step { margin-top: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.step summary { cursor: pointer; font-weight: 700; }
.step h4 { margin: 14px 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.step pre { margin: 0; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 0.85rem; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.notes { padding-left: 1.2rem; }
.notes li { margin-bottom: 8px; }
.error { padding: 12px 16px; border-radius: var(--radius); background: #ffe3e3; color: #7a1d1d; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.9rem; }
