/* ModbusPilot marketing pages - styles for the live demo widgets. */
.mk .mono, .mk [class^="d"] .mono { font-family: var(--mono); }
.d-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--mk-line); font-size: 12.5px; color: var(--mk-muted); background: color-mix(in srgb, var(--mk-card-2) 80%, transparent); min-width: 0; }
.d-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; flex: none; }
.d-bar > i:nth-child(2) { background: #febc2e; }
.d-bar > i:nth-child(3) { background: #28c840; margin-right: 6px; }
.d-bar > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--mk-fg); font-weight: 600; }
.d-bar > em { margin-left: auto; font-style: normal; font-size: 11px; white-space: nowrap; }
.d-win { position: absolute; inset: 22px; border-radius: 14px; border: 1px solid var(--mk-line-2); background: var(--mk-card); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6); }
.d-live { color: var(--mk-ok); }
.d-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mk-ok); margin-right: 6px; animation: mk-blink 1.2s steps(1) infinite; }
@keyframes mk-flash { 0% { background: color-mix(in srgb, var(--c, var(--mk-a1)) 30%, transparent); } 100% { background: transparent; } }
@keyframes mk-pop { 0% { opacity: 0; transform: translateY(8px) scale(0.96); } 100% { opacity: 1; transform: none; } }

