/* ==========================================================================
   servers-b — logo library helpers (global) + 1-click apps page (ap-)
   ========================================================================== */

/* ---------- Logo library: assets/img/logos/<slug>.svg ----------
   The SVGs are single-colour (fill="currentColor", which renders black inside <img>).
   Dark theme inverts them; add .logo-img--on-dark on permanently dark surfaces. */
img.logo-img { display: inline-block; flex: none; object-fit: contain; vertical-align: middle; }
[data-theme="dark"] img.logo-img,
img.logo-img.logo-img--on-dark { filter: invert(0.94); }

/* ---------- shared bits ---------- */
.ap-logo { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.ap-logo img { width: 26px; height: 26px; }
.ap-logo--lg { width: 54px; height: 54px; border-radius: 14px; }
.ap-logo--lg img { width: 30px; height: 30px; }
.ap-head { margin-bottom: 44px; }
.ap-head p { max-width: 640px; }
.ap-h2 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -0.045em; line-height: 1.04; margin: 16px 0 18px; }

/* ---------- Hero ---------- */
.ap-hero .page-hero__grid { align-items: center; }
.ap-search { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: border-color 0.2s, box-shadow 0.2s; }
.ap-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent), var(--shadow); }
.ap-search > svg { width: 19px; height: 19px; color: var(--faint); flex: none; }
.ap-search input { flex: 1; min-width: 0; height: 44px; padding: 0; background: none; border: 0; outline: none; font-size: 1rem; color: var(--ink); }
.ap-search input::placeholder { color: var(--faint); }
.ap-search--hero { margin-top: 30px; max-width: 560px; }
.ap-search--inline { flex: 1 1 260px; max-width: 360px; height: 42px; padding: 0 14px; box-shadow: none; border-color: var(--line); background: var(--card); }
.ap-search--inline:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.ap-search--inline input { height: 40px; font-size: 0.94rem; }
.ap-search--inline > svg { width: 17px; height: 17px; }

