/* DegenCalc embeddable widgets (Nov 25 2026).
 * Self-contained: the /embed/<tool> pages do not load the main site CSS.
 * Colours come from CSS variables (r g b channels) set inline by the server,
 * so the widget follows the live brand and the ?theme=light / ?accent=hex options.
 * The .dce-hub-* rules style the /embed picker page, which sits inside the normal site layout.
 */
.dce-body { margin: 0; background: transparent; }
.dce, .dce * { box-sizing: border-box; }
.dce {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: rgb(var(--c-text, 240 246 252));
  background: rgb(var(--c-surface, 11 20 34));
  border: 1px solid rgb(var(--c-muted, 82 99 122) / .35);
  border-radius: 12px;
  padding: 16px;
  line-height: 1.4;
  font-size: 14px;
}
.dce-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.dce-sub { margin: 4px 0 14px; color: rgb(var(--c-muted-text, 148 163 184)); font-size: 12.5px; }
.dce-form { display: grid; gap: 12px; }
.dce-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: rgb(var(--c-muted-text, 148 163 184)); }
.dce-rangehead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.dce-rangehead label { margin: 0; }
.dce-rangeval { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 700; color: rgb(var(--c-accent, 0 229 255)); }
.dce input[type=number], .dce select {
  width: 100%; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 14px;
  color: rgb(var(--c-text, 240 246 252)); background: rgb(var(--c-bg, 6 11 20));
  border: 1px solid rgb(var(--c-muted, 82 99 122) / .55);
}
.dce input[type=number] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dce input[type=number]:focus, .dce select:focus { outline: 2px solid rgb(var(--c-accent, 0 229 255) / .6); outline-offset: 1px; }
.dce input[type=range] { width: 100%; accent-color: rgb(var(--c-accent, 0 229 255)); }
.dce-adv { border-top: 1px solid rgb(var(--c-muted, 82 99 122) / .3); padding-top: 10px; }
.dce-adv summary { cursor: pointer; font-size: 12px; font-weight: 600; color: rgb(var(--c-muted-text, 148 163 184)); }
.dce-advbody { display: grid; gap: 12px; margin-top: 10px; }

.dce-result { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgb(var(--c-muted, 82 99 122) / .3); }
.dce-banner { margin-bottom: 10px; padding: 9px 10px; border-radius: 8px; font-size: 12px; font-weight: 600;
  color: rgb(var(--c-negative, 255 77 109)); background: rgb(var(--c-negative, 255 77 109) / .1); border: 1px solid rgb(var(--c-negative, 255 77 109) / .4); }
.dce-herolabel { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--c-muted-text, 148 163 184)); }
.dce-hero { margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 30px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.dce-hero.pos { color: rgb(var(--c-positive, 0 245 155)); }
.dce-hero.neg { color: rgb(var(--c-negative, 255 77 109)); }
.dce-hero.warn { color: rgb(var(--c-warning, 245 158 11)); }
.dce-hero.acc { color: rgb(var(--c-accent, 0 229 255)); }
.dce-rows { margin-top: 12px; display: grid; gap: 7px; }
.dce-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.dce-row span { color: rgb(var(--c-muted-text, 148 163 184)); }
.dce-row b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.dce-details { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid rgb(var(--c-muted, 82 99 122) / .3); display: grid; gap: 8px; }
.dce-details[hidden], .dce-banner[hidden], .dce-chartwrap[hidden] { display: none; }
.dce-d { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; }
.dce-dicon { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800;
  border: 1px solid rgb(var(--c-muted, 82 99 122)); color: rgb(var(--c-muted-text, 148 163 184)); }
.dce-d-danger .dce-dicon { color: rgb(var(--c-negative, 255 77 109)); border-color: rgb(var(--c-negative, 255 77 109) / .6); }
.dce-d-warn .dce-dicon { color: rgb(var(--c-warning, 245 158 11)); border-color: rgb(var(--c-warning, 245 158 11) / .6); }
.dce-d-ok .dce-dicon { color: rgb(var(--c-positive, 0 245 155)); border-color: rgb(var(--c-positive, 0 245 155) / .6); }
.dce-d-compare .dce-dicon { color: rgb(var(--c-accent, 0 229 255)); border-color: rgb(var(--c-accent, 0 229 255) / .6); }
.dce-d-compare .dce-dtext { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.dce-chartwrap { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgb(var(--c-muted, 82 99 122) / .3); }
.dce-charttitle { font-size: 12px; font-weight: 600; color: rgb(var(--c-muted-text, 148 163 184)); margin-bottom: 8px; }
.dce-chartbox { position: relative; height: 200px; width: 100%; }

.dce-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgb(var(--c-muted, 82 99 122) / .3);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 11.5px; color: rgb(var(--c-muted-text, 148 163 184)); }
.dce-foot a { color: rgb(var(--c-accent, 0 229 255)); font-weight: 700; text-decoration: none; }
.dce-foot a:hover { text-decoration: underline; }

/* ---------- /embed picker page (inside the normal site layout) ---------- */
.dce-hub h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 .4rem; color: rgb(var(--c-text, 240 246 252)); }
.dce-hub .dce-lead { color: rgb(148 163 184); max-width: 46rem; margin: 0 0 1.2rem; line-height: 1.55; }
.dce-hub-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .dce-hub-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dce-hub-panel { background: rgb(var(--c-surface, 11 20 34)); border: 1px solid rgb(var(--c-muted, 82 99 122) / .35); border-radius: 12px; padding: 16px; }
.dce-hub-panel h2 { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(148 163 184); margin: 0 0 .6rem; }
.dce-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.dce-pick { text-align: left; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; color: rgb(var(--c-text, 240 246 252));
  background: rgb(var(--c-bg, 6 11 20)); border: 1px solid rgb(var(--c-muted, 82 99 122) / .5); border-radius: 10px; padding: .55rem .7rem; }
.dce-pick:hover { border-color: rgb(var(--c-accent, 0 229 255) / .7); }
.dce-pick[aria-pressed=true] { border-color: rgb(var(--c-accent, 0 229 255)); box-shadow: 0 0 0 1px rgb(var(--c-accent, 0 229 255) / .6) inset; }
.dce-opts { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: .9rem; font-size: .85rem; color: rgb(203 213 225); }
.dce-opts label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.dce-code { width: 100%; min-height: 8.5rem; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; line-height: 1.5;
  color: rgb(var(--c-text, 240 246 252)); background: rgb(var(--c-bg, 6 11 20)); border: 1px solid rgb(var(--c-muted, 82 99 122) / .5); border-radius: 8px; padding: .6rem; }
.dce-btn { cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700; border-radius: 8px; padding: .55rem 1rem; border: 0;
  color: rgb(var(--c-accent-text, 3 16 31)); background: rgb(var(--c-accent, 0 229 255)); }
.dce-btn:hover { filter: brightness(1.08); }
.dce-hint { font-size: .78rem; color: rgb(148 163 184); margin: .5rem 0 0; line-height: 1.5; }
.dce-hint a { color: rgb(var(--c-accent, 0 229 255)); }
.dce-frame { width: 100%; max-width: 560px; border: 0; border-radius: 12px; background: transparent; display: block; }
.dce-link { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: rgb(var(--c-text, 240 246 252));
  background: rgb(var(--c-bg, 6 11 20)); border: 1px solid rgb(var(--c-muted, 82 99 122) / .5); border-radius: 8px; padding: .5rem .6rem; }
