/* Application and bot hosting pages (templates/larw/app.tpl, bots.tpl, includes/mh/*). Builds on css/game-panel.css
   (the .gx look of the site); everything here is scoped under .mh. Loaded with js/app-hosting.js when $mhAssets is
   set (includes/hooks/appHosting.php). The animated panel mocks are ported from mevcore.com/hosting/apps. */

.mh {
    --mh-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --mh-ease: cubic-bezier(.22, 1, .36, 1);
}
.mh [hidden] { display: none !important; }
.mh .gx-sec { scroll-margin-top: 90px; }
.mh-alt { margin-top: 110px; padding: 90px 0; background: var(--gx-bg-2); border-top: 1px solid var(--gx-line); border-bottom: 1px solid var(--gx-line); }
.mh-alt + .gx-sec { padding-top: 90px; }
.mh-head { max-width: 780px; margin: 0 auto 44px; text-align: center; }
.mh-head .gx-sub { margin-left: auto; margin-right: auto; }
.mh-note { margin-top: 22px; text-align: center; color: var(--gx-muted); font-size: 15px; }
.mh-note a, .mh-link { color: var(--gx-accent-hi); font-weight: 600; }
.mh-note a:hover, .mh-link:hover { color: #fff; }

/* Hero */
.mh-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; color: var(--gx-muted); font-size: 15px; }
.mh-points li { display: flex; align-items: center; gap: 8px; }
.mh-points i { color: var(--gx-ok); }

