/* Solred · descarga v6 «Acreción» (tema oscuro por defecto; tema claro con data-sdl-theme="light"). Todo bajo .sdl; no toca body, botones ni Bootstrap globales. */
.sdl {
  --sdl-text: #ffffff; --sdl-text-2: #b9ced9; --sdl-action: #c51e39; --sdl-action-hover: #d8304c;
  --sdl-receiving: #78bdea; --sdl-verified: #f28fa3; --sdl-success: #48cda5; --sdl-warning: #f4c66a; --sdl-error: #ff8a93;
  --sdl-focus: #9fd6ff; --sdl-line: #5d8298;
  container-type: inline-size; container-name: sdl;
  position: relative; overflow: hidden; overflow: clip; isolation: isolate;
  box-sizing: border-box; font-family: 'Poppins', sans-serif; color: var(--sdl-text); line-height: 1.45;
  background: #112835; background: linear-gradient(135deg, #112835 0%, #122e3f 55%, #24445b 100%); /* colores del home de solred.app; el canvas pinta el mismo degradado encima */
}
.sdl-frame { position: relative; min-height: 760px; padding: 22px 44px 26px; display: flex; flex-direction: column; gap: 10px; }
.sdl-nav { min-width: 0; }
.sdl *, .sdl *::before, .sdl *::after { box-sizing: border-box; }
.sdl p, .sdl h2, .sdl dl, .sdl dd, .sdl ul { margin: 0; padding: 0; }
.sdl [hidden] { display: none !important; }
.sdl-sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; }

