/* KYE Sandbox v2 — inherits design tokens from /site/styles.css
   ---------------------------------------------------------------
   The sandbox runs on the same color/spacing/type system as the
   marketing site so transitions between domains feel native. We
   only override the few things that are distinctly "sandbox":
     - a slim banner strip at the top
     - a console-style fixture viewer
     - the playground form layout
   ---------------------------------------------------------------
*/
@import url("/styles.css");

:root {
  /* sandbox local accents, but derived from the site palette */
  --sb-banner-bg: var(--success-soft);
  --sb-banner-line: var(--success-line);
  --sb-banner-fg: var(--success);
  --sb-console-bg: var(--surface-3);
  --sb-mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- banner ---------- */
.sandbox-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 18px;
  background: var(--sb-banner-bg);
  border-bottom: 1px solid var(--sb-banner-line);
  color: var(--text);
  font-size: var(--type-13);
  font-weight: 500;
}
.sandbox-banner .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sb-banner-fg);
  margin-right: 4px;
  box-shadow: 0 0 0 3px rgba(5,150,105,0.15);
}
.sandbox-banner a {
  color: var(--accent-ink, var(--accent));
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sandbox-banner a:hover { color: var(--accent); }

/* ---------- layout ---------- */
.sb-shell { max-width: 1240px; margin: 0 auto; padding: 28px 22px 80px; }
.sb-hero { padding: 32px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.sb-hero h1 { font-size: var(--type-36); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
.sb-hero p.lede { color: var(--text-muted); font-size: var(--type-16); max-width: 720px; margin: 0; }
.sb-hero .meta-row { display: flex; gap: 16px; margin-top: 20px; flex-wrap: wrap; font-size: var(--type-13); color: var(--text-dim); }
.sb-hero .meta-row strong { color: var(--text); font-weight: 600; }

.sb-grid { display: grid; gap: 18px; }
.sb-grid-2 { grid-template-columns: 1fr 1fr; }
.sb-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sb-grid-2-asym { grid-template-columns: 7fr 5fr; }
@media (max-width: 960px) {
  .sb-grid-2, .sb-grid-3, .sb-grid-2-asym { grid-template-columns: 1fr; }
}

.sb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sb-card h3 { margin: 0; font-size: var(--type-16); font-weight: 700; letter-spacing: -0.01em; }
.sb-card p { color: var(--text-muted); font-size: var(--type-14); margin: 0; }
.sb-card .stat-row { display: flex; gap: 14px; margin-top: 4px; font-size: var(--type-12); color: var(--text-dim); flex-wrap: wrap; }
.sb-card .stat-row span strong { color: var(--text); font-weight: 600; }
.sb-card a.cta {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--accent-ink, var(--accent));
}
.sb-card a.cta:hover { text-decoration: underline; }

.sb-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--type-11);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-ink, var(--accent));
  border: 1px solid var(--accent-line);
}
.sb-tag.tag-warn { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-line); }
.sb-tag.tag-ok   { background: var(--success-soft); color: var(--success); border-color: var(--success-line); }
.sb-tag.tag-bad  { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger-line); }

/* ---------- console / playground ---------- */
.sb-console {
  background: var(--sb-console-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.sb-console-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: var(--type-12);
  font-family: var(--sb-mono);
  color: var(--text-muted);
  background: var(--surface);
}
.sb-console-body { padding: 16px; }
.sb-console pre {
  background: var(--color-neutral-900);
  color: var(--color-neutral-200);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0;
  font-family: var(--sb-mono);
  font-size: var(--type-12);
  line-height: 1.55;
  overflow-x: auto;
  max-height: 540px;
}

.sb-form { display: grid; gap: 10px; }
.sb-form label {
  font-size: var(--type-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.sb-form input, .sb-form textarea, .sb-form select {
  font-family: var(--sb-mono);
  font-size: var(--type-13);
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.sb-form textarea { min-height: 140px; resize: vertical; }
.sb-form input:focus, .sb-form textarea:focus, .sb-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--focus-ring);
}
.sb-form .row-actions { display: flex; gap: 10px; margin-top: 6px; }

.sb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: var(--type-13);
  cursor: pointer;
}
.sb-btn:hover { border-color: var(--accent); color: var(--accent); }
.sb-btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.sb-btn.primary:hover { background: var(--accent); color: white; border-color: var(--accent); }
.sb-btn.ghost { background: transparent; }

/* ---------- pill / verdict ---------- */
.sb-verdict {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700;
  font-size: var(--type-13);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.sb-verdict.v-allow { background: var(--success-soft); color: var(--success); border: 1px solid var(--success-line); }
.sb-verdict.v-deny  { background: var(--danger-soft);  color: var(--danger);  border: 1px solid var(--danger-line); }
.sb-verdict.v-review{ background: var(--warning-soft); color: var(--warning); border: 1px solid var(--warning-line); }
.sb-verdict.v-quarantine { background: var(--info-soft); color: var(--info); border: 1px solid var(--info-line); }

/* ---------- table for action streams ---------- */
.sb-table { width: 100%; border-collapse: collapse; font-size: var(--type-13); }
.sb-table th, .sb-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--sb-mono);
}
.sb-table th { color: var(--text-dim); font-weight: 600; font-size: var(--type-11); text-transform: uppercase; letter-spacing: 0.04em; }
.sb-table tr:hover td { background: var(--surface-2); }
.sb-table td.center { text-align: center; }

/* ---------- evidence pack viewer ---------- */
.ep-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--type-13); }
.ep-row:last-child { border-bottom: none; }
.ep-row strong { color: var(--text-dim); font-weight: 500; font-size: var(--type-12); text-transform: uppercase; letter-spacing: 0.04em; }
.ep-row span { font-family: var(--sb-mono); font-size: var(--type-12); color: var(--text); }

/* ---------- footer ---------- */
.sb-foot {
  margin-top: 50px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  font-size: var(--type-12);
  color: var(--text-dim);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.sb-foot a { color: var(--text-muted); }
.sb-foot a:hover { color: var(--accent); }
