/* ==========================================================================
   PayHouse Back Office page — layered on /home/home.css
   ========================================================================== */

/* shared section heading: title left, lede right */
.bo-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px clamp(32px, 6vw, 80px); align-items: end; }
.bo-head h2 { margin-top: 16px; font-size: clamp(32px, 4vw, 54px); text-wrap: balance; }
.bo-head .serif { display: block; color: var(--accent-strong); }
.bo-head-dark .eyebrow { color: var(--accent); }
.bo-head-dark .serif { color: var(--accent); }
.bo-head-dark .lede { color: var(--muted-on-dark); }

/* segmented control (module filter, dashboard style) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: clamp(32px, 4vw, 48px); padding: 4px; border-radius: 999px; background: var(--paper-2); }
.seg button { border: 0; border-radius: 999px; padding: 10px 18px; font-size: 14.5px; font-weight: 600; background: none; color: var(--muted); transition: background .25s ease, color .25s ease; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--ink); color: #fff; }
.seg-center { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }

/* ---------- Hero: a live dashboard inside the house ---------- */
.bo-hero h1 { font-size: clamp(38px, 4.4vw, 62px); }
@media (min-width: 1001px) { .bo-hero .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.bw-room { position: absolute; left: 14%; right: 14%; top: 40%; bottom: 9%; }
/* fixed-size card, centred in the room and scaled to fit by bo.js */
.bw { position: absolute; left: 50%; top: 50%; margin: -145px 0 0 -220px; width: 440px; height: 290px; transform-origin: 50% 50%; scale: var(--s, 1); display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(43, 164, 132, .2), rgba(23, 36, 31, .96) 46%); border: 1px solid rgba(127, 240, 200, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 30px 60px -24px rgba(43, 164, 132, .55);
  opacity: 0; translate: 0 14px; animation: bwIn .9s cubic-bezier(.2, .8, .2, 1) 1.5s forwards; }
@keyframes bwIn { to { opacity: 1; translate: 0 0; } }
.bw-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-glow); }
.bw-top i { display: inline-flex; align-items: center; gap: 6px; font-style: normal; color: var(--muted-on-dark); }
.bw-top i::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ping 1.8s infinite; }
.bw-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bw-kpis > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.bw-kpis small { font-size: 11px; color: var(--muted-on-dark); }
.bw-kpis b { font-family: var(--font-display); font-stretch: 112%; font-size: 26px; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; }
.bw-kpis em { font-style: normal; font-size: 11px; color: var(--accent-glow); }
.bw-prog { display: block; height: 6px; margin: 3px 0 1px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bw-prog i { display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent-glow)); transform-origin: left; animation: growX 1.2s cubic-bezier(.2, .8, .2, 1) 2.1s both; }
.bw-chart { flex: 1; display: flex; align-items: flex-end; gap: 6px; padding: 4px 2px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.bw-chart i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, rgba(127, 240, 200, .9), rgba(43, 164, 132, .35)); transform-origin: bottom; animation: growY .9s cubic-bezier(.2, .8, .2, 1) both; }
.bw-chart i:nth-child(n) { animation-delay: calc(1.9s + var(--i, 0) * 50ms); }
@keyframes growY { from { transform: scaleY(0); } }
.bw-feed { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bw-feed p { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted-on-dark); }
.bw-feed i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.bw-feed b { margin-left: auto; color: #fff; font-weight: 600; }

/* ---------- 01 Modules ---------- */
.bo-mods { background: var(--paper); }
.mod-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.mod { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); transition: opacity .35s ease, transform .35s ease, border-color .3s ease, box-shadow .3s ease; }
.mod:hover { border-color: rgba(43, 164, 132, .5); box-shadow: 0 22px 40px -30px rgba(18, 29, 25, .5); transform: translateY(-2px); }
.mod small { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent-strong); }
.mod h3 { font-size: 20px; }
.mod p { margin: 0; font-size: 15px; color: var(--muted); }
.mod.dim { opacity: .28; transform: scale(.98); }
.mod.dim:hover { transform: scale(.98); box-shadow: none; border-color: var(--line); }
.mod-nf { background: var(--ink); border-color: var(--ink); color: var(--text-on-dark); }
.mod-nf p { color: var(--muted-on-dark); }
.mod-nf small { color: var(--accent-glow); }
.mod-by { margin-top: auto; padding-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--accent-glow); }
.mod-by:hover { text-decoration: underline; }

