/* Natha Gadai chapter pages: the case-study.css layout with Natha's violet in place of Profits' red. */
body.cs-natha { --profile-red: #7C60FF; }

.cs-natha .cs-prose strong { background: linear-gradient(transparent 64%, rgb(91 52 255 / 26%) 64%) no-repeat 0 0 / 100% 100%; }
.cs-natha .cs-bridge-q mark { background: linear-gradient(transparent 62%, rgb(91 52 255 / 34%) 62%) no-repeat 0 0 / 100% 100%; }
.cs-natha .cs-hl.s1 { border-color: #7C60FF; background: rgb(91 52 255 / 16%); }
.cs-natha .cs-bridge-q { max-width: 34ch; }

/* Five tabs, one with a long name: keep them on one line and let the pill scroll on a narrow phone */
.cs-natha .cs-switch { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cs-natha .cs-switch::-webkit-scrollbar { display: none; }
.cs-natha .cs-switch a, .cs-natha .cs-switch span { flex: none; white-space: nowrap; }

/* Chapters that are not written yet */
.cs-switch .is-soon { padding: 6px 14px; color: var(--muted); font-weight: 500; opacity: .5; cursor: default; }

/* With / without, instead of before / after: this is a new product, there is no old screen */
@media (max-width: 820px) {
  .cs-natha .cs-then-now > div:not(.hd) .t::before { content: "Without: "; }
  .cs-natha .cs-then-now > div:not(.hd) .n::before { content: "With: "; }
}

/* Why a range: the same offer, read against a fixed number and against a range */
.nx-range { margin: 40px 0 0; padding: 22px 24px 8px; border: 1px solid var(--rule); border-radius: 16px; background: #141416; }
.nx-range figcaption { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.nx-row { padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.nx-range figcaption + .nx-row { border-top: 0; }
.nx-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 60px; }
.nx-head h4 { color: var(--bright); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.nx-verdict { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; }
.nx-verdict::before { width: 7px; height: 7px; border-radius: 50%; content: ""; background: currentColor; }
.nx-verdict.is-bad { color: #FF8A90; }
.nx-verdict.is-good { color: #6FD3A0; }
.nx-track { position: relative; height: 4px; margin: 0 14px 34px; border-radius: 4px; background: #2A2A2E; }
.nx-band { position: absolute; top: -3px; height: 10px; border-radius: 6px; background: rgb(124 96 255 / 55%); box-shadow: 0 0 0 1px rgb(124 96 255 / 70%); }
.nx-pin { position: absolute; top: 50%; width: 0; height: 0; }
.nx-pin::before { position: absolute; top: -8px; left: -8px; width: 16px; height: 16px; border-radius: 50%; content: ""; }
.nx-pin.is-est::before { top: -7px; left: -7px; width: 14px; height: 14px; border-radius: 3px; background: var(--bright); transform: rotate(45deg); }
.nx-pin.is-offer::before { background: #FFB454; box-shadow: 0 0 0 4px rgb(255 180 84 / 22%); }
.nx-pin b { position: absolute; left: 0; width: max-content; max-width: 118px; color: var(--text); font-size: 11.5px; font-weight: 500; line-height: 1.35; text-align: center; transform: translateX(-50%); }
.nx-pin b em { display: block; color: var(--bright); font-style: normal; font-weight: 600; }
.nx-pin.is-above b { bottom: 16px; }
.nx-pin.is-below b { top: 16px; }
.nx-note { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  .nx-range { padding: 18px 16px 4px; }
  .nx-track { margin-inline: 22px; }
  .nx-pin b { max-width: 96px; font-size: 11px; }
  .nx-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nx-track { margin-bottom: 40px; }
}

/* The loyalty loop: act, earn, climb, redeem, and back to the app */
.nx-loop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: nx; }
.nx-loop li { position: relative; padding: 18px 18px 20px; border: 1px solid var(--rule); border-left-width: 0; background: #141416; }
.nx-loop li:first-child { border-left-width: 1px; border-radius: 16px 0 0 16px; }
.nx-loop li:last-child { border-radius: 0 16px 16px 0; }
.nx-loop li::after { position: absolute; z-index: 1; top: 50%; right: -11px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #0B0B0C; box-shadow: 0 0 0 1px var(--rule); color: var(--muted); font-size: 12px; line-height: 1; content: "→"; transform: translateY(-50%); }
.nx-loop li:last-child::after { display: none; }
.nx-loop b { display: grid; width: 22px; height: 22px; margin-bottom: 12px; place-items: center; border-radius: 50%; background: rgb(124 96 255 / 22%); color: #B9A8FF; font-size: 11px; font-weight: 600; }
.nx-loop h4 { margin-bottom: 4px; color: var(--bright); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.nx-loop p { color: var(--text); font-size: 13px; line-height: 1.6; }
.nx-loop-back { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 0; color: var(--muted); font-size: 12.5px; }
.nx-loop-back::before, .nx-loop-back::after { flex: 1; max-width: 120px; height: 0; border-top: 1px dashed #3A3A3F; content: ""; }
@media (max-width: 760px) {
  .nx-loop { grid-template-columns: minmax(0, 1fr); }
  .nx-loop li { border-left-width: 1px; border-top-width: 0; }
  .nx-loop li:first-child { border-top-width: 1px; border-radius: 16px 16px 0 0; }
  .nx-loop li:last-child { border-radius: 0 0 16px 16px; }
  .nx-loop li::after { top: auto; right: auto; bottom: -11px; left: 28px; content: "↓"; transform: none; }
}

/* The same card at three levels */
.nx-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0 0; }
.nx-lv { margin: 0; }
.nx-lv-shot { position: relative; overflow: hidden; border: 1px solid var(--rule); border-radius: 18px; background: #0F1B3A; aspect-ratio: var(--ar, 375 / 335); }
.nx-lv-shot img { display: block; width: 100%; height: auto; }
.nx-lv figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.nx-lv figcaption b { color: var(--bright); font-size: 13.5px; font-weight: 600; }
@media (max-width: 640px) {
  .nx-levels { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(220px, 78%); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .nx-levels::-webkit-scrollbar { display: none; }
  .nx-lv { scroll-snap-align: start; }
}

/* Screens side by side: four statuses, three levels of urgency, three edge cases */
.nx-levels.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.nx-levels.is-4 .nx-lv figcaption { flex-direction: column; align-items: flex-start; }
.nx-lv-shot.is-light { background: #F4F6FB; }
@media (max-width: 640px) { .nx-levels.is-4 { grid-template-columns: none; } }

/* The three ways to pay */
.nx-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.nx-type { display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 18px; border: 1px solid var(--rule); border-radius: 16px; background: #141416; }
.nx-type .ico { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; }
.nx-type .ico svg { width: 20px; height: 20px; }
.nx-type.is-tebus .ico { background: rgb(52 168 107 / 18%); color: #6FD3A0; }
.nx-type.is-cicil .ico { background: rgb(255 199 90 / 16%); color: #FFC75A; }
.nx-type.is-perp .ico { background: rgb(124 167 255 / 16%); color: #8DB2FF; }
.nx-type h4 { color: var(--bright); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.nx-type .tag { margin-top: -8px; color: var(--text); font-size: 13.5px; line-height: 1.5; }
.nx-type dl { display: grid; gap: 12px; margin: 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.nx-type dt { margin-bottom: 2px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.nx-type dd { margin: 0; color: var(--text); font-size: 13px; line-height: 1.55; }
.nx-type dd strong { color: var(--bright); font-weight: 600; }
@media (max-width: 760px) { .nx-types { grid-template-columns: minmax(0, 1fr); } }
.nx-lv-shot.is-bottom img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.nx-types + .cs-prose, .nx-levels + .cs-prose, .nx-loop + .nx-loop-back + .cs-prose { margin-top: 40px; }

/* Types of payment as a table: one column per type, one row per question */
.nx-table-wrap { margin: 28px 0 0; overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; background: #141416; scrollbar-width: none; }
.nx-table-wrap::-webkit-scrollbar { display: none; }
.nx-table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; }
.nx-table th, .nx-table td { padding: 16px 18px; vertical-align: top; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.55; }
.nx-table thead td, .nx-table thead th { border-top: 0; }
.nx-table tbody td { color: var(--text); }
.nx-table tbody td strong { color: var(--bright); font-weight: 600; }
.nx-table tbody th { width: 112px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.nx-table thead th { padding-top: 20px; padding-bottom: 18px; font-weight: 400; }
.nx-table thead .ico { display: grid; width: 36px; height: 36px; margin-bottom: 12px; place-items: center; border-radius: 11px; }
.nx-table thead .ico svg { width: 20px; height: 20px; }
.nx-table thead b { display: block; color: var(--bright); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.nx-table thead i { display: block; margin-top: 2px; color: var(--text); font-size: 13px; font-style: normal; }
.nx-table .is-tebus .ico { background: rgb(52 168 107 / 18%); color: #6FD3A0; }
.nx-table .is-cicil .ico { background: rgb(255 199 90 / 16%); color: #FFC75A; }
.nx-table .is-perp .ico { background: rgb(124 167 255 / 16%); color: #8DB2FF; }
.nx-table-wrap + .cs-prose { margin-top: 40px; }

/* Table header: icon beside the name */
.nx-table thead th { padding-right: 12px; }
.nx-table thead th { display: table-cell; }
.nx-table .th-top { display: flex; align-items: center; gap: 12px; }
.nx-table thead .ico { flex: none; margin-bottom: 0; }
.nx-table thead i { margin-top: 10px; }
/* Header: title row + one-line tagline */
.nx-table thead th { padding-left: 14px; padding-right: 8px; }
.nx-table thead .th-top { gap: 10px; }
.nx-table thead .ico { width: 32px; height: 32px; border-radius: 10px; }
.nx-table thead .ico svg { width: 18px; height: 18px; }
.nx-table thead b { font-size: 14px; white-space: nowrap; }
.nx-table thead i { margin-top: 8px; font-size: 12px; white-space: nowrap; }
.nx-table tbody th { width: 96px; }
/* Stacked loop on mobile: the arrow sits centred on the divider */
@media (max-width: 760px) {
  .nx-loop li::after { left: 50%; margin-left: -11px; }
}
