:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --text: #18222d;
  --muted: #687481;
  --line: #d9e0e6;
  --primary: #176b87;
  --primary-strong: #0f5269;
  --success: #177245;
  --warning: #9a6200;
  --danger: #a33030;
  --shadow: 0 10px 30px rgba(24, 34, 45, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: linear-gradient(180deg, #eef4f6 0, var(--bg) 280px); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }
button, input, select, textarea { font: inherit; }
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px clamp(18px, 4vw, 48px); background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand span:last-child, .userbox > span { display: flex; flex-direction: column; }
.brand small, .userbox small { color: var(--muted); font-size: .76rem; margin-top: 2px; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: linear-gradient(145deg, var(--primary), #24a0b8); font-weight: 800; letter-spacing: -.04em; box-shadow: 0 7px 18px rgba(23,107,135,.25); }
.brand-mark.large { width: 52px; height: 52px; font-size: 1.15rem; }
.userbox { display: flex; align-items: center; gap: 10px; text-align: right; }
.navstrip { display: flex; gap: 6px; padding: 8px clamp(18px, 4vw, 48px); background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); overflow-x: auto; }
.navstrip a { padding: 8px 12px; color: var(--muted); border-radius: 9px; white-space: nowrap; font-size: .92rem; }
.navstrip a.active, .navstrip a:hover { background: var(--surface-2); color: var(--text); }
.page-shell { width: min(1180px, calc(100% - 32px)); margin: 28px auto 48px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 20px; }
.page-heading h1 { margin: 3px 0 7px; font-size: clamp(1.75rem, 3vw, 2.45rem); letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); max-width: 760px; line-height: 1.55; }
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .72rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.panel.narrow, .auth-card { max-width: 560px; margin-left: auto; margin-right: auto; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0 0 4px; font-size: 1.08rem; }
.panel-heading p { margin: 0; color: var(--muted); font-size: .88rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.metric strong { display: block; font-size: 1.9rem; letter-spacing: -.05em; }
.metric span { color: var(--muted); font-size: .86rem; }
.compact-list { display: flex; flex-direction: column; }
.compact-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 22px; align-items: center; gap: 12px; min-height: 62px; padding: 10px 18px; color: var(--text); border-bottom: 1px solid var(--line); }
.compact-row:last-child { border-bottom: 0; }
.compact-row:hover { background: #f8fafb; }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-main strong, .row-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--muted); }
.row-arrow { font-size: 1.5rem; color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status-dot.status-active { background: var(--success); }
.status-dot.status-draft { background: var(--warning); }
.status-dot.status-archived { background: #87919b; }
.type-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--primary); font-weight: 800; }
.type-icon.large { width: 48px; height: 48px; font-size: 1.4rem; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge.status-active { color: var(--success); background: #eaf7f0; }
.badge.status-draft { color: var(--warning); background: #fff5dc; }
.badge.status-archived { color: #5e6872; background: #edf0f2; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px 20px 20px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
label { display: flex; flex-direction: column; gap: 6px; color: #34414c; font-size: .82rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #cbd4db; border-radius: 10px; background: white; color: var(--text); padding: 10px 11px; outline: none; font-weight: 400; }
textarea { resize: vertical; min-height: 82px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23,107,135,.13); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 15px; border-radius: 10px; border: 1px solid transparent; font-weight: 750; cursor: pointer; }
.button.primary { background: var(--primary); color: white; }
.button.primary:hover { background: var(--primary-strong); color: white; }
.button.secondary { background: white; color: var(--text); border-color: var(--line); }
.icon-button, .icon-link { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--text); cursor: pointer; }
.icon-button:hover, .icon-link:hover { background: var(--surface-2); color: var(--primary); }
.inline-form { display: inline-flex; margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: .86rem; }
th { color: var(--muted); background: #f8fafb; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: 0; }
.actions-cell { width: 52px; text-align: right; }
.block { display: block; color: var(--muted); margin-top: 3px; }
.nowrap { white-space: nowrap; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; background: var(--surface-2); padding: 2px 5px; border-radius: 5px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 20px; align-items: start; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 30px; color: var(--muted); text-align: center; }
.placeholder-panel { min-height: 220px; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.placeholder-panel h2 { color: var(--text); margin-bottom: 6px; }
.auth-card { margin-top: 9vh; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.auth-intro { display: flex; align-items: center; gap: 14px; padding: 22px 20px 8px; }
.auth-intro h1 { margin: 0; }
.auth-intro p { margin: 4px 0 0; color: var(--muted); }
.alert { padding: 12px 15px; border-radius: 11px; margin-bottom: 14px; border: 1px solid transparent; }
.auth-card .alert { margin: 14px 20px 0; }
.alert-success { color: var(--success); background: #eaf7f0; border-color: #cbe9d7; }
.alert-warning { color: var(--warning); background: #fff7e5; border-color: #f3dfaa; }
.alert-danger { color: var(--danger); background: #fff0f0; border-color: #efcdcd; }
.alert-info { color: var(--primary); background: #edf8fb; border-color: #cde7ee; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.is-muted { opacity: .62; }
.details { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 20px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.footer { display: flex; justify-content: space-between; gap: 18px; width: min(1180px, calc(100% - 32px)); margin: 0 auto 24px; color: var(--muted); font-size: .73rem; }
@media (max-width: 860px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .span-3 { grid-column: span 2; }
  .page-heading { flex-direction: column; }
}
@media (max-width: 560px) {
  .page-shell { width: min(100% - 20px, 1180px); margin-top: 18px; }
  .topbar { padding: 10px 12px; }
  .userbox > span { display: none; }
  .navstrip { padding-left: 10px; padding-right: 10px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .compact-row { grid-template-columns: 12px minmax(0,1fr) 20px; }
  .compact-row .badge { display: none; }
  .two-cols { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
/* Fase 1B · catálogos */
.catalog-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
.catalog-card { position:relative; display:flex; flex-direction:column; min-height:138px; padding:18px; border:1px solid var(--line); border-radius:15px; background:var(--surface); box-shadow:var(--shadow); color:var(--text); }
.catalog-card:hover { transform:translateY(-1px); border-color:#a9ced8; color:var(--primary); }
.catalog-card strong { padding-right:48px; font-size:1rem; }
.catalog-card small { margin-top:auto; color:var(--muted); line-height:1.45; }
.catalog-count { position:absolute; right:16px; top:15px; min-width:34px; height:34px; padding:0 8px; display:grid; place-items:center; border-radius:11px; background:var(--surface-2); font-weight:800; }
.revision-pill { display:inline-flex; padding:8px 12px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); font-size:.8rem; }
.compact-metrics { margin:0; padding:16px; }
.catalog-editor-grid { grid-template-columns:minmax(0,1.75fr) minmax(310px,.68fr); }
.catalog-list { display:flex; flex-direction:column; }
.catalog-item { border-bottom:1px solid var(--line); }
.catalog-item:last-child { border-bottom:0; }
.catalog-item > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; cursor:pointer; list-style:none; }
.catalog-item > summary::-webkit-details-marker { display:none; }
.catalog-item > summary span:first-child { display:flex; flex-direction:column; gap:4px; }
.catalog-item > summary small { color:var(--muted); }
.catalog-item-body { padding:0 16px 18px; }
.technical-box { border:1px dashed var(--line); border-radius:11px; padding:10px 12px; background:#fafcfd; }
.technical-box > summary { cursor:pointer; color:var(--muted); font-weight:700; }
.technical-box[open] > summary { margin-bottom:10px; }
.archive-form { margin-top:10px; }
.asset-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:16px; }
.asset-card { overflow:hidden; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.asset-card > img { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; background:var(--surface-2); }
.asset-card-body { padding:12px; display:flex; flex-direction:column; gap:7px; }
.asset-card-body > small { color:var(--muted); line-height:1.45; }
.asset-card details > summary { cursor:pointer; font-weight:700; color:var(--primary); }
.compact-form { margin-top:10px; }
.drop-zone { display:flex; min-height:210px; flex-direction:column; justify-content:center; align-items:center; gap:7px; padding:16px; border:2px dashed #b7c9ce; border-radius:14px; background:#f8fbfc; text-align:center; color:var(--muted); outline:none; }
.drop-zone.is-dragging, .drop-zone:focus { border-color:var(--primary); background:#edf8fb; }
.drop-zone input { max-width:100%; margin-top:8px; }
.drop-zone img { width:100%; max-height:220px; object-fit:contain; border-radius:10px; }
.check-label { display:flex; flex-direction:row; align-items:center; gap:8px; align-self:end; min-height:42px; }
.check-label input { width:auto; }
audio { width:100%; margin-bottom:13px; }
.anchor-table { display:grid; grid-template-columns:minmax(140px,1.2fr) repeat(3,minmax(110px,1fr)) 38px; align-items:center; gap:0; margin:12px 0; border:1px solid var(--line); border-radius:11px; overflow:hidden; }
.anchor-table > * { min-height:42px; padding:9px 10px; border-bottom:1px solid var(--line); display:flex; align-items:center; }
.anchor-table > :nth-last-child(-n+5) { border-bottom:0; }
.anchor-table small { display:block; color:var(--muted); }
.anchor-head { background:#f8fafb; color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; font-weight:800; }
.coordinate-group { display:grid; grid-template-columns:120px repeat(3,1fr); gap:8px; align-items:end; border:1px solid var(--line); border-radius:11px; padding:10px; }
.coordinate-group > strong { align-self:center; }
@media(max-width:980px){.catalog-grid{grid-template-columns:repeat(2,1fr)}.asset-grid{grid-template-columns:repeat(2,1fr)}.anchor-table{grid-template-columns:1fr 1fr}.anchor-head{display:none}.anchor-table> *{border-bottom:1px solid var(--line)!important}.coordinate-group{grid-template-columns:1fr 1fr 1fr}.coordinate-group>strong{grid-column:1/-1}}
@media(max-width:560px){.catalog-grid,.asset-grid{grid-template-columns:1fr}.anchor-table{grid-template-columns:1fr}.coordinate-group{grid-template-columns:1fr}}
.anchor-cards { display:flex; flex-direction:column; gap:8px; margin:12px 0; }
.anchor-card { border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.anchor-card > summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; cursor:pointer; background:#fafcfd; }
.anchor-card > summary span:first-child { display:flex; flex-direction:column; gap:3px; }
.anchor-card > summary small { color:var(--muted); }
.anchor-values { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:10px 12px; }
.anchor-values span { display:flex; flex-direction:column; gap:4px; }
.anchor-values small { color:var(--muted); }
.anchor-edit-form { padding:4px 12px 12px; }
@media(max-width:700px){.anchor-values{grid-template-columns:1fr}}

/* Fase 1C · editor de acciones tipadas */
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.scene-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.metric-danger { border-color: #e1a4a4; background: #fff8f8; }
.metric-warning { border-color: #ead49b; background: #fffcf4; }
.issue-badge { color: var(--danger); background: #fff0f0; }
.action-list { display: flex; flex-direction: column; }
.action-row { display: grid; grid-template-columns: 38px 34px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 66px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: white; }
.action-row:last-child { border-bottom: 0; }
.action-row:hover { background: #f9fbfc; }
.action-row.status-disabled { opacity: .62; background: #f7f8f9; }
.action-row.status-archived { opacity: .45; background: #f2f3f4; }
.action-row.has-error { box-shadow: inset 3px 0 0 var(--danger); }
.action-order { display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .78rem; }
.action-type-icon { width: 32px; height: 32px; font-size: .78rem; }
.action-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.action-main > small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.action-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-controls { display: flex; align-items: center; gap: 4px; }
.icon-button.danger:hover { color: var(--danger); background: #fff0f0; }
.action-issues { margin-top: 3px; color: var(--danger); font-size: .77rem; }
.action-issues summary { cursor: pointer; font-weight: 700; }
.issue { margin-top: 4px; padding: 5px 8px; border-radius: 7px; background: #fff0f0; }
.issue-warning { color: var(--warning); background: #fff7e5; }
.static-row { color: var(--text); }
.panel-padding { padding: 18px 20px; }
.typed-action-form { padding-bottom: 4px; }
.action-type-picker { padding: 18px 20px 0; max-width: 440px; }
.action-type-fixed { display: flex; gap: 10px; align-items: center; padding: 18px 20px 0; }
.action-type-fixed div { display: flex; flex-direction: column; gap: 2px; }
.action-type-fixed small { color: var(--muted); }
.action-form-common { border-bottom: 1px solid var(--line); }
.action-fields { border-bottom: 1px solid var(--line); background: #fcfdfe; }
.action-fields[hidden], [data-placement-group][hidden], [data-destination-group][hidden], [data-provider-field][hidden], [data-only-type][hidden] { display: none !important; }
.action-form-actions { gap: 10px; padding: 18px 20px; }
.form-hint { margin: -6px 20px 18px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.checkbox-label { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 42px; align-self: end; }
.checkbox-label input { width: auto; }
select[multiple] { min-height: 160px; }
.compact-form-grid { padding-bottom: 14px; }
@media (max-width: 900px) {
  .action-row { grid-template-columns: 30px 32px minmax(0,1fr); }
  .action-controls { grid-column: 2 / -1; justify-content: flex-end; padding-bottom: 3px; }
}
@media (max-width: 560px) {
  .scene-metrics { grid-template-columns: 1fr 1fr; }
  .action-row { grid-template-columns: 24px 30px minmax(0,1fr); padding-left: 7px; padding-right: 7px; }
  .action-title .badge { display: none; }
  .action-controls { overflow-x: auto; justify-content: flex-start; }
  .heading-actions { width: 100%; justify-content: flex-start; }
}
/* Fase 1D · lenguaje seguro */
.language-projects{display:flex;flex-direction:column}.language-project-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;border-bottom:1px solid var(--line)}.language-project-card:last-child{border-bottom:0}.language-project-card>div:first-child{display:flex;flex-direction:column;gap:3px}.language-project-card small{color:var(--muted)}.language-links{display:flex;gap:8px;flex-wrap:wrap}.syntax-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.syntax-grid>div{display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fafcfd}.syntax-grid code{width:max-content}.syntax-grid small{color:var(--muted);line-height:1.45}.template-list{display:flex;flex-direction:column}.template-card{border-bottom:1px solid var(--line)}.template-card:last-child{border-bottom:0}.template-card>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;cursor:pointer}.template-card>summary span:first-child{display:flex;flex-direction:column;gap:4px}.template-card>summary small{color:var(--muted)}.template-card-body{padding:0 18px 18px}.variant-list{display:flex;flex-direction:column;gap:8px;padding-left:22px}.variant-list li{padding:8px 10px;border-radius:9px;background:#f8fafb}.variant-list li span{display:block}.variant-list li small{color:var(--muted)}.json-preview{margin:0 0 12px;padding:12px;max-height:300px;overflow:auto;border:1px solid var(--line);border-radius:10px;background:#17212b;color:#e8f0f5;font-size:.78rem;white-space:pre-wrap}.token-list{display:flex;gap:7px;flex-wrap:wrap}
@media(max-width:760px){.syntax-grid{grid-template-columns:1fr}.language-project-card{align-items:flex-start;flex-direction:column}}

/* Fase 1E · versiones, sesiones y eventos en vivo */
.runtime-project-list,.release-list,.execution-list,.release-launch-list,.release-scene-list,.runtime-variable-list,.frame-list,.event-journal{display:flex;flex-direction:column}
.runtime-project-card{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:18px;align-items:center;padding:16px 18px;border-bottom:1px solid var(--line)}
.runtime-project-card:last-child{border-bottom:0}.runtime-project-main{display:flex;flex-direction:column;gap:4px}.runtime-project-main small{color:var(--muted)}
.runtime-project-metrics{display:flex;gap:10px}.runtime-project-metrics span{display:flex;min-width:76px;flex-direction:column;align-items:center;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:#fafcfd}.runtime-project-metrics strong{font-size:1.05rem}.runtime-project-metrics small{color:var(--muted);font-size:.7rem}
.runtime-project-actions{display:flex;gap:8px;flex-wrap:wrap}.runtime-event-type-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.runtime-event-type-grid>div{display:flex;flex-direction:column;gap:6px;padding:12px;border:1px solid var(--line);border-radius:11px;background:#fafcfd}.runtime-event-type-grid small{color:var(--muted)}
.runtime-release-grid{grid-template-columns:minmax(0,1.65fr) minmax(300px,.7fr)}.release-row,.execution-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;gap:11px;align-items:center;min-height:68px;padding:10px 14px;border-bottom:1px solid var(--line);color:var(--text);text-decoration:none}.release-row:last-child,.execution-row:last-child{border-bottom:0}.release-row:hover,.execution-row:hover{background:#f9fbfc}.release-number{display:inline-grid;place-items:center;min-width:42px;height:34px;padding:0 8px;border-radius:9px;background:var(--surface-2);font-weight:900;color:var(--primary)}.release-mini-metrics{color:var(--muted);font-size:.78rem;white-space:nowrap}
.release-metrics{grid-template-columns:repeat(6,minmax(0,1fr))}.release-integrity{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 14px;align-items:center}.release-integrity code{overflow-wrap:anywhere}.release-integrity>span{font-weight:800;color:var(--primary)}.release-integrity>small{grid-column:1/-1;color:var(--muted)}
.release-scene-card,.release-launch-card{border-bottom:1px solid var(--line)}.release-scene-card:last-child,.release-launch-card:last-child{border-bottom:0}.release-scene-card>summary,.release-launch-card>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;cursor:pointer}.release-scene-card>summary span:first-child,.release-launch-card>summary span:first-child{display:flex;flex-direction:column;gap:4px}.release-scene-card>summary small,.release-launch-card>summary small{color:var(--muted)}.release-action-list{display:flex;flex-direction:column;padding:0 18px 16px}.release-action-list>div{display:grid;grid-template-columns:140px minmax(0,1fr) auto;gap:10px;padding:8px 10px;border-top:1px solid var(--line);align-items:center}.release-action-list small{color:var(--muted)}.runtime-launch-form{padding:4px 18px 16px}
.runtime-state{display:inline-flex;align-items:center;justify-content:center;padding:6px 9px;border-radius:999px;font-size:.7rem;font-weight:900;letter-spacing:.03em;text-transform:uppercase;white-space:nowrap;background:#eef2f4;color:#53636b}.state-running,.state-processed,.state-ready{background:#e9f7ef;color:#1f7446}.state-paused,.state-waiting,.state-received{background:#fff5d9;color:#8a6500}.state-completed,.state-acknowledged{background:#e7f4fb;color:#176687}.state-cancelled,.state-rejected,.state-failed{background:#fff0f0;color:#a33737}.state-created,.state-pending,.state-leased{background:#eef2f4;color:#53636b}
.runtime-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.runtime-control-buttons{display:flex;gap:9px;flex-wrap:wrap}.button.danger{border-color:#d99090;background:#fff4f4;color:#a52f2f}.button.danger:hover{background:#ffe9e9}.button:disabled{opacity:.45;cursor:not-allowed}.runtime-main-grid{grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr)}
.runtime-variable-row{display:grid;grid-template-columns:minmax(180px,.65fr) minmax(0,1.35fr) auto;gap:12px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--line)}.runtime-variable-row:last-child{border-bottom:0}.variable-key{display:flex;flex-direction:column;gap:4px}.variable-key small{color:var(--muted)}.runtime-variable-row pre{margin:0;max-height:140px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.78rem;color:var(--text);background:#f8fafb;border:1px solid var(--line);border-radius:8px;padding:8px}
.frame-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px 14px;border-bottom:1px solid var(--line)}.frame-row:last-child{border-bottom:0}.frame-depth{display:inline-grid;place-items:center;width:34px;height:30px;border-radius:8px;background:var(--surface-2);font-size:.72rem;font-weight:800;color:var(--muted)}
.runtime-event-forms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.runtime-event-form{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fafcfd}.runtime-event-form>strong{font-size:.96rem}.runtime-event-form label{display:flex;flex-direction:column;gap:5px}.form-note{margin:0;color:var(--muted);font-size:.78rem;line-height:1.45}
.event-row{border-bottom:1px solid var(--line)}.event-row:last-child{border-bottom:0}.event-row>summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px 16px;cursor:pointer}.event-row.event-rejected,.event-row.event-failed{box-shadow:inset 3px 0 0 #d96a6a}.event-sequence{font-variant-numeric:tabular-nums;font-weight:900;color:var(--primary)}.event-detail{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:0 16px 16px}.event-detail>div{display:flex;min-width:0;flex-direction:column;gap:6px}.event-detail>div:first-child{grid-column:1/-1}.event-detail pre{margin:0;max-height:260px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:10px;border-radius:9px;background:#17212b;color:#e8f0f5;font-size:.75rem}.event-detail code{overflow-wrap:anywhere}.event-error{grid-column:1/-1;padding:10px;border-radius:9px;background:#fff0f0;color:#a33737}
@media(max-width:1050px){.runtime-event-type-grid{grid-template-columns:repeat(2,1fr)}.release-metrics{grid-template-columns:repeat(3,1fr)}.runtime-project-card{grid-template-columns:minmax(0,1fr) auto}.runtime-project-actions{grid-column:1/-1}.release-row,.execution-row{grid-template-columns:auto minmax(0,1fr) auto}.release-row .badge,.release-row .release-mini-metrics,.execution-row .release-mini-metrics{display:none}.release-row .row-arrow,.execution-row .row-arrow{display:block}}
@media(max-width:760px){.runtime-event-type-grid,.runtime-event-forms{grid-template-columns:1fr}.runtime-project-card{grid-template-columns:1fr}.runtime-project-metrics{justify-content:flex-start}.release-metrics,.runtime-metrics{grid-template-columns:1fr 1fr}.runtime-variable-row{grid-template-columns:1fr}.release-action-list>div{grid-template-columns:1fr}.event-detail{grid-template-columns:1fr}.event-detail>div{grid-column:1}.release-integrity{grid-template-columns:1fr}.release-integrity>small{grid-column:1}.release-row,.execution-row{grid-template-columns:auto minmax(0,1fr)}.release-row .row-arrow,.execution-row .row-arrow{display:none}}

/* Fase 1F · motor determinista y simulador local */
.engine-toolbar{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.engine-state-groups{display:flex;flex-direction:column;gap:10px}.engine-state-groups h3{margin:8px 0 0;font-size:.88rem}.state-runnable{background:#e9f7ef;color:#1f7446}.state-idle{background:#eef2f4;color:#53636b}.state-waiting_command,.state-waiting_time,.state-waiting_condition,.state-claimed{background:#fff5d9;color:#8a6500}.state-fired{background:#e7f4fb;color:#176687}.state-active{background:#e9f7ef;color:#1f7446}.state-deleted{background:#fff0f0;color:#a33737}.table-wrap{overflow:auto}.table-wrap table{width:100%;border-collapse:collapse}.table-wrap th,.table-wrap td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;font-size:.82rem}.table-wrap th{color:var(--muted);background:#fafcfd;white-space:nowrap}


/* Fase 1J · asset library */
.asset-library-row{display:flex;justify-content:space-between;gap:1rem;align-items:center;text-decoration:none;color:inherit}
.asset-library-row span:first-child{display:flex;flex-direction:column;gap:.25rem}
.endpoint-box{display:flex;flex-direction:column;gap:.6rem}
.endpoint-box code{overflow-wrap:anywhere}
.hash-cell{font-size:.78rem;overflow-wrap:anywhere}
.json-preview{max-height:32rem;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.asset-status-actions{display:flex;gap:.5rem;flex-wrap:wrap;padding:0 1rem 1rem}
.clean-list{margin:.5rem 0 1rem;padding-left:1.25rem}
.button.danger{border-color:#a33;background:#7b2424;color:#fff}


/* Fase 1J.4 · navegación clara desde listado de proyectos */
.project-title-link {
    color: inherit;
    text-decoration: none;
}
.project-title-link:hover,
.project-title-link:focus-visible {
    text-decoration: underline;
}
.compact-button.project-edit-button {
    white-space: nowrap;
    padding: .45rem .7rem;
    min-height: auto;
}
