/* =========================================================
   Dataleth — v3 corporativa (inspiración IBM Carbon / Accenture)
   EDITABLE: paleta y tipografía en :root
   ========================================================= */
:root {
  --slate: #3F4A5C;        /* tono corporativo oscuro de marca */
  --slate-dark: #2F3846;
  --slate-darker: #262D39;
  --slate-text: #4D5A6A;   /* color del wordmark */
  --red: #D9383E;          /* CTA, enlaces, acentos */
  --red-hover: #BC2C32;
  --ink: #161B22;
  --text: #393F48;
  --muted: #6F7682;
  --border: #E0E0E0;
  --gray: #F4F4F4;
  --white: #FFFFFF;
  --font: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --brand: 'Jost', 'Josefin Sans', sans-serif;
  --maxw: 1312px;
  --pad: 32px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--white); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3 { color: var(--ink); font-weight: 400; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Marcador discreto de contenido pendiente */
.ph { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 6px; font-size: 11px; line-height: 16px; font-weight: 400; letter-spacing: .02em; color: #8A5A00; background: #FFF4D6; text-transform: none; }
.ph-dark { color: #F3D27A; background: rgba(243, 210, 122, .12); }

/* Botones (rectangulares, flecha a la derecha, estilo Carbon) */
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 48px; padding: 0 16px; font: inherit; font-size: 15px; font-weight: 400; border: 1px solid transparent; border-radius: 0; cursor: pointer; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-lg { min-height: 56px; padding: 0 18px; min-width: 260px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--red); font-size: 15px; }
.text-link svg { width: 16px; height: 16px; transition: transform .15s; }
.text-link:hover { text-decoration: underline; }
.text-link:hover svg { transform: translateX(3px); }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--slate-text); line-height: 1; }
.logo-words { display: flex; flex-direction: column; align-items: center; }
.logo-name { font-family: var(--brand); font-weight: 300; font-size: 25px; letter-spacing: .04em; }
.logo-tag { font-family: var(--brand); font-size: 7.5px; letter-spacing: .13em; color: #8D939B; margin-top: 3px; }
.logo-icon { width: 25px; height: 33px; fill: var(--red); flex: none; }
.logo-light { color: #fff; }
.logo-light .logo-tag { color: #B5BCC7; }

/* Barra superior */
.utility { background: var(--slate-darker); color: #C9CED6; font-size: 13px; }
.utility-in { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.utility nav { display: flex; gap: 24px; }
.utility a:hover { color: #fff; }

/* Navegación principal */
.masthead { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--border); }
.masthead.stuck { box-shadow: 0 1px 0 var(--border); }
.masthead-in { display: flex; align-items: center; height: 72px; gap: 40px; }
.mainnav { display: flex; align-items: stretch; height: 100%; margin-left: 8px; flex: 1; }
.mainnav > a:not(.btn) { display: flex; align-items: center; gap: 6px; padding: 0 16px; font-size: 15px; color: var(--text); border-bottom: 3px solid transparent; border-top: 3px solid transparent; transition: background .15s, border-color .15s; }
.mainnav > a:not(.btn):hover { background: var(--gray); border-bottom-color: var(--red); color: var(--ink); }
.chev { width: 14px; height: 14px; }
.mainnav-cta { display: none !important; }
.head-cta { margin-left: auto; }
.menu-btn { display: none; width: 48px; height: 48px; background: none; border: 0; cursor: pointer; margin-left: auto; padding: 14px 12px; }
.menu-btn span { display: block; height: 2px; background: var(--ink); margin: 4px 0; transition: transform .2s, opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--slate-dark); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(38,45,57,.96) 0%, rgba(47,56,70,.88) 42%, rgba(63,74,92,.45) 75%, rgba(63,74,92,.25) 100%); }
.hero-in { position: relative; padding-top: 72px; padding-bottom: 120px; }
.overline { font-size: 14px; color: #C9CED6; margin-bottom: 20px; padding-left: 14px; border-left: 3px solid var(--red); }
.hero h1 { color: #fff; font-weight: 300; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.15; max-width: 760px; letter-spacing: -.005em; }
.hero-sub { font-size: 20px; font-weight: 300; line-height: 1.5; color: #E3E6EA; max-width: 620px; margin-top: 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* Destacados (barra que se solapa con el hero) */
.highlights { position: relative; z-index: 2; margin-top: -64px; }
.highlights-in { display: grid; grid-template-columns: repeat(3, 1fr); }
.hl { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 148px; padding: 24px 64px 24px 24px; background: #fff; border: 1px solid var(--border); border-left-width: 0; transition: background .15s; }
.hl:first-child { border-left-width: 1px; }
.hl::before { content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: transparent; transition: background .15s; }
.hl:hover { background: var(--gray); }
.hl:hover::before { background: var(--red); }
.hl-k { font-size: 13px; font-weight: 500; color: var(--red); letter-spacing: .02em; }
.hl-t { font-size: 18px; color: var(--ink); line-height: 1.35; }
.hl svg { position: absolute; right: 24px; bottom: 24px; width: 20px; height: 20px; color: var(--red); transition: transform .15s; }
.hl:hover svg { transform: translateX(4px); }

/* Secciones */
.section { padding: 96px 0; }
.section-gray { background: var(--gray); }
.sec-head { display: grid; grid-template-columns: 4fr 8fr; gap: 32px; align-items: end; margin-bottom: 48px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.sec-head h2 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 300; line-height: 1.2; }
.sec-head p { font-size: 18px; font-weight: 300; color: var(--text); max-width: 640px; }
.section-gray .sec-head { border-color: #D6D6D6; }
.sec-head-row { display: flex; justify-content: space-between; align-items: end; }

/* Servicios: tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.tile { position: relative; display: flex; flex-direction: column; min-height: 280px; padding: 32px 32px 28px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; transition: background .15s; }
.tile::before { content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: transparent; transition: background .15s; }
.tile:hover { background: var(--gray); }
.tile:hover::before { background: var(--red); }
.tile-ico { width: 40px; height: 40px; fill: none; stroke: var(--slate); stroke-width: 1.4; margin-bottom: 32px; }
.tile h3 { font-size: 21px; line-height: 1.3; margin-bottom: 12px; }
.tile p { font-size: 15px; color: var(--muted); line-height: 1.55; }
.tile-link { margin-top: auto; padding-top: 28px; display: inline-flex; align-items: center; gap: 8px; color: var(--red); font-size: 15px; }
.tile-link svg { width: 16px; height: 16px; transition: transform .15s; }
.tile:hover .tile-link svg { transform: translateX(4px); }

/* Industrias */
.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #D6D6D6; border: 1px solid #D6D6D6; }
.ind { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; padding: 0 24px; background: #fff; font-size: 18px; color: var(--ink); transition: background .15s, color .15s; }
.ind svg { width: 20px; height: 20px; color: var(--red); flex: none; transition: transform .15s; }
.ind:hover { background: var(--slate); color: #fff; }
.ind:hover svg { color: #fff; transform: translateX(4px); }

/* Insights */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card { display: flex; flex-direction: column; background: var(--gray); transition: background .15s; }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--slate); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card:hover { background: #E8E8E8; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 24px 20px; min-height: 200px; }
.card-k { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.card h3 { font-size: 21px; line-height: 1.3; }
.card-link { margin-top: auto; padding-top: 24px; color: var(--red); }
.card-link svg { width: 20px; height: 20px; transition: transform .15s; }
.card:hover .card-link svg { transform: translateX(4px); }

/* Nosotros */
.about { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; background: var(--slate); }
.about-img { position: relative; overflow: hidden; }
.about-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-panel { color: #fff; padding: 88px max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad))) 88px 64px; display: flex; flex-direction: column; justify-content: center; }
.about-panel h2 { color: #fff; font-size: clamp(30px, 3.2vw, 40px); font-weight: 300; margin-bottom: 20px; }
.about-lead { font-size: 18px; font-weight: 300; color: #E3E6EA; max-width: 560px; }
.about-list { margin: 32px 0 40px; max-width: 560px; border-top: 1px solid rgba(255,255,255,.2); }
.about-list li { position: relative; padding: 14px 0 14px 28px; border-bottom: 1px solid rgba(255,255,255,.2); font-size: 15px; color: #D5DAE1; }
.about-list li::before { content: ''; position: absolute; left: 0; top: 22px; width: 12px; height: 2px; background: var(--red); }
.about-list strong { color: #fff; font-weight: 500; }
.about-panel .btn { align-self: flex-start; }

/* CTA */
.cta { position: relative; color: #fff; overflow: hidden; }
.cta-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 75%; }
.cta-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(38,45,57,.92) 0%, rgba(38,45,57,.78) 50%, rgba(38,45,57,.5) 100%); }
.cta-in { position: relative; padding-top: 96px; padding-bottom: 96px; }
.cta h2 { color: #fff; font-weight: 300; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.2; max-width: 760px; }
.cta p { font-size: 18px; font-weight: 300; color: #E3E6EA; margin: 16px 0 36px; }

/* Contacto */
.contact { display: grid; grid-template-columns: 4fr 8fr; gap: 64px; }
.contact-info h2 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 300; margin-bottom: 16px; }
.contact-info > p { font-size: 17px; font-weight: 300; margin-bottom: 32px; }
.contact-info dl { border-top: 1px solid var(--border); }
.contact-info dt { font-size: 13px; color: var(--muted); padding-top: 16px; }
.contact-info dd { padding: 4px 0 16px; border-bottom: 1px solid var(--border); color: var(--ink); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; padding: 40px; background: var(--gray); align-content: start; }
.field { display: grid; gap: 8px; font-size: 13px; color: var(--text); }
.field-full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 0; border-bottom: 1px solid #8D939B; border-radius: 0; padding: 12px 14px; width: 100%; -webkit-appearance: none; appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6l.7-.7L8 9.6l4.3-4.3.7.7z' fill='%23393F48'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: -2px; }
.form-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.form-note { font-size: 13px; color: var(--muted); max-width: 360px; }
.form-note.err { color: var(--red); }

/* Footer */
.footer { background: var(--slate-darker); color: #C9CED6; font-size: 14px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; padding: 48px 0 40px; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 48px 0 56px; }
.footer-cols h4 { margin: 0 0 16px; font-size: 14px; font-weight: 600; color: #fff; }
.footer-cols a { display: block; padding: 5px 0; }
.footer-cols a:hover, .footer-legal a:hover { color: #fff; text-decoration: underline; }
.footer-legal { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 0 28px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; color: #9AA2AE; }
.footer-legal nav { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .mainnav > a:not(.btn) { padding: 0 11px; }
  .masthead-in { gap: 20px; }
}
@media (max-width: 960px) {
  .utility span { display: none; }
  .utility-in { justify-content: flex-end; }
  .head-cta { display: none; }
  .menu-btn { display: block; }
  .mainnav { position: fixed; top: var(--menu-top, 108px); left: 0; right: 0; bottom: 0; height: auto; margin: 0; flex-direction: column; background: #fff; border-top: 1px solid var(--border); padding: 8px 0 24px; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .menu-open .mainnav { transform: none; visibility: visible; }
  .menu-open { overflow: hidden; }
  .mainnav > a:not(.btn) { min-height: 56px; padding: 0 var(--pad); justify-content: space-between; border: 0; border-bottom: 1px solid var(--border); font-size: 17px; }
  .mainnav > a:not(.btn) .chev { transform: rotate(-90deg); }
  .mainnav-cta { display: inline-flex !important; margin: 24px var(--pad) 0; min-height: 56px; }
  .tiles, .cards { grid-template-columns: repeat(2, 1fr); }
  .industries { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about-img { min-height: 320px; }
  .about-panel { padding: 64px var(--pad); }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --pad: 16px; }
  .masthead-in { height: 60px; }
  .logo-name { font-size: 21px; } .logo-tag { font-size: 6.4px; } .logo-icon { width: 21px; height: 28px; }
  .hero { min-height: 0; }
  .hero-in { padding-top: 56px; padding-bottom: 104px; }
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 17px; margin-top: 18px; }
  .hero-shade { background: linear-gradient(180deg, rgba(38,45,57,.9), rgba(47,56,70,.86)); }
  .hero-ctas { flex-direction: column; margin-top: 32px; }
  .btn-lg { width: 100%; min-width: 0; }
  .highlights-in { grid-template-columns: 1fr; }
  .hl { border-left-width: 1px; border-top-width: 0; min-height: 0; padding: 20px 56px 20px 20px; }
  .hl:first-child { border-top-width: 1px; }
  .hl svg { right: 20px; bottom: auto; top: 50%; margin-top: -10px; }
  .section { padding: 64px 0; }
  .sec-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 32px; }
  .sec-head p { font-size: 16px; }
  .sec-head-row { flex-direction: column; align-items: flex-start; }
  .tiles, .cards, .industries { grid-template-columns: 1fr; }
  .tile { min-height: 0; padding: 24px 20px; }
  .tile-ico { margin-bottom: 20px; width: 36px; height: 36px; }
  .cards { gap: 20px; }
  .card-body { min-height: 0; }
  .ind { min-height: 64px; font-size: 16px; padding: 0 20px; }
  .about-img { min-height: 240px; }
  .about-panel { padding: 48px var(--pad); }
  .cta-in { padding-top: 64px; padding-bottom: 64px; }
  .form { grid-template-columns: 1fr; padding: 24px 16px; }
  .form-foot .btn { width: 100%; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- v4: pilares ---------- */
.pillar-head { display: grid; grid-template-columns: 4fr 8fr; gap: 32px; align-items: start; padding: 0 0 28px; margin-top: 72px; }
.sec-head + .pillar-head { margin-top: 0; }
.pillar-title { display: flex; gap: 14px; align-items: baseline; }
.pillar-n { font-size: 14px; font-weight: 500; color: var(--red); }
.pillar-title h3 { font-size: 26px; font-weight: 300; line-height: 1.25; }
.pillar-desc { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.pillar-desc p { font-size: 16px; color: var(--text); max-width: 680px; }
.pillar-tag { font-size: 13px; color: var(--slate); border: 1px solid var(--slate); padding: 3px 10px; }

@media (max-width: 640px) {
  .pillar-head { grid-template-columns: 1fr; gap: 12px; margin-top: 48px; }
  .pillar-title h3 { font-size: 23px; }
}

/* ---------- Simulación ---------- */
.section-pillars .container > .pillar-head:first-child { margin-top: 0; }
.sim { background: #fff; border: 1px solid var(--border); }
.sim-bar { display: flex; justify-content: space-between; align-items: stretch; gap: 24px; border-bottom: 1px solid var(--border); padding: 0 24px 0 0; flex-wrap: wrap; }
.sim-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 1; min-width: 520px; margin: 0; padding: 0; list-style: none; }
.sim-step { width: 100%; height: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 14px 20px 16px; border: 0; border-top: 3px solid #E0E0E0; background: none; font: inherit; cursor: pointer; color: var(--muted); transition: background .15s, border-color .15s; }
.sim-step:hover { background: var(--gray); }
.sim-step-n { font-size: 12px; }
.sim-step-t { font-size: 15px; color: var(--text); }
.sim-step.is-done { border-top-color: var(--slate); }
.sim-step.is-current { border-top-color: var(--red); background: #FBFBFB; }
.sim-step.is-current .sim-step-t { color: var(--ink); font-weight: 500; }
.sim-controls { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.sim-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.sim-check input { width: 16px; height: 16px; accent-color: var(--slate); margin: 0; }
.sim-ctl { font: inherit; font-size: 14px; color: var(--slate); background: none; border: 1px solid var(--slate); min-height: 40px; padding: 0 16px; cursor: pointer; }
.sim-ctl:hover { background: var(--slate); color: #fff; }
.sim-play { min-height: 40px; min-width: 150px; }
.sim-play .i-pause, .sim-play.is-playing .i-play { display: none; }
.sim-play.is-playing .i-pause { display: block; }
.sim-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.sim-stage { position: relative; border-right: 1px solid var(--border); padding: 16px; background: #FCFCFC; }
.sim-stage svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.sim-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-bottom: 12px; font-size: 13px; }
.sim-filter span { margin-right: 12px; color: var(--muted); }
.sim-filter button { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid #C6C9CE; margin-left: -1px; background: #fff; color: var(--text); cursor: pointer; }
.sim-filter button.on { background: var(--slate); border-color: var(--slate); color: #fff; position: relative; }
.sim-filter[hidden] { display: none; }
.sim-panel { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.sim-kicker { font-size: 12px; color: var(--red); font-weight: 500; }
.sim-caption h3 { font-size: 22px; font-weight: 400; margin: 4px 0 8px; }
.sim-caption p { font-size: 14px; color: var(--text); line-height: 1.55; }
.sim-counters { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); }
.sim-counters div { padding: 12px; border-left: 1px solid var(--border); }
.sim-counters div:first-child { border-left: 0; }
.sim-counters strong { display: block; font-size: 28px; font-weight: 300; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sim-counters span { font-size: 12px; color: var(--muted); }
.sim-insights { border-top: 1px solid var(--border); }
.sim-insights[hidden] { display: none; }
.sim-insights li { position: relative; padding: 8px 0 8px 22px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
.sim-insights strong { display: block; font-weight: 500; color: var(--ink); font-size: 14px; }
.sim-insights li::before { content: ''; position: absolute; left: 0; top: 13px; width: 12px; height: 12px; }
.ins-group::before { border: 1.5px dashed var(--slate); background: rgba(63,74,92,.06); }
.ins-alert::before { background: var(--red); }
.ins-orphan::before { border: 1.5px dashed #8D939B; background: var(--gray); }
.sim-detail { border: 1px solid var(--border); padding: 16px; font-size: 13px; min-height: 120px; }
.sim-detail-empty { color: var(--muted); font-size: 13px; }
.sim-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.sim-detail h4 { margin: 0; font-size: 17px; font-weight: 500; color: var(--ink); }
.sim-tag { font-size: 11px; color: #8A5A00; background: #FFF4D6; padding: 1px 6px; white-space: nowrap; }
.sim-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; }
.sim-detail dt { color: var(--muted); }
.sim-detail dd { color: var(--ink); }
.sim-detail h5 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--ink); }
.sim-detail ul li { padding: 5px 0; border-top: 1px solid var(--border); }
.sim-detail ul li strong { font-weight: 500; }
.sim-detail ul li.is-alert { color: var(--red); }
.sim-disclaimer { margin: 0; padding: 12px 24px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: #FAFAFA; }

/* SVG */
.sim-region { opacity: 0; transition: opacity .5s; pointer-events: none; }
.sim-region.on { opacity: 1; }
.sim-region-box { fill: rgba(63,74,92,.025); stroke: #B9BEC6; stroke-dasharray: 6 5; }
.sim-region-label { font-size: 13px; fill: var(--muted); }
.sim-ghost { fill: #fff; stroke: #C6C9CE; stroke-dasharray: 4 4; }
.sim-ghost-q { font-size: 16px; fill: #A8AEB7; }
.sim-ghost-line { stroke: #CDD1D6; stroke-width: 1; stroke-dasharray: 3 4; }
.sim-cap-line { stroke: var(--slate); stroke-width: 2; stroke-dasharray: 6 4; }
.sim-cap-text { font-size: 12px; fill: var(--slate); }
.sim-edge { stroke: #A3AAB4; stroke-width: 1.5; opacity: 0; transition: opacity .3s, stroke .3s; }
.sim-edge.on { opacity: 1; }
.sim-edge.is-linked { stroke: var(--slate); stroke-width: 2.5; }
.sim-edge.alert { stroke: var(--red); stroke-width: 2.2; stroke-dasharray: 6 4; }
.sim-edge.is-dim { opacity: .12; }
.sim-pulse { fill: var(--slate); }
.sim-pulse.p-cap { fill: var(--slate); }
.sim-pulse.p-ghost { fill: #A8AEB7; }
.sim-pulse.p-alert { fill: var(--red); }
.sim-pulse.is-dim { opacity: .1; }
.sim-node { opacity: 0; transition: opacity .45s ease; cursor: default; }
.sim-node.on { opacity: 1; }
.sim-node[role="button"] { cursor: pointer; outline: none; }
.sim-node-box { fill: #fff; stroke: #C6C9CE; stroke-width: 1; transition: stroke .2s, fill .2s; }
.sim-node-bar { fill: var(--slate); }
.sim-node-label { fill: var(--ink); font-weight: 500; }
.sim-node-sub { fill: var(--muted); }
.sim-node.k-cloud .sim-node-bar { fill: #7B89A1; }
.sim-node.k-ext .sim-node-bar { fill: #B5BAC2; }
.sim-node.k-ext .sim-node-box { fill: #F7F7F7; }
.sim-node.k-sw .sim-node-box { fill: #EDEDED; }
.sim-node.k-col .sim-node-box { fill: var(--slate); stroke: var(--slate); }
.sim-node.k-col .sim-node-bar { fill: var(--red); }
.sim-node.k-col .sim-node-label { fill: #fff; }
.sim-node.k-col .sim-node-sub { fill: #D5DAE1; }
.sim-node[role="button"]:hover .sim-node-box, .sim-node[role="button"]:focus-visible .sim-node-box { stroke: var(--slate); stroke-width: 1.5; }
.sim-node.is-selected .sim-node-box { stroke: var(--slate); stroke-width: 2.5; }
.sim-node.is-alert .sim-node-box { stroke: var(--red); stroke-width: 2; fill: #FDF1F1; }
.sim-node.is-alert .sim-node-bar { fill: var(--red); }
.sim-node.is-orphan .sim-node-box { stroke: #8D939B; stroke-dasharray: 5 4; fill: #F4F4F4; }
.sim-node.is-dim { opacity: .2; }
.sim-group, .sim-callouts { opacity: 0; transition: opacity .6s; pointer-events: none; }
.sim-group.on, .sim-callouts.on { opacity: 1; }
.sim-group.is-dim { opacity: .15; }
.sim-group-box { fill: rgba(63,74,92,.05); stroke: var(--slate); stroke-width: 1.5; stroke-dasharray: 7 5; }
.sim-group-tag { fill: var(--slate); }
.sim-group-text { fill: #fff; font-size: 12px; }
.sim-callout rect { fill: #fff; stroke: #8D939B; }
.sim-callout.c-alert rect { fill: var(--red); stroke: var(--red); }
.sim-callout text { font-size: 11px; }
.sim-callout .c1 { font-weight: 600; fill: var(--ink); }
.sim-callout .c2 { fill: var(--muted); }
.sim-callout.c-alert .c1, .sim-callout.c-alert .c2 { fill: #fff; }

@media (max-width: 1100px) {
  .sim-body { grid-template-columns: 1fr; }
  .sim-stage { border-right: 0; border-bottom: 1px solid var(--border); }
  .sim-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
  .sim-caption { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .sim-bar { padding: 0; }
  .sim-steps { min-width: 0; flex-basis: 100%; }
  .sim-controls { padding: 12px 16px; flex-wrap: wrap; width: 100%; justify-content: flex-end; }
}
@media (max-width: 640px) {
  .sim-step { padding: 10px 8px 12px; }
  .sim-step-t { font-size: 11px; line-height: 1.25; }
  .sim-bar { gap: 0; }
  .sim-controls { padding: 12px 16px; }
  .sim-step-n { font-size: 11px; }
  .sim-controls { justify-content: space-between; gap: 10px; }
  .sim-play { min-width: 0; flex: 1; }
  .sim-stage { padding: 8px; }
  .sim-filter span { width: 100%; margin-bottom: 6px; }
  .sim-filter button { font-size: 12px; padding: 6px 8px; }
  .sim-panel { grid-template-columns: 1fr; padding: 20px 16px; }
  .sim-counters strong { font-size: 24px; }
  .sim-disclaimer { padding: 12px 16px; }
}

.sim-stage svg.is-mobile .sim-callout text { font-size: 10px; }
.sim-stage svg.is-mobile .sim-group-text { font-size: 11px; }
@media (max-width: 960px) { .sim-bar { gap: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sim *, .sim-stage svg * { transition: none !important; animation: none !important; }
}