/* ---------- 02 Legacy vs PayHouse ---------- */
.bo-why { background: var(--ink); color: var(--text-on-dark); overflow: hidden; }
.bo-why::before { content: ""; position: absolute; right: -10%; top: 20%; width: 60%; height: 70%; background: radial-gradient(closest-side, rgba(43, 164, 132, .2), transparent); pointer-events: none; }
.vs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
.vs-col { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); }
.vs-col h3 { font-size: clamp(22px, 2vw, 28px); }
.vs-col > p { margin: 6px 0 22px; font-size: 15px; }
.vs-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vs-col li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.4; }
.vs-col li svg { flex: none; width: 22px; height: 22px; padding: 4px; margin-top: -1px; border-radius: 50%; }
.vs-old { background: rgba(255, 255, 255, .03); border: 1px solid var(--line-dark); color: var(--muted-on-dark); }
.vs-old h3 { color: var(--text-on-dark); }
.vs-old li svg { color: #e58a7a; background: rgba(229, 138, 122, .12); }
.vs-new { background: linear-gradient(160deg, rgba(43, 164, 132, .32), rgba(43, 164, 132, .08) 60%); border: 1px solid rgba(127, 240, 200, .45); box-shadow: 0 30px 70px -40px rgba(43, 164, 132, .8); }
.vs-new > p { color: var(--accent-glow); }
.vs-new li svg { color: var(--ink); background: var(--accent); }

/* ---------- 03 Genealogy ---------- */
.bo-plan { background: var(--paper); }
.plan-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.plan-copy h2 { margin: 16px 0 18px; font-size: clamp(32px, 4vw, 54px); text-wrap: balance; }
.plan-copy .serif { display: block; color: var(--accent-strong); }
.plan-pick { display: grid; gap: 6px; margin-top: 30px; }
.plan-pick button { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 16px; font-weight: 600; color: var(--muted); text-align: left; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.plan-pick button small { font-size: 11.5px; letter-spacing: .08em; color: var(--muted); opacity: .7; }
.plan-pick button:hover { border-color: rgba(43, 164, 132, .5); color: var(--text); }
.plan-pick button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.plan-pick button[aria-selected="true"] small { color: var(--accent-glow); opacity: 1; }

.tree-card { position: relative; padding: 22px; border-radius: 24px; background: var(--ink); color: var(--text-on-dark); box-shadow: 0 40px 80px -40px rgba(18, 29, 25, .7); overflow: hidden; }
.tree-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 28px 28px; pointer-events: none; }
.tree-top { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 14px; color: var(--muted-on-dark); }
.tree-top code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 4px 10px; border-radius: 999px; color: var(--accent-glow); background: rgba(43, 164, 132, .14); border: 1px solid rgba(43, 164, 132, .35); }
.tree { position: relative; display: block; width: 100%; height: auto; margin: 14px 0 6px; overflow: visible; }
.tree .edge { stroke: rgba(255, 255, 255, .22); stroke-width: 1.6; fill: none; }
.tree .edge.up { stroke: var(--accent-glow); stroke-dasharray: 4 4; }
.tree .n { transform-box: fill-box; transform-origin: center; animation: pop .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--d) * 110ms); }
.tree .n-a { fill: var(--accent); }
.tree .n-q { fill: var(--ink); stroke: var(--accent-glow); stroke-width: 2.5; }
.tree .n-i { fill: var(--ink); stroke: rgba(255, 255, 255, .3); stroke-width: 2; stroke-dasharray: 3 3; }
.tree .n-root { fill: #fff; }
.tree .edge { animation: fadeIn .5s ease both; opacity: 0; animation-delay: calc(var(--d) * 110ms); }
@keyframes pop { from { transform: scale(0); } }
.tree-legend { position: relative; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted-on-dark); }
.tree-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tree-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.tree-legend .lg-a::before { background: var(--accent); }
.tree-legend .lg-q::before { border: 2px solid var(--accent-glow); width: 6px; height: 6px; }
.tree-legend .lg-i::before { border: 2px dashed rgba(255, 255, 255, .4); width: 6px; height: 6px; }
.tree-legend .lg-up::before { width: 16px; height: 0; border-radius: 0; border-top: 2px dashed var(--accent-glow); }
.tree-note { position: relative; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line-dark); font-size: 14px; color: var(--muted-on-dark); }

