/* ==========================================================================
   Autoblocker Testlab - styles
   Plain CSS, no dependencies (Google Fonts is deliberately third party and may
   be blocked by the autoblocker -> fallback font stack).
   ========================================================================== */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-alt: #f0f2f5;
  --border: #dfe3e8;
  --text: #16181d;
  --text-muted: #5c6470;
  --accent: #1a56db;
  --accent-dark: #143fa5;
  --ok: #0f7b3f;
  --ok-bg: #e6f4ec;
  --blocked: #b3261e;
  --blocked-bg: #fceceb;
  --warn: #8a5a00;
  --warn-bg: #fdf3e0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); letter-spacing: -.01em; }
h3 { font-size: .95rem; }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: .875em; background: var(--surface-alt); padding: .1em .35em; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding-block: .5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
}
.brand-mark { font-size: 1.15rem; }
.site-nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.nav-link {
  display: inline-block;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  background: var(--surface);
}
.nav-link:hover { color: var(--text); border-color: #c6ccd4; }
.nav-link[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  padding: 3rem 0 2.5rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.variant-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: #e8eefc;
  color: var(--accent-dark);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.lead { max-width: 68ch; color: var(--text-muted); font-size: 1.05rem; }

.cmp-snippet-preview {
  margin: 1.5rem 0;
  background: #10141c;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow: hidden;
}
.snippet-label {
  display: block;
  margin-bottom: .6rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8b98ab;
}
.cmp-snippet-preview pre {
  margin: 0;
  overflow-x: auto;
  color: #e6edf6;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.7;
  white-space: pre;
}

/* ---------- Buttons ---------- */
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  font-weight: 500;
  padding: .55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover { border-color: #c6ccd4; background: var(--surface-alt); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- Sections ---------- */
.section { padding: 2.75rem 0; border-bottom: 1px solid var(--border); }
.section-note { max-width: 72ch; color: var(--text-muted); }

.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.embed-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.embed-card figcaption {
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--mono);
}
.embed-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-alt);
}
.embed-frame iframe,
.embed-frame > div,
.embed-frame > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.embed-frame--dynamic {
  max-width: 560px;
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; margin-top: 1.5rem; }
.info-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .9rem;
}
.info-table th,
.info-table td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--border); }
.info-table th { background: var(--surface-alt); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.info-table tr:last-child td { border-bottom: 0; }

/* ---------- Runtime log ---------- */
.dynamic-output {
  margin-top: 1.25rem;
  padding: .85rem 1rem;
  min-height: 3rem;
  background: #10141c;
  color: #d7e2f0;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.dynamic-output:empty::before { content: "No runtime tests executed yet."; color: #6f7d90; }

/* ---------- Pixels / images ---------- */
.pixel-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; margin-top: 1.25rem; }
.tracking-pixel { border: 1px solid var(--border); }
.external-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

/* ---------- Footer ---------- */
.site-footer { padding: 2rem 0 3rem; color: var(--text-muted); font-size: .875rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