/* Arriba */
.sdl-top { display: flex; flex-direction: column; gap: 12px; }
.sdl-top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.sdl-file { min-width: 0; max-width: 760px; display: grid; gap: 6px; }
.sdl-kicker { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--sdl-text-2); font-variant-numeric: tabular-nums; white-space: pre-wrap; }
.sdl-name { font-size: 28px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sdl-top-right { display: flex; align-items: center; gap: 12px; flex: none; }
.sdl-sim { font-size: 12px; color: var(--sdl-warning); border: 1px dashed #8a7444; border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.sdl-slot { display: flex; gap: 8px; }

/* Centro: área de la nube y semilla */
.sdl-core { position: relative; display: grid; place-items: center; min-height: 400px; flex: 1 1 auto; width: 100%; }
.sdl-seed-host { display: grid; place-items: center; }
.sdl-seed-host:empty { display: none; }

.sdl-btn { font: inherit; color: var(--sdl-text); cursor: pointer; border: 1px solid transparent; background: transparent; font-variant-numeric: tabular-nums; transition: background-color .2s, border-color .2s, box-shadow .2s; }
.sdl-btn:focus-visible { outline: 3px solid var(--sdl-focus); outline-offset: 4px; }
.sdl-btn[aria-disabled="true"] { cursor: progress; opacity: .8; }
.sdl-btn--seed { width: 164px; height: 164px; border-radius: 50%; display: grid; align-content: center; justify-items: center; gap: 4px; padding: 0 14px; text-align: center;
  background: radial-gradient(circle at 50% 38%, #d8304c 0%, #c51e39 62%, #a8172f 100%); border-color: rgba(255, 255, 255, .28);
  box-shadow: 0 0 0 12px rgba(197, 30, 57, .12), 0 0 0 26px rgba(197, 30, 57, .05), 0 0 70px rgba(242, 143, 163, .28); }
.sdl-btn--seed:hover { box-shadow: 0 0 0 12px rgba(197, 30, 57, .2), 0 0 0 26px rgba(197, 30, 57, .08), 0 0 80px rgba(242, 143, 163, .36); }
.sdl-seed-label { font-size: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.sdl-seed-sub { font-size: 13px; font-weight: 500; color: #ffe2e9; }

/* Abajo */
/* Barra inferior fija: se queda abajo en la ventana mientras se desplaza el componente */
.sdl-bottom { position: sticky; bottom: 0; z-index: 2; margin: 0 -44px -26px; padding: 36px 44px 18px;
  background: linear-gradient(180deg, rgba(18, 46, 63, 0) 0%, rgba(18, 46, 63, .7) 34%, rgba(18, 46, 63, .9) 100%);
  display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.6fr) auto; grid-template-areas: "state facts actions" "foot foot foot"; gap: 16px 40px; align-items: end; }
.sdl-chunks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: block;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%); }
.sdl-chunk-glow { position: absolute; z-index: -1; pointer-events: none; border-radius: 2px; background: #ffe2e9; opacity: 0;
  box-shadow: 0 0 4px 2px rgba(255, 226, 233, .95), 0 0 12px 5px rgba(242, 143, 163, .85), 0 0 26px 10px rgba(197, 30, 57, .5); }
.sdl-chunk-glow.is-on { animation: sdl-chunk-send var(--sdl-glow-d, 2000ms) cubic-bezier(.15, .7, .35, 1) forwards; }
@keyframes sdl-chunk-send { 0% { opacity: 0; transform: scale(.6); } 6% { opacity: 1; transform: scale(1.8); } 30% { opacity: .85; transform: scale(1.3); } 100% { opacity: 0; transform: scale(1); } }
.sdl-state { grid-area: state; display: grid; gap: 8px; min-width: 0; }
.sdl-progress { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sdl-pct { font-size: 42px; font-weight: 500; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sdl-pct-label { font-size: 14px; color: var(--sdl-text-2); }
.sdl-status { display: flex; align-items: flex-start; gap: 10px; }
.sdl-status-icon { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--sdl-receiving); }
.sdl-status-icon svg { width: 22px; height: 22px; display: block; }
.sdl[data-sdl-tone="neutral"] .sdl-status-icon { color: var(--sdl-text-2); }
.sdl[data-sdl-tone="warning"] .sdl-status-icon { color: var(--sdl-warning); }
.sdl[data-sdl-tone="error"] .sdl-status-icon { color: var(--sdl-error); }
.sdl[data-sdl-tone="success"] .sdl-status-icon { color: var(--sdl-success); }
.sdl-status-text { min-width: 0; }
.sdl-status-title { font-size: 20px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.sdl-status-detail { font-size: 14px; color: var(--sdl-text-2); overflow-wrap: anywhere; text-wrap: pretty; }
.sdl[data-sdl-tone="error"] .sdl-status-detail { color: var(--sdl-error); }

.sdl-facts { grid-area: facts; display: flex; flex-wrap: wrap; gap: 14px 36px; padding-bottom: 4px; }
.sdl-fact { min-width: 0; }
.sdl-fact dt { font-size: 12px; color: var(--sdl-text-2); letter-spacing: .04em; }
.sdl-fact dd { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sdl-sources { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sdl-source { display: inline-flex; align-items: center; gap: 8px; }
.sdl-glyph { display: inline-block; flex: none; border-radius: 50%; }
.sdl-glyph--peer { width: 6px; height: 6px; background: #fff; box-shadow: 0 0 6px 2px rgba(255, 255, 255, .45); }
.sdl-glyph--origin { width: 12px; height: 12px; border: 1.5px solid var(--sdl-receiving); box-shadow: inset 0 0 0 3px #112835, inset 0 0 0 6px #fff; }

.sdl-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.sdl-actions:empty { display: none; }
.sdl-btn--primary, .sdl-btn--secondary, .sdl-btn--ghost, .sdl-btn--danger { min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.sdl-btn--primary { background: var(--sdl-action); box-shadow: 0 0 22px rgba(197, 30, 57, .32); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; font-weight: 600; }
.sdl-btn--primary:hover { background: var(--sdl-action-hover); }
.sdl-btn--secondary { border-color: var(--sdl-line); background: rgba(17, 40, 53, .45); }
.sdl-btn--secondary:hover { border-color: var(--sdl-text-2); background: rgba(39, 73, 97, .45); }
.sdl-btn--ghost { color: var(--sdl-text-2); padding: 0 18px; }
.sdl-btn--ghost:hover { color: var(--sdl-text); background: rgba(39, 73, 97, .35); }
.sdl-btn--danger { border-color: var(--sdl-error); background: rgba(17, 40, 53, .45); }
.sdl-btn--danger:hover { background: rgba(255, 138, 147, .12); }

.sdl-foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding-top: 14px; border-top: 1px solid rgba(185, 206, 217, .14); font-size: 12px; color: var(--sdl-text-2); }
.sdl-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sdl-legend-item { display: flex; align-items: center; gap: 7px; }
.sdl-sw { display: inline-block; border-radius: 50%; flex: none; }
.sdl-sw--dust { width: 3px; height: 3px; border-radius: 0; background: #6d93a6; }
.sdl-sw--receiving { width: 7px; height: 7px; background: var(--sdl-receiving); box-shadow: 0 0 6px 1px rgba(120, 189, 234, .6); }
.sdl-sw--verified { width: 7px; height: 7px; background: var(--sdl-verified); box-shadow: 0 0 6px 1px rgba(242, 143, 163, .6); }
.sdl-sw--retry { width: 10px; height: 10px; border: 1.5px dashed var(--sdl-warning); }
.sdl-sw--star { width: 5px; height: 5px; background: #fff; box-shadow: 0 0 6px 2px rgba(255, 255, 255, .5); }
.sdl-note:empty { display: none; }
.sdl-sharing { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sdl-foot .sdl-slot { margin-left: auto; }
.sdl-sharing-icon { width: 16px; height: 16px; flex: none; color: var(--sdl-success); }
.sdl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@container sdl (max-width: 1020px) {
  .sdl-frame { padding: 24px 28px 22px; }
  .sdl-bottom { margin: 0 -28px -22px; padding: 32px 28px 16px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "state actions" "facts facts" "foot foot"; gap: 14px 24px; }
}
@container sdl (max-width: 640px) {
  .sdl-frame { min-height: 0; padding: 14px 16px 16px; }
  .sdl-core { flex: none; }
  .sdl-top { gap: 10px; }
  .sdl-file { max-width: 100%; }
  .sdl-kicker { letter-spacing: .08em; }
  .sdl-top-right { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
  .sdl-sim { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .sdl-name { font-size: 20px; }
  .sdl-btn--seed { box-shadow: 0 0 0 10px rgba(197, 30, 57, .12), 0 0 0 20px rgba(197, 30, 57, .05), 0 0 56px rgba(242, 143, 163, .28); }
  .sdl-core { min-height: 0; aspect-ratio: 1 / 1.12; max-height: 560px; margin: 0 -16px; width: calc(100% + 32px); }
  .sdl-btn--seed { width: 140px; height: 140px; }
  /* Móvil: barra flotante compacta */
  .sdl-bottom { margin: 0 -16px -16px; padding: 22px 16px 12px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "state state" "facts facts" "actions slot" "share share"; gap: 8px 12px; align-items: center; }
  .sdl-state { display: flex; align-items: center; gap: 12px; }
  .sdl-progress { flex: none; }
  .sdl-pct { font-size: 26px; }
  .sdl-pct-label { display: none; }
  .sdl-status { gap: 8px; }
  .sdl-status-icon, .sdl-status-icon svg { width: 18px; height: 18px; }
  .sdl-status-title { font-size: 15px; }
  .sdl-status-detail { font-size: 12px; line-height: 1.35; }
  .sdl-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 0; }
  .sdl-fact dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .sdl-fact dd { font-size: 13px; white-space: nowrap; }
  .sdl-sources { gap: 2px 10px; }
  .sdl-actions { justify-content: flex-start; gap: 6px; }
  .sdl-actions .sdl-btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
  .sdl-actions .sdl-btn--primary { font-size: 12px; }
  .sdl-foot { display: contents; }
  .sdl-legend, .sdl-note { display: none !important; }
  .sdl-foot .sdl-slot { grid-area: slot; margin-left: 0; justify-self: end; }
  .sdl-sharing { grid-area: share; font-size: 12px; min-width: 0; }
  .sdl-top-row { gap: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .sdl-btn { transition: none; } .sdl-chunk-glow { animation: none !important; opacity: 0 !important; } }

/* Archivo eliminado: sin leyenda, compartición ni acciones de la página */
.sdl[data-sdl-status="deleted"] .sdl-foot, .sdl[data-sdl-status="deleted"] .sdl-foot > * { display: none !important; }

/* ======================= Tema claro (opción theme: 'light') =======================
   Sólo cambia color: misma estructura, tamaños y comportamiento. La cabecera también es clara:
   usar el logo oscuro (assets/logo/solred-logo-oscuro.png). Fondo en grises muy claros. */
.sdl[data-sdl-theme="light"] {
  --sdl-text: #0b1e2c; --sdl-text-2: #3f5b6d; --sdl-action: #c51e39; --sdl-action-hover: #a8172f;
  --sdl-receiving: #1f6fb5; --sdl-verified: #c51e39; --sdl-success: #0b6b50; --sdl-warning: #8a5a00; --sdl-error: #b3142e;
  --sdl-focus: #0b63b3; --sdl-line: #8aa3b3;
  background: #eaecef;
}
.sdl[data-sdl-theme="light"] .sdl-sim { border-color: #b08a3a; background: rgba(255, 255, 255, .6); }
.sdl[data-sdl-theme="light"] .sdl-btn--seed, .sdl[data-sdl-theme="light"] .sdl-btn--primary { color: #fff; }
.sdl[data-sdl-theme="light"] .sdl-btn--seed { border-color: rgba(197, 30, 57, .35); box-shadow: 0 0 0 12px rgba(197, 30, 57, .1), 0 0 0 26px rgba(197, 30, 57, .05), 0 12px 40px rgba(197, 30, 57, .25); }
.sdl[data-sdl-theme="light"] .sdl-bottom { background: linear-gradient(180deg, rgba(234, 236, 239, 0) 0%, rgba(234, 236, 239, .84) 34%, rgba(234, 236, 239, .97) 100%); }
.sdl[data-sdl-theme="light"] .sdl-chunk-glow { background: #c51e39; box-shadow: 0 0 4px 2px rgba(197, 30, 57, .6), 0 0 12px 5px rgba(197, 30, 57, .3); }
.sdl[data-sdl-theme="light"] .sdl-glyph--peer { background: #1f6fb5; box-shadow: 0 0 6px 2px rgba(31, 111, 181, .3); }
.sdl[data-sdl-theme="light"] .sdl-glyph--origin { box-shadow: inset 0 0 0 3px #eaecef, inset 0 0 0 6px #0b1e2c; }
.sdl[data-sdl-theme="light"] .sdl-btn--primary { box-shadow: 0 6px 18px rgba(197, 30, 57, .28); }
.sdl[data-sdl-theme="light"] .sdl-btn--secondary, .sdl[data-sdl-theme="light"] .sdl-btn--danger { background: rgba(255, 255, 255, .72); }
.sdl[data-sdl-theme="light"] .sdl-btn--secondary:hover { border-color: var(--sdl-text-2); background: #fff; }
.sdl[data-sdl-theme="light"] .sdl-btn--ghost:hover { background: rgba(39, 73, 97, .1); }
.sdl[data-sdl-theme="light"] .sdl-btn--danger:hover { background: rgba(179, 20, 46, .08); }
.sdl[data-sdl-theme="light"] .sdl-foot { border-top-color: rgba(63, 91, 109, .22); }
.sdl[data-sdl-theme="light"] .sdl-sw--dust { background: #5d8298; }
.sdl[data-sdl-theme="light"] .sdl-sw--star { background: #12508c; box-shadow: 0 0 6px 2px rgba(63, 143, 208, .4); }