/* ---------- 04 Dashboard styles ---------- */
.bo-styles { background: #fff; }
.bo-styles .seg { background: var(--paper); }
.dash-stage { display: grid; place-items: center; margin-top: 28px; padding: clamp(16px, 3vw, 40px); border-radius: 28px; background: radial-gradient(600px 300px at 50% 0%, rgba(43, 164, 132, .14), transparent 70%), var(--paper); min-height: 520px; }

.dash { --d-bg: #fff; --d-side: var(--paper); --d-card: #fff; --d-line: var(--line); --d-text: var(--text); --d-muted: var(--muted); --d-acc: var(--accent); --d-acc-2: var(--accent-strong); --d-r: 14px;
  position: relative; width: 100%; max-width: 980px; display: grid; grid-template-columns: 190px minmax(0, 1fr); overflow: hidden;
  border-radius: 20px; background: var(--d-bg); color: var(--d-text); border: 1px solid var(--d-line); box-shadow: 0 40px 80px -46px rgba(18, 29, 25, .55);
  font-size: 14px; transition: max-width .5s cubic-bezier(.2, .8, .2, 1), border-radius .4s ease, background .4s ease, color .4s ease; }
.d-side { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px; background: var(--d-side); border-right: 1px solid var(--d-line); }
.d-brand { display: flex; align-items: center; gap: 9px; margin: 0 6px 16px; font-family: var(--font-display); font-stretch: 112%; font-size: 15px; }
.d-brand i { width: 22px; height: 22px; border-radius: 7px; background: var(--d-acc); }
.d-side a { padding: 9px 10px; border-radius: 10px; color: var(--d-muted); font-weight: 500; }
.d-side a.on { background: var(--d-card); color: var(--d-text); box-shadow: 0 1px 0 var(--d-line); }
.d-main { display: flex; flex-direction: column; gap: 14px; padding: 20px; min-width: 0; }
.d-top { display: flex; justify-content: space-between; align-items: center; }
.d-top small { color: var(--d-muted); font-size: 12.5px; }
.d-top h4 { margin: 0; font-family: var(--font-display); font-stretch: 112%; font-size: 22px; letter-spacing: -0.01em; }
.d-rank { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--d-acc-2); background: rgba(43, 164, 132, .12); }
.d-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.d-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); }
.d-kpi small { font-size: 12px; color: var(--d-muted); }
.d-kpi b { font-family: var(--font-display); font-stretch: 112%; font-size: 22px; line-height: 1.1; }
.d-kpi em { font-style: normal; font-size: 12px; color: var(--d-muted); }
.d-kpi em.up { color: var(--d-acc-2); font-weight: 600; }
.d-prog { display: block; height: 6px; margin-top: 4px; border-radius: 999px; background: var(--d-line); overflow: hidden; }
.d-prog i { display: block; width: 72%; height: 100%; border-radius: inherit; background: var(--d-acc); }
.d-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.d-chart, .d-feed { padding: 14px; border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); }
.d-chart small { font-size: 12px; color: var(--d-muted); }
.d-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; margin-top: 10px; }
.d-bars i { flex: 1; height: var(--h); border-radius: 5px 5px 0 0; background: var(--d-acc); opacity: .85; transition: height .5s cubic-bezier(.2, .8, .2, 1), background .4s ease; }
.d-bars i:last-child { opacity: 1; }
.d-feed { list-style: none; margin: 0; display: grid; align-content: start; gap: 0; }
.d-feed li { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--d-line); font-size: 13px; }
.d-feed li:last-child { border-bottom: 0; }
.d-feed i { width: 8px; height: 8px; border-radius: 50%; background: var(--d-acc); }
.d-feed span { color: var(--d-muted); }
.d-feed b { font-weight: 600; white-space: nowrap; }
.d-tabbar { display: none; }
.dash.swap .d-main, .dash.swap .d-side { animation: skinIn .45s ease both; }
@keyframes skinIn { from { opacity: 0; translate: 0 8px; } }

/* Dark high-end */
.dash[data-skin="dark"] { --d-bg: #0e1714; --d-side: #0b1310; --d-card: rgba(255, 255, 255, .04); --d-line: rgba(255, 255, 255, .09); --d-text: #f3f7f5; --d-muted: rgba(238, 244, 241, .55); --d-acc: var(--accent-glow); --d-acc-2: var(--accent-glow); --d-r: 16px;
  box-shadow: 0 50px 90px -40px rgba(18, 29, 25, .9), 0 0 0 1px rgba(127, 240, 200, .12); }
