/* Interactive hero demo on the landing page (public/js/landing-demo.js). Remove this file + the block in index.html to revert. */
.hero.with-demo { display: block; padding: 72px 0 64px; }
.hero.with-demo .hero-copy { max-width: 760px; }
.hero.with-demo .hero-copy p.lead { max-width: 640px; }

.idemo { margin-top: 44px; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); background: var(--bg); overflow: hidden; }
.idemo-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.idemo-prompt { font-family: var(--font-heading); font-size: 14px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.idemo-prompt span { color: var(--muted); font-weight: 400; }
.idemo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.idemo-actions .btn { background: var(--bg); }
.idemo-actions .btn.attack { border-color: rgba(220, 38, 38, 0.35); color: #b91c1c; }
.idemo-actions .btn.attack:hover { border-color: var(--down); background: rgba(220, 38, 38, 0.05); }
.idemo-actions .btn.legit { border-color: rgba(22, 163, 74, 0.4); color: #15803d; }
.idemo-actions .btn.legit:hover { border-color: var(--up); background: rgba(22, 163, 74, 0.05); }
.idemo-actions .btn[aria-pressed='true'] { box-shadow: inset 0 0 0 1px currentColor; }
.idemo-actions .btn:focus-visible, .idemo .btn:focus-visible, .idemo-bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.idemo.nudge .idemo-actions .btn { animation: idemo-nudge 1.1s ease-in-out 2; }
.idemo.nudge .idemo-actions .btn:nth-child(2) { animation-delay: 0.08s; }
.idemo.nudge .idemo-actions .btn:nth-child(3) { animation-delay: 0.16s; }
.idemo.nudge .idemo-actions .btn:nth-child(4) { animation-delay: 0.24s; }
.idemo.nudge .idemo-actions .btn:nth-child(5) { animation-delay: 0.32s; }
.idemo.nudge .idemo-actions .btn:nth-child(6) { animation-delay: 0.4s; }
@keyframes idemo-nudge { 50% { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06); } }

.idemo-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }

/* ---------- fake browser + storefront ---------- */
.idemo-browser { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.idemo-chrome { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.idemo-dots { display: flex; gap: 5px; flex: none; }
.idemo-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.idemo-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); color: #52525b; white-space: nowrap; overflow: hidden; }
.idemo-url svg { flex: none; width: 10px; height: 12px; fill: var(--up); }
.idemo-url.bad { background: rgba(220, 38, 38, 0.08); color: var(--down); }
.idemo-url.bad svg { fill: var(--down); }
.idemo-url .host { overflow: hidden; text-overflow: ellipsis; }
.idemo-cpu { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.idemo-cpu.hot { color: var(--down); font-weight: 500; }

.idemo-view { position: relative; height: 366px; container-type: inline-size; overflow: hidden; background: #fffaf3; color: #3b2f2f; font-family: Georgia, 'Times New Roman', serif; }
.idemo-view > .layer { position: absolute; inset: 0; }
.nw-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* The storefront is laid out at a fixed design width (--dw) and scaled to the frame (--s), like a shrunken real page. */
.nw-site { position: absolute; left: 0; top: 0; width: var(--dw, 800px); transform: scale(var(--s, 0.72)) translateY(var(--py, 0px)); transform-origin: 0 0; transition: transform 0.5s ease; display: flex; flex-direction: column; min-height: var(--minh, 0px); background: #fffaf3; color: #3b2f2f; font-family: Georgia, 'Times New Roman', serif; }
.nw-top { background: #3b2f2f; color: #f6e3c5; font: 11px/26px var(--font); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; }
.nw-head { display: flex; align-items: center; gap: 26px; padding: 11px 28px; border-bottom: 1px solid #efe2cf; background: #fffaf3; }
.nw-logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.nw-mark { width: 38px; height: 38px; flex: none; }
.nw-logo b { display: block; font: 600 19px/1.05 Georgia, serif; letter-spacing: 0.01em; color: #3b2f2f; }
.nw-logo small { display: block; font: 10px/1.4 var(--font); color: #9a7b5c; letter-spacing: 0.12em; text-transform: uppercase; }
.nw-head nav { display: flex; gap: 22px; margin-left: auto; font: 13px/1 var(--font); color: #6b5a4a; }
.nw-head nav .on { color: #7c4a1e; box-shadow: 0 2px 0 #c98a3d; padding-bottom: 4px; }
.nw-cart { flex: none; font: 12px/1 var(--font); background: #7c4a1e; color: #fff; padding: 8px 13px; border-radius: 999px; }
.nw-hero { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 8px; height: 186px; padding: 0 22px 0 28px; background: linear-gradient(105deg, #fbecd3 0%, #fff6e9 58%, #fffaf3 100%); overflow: hidden; }
.nw-kicker { font: 500 10.5px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: #b0743a; }
.nw-hero h4 { font: 400 33px/1.08 Georgia, serif; letter-spacing: -0.01em; margin: 9px 0 8px; color: #3b2f2f; }
.nw-hero p { font: 13px/1.5 var(--font); color: #6b5a4a; margin: 0 0 13px; max-width: 360px; }
.nw-cta { display: inline-block; background: #7c4a1e; color: #fff; font: 12.5px/1 var(--font); padding: 9px 15px; border-radius: 6px; }
.nw-cta2 { margin-left: 14px; font: 12.5px/1 var(--font); color: #7c4a1e; }
.nw-hero-art { width: 100%; height: 176px; }
.nw-news { position: absolute; top: 14px; right: 22px; font: 500 11.5px/1.4 var(--font); background: #c2410c; color: #fff; padding: 4px 10px; border-radius: 999px; box-shadow: 0 3px 10px rgba(194, 65, 12, 0.25); }
.nw-products { padding: 16px 28px 14px; }
.nw-sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.nw-sec-head b { font: 400 19px/1.2 Georgia, serif; }
.nw-sec-head span { font: 12px/1 var(--font); color: #7c4a1e; }
.nw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.nw-prod { background: #fff; border: 1px solid #f0e4d2; border-radius: 10px; padding: 9px 10px 11px; font-family: var(--font); box-shadow: 0 1px 2px rgba(124, 74, 30, 0.05); }
.nw-prod svg { display: block; width: 100%; height: 70px; background: #fbf1e2; border-radius: 7px; margin-bottom: 8px; }
.nw-prod b { display: block; font: 400 14.5px/1.25 Georgia, serif; color: #3b2f2f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-prod small { display: block; font-size: 11px; color: #9a8672; margin: 1px 0 8px; }
.nw-prod .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.nw-prod .price { font-weight: 500; font-size: 13.5px; color: #7c4a1e; font-variant-numeric: tabular-nums; }
.nw-prod .price.changed { background: #fde68a; border-radius: 3px; padding: 0 4px; animation: idemo-flash 1.2s ease-out 1; }
.nw-prod .old { color: #a8a29e; text-decoration: line-through; font-size: 12px; margin-right: 2px; }
.nw-prod .add { font-size: 11px; border: 1px solid #e4cfb2; border-radius: 999px; padding: 3px 10px; color: #7c4a1e; }
@keyframes idemo-flash { 0% { background: #facc15; } 100% { background: #fde68a; } }
.nw-visit { display: flex; gap: 18px; align-items: center; margin: 2px 28px 18px; padding: 11px 16px; border-radius: 9px; background: #f6e3c5; font: 12px/1.3 var(--font); color: #5b4330; }
.nw-visit b { font: 400 15px/1 Georgia, serif; color: #3b2f2f; margin-right: 4px; }
.nw-foot { margin-top: auto; display: flex; align-items: center; gap: 22px; padding: 16px 28px; background: #3b2f2f; color: #cdb898; font: 11.5px/1.3 var(--font); }
.nw-foot .nw-logo { margin-right: auto; }
.nw-foot .nw-mark { width: 24px; height: 24px; }
.nw-foot .nw-logo b { color: #f6e3c5; font-size: 14px; }

/* Phones, and the narrow 1/3 column on FHD, render the storefront's own small-screen layout. */
@media (max-width: 520px), (min-width: 1600px) {
  .idemo-view { --dw: 520px; --s: 0.66; }
  .idemo-view .nw-head { gap: 14px; padding: 10px 18px; }
  .idemo-view .nw-head nav { gap: 14px; }
  .idemo-view .nw-head nav span:nth-child(n + 4), .idemo-view .nw-cart { display: none; }
  .idemo-view .nw-hero { grid-template-columns: 1fr 0.62fr; height: 172px; padding: 0 12px 0 18px; }
  .idemo-view .nw-hero h4 { font-size: 27px; }
  .idemo-view .nw-hero p { font-size: 12.5px; }
  .idemo-view .nw-cta2 { display: none; }
  .idemo-view .nw-news { right: 12px; top: 10px; }
  .idemo-view .nw-products { padding: 14px 18px; }
  .idemo-view .nw-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .idemo-view .nw-visit { margin: 0 18px 16px; flex-wrap: wrap; gap: 4px 12px; }
  .idemo-view .nw-foot { flex-wrap: wrap; gap: 6px 14px; padding: 14px 18px; }
}

.nw-hacked { background: #050505; color: #22c55e; font-family: ui-monospace, Menlo, monospace; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.nw-hacked .big { font-size: clamp(18px, 4.2cqw, 34px); letter-spacing: 0.04em; }
.nw-hacked .sub { color: #ef4444; font-size: 12.5px; }
.nw-hacked .nw-tag { color: #4ade80; opacity: 0.7; font-size: 11px; }

.nw-phish { background: #f1f5f9; color: #0f172a; font-family: var(--font); display: flex; align-items: center; justify-content: center; }
.nw-phish .box { width: min(300px, 86%); background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 18px; box-shadow: 0 6px 22px rgba(15, 23, 42, 0.1); font-size: 12px; }
.nw-phish .ph-brand { display: flex; align-items: center; gap: 8px; font: 600 14px/1 Georgia, serif; color: #3b2f2f; margin-bottom: 10px; }
.nw-phish .ph-brand svg { width: 24px; height: 24px; filter: hue-rotate(160deg) saturate(0.7); }
.nw-phish .box b { display: block; font-weight: 500; font-size: 14px; margin-bottom: 2px; }
.nw-phish .fake-input { height: 24px; border: 1px solid #cbd5e1; border-radius: 5px; margin-top: 8px; padding: 3px 7px; color: #94a3b8; font-size: 11px; }
.nw-phish .fake-btn { margin-top: 10px; background: #2563eb; color: #fff; border-radius: 5px; text-align: center; padding: 6px; font-size: 12px; }

.idemo-callout { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(24, 24, 27, 0.88); color: #fff; font: 12px/1.4 var(--font); padding: 5px 10px; border-radius: 6px; white-space: nowrap; }

.idemo-src { margin: 0; height: 76px; overflow: hidden; padding: 8px 12px; background: #18181b; color: #a1a1aa; font: 11px/1.55 ui-monospace, Menlo, monospace; border-top: 1px solid #27272a; }
.idemo-src .ln { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idemo-src .ln.add { color: #fca5a5; background: rgba(220, 38, 38, 0.16); }
.idemo-src .ln.add.ok { color: #86efac; background: rgba(22, 163, 74, 0.16); }
.idemo-src .ln.del { color: #71717a; text-decoration: line-through; }
.idemo-src .ln.add::before { content: '+ '; }
.idemo-src .ln.del::before { content: '− '; }

/* attack transitions */
.idemo-view.glitch > .layer { animation: idemo-glitch 0.7s steps(2, end) 1; }
@keyframes idemo-glitch {
  0% { transform: translate(0); filter: none; clip-path: inset(0 0 0 0); }
  15% { transform: translate(-6px, 1px); filter: hue-rotate(80deg) saturate(3); clip-path: inset(10% 0 55% 0); }
  30% { transform: translate(5px, -2px); clip-path: inset(48% 0 12% 0); }
  45% { transform: translate(-3px, 0); filter: invert(1); clip-path: inset(0 0 70% 0); }
  60% { transform: translate(4px, 2px); filter: none; clip-path: inset(30% 0 30% 0); }
  80% { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); }
  100% { transform: translate(0); filter: none; clip-path: inset(0 0 0 0); }
}
.idemo-view .layer.fade-in { animation: idemo-fade 0.45s ease-out 1; }
@keyframes idemo-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- integritee panel ---------- */
.idemo-panel { display: flex; flex-direction: column; min-width: 0; }
.idemo-phead { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--line); min-height: 41px; }
.idemo-phead img { width: 15px; height: 17px; }
.idemo-phead .site { font-family: var(--font-heading); font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idemo-phead .pill { margin-left: auto; width: 118px; }
.idemo-phead .last { color: var(--muted); font-size: 11.5px; white-space: nowrap; width: 106px; text-align: right; }
.idemo-pill-checking::before { animation: pulse 0.9s infinite; }

.idemo-body { position: relative; height: 395px; padding: 12px 14px; overflow: hidden; }
.idemo-idle { color: var(--muted); font-size: 13px; }
.idemo-idle ul { margin: 10px 0 0; padding-left: 18px; }
.idemo-idle li { margin-bottom: 3px; }
.idemo-log { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.idemo-log li { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; padding: 3px 0; color: var(--text); }
.idemo-log li .t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.idemo-log li .ic { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.idemo-log li.run .ic { border-color: var(--accent); border-right-color: transparent; animation: idemo-spin 0.7s linear infinite; }
.idemo-log li .ic { position: relative; }
.idemo-log li.done .ic { border: none; background: var(--up); }
.idemo-log li.done .ic::after { content: ''; position: absolute; left: 4px; top: 2px; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.idemo-log li.alert .ic { border: none; background: var(--down); }
.idemo-log li.alert { color: var(--down); }
.idemo-log li.ok-verdict { color: var(--up); }
.idemo-log li.ok-verdict .ic { border: none; background: var(--up); }
@keyframes idemo-spin { to { transform: rotate(360deg); } }
.idemo-log li.enter, .idemo-sig.enter { animation: idemo-in 0.22s ease-out 1; }
@keyframes idemo-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.idemo-sigs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px 24px; }
.idemo-sig { font: 11px/1.4 ui-monospace, Menlo, monospace; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line-2); color: #52525b; background: var(--bg-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idemo-sig.critical { border-color: rgba(220, 38, 38, 0.35); color: #b91c1c; background: rgba(220, 38, 38, 0.05); }
.idemo-sig.warn { border-color: rgba(217, 119, 6, 0.4); color: #b45309; background: rgba(217, 119, 6, 0.06); }
.idemo-sig.good { border-color: rgba(22, 163, 74, 0.35); color: #15803d; background: rgba(22, 163, 74, 0.05); }

/* incident / email card that flips over the log */
.idemo-card { position: absolute; inset: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; overflow: hidden; }
.idemo-card.flip { animation: idemo-flip 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) 1; transform-origin: 50% 0; }
@keyframes idemo-flip { from { opacity: 0; transform: perspective(700px) rotateX(-16deg) translateY(10px); } to { opacity: 1; transform: none; } }
.idemo-card .mail-head { display: flex; gap: 9px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.idemo-card .mail-head img { width: 18px; }
.idemo-card .subject { font-weight: 400; font-size: 13px; line-height: 1.35; }
.idemo-card .meta { color: var(--muted); font-size: 11.5px; }
.idemo-card p { margin: 0; color: #52525b; }
.idemo-card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.idemo-card .result { display: flex; gap: 8px; align-items: flex-start; }
.idemo-card .result .mark { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--up); color: #fff; display: grid; place-items: center; font-size: 11px; line-height: 1; margin-top: 1px; }
.idemo-card .result.bad .mark { background: var(--down); }
.idemo-card .result b { font-weight: 500; color: var(--text); }
.idemo-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.idemo-thumbs figure { margin: 0; }
.idemo-thumbs figcaption { color: var(--muted); font-size: 10.5px; margin-bottom: 2px; }
.idemo-card .th { height: 46px; border-radius: 6px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3px 6px; font-size: 11px; line-height: 1.3; overflow: hidden; white-space: nowrap; }
.idemo-card .th.ok { background: #fbf7f0; color: #7c4a1e; font-family: Georgia, serif; }
.idemo-card .th.bad { background: #111; color: #4ade80; font-family: ui-monospace, Menlo, monospace; }
.idemo-card .th.phish { background: #f8fafc; color: #1e3a8a; }
.idemo-card .th small { font: 10px/1.3 ui-monospace, Menlo, monospace; color: var(--down); }
.idemo-card .th small.ok { font-family: Georgia, serif; color: #8a6a4a; }
.idemo-card .th.bad small { color: #ef4444; }
.idemo-wait { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; padding: 3px 0; }
.idemo-wait .ic { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-2); border-top-color: var(--muted); animation: idemo-spin 0.9s linear infinite; }
.idemo-mini-status { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; }
.idemo-mini-status .row1 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.idemo-mini-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); flex: none; }
.idemo-mini-status.ok .dot { background: var(--up); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12); }
.idemo-mini-status .bars { display: flex; gap: 2px; height: 14px; }
.idemo-mini-status .bars i { flex: 1; border-radius: 1px; background: #4ade80; }
.idemo-mini-status .bars i.d { background: #f87171; }
.idemo-checklist { margin: 0; padding-left: 18px; color: #52525b; }
.idemo-checklist li { margin-bottom: 1px; }

.idemo-foot { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); min-height: 41px; font-size: 11.5px; color: var(--muted); }
.idemo-foot .note { margin-left: auto; text-align: right; }

/* Skip / Reset live in the control strip; hidden ones keep their space so nothing shifts. */
.idemo-ctl { display: flex; gap: 14px; }
.idemo-ctl button.link { font-size: 12.5px; white-space: nowrap; }
.idemo-ctl button.link[hidden] { display: inline; visibility: hidden; }
.idemo-more { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.idemo-dock { display: none; }

/* The motto reads as three lines: "Know the moment / your site stops being / yours." Phones may wrap inside a line. */
.hero.with-demo h1 .l { display: block; text-wrap: balance; }
@media (min-width: 521px) { .hero.with-demo h1 .l { white-space: nowrap; } }

/* ---------- FHD and wider: motto and demo on one row ---------- */
@media (min-width: 1600px) {
  /* One row: the motto column is sized to its text (lead max-width), the demo sits right after it, and the pair
     is centred, so the gap stays the same at every width. The two columns share one height; the docked strip
     is pinned to the bottom of the motto column, level with the bottom of the demo. */
  .hero.with-demo {
    --copy-w: 720px; --demo-w: 460px; --gap: 56px;
    display: grid; grid-template-columns: var(--copy-w) var(--demo-w); gap: var(--gap); align-items: stretch;
    width: calc(var(--copy-w) + var(--gap) + var(--demo-w)); margin-left: calc(50% - (var(--copy-w) + var(--gap) + var(--demo-w)) / 2); padding: 64px 0;
  }
  .hero.with-demo .hero-copy { max-width: none; padding-top: 6px; display: flex; flex-direction: column; }
  .hero.with-demo h1 { font-size: clamp(56px, 3.6vw, 68px); }
  .hero.with-demo .hero-copy p.lead { max-width: none; }
  body.landing > .nav { max-width: calc(720px + 56px + 460px + 48px); }
  /* In the 1/3 column the demo is a single fixed-height stack: browser on top, check panel below. */
  .idemo { margin-top: 0; height: 660px; display: flex; flex-direction: column; }
  .idemo-grid { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: 318px minmax(0, 1fr); }
  .idemo-browser { border-right: none; border-bottom: 1px solid var(--line); min-height: 0; }
  .idemo-panel { min-height: 0; }
  .idemo-view { height: auto; flex: 1; }
  .idemo-src { height: 60px; }
  .idemo-body { height: auto; flex: 1; padding: 10px 12px; }
  .idemo-phead { padding: 8px 12px; }
  .idemo-card { inset: 8px 10px; padding: 10px 12px; gap: 7px; }
  .idemo-bar { padding: 12px 14px; gap: 10px; }
  /* The strip's slot under the motto is reserved from the start, so docking it never moves the page. */
  .idemo-dock { display: flex; flex-direction: column; justify-content: flex-end; height: 112px; margin-top: auto; padding-top: 0; }
  .hero.with-demo .hero-copy > .idemo-dock { flex: none; }
  .idemo-dock .idemo-bar { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; gap: 10px 14px; }
  .idemo-dock .idemo-prompt { flex: 1; order: 0; }
  .idemo-dock .idemo-ctl { order: 1; }
  .idemo-dock .idemo-actions { order: 2; flex: 1 0 100%; }

  /* Compact idle: only the bakery and one attack (plus "More attacks"); the check panel opens on first use. */
  .idemo.compact .idemo-actions [data-scenario]:not([data-scenario='deface']) { display: none; }
  .idemo.compact .idemo-more { display: inline-flex; }
  .idemo.compact .idemo-ctl { display: none; }
  .idemo.compact .idemo-grid { grid-template-rows: minmax(0, 1fr); }
  .idemo.compact .idemo-browser { border-bottom: none; }
  /* Idle frame is cropped across "Today's bakes"; the page source fills the rest of the card. */
  .idemo.compact .idemo-view { flex: none; height: 340px; }
  .idemo.compact .idemo-view::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: linear-gradient(rgba(255, 250, 243, 0), #fffaf3); pointer-events: none; }
  .idemo.compact .idemo-src { flex: 1; height: auto; }
  .idemo.compact .idemo-panel { display: none; }
  .idemo.opened .idemo-panel { animation: idemo-fade 0.4s ease-out 1; }
}

@media (max-width: 860px) {
  .hero.with-demo { padding: 44px 0 40px; }
  .idemo { margin-top: 32px; }
  .idemo-grid { grid-template-columns: 1fr; }
  .idemo-browser { border-right: none; border-bottom: 1px solid var(--line); }
  .idemo-view { height: 300px; }
  .idemo-body { height: 330px; }
  .idemo-bar { padding: 12px; }
  .idemo-actions .btn { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 420px) {
  .idemo-phead .last { display: none; }
  .nw-hacked .nw-tag { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .idemo *, .idemo *::before, .idemo *::after, .idemo-dock * { animation: none !important; transition: none !important; }
}
