/* The embed lab's own look, kept plain so it never competes with the calculator. The hostile layout's
   rules are at the end, scoped to .layout-hostile. docs/embed-lab.md. */
:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #5f6b76;
  --line: #d9dee3;
  --accent: #1d5fa8;
  --warn: #8a4b00;
  --warn-bg: #fff4e5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}
body { margin: 0 auto; max-width: 1100px; padding: 24px; line-height: 1.5; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; }
.env { font-size: 0.75rem; vertical-align: middle; background: #f0e6ff; color: #4b2a8a; border-radius: 999px; padding: 2px 10px; }
.lede { margin: 0; color: var(--muted); max-width: 70ch; }
.lab-header { display: flex; gap: 24px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.lang-box { max-width: 36ch; }
.lang { display: flex; gap: 8px; align-items: center; }
.lang-note { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; }
.lang span { color: var(--muted); font-size: 0.9rem; }
button { font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: #a11; }
.banner { margin: 16px 0; padding: 12px 16px; background: var(--warn-bg); color: var(--warn); border: 1px solid #f3c98b; border-radius: 8px; }
.how { margin: 16px 0; }
.how ol { margin: 0; padding-left: 20px; }
.status { min-height: 1.5em; color: var(--accent); }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 16px 0; }
.slot-controls { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.slot input, .slot select, .slot textarea { font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.slot textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; margin-top: 4px; }
.slot-notes { margin: 6px 0; padding-left: 20px; color: var(--warn); font-size: 0.9rem; }
.slot-notes .ok { color: #1e6b34; }
.slot-notes .info { color: var(--muted); }
.slot-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stage { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; }
.lab-footer { margin-top: 32px; color: var(--muted); font-size: 0.85rem; }

/* Layouts */
/* The bank's own content around a calculator is stand-in text: outlined and labeled so it is never read as
   part of the placement, and worded so it names no kind of calculator (docs/embed-lab.md E10). */
.bank-page { position: relative; border: 1px dashed var(--line); border-radius: 8px; padding: 28px 16px 16px; }
.bank-page-label { position: absolute; top: 6px; left: 12px; margin: 0; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fake-heading { margin: 0 0 4px; font-size: 1.2rem; }
.fake-text { color: var(--muted); }
.layout-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.fake-sidebar { width: 300px; }
.layout-phone { display: flex; justify-content: center; }
.phone { width: 390px; border: 10px solid #222; border-radius: 32px; overflow: hidden; background: #fff; }
.phone-bar { background: #222; color: #fff; font-size: 0.75rem; text-align: center; padding: 2px 0 6px; }
@media (max-width: 720px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .slot-controls { grid-template-columns: auto 1fr; }
}

/* The hostile page: rules a careless theme applies to whatever is inside it. Deliberately rude, but
   nothing a real bank site couldn't have: none targets the calculator by name or uses !important. */
.layout-hostile { font-size: 20px; line-height: 2; }
.layout-hostile .hostile-note { font-size: 0.8rem; line-height: 1.4; color: var(--muted); margin-bottom: 12px; }
.layout-hostile * { box-sizing: content-box; }
.layout-hostile div { padding: 12px; }
.layout-hostile p { margin: 2em 0; letter-spacing: 0.05em; }
.layout-hostile .hostile-wrap { overflow: hidden; transform: translateZ(0); background: #fafafa; }
.layout-hostile .hostile-row { display: flex; gap: 24px; align-items: center; }
.layout-hostile .hostile-col { flex: 1; }
.layout-hostile .hostile-main { flex: 2; }
.layout-hostile iframe { border: 3px solid #c33; max-width: 100%; vertical-align: middle; }
