/* Shared styles for the embeddable tools in /embed/. These pages are loaded in
   iframes on other people's sites, so they are self-contained: system fonts,
   no Google Fonts, no site nav. Add ?theme=light to the iframe URL for a light
   version that fits a white page. */
:root {
  --bg: #0b1224; --surface: rgba(255, 255, 255, 0.05); --border: rgba(255, 255, 255, 0.12);
  --text: #e8ecf6; --dim: #99a3bd; --accent: #22d3ee; --accent-2: #7c5cff;
  --ok: #22c55e; --bad: #ff5a3c; --strong: #fff;
}
[data-theme="light"] {
  --bg: #ffffff; --surface: #f3f5fa; --border: #d8dde8;
  --text: #111827; --dim: #4b5563; --accent: #0e7490; --accent-2: #5b3fd6; --strong: #000;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); padding: 14px;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1 { font-size: 16px; margin: 0 0 12px; color: var(--strong); }
label { display: block; font-size: 12.5px; color: var(--dim); margin: 0 0 4px; }
input, select, textarea {
  width: 100%; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font: inherit; font-size: 15px;
}
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.btn {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
}
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0; }
.btn:hover { border-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.stats b { display: block; font-size: 20px; color: var(--strong); }
.stats span { font-size: 12px; color: var(--dim); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--strong); font-weight: 600; }
td { color: var(--dim); }
td b { color: var(--strong); }
.choice {
  display: block; width: 100%; text-align: left; margin: 0 0 8px; padding: 9px 12px; border-radius: 8px;
  cursor: pointer; background: var(--surface); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 14.5px;
}
.choice:hover { border-color: var(--accent); }
.choice.right { border-color: var(--ok); background: rgba(34, 197, 94, 0.14); }
.choice.wrong { border-color: var(--bad); background: rgba(255, 90, 60, 0.12); }
.muted { color: var(--dim); font-size: 13px; margin: 10px 0 0; }
.credit { margin: 12px 0 0; font-size: 12px; color: var(--dim); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.credit a { color: var(--accent); text-decoration: none; }
.credit a:hover { text-decoration: underline; }
