/* Budgeting App case study: the case-study.css layout with TÜV NORD blue in place of Profits' red. */
body.cs-budget { --profile-red: #5B7CFF; --pr-rgb: 91 124 255; --amber: #F5A524; --green: #2FBF71; }

.cs-budget .cs-bridge-q { max-width: 34ch; }
.cs-budget .cs-hl.s1 { border-color: #5B7CFF; background: rgb(91 124 255 / 14%); }
.cs-budget .cs-hl.s2 { border-color: #2FBF71; background: rgb(47 191 113 / 14%); }
.cs-budget .cs-hl.s3 { border-color: #F5A524; background: rgb(245 165 36 / 14%); }

/* In-page jump bar: one line, scrolls on a narrow phone */
.cs-budget .cs-switch { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cs-budget .cs-switch::-webkit-scrollbar { display: none; }
.cs-budget .cs-switch a { flex: none; white-space: nowrap; }

.cs-budget .cs-logo { object-fit: cover; background: #fff; }

/* Spacing after any block that sits outside the prose column */
.bx-cycle + .cs-prose, .bx-levels + .cs-prose, .bx-fig + .cs-prose, .bx-two + .cs-prose, .bx-solve + .cs-prose,
.bx-states + .cs-prose, .bx-rule + .cs-prose, .bx-flows + .cs-prose, .bx-table-wrap + .cs-prose, .bp + .cs-prose { margin-top: 40px; }

/* ------------------------------------------------------------ Screens */
.bx-fig { margin: 28px 0 0; }
.bx-shot { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: 14px; background: #EEF1F5; cursor: zoom-in; aspect-ratio: var(--ar, auto); transition: border-color .2s ease, transform .4s cubic-bezier(.3,1.4,.5,1); }
.bx-shot:hover { border-color: #3A3A3F; }
.bx-shot:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.bx-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--y, 0%); }
.bx-shot::after { position: absolute; right: 10px; bottom: 10px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: rgb(11 11 12 / 72%); color: #fff; font-size: 15px; line-height: 1; opacity: 0; transition: opacity .2s ease; content: "⤢"; }
.bx-shot:hover::after, .bx-shot:focus-visible::after { opacity: 1; }
.bx-fig figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.bx-fig figcaption b { color: var(--bright); font-size: 13.5px; font-weight: 600; }
.bx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 28px 0 0; }
.bx-two .bx-fig { margin: 0; }
@media (max-width: 640px) { .bx-two { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ The cycle: who does what, in order */
.bx-cycle { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: cyc; }
.bx-cycle li { position: relative; display: grid; grid-template-columns: 32px auto minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: center; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); counter-increment: cyc; }
.bx-cycle li::before { color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; content: "0" counter(cyc); grid-row: 1 / 3; align-self: start; padding-top: 2px; }
.bx-cycle h4 { grid-column: 2; }
.bx-cycle p { grid-column: 2 / -1; }
.bx-cycle h4 { color: var(--bright); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.bx-cycle p { color: var(--text); font-size: 13px; line-height: 1.6; }
.bx-cycle .who { display: inline-flex; grid-column: 3; grid-row: 1; justify-self: start; margin: 0; padding: 3px 9px; border-radius: 999px; background: rgb(var(--pr-rgb) / 14%); color: #9DB0FF; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.bx-cycle .who.hod { background: rgb(245 165 36 / 14%); color: #F7C068; }
.bx-cycle .who.fin { background: rgb(47 191 113 / 14%); color: #6FD9A0; }
.bx-cycle .who.all { background: #232326; color: var(--bright); }
.bx-cycle li.is-year { border-style: dashed; }
.bx-phase { grid-column: 1 / -1; margin: 8px 0 -2px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.bx-cycle li.bx-phase { display: block; padding: 0; border: 0; background: none; counter-increment: none; }
.bx-cycle li.bx-phase::before { content: none; }
@media (max-width: 560px) { .bx-cycle li { grid-template-columns: 28px auto minmax(0, 1fr); column-gap: 10px; } .bx-cycle .who { grid-column: 2 / -1; grid-row: 2; margin: 2px 0 4px; } .bx-cycle p { grid-row: 3; } }

/* ------------------------------------------------------------ Levels and categories */
.bx-levels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 28px 0 0; }
.bx-box { padding: 20px; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); }
.bx-box > p.lbl { margin-bottom: 14px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.bx-nest { padding: 12px 14px; border: 1px solid #2E2E33; border-radius: 12px; }
.bx-nest .bx-nest { margin-top: 10px; }
.bx-nest b { display: block; color: var(--bright); font-size: 13.5px; font-weight: 600; }
.bx-nest span { color: var(--muted); font-size: 12px; }
.bx-nest.l1 { border-color: rgb(var(--pr-rgb) / 45%); }
.bx-nest.l2 { border-color: rgb(245 165 36 / 40%); }
.bx-nest.l3 { border-color: rgb(47 191 113 / 40%); }
.bx-cats { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bx-cats li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.bx-cats li:first-child { border-top: 0; padding-top: 0; }
.bx-cats i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.bx-cats b { color: var(--bright); font-weight: 600; }
.bx-cats em { color: var(--muted); font-size: 12px; font-style: normal; }
.bx-box .bx-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--text); font-size: 12.5px; line-height: 1.6; }
.bx-box .bx-note strong { color: var(--bright); font-weight: 600; }
@media (max-width: 700px) { .bx-levels { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ Solution points over a wide screen */
.bx-solve { margin: 32px 0 0; }
.bx-solve .bx-shot { cursor: default; }
.bx-solve .bx-shot::after { content: none; }
.bx-solve .cs-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; margin-top: 18px; }
.bx-solve .cs-steps li { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; border-top: 0; padding: 12px 0 0; }
.bx-solve .cs-steps .ico { width: 28px; height: 28px; }
.bx-solve .cs-steps .ico svg { width: 22px; height: 22px; }
.bx-solve .cs-steps p { font-size: 13px; line-height: 1.65; }
.bx-solve[data-active] .cs-hl.is-on { opacity: 1; transform: none; }
@media (max-width: 720px) { .bx-solve .cs-steps { grid-template-columns: minmax(0, 1fr); } .bx-solve .cs-steps li { border-top: 1px solid var(--rule); padding: 12px 0; } .bx-solve .cs-steps li:first-child { border-top: 0; } }

/* ------------------------------------------------------------ Three states of a target */
.bx-states { margin: 28px 0 0; padding: 18px; border: 1px solid var(--rule); border-radius: 18px; background: var(--card); }
.bx-seg { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 12px; background: #1C1C1F; }
.bx-seg button { flex: 1 1 auto; padding: 9px 12px; border: 0; border-radius: 9px; background: none; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; transition: background .2s ease, color .2s ease; }
.bx-seg button:hover { color: var(--bright); }
.bx-seg button[aria-selected="true"] { background: var(--bright); color: #0B0B0C; }
.bx-seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.bx-seg button i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--c); vertical-align: 1px; }
.bx-state-img { position: relative; overflow: hidden; border-radius: 12px; background: #E4E4E4; aspect-ratio: 1213 / 917; }
.bx-state-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.bx-state-img img.is-on { opacity: 1; }
.bx-state-say { min-height: 3.2em; margin-top: 14px; color: var(--text); font-size: 13.5px; line-height: 1.7; }
.bx-state-say strong { color: var(--bright); font-weight: 600; }

/* ------------------------------------------------------------ The one rule */
.bx-rule { position: relative; margin: 32px 0 0; padding: 22px 24px 22px 26px; border: 1px solid rgb(var(--pr-rgb) / 35%); border-radius: 16px; background: linear-gradient(135deg, rgb(var(--pr-rgb) / 10%), transparent 60%), var(--card); }
.bx-rule .k { margin-bottom: 8px; color: #9DB0FF; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.bx-rule .q { color: var(--bright); font-size: 18px; font-weight: 500; letter-spacing: -.015em; line-height: 1.45; }
.bx-rule .eq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; color: var(--text); font-size: 13px; }
.bx-rule .eq span { padding: 5px 10px; border: 1px solid #2E2E33; border-radius: 8px; background: #1A1A1D; color: var(--bright); font-weight: 500; }
.bx-rule .eq span.is-lock { border-color: rgb(var(--pr-rgb) / 55%); background: rgb(var(--pr-rgb) / 14%); }

/* ------------------------------------------------------------ Transfer flows */
.bx-flows { display: grid; gap: 14px; margin: 28px 0 0; }
.bx-flow { padding: 18px 20px; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); }
.bx-flow h4 { margin-bottom: 4px; color: var(--bright); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.bx-flow > p { margin-bottom: 14px; color: var(--text); font-size: 13px; line-height: 1.6; }
.bx-lane { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bx-lane li { display: flex; flex: 1 1 150px; flex-direction: column; gap: 3px; padding: 11px 13px; border: 1px solid #2E2E33; border-radius: 11px; background: #18181B; }
.bx-lane li + li { position: relative; }
.bx-lane b { color: var(--bright); font-size: 12.5px; font-weight: 600; }
.bx-lane span { color: var(--text); font-size: 12.5px; line-height: 1.5; }
.bx-lane .st { align-self: flex-start; font-style: normal; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: rgb(245 165 36 / 14%); color: #F7C068; font-size: 11px; font-weight: 600; }
.bx-lane .st.ok { background: rgb(47 191 113 / 14%); color: #6FD9A0; }

/* ------------------------------------------------------------ Tables */
.bx-table-wrap { margin: 28px 0 0; overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); scrollbar-width: none; }
.bx-table-wrap::-webkit-scrollbar { display: none; }
.bx-table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }
.bx-table th, .bx-table td { padding: 15px 18px; vertical-align: top; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.6; }
.bx-table thead th, .bx-table thead td { border-top: 0; color: var(--bright); font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.bx-table tbody td { color: var(--text); }
.bx-table tbody td strong { color: var(--bright); font-weight: 600; }
.bx-table tbody th { width: 150px; color: var(--bright); font-size: 13px; font-weight: 600; }

/* ------------------------------------------------------------ Web journeys player */
.bp { margin-top: 36px; }
.bp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.bp-tab { padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.bp-tab:hover { border-color: #3A3A3F; color: var(--bright); }
.bp-tab[aria-selected="true"] { border-color: var(--bright); background: var(--bright); color: #0B0B0C; }
.bp-tab:focus-visible, .bp-btn:focus-visible, .bp-steps button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.bp-panel { padding: 18px; border: 1px solid var(--rule); border-radius: 20px; background: var(--card); }
.bp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 4px 4px 14px; }
.bp-head h3 { color: var(--bright); font-size: 17px; font-weight: 500; letter-spacing: -.015em; }
.bp-head p { color: var(--muted); font-size: 12.5px; }
.bp-stage { position: relative; overflow: hidden; border: 1px solid #2A2A2E; border-radius: 12px; background: #EEF1F5; aspect-ratio: 1440 / 900; }
.bp-canvas { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; transform-origin: 0 0; transform: scale(var(--k, .5)); }
.bp-move { position: absolute; top: 0; left: 0; width: 1440px; transform-origin: 0 0; transition: transform 1.1s cubic-bezier(.45,.05,.2,1), opacity .28s ease; will-change: transform; }
.bp-move.is-cut { transition: opacity .28s ease; }
.bp-move.is-out { opacity: 0; }
.bp-move > img { display: block; width: 1440px; height: auto; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.bp-ov { position: absolute; border-radius: 6px; box-shadow: 0 10px 30px rgb(0 0 0 / 18%); opacity: 0; transform: translateY(-6px); transition: opacity .3s ease .5s, transform .3s ease .5s; }
.bp-ov.is-on { opacity: 1; transform: none; }
.bp-hl { position: absolute; border: 3px solid var(--profile-red); border-radius: 10px; background: rgb(var(--pr-rgb) / 10%); box-shadow: 0 0 0 9999px rgb(10 14 30 / 22%); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.bp-hl.is-on { opacity: 1; transition-delay: .75s; }
.bp-say { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin: 16px 4px 0; }
.bp-ctrl { display: flex; align-items: center; gap: 8px; }
.bp-btn { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: var(--card); color: var(--bright); cursor: pointer; transition: border-color .2s ease, transform .3s cubic-bezier(.3,1.5,.5,1); }
.bp-btn:hover { border-color: #3A3A3F; }
.bp-btn svg { width: 15px; height: 15px; }
.bp.is-paused .cs-playpause .ico::before { top: 0; left: 1px; width: 0; height: 0; border-radius: 0; border: 6px solid transparent; border-left: 10px solid currentColor; border-right: 0; background: none; }
.bp.is-paused .cs-playpause .ico::after { display: none; }
.bp-text { color: var(--bright); font-size: 14.5px; line-height: 1.55; min-height: 3.1em; display: flex; align-items: center; }
.bp-steps { display: flex; gap: 6px; margin: 14px 4px 2px; padding: 0; list-style: none; }
.bp-steps li { flex: 1 1 0; }
.bp-steps button { position: relative; display: block; width: 100%; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
.bp-steps button::before { position: absolute; top: 7px; right: 0; left: 0; height: 4px; border-radius: 4px; background: #2A2A2E; content: ""; }
.bp-steps button i { position: absolute; top: 7px; left: 0; height: 4px; width: 0; border-radius: 4px; background: var(--profile-red); }
.bp-steps li.is-done button i { width: 100%; }
.bp-steps button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 600px) { .bp-panel { padding: 12px; } .bp-text { font-size: 13.5px; } }
@media (prefers-reduced-motion: reduce) { .bp-move { transition: opacity .2s ease; } }

/* ------------------------------------------------------------ Lightbox for full screens */
.bx-lb { position: fixed; z-index: 50; inset: 0; display: none; overflow-y: auto; padding: 56px 24px 40px; background: rgb(5 5 6 / 92%); cursor: zoom-out; }
.bx-lb.is-open { display: block; }
.bx-lb img { display: block; width: min(1200px, 100%); height: auto; margin: 0 auto; border-radius: 12px; }
.bx-lb button { position: fixed; top: 14px; right: 16px; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid #3A3A3F; border-radius: 50%; background: #141416; color: var(--bright); font-size: 18px; cursor: pointer; }
.bx-lb p { width: min(1200px, 100%); margin: 0 auto 12px; color: var(--muted); font-size: 13px; }

/* Transfer flows: the same cards, side by side and joined by arrows */
.bx-chain { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: 28px; }
.bx-chain + .bx-chain { margin-top: 20px; }
.bx-chain li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; }
.bx-chain li::before { order: -3; }
.bx-chain h4 { order: -2; }
.bx-chain .who { order: -1; margin: 0 0 2px; }
.bx-chain li:not(.bx-phase):not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -22px; transform: translateY(-50%); color: var(--muted); font-size: 16px; }
.bx-chain li.bx-phase { grid-column: 1 / -1; display: block; }
@media (max-width: 760px) {
  .bx-chain { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .bx-chain li:not(.bx-phase):not(:last-child)::after { content: "↓"; top: auto; right: auto; bottom: -22px; left: 50%; transform: translateX(-50%); }
}

/* Three steps: numbered circles on a vertical line, no cards */
.bx-circ { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
.bx-circ li { padding: 0 0 0 58px; border: 0; background: none; gap: 6px; }
.bx-circ li::before { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: 50%; background: var(--card); color: var(--bright); font-size: 13px; }
.bx-circ h4 { padding-top: 9px; }
.bx-circ li:not(.bx-phase):not(:last-child)::after { content: ""; position: absolute; top: 42px; bottom: -22px; left: 20px; right: auto; width: 1px; height: auto; transform: none; background: var(--rule); }
.bx-circ li.bx-phase { margin-bottom: -8px; padding: 0; }
.bx-circ li.bx-phase::before { content: none; }
.bx-circ li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 6px; align-items: center; }
.bx-circ h4 { grid-column: 1; grid-row: 1; padding-top: 0; }
.bx-circ .who { grid-column: 2; grid-row: 1; justify-self: start; margin: 0; }
.bx-circ p { grid-column: 1 / -1; grid-row: 2; }
.bx-circ li::before { order: 0; }
.bx-circ li.bx-phase { display: block; }
.bx-circ li:not(.bx-phase) { min-height: 56px; align-content: start; }
.bx-circ { row-gap: 28px; }
.bx-circ li:not(.bx-phase):not(:last-child)::after { bottom: -26px; }
.bx-plabel { margin: 20px 0 0; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.bx-circ { margin-top: 12px; padding: 24px 22px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); }
.bx-circ li::before { background: #232326; }

/* One step, one card */
.bx-circ { margin-top: 12px; padding: 0; border: 0; background: none; row-gap: 12px; }
.bx-circ li:not(.bx-phase) { min-height: 0; padding: 18px 20px 18px 78px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); }
.bx-circ li::before { left: 20px; top: 18px; }
.bx-circ li:not(.bx-phase):not(:last-child)::after { content: none; }
.bx-circ h4 { padding-top: 0; }
.bx-circ li:not(.bx-phase) { align-content: center; }
.bx-circ li:not(.bx-phase)::before { grid-area: auto; top: 50%; transform: translateY(-50%); padding: 0; }
.bx-circ li:not(.bx-phase) { min-height: 80px; }

/* Who a design part is for */
.bx-role { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 56px 0 0; }
.bx-role + .cs-h3 { margin-top: 12px; }
.bx-role .who { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: rgb(var(--pr-rgb) / 14%); color: #9DB0FF; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.bx-role .who.hod { background: rgb(245 165 36 / 14%); color: #F7C068; }
.bx-role .who.fin { background: rgb(47 191 113 / 14%); color: #6FD9A0; }
.bx-role .who.all { background: #232326; color: var(--bright); }
.bx-role .step { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* Who is acting in a player step */
.bp-who { display: inline-flex; margin-right: 10px; padding: 3px 9px; border-radius: 999px; background: rgb(var(--pr-rgb) / 14%); color: #9DB0FF; font-size: 11px; font-weight: 600; letter-spacing: .02em; vertical-align: 1px; }
.bp-who.hod { background: rgb(245 165 36 / 14%); color: #F7C068; }
.bp-who.fin, .bp-who.src { background: rgb(47 191 113 / 14%); color: #6FD9A0; }
.bp-who.all { background: #232326; color: var(--bright); }