.dash[data-skin="dark"] .d-top h4 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 30px; }
.dash[data-skin="dark"] .d-kpi b { color: #fff; }
.dash[data-skin="dark"] .d-kpi:first-child { background: linear-gradient(160deg, rgba(127, 240, 200, .18), rgba(255, 255, 255, .03)); border-color: rgba(127, 240, 200, .35); }
.dash[data-skin="dark"] .d-bars i { background: linear-gradient(180deg, var(--accent-glow), rgba(43, 164, 132, .2)); }
.dash[data-skin="dark"] .d-rank { background: rgba(127, 240, 200, .12); }
.dash[data-skin="dark"] .d-side a.on { background: rgba(127, 240, 200, .1); color: var(--accent-glow); box-shadow: none; }

/* Mobile first: the same dashboard in a phone */
.dash[data-skin="mobile"] { max-width: 330px; grid-template-columns: 1fr; border-radius: 40px; border: 9px solid var(--ink); --d-bg: var(--paper); --d-r: 16px; }
.dash[data-skin="mobile"] .d-side { display: none; }
.dash[data-skin="mobile"] .d-main { padding: 22px 14px 12px; gap: 10px; }
.dash[data-skin="mobile"] .d-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
.dash[data-skin="mobile"] .d-kpi:first-child { grid-column: 1 / -1; background: var(--ink); color: #fff; border-color: var(--ink); }
.dash[data-skin="mobile"] .d-kpi:first-child small { color: var(--muted-on-dark); }
.dash[data-skin="mobile"] .d-kpi:first-child b { font-size: 30px; }
.dash[data-skin="mobile"] .d-kpi:first-child em.up { color: var(--accent-glow); }
.dash[data-skin="mobile"] .d-kpi:nth-child(3) { display: none; }
.dash[data-skin="mobile"] .d-kpi b { font-size: 19px; }
.dash[data-skin="mobile"] .d-row { grid-template-columns: 1fr; }
.dash[data-skin="mobile"] .d-bars { height: 70px; }
.dash[data-skin="mobile"] .d-feed li:nth-child(n+3) { display: none; }
.dash[data-skin="mobile"] .d-feed li:nth-child(2) { border-bottom: 0; }
.dash[data-skin="mobile"] .d-tabbar { display: flex; justify-content: space-around; padding: 10px 8px 14px; background: #fff; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); }
.dash[data-skin="mobile"] .d-tabbar span { padding: 6px 10px; border-radius: 999px; }
.dash[data-skin="mobile"] .d-tabbar .on { background: var(--ink); color: #fff; }

/* Familiar: the classic admin layout your legacy users already know, cleaned up */
.dash[data-skin="classic"] { --d-bg: #eef1f4; --d-side: #253446; --d-card: #fff; --d-line: #cfd6de; --d-text: #1d2733; --d-muted: #5d6b7a; --d-acc: #2f6db3; --d-acc-2: #2f6db3; --d-r: 3px;
  border-radius: 6px; font-family: Tahoma, Verdana, system-ui, sans-serif; font-size: 13px; }
.dash[data-skin="classic"] .d-side { border-right: 0; padding: 0; gap: 0; }
.dash[data-skin="classic"] .d-brand { margin: 0; padding: 14px 14px; color: #fff; font-family: inherit; font-size: 14px; background: #1b2735; }
.dash[data-skin="classic"] .d-brand i { border-radius: 3px; background: #4d8fd6; }
.dash[data-skin="classic"] .d-side a { border-radius: 0; padding: 10px 14px; color: #c3cfdc; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.dash[data-skin="classic"] .d-side a.on { background: #2f6db3; color: #fff; box-shadow: none; }
.dash[data-skin="classic"] .d-top { padding-bottom: 10px; border-bottom: 2px solid #2f6db3; }
.dash[data-skin="classic"] .d-top h4 { font-family: inherit; font-size: 18px; font-weight: 700; }
.dash[data-skin="classic"] .d-rank { border-radius: 3px; background: #dde8f5; }
.dash[data-skin="classic"] .d-kpi b { font-family: inherit; font-size: 20px; }
.dash[data-skin="classic"] .d-kpi small { text-transform: uppercase; font-size: 10.5px; letter-spacing: .04em; }
.dash[data-skin="classic"] .d-bars i { border-radius: 0; opacity: 1; }
.dash[data-skin="classic"] .d-feed li:nth-child(odd) { background: #f5f7fa; }
.dash[data-skin="classic"] .d-feed li { padding: 8px 6px; }

.same { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.same span { padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); background: rgba(43, 164, 132, .1); border: 1px solid rgba(43, 164, 132, .3); }

/* ---------- 05 Under the hood ---------- */
.bo-hood { background: var(--ink); color: var(--text-on-dark); }
.hood-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
.hood { display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 3vw, 34px); border-radius: var(--radius); background: rgba(255, 255, 255, .03); border: 1px solid var(--line-dark); }
.hood small { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-glow); }
.hood h3 { font-size: clamp(22px, 2vw, 28px); }
.hood p { margin: 0; color: var(--muted-on-dark); font-size: 16px; }
.hood-new { background: linear-gradient(160deg, rgba(43, 164, 132, .2), rgba(255, 255, 255, .02) 60%); border-color: rgba(127, 240, 200, .35); }
.code { margin: auto 0 0; padding: 16px 18px; border-radius: 14px; background: #0b1310; border: 1px solid var(--line-dark); display: grid; gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.4; color: #dbe7e1; white-space: pre-wrap; overflow-wrap: anywhere; }
.code em { font-style: normal; color: var(--accent-glow); }
.code span { opacity: 0; translate: -6px 0; transition: opacity .4s ease, translate .4s ease; }
.reveal.in .code span { opacity: 1; translate: 0 0; }
.reveal.in .code span:nth-child(2) { transition-delay: .25s; }
.reveal.in .code span:nth-child(3) { transition-delay: .5s; }
.reveal.in .code span:nth-child(4) { transition-delay: .75s; }

/* ---------- 06 Foundation ---------- */
.bo-infra { background: var(--paper); }
.infra { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: clamp(40px, 5vw, 64px); counter-reset: infra; }
.infra div { counter-increment: infra; position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 168px; padding: 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.infra div::before { content: counter(infra, decimal-leading-zero); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent-strong); }
.infra b { font-family: var(--font-display); font-stretch: 112%; font-size: 18px; line-height: 1.15; }
.infra span { font-size: 14.5px; color: var(--muted); }

/* ---------- 07 Operators (shares .ops from home.css) ---------- */
.bo-ops { background: #fff; }
.bo-ops .stat { background: var(--paper); }
.bo-ops .stat-hero { background: var(--ink); }

/* ---------- 08 Global ---------- */
.bo-global { background: var(--ink); color: var(--text-on-dark); overflow: hidden; }
.bo-global::before { content: ""; position: absolute; left: -10%; bottom: -20%; width: 60%; height: 80%; background: radial-gradient(closest-side, rgba(43, 164, 132, .18), transparent); pointer-events: none; }
.glob { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(40px, 5vw, 64px); }
.glob article { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid var(--line-dark); }
.glob small { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-glow); }
.glob h3 { font-size: 20px; }
.glob p { margin: 0; font-size: 15px; color: var(--muted-on-dark); }
.glob p a { color: var(--accent-glow); text-decoration: underline; text-underline-offset: 3px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tags i { padding: 5px 10px; border-radius: 8px; font-style: normal; font-size: 12px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .bo-head, .plan-grid { grid-template-columns: 1fr; }
  .mod-grid { grid-template-columns: 1fr 1fr; }
  .infra, .glob { grid-template-columns: 1fr 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash .d-side { display: none; }
  .d-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .bo-hero h1 { font-size: 38px; }
  .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 22px; }
  .seg button { padding: 11px 8px; font-size: 13.5px; }
  .mod-grid, .vs, .hood-grid, .infra, .glob { grid-template-columns: 1fr; }
  .mod { padding: 18px; }
  .mod.dim { display: none; }
  .infra div { min-height: 0; }
  .dash-stage { padding: 12px; min-height: 0; border-radius: 20px; }
  .d-main { padding: 14px; }
  .d-row { grid-template-columns: 1fr; }
  .d-bars { height: 90px; }
  .d-kpi b { font-size: 19px; }
  .dash[data-skin="dark"] .d-top h4 { font-size: 26px; }
  .tree-card { padding: 16px; border-radius: 20px; }
  .plan-pick button { padding: 12px 14px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .bw { opacity: 1; translate: none; animation: none; }
  .bw-prog i, .bw-chart i, .tree .n, .tree .edge, .dash.swap .d-main, .dash.swap .d-side { animation: none; opacity: 1; }
  .code span { opacity: 1; translate: none; transition: none; }
}

/* Arriving from another PayHouse page: bring the dashboard in with the roof, not after it */
.ph-quick .bw { animation-delay: .4s; }
.ph-quick .bw-prog i { animation-delay: .75s; }
.ph-quick .bw-chart i:nth-child(n) { animation-delay: calc(.65s + var(--i, 0) * 40ms); }
