/* Credit packs · landing, pricing and checkout (founder review 10-09, Step 2).
   Paper and ink, one night surface. The chosen pack is the tab of that surface; base credits are blue, bonus credits amber.
   Type sizes reuse the page tokens only (--fs-title for rail prices and counts, the landing hero clamp for the stage price). */
.pk { color: var(--ink); font-family: var(--font-sans); min-width: 0; }
.pk p { margin: 0; }

/* Head: section title left, currency right */
.pk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-bottom: clamp(32px, 3.2vw, 56px); }
.pk-head-copy { max-width: 880px; display: flex; flex-direction: column; gap: 18px; }
.pk-head-copy .t-display { max-width: 19ch; }
.pk-head-copy .t-lead { max-width: 60ch; }
.pk-currency { flex: none; display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--hairline); }
.pk-currency button { min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font-family: var(--font-sans); font-size: var(--fs-ui); font-weight: 600; line-height: 1; cursor: pointer; transition: background var(--d-2), color var(--d-2), box-shadow var(--d-2); }
.pk-currency button:hover { color: var(--ink); }
.pk-currency button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,19,.08), 0 0 0 1px var(--hairline-strong); }
.pk-currency button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pk-status { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 0 0 24px !important; padding: 7px 14px 7px 12px; border-radius: var(--r-pill); background: var(--warning-tint); color: var(--warning); font-size: var(--fs-small); font-weight: 600; line-height: 1.4; }
.pk-status-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-orange); box-shadow: 0 0 0 3px rgba(225,145,54,.22); }

