/*
 * Service system (2026-10-17) – shared by the home "Services" module (#137), the /services overview and every service page.
 * Groups, in this order everywhere: Upgrade · Build (the dark group) · Care · Design.
 * - .psys-g            group pill (icon + label) on every service card / tile
 * - .psys-a-*          mini artifacts on the /services cards (small versions of each service page hero)
 * - .psys-m            "More in <group>" row at the bottom of the service pages (uses the home .tph-bt tiles)
 * Loaded by html/mod_custom/service-system.php (home) and html/com_content/article/services.php (/services + service pages).
 * Tokens: --ds-* from custom.css.
 */

/* ---------- group pill ---------- */
.psys-g { display: inline-flex; gap: 6px; align-items: center; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-green-ink); line-height: 1.2; }
.psys-g i { font-size: .8rem; }
.is-navy .psys-g, .is-dark .psys-g { color: var(--ds-green-on-navy); }

/* home + "More in" tiles: the pill sits on its own row above the icon + title */
.tph-bt > .psys-g { grid-column: 1 / -1; margin-bottom: 10px; }
.tph-bt:has(> .psys-g) { grid-template-rows: auto auto auto 1fr; align-content: start; }
/* the J3 → J6 pipe was drawn for a navy tile; on a light tile it needs dark text */
.tph-bt:not(.is-navy) .tph-bv--pipe code { color: var(--ds-navy); background: #fff; box-shadow: 0 0 0 1px rgba(5, 0, 56, .08); }
.tph-bt:not(.is-navy) .tph-bv--pipe code.on { background: var(--ds-green); color: #fff; box-shadow: none; }
.tph-bt:not(.is-navy) .tph-bv--pipe > i { background: var(--ds-line-strong); }

/* ---------- mini artifacts (/services cards) ---------- */
.psys-a { display: block; margin: -6px -6px 10px; border-radius: 14px; border: 1px solid var(--ds-line); background: #fff; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .64rem; color: var(--ds-navy); }
.is-dark .psys-a { background: #0d0a45; border-color: rgba(255, 255, 255, .08); color: #fff; }
.psys-a-h { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--ds-line); color: var(--ds-label); background: var(--ds-soft); }
.psys-a-h b { color: var(--ds-navy); }
.psys-a-h em { font-style: normal; font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; }
.is-dark .psys-a-h { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .5); }
.is-dark .psys-a-h b { color: #fff; }

/* rows: audit summary, store audit, CiviCRM review */
.psys-a-r { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--ds-line); }
.psys-a-r:last-child { border-bottom: 0; }
.psys-a-r b { font-weight: 700; }
.psys-a-r span { color: var(--ds-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psys-a-r em { font-style: normal; font-weight: 700; color: #b45309; }
.psys-a-r em.ok { color: var(--ds-green-ink); }

/* code editor: extensions, back-end */
.psys-a-ed { display: grid; grid-template-columns: 104px minmax(0, 1fr); line-height: 1.75; font-size: .6rem; }
.psys-a-tree { padding: 8px 10px; border-right: 1px solid rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .55); white-space: nowrap; overflow: hidden; }
.psys-a-tree b { color: #fff; font-weight: 600; background: rgba(126, 227, 154, .12); border-radius: 3px; padding: 0 3px; }
.psys-a-code { padding: 8px 12px; color: rgba(255, 255, 255, .72); white-space: pre; overflow: hidden; }
.psys-a-code i { font-style: normal; color: var(--ds-green-on-navy); }
.psys-a-code u { text-decoration: none; color: rgba(255, 255, 255, .35); }

/* content model: CMS */
.psys-a-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px; }
.psys-a-fields span { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); color: #fff; }
.psys-a-fields span small { color: rgba(255, 255, 255, .45); font-size: .56rem; }
.psys-a-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px 10px; }
.psys-a-chips span { padding: 3px 7px; border-radius: 999px; background: rgba(126, 227, 154, .14); color: var(--ds-green-on-navy); font-size: .56rem; }

/* monthly report: maintenance */
.psys-a-kpi { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--ds-line); }
.psys-a-kpi span { padding: 8px 12px; border-right: 1px solid var(--ds-line); color: var(--ds-label); font-size: .56rem; }
.psys-a-kpi span:last-child { border-right: 0; }
.psys-a-kpi b { display: block; font-family: Inter, sans-serif; font-size: .95rem; font-weight: 800; color: var(--ds-navy); }
.psys-a-up { display: flex; gap: 2px; padding: 10px 12px; }
.psys-a-up i { flex: 1; height: 16px; border-radius: 2px; background: var(--ds-green); opacity: .85; }
.psys-a-up i.w { background: #f59e0b; }

/* speed report: SEO */
.psys-a-sp { display: grid; grid-template-columns: repeat(3, 1fr); }
.psys-a-sp span { padding: 9px 12px; border-right: 1px solid var(--ds-line); color: var(--ds-label); font-size: .56rem; }
.psys-a-sp span:last-child { border-right: 0; }
.psys-a-sp b { display: block; font-family: Inter, sans-serif; font-size: .95rem; font-weight: 800; color: var(--ds-green-ink); }
.psys-a-sp s { color: var(--ds-label); }

/* brand switch: template customization */
.psys-a-brand { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; padding: 10px 12px; align-items: center; }
.psys-a-page { border-radius: 8px; border: 1px solid var(--ds-line); overflow: hidden; background: #fff; }
.psys-a-page i { display: block; height: 6px; background: #3b0d16; }
.psys-a-page b { display: block; margin: 8px 8px 4px; height: 26px; border-radius: 4px; background: linear-gradient(135deg, #8b1d2c, #c9a227); }
.psys-a-page u { display: block; margin: 0 8px 8px; height: 5px; width: 60%; border-radius: 3px; background: var(--ds-line); text-decoration: none; }
.psys-a-sw { display: grid; gap: 5px; }
.psys-a-sw span { display: flex; gap: 5px; align-items: center; color: var(--ds-label); font-size: .56rem; white-space: nowrap; }
.psys-a-sw span i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.psys-a-sw span.on { color: var(--ds-navy); font-weight: 700; }

/* budget: front-end */
.psys-a-flow { display: flex; gap: 6px; align-items: center; padding: 10px 12px 6px; }
.psys-a-flow span { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--ds-line-strong); }
.psys-a-flow span.on { background: var(--ds-navy); border-color: var(--ds-navy); color: #fff; }
.psys-a-flow i { color: var(--ds-label); font-size: .55rem; }
/* workflow: CMS (dark Build card) */
.is-dark .psys-a-flow span { border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .75); }
.is-dark .psys-a-flow span.on { background: var(--ds-green); border-color: var(--ds-green); color: #fff; }
.is-dark .psys-a-flow i { color: rgba(255, 255, 255, .4); }
.psys-a-cwv { display: flex; gap: 6px; padding: 4px 12px 10px; flex-wrap: wrap; }
.psys-a-cwv span { padding: 3px 7px; border-radius: 999px; background: var(--ds-green-soft); color: var(--ds-green-ink); font-weight: 700; font-size: .56rem; }

/* ---------- "More in <group>" (service pages) ---------- */
.psys-m { padding: 72px 0; background: var(--ds-soft); }
.psys-m-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.psys-m-head h2 { margin: 8px 0 0; font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--ds-navy); }
.psys-m-all { color: var(--ds-green-ink); font-weight: 600; }
.psys-m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.psys-m-grid .tph-bt { min-height: 180px; background: #fff; box-shadow: 0 0 0 1px var(--ds-line); }
.psys-m-grid .tph-bt.is-navy { background: var(--ds-navy); box-shadow: none; }
@media (max-width: 640px) { .psys-m { padding: 48px 0; } }

/* ---------- "Your upgrade path" under the hero of the Upgrade pages (2026-10-17) ----------
 * Joomla 6 migration · VirtueMart upgrade · CiviCRM upgrade – replaces .s2-vroute / .s2-facts there.
 * Steps: .off no support (struck through, red chip) · .mid for now (amber) · .go supported (green) · .end where you end up.
 * Care pages (Maintenance, SEO & speed) use the same strip as "Every month" / "Your first month": .wk week chips + .psys-up-ft bottom line.
 * Content: _deploy/merge-dev-2026-10/upgrade_route.php and care_strip.php. Tokens: --s2-* from custom.css (.tp-svc2).
 */
.tp-svc2 .psys-up { margin-top: 64px; border: 1px solid var(--s2-line); border-radius: var(--s2-r); background: #fff; overflow: hidden; }
.tp-svc2 .psys-up-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 22px; border-bottom: 1px solid var(--s2-line); background: var(--s2-soft); font: 600 11px var(--s2-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--s2-muted); }
.tp-svc2 .psys-up-h em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; }
.tp-svc2 .psys-up ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.tp-svc2 .psys-up li { position: relative; margin: 0; padding: 18px 22px 20px; border-left: 1px solid var(--s2-line); }
.tp-svc2 .psys-up li:first-child { border-left: 0; }
.tp-svc2 .psys-up li + li::before { content: ""; position: absolute; left: -7px; top: 26px; width: 12px; height: 12px; background: #fff; border-top: 1px solid var(--s2-line); border-right: 1px solid var(--s2-line); transform: rotate(45deg); }
.tp-svc2 .psys-up b { display: block; font: 600 14px var(--s2-mono); color: var(--s2-ink); }
.tp-svc2 .psys-up span { display: block; margin-top: 2px; font-size: 13px; color: var(--s2-muted); }
.tp-svc2 .psys-up i { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 2px 9px; border-radius: 999px; font: normal 600 11.5px var(--s2-mono); }
.tp-svc2 .psys-up i::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tp-svc2 .psys-up .off b { color: var(--s2-muted); text-decoration: line-through; text-decoration-color: rgba(91, 100, 116, .45); }
.tp-svc2 .psys-up .off i { color: var(--s2-red); background: rgba(201, 60, 60, .08); }
.tp-svc2 .psys-up .mid i { color: var(--s2-amber); background: rgba(184, 110, 0, .09); }
.tp-svc2 .psys-up .go i { color: var(--s2-green-ink); background: rgba(52, 199, 89, .12); }
.tp-svc2 .psys-up .end { background: rgba(52, 199, 89, .07); box-shadow: inset 0 3px 0 var(--s2-green); }
.tp-svc2 .psys-up .end::before { background: #f3fbf5; }
.tp-svc2 .psys-up .end i { color: #fff; background: var(--s2-green-ink); }
.tp-svc2 .psys-up .end i::before { background: #fff; }
.tp-svc2 .psys-up .wk i { color: var(--s2-muted); background: var(--s2-soft); box-shadow: inset 0 0 0 1px var(--s2-line); }
.tp-svc2 .psys-up .wk i::before { background: var(--s2-faint); }
.tp-svc2 .psys-up-ft { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 11px 22px; border-top: 1px solid var(--s2-line); background: var(--s2-soft); font-size: 13px; color: var(--s2-muted); }
.tp-svc2 .psys-up-ft span { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.tp-svc2 .psys-up-ft span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--s2-green); }
.tp-svc2 .psys-up-ft b { display: inline; font: 600 13px Inter, sans-serif; color: var(--s2-ink); }
@media (max-width: 991.98px) {
	.tp-svc2 .psys-up ol { grid-template-columns: 1fr 1fr; }
	.tp-svc2 .psys-up li:nth-child(3) { border-left: 0; }
	.tp-svc2 .psys-up li:nth-child(n+3) { border-top: 1px solid var(--s2-line); }
	.tp-svc2 .psys-up li:nth-child(3)::before { display: none; }
}
@media (max-width: 575.98px) {
	.tp-svc2 .psys-up { margin-top: 48px; }
	.tp-svc2 .psys-up-h { padding: 10px 18px; }
	.tp-svc2 .psys-up-h em { display: none; }
	.tp-svc2 .psys-up-ft { padding: 11px 18px; flex-direction: column; }
	.tp-svc2 .psys-up ol { grid-template-columns: 1fr; }
	.tp-svc2 .psys-up li { border-left: 0; border-top: 1px solid var(--s2-line); padding: 14px 18px; }
	.tp-svc2 .psys-up li:first-child { border-top: 0; }
	.tp-svc2 .psys-up li + li::before, .tp-svc2 .psys-up li:nth-child(3)::before { display: block; left: 24px; top: -7px; transform: rotate(135deg); }
}