/* Window frame of the mocks */
.mh-window { overflow: hidden; border-radius: 14px; background: var(--gx-app); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 40px 90px rgba(0, 0, 0, .5), 0 0 0 1px rgba(99, 122, 225, .2); }
.mh-window__bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; background: var(--gx-app-2); border-bottom: 1px solid var(--gx-line); }
.mh-window__bar > i { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #f87171; }
.mh-window__bar > i:nth-child(2) { background: #facc15; }
.mh-window__bar > i:nth-child(3) { background: #4ade80; }
.mh-window__url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; margin-left: 10px; height: 26px; padding: 0 12px; border-radius: 20px; background: rgba(255, 255, 255, .05); color: var(--gx-muted); font: 12px/1 var(--mh-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-window__url i { font-size: 10px; color: var(--gx-dim); }

/* Hero deploy log: lines come in with an arrow that turns into a tick, then the metrics count up. CSS only, once. */
@property --hero-count { syntax: '<integer>'; inherits: false; initial-value: 0; }
.hero-log { --hero-log-step: .55s; --hero-log-start: .9s; padding: 20px; background: #151515; color: #d1d5db; font: 12.5px/24px var(--mh-mono); }
.hero-log p { margin: 0; }
.hero-log__line { opacity: 0; color: #6b7280; animation: hero-log-in .3s ease forwards, hero-log-done .3s ease forwards; animation-delay: calc(var(--hero-log-start) + var(--line) * var(--hero-log-step)), calc(var(--hero-log-start) + (var(--line) + 1) * var(--hero-log-step)); }
.hero-log__mark { position: relative; display: inline-block; width: 1ch; }
.hero-log__done { position: absolute; left: 0; color: #4ade80; opacity: 0; }
.hero-log__line .hero-log__pending { animation: hero-log-hide .2s ease forwards; animation-delay: calc(var(--hero-log-start) + (var(--line) + 1) * var(--hero-log-step)); }
.hero-log__line .hero-log__done { animation: hero-log-show .2s ease forwards; animation-delay: calc(var(--hero-log-start) + (var(--line) + 1) * var(--hero-log-step)); }
.hero-log__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; font-family: "Rf regular", Ubuntu, sans-serif; }
.hero-log__metrics > div { padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.hero-log__metrics small { display: block; font-size: 10px; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; }
.hero-log__metrics b { font-size: 14px; line-height: 1.5; color: #fff; }
.hero-log__count { --hero-count: 0; counter-reset: hero-count var(--hero-count); animation: hero-log-count 1.2s var(--mh-ease) forwards; animation-delay: calc(var(--hero-log-start) + var(--hero-log-lines) * var(--hero-log-step)); }
.hero-log__count::after { content: counter(hero-count); }
@keyframes hero-log-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@keyframes hero-log-done { to { color: #d1d5db; } }
@keyframes hero-log-hide { to { opacity: 0; } }
@keyframes hero-log-show { to { opacity: 1; } }
@keyframes hero-log-count { to { --hero-count: var(--to); } }

/* ───────── Deploy story: a mock of the applications panel (includes/mh/deploy-story.tpl, js/app-hosting.js) ───────── */
.deploy-story {
    --story-bg: #111214; --story-canvas: #151619; --story-dot: rgba(255, 255, 255, .07); --story-card: #1d1e22; --story-raised: #24262b;
    --story-line: rgba(255, 255, 255, .08); --story-text: #e7e8ea; --story-muted: #8b8e96; --story-primary: #637AE1; --story-green: #22c55e; --story-yellow: #f5b800;
}
.deploy-story p, .deploy-story ul, .deploy-story ol { margin: 0; padding: 0; list-style: none; }
.deploy-story__panel { position: relative; display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 460px; overflow: hidden; background: var(--story-bg); color: var(--story-text); font-size: 12px; line-height: 1.5; text-align: left; user-select: none; }
.deploy-story__panel > * { transition: opacity .5s ease; }
.deploy-story.is-resetting .deploy-story__main { opacity: 0; }

.deploy-story__sidebar { display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; border-right: 1px solid var(--story-line); }
.deploy-story__brand { margin-bottom: 18px !important; padding: 0 8px; font-weight: 700; font-size: 15px; }
.deploy-story__nav-title { margin-bottom: 4px !important; padding: 0 8px; color: var(--story-muted); font: 600 10px/1.4 var(--mh-mono); letter-spacing: .08em; text-transform: uppercase; }
.deploy-story__nav-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; color: var(--story-muted); font-size: 13px; }
.deploy-story__nav-item.is-active { background: var(--story-primary); color: #fff; }

.deploy-story__main { display: flex; flex-direction: column; min-width: 0; }
.deploy-story__header { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.deploy-story__title { font-weight: 700; font-size: 17px; }
.deploy-story__switch { display: flex; padding: 3px; border: 1px solid var(--story-line); border-radius: 8px; color: var(--story-muted); }
.deploy-story__switch > span { padding: 3px 10px; border-radius: 6px; }
.deploy-story__switch > .is-active { background: var(--story-raised); color: var(--story-text); }
.deploy-story__add { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 7px 14px; border-radius: 8px; background: var(--story-primary); color: #fff; font-weight: 600; transition: transform .15s ease, filter .15s ease; }
.deploy-story__add.is-pressed { transform: scale(.95); filter: brightness(1.15); }

.deploy-story__picker { position: absolute; top: 52px; right: 18px; width: 250px; padding: 8px; border: 1px solid var(--story-line); border-radius: 10px; background: var(--story-raised); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .25s ease, transform .3s var(--mh-ease); }
.deploy-story__picker.is-shown { opacity: 1; transform: none; }
.deploy-story__picker-title { display: flex; align-items: center; gap: 6px; padding: 4px 8px 8px; color: var(--story-muted); }
.deploy-story__picker-title.is-connected { color: #86efac; }
.deploy-story__connect { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 8px 8px; padding: 8px; border-radius: 8px; background: #f4f4f5; color: #111; font-weight: 600; transition: transform .15s ease, filter .15s ease; }
.deploy-story__connect.is-pressed { transform: scale(.96); filter: brightness(.9); }
.deploy-story__repo { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: 6px; font-family: var(--mh-mono); transition: background .2s ease; }
.deploy-story__repo > span { color: var(--story-muted); }
.deploy-story__repo.is-hovered { background: rgba(99, 122, 225, .22); }

.deploy-story__canvas { position: relative; flex: 1; min-height: 340px; margin: 0 18px 18px; padding: 22px; border: 1px solid var(--story-line); border-radius: 12px; background: radial-gradient(circle, var(--story-dot) 1.2px, transparent 1.4px) 0 0 / 20px 20px, var(--story-canvas); overflow: hidden; }
.deploy-story__pool { width: min(100%, 520px); padding: 16px; border: 1px solid var(--story-line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.deploy-story__pool-name { font: 700 13px/1.4 var(--mh-mono); }
.deploy-story__meters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.deploy-story__meter > p { display: flex; justify-content: space-between; gap: 6px; color: var(--story-muted); font-size: 9.5px; white-space: nowrap; }
.deploy-story__bar { display: block; height: 3px; margin-top: 4px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.deploy-story__bar > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--story-primary); transition: width 1.6s var(--mh-ease); }
.deploy-story__bar.is-cpu > span { background: var(--story-yellow); }
.deploy-story__empty { margin-top: 22px !important; padding: 18px 0; color: var(--story-muted); font: 11px/1.5 var(--mh-mono); }

.deploy-story__cards { display: flex; align-items: center; margin-top: 18px; }
.deploy-story__card { border: 1px solid var(--story-line); border-radius: 10px; background: var(--story-card); transition: border-color .25s ease, opacity .4s ease, transform .5s var(--mh-ease); }
.deploy-story__card.is-app { flex: none; width: 220px; padding: 12px; }
.deploy-story__card.is-app.is-new { animation: deploy-story-pop .5s var(--mh-ease); }
.deploy-story__card.is-service { display: flex; align-items: center; gap: 8px; flex: none; width: 170px; padding: 9px 10px; opacity: 0; transform: scale(.9); }
.deploy-story__card.is-service.is-shown { opacity: 1; transform: none; }
.deploy-story__card.is-service.is-creating { border-style: dashed; border-color: var(--story-primary); animation: deploy-story-pulse 1.1s ease-in-out infinite; }
.deploy-story__card-head { display: flex; align-items: center; gap: 10px; }
.deploy-story__logo { display: flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .92); }
.deploy-story__card-name { font: 700 12px/1.3 var(--mh-mono); }
.deploy-story__card-type { color: var(--story-muted); font: 10px/1.4 var(--mh-mono); text-transform: uppercase; letter-spacing: .04em; }
.deploy-story__card-type.is-detected { color: #a5b2f2; animation: deploy-story-fade .4s ease; }
.deploy-story__status { display: flex; align-items: center; gap: 6px; margin-top: 12px !important; font-size: 11px; }
.deploy-story__status > span { width: 7px; height: 7px; border-radius: 50%; }
.deploy-story__status .is-idle { background: var(--story-muted); }
.deploy-story__status .is-building { background: var(--story-yellow); animation: deploy-story-pulse 1s ease-in-out infinite; }
.deploy-story__status .is-running { background: var(--story-green); box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.deploy-story__domain, .deploy-story__env { display: flex; align-items: center; gap: 5px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s ease, margin .4s ease, opacity .4s ease; }
.deploy-story__domain { color: var(--story-muted); font: 10.5px/1.4 var(--mh-mono); }
.deploy-story__domain i { color: var(--story-green); font-size: 9px; }
.deploy-story__env { display: inline-flex; padding: 0 7px; border-radius: 6px; background: rgba(34, 197, 94, .12); color: #86efac; font: 10px/1.8 var(--mh-mono); }
.deploy-story__domain.is-shown, .deploy-story__env.is-shown { max-height: 20px; margin-top: 10px !important; opacity: 1; }

.deploy-story__link { flex: 0 0 44px; height: 1.5px; }
.deploy-story__link > span { display: block; height: 100%; background: var(--story-muted); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--mh-ease) .2s; }
.deploy-story__link.is-shown > span { transform: none; }

.deploy-story__inspector { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 262px; padding: 14px; border: 1px solid var(--story-line); border-radius: 12px; background: var(--story-raised); box-shadow: -16px 0 40px rgba(0, 0, 0, .35); opacity: 0; transform: translateX(24px); pointer-events: none; transition: opacity .35s ease, transform .45s var(--mh-ease); }
.deploy-story__inspector.is-shown { opacity: 1; transform: none; }
.deploy-story__inspector-title { display: flex; align-items: center; justify-content: space-between; font: 700 13px/1.4 var(--mh-mono); }
.deploy-story__inspector-title > span { padding: 2px 8px; border-radius: 6px; background: rgba(99, 122, 225, .2); color: #c3cbf6; font: 600 10.5px/1.5 system-ui, sans-serif; }
.deploy-story__commit { display: flex; align-items: center; gap: 6px; margin-top: 8px !important; color: var(--story-muted); font: 10.5px/1.4 var(--mh-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deploy-story__progress { display: block; height: 3px; margin: 12px 0; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.deploy-story__progress > span { display: block; width: 0; height: 100%; background: var(--story-primary); }
.deploy-story__inspector.is-shown .deploy-story__progress > span { width: 100%; transition: width 3.6s linear .2s; }
.deploy-story__inspector.is-done .deploy-story__progress > span { background: var(--story-green); transition: none; }
.deploy-story__log { display: grid; gap: 6px; font: 11px/1.5 var(--mh-mono); color: #c9cbd1; }
.deploy-story__log > li { display: flex; gap: 8px; opacity: 0; }
.deploy-story__log > li > span, .deploy-story__published > span { color: var(--story-green); }
.deploy-story__inspector.is-shown .deploy-story__log > li { animation: deploy-story-line .35s ease calc(.3s + var(--line) * .7s) forwards; }
.deploy-story__inspector.is-done .deploy-story__log > li { opacity: 1; animation: none; }
.deploy-story__published { display: flex; gap: 8px; margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--story-line); font: 600 11px/1.5 var(--mh-mono); opacity: 0; transition: opacity .4s ease; }
.deploy-story__inspector.is-done .deploy-story__published { opacity: 1; }

.deploy-story__toast { position: absolute; left: 22px; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(34, 197, 94, .35); border-radius: 10px; background: #18241c; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(14px); transition: opacity .3s ease, transform .45s var(--mh-ease); }
.deploy-story__toast.is-shown { opacity: 1; transform: none; }
.deploy-story__toast-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #229ed9; color: #fff; }
.deploy-story__toast-title { font-weight: 600; }
.deploy-story__toast-text { color: var(--story-muted); font-size: 11px; }

.deploy-story__cursor { position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none; opacity: 0; transition: transform .8s var(--mh-ease), opacity .3s ease; }
.deploy-story__cursor.is-shown { opacity: 1; }
.deploy-story__cursor svg { position: relative; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.deploy-story__cursor.is-clicking svg { animation: deploy-story-click .35s ease .55s; }

.deploy-story__steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 24px !important; }
.deploy-story__steps button { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--gx-muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: color .2s ease; }
.deploy-story__steps button:hover, .deploy-story__steps button.is-active { color: var(--gx-accent-hi); }
.deploy-story__step-dot { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; font-weight: 700; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.deploy-story__steps button.is-active .deploy-story__step-dot { background: var(--gx-accent); border-color: var(--gx-accent); color: #fff; }
.deploy-story__steps button.is-passed .deploy-story__step-dot { border-color: var(--gx-accent); color: var(--gx-accent-hi); }
.deploy-story.is-still .deploy-story__steps { display: none; }

@keyframes deploy-story-pop { from { opacity: 0; transform: scale(.92); } }
@keyframes deploy-story-fade { from { opacity: 0; } }
@keyframes deploy-story-line { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes deploy-story-pulse { 50% { opacity: .35; } }
@keyframes deploy-story-click { 50% { transform: scale(.82); } }

/* ───────── What the panel offers (includes/mh/panel-tour.tpl): a picture plays once when its card is revealed ───────── */
.panel-tour { --tour-bg: #141518; --tour-raised: #1f2125; --tour-line: rgba(255, 255, 255, .08); --tour-text: #e7e8ea; --tour-muted: #8b8e96; --tour-blue: #637AE1; --tour-green: #22c55e; --tour-step: .5s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.panel-tour p, .panel-tour kbd { margin: 0; }
.panel-tour__card { display: flex; flex-direction: column; gap: 18px; padding: 18px; border: 1px solid var(--gx-line); border-radius: 16px; background: var(--gx-bg); text-align: left; }
.panel-tour__card.is-large { grid-column: span 2; grid-row: span 2; }
.panel-tour__text { padding: 0 4px 4px; }
.panel-tour__text h3 { font-family: "Rf ext", Ubuntu, sans-serif; font-size: 17px; font-weight: 600; color: #fff; line-height: 1.3; margin: 0; }
.panel-tour__text p { margin-top: 8px; color: var(--gx-muted); font-size: 14.5px; line-height: 1.5; }
.panel-tour__picture { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 176px; padding: 16px; overflow: hidden; border: 1px solid var(--tour-line); border-radius: 12px; color: var(--tour-text); font-size: 12px; line-height: 1.5; background: radial-gradient(circle, rgba(255, 255, 255, .06) 1.1px, transparent 1.3px) 0 0 / 18px 18px, var(--tour-bg); }
.panel-tour__card.is-large .panel-tour__picture { flex: 1; min-height: 360px; padding: 24px; }
.panel-tour__muted { color: var(--tour-muted); }
.mh-js .panel-tour__card.is-revealed [style*="--at"] { animation: panel-tour-in .45s var(--mh-ease) both; animation-delay: calc(.5s + var(--at) * var(--tour-step)); }
.mh-js .panel-tour__card:not(.is-revealed) [style*="--at"] { opacity: 0; }

.panel-tour__chat { display: flex; flex-direction: column; gap: 10px; }
.panel-tour__client { display: flex; align-items: center; gap: 8px; margin-bottom: 4px !important; font-weight: 600; }
.panel-tour__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tour-green); box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.panel-tour__bubble { max-width: 82%; padding: 9px 12px; border-radius: 12px; font-size: 13px; }
.panel-tour__bubble.is-user { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--tour-blue); color: #fff; }
.panel-tour__bubble.is-assistant { align-self: flex-start; border-bottom-left-radius: 4px; background: var(--tour-raised); }
.panel-tour__tool { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid var(--tour-line); border-radius: 999px; color: var(--tour-muted); font: 11px/1.6 var(--mh-mono); }
.panel-tour__ok { color: var(--tour-green); }
.panel-tour__pr { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(34, 197, 94, .35); border-radius: 10px; background: rgba(34, 197, 94, .08); }
.panel-tour__pr > i { color: var(--tour-green); }
.panel-tour__pr-title { font: 600 12px/1.5 var(--mh-mono); }
.panel-tour__pr .panel-tour__muted { font-size: 11px; }
.panel-tour__badge { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--tour-green); color: #052e16; font-size: 11px; font-weight: 700; white-space: nowrap; }

.panel-tour__pool { padding: 12px; border: 1px solid var(--tour-line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.panel-tour__pool-name { margin-bottom: 10px !important; font: 700 11px/1.4 var(--mh-mono); }
.panel-tour__nodes { display: flex; align-items: center; }
.panel-tour__nodes + .panel-tour__nodes { margin-top: 10px; }
.panel-tour__node { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--tour-line); border-radius: 8px; background: var(--tour-raised); font: 600 11px/1.3 var(--mh-mono); }
.panel-tour__node img { padding: 1px; border-radius: 3px; background: #fff; }
.panel-tour__node i { color: #f87171; }
.panel-tour__wire { position: relative; flex: 1; min-width: 24px; height: 1.5px; }
.panel-tour__wire > span { position: absolute; inset: 0; background: var(--tour-muted); transform-origin: left; }
.panel-tour__wire::after { content: ""; position: absolute; top: -2.5px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--tour-blue); box-shadow: 0 0 8px var(--tour-blue); animation: panel-tour-run 1.8s ease-in-out infinite; }
.mh-js .panel-tour__card.is-revealed .panel-tour__wire > span { animation: panel-tour-draw .6s var(--mh-ease) both; animation-delay: calc(.5s + var(--at) * var(--tour-step)); }

.panel-tour__log { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font: 11.5px/1.5 var(--mh-mono); }
.panel-tour__error { color: #f87171; }
.panel-tour__ask { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; background: var(--tour-blue); color: #fff; font: 600 12px/1.4 system-ui, sans-serif; }
.mh-js .panel-tour__card.is-revealed .panel-tour__ask { animation: panel-tour-in .45s var(--mh-ease) both, panel-tour-press .3s ease both; animation-delay: calc(.5s + 2 * var(--tour-step)), calc(.5s + 2.8 * var(--tour-step)); }
.panel-tour__answer { padding: 8px 10px; border-left: 2px solid var(--tour-blue); border-radius: 0 8px 8px 0; background: rgba(99, 122, 225, .1); color: var(--tour-text); font: 12px/1.5 system-ui, sans-serif; }

.panel-tour__terminal { display: flex; flex-direction: column; gap: 5px; font: 11.5px/1.6 var(--mh-mono); }
.panel-tour__tabs { display: flex; gap: 4px; margin-bottom: 6px !important; }
.panel-tour__tabs > span { padding: 2px 10px; border-radius: 6px 6px 0 0; background: rgba(255, 255, 255, .04); color: var(--tour-muted); }
.panel-tour__tabs > .is-active { background: var(--tour-raised); color: var(--tour-text); }
.panel-tour__prompt { color: #4ade80; }
.panel-tour__typed { display: inline-block; max-width: calc(var(--chars) * 1ch); overflow: hidden; white-space: nowrap; vertical-align: bottom; font-family: var(--mh-mono); }
.mh-js .panel-tour__card.is-revealed .panel-tour__typed { animation: panel-tour-type calc(var(--chars) * 60ms) steps(var(--chars)) both; animation-delay: calc(.5s + var(--at, 1) * var(--tour-step)); }
.panel-tour__out { color: var(--tour-muted); }
.panel-tour__caret { display: inline-block; width: 7px; height: 13px; vertical-align: -2px; background: var(--tour-text); animation: panel-tour-blink 1s steps(1) infinite; }

.panel-tour__usage { display: flex; flex-direction: column; gap: 12px; }
.panel-tour__meter > p { display: flex; justify-content: space-between; color: var(--tour-muted); font-size: 11px; }
.panel-tour__bar { position: relative; display: block; height: 8px; margin-top: 5px; border: 1px dashed rgba(255, 255, 255, .22); border-radius: 6px; overflow: hidden; }
.panel-tour__bar > span { position: absolute; inset: 0 auto 0 0; width: var(--share); border-radius: 5px; background: var(--tour-blue); transform-origin: left; }
.panel-tour__bar.is-live > span { background: #f5b800; animation: panel-tour-live 2.6s ease-in-out infinite; }
.mh-js .panel-tour__card.is-revealed .panel-tour__bar > span { animation: panel-tour-grow 1s var(--mh-ease) both; animation-delay: calc(.5s + var(--at) * var(--tour-step)); }
.mh-js .panel-tour__card.is-revealed .panel-tour__bar.is-live > span { animation: panel-tour-grow 1s var(--mh-ease) both, panel-tour-live 2.6s ease-in-out infinite; animation-delay: calc(.5s + var(--at) * var(--tour-step)), calc(1.5s + var(--at) * var(--tour-step)); }
.panel-tour__legend { display: flex; align-items: center; gap: 6px; color: var(--tour-muted); font-size: 11px; }
.panel-tour__legend > span { width: 10px; height: 10px; border-radius: 3px; }
.panel-tour__legend > .is-used { background: var(--tour-blue); }
.panel-tour__legend > .is-limit { margin-left: 10px; border: 1px dashed rgba(255, 255, 255, .4); }

.panel-tour__palette { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.panel-tour__keys { display: flex; gap: 6px; }
.panel-tour__keys kbd { min-width: 30px; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .2); border-bottom-width: 3px; border-radius: 7px; background: var(--tour-raised); color: var(--tour-text); box-shadow: none; font: 600 12px/1.5 system-ui, sans-serif; text-align: center; }
.mh-js .panel-tour__card.is-revealed .panel-tour__keys kbd { animation: panel-tour-in .4s var(--mh-ease) both, panel-tour-press .3s ease both; animation-delay: calc(.5s + var(--tour-step)), calc(.5s + 1.6 * var(--tour-step)); }
.panel-tour__search { width: 100%; max-width: 260px; padding: 6px; border: 1px solid var(--tour-line); border-radius: 10px; background: var(--tour-raised); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.panel-tour__query { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; border-bottom: 1px solid var(--tour-line); color: var(--tour-muted); }
.panel-tour__query .panel-tour__typed { color: var(--tour-text); }
.panel-tour__option { display: flex; align-items: center; gap: 8px; margin-top: 4px !important; padding: 5px 6px; border-radius: 6px; color: var(--tour-muted); }
.panel-tour__option.is-active { background: rgba(99, 122, 225, .22); color: var(--tour-text); }
.panel-tour__option > span { margin-left: auto; }

@keyframes panel-tour-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes panel-tour-draw { from { transform: scaleX(0); } }
@keyframes panel-tour-run { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 6px); opacity: 0; } }
@keyframes panel-tour-press { 50% { transform: translateY(2px) scale(.95); filter: brightness(1.25); } }
@keyframes panel-tour-type { from { max-width: 0; } }
@keyframes panel-tour-blink { 50% { opacity: 0; } }
@keyframes panel-tour-grow { from { transform: scaleX(0); } }
@keyframes panel-tour-live { 0%, 100% { width: var(--share); } 35% { width: calc(var(--share) + 14%); } 65% { width: calc(var(--share) - 6%); } }

/* ───────── Stacks ───────── */
.mh-stacks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mh-stack { display: flex; flex-direction: column; padding: 22px; border-radius: 14px; background: var(--gx-bg-2); border: 1px solid var(--gx-line); transition: border-color .25s, transform .25s; }
.mh-stack:hover { border-color: rgba(99, 122, 225, .45); transform: translateY(-2px); }
.mh-stack__head { display: flex; align-items: center; gap: 14px; }
.mh-stack__logo { flex: none; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 12px; background: #fff; }
.mh-stack__logo img { width: 34px; height: 34px; object-fit: contain; }
.mh-stack__logo.is-icon { background: rgba(99, 122, 225, .14); color: var(--gx-accent); font-size: 24px; }
.mh-stack h3 { margin: 0; font-family: "Rf ext", Ubuntu, sans-serif; font-size: 17px; font-weight: 600; color: #fff; }
.mh-stack p { margin: 14px 0 0; color: var(--gx-muted); font-size: 14.5px; }
.mh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px !important; }
.mh-tags li { padding: 4px 10px; border-radius: 20px; background: var(--gx-card); color: #c9cee0; font-size: 12px; font-weight: 600; }
.mh-templates { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 18px; padding: 22px; border-radius: 14px; border: 1px dashed rgba(255, 255, 255, .16); }
.mh-templates > i { font-size: 26px; color: var(--gx-dim); }
.mh-templates__text { flex: 1; min-width: 220px; }
.mh-templates h3 { margin: 0; font-family: "Rf ext", Ubuntu, sans-serif; font-size: 17px; color: #fff; }
.mh-templates p { margin: 4px 0 0; color: var(--gx-muted); font-size: 14.5px; }
.mh-templates .mh-tags { margin-top: 0 !important; }

/* ───────── Tariffs (includes/mh/tariffs.tpl) ───────── */
.mh-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 1140px; margin: 0 auto; }
.mh-plan { position: relative; display: flex; flex-direction: column; padding: 26px; border-radius: 16px; background: var(--gx-bg); border: 1px solid var(--gx-line); transition: border-color .25s, transform .25s; }
.mh-plan:hover { border-color: rgba(99, 122, 225, .45); transform: translateY(-3px); }
.mh-plan.is-featured { border-color: var(--gx-accent); box-shadow: 0 20px 60px rgba(99, 122, 225, .18); background: linear-gradient(180deg, rgba(99, 122, 225, .1), var(--gx-bg) 45%); }
.mh-plan__badge { position: absolute; top: -12px; left: 26px; padding: 3px 12px; border-radius: 20px; background: var(--gx-accent); color: #fff; font-size: 12px; font-family: "Rf ext", Ubuntu, sans-serif; letter-spacing: .03em; }
.mh-plan h3 { margin: 0; font-family: "Rf exp", Ubuntu, sans-serif; font-size: 22px; font-weight: 600; color: #fff; }
.mh-plan__for { margin: 4px 0 0; color: var(--gx-muted); font-size: 14px; min-height: 42px; }
.mh-plan__price { margin: 16px 0 0; font-family: "Rf exp", Ubuntu, sans-serif; font-size: 34px; font-weight: 600; color: #fff; line-height: 1.1; }
.mh-plan__price small { font-family: "Rf regular", Ubuntu, sans-serif; font-size: 15px; font-weight: 400; color: var(--gx-muted); }
.mh-plan__specs { display: flex; flex-direction: column; gap: 11px; margin: 20px 0 24px !important; padding: 18px 0 0 !important; border-top: 1px solid var(--gx-line); }
.mh-plan__specs li { display: flex; gap: 10px; color: #dfe3f0; font-size: 14.5px; line-height: 1.4; }
.mh-plan__specs i { flex: none; width: 18px; margin-top: 2px; text-align: center; color: var(--gx-accent); }
.mh-plan .gx-btn { margin-top: auto; width: 100%; }
.mh-included { max-width: 1140px; margin: 30px auto 0; padding: 22px; border-radius: 16px; background: var(--gx-bg); border: 1px solid var(--gx-line); text-align: center; }
.mh-included h3 { margin: 0; font-family: "Rf ext", Ubuntu, sans-serif; font-size: 16px; color: #fff; }
.mh-included ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; margin-top: 14px !important; }
.mh-included li { display: flex; align-items: center; gap: 8px; color: #dfe3f0; font-size: 14.5px; }
.mh-included li i { color: var(--gx-accent); }
.mh-included p { margin: 14px 0 0; color: var(--gx-muted); font-size: 13.5px; }

/* ───────── How it works ───────── */
.mh-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: mh-step; }
.mh-steps li { padding: 22px; border-radius: 14px; background: var(--gx-bg-2); border: 1px solid var(--gx-line); }
.mh-steps li::before { counter-increment: mh-step; content: counter(mh-step); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(99, 122, 225, .14); color: var(--gx-accent-hi); font-family: "Rf exp", Ubuntu, sans-serif; font-weight: 700; }
.mh-steps h3 { margin: 18px 0 0; font-family: "Rf ext", Ubuntu, sans-serif; font-size: 16px; color: #fff; }
.mh-steps p { margin: 6px 0 0; color: var(--gx-muted); font-size: 14px; }

/* ───────── Features ───────── */
.mh-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mh-feats .gx-feat { padding: 20px; }
.mh-feats .gx-feat h3 { font-size: 16px; }
.mh-feats .gx-feat p { font-size: 14px; }

/* ───────── Comparison ───────── */
.mh-cmp { overflow-x: auto; border-radius: 14px; border: 1px solid var(--gx-line); }
.mh-cmp table { width: 100%; min-width: 760px; border-collapse: collapse; background: var(--gx-bg); }
.mh-cmp th, .mh-cmp td { padding: 16px 18px; border-bottom: 1px solid var(--gx-line); text-align: left; vertical-align: top; font-size: 14.5px; }
.mh-cmp tr:last-child > * { border-bottom: 0; }
.mh-cmp thead th { background: #262a37; vertical-align: bottom; }
.mh-cmp thead th b { display: block; font-family: "Rf ext", Ubuntu, sans-serif; font-size: 16px; color: #fff; }
.mh-cmp thead th small { display: block; margin-top: 2px; color: var(--gx-muted); font-size: 12.5px; font-weight: 400; }
.mh-cmp thead th a { display: inline-block; margin-top: 10px; color: var(--gx-accent-hi); font-size: 13px; font-weight: 600; }
.mh-cmp tbody th { width: 20%; font-family: "Rf ext", Ubuntu, sans-serif; font-weight: 400; color: #fff; }
.mh-cmp td { color: var(--gx-muted); }
.mh-cmp td i { margin-right: 6px; }
.mh-cmp .is-plus i { color: var(--gx-ok); }
.mh-cmp .is-minus i { color: var(--gx-red); }
.mh-cmp .is-neutral i { color: var(--gx-dim); }
.mh-cmp .is-hl { background: rgba(99, 122, 225, .08); color: #e6e9f5; }
.mh-cmp thead .is-hl { background: rgba(99, 122, 225, .2); }

/* ───────── SEO text ───────── */
.mh-seo { max-width: 860px; margin: 0 auto; }
.mh-seo > p { margin: 14px 0 0; color: var(--gx-muted); font-size: 16px; }
.mh-seo h3 { margin: 30px 0 0; font-family: "Rf ext", Ubuntu, sans-serif; font-size: 19px; color: #fff; }
.mh-seo h3 + p { margin-top: 10px; }
.mh-seo p + p { margin-top: 12px; }
.mh-seo__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px !important; }

/* Cards come in once while scrolling (js/app-hosting.js); without JS everything is shown */
.mh-js [data-mh-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s var(--mh-ease); }
.mh-js [data-mh-reveal].is-revealed { opacity: 1; transform: none; }

/* ───────── Game-page layout (app.tpl, bots.tpl): Font Awesome icons in the theme's tabs and cards ───────── */
.mh-page .mh-about-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; font-size: 34px; color: var(--icon-color, #5D637F); transition: color .33s; }
.mh-page .mh-about-icon.is-big { flex: none; margin-right: 16px; color: #637AE1; }
.mh-page .mh-panel-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 28px; color: #5D637F; transition: color .33s; }
.mh-page .panel__button:hover .mh-panel-icon, .mh-page .panel__button.active .mh-panel-icon { color: #637AE1; }
.mh-page .card__platform i { margin-right: 4px; }
.mh-page .mh-cards-note { margin: 26px auto 0; max-width: 900px; text-align: center; color: #8A90A8; font-size: 15px; line-height: 1.5; }
.mh-page .gx--embed.mh .gx-sec:first-child { margin-top: 110px; }

/* Hero: one slide, the title stays left of the panel picture, stacks instead of the slider thumbnails */
.mh-page { --mh-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; --mh-ease: cubic-bezier(.22, 1, .36, 1); }
.mh-page .main__slider-buttons { display: none; }
.mh-page .main__screen-title { max-width: 600px; }
.mh-page .main__screen-wrapper { gap: 40px; }
.mh-page .main__screen-info { flex: 1 1 auto; min-width: 0; }
/* The deploy log is live HTML next to the title (sharp on any screen), not part of the slide picture */
.mh-hero-art { flex: 0 0 460px; max-width: 460px; }
.mh-hero-art .mh-window { box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(99, 122, 225, .25); }
.mh-hero-art .hero-log { font-size: 12px; line-height: 22px; }
@media (max-width: 1100px) {
    .mh-hero-art { flex-basis: 400px; max-width: 400px; }
}
@media (max-width: 991px) {
    .mh-page .main__screen-wrapper { flex-direction: column; align-items: stretch; }
    .mh-hero-art { flex-basis: auto; max-width: 520px; transform: none; }
}
.mh-hero-stacks { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 36px 0 0; padding: 0; list-style: none; }
.mh-hero-stack { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 10px; background: rgba(36, 39, 52, .72); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(7px); transition: border-color .25s, transform .25s; }
.mh-hero-stack:hover { border-color: rgba(99, 122, 225, .5); transform: translateY(-2px); }
.mh-hero-stack__head { display: flex; align-items: center; gap: 10px; }
.mh-hero-stack__logo { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; background: #fff; }
.mh-hero-stack__logo img { width: 26px; height: 26px; object-fit: contain; }
.mh-hero-stack__logo.is-icon { background: rgba(99, 122, 225, .16); color: #637AE1; font-size: 18px; }
.mh-hero-stack__name { font-family: 'Rf ext', Ubuntu, sans-serif; font-size: 15px; color: #fff; line-height: 1.2; }
.mh-hero-stack__tags { color: #8A90A8; font-size: 12.5px; line-height: 1.4; }
@media (max-width: 767px) {
    .mh-hero-stacks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .mh-hero-stack { padding: 10px 12px; }
}

/* ───────── Responsive ───────── */
@media (max-width: 1100px) {
    .mh-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
    .deploy-story__panel { grid-template-columns: minmax(0, 1fr); }
    .deploy-story__sidebar { display: none; }
    .deploy-story__inspector { width: 240px; }
    .panel-tour { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel-tour__card.is-large { grid-column: 1 / -1; grid-row: auto; }
    .mh-stacks, .mh-plans, .mh-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .mh .gx-hero__grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .mh-alt { margin-top: 80px; padding: 70px 0; }
    .deploy-story__panel { min-height: 0; font-size: 11px; }
    .deploy-story__header { gap: 8px; padding: 12px; }
    .deploy-story__title { font-size: 15px; }
    .deploy-story__switch { display: none; }
    .deploy-story__picker { right: 12px; width: min(250px, calc(100% - 24px)); }
    .deploy-story__canvas { min-height: 540px; margin: 0 12px 12px; padding: 12px; }
    .deploy-story__pool { padding: 12px; }
    .deploy-story__meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .deploy-story__cards { flex-direction: column; align-items: flex-start; }
    .deploy-story__card.is-app { width: 100%; max-width: 240px; }
    .deploy-story__link { flex-basis: 22px; width: 1.5px; height: 22px; margin-left: 24px; }
    .deploy-story__link > span { transform: scaleY(0); transform-origin: top; }
    .deploy-story__inspector { top: auto; left: 12px; right: 12px; width: auto; height: 36%; overflow: hidden; }
    .deploy-story__toast { top: 12px; left: 12px; right: 12px; bottom: auto; transform: translateY(-14px); }
    .panel-tour, .mh-stacks, .mh-plans, .mh-feats, .mh-steps { grid-template-columns: minmax(0, 1fr); }
    .panel-tour__card.is-large .panel-tour__picture { min-height: 0; }
    .mh-plan__for { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-log__line, .hero-log__line .hero-log__pending, .hero-log__line .hero-log__done, .hero-log__count { animation: none; }
    .hero-log__line { opacity: 1; color: #d1d5db; }
    .hero-log__line .hero-log__pending { opacity: 0; }
    .hero-log__line .hero-log__done { opacity: 1; }
    .hero-log__count { --hero-count: var(--to); }
    .deploy-story *, .deploy-story *::before, .deploy-story *::after, .panel-tour *, .panel-tour *::before, .panel-tour *::after { animation: none !important; transition: none !important; }
    .mh-js [data-mh-reveal], .mh-js .panel-tour__card:not(.is-revealed) [style*="--at"] { opacity: 1; transform: none; }
}