/* Rail: five packs; the checked one becomes the tab of the stage below */
.pk-shelf { position: relative; }
.pk-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pk-opt { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-bottom: 12px; padding: 18px 22px 20px; border-radius: var(--r-xl); background: var(--raised); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: box-shadow var(--d-3) var(--ease-out), transform var(--d-3) var(--ease-out), background-color var(--d-3); }
.pk-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pk-opt:hover { box-shadow: inset 0 0 0 1px var(--hairline-strong), 0 14px 28px -20px rgba(11,24,48,.5); transform: translateY(-2px); }
.pk-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.pk-opt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; min-height: 22px; }
.pk-opt-name { font-size: var(--fs-ui); font-weight: 600; }
.pk-opt-tag { font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.pk-opt.is-rec .pk-opt-tag { color: var(--accent-ink); font-weight: 600; }
.pk-opt-price { margin-top: 12px; font-family: var(--font-brand); font-weight: 500; font-size: var(--fs-title); line-height: 1; letter-spacing: var(--ls-title); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-opt-credits { font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* KRW prices are twice as long: they scale with the tile so ₩368,300 never meets the edge. */
.pk-opt { container-type: inline-size; }
.pk-rail.is-krw .pk-opt-price { font-size: min(var(--fs-title), 15.5cqi); }
.pk-opt:has(input:checked) { margin-bottom: 0; padding-bottom: 32px; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--brand-night); color: #fff; box-shadow: none; transform: none; cursor: default; }
.pk-opt:has(input:checked) .pk-opt-credits { color: var(--on-dark-2); }
.pk-opt:has(input:checked) .pk-opt-tag { color: var(--brand-glow); }
/* concave fillets where the tab meets the stage */
.pk-opt:has(input:checked)::before, .pk-opt:has(input:checked)::after { content: ""; position: absolute; bottom: 0; width: 12px; height: 12px; pointer-events: none; }
.pk-opt:has(input:checked)::before { left: -12px; background: radial-gradient(circle at 0 0, transparent 11.5px, var(--brand-night) 12px); }
.pk-opt:has(input:checked)::after { right: -12px; background: radial-gradient(circle at 100% 0, transparent 11.5px, var(--brand-night) 12px); }
.pk-opt:first-of-type:has(input:checked)::before, .pk-opt:last-of-type:has(input:checked)::after { display: none; }

/* Stage */
.pk-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: var(--r-2xl); color: #fff; overflow: hidden;
  background: radial-gradient(60% 75% at 0% 100%, rgba(18,117,216,.34), rgba(18,117,216,0) 72%), radial-gradient(55% 70% at 100% 100%, rgba(225,145,54,.2), rgba(225,145,54,0) 70%), var(--brand-night);
  box-shadow: 0 48px 90px -56px rgba(5,15,40,.6); }
.pk-stage[data-at="first"] { border-top-left-radius: 0; }
.pk-stage[data-at="last"] { border-top-right-radius: 0; }
.pk-main, .pk-buys { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding: clamp(32px, 3.4vw, 64px); }
.pk-buys { border-left: 1px solid var(--night-edge); }
.pk-main-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pk-name { font-size: var(--fs-heading); font-weight: 500; letter-spacing: var(--ls-heading); }
.pk-tag { padding: 4px 11px; border-radius: var(--r-pill); background: rgba(255,210,154,.12); box-shadow: inset 0 0 0 1px rgba(255,210,154,.34); color: var(--brand-glow); font-size: var(--fs-small); font-weight: 600; }
.pk-price { display: flex; flex-direction: column; gap: 12px; }
.pk-price-n { font-family: var(--font-brand); font-weight: 500; font-size: clamp(44px, 7.3vw, 104px); line-height: .9; letter-spacing: var(--ls-hero); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-price-n.is-long { font-size: var(--fs-display); line-height: 1; letter-spacing: var(--ls-display); }
.pk-price-u { font-size: var(--fs-small); color: var(--on-dark-3); }
.pk-credits { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.pk-credits b { font-size: var(--fs-heading); font-weight: 600; letter-spacing: var(--ls-heading); font-variant-numeric: tabular-nums; }
.pk-credits span { font-size: var(--fs-ui); color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.pk-mix-bar { display: flex; gap: 3px; height: 10px; border-radius: var(--r-pill); overflow: hidden; background: rgba(255,255,255,.08); transform-origin: left center; }
.pk-mix-bar i { flex: var(--f) 1 0; min-width: 4px; }
.pk-mix-base { background: linear-gradient(90deg, #0d5bb5, #4d9cf0); }
.pk-mix-bonus { background: linear-gradient(90deg, #e19136, #ffd29a); }
.pk-mix-key { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: var(--fs-small); color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.pk-mix-key span { display: inline-flex; align-items: center; gap: 8px; }
.pk-mix-key i { width: 8px; height: 8px; border-radius: 2px; }
.pk-mix-key .k-base { background: #4d9cf0; }
.pk-mix-key .k-bonus { background: #ffd29a; }
.pk-launch { max-width: 48ch; padding-top: 20px; border-top: 1px solid var(--night-edge); font-size: var(--fs-ui); line-height: var(--lh-desc); color: var(--on-dark-2); }
.pk-launch b { color: #fff; font-weight: 600; }
.pk-go-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: auto; padding-top: 6px; }
.pk-go-note { font-size: var(--fs-small); color: var(--on-dark-3); }
.pk .btn .arrow { width: 18px; height: 18px; flex: none; }
.pk-buys-h { font-size: var(--fs-heading); font-weight: 500; letter-spacing: var(--ls-heading); }
.pk-depths { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pk-depth { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name n" "meter meter"; align-items: end; gap: 14px 24px; padding: 22px 0; border-top: 1px solid var(--night-edge); }
.pk-depth:last-child { border-bottom: 1px solid var(--night-edge); }
.pk-d-name { grid-area: name; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pk-d-name b { font-size: var(--fs-row); font-weight: 600; }
.pk-d-name span { font-size: var(--fs-small); color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.pk-d-n { grid-area: n; display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
.pk-d-n b { font-family: var(--font-brand); font-weight: 500; font-size: var(--fs-title); line-height: 1; letter-spacing: var(--ls-title); font-variant-numeric: tabular-nums; }
.pk-d-n span { font-size: var(--fs-small); color: var(--on-dark-2); }
.pk-d-meter { grid-area: meter; display: block; height: 6px; border-radius: var(--r-pill); background: rgba(255,255,255,.08); overflow: hidden; }
.pk-d-meter i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4d9cf0, #ffd29a); transform-origin: left center; }
.pk-buys-note { max-width: 60ch; margin-top: auto !important; font-size: var(--fs-small); line-height: var(--lh-desc); color: var(--on-dark-3); }
/* Variants: the rail as a list (checkout "Change pack") and the covers as three figures on paper */
.pk-rail--list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pk-rail--list .pk-opt, .pk-rail--list .pk-opt:has(input:checked) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head price" "credits price"; align-items: center; gap: 2px 16px; margin: 0; padding: 12px 16px; border-radius: var(--r-lg); }
.pk-rail--list .pk-opt-head { grid-area: head; justify-content: flex-start; }
.pk-rail--list .pk-opt-price, .pk-rail--list.is-krw .pk-opt-price { grid-area: price; margin: 0; font-size: var(--fs-heading); letter-spacing: var(--ls-heading); }
.pk-rail--list .pk-opt-credits { grid-area: credits; }
.pk-rail--list .pk-opt:has(input:checked)::before, .pk-rail--list .pk-opt:has(input:checked)::after { display: none; }
.pk-depths.is-compact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pk-depths.is-compact .pk-depth { grid-template-columns: minmax(0, 1fr); grid-template-areas: "n" "name"; align-items: start; gap: 6px; padding: 14px 16px 4px 0; border-top: 1px solid var(--hairline-strong); border-bottom: 0; }
.pk-depths.is-compact .pk-depth + .pk-depth { padding-left: 16px; border-left: 1px solid var(--hairline); }
.pk-depths.is-compact .pk-d-n { justify-content: flex-start; }
.pk-depths.is-compact .pk-d-n b { font-size: var(--fs-heading); letter-spacing: var(--ls-heading); }
/* The one motion: answering a pack change */
@media (prefers-reduced-motion: no-preference) {
  .pk-stage.is-swap .pk-price-n, .pk-stage.is-swap .pk-d-n b, .pk-stage.is-swap .pk-credits b { animation: pk-num var(--d-4) var(--ease-out) both; }
  .pk-stage.is-swap .pk-d-meter i, .pk-stage.is-swap .pk-mix-bar { animation: pk-grow var(--d-5) var(--ease-out) both; }
}
@keyframes pk-num { from { opacity: .2; transform: translateY(10px); } }
@keyframes pk-grow { from { transform: scaleX(.04); } }

/* What every account gets */
.pk-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: clamp(36px, 3.2vw, 56px) 0 0; padding: 0; list-style: none; }
.pk-offers li { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 18px; padding: 24px 0; border-top: 1px solid var(--hairline-strong); }
.pk-offers b { display: block; margin-bottom: 4px; font-size: var(--fs-row); font-weight: 600; line-height: var(--lh-row); }
.pk-offers li > span:last-child > span { display: block; max-width: 64ch; font-size: var(--fs-desc); line-height: var(--lh-desc); color: var(--ink-2); }
.pk-offer-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid transparent; color: var(--accent-ink);
  background: linear-gradient(var(--raised), var(--surface)) padding-box, linear-gradient(135deg, rgba(18,117,216,.42), rgba(20,20,19,.08) 50%, rgba(225,145,54,.5)) border-box; box-shadow: 0 6px 14px -10px rgba(11,24,48,.35); }
.pk-offer-ic.is-amber { color: var(--brand-orange-deep); }
.pk-offer-ic svg { width: 20px; height: 20px; }

/* Full table, folded */
.pk-table { border-top: 1px solid var(--hairline-strong); border-bottom: 1px solid var(--hairline-strong); }
.pk-table summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 12px 4px; list-style: none; cursor: pointer; font-size: var(--fs-row); font-weight: 500; border-radius: var(--r-sm); }
.pk-table summary::-webkit-details-marker { display: none; }
.pk-table summary::after { content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--sunken) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141413' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform var(--d-4) var(--ease-out), background-color var(--d-3); }
.pk-table summary:hover::after { background-color: var(--sunken-2); }
.pk-table[open] summary::after { transform: rotate(45deg); }
.pk-table summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pk-table-scroll { overflow-x: auto; margin: 0 0 24px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--hairline); background: var(--raised); }
.pk-table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pk-table table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: var(--fs-ui); font-variant-numeric: tabular-nums; }
.pk-table th, .pk-table td { padding: 15px 18px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--hairline); }
.pk-table tbody tr:last-child > * { border-bottom: 0; }
.pk-table th:first-child { text-align: left; }
.pk-table thead th { font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); background: var(--sunken); }
.pk-table thead th span { color: var(--ink-3); font-weight: 500; }
.pk-table tbody th { font-weight: 600; }
.pk-table tr.is-current > * { background: var(--accent-tint); }
.pk-table tr.is-current th { color: var(--accent-ink); }

/* Fine print: two measured columns */
.pk-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 48px; margin-top: 28px; font-size: var(--fs-small); line-height: var(--lh-desc); color: var(--ink-2); }
.pk-foot p { max-width: 75ch; }
.pk-foot a:not(.pk-more) { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.pk-foot--landing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.pk-foot-text { display: flex; flex-direction: column; gap: 6px; }
.pk-more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--fs-ui); font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.pk-more .arrow { width: 16px; height: 16px; transition: transform var(--d-3) var(--ease-out); }
.pk-more:hover .arrow { transform: translateX(3px); }
.pk-landing-row .pk-offers { margin-top: clamp(32px, 3vw, 48px); }

@media (max-width: 1100px) {
  .pk-stage { grid-template-columns: minmax(0, 1fr); }
  .pk-buys { border-left: 0; border-top: 1px solid var(--night-edge); }
  .pk-opt { padding-inline: 16px; }
}
@media (max-width: 760px) {
  .pk-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .pk-rail { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
  .pk-opt, .pk-opt:has(input:checked) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head price" "credits price"; align-items: center; gap: 2px 16px; margin: 0; padding: 14px 18px; border-radius: var(--r-lg); }
  .pk-opt-head { grid-area: head; justify-content: flex-start; }
  .pk-opt-price { grid-area: price; margin: 0; font-size: var(--fs-heading); letter-spacing: var(--ls-heading); }
  .pk-rail.is-krw .pk-opt-price { font-size: var(--fs-heading); }
  .pk-opt-credits { grid-area: credits; }
  .pk-opt:has(input:checked)::before, .pk-opt:has(input:checked)::after { display: none; }
  .pk-stage, .pk-stage[data-at] { border-radius: var(--r-xl); }
  .pk-main, .pk-buys { gap: 18px; padding: 24px 20px; }
  .pk-depth { padding: 16px 0; }
  .pk-offers, .pk-foot { grid-template-columns: minmax(0, 1fr); }
}