.ap-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; gap: 2px; max-height: 372px; overflow-y: auto; padding: 6px; margin: 0; list-style: none; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); animation: ap-in 0.25s var(--ease); }
.ap-suggest[hidden] { display: none; }
.ap-suggest li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.ap-suggest li[aria-selected="true"], .ap-suggest li:hover { background: var(--bg); }
.ap-suggest .ap-logo { width: 36px; height: 36px; border-radius: 10px; }
.ap-suggest .ap-logo img { width: 20px; height: 20px; }
.ap-suggest b { display: block; font-weight: 560; font-size: 0.95rem; color: var(--ink); line-height: 1.3; }
.ap-suggest small { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.ap-suggest em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.ap-suggest li.ap-suggest__all { justify-content: center; padding: 10px; font-size: 0.88rem; font-weight: 560; color: var(--accent); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.ap-suggest li.ap-suggest__none { cursor: default; justify-content: center; padding: 14px; color: var(--muted); font-size: 0.9rem; }
.ap-suggest li.ap-suggest__none:hover { background: none; }

.ap-hero__facts { display: flex; flex-wrap: wrap; width: max-content; max-width: 100%; margin-top: 26px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--card) 72%, transparent); }
.ap-hero__facts li { padding: 12px 20px; border-right: 1px solid var(--line); }
.ap-hero__facts li:last-child { border-right: 0; }
.ap-hero__facts b { display: block; font-size: 1.55rem; font-weight: 540; letter-spacing: -0.045em; line-height: 1.15; color: var(--ink); }
.ap-hero__facts span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* deploy mock */
.ap-deploy__body { gap: 12px; }
.ap-deploy__label { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ap-deploy__label span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--inv-bg); color: var(--inv-ink); font-size: 0.6rem; letter-spacing: 0; }
.ap-deploy__apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ap-deploy__apps span { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 70px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 0.72rem; font-weight: 520; color: var(--ink-2); text-align: center; transition: border-color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.35s var(--ease); }
.ap-deploy__apps span.is-selected { border-color: var(--accent); background: var(--card); color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); transform: translateY(-1px); }
.ap-deploy__apps span.is-selected::after { content: ""; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ap-deploy__apps b { font-size: 1rem; font-weight: 560; line-height: 22px; color: var(--ink); }
.ap-deploy__opts { display: grid; grid-template-columns: 1.05fr 0.85fr 1.1fr; gap: 8px; }
.ap-deploy__opts > div { min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.ap-deploy__opts small { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.ap-deploy__opts strong { display: block; font-size: 1rem; font-weight: 580; letter-spacing: -0.02em; line-height: 1.35; }
.ap-deploy__opts em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-family: var(--mono); font-size: 0.66rem; color: var(--muted); }
.ap-deploy__opts > .ap-deploy__price { background: var(--inv-bg); border-color: var(--inv-bg); }
.ap-deploy__price small, .ap-deploy__price em { color: var(--inv-muted); }
.ap-deploy__price strong { color: var(--inv-ink); font-size: 1.2rem; letter-spacing: -0.04em; }
.ap-deploy__price strong span { font-size: 0.74rem; font-weight: 400; letter-spacing: 0; color: var(--inv-muted); }
.ap-deploy__log { padding: 12px 14px 13px; border-radius: 12px; background: var(--space); border: 1px solid rgba(255, 255, 255, 0.06); font-family: var(--mono); font-size: 0.72rem; color: #c9cfe6; }
.ap-deploy__bar { height: 3px; margin-bottom: 10px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.ap-deploy__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7b8cff, #3ccf8a); }
.ap-deploy__log ol { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.ap-deploy__log li { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-deploy__log li svg { width: 12px; height: 12px; color: #3ccf8a; }
.ap-deploy__log li.is-ready { color: #fff; }
.ap-deploy__log li.is-ready .live-dot { width: 7px; height: 7px; margin: 0 2px; background: #3ccf8a; }
.ap-deploy__log code { padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; font-size: 0.95em; }
/* JS adds .is-anim (lines start hidden) and .is-run (play) */
.ap-deploy.is-anim .ap-deploy__bar span { transform: scaleX(0); transform-origin: 0 50%; }
.ap-deploy.is-anim .ap-deploy__log li { opacity: 0; transform: translateY(4px); }
.ap-deploy.is-run .ap-deploy__bar span { animation: ap-progress 2.6s var(--ease) forwards; }
.ap-deploy.is-run .ap-deploy__log li { animation: ap-line 0.45s var(--ease) forwards; }
.ap-deploy.is-run .ap-deploy__log li:nth-child(1) { animation-delay: 0.15s; }
.ap-deploy.is-run .ap-deploy__log li:nth-child(2) { animation-delay: 0.65s; }
.ap-deploy.is-run .ap-deploy__log li:nth-child(3) { animation-delay: 1.15s; }
.ap-deploy.is-run .ap-deploy__log li:nth-child(4) { animation-delay: 1.65s; }
.ap-deploy.is-run .ap-deploy__log li:nth-child(5) { animation-delay: 2.25s; }

/* ---------- Featured ---------- */
.ap-feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ap-feat { position: relative; display: flex; flex-direction: column; padding: 22px 24px 22px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color 0.2s, box-shadow 0.35s var(--ease), transform 0.35s var(--ease); }
.ap-feat:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.ap-feat__text { display: flex; flex-direction: column; flex: 1; }
.ap-feat__id { display: flex; align-items: center; gap: 14px; }
.ap-feat__id h3 { font-size: 1.4rem; font-weight: 580; letter-spacing: -0.035em; }
.ap-feat__id div > span { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.ap-feat__text > p { margin: 14px 0 16px; color: var(--muted); font-size: 0.96rem; }
.ap-feat__stack { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-feat__stack li { padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2); }
.ap-feat__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 18px; }
.ap-feat__stack + .ap-feat__foot { margin-top: 20px; border-top: 1px dashed var(--line-2); }
.ap-feat__price { font-size: 0.9rem; color: var(--muted); line-height: 1.25; }
.ap-feat__price b { font-size: 1.35rem; font-weight: 560; letter-spacing: -0.04em; color: var(--ink); }
.ap-feat__price small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--faint); }
.ap-feat__btns { display: flex; gap: 8px; }

.ap-vis { position: relative; order: -1; height: 200px; margin: -8px -10px 22px; border-radius: 16px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.ap-vis__bar { display: flex; align-items: center; gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.ap-vis__bar i, .ap-vis__tbar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.ap-vis__bar span { margin-left: 8px; padding: 2px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); font-family: var(--mono); font-size: 0.64rem; color: var(--muted); }
/* site */
.ap-vis__page { display: grid; gap: 10px; padding: 12px 16px; }
.ap-vis__nav { display: flex; align-items: center; gap: 8px; }
.ap-vis__nav b { width: 46px; height: 9px; margin-right: auto; border-radius: 4px; background: var(--ink); opacity: 0.85; }
.ap-vis__nav i { width: 28px; height: 6px; border-radius: 3px; background: var(--line-2); }
.ap-vis__hero { position: relative; display: grid; gap: 7px; align-content: center; height: 70px; padding: 0 16px; border-radius: 10px; background: var(--grad); overflow: hidden; }
.ap-vis__hero span { height: 8px; width: 55%; border-radius: 4px; background: rgba(255, 255, 255, 0.92); }
.ap-vis__hero span + span { width: 38%; height: 6px; background: rgba(255, 255, 255, 0.6); }
.ap-vis__hero em { width: 54px; height: 14px; margin-top: 3px; border-radius: 7px; background: #fff; }
.ap-vis__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ap-vis__cols i { height: 38px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.ap-feat:hover .ap-vis__hero { animation: ap-shine 1.6s var(--ease); }
/* terminals */
.ap-vis--term, .ap-vis--pm2 { background: var(--space); border-color: rgba(255, 255, 255, 0.06); color: #c9cfe6; }
.ap-vis__tbar { display: flex; align-items: center; gap: 5px; padding: 9px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.ap-vis__tbar i { background: #3a3b44; }
.ap-vis__tbar span { margin-left: 8px; font-family: var(--mono); font-size: 0.64rem; color: #6c6d78; }
.ap-vis--term pre { margin: 0; padding: 12px 16px; font-family: var(--mono); font-size: 0.74rem; line-height: 1.75; white-space: pre; overflow: hidden; }
.ap-vis--term .p { color: #8fa0ff; } .ap-vis--term .g { color: #3ccf8a; } .ap-vis--term .d { color: #6c6d78; }
.ap-vis--term .c { display: inline-block; width: 7px; height: 1.05em; vertical-align: text-bottom; background: #8fa0ff; animation: ap-blink 1s steps(2) infinite; }
.ap-vis--pm2 table { width: calc(100% - 24px); margin: 12px; border-collapse: collapse; font-family: var(--mono); font-size: 0.72rem; }
.ap-vis--pm2 th, .ap-vis--pm2 td { padding: 7px 8px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.07); white-space: nowrap; }
.ap-vis--pm2 th { font-weight: 500; color: #6c6d78; text-transform: uppercase; font-size: 0.62rem; letter-spacing: 0.08em; }
.ap-vis--pm2 td:nth-child(2) { color: #fff; }
.ap-vis--pm2 .on { display: inline-flex; align-items: center; gap: 6px; color: #3ccf8a; }
.ap-vis--pm2 .on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3ccf8a; box-shadow: 0 0 6px #3ccf8a; animation: blink 1.6s steps(2) infinite; }
/* flow */
.ap-vis--flow { background-color: var(--bg); background-image: radial-gradient(var(--line-2) 1px, transparent 1px); background-size: 14px 14px; }
.ap-flow__wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.ap-flow__wires path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 5 7; vector-effect: non-scaling-stroke; opacity: 0.55; animation: ap-dash 1.2s linear infinite; }
.ap-node { position: absolute; top: 50%; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); transform: translateY(-50%); min-width: 0; }
.ap-node svg { grid-row: span 2; width: 26px; height: 26px; padding: 5px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.ap-node b { font-size: 0.78rem; font-weight: 580; color: var(--ink); line-height: 1.2; white-space: nowrap; }
.ap-node small { font-family: var(--mono); font-size: 0.6rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-node--a { left: 2.7%; width: 25.3%; }
.ap-node--b { left: 36.7%; width: 24.6%; }
.ap-node--c { left: 70.7%; width: 27.3%; top: 25.9%; }
.ap-node--d { left: 70.7%; width: 27.3%; top: 74.1%; }
.ap-node--a svg { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.ap-node--d svg { background: var(--green-soft); color: var(--green); }

/* ---------- Catalogue: grouped index, one action per app (the row opens the details dialog) ---------- */
.ap-cat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 32px; flex-wrap: wrap; margin-bottom: 22px; }
.ap-cat-head .ap-head { margin-bottom: 0; }
.ap-cat-head .ap-head p { max-width: 560px; }
.ap-cat-tools .ap-search--inline { flex: 0 1 240px; }
.ap-cat-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 8px; padding: 0 0 18px; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 0.86rem; font-weight: 520; color: var(--ink-2); white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s; }
.ap-chip span { min-width: 1.2em; font-family: var(--mono); font-size: 0.7rem; color: var(--faint); text-align: center; }
.ap-chip:hover { color: var(--ink); border-color: var(--line-2); }
.ap-chip.is-active { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-ink); }
.ap-chip.is-active span { color: var(--inv-muted); }
.ap-chip.is-zero:not(.is-active) { opacity: 0.5; }
.ap-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.ap-seg button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 0.86rem; font-weight: 540; color: var(--muted); white-space: nowrap; transition: background 0.25s, color 0.25s, box-shadow 0.25s; }
.ap-seg button span { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); }
.ap-seg button:hover { color: var(--ink); }
.ap-seg button.is-active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.ap-count { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.ap-count b { color: var(--ink); font-weight: 500; }

.ap-groups { border-top: 1px solid var(--line); }
.ap-group { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px 48px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.ap-group[hidden] { display: none; }
.ap-group__head { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; padding-top: 6px; }
.ap-group__title { display: flex; align-items: baseline; gap: 10px; font-size: 1.12rem; font-weight: 580; letter-spacing: -0.025em; line-height: 1.25; }
.ap-group__n { font-family: var(--mono); font-size: 0.72rem; font-weight: 400; letter-spacing: 0; color: var(--faint); }
.ap-group__head p { margin-top: 6px; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
.ap-group__head p.ap-group__note { margin-top: 10px; font-size: 0.74rem; color: var(--faint); }
.ap-group__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ap-groups.is-filtering .ap-card { animation: ap-in 0.45s var(--ease) both; }

.ap-card { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) 16px; gap: 14px; align-items: start; padding: 16px 16px 15px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 40px); transition: border-color 0.2s, box-shadow 0.35s var(--ease), transform 0.35s var(--ease); }
.ap-card[hidden] { display: none; }
.ap-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.ap-card.is-target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.ap-card .ap-logo { width: 46px; height: 46px; }
.ap-card__body { min-width: 0; }
.ap-card__name { font-size: 1rem; font-weight: 580; letter-spacing: -0.02em; line-height: 1.3; }
.ap-card__btn { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ap-card__btn::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ap-card__btn:focus-visible { outline: none; }
.ap-card:has(.ap-card__btn:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-card__pitch { margin-top: 3px; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.ap-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 9px; font-size: 0.74rem; color: var(--muted); }
.ap-min { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.ap-min b { font-weight: 500; color: var(--ink); }
.ap-flag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ap-flag::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--faint); }
.ap-flag--host::before { background: var(--green); }
.ap-flag--lic::before { background: var(--amber); }
.ap-card__go { width: 16px; height: 16px; margin-top: 4px; color: var(--faint); transition: transform 0.3s var(--ease), color 0.2s; }
.ap-card:hover .ap-card__go { color: var(--accent); transform: translateX(3px); }

/* brand-coloured logo marks (open-source marks only; monogram tiles keep the neutral <img>) */
.ap-logo--brand { background: color-mix(in srgb, var(--brand) 8%, var(--card)); border-color: color-mix(in srgb, var(--brand) 20%, var(--line)); }
.ap-mark { display: block; width: 26px; height: 26px; flex: none; background: var(--brand, var(--ink)); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.ap-card .ap-mark { width: 28px; height: 28px; }
.ap-logo--lg .ap-mark { width: 30px; height: 30px; }
.ap-deploy__apps .ap-mark, .ap-softmock__grid .ap-mark { width: 22px; height: 22px; }
.ap-suggest .ap-mark { width: 20px; height: 20px; }
[data-theme="dark"] .ap-logo--brand { background: color-mix(in srgb, var(--brand) 14%, var(--card)); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
[data-theme="dark"] .ap-mark { background: color-mix(in srgb, var(--brand, #fff) 74%, #fff); }

.ap-empty { padding: 56px 24px; text-align: center; border-radius: var(--radius-lg); border: 1px dashed var(--line-2); background: var(--card); }
.ap-empty[hidden] { display: none; }
.ap-empty__icon { width: 52px; height: 52px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.ap-empty__icon svg { width: 22px; height: 22px; }
.ap-empty h3 { font-size: 1.35rem; letter-spacing: -0.03em; }
.ap-empty p { max-width: 480px; margin: 10px auto 22px; color: var(--muted); }
.ap-empty__btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

/* ---------- How it works ---------- */
.ap-how__grid { align-items: start; }
.ap-steps-big { display: grid; margin: 28px 0 0; padding: 0; list-style: none; }
.ap-steps-big li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.ap-steps-big li:last-child { border-bottom: 1px solid var(--line); }
.ap-steps-big h3 { margin: 9px 0 6px; font-size: 1.12rem; font-weight: 580; letter-spacing: -0.02em; }
.ap-steps-big p { color: var(--muted); font-size: 0.94rem; }
.ap-motd { box-shadow: var(--shadow-lg); }
.ap-motd .terminal__body { min-height: 0; font-size: 0.8rem; line-height: 1.7; }
.ap-motd__note { margin-top: 10px; font-size: 0.76rem; color: var(--faint); text-align: right; }
.ap-every { margin-top: 72px; }
.ap-every__title { margin-bottom: 18px; font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ap-every__list { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); }
.ap-every__list li { display: flex; gap: 14px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ap-every__list li:nth-child(3n) { border-right: 0; }
.ap-every__list li:nth-last-child(-n+3) { border-bottom: 0; }
.ap-every__list svg { width: 38px; height: 38px; padding: 9px; flex: none; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.ap-every__list b { display: block; font-weight: 580; color: var(--ink); letter-spacing: -0.015em; }
.ap-every__list span { display: block; margin-top: 2px; font-size: 0.88rem; color: var(--muted); }

/* ---------- Softaculous band ---------- */
.ap-soft { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ap-soft__band { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ap-soft__text > p { margin-bottom: 22px; color: var(--muted); font-size: 1.05rem; }
.ap-soft__text .check-list { margin-bottom: 4px; }
.ap-softmock__body { display: grid; grid-template-columns: 148px 1fr; min-height: 270px; }
.ap-softmock__side { display: grid; align-content: start; gap: 2px; padding: 16px 10px; border-right: 1px solid var(--line); background: var(--bg); font-size: 0.78rem; color: var(--muted); }
.ap-softmock__side b { margin: 0 8px 6px; font-family: var(--mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ap-softmock__side span { padding: 6px 8px; border-radius: 8px; }
.ap-softmock__side span.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.ap-softmock__main { display: grid; align-content: start; gap: 12px; padding: 16px; }
.ap-softmock__search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 0.78rem; color: var(--faint); }
.ap-softmock__search svg { width: 14px; height: 14px; }
.ap-softmock__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ap-softmock__grid span { display: grid; justify-items: center; gap: 6px; padding: 14px 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 0.74rem; font-weight: 540; color: var(--ink-2); transition: transform 0.3s var(--ease), border-color 0.2s; }
.ap-softmock__grid span:hover { transform: translateY(-2px); border-color: var(--line-2); }
.ap-softmock__grid em { padding: 2px 10px; border-radius: 999px; font-style: normal; font-size: 0.62rem; font-weight: 600; background: var(--accent); color: var(--accent-ink); }

.ap-vs { margin-top: 80px; }
.ap-vs__title { margin-bottom: 18px; font-size: 1.5rem; font-weight: 580; letter-spacing: -0.03em; }
.ap-vs .table-wrap { box-shadow: var(--shadow-sm); }
.ap-vs__table { min-width: 680px; }
.ap-vs__table thead th { text-align: left; }
.ap-vs__table thead th:first-child { width: 28%; }
.ap-vs__table tbody th { text-align: left; font-weight: 500; font-size: 0.9rem; color: var(--muted); padding: 15px 20px; border-bottom: 1px solid var(--line); }
.ap-vs__table td { text-align: left; }
.ap-vs__table td b { font-weight: 580; color: var(--ink); }
.ap-vs__table td svg { margin: 0; }
.ap-vs__table tbody tr:last-child > * { border-bottom: 0; }
.ap-vs__note { margin-top: 14px; font-size: 0.84rem; color: var(--faint); }

/* ---------- Request an app ---------- */
.ap-request__card { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; padding: 44px; overflow: hidden; isolation: isolate; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.ap-request__card::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask: radial-gradient(60% 90% at 100% 50%, #000 10%, transparent 70%); mask: radial-gradient(60% 90% at 100% 50%, #000 10%, transparent 70%); opacity: 0.7; }
.ap-request__text .ap-h2 { margin-top: 14px; }
.ap-request__text p { margin-bottom: 4px; color: var(--muted); }
.ap-request__code { position: relative; min-width: 0; }
.ap-request__file { position: absolute; top: -11px; left: 18px; z-index: 2; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.ap-request pre.code { margin: 0; padding-top: 24px; box-shadow: var(--shadow); }

.ap-tm { max-width: 860px; margin: 28px auto 0; text-align: center; font-size: 0.78rem; line-height: 1.55; color: var(--faint); }

/* ---------- App detail dialog ---------- */
.ap-dialog { width: min(940px, calc(100vw - 32px)); max-width: none; max-height: min(88vh, 900px); margin: auto; padding: 0; overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); box-shadow: var(--shadow-lg); }
.ap-dialog[open] { display: flex; flex-direction: column; animation: ap-dlg-in 0.4s var(--ease); }
.ap-dialog:focus, .ap-dialog:focus-visible { outline: none; }
.ap-dialog::backdrop { background: rgba(6, 8, 16, 0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: ap-fade 0.3s ease; }
.ap-dialog__inner { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ap-dlg__head { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); background: var(--bg); }
.ap-dlg__title { flex: 1; min-width: 0; }
.ap-dlg__cat { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ap-dlg__title h2 { margin: 2px 0 2px; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.04em; font-weight: 560; }
.ap-dlg__title p { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.ap-dlg__close { width: 40px; height: 40px; flex: none; align-self: flex-start; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); transition: background 0.2s, color 0.2s, transform 0.3s var(--ease); }
.ap-dlg__close:hover { background: var(--inv-bg); color: var(--inv-ink); transform: rotate(90deg); }
.ap-dlg__close svg { width: 16px; height: 16px; }
.ap-dlg__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ap-dlg__main { padding: 24px; min-width: 0; }
.ap-dlg__summary { font-size: 1.02rem; color: var(--ink-2); }
.ap-dlg__main .callout { margin: 16px 0 0; font-size: 0.9rem; }
.ap-dlg__main h3 { margin: 26px 0 12px; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ap-dlg__table { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.ap-dlg__table table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ap-dlg__table th, .ap-dlg__table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.ap-dlg__table thead th { background: var(--bg); font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ap-dlg__table tbody tr:last-child td { border-bottom: 0; }
.ap-dlg__table td:first-child { font-weight: 560; color: var(--ink); }
.ap-dlg__table td:nth-child(2) { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }
.ap-dlg__table td:nth-child(3) { font-size: 0.82rem; color: var(--muted); }
.ap-dlg__steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ap-dlg__steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.ap-dlg__steps li > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 0.78rem; color: var(--ink); }
.ap-dlg__steps p { padding-top: 4px; font-size: 0.94rem; color: var(--ink-2); overflow-wrap: anywhere; }
.ap-dlg__steps code { font-size: 0.82em; }
.ap-dlg__side { display: grid; align-content: start; gap: 14px; padding: 24px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, var(--card)); }
.ap-dlg__specs { display: grid; margin: 0; border-radius: 14px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.ap-dlg__specs div { display: grid; gap: 1px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ap-dlg__specs div:last-child { border-bottom: 0; }
.ap-dlg__specs dt { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ap-dlg__specs dd { margin: 0; font-size: 0.88rem; color: var(--ink); overflow-wrap: anywhere; }
.ap-dlg__plan { padding: 16px; border-radius: 16px; background: var(--inv-bg); color: var(--inv-muted); }
.ap-dlg__plan small { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ap-dlg__plan strong { display: block; margin-top: 2px; font-size: 1.25rem; font-weight: 580; letter-spacing: -0.03em; color: var(--inv-ink); }
.ap-dlg__plan > span { display: block; font-size: 0.8rem; }
.ap-dlg__plan > span.ap-dlg__gst { margin-top: 2px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em; opacity: 0.8; }
.ap-dlg__price { margin: 12px 0 2px; color: var(--inv-muted); font-size: 0.86rem; }
.ap-dlg__price b { font-size: 1.9rem; font-weight: 540; letter-spacing: -0.05em; color: var(--inv-ink); }
.ap-dlg__plan .btn { margin-top: 14px; background: var(--accent); color: var(--accent-ink); }
.ap-dlg__plan .btn:hover { background: var(--accent-2); }
.ap-dlg__plan a.ap-dlg__compare { display: block; margin-top: 10px; text-align: center; font-size: 0.82rem; color: var(--inv-ink); opacity: 0.8; }
.ap-dlg__plan a.ap-dlg__compare:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.ap-dlg__aside-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 0.84rem; color: var(--ink-2); transition: border-color 0.2s; }
a.ap-dlg__aside-card:hover { border-color: var(--accent); }
.ap-dlg__aside-card svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--accent); }
.ap-dlg__aside-card b { display: block; color: var(--ink); font-weight: 580; }
.ap-dlg__aside-card--host svg { color: var(--green); }
.ap-dlg__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg); }
.ap-dlg__foot button { display: inline-flex; align-items: center; gap: 8px; max-width: 42%; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 0.86rem; font-weight: 520; color: var(--ink-2); transition: background 0.2s, color 0.2s; }
.ap-dlg__foot button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-dlg__foot button:hover { background: var(--card); color: var(--ink); }
.ap-dlg__foot button svg { width: 15px; height: 15px; flex: none; }
.ap-dlg__foot button[data-ap-step="-1"] svg { transform: rotate(180deg); }
.ap-dlg__foot button:disabled { visibility: hidden; }
.ap-dlg__pos { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.ap-dlg__loading { padding: 80px 24px; text-align: center; color: var(--muted); }

/* ---------- motion ---------- */
@keyframes ap-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ap-dlg-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@keyframes ap-fade { from { opacity: 0; } }
@keyframes ap-progress { to { transform: scaleX(1); } }
@keyframes ap-line { to { opacity: 1; transform: none; } }
@keyframes ap-dash { to { stroke-dashoffset: -24; } }
@keyframes ap-blink { 50% { opacity: 0; } }
@keyframes ap-shine { 0% { filter: brightness(1); } 40% { filter: brightness(1.18); } 100% { filter: brightness(1); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .ap-dlg__body { grid-template-columns: minmax(0, 1fr) 270px; }
}
@media (max-width: 980px) {
  .ap-feat-grid { grid-template-columns: 1fr; }
  .ap-group { grid-template-columns: 1fr; gap: 16px; }
  .ap-group__head { position: static; padding-top: 0; }
  .ap-group__head p { max-width: 560px; }
  .ap-group__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-every__list { grid-template-columns: repeat(2, 1fr); }
  .ap-every__list li:nth-child(3n) { border-right: 1px solid var(--line); }
  .ap-every__list li:nth-child(2n) { border-right: 0; }
  .ap-every__list li:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .ap-every__list li:nth-last-child(-n+2) { border-bottom: 0; }
  .ap-soft__band, .ap-request__card { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 820px) {
  .ap-hero .page-hero__grid { gap: 44px; }
  .ap-dlg__body { grid-template-columns: 1fr; }
  .ap-dlg__side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .ap-search--hero { padding-left: 14px; }
  .ap-search--hero .btn { width: 40px; padding: 0; }
  .ap-search--hero .btn { font-size: 0; gap: 0; }
  .ap-search--hero .btn svg { width: 17px; height: 17px; }
  .ap-search input { font-size: 16px; }
  .ap-hero__facts { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .ap-hero__facts li { padding: 10px 14px; }
  .ap-hero__facts li:nth-child(2n) { border-right: 0; }
  .ap-hero__facts li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .ap-deploy__opts { grid-template-columns: 1fr 1fr; }
  .ap-deploy__price { grid-column: 1 / -1; }
  .ap-deploy__apps span { min-height: 62px; font-size: 0.66rem; }
  .ap-feat { padding: 18px; }
  .ap-vis { height: 184px; margin: -6px -6px 18px; }
  .ap-node { grid-template-columns: 1fr; justify-items: center; padding: 8px 6px; }
  .ap-node svg { display: none; }
  .ap-node b { font-size: 0.72rem; }
  .ap-node small { font-size: 0.56rem; max-width: 100%; }
  
  .ap-vis--term pre { font-size: 0.68rem; padding: 10px 12px; }
  .ap-vis--pm2 table { font-size: 0.66rem; }
  .ap-vis--pm2 th, .ap-vis--pm2 td { padding: 6px 5px; }
  .ap-feat__foot { align-items: stretch; flex-direction: column; }
  .ap-feat__btns .btn { flex: 1; }
  .ap-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); }
  .ap-chips::-webkit-scrollbar { display: none; }
  .ap-chip { flex: none; }
  .ap-cat-tools { width: 100%; }
  .ap-seg { width: 100%; }
  .ap-seg button { flex: 1; justify-content: center; padding: 0 8px; font-size: 0.82rem; }
  .ap-search--inline { flex-basis: 100%; max-width: none; }
  .ap-toolbar { padding-bottom: 14px; }
  .ap-group { padding: 22px 0; }
  .ap-group__list { grid-template-columns: 1fr; gap: 8px; }
  .ap-card { grid-template-columns: 42px minmax(0, 1fr) 14px; gap: 12px; padding: 14px; }
  .ap-card .ap-logo { width: 42px; height: 42px; border-radius: 11px; }
  .ap-card .ap-mark { width: 25px; height: 25px; }
  .ap-motd .terminal__body { font-size: 0.7rem; padding: 14px; }
  .ap-every { margin-top: 56px; }
  .ap-every__list { grid-template-columns: 1fr; }
  .ap-every__list li { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 18px; }
  .ap-every__list li:last-child { border-bottom: 0 !important; }
  .ap-softmock__body { grid-template-columns: 1fr; min-height: 0; }
  .ap-softmock__side { display: none; }
  .ap-vs { margin-top: 56px; }
  .ap-vs__table { min-width: 0; font-size: 0.8rem; }
  .ap-vs__table th, .ap-vs__table td, .ap-vs__table tbody th { padding: 11px 10px; }
  .ap-vs__table thead th { font-size: 0.82rem; }
  .ap-request__card { padding: 24px 18px; border-radius: 22px; }
  .ap-dialog { width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .ap-dialog[open] { animation: ap-sheet-in 0.4s var(--ease); }
  .ap-dlg__head { padding: 18px 16px; gap: 12px; }
  .ap-dlg__head .ap-logo--lg { width: 46px; height: 46px; }
  .ap-dlg__main, .ap-dlg__side { padding: 18px 16px; }
  .ap-dlg__table th, .ap-dlg__table td { padding: 9px 10px; }
  .ap-dlg__table td:nth-child(2) { white-space: normal; }
  .ap-dlg__foot { padding: 10px 12px; }
}
@keyframes ap-sheet-in { from { transform: translateY(40px); opacity: 0.4; } }

/* QA pass: no orphaned last word in section headings */
.ap-head h2, .ap-h2 { text-wrap: balance; }
/* QA pass: the hero mock sits in a narrow column between 821 and 1100px */
@media (min-width: 821px) and (max-width: 1100px) {
  .ap-deploy__opts { grid-template-columns: 1fr 1fr; }
  .ap-deploy__price { grid-column: 1 / -1; }
  .ap-deploy .hero-browser__url { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ap-deploy__log { font-size: 0.66rem; }
}

/* QA round 2 */
/* dark inverse panels stay dark (same remap as the global .inv-panel) */
.ap-dlg__plan, .ap-deploy__opts > .ap-deploy__price { --inv-bg: var(--panel-inv); --inv-ink: var(--panel-inv-ink); --inv-muted: var(--panel-inv-muted); }
[data-theme="dark"] .ap-dlg__plan { box-shadow: 0 0 0 1px var(--panel-inv-line), 0 24px 50px -28px rgba(80, 100, 255, 0.35); }
@media (min-width: 981px) and (max-width: 1100px) {
  .ap-group { grid-template-columns: 200px minmax(0, 1fr); gap: 20px 28px; }
  .ap-group__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  /* phones: the decorative deploy mock goes, so the catalogue starts sooner */
  .ap-hero .page-hero__grid > :last-child { display: none; }
  .ap-toolbar { display: block; }
  .ap-count { display: block; margin-top: 10px; }
  .ap-cat-tools .ap-search--inline { flex: 1 1 100%; }
  /* featured images: one swipeable row with the next card peeking in */
  .ap-feat-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; gap: 12px; margin: 0 -16px; padding: 4px 16px 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 16px; scrollbar-width: none; }
  .ap-feat-grid::-webkit-scrollbar { display: none; }
  .ap-feat { scroll-snap-align: start; }
  .ap-feat:hover { transform: none; }
}

/* ---------- layout pass (alignment) ---------- */
/* catalogue: an odd last card spans both columns instead of leaving half a row empty (counts only visible cards, so filtering keeps it right) */
.ap-group__list > .ap-card:nth-last-child(1 of :not([hidden])):nth-child(odd of :not([hidden])):not(:nth-child(1 of :not([hidden]))) { grid-column: 1 / -1; }
/* VPS vs web hosting table on phones: the row label spans the card, the two answers sit side by side under their column heads */
@media (max-width: 640px) {
  .ap-vs__table, .ap-vs__table thead, .ap-vs__table tbody { display: block; min-width: 0; }
  .ap-vs__table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-vs__table thead th:first-child { display: none; }
  .ap-vs__table thead th { padding: 14px 12px 12px; font-size: 0.86rem; line-height: 1.3; }
  .ap-vs__table tbody th { grid-column: 1 / -1; width: auto; padding: 14px 12px 2px; border-bottom: 0; font-size: 0.8rem; font-weight: 560; color: var(--ink); }
  .ap-vs__table td { display: block; padding: 6px 12px 13px; font-size: 0.82rem; line-height: 1.45; }
  .ap-vs__table td svg { margin: 0; }
  .ap-vs__table td, .ap-vs__table thead th { border-bottom: 0; }
  .ap-vs__table td:not(.is-hl) { align-self: start; }
  .ap-vs__table tr { border-bottom: 1px solid var(--line); }
  .ap-vs__table tbody tr:last-child { border-bottom: 0; }
}
/* app dialog on phones: version numbers stay on one line, the licence column wraps instead */
@media (max-width: 640px) {
  .ap-dlg__table th, .ap-dlg__table td { padding: 9px 8px; }
  .ap-dlg__table th:first-child, .ap-dlg__table td:first-child { padding-left: 12px; }
  .ap-dlg__table td:nth-child(2) { white-space: nowrap; }
  .ap-dlg__table td:nth-child(3) { overflow-wrap: anywhere; }
}

/* catalogue cards side by side: the "Min. VC-x" line sits on the card's bottom edge, so it lines up
   across a row whatever the length of each pitch */
.ap-card__body { align-self: stretch; display: flex; flex-direction: column; }
.ap-card__meta { margin-top: auto; padding-top: 9px; }
/* plan names such as VC-1 never break at their hyphen */
.ap-nw { white-space: nowrap; }
@media (max-width: 640px) {
  /* Softaculous mock: the address stays on one line like a real browser bar */
  .ap-softmock .hero-browser__url { min-width: 0; font-size: 0.68rem; white-space: nowrap; overflow: hidden; }
  /* compose.yaml fits the phone width instead of running past the card's right edge */
  .ap-request pre.code { padding-left: 16px; padding-right: 16px; font-size: 0.7rem; }
}
