/* Embedded-only projection of src/app/globals.css semantic tokens.
   The standalone document cannot activate this selector from its query alone.
   bridge.js admits embedded mode and a validated light/dark theme. */
html[data-embedded] {
  --paper: #ffffff;
  --surface: #f6f8fa;
  --ink: #1c2330;
  --muted: #434b59;
  --action: #2f6bff;
  --soft: #eaf1ff;
  --border: #cdd4dd;
  --focus: #2f6bff;
  --error: #c8362f;
  --error-soft: #fdecea;
  --literal-soft: #fdf3da;
  color-scheme: light;
}
html[data-embedded][data-theme="dark"] {
  --paper: #0b0e14;
  --surface: #141923;
  --ink: #e7ecf3;
  --muted: #b6c0cd;
  --action: #5b8bff;
  --soft: #16233f;
  --border: #3a4456;
  --focus: #5b8bff;
  --error: #f0726b;
  --error-soft: #2e1513;
  --literal-soft: #2c2310;
  color-scheme: dark;
}
html[data-embedded] body { background: var(--paper); }
html[data-embedded] body > header,
html[data-embedded] main > .intro,
html[data-embedded] body > footer { display: none; }
html[data-embedded] main { max-width: none; padding: 20px; }
html[data-embedded] .workspace { gap: 20px; }
html[data-embedded] .panel { padding: 20px; }
html[data-embedded] main > .intro + .actions { margin-top: 0; }
html[data-embedded] button,
html[data-embedded] .button,
html[data-embedded] .file-label,
html[data-embedded] .skip { background: var(--paper); color: var(--ink); }
html[data-embedded] .primary { background: var(--soft); border-color: var(--action); color: var(--ink); }
html[data-embedded] textarea::placeholder,
html[data-embedded] input::placeholder { color: var(--muted); opacity: 1; }
html[data-embedded] .status.error { background: var(--error-soft); }
html[data-embedded] td.literal { background: var(--literal-soft); }
html[data-embedded] .status { margin-bottom: 12px; }
html[data-embedded] details { margin-bottom: 0; }
@media (max-width: 700px) {
  html[data-embedded] main { padding: 16px; }
  html[data-embedded] .panel { padding: 16px; }
  html[data-embedded] .workspace { gap: 16px; }
  html[data-embedded] .file-label { width: 100%; }
  html[data-embedded] input[type=file] { max-width: 100%; }
}