/* ---------- hero window ---------- */
.hx-win { text-align: left; border-radius: 18px; border: 1px solid var(--mk-line-2); background: var(--mk-card); overflow: hidden; box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 120px -40px color-mix(in srgb, var(--mk-a2) 60%, transparent); }
[data-theme="light"] .hx-win { box-shadow: 0 40px 100px -40px rgba(20, 30, 60, 0.45); }
.hx-conn { color: var(--mk-ok); font-size: 12.5px; white-space: nowrap; }
.hx-conn::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mk-ok); margin-right: 6px; box-shadow: 0 0 8px var(--mk-ok); }
.hx-tool { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--mk-line); flex-wrap: wrap; }
.hx-dash { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--mk-line); flex-wrap: wrap; min-width: 0; }
.hx-title { font-size: 13px; font-weight: 700; white-space: nowrap; }
.hx-sub { text-transform: none; letter-spacing: 0; font-weight: 500; opacity: 0.75; }
.hx-tool img { width: 22px; height: 22px; padding: 3px; border-radius: 6px; background: var(--mk-card-2); border: 1px solid var(--mk-line); }
.hx-chip { margin-left: 8px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--mk-a1) 15%, transparent); color: var(--mk-a1); font-weight: 600; }
.hx-count { margin-left: auto; font-size: 12px; color: var(--mk-muted); font-family: var(--mono); }
.hx-count b { color: var(--mk-fg); font-weight: 600; margin-right: 6px; }
.hx-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 380px; }
.hx-left { border-right: 1px solid var(--mk-line); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hx-right { padding: 14px; min-width: 0; }
.hx-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mk-muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hx-crc { font-size: 10.5px; padding: 1px 8px; border-radius: 999px; color: var(--mk-ok); background: color-mix(in srgb, var(--mk-ok) 15%, transparent); letter-spacing: 0.04em; }
.hx-log { font-family: var(--mono); font-size: 12px; height: 176px; overflow: hidden; background: #05070a; border-radius: 10px; padding: 8px 10px; border: 1px solid var(--mk-line); display: flex; flex-direction: column; justify-content: flex-end; }
.hx-line { display: flex; gap: 8px; white-space: nowrap; color: #c9d1dd; animation: mk-pop 0.35s ease-out; line-height: 1.75; }
.hx-line .t { color: #5c6678; }
.hx-line .d { font-weight: 700; width: 20px; }
.hx-line.tx .d { color: #74c0fc; }
.hx-line.rx .d { color: #8ce99a; }
.hx-line .b { overflow: hidden; text-overflow: ellipsis; }
.hx-frame { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: 10px; background: var(--mk-card-2); border: 1px solid var(--mk-line); min-height: 70px; align-content: flex-start; }
.hx-frame .g { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 5px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c, #888) 45%, transparent); transition: transform 0.3s, box-shadow 0.3s, background 0.3s; animation: mk-pop 0.3s ease-out; }
.hx-frame .g b { font-family: var(--mono); font-size: 13px; color: var(--c, var(--mk-fg)); padding: 0 2px; }
.hx-frame .g i { font-style: normal; font-size: 9.5px; color: var(--mk-muted); white-space: nowrap; }
.hx-frame .g-hdr, .hx-frame .g-crc { --c: var(--mk-muted); border-style: dashed; }
.hx-frame .g-hdr { flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: 110px; }
.hx-frame .g-hdr i { flex-basis: 100%; text-align: center; }
.hx-frame .g.hl { background: color-mix(in srgb, var(--c) 18%, transparent); transform: translateY(-3px); box-shadow: 0 8px 22px -8px var(--c); }
.hx-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.hx-card { position: relative; padding: 12px 12px 10px 15px; border-radius: 12px; background: var(--mk-card-2); border: 1px solid var(--mk-line); overflow: hidden; transition: border-color 0.3s, box-shadow 0.3s; min-width: 0; }
.hx-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.hx-card.wide { grid-column: 1 / -1; }
.hx-card.hl { border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent), 0 10px 30px -14px var(--c); }
.hx-card.flash { animation: mk-flash 0.9s ease-out; }
.hx-card.alarm { border-color: var(--mk-err); }
.hx-card.alarm .hx-v b { color: var(--mk-err); }
.hx-card.alarm::after { content: "HIGH"; position: absolute; bottom: 9px; right: 10px; font-size: 10px; font-weight: 700; color: var(--mk-err); border: 1px solid var(--mk-err); padding: 0 5px; border-radius: 4px; }
.hx-l { font-size: 12.5px; color: var(--mk-muted); }
.hx-addr { font-family: var(--mono); font-size: 10.5px; opacity: 0.8; margin-right: 4px; }
.hx-v { margin: 4px 0 2px; white-space: nowrap; }
.hx-v b { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hx-v small { color: var(--mk-muted); font-size: 13px; font-weight: 600; }
.hx-card.wide .hx-v { margin: 0; }
.hx-spark { width: 100%; height: 26px; display: block; }
.hx-spark polyline { fill: none; stroke: var(--c); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.hx-raw { font-size: 11px; color: var(--mk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-raw code { font-size: 11px; padding: 0 4px; }
.hx-states { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.hx-states span { font-size: 10.5px; padding: 1px 7px; border: 1px solid var(--mk-line-2); border-radius: 4px; color: var(--mk-muted); transition: background 0.3s, color 0.3s, border-color 0.3s; }
.hx-states span.on { color: var(--mk-fg); border-color: var(--mk-ok); background: color-mix(in srgb, var(--mk-ok) 20%, transparent); }

/* ---------- import ---------- */
.di { position: absolute; inset: 0; display: grid; grid-template-columns: 0.75fr 44px 1.5fr; align-items: center; gap: 4px; padding: 24px; }
.di-doc { position: relative; height: 230px; border-radius: 12px; background: #fff; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6); padding: 34px 14px 14px; overflow: hidden; }
.di-doc.drop { animation: di-drop 0.7s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes di-drop { 0% { transform: translateY(-40px) rotate(-6deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.di-badge { position: absolute; top: 10px; left: 12px; color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 5px; }
.di-name { position: absolute; top: 11px; left: 54px; right: 8px; font-size: 10px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.di-lines i { display: block; height: 6px; border-radius: 3px; background: #e3e6ec; margin: 7px 0; }
.di-lines i:nth-child(2n) { width: 75%; }
.di-tbl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 10px 0; position: relative; }
.di-tbl span { height: 10px; background: #dbe4ff; border-radius: 2px; }
.di-tbl span:nth-child(-n+3) { background: #91a7ff; }
.di.scan .di-tbl::after { content: ""; position: absolute; left: -4px; right: -4px; height: 14px; top: -2px; background: color-mix(in srgb, #4dabf7 40%, transparent); border-radius: 3px; animation: di-scan 1.2s ease-in-out 2; }
@keyframes di-scan { 0% { top: -2px; } 100% { top: calc(100% - 12px); } }
.di-arrow { display: flex; justify-content: center; gap: 4px; }
.di-arrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--mk-a1); opacity: 0.2; }
.di.scan .di-arrow span { animation: di-dots 1s infinite; }
.di.scan .di-arrow span:nth-child(2) { animation-delay: 0.15s; }
.di.scan .di-arrow span:nth-child(3) { animation-delay: 0.3s; }
@keyframes di-dots { 50% { opacity: 1; transform: translateX(3px); } }
.di-out { border-radius: 12px; border: 1px solid var(--mk-line-2); background: var(--mk-card-2); padding: 10px; min-width: 0; min-height: 236px; position: relative; }
.di-head, .di-row { display: grid; grid-template-columns: minmax(78px, 0.9fr) minmax(0, 1.1fr) minmax(58px, 0.55fr) minmax(52px, 0.5fr) minmax(0, 1.6fr); gap: 6px; font-size: 11.5px; }
.di-head b { padding: 4px 6px; border-radius: 6px; background: var(--mk-card); color: var(--mk-muted); font-weight: 600; border: 1px solid var(--mk-line); transition: all 0.3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.di-head b.ok { color: var(--mk-fg); border-color: color-mix(in srgb, var(--mk-ok) 60%, transparent); background: color-mix(in srgb, var(--mk-ok) 14%, transparent); }
.di-head b.ok::after { content: " \2713"; color: var(--mk-ok); }
.di-row { padding: 5px 6px; border-bottom: 1px solid var(--mk-line); animation: mk-pop 0.35s ease-out; }
.di-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.di-row span:first-child { font-family: var(--mono); color: var(--mk-a1); }
.di-row span:last-child { color: var(--mk-muted); }
.di-done { position: absolute; left: 10px; right: 10px; bottom: 10px; text-align: center; padding: 7px; border-radius: 8px; font-size: 12.5px; background: color-mix(in srgb, var(--mk-ok) 16%, transparent); color: var(--mk-ok); opacity: 0; transform: translateY(6px); transition: all 0.4s; }
.di.done .di-done { opacity: 1; transform: none; }

/* ---------- poll ---------- */
.dp-table { flex: 1; padding: 6px 10px; font-size: 13px; overflow: hidden; }
.dp-h, .dp-r { display: grid; grid-template-columns: 58px minmax(0, 1.6fr) 74px 36px 46px; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 8px; }
.dp-h b { color: var(--mk-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.dp-r { border-bottom: 1px solid var(--mk-line); transition: background 0.3s, color 0.3s; }
.dp-r > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-r .mono:first-child { color: var(--mk-muted); font-size: 12px; }
.dp-r .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.dp-r.tick .v { animation: mk-flash 0.7s ease-out; --c: var(--mk-a1); border-radius: 4px; }
.dp-r .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mk-ok); box-shadow: 0 0 8px var(--mk-ok); }
.dp-r.alarm { background: color-mix(in srgb, var(--mk-err) 16%, transparent); }
.dp-r.alarm .v, .dp-r.alarm > span:nth-child(2) { color: var(--mk-err); }
.dp-r.alarm .dot { background: var(--mk-err); box-shadow: 0 0 10px var(--mk-err); animation: mk-blink 0.6s steps(1) infinite; }
.dp-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--mk-line); font-size: 11.5px; color: var(--mk-muted); }

/* ---------- texts ---------- */
.dt { position: absolute; inset: 0; padding: 26px; display: grid; gap: 16px; align-content: center; }
.dt-box { background: var(--mk-card-2); border: 1px solid var(--mk-line-2); border-radius: 14px; padding: 14px 16px; }
.dt-cap { font-size: 12px; color: var(--mk-muted); margin-bottom: 10px; }
.dt-cap code { font-size: 11.5px; }
.dt-flow { display: flex; align-items: center; gap: 16px; }
.dt-raw { font-size: 20px !important; padding: 6px 12px !important; }
.dt-arr { color: var(--mk-muted); font-size: 22px; }
.dt-word { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; transition: transform 0.45s cubic-bezier(.2, .9, .3, 1.3), opacity 0.45s; }
.dt-word.swap { transform: translateY(12px) scale(0.9); opacity: 0; transition: none; }
.dt-word.ok { color: var(--mk-ok); } .dt-word.warn { color: var(--mk-warn); } .dt-word.err { color: var(--mk-err); } .dt-word.off { color: var(--mk-muted); }
.dt-bits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dt-bit { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--mk-line); font-size: 12px; color: var(--mk-muted); transition: all 0.35s; min-width: 0; }
.dt-b { font-family: var(--mono); width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: var(--mk-card); font-size: 11px; flex: none; }
.dt-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-bit.on { color: var(--mk-fg); border-color: color-mix(in srgb, var(--mk-ok) 55%, transparent); background: color-mix(in srgb, var(--mk-ok) 12%, transparent); }
.dt-bit.on .dt-b { background: var(--mk-ok); color: #04130a; }
.dt-bit.bad { border-color: color-mix(in srgb, var(--mk-err) 60%, transparent); background: color-mix(in srgb, var(--mk-err) 14%, transparent); }
.dt-bit.bad .dt-b { background: var(--mk-err); color: #fff; }

/* ---------- frame builder ---------- */
.df { padding: 12px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; min-height: 0; }
.df-fields { display: flex; gap: 8px; flex-wrap: wrap; }
.df-fields label { font-size: 11px; color: var(--mk-muted); display: flex; flex-direction: column; gap: 3px; }
.df-fields b { font-size: 12.5px; color: var(--mk-fg); padding: 4px 10px; border-radius: 7px; background: var(--mk-card-2); border: 1px solid var(--mk-line-2); min-width: 40px; font-weight: 600; }
.df-cap { font-size: 11px; color: var(--mk-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.df-bytes { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 30px; }
.df-bytes b { font-family: var(--mono); font-size: 13.5px; padding: 3px 6px; border-radius: 6px; background: var(--mk-card-2); border: 1px solid var(--mk-line); animation: mk-pop 0.25s ease-out; }
.df-bytes b.crc { color: var(--mk-a2); border-color: color-mix(in srgb, var(--mk-a2) 55%, transparent); background: color-mix(in srgb, var(--mk-a2) 14%, transparent); }
.df-bytes em { font-style: normal; font-size: 11px; color: var(--mk-ok); margin-left: 6px; animation: mk-pop 0.3s ease-out; }
.df-send { display: flex; align-items: center; gap: 12px; }
.btn-mini { font-size: 12px; font-weight: 700; padding: 5px 16px; border-radius: 8px; background: var(--mk-a1); color: #fff; transition: transform 0.15s, box-shadow 0.15s; }
.btn-mini.press { transform: scale(0.92); box-shadow: 0 0 0 6px color-mix(in srgb, var(--mk-a1) 25%, transparent); }
.df-ms { font-size: 12px; color: var(--mk-muted); font-family: var(--mono); }
.df-dec div { font-size: 13px; padding: 4px 0; color: var(--mk-fg); animation: mk-pop 0.3s ease-out; }
.df-dec div::before { content: "\2192  "; color: var(--mk-ok); }

/* ---------- terminal ---------- */
.d-win.dark { background: #05070a; }
.tt { padding: 2px 10px; border-radius: 6px; color: var(--mk-muted); font-weight: 600; margin-right: 4px; transition: all 0.25s; }
.tt.on { background: rgba(127, 127, 127, 0.2); color: #f2f4f8; }
.d-bar > span:has(.tt) { overflow: visible; }
.dterm { flex: 1; padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; color: #d6deeb; line-height: 1.75; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.dterm > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dterm .pr { color: #8ce99a; }
.dterm .out { color: #9aa5b8; }
.dterm .ts { color: #5c6678; }
.dterm .dtx { color: #74c0fc; font-weight: 700; }
.dterm .drx { color: #8ce99a; font-weight: 700; }

/* ---------- bento tiles ---------- */
.dtr { position: absolute; inset: 0; width: 100%; height: 100%; }
.dtr line { stroke: var(--mk-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dtr polyline { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dtr .a { stroke: var(--mk-a1); filter: drop-shadow(0 0 4px var(--mk-a1)); }
.dtr .b { stroke: var(--mk-a3); }
.dtr-leg { position: absolute; top: 10px; left: 12px; display: flex; gap: 14px; font-size: 11.5px; color: var(--mk-muted); }
.dtr-leg span::before { content: ""; display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.dtr-leg .a::before { background: var(--mk-a1); } .dtr-leg .b::before { background: var(--mk-a3); }
.dsc { position: absolute; inset: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px; }
.dsc-radar { position: relative; width: 116px; height: 116px; border-radius: 50%; border: 1px solid var(--mk-line-2); background: repeating-radial-gradient(circle, transparent 0 18px, var(--mk-line) 18px 19px); overflow: hidden; }
.dsc-radar i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, color-mix(in srgb, var(--mk-ok) 55%, transparent), transparent 70deg); animation: dsc-spin 2.2s linear infinite; }
@keyframes dsc-spin { to { transform: rotate(360deg); } }
.dsc-prog { font-size: 12px; color: var(--mk-muted); margin-bottom: 8px; font-family: var(--mono); }
.dsc-prog b { color: var(--mk-fg); }
.dsc-found .pop { font-size: 12px; padding: 4px 8px; margin-bottom: 4px; border-radius: 6px; background: color-mix(in srgb, var(--mk-ok) 14%, transparent); color: var(--mk-ok); animation: mk-pop 0.3s ease-out; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsl { position: absolute; inset: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 14px; }
.dsl-n { padding: 10px 12px; border-radius: 12px; background: var(--mk-card); border: 1px solid var(--mk-line-2); font-weight: 700; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.dsl-n small { font-weight: 500; font-size: 11px; color: var(--mk-muted); }
.dsl-n code { font-size: 11px; margin-top: 4px; }
.dsl-n.sim { border-color: color-mix(in srgb, var(--mk-a2) 55%, transparent); }
.dsl-wire { position: relative; height: 2px; background: var(--mk-line-2); }
.dsl-wire i { position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; }
.dsl-wire .q { background: var(--mk-a1); box-shadow: 0 0 10px var(--mk-a1); animation: dsl-q 1.6s ease-in-out infinite; }
.dsl-wire .r { background: var(--mk-ok); box-shadow: 0 0 10px var(--mk-ok); animation: dsl-r 1.6s ease-in-out infinite; }
@keyframes dsl-q { 0% { left: 0; opacity: 1; } 45% { left: calc(100% - 10px); opacity: 1; } 50%, 100% { left: calc(100% - 10px); opacity: 0; } }
@keyframes dsl-r { 0%, 50% { left: calc(100% - 10px); opacity: 0; } 55% { opacity: 1; } 100% { left: 0; opacity: 1; } }
.dpr { position: absolute; inset: 0; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.dpr-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.dpr-tabs span { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--mk-line-2); color: var(--mk-muted); transition: all 0.3s; }
.dpr-tabs span.on { background: var(--mk-a1); color: #fff; border-color: transparent; }
.dpr-to { font-size: 12px; color: var(--mk-muted); font-family: var(--mono); }
.dpr-frame { font-size: 13px; color: var(--mk-fg); padding: 8px 10px; border-radius: 8px; background: var(--mk-card); border: 1px solid var(--mk-line); word-break: break-word; }
.dpr-frame u { text-decoration: none; color: var(--mk-a2); }
.dlg { position: absolute; inset: 0; padding: 12px 14px; }
.dlg-rec { font-size: 12px; font-weight: 700; color: var(--mk-err); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dlg-rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--mk-err); animation: mk-blink 1s steps(1) infinite; }
.dlg-rec span { color: var(--mk-muted); font-weight: 500; font-family: var(--mono); }
.dlg-rows { font-size: 11.5px; line-height: 1.7; color: var(--mk-fg); }
.dlg-rows .h { color: var(--mk-a1); }
.dlg-rows div:not(.h) { animation: mk-pop 0.3s ease-out; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcm { position: absolute; inset: 0; display: grid; place-items: center; }
.dcm-win { width: 44%; height: 58%; border-radius: 10px; overflow: hidden; border: 1px solid var(--mk-line-2); background: #0b0f15; color: #e6ebf3; transition: width 0.9s cubic-bezier(.2, .8, .2, 1), height 0.9s cubic-bezier(.2, .8, .2, 1), background 0.6s, color 0.6s; display: flex; flex-direction: column; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6); }
.dcm.big .dcm-win { width: 92%; height: 88%; }
.dcm.light .dcm-win { background: #f6f7fa; color: #0b0d12; }
.dcm .d-bar { padding: 5px 8px; font-size: 11px; }
.dcm .d-bar > i { width: 7px; height: 7px; }
.dcm-tool { display: flex; gap: 4px; padding: 5px 8px; border-bottom: 1px solid var(--mk-line); }
.dcm-tool img { width: 16px; height: 16px; }
.dcm-body { flex: 1; padding: 4px 8px; overflow: hidden; }
.dcm-t { font-size: 10.5px; line-height: 1.9; }
.dcm-t > div { display: grid; grid-template-columns: 50px minmax(0, 1.3fr) minmax(0, 1fr) 0fr 0fr 0fr; gap: 6px; border-bottom: 1px solid rgba(127, 127, 127, 0.18); transition: grid-template-columns 0.9s cubic-bezier(.2, .8, .2, 1); }
.dcm.big .dcm-t > div { grid-template-columns: 50px minmax(0, 1.3fr) minmax(0, 1fr) 0.45fr 0.7fr 0.7fr; }
.dcm-t > div > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dcm-t .h b { font-weight: 700; }
.dcm-t > div:not(.h) span:nth-child(1), .dcm-t > div:not(.h) span:nth-child(5) { font-family: var(--mono); opacity: 0.75; }
.dcm-tool img.on { background: rgba(255, 107, 107, 0.28); border-radius: 3px; }

@media (max-width: 760px) {
  .hx-body { grid-template-columns: minmax(0, 1fr); }
  .hx-left { border-right: 0; border-bottom: 1px solid var(--mk-line); }
  .hx-log { height: 128px; }
  .hx-count, .hx-tool img:nth-child(n+6) { display: none; }
  .di { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; padding: 14px; gap: 8px; }
  .di-doc { height: 84px; padding-top: 32px; }
  .di-doc .di-lines i { display: none; }
  .di-arrow { display: none; }
  .di-out { min-height: 200px; }
  .di-head, .di-row { grid-template-columns: minmax(74px, 0.9fr) minmax(0, 1.6fr) minmax(56px, 0.5fr) minmax(50px, 0.6fr); }
  .di-head b:last-child, .di-row span:last-child { display: none; }
  .d-win { inset: 12px; }
  .dp-h, .dp-r { grid-template-columns: 50px minmax(0, 1fr) 60px 30px 40px; gap: 6px; font-size: 12px; }
  .dterm.dtm > div, .dtm-h { grid-template-columns: 10px 96px minmax(0, 1fr); }
  .dterm.dtm .ts i { display: none; }
  .dt { padding: 14px; }
  .dt-bits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dt-word { font-size: 22px; }
}

/* ---------- command line + AI (MCP) ---------- */
.dterm .out.h { color: #e9edf5; font-weight: 700; }
.dterm .out.j { color: #ffd8a8; }
.dai { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; font-size: 13.5px; }
.dai-b { max-width: 86%; padding: 10px 14px; border-radius: 14px; line-height: 1.45; animation: dai-in 0.35s cubic-bezier(.2, .9, .3, 1.2); }
.dai-b.me { align-self: flex-end; background: linear-gradient(135deg, var(--mk-a1), var(--mk-a2)); color: #fff; border-bottom-right-radius: 4px; }
.dai-b.bot { align-self: flex-start; background: #1f2633; color: #e9edf5; border-bottom-left-radius: 4px; }
.dai-b.tool { align-self: flex-start; font-family: var(--mono); font-size: 12px; color: #9aa5b8; background: transparent; border: 1px dashed #3a4456; padding: 6px 10px; max-width: 96%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dai-b.tool.ok { color: #8ce99a; border-color: color-mix(in srgb, var(--mk-ok) 45%, transparent); }
@keyframes dai-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
/* ---------- AI kit demo ---------- */
.dk { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 0; }
.dk-left { border-right: 1px solid #1f2633; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; font-family: var(--mono); font-size: 12px; }
.dk-cmd { color: #d6deeb; line-height: 1.5; min-height: 36px; word-break: break-all; }
.dk-cmd .pr { color: #8ce99a; }
.dk-tree { display: flex; flex-direction: column; gap: 6px; }
.dk-f { text-align: left; color: #c9d4e5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 6px 8px; border-radius: 8px; background: #111722; border: 1px solid #1f2633; animation: dai-in 0.35s cubic-bezier(.2, .9, .3, 1.2); }
.dk-f b { color: #8ce99a; margin-right: 4px; }
.dk-chat { font-size: 12.8px; }
.dk-who { color: #f2f4f8; }
@media (max-width: 760px) { .dk { grid-template-columns: minmax(0, 1fr); } .dk-left { display: none; } }

/* command line / AI demo: caption explaining each step */
.dcap { padding: 8px 14px; font-size: 12.5px; line-height: 1.45; color: #c9d3e3; background: rgba(127, 127, 127, 0.12); border-bottom: 1px solid rgba(127, 127, 127, 0.18); min-height: 3.1em; }
.dcap b { color: #fff; }
.dcap code { font-family: var(--mono); font-size: 11.5px; color: #ffd8a8; background: transparent; padding: 0; }
@media (max-width: 640px) { .tt { padding: 2px 6px; font-size: 11px; } }
/* dark demo windows: dark title bar so tabs and titles stay readable in the light theme */
.d-win.dark .d-bar { background: #151a23; border-bottom-color: #242c39; color: #8b95a7; }
.d-win.dark .d-bar > span { color: #e9edf5; }
.d-win.dark .tt { color: #8b95a7; }
.d-win.dark .tt.on { background: rgba(255, 255, 255, 0.12); color: #fff; }
/* keep the column alignment of real command output */
.dterm .out { white-space: pre; }
.dai > .dai-b { flex-shrink: 0; }
/* ---------- audit: demos drawn like the real windows ---------- */
.dp-r .al { font-size: 11.5px; color: var(--mk-ok); font-weight: 600; }
.dp-r.alarm .al { color: var(--mk-err); font-weight: 800; animation: mk-blink 0.6s steps(1) infinite; }
.dp-foot { color: var(--mk-ok); }
.dp-foot.bad { color: var(--mk-err); }
.dp-st { white-space: pre; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 11px; }
.dt { padding: 18px 22px; gap: 12px; }
.dt-card { position: relative; background: var(--mk-card-2); border: 1px solid var(--mk-line-2); border-radius: 12px; padding: 10px 14px 9px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow: hidden; }
.dt-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.dt-card.c1 { --c: #ff6b6b; }
.dt-card.c2 { --c: #4dabf7; }
.dt-t { font-size: 13px; color: var(--mk-muted); }
.dt-big { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.dt-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.dt-chips span { font-size: 11.5px; padding: 2px 8px; border: 1px solid var(--mk-line-2); border-radius: 4px; color: var(--mk-muted); transition: all 0.3s; }
.dt-chips span.on { color: var(--mk-fg); border-color: var(--mk-ok); background: color-mix(in srgb, var(--mk-ok) 22%, transparent); }
.dt-ft { font-size: 11px; color: var(--mk-muted); }
.df-fields b { white-space: nowrap; }
.df-cnt { font-size: 11.5px; color: var(--mk-muted); }
.df-dec div { font-size: 12px; padding: 2px 0; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.df-dec div::before { content: none; }
.df-dec div.ok { color: var(--mk-ok); }
.df-dec div.dim { color: var(--mk-muted); }
.dtm-h, .dterm.dtm > div { display: grid; grid-template-columns: 14px 188px minmax(0, 1fr); gap: 10px; }
.dtm-h { padding: 6px 14px; font-size: 11.5px; color: #c9d3e3; background: #10151d; border-bottom: 1px solid #242c39; }
.dtm-h b { font-weight: 700; }
.dterm.dtm { line-height: 1.7; }
.dterm.dtm > div.tx { color: #ff8a8a; }
.dterm.dtm > div.rx { color: #74c0fc; }
.dterm.dtm .ts { color: inherit; }
.dterm.dtm .ts i { font-style: normal; }
.dterm.dtm .dd { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.dlg-rows { font-size: 11px; }
.dlg-rows > div { display: grid; grid-template-columns: 1.35fr 0.8fr 1.45fr 0.75fr 0.45fr; gap: 6px; border-bottom: 1px solid var(--mk-line); }
.dlg-rows > div > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dlg-rows > div:not(.h) > span { font-family: var(--mono); }
.dlg-rows .h b { font-weight: 700; font-family: var(--mono); }
