/* ==========================================================
   CodeStory: new pricing page (pricing-new.html only)
   Loads after home-new.css and online-new.css and reuses their parts: the hero ground
   (.on-hero), pills (.on-open), the compare table (.on-cmp), the steps (.on-steps),
   ticks (.on-why) and the FAQ (.nh-faq). Only the plan cards and small fixes live here.
   Classes are prefixed pr-.
   Owner rules: no eyebrow labels, green CTAs, no drop shadows, H1 600, no em dashes.
   ========================================================== */

/* ---------- hero: the head, then the three plans ---------- */
.pr-in { padding-top: 44px; padding-bottom: 56px; }
.pr-head { max-width: 860px; margin: 0 auto; text-align: center; }
.pr-head .on-pills { justify-content: center; }
.pr-head .on-sub { margin-left: auto; margin-right: auto; max-width: 60ch; }
.pr-thin { font-weight: 500; }

.pr-plans { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pr-plan { position: relative; display: flex; flex-direction: column; padding: 26px 24px 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.pr-plan--top { background: linear-gradient(160deg, #FFF3EE, #fff 55%); border: 1.5px solid var(--accent); }
.pr-plan--campus { background: linear-gradient(160deg, #F3FBF6, #fff 55%); }
.pr-tag { position: absolute; top: -13px; left: 24px; padding: 4px 12px; border-radius: 99px; background: var(--accent); color: #fff; font-family: var(--f-display); font-weight: 600; font-size: 12.5px; }
.pr-plan h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; color: var(--ink); }
.pr-who { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.pr-price { margin: 18px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.pr-price b { font-family: var(--f-display); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.pr-plan--campus .pr-price b { font-size: 30px; }
.pr-price s { font-size: 16px; color: var(--nh-muted); }
.pr-price em { padding: 3px 9px; border-radius: 99px; background: #E8F5EE; color: var(--nh-green); font-style: normal; font-size: 12.5px; font-weight: 600; }
.pr-day { margin: 8px 0 0; padding-bottom: 16px; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; color: var(--nh-muted); }
.pr-plan ul { list-style: none; margin: 16px 0 22px; padding: 0; display: grid; gap: 9px; }
.pr-plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.pr-plan li svg { flex: none; width: 18px; height: 18px; margin-top: 1px; padding: 3px; border-radius: 50%; background: #E8F5EE; fill: none; stroke: var(--nh-green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pr-note { margin: -8px 0 22px; padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.pr-go { margin-top: auto; width: 100%; }

/* the two small doors under the plans */
.pr-also { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pr-also li { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 18px; background: rgba(255, 255, 255, .7); border: 1px dashed var(--line-2); }
.pr-also i { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); }
.pr-also svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pr-also p { margin: 0; flex: 1; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.pr-also b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.pr-also a { flex: none; font-family: var(--f-display); font-weight: 600; font-size: 14.5px; color: var(--accent); }
.pr-also a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- compare: four columns on the online table ---------- */
.pr-table { max-width: 1120px; margin-left: auto; margin-right: auto; }
.pr-table .on-cmp-r { grid-template-columns: 1fr 1.1fr 1.1fr 1.2fr; }
.pr-table .on-cmp-r > span { padding: 13px 18px; }
.pr-table .pr-no { color: #A3A9BD; font-size: 14px; }
.pr-table .on-cmp-r:last-child > span:not(:first-child) { font-family: var(--f-display); font-weight: 700; font-size: 17px; color: var(--ink); }

/* ---------- how paying works ---------- */
.pr-writing { max-width: 1000px; margin: 40px auto 0; display: flex; align-items: center; gap: 22px; padding: 16px 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.pr-writing > b { flex: none; font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.pr-writing .on-why { margin: 0; flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .pr-plans { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-left: auto; margin-right: auto; }
  .pr-also { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-left: auto; margin-right: auto; }
  .pr-table { overflow-x: auto; }
  .pr-table .on-cmp-r { min-width: 760px; }
  .pr-writing { flex-direction: column; align-items: flex-start; }
  .pr-writing .on-why { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .pr-in { padding-top: 28px; padding-bottom: 40px; }
  /* phones: the plans become a row you swipe, the Full Course card first in view after DSA Only */
  .pr-plans { display: flex; max-width: none; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
              margin: 28px calc(var(--nh-gutter) * -1) 0; padding: 16px var(--nh-gutter) 6px; scrollbar-width: none; }
  .pr-plans::-webkit-scrollbar { display: none; }
  .pr-plan { flex: 0 0 86%; scroll-snap-align: center; padding: 22px 18px 20px; }
  .pr-price b { font-size: 34px; }
  .pr-also li { flex-wrap: wrap; }
  /* the table: the row name on its own line, then the three plans side by side */
  .pr-table { overflow: visible; }
  .pr-table .on-cmp-r { min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pr-table .on-cmp-r > span { padding: 9px 10px; font-size: 13px; }
  .pr-table .on-cmp-r > span:first-child { grid-column: 1 / -1; padding: 12px 10px 2px; }
  .pr-table .on-cmp-h > span:first-child { display: none; }
  .pr-table .on-cmp-h > span { font-size: 13.5px; }
  .pr-table .on-cmp-r:last-child > span:not(:first-child) { font-size: 15px; }
}

/* ---------- app plans (2026-09-25): Starter / Pro / Max, passes, credit packs ---------- */
.pr-app .pr-plans { margin-top: 32px; }
.pr-plan h3 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; color: var(--ink); }
.pr-per { font-size: 14px; color: var(--nh-muted); }
.pr-plan li.pr-soon { color: var(--ink-2); }
.pr-plan li.pr-soon svg, .pr-app-key svg { background: #FFF4E0; stroke: #A15C00; stroke-width: 2.4; }
.pr-app-key { max-width: 1120px; margin: 14px auto 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.pr-app-key svg { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pr-app-more { max-width: 1120px; margin: 36px auto 0; display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.pr-app-more > div { padding: 22px 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.pr-app-more h3 { margin: 0 0 14px; font-family: var(--f-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.pr-passes, .pr-packs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pr-passes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 12px 0; border-top: 1px dashed var(--line-2); }
.pr-passes li:first-child { border-top: 0; padding-top: 0; }
.pr-passes p { margin: 0; }
.pr-passes b { font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.pr-passes small { margin-left: 8px; font-size: 12.5px; color: var(--nh-muted); }
.pr-passes strong { font-family: var(--f-display); font-weight: 700; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pr-passes span { grid-column: 1 / -1; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.pr-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pr-packs li { padding: 12px 14px; border-radius: 14px; background: var(--bg-alt); display: grid; gap: 2px; }
.pr-packs b { font-family: var(--f-display); font-weight: 700; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pr-packs span { font-size: 13px; color: var(--ink-2); }
.pr-rates { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 1100px) {
  .pr-app-more { grid-template-columns: minmax(0, 1fr); }
}

/* app plans: the Monthly / Yearly / 2 years switch (2026-09-25) */
.pr-len { margin-top: 24px; display: flex; justify-content: center; }
.pr-app .pr-l { display: none; }
.pr-app[data-len="1"] span.pr-l-1, .pr-app[data-len="12"] span.pr-l-12, .pr-app[data-len="24"] span.pr-l-24 { display: inline; }
.pr-app[data-len="1"] li.pr-l-1, .pr-app[data-len="12"] li.pr-l-12, .pr-app[data-len="24"] li.pr-l-24 { display: flex; }
.pr-app .pr-price span.pr-l { gap: 4px 10px; align-items: baseline; }
.pr-app[data-len="1"] .pr-price span.pr-l-1, .pr-app[data-len="12"] .pr-price span.pr-l-12, .pr-app[data-len="24"] .pr-price span.pr-l-24 { display: inline-flex; }
.pr-plan li.pr-off { color: var(--nh-muted); }
.pr-plan li.pr-off svg { background: var(--bg-alt); stroke: var(--nh-muted); }
