/* 18Cat Pure White Editorial Pricing (Light) + Obsidian Dark Mode Parity
   Zero inline styles, strict CSP, monochrome restraint + single brand violet accent */

html[data-theme] #plans.plans-section,
#plans.plans-section {
  --ps-bg: #ffffff;
  --ps-surface: #ffffff;
  --ps-surface-soft: #fafafa;
  --ps-surface-muted: #f4f4f5;
  --ps-border: #e4e4e7;
  --ps-border-hi: #d4d4d8;
  --ps-hairline: #ececf0;
  --ps-ink: #111114;
  --ps-sub: #3f3f46;
  --ps-muted: #71717a;
  --ps-faint: #a1a1aa;
  --ps-brand: #533afd;
  --ps-brand-hover: #442be8;
  --ps-violet: #533afd;
  --ps-violet-ink: #533afd;
  --ps-emerald: #10b981;
  --ps-active-bg: #18181b;
  --ps-active-ink: #ffffff;
  --ps-active-sub: rgba(255, 255, 255, 0.72);
  --ps-hover-fill: #f4f4f5;
  --ps-code-bg: #f4f4f5;
  --ps-code-border: #e4e4e7;
  --ps-feat-bg: #ffffff;
  --ps-feat-border: rgba(83, 58, 253, 0.42);
  --ps-feat-shadow: inset 0 2px 0 #533afd, 0 20px 44px -30px rgba(83, 58, 253, 0.22);
  --ps-summary-bg: #fafafa;
  --ps-summary-border: #e4e4e7;
  --ps-summary-shadow: 0 12px 32px -24px rgba(9, 9, 11, 0.10);
  --ps-choice-active-bg: rgba(83, 58, 253, 0.055);
  --ps-table-feat-head: #f7f5ff;
  --ps-table-feat-cell: #faf9ff;
  --ps-table-row-hover: #fafafa;
  --ps-bump-flash: #533afd;
  --ps-bump-peak: #111114;
  --ps-bump-down-flash: #52525b;
  --ps-line-flash: rgba(83, 58, 253, 0.09);
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(72px, 8vw, 112px) clamp(18px, 4vw, 36px);
  background: var(--ps-bg);
  color: var(--ps-ink);
  border-block: 1px solid #e9eaf2;
  font-family: "MiSans", "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Dark Mode: Seamless 18Cat Obsidian Parity */
html[data-theme="dark"] #plans.plans-section {
  --ps-bg: #05060a;
  --ps-surface: #0b0d14;
  --ps-surface-soft: #0e111a;
  --ps-surface-muted: #111420;
  --ps-border: rgba(255, 255, 255, 0.10);
  --ps-border-hi: rgba(255, 255, 255, 0.22);
  --ps-hairline: rgba(255, 255, 255, 0.08);
  --ps-ink: #f5f6fa;
  --ps-sub: #d6d9e4;
  --ps-muted: #9fa6ba;
  --ps-faint: #6c7388;
  --ps-violet: #7f68ff;
  --ps-violet-ink: #cfc5ff;
  --ps-active-bg: #f4f4f5;
  --ps-active-ink: #09090b;
  --ps-active-sub: #3f3f46;
  --ps-hover-fill: rgba(255, 255, 255, 0.07);
  --ps-code-bg: rgba(255, 255, 255, 0.06);
  --ps-code-border: rgba(255, 255, 255, 0.10);
  --ps-feat-bg: radial-gradient(125% 54% at 50% 0%, rgba(101, 77, 255, 0.20), transparent 68%), #0a0b14;
  --ps-feat-border: rgba(127, 104, 255, 0.48);
  --ps-feat-shadow: inset 0 1px 0 rgba(207, 197, 255, 0.24), 0 24px 56px -28px rgba(83, 58, 253, 0.36);
  --ps-summary-bg: linear-gradient(180deg, #10131e 0%, #0b0d15 100%);
  --ps-summary-border: rgba(255, 255, 255, 0.13);
  --ps-summary-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 28px 64px -32px rgba(0, 0, 0, 0.85);
  --ps-choice-active-bg: rgba(127, 104, 255, 0.12);
  --ps-table-feat-head: rgba(127, 104, 255, 0.10);
  --ps-table-feat-cell: rgba(127, 104, 255, 0.055);
  --ps-table-row-hover: rgba(255, 255, 255, 0.025);
  --ps-bump-flash: #dfd8ff;
  --ps-bump-peak: #ffffff;
  --ps-bump-down-flash: #c9cde0;
  --ps-line-flash: rgba(127, 104, 255, 0.16);
  border-block-color: rgba(255, 255, 255, 0.10);
}

/* Light mode stays pure crisp white; subtle architectural grid & glow only appear in Dark mode */
#plans .ps-bg-grid,
#plans .ps-bg-glow {
  display: none;
}

html[data-theme="dark"] #plans .ps-bg-grid {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 72% at 50% 24%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 72% at 50% 24%, #000 35%, transparent 100%);
}

html[data-theme="dark"] #plans .ps-bg-glow {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(66% 36% at 50% 0%, rgba(101, 77, 255, 0.22), transparent 72%);
}

#plans .ps-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
}

#plans :where(h2, h3, h4, p, ul, li) {
  margin: 0;
}

#plans button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

#plans button:focus-visible,
#plans .ps-tier:focus-visible,
#plans .ps-table-wrap:focus-visible {
  outline: 2px solid var(--ps-violet);
  outline-offset: 2px;
}

/* === Masthead & 01 / 02 / 03 Trust Strip === */
#plans .ps-masthead {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 44px;
}

#plans .ps-title {
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.035em;
  color: var(--ps-ink);
  text-wrap: balance;
}

#plans .ps-accent {
  display: inline-block;
  color: var(--ps-brand);
}

html[data-theme="dark"] #plans .ps-accent {
  color: var(--ps-violet-ink);
  background: linear-gradient(120deg, #9886ff 0%, #cfc5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#plans .ps-steps {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--ps-hairline);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  text-align: left;
}

#plans .ps-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#plans .ps-step-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--ps-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  flex: none;
}

#plans .ps-step-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#plans .ps-step-copy strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ps-ink);
  line-height: 1.4;
}

#plans .ps-step-copy span {
  font-size: 12.5px;
  color: var(--ps-muted);
  line-height: 1.5;
}

/* Mobile-only Tier & Compare Switchers (hidden on desktop) */
#plans .ps-mob-tier-tabs,
#plans .ps-mob-cmp-tabs,
#plans .ps-mob-pricebar {
  display: none;
}

/* === Layer 1: 3-Column Plan Tiers === */
#plans .ps-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

#plans .ps-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: 18px;
  padding: 28px 26px 24px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(9, 9, 11, 0.03);
  transition: border-color 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

#plans .ps-tier:hover {
  border-color: var(--ps-border-hi);
  transform: translateY(-2px);
}

#plans .ps-tier.is-featured {
  background: var(--ps-feat-bg);
  border-color: var(--ps-feat-border);
  box-shadow: var(--ps-feat-shadow);
}

#plans .ps-tier.is-selected {
  border-color: #18181b;
  box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.08), 0 16px 40px -26px rgba(9, 9, 11, 0.16);
}

#plans .ps-tier.is-featured.is-selected {
  border-color: var(--ps-brand);
  box-shadow: inset 0 2px 0 var(--ps-brand), 0 20px 48px -28px rgba(83, 58, 253, 0.28);
}

html[data-theme="dark"] #plans .ps-tier {
  box-shadow: none;
}

html[data-theme="dark"] #plans .ps-tier.is-selected,
html[data-theme="dark"] #plans .ps-tier.is-featured.is-selected {
  border-color: rgba(143, 122, 255, 0.82);
  box-shadow: 0 0 0 1px rgba(127, 104, 255, 0.32), 0 24px 56px -28px rgba(83, 58, 253, 0.42);
}

#plans .ps-tier-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
}

#plans .ps-tier-idx {
  font-size: 12px;
  font-weight: 600;
  color: var(--ps-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

#plans .ps-delivery {
  font-size: 12px;
  color: var(--ps-muted);
  white-space: nowrap;
}

#plans .ps-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--ps-border);
  background: var(--ps-surface-soft);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ps-sub);
  white-space: nowrap;
}

#plans .ps-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--ps-muted);
}

#plans .ps-pill-violet .ps-dot {
  background: var(--ps-violet);
}

#plans .ps-pill-emerald .ps-dot,
#plans .ps-dot-emerald {
  background: var(--ps-emerald);
}

#plans .ps-tier-name {
  margin-top: 16px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ps-ink);
  line-height: 1.3;
}

#plans .ps-tier-pos {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ps-muted);
  min-height: 44px;
}

#plans .ps-tier-price {
  margin-top: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ps-hairline);
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

#plans .ps-tier-price strong {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ps-ink);
}

#plans .ps-tier-price small {
  font-size: 20px;
  font-weight: 500;
  margin-right: 2px;
  color: var(--ps-sub);
}

#plans .ps-tier-price span {
  font-size: 13px;
  color: var(--ps-muted);
}

#plans .ps-tier-list {
  list-style: none;
  padding: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

#plans .ps-tier-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--ps-sub);
}

#plans .ps-bullet-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 22px;
  flex: none;
  color: var(--ps-muted);
}

#plans .ps-tier.is-featured .ps-bullet-ico {
  color: var(--ps-violet-ink);
}

#plans .ps-bullet-text {
  flex: 1;
  min-width: 0;
}

#plans .ps-bullet-text strong {
  font-weight: 600;
  color: var(--ps-ink);
}

#plans .ps-bullet-text code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--ps-code-bg);
  border: 1px solid var(--ps-code-border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--ps-sub);
}

#plans .ps-tier-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--ps-hairline);
}

#plans .ps-tier-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ps-muted);
  margin-bottom: 14px;
}

#plans .ps-tier-btn {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--ps-border-hi);
  background: var(--ps-surface);
  color: var(--ps-ink);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#plans .ps-tier-btn:hover {
  background: var(--ps-hover-fill);
  border-color: var(--ps-ink);
}

html[data-theme="dark"] #plans .ps-tier-btn {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] #plans .ps-tier-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.28);
}

#plans .ps-tier-btn.is-primary {
  background: var(--ps-brand);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 10px 24px -12px rgba(83, 58, 253, 0.55);
}

#plans .ps-tier-btn.is-primary:hover {
  background: var(--ps-brand-hover);
  border-color: transparent;
}

/* === Shared Always-Included Flat Hairline Strip === */
#plans .ps-shared {
  margin-top: 24px;
  padding: 16px 0;
  border-block: 1px solid var(--ps-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}

#plans .ps-shared-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ps-ink);
  white-space: nowrap;
}

html[data-theme="dark"] #plans .ps-shared-label {
  color: var(--ps-violet-ink);
}

#plans .ps-shared-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 12.5px;
  color: var(--ps-muted);
}

#plans .ps-shared-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#plans .ps-shared-list li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ps-faint);
}

/* === Layer 2: 3-Tab Progressive Workbench === */
#plans .ps-workbench {
  margin-top: 52px;
}

#plans .ps-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

#plans .ps-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--ps-surface-muted);
  border: 1px solid var(--ps-border);
}

#plans .ps-tab {
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ps-muted);
  transition: background-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

#plans .ps-tab:hover {
  color: var(--ps-ink);
}

#plans .ps-tab.is-active {
  background: var(--ps-active-bg);
  color: var(--ps-active-ink);
  font-weight: 600;
}

#plans .ps-panel[hidden] {
  display: none;
}

/* === Tab 1: Calculator (Flat Hairline Left + Clean Sticky Summary Right) === */
#plans .ps-calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 0.92fr);
  gap: 44px;
  align-items: start;
}

#plans .ps-config {
  border-top: 1px solid var(--ps-hairline);
}

#plans .ps-group {
  padding: 22px 0;
  border-bottom: 1px solid var(--ps-hairline);
}

#plans .ps-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  margin-bottom: 14px;
}

#plans .ps-group-head h3,
#plans .ps-group-inline h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ps-ink);
}

#plans .ps-group-head span,
#plans .ps-group-copy p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ps-muted);
}

#plans .ps-group-inline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

#plans .ps-group-inline em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ps-violet-ink);
  font-variant-numeric: tabular-nums;
}

#plans .ps-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#plans .ps-group-copy {
  min-width: 0;
  flex: 1;
}

#plans .ps-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ps-border-hi);
  border-radius: 10px;
  background: var(--ps-surface);
  overflow: hidden;
  flex: none;
}

#plans .ps-stepper button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ps-ink);
  transition: background-color 0.16s ease, opacity 0.16s ease;
}

#plans .ps-stepper button:hover:not(:disabled) {
  background: var(--ps-hover-fill);
}

#plans .ps-stepper button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#plans .ps-stepper-val {
  min-width: 74px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-ink);
  font-variant-numeric: tabular-nums;
  border-inline: 1px solid var(--ps-hairline);
  padding: 0 8px;
}

#plans .ps-stepper-val small {
  font-size: 12px;
  font-weight: 400;
  color: var(--ps-muted);
}

#plans .ps-seg {
  display: grid;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: var(--ps-surface-muted);
  border: 1px solid var(--ps-border);
}

#plans .ps-seg-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#plans .ps-seg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 9px;
  text-align: center;
  transition: background-color 0.16s ease, color 0.16s ease;
}

#plans .ps-seg-btn strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-sub);
  font-variant-numeric: tabular-nums;
}

#plans .ps-seg-btn span {
  font-size: 11.5px;
  color: var(--ps-muted);
  font-variant-numeric: tabular-nums;
}

#plans .ps-seg-btn:hover {
  background: var(--ps-hover-fill);
}

#plans .ps-seg-btn.is-active {
  background: var(--ps-active-bg);
}

#plans .ps-seg-btn.is-active strong {
  color: var(--ps-active-ink);
}

#plans .ps-seg-btn.is-active span {
  color: var(--ps-active-sub);
}

#plans .ps-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#plans .ps-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--ps-border);
  background: var(--ps-surface);
  text-align: left;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

#plans .ps-choice-btn:hover {
  border-color: var(--ps-border-hi);
  background: var(--ps-surface-soft);
}

#plans .ps-choice-btn.is-active {
  border-color: var(--ps-violet);
  background: var(--ps-choice-active-bg);
}

#plans .ps-choice-top {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

#plans .ps-choice-top strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-ink);
}

#plans .ps-choice-top em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ps-violet-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#plans .ps-choice-sub {
  font-size: 12px;
  color: var(--ps-muted);
}

#plans .ps-checks {
  display: flex;
  flex-direction: column;
}

#plans .ps-check-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ps-hairline);
  cursor: pointer;
}

#plans .ps-check-row:last-child {
  border-bottom: 0;
}

#plans .ps-check-row input {
  position: absolute;
  opacity: 0;
  width: 18px;
  height: 18px;
  margin: 0;
}

#plans .ps-check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--ps-border-hi);
  background: var(--ps-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

#plans .ps-check-row input:checked + .ps-check-box {
  background: var(--ps-active-bg);
  border-color: var(--ps-active-bg);
  color: var(--ps-active-ink);
}

#plans .ps-check-row input:focus-visible + .ps-check-box {
  outline: 2px solid var(--ps-violet);
  outline-offset: 2px;
}

#plans .ps-check-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#plans .ps-check-body strong {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ps-ink);
}

#plans .ps-check-body small {
  font-size: 12px;
  color: var(--ps-muted);
}

#plans .ps-check-price {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ps-sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#plans .ps-mail-sub {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ps-hairline);
}

#plans .ps-mail-sub-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ps-sub);
  margin-bottom: 10px;
}

/* Sticky Clean Summary Receipt Card */
#plans .ps-summary {
  position: sticky;
  top: 96px;
  border-radius: 18px;
  background: var(--ps-summary-bg);
  border: 1px solid var(--ps-summary-border);
  padding: 26px;
  box-shadow: var(--ps-summary-shadow);
}

#plans .ps-sum-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ps-hairline);
}

#plans .ps-sum-plan {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

#plans .ps-sum-plan h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ps-ink);
}

#plans .ps-sum-pages {
  font-size: 12.5px;
  color: var(--ps-muted);
  font-variant-numeric: tabular-nums;
}

#plans .ps-sum-hero {
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--ps-hairline);
}

#plans .ps-sum-label {
  display: block;
  font-size: 12.5px;
  color: var(--ps-muted);
}

#plans .ps-sum-total {
  margin-top: 6px;
  font-size: clamp(32px, 3.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ps-ink);
  font-variant-numeric: tabular-nums;
}

#plans .ps-sum-total small {
  font-size: 20px;
  font-weight: 500;
  color: var(--ps-sub);
  margin-right: 2px;
}

#plans .ps-sum-deposit {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ps-muted);
}

#plans .ps-sum-deposit strong {
  color: var(--ps-violet-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#plans .ps-sum-lines {
  list-style: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--ps-hairline);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

#plans .ps-sum-lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ps-sub);
  border-radius: 6px;
  padding: 2px 6px;
  margin-inline: -6px;
  transition: opacity 0.18s ease;
}

#plans .ps-sum-lines li strong {
  font-weight: 500;
  color: var(--ps-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#plans .ps-sum-lines li.is-zero {
  opacity: 0.42;
}

#plans .ps-sum-renew {
  padding: 16px 0;
  border-bottom: 1px solid var(--ps-hairline);
}

#plans .ps-sum-renew-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ps-muted);
}

#plans .ps-renew-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--ps-border);
  background: var(--ps-surface);
  color: var(--ps-sub);
}

#plans .ps-sum-renew-val {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ps-ink);
  font-variant-numeric: tabular-nums;
}

#plans .ps-sum-renew-val small {
  font-size: 13px;
  font-weight: 400;
  color: var(--ps-muted);
}

#plans .ps-sum-renew-detail {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ps-muted);
}

#plans .ps-sum-pledge {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ps-muted);
}

#plans .ps-sum-pledge strong {
  color: var(--ps-sub);
  font-weight: 600;
}

#plans .ps-sum-actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#plans .ps-cta-primary {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--ps-brand);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px -12px rgba(83, 58, 253, 0.62);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

#plans .ps-cta-primary:hover {
  background: var(--ps-brand-hover);
  transform: translateY(-1px);
}

#plans .ps-cta-secondary {
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--ps-border-hi);
  background: var(--ps-surface);
  color: var(--ps-sub);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

#plans .ps-cta-secondary:hover {
  background: var(--ps-hover-fill);
  border-color: var(--ps-ink);
  color: var(--ps-ink);
}

/* === Tactile Number Motion (GPU-only transform/opacity, zero layout shift) === */
#plans .ps-sum-total,
#plans .ps-sum-deposit strong,
#plans .ps-sum-renew-val,
#plans .ps-sum-pages,
#plans .ps-stepper-val,
#plans .ps-sum-lines li strong,
#plans .ps-mob-price-val {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

#plans .ps-sum-total,
#plans .ps-sum-renew-val {
  display: block;
  transform-origin: left center;
}

@keyframes psBumpUp {
  0% { transform: translate3d(0, 5px, 0) scale(0.985); color: var(--ps-bump-flash); }
  45% { transform: translate3d(0, -1.5px, 0) scale(1.018); color: var(--ps-bump-peak); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes psBumpDown {
  0% { transform: translate3d(0, -4px, 0) scale(0.99); color: var(--ps-bump-down-flash); }
  55% { transform: translate3d(0, 1px, 0) scale(0.996); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes psTickUp {
  0% { opacity: 0.35; transform: translate3d(0, 6px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes psTickDown {
  0% { opacity: 0.35; transform: translate3d(0, -6px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes psLineEnter {
  0% { background-color: var(--ps-line-flash); transform: translate3d(0, 3px, 0); }
  100% { background-color: transparent; transform: translate3d(0, 0, 0); }
}

#plans .ps-bump-up {
  animation: psBumpUp 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

#plans .ps-bump-down {
  animation: psBumpDown 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

#plans .ps-tick-up {
  animation: psTickUp 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

#plans .ps-tick-down {
  animation: psTickDown 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

#plans .ps-sum-lines li.ps-line-enter {
  animation: psLineEnter 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

/* === Tab 2: 14-Row Full Comparison Table === */
#plans .ps-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--ps-border);
  background: var(--ps-surface);
  scrollbar-width: thin;
}

#plans .ps-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

#plans .ps-table thead th {
  padding: 18px 20px;
  border-bottom: 1px solid var(--ps-border);
  background: var(--ps-surface-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-muted);
  vertical-align: bottom;
}

#plans .ps-table thead th:first-child {
  width: 22%;
}

#plans .ps-table thead th span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-ink);
}

#plans .ps-table thead th strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ps-violet-ink);
  font-variant-numeric: tabular-nums;
}

#plans .ps-table thead th.is-featured {
  background: var(--ps-table-feat-head);
  box-shadow: inset 0 2px 0 var(--ps-violet);
}

#plans .ps-table th + th,
#plans .ps-table tbody td {
  border-inline-start: 1px solid var(--ps-hairline);
}

#plans .ps-table tbody tr {
  border-top: 1px solid var(--ps-hairline);
  transition: background-color 0.15s ease;
}

#plans .ps-table tbody tr:hover {
  background: var(--ps-table-row-hover);
}

#plans .ps-table tbody th {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-ink);
  vertical-align: top;
}

#plans .ps-table tbody td {
  padding: 14px 20px;
  font-size: 13px;
  line-height: 1.58;
  color: var(--ps-sub);
  vertical-align: top;
}

#plans .ps-table tbody td.is-featured {
  background: var(--ps-table-feat-cell);
  color: var(--ps-ink);
}

/* === Tab 3: Add-ons & Transparent Renewals (Flat Hairline Grammar) === */
#plans .ps-subhead {
  margin-bottom: 18px;
}

#plans .ps-subhead h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ps-ink);
  letter-spacing: -0.02em;
}

#plans .ps-subhead p {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ps-muted);
}

#plans .ps-addons-list {
  border-top: 1px solid var(--ps-hairline);
}

#plans .ps-addon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--ps-hairline);
}

#plans .ps-addon-main {
  flex: 1;
  min-width: 0;
}

#plans .ps-addon-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}

#plans .ps-addon-head h4 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ps-ink);
}

#plans .ps-addon-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-violet-ink);
  font-variant-numeric: tabular-nums;
}

#plans .ps-addon-main p {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--ps-muted);
  max-width: 720px;
}

#plans .ps-addon-act {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--ps-border-hi);
  background: var(--ps-surface);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ps-ink);
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

#plans .ps-addon-act:hover {
  background: var(--ps-hover-fill);
  border-color: var(--ps-ink);
}

#plans .ps-renewal-section {
  margin-top: 44px;
}

#plans .ps-cap-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-block: 1px solid var(--ps-hairline);
}

#plans .ps-cap-item {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#plans .ps-cap-item:first-child {
  padding-inline-start: 0;
}

#plans .ps-cap-item:last-child {
  padding-inline-end: 0;
}

#plans .ps-cap-item + .ps-cap-item {
  border-inline-start: 1px solid var(--ps-hairline);
}

#plans .ps-cap-name {
  font-size: 12px;
  color: var(--ps-muted);
}

#plans .ps-cap-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--ps-ink);
  font-variant-numeric: tabular-nums;
}

#plans .ps-cap-item p {
  font-size: 12px;
  line-height: 1.55;
  color: var(--ps-muted);
}

#plans .ps-valve {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--ps-border);
  background: var(--ps-surface-soft);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ps-sub);
}

#plans .ps-valve strong {
  color: var(--ps-ink);
  font-weight: 600;
}

#plans .ps-pledge-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

#plans .ps-pledge-col strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-ink);
  margin-bottom: 6px;
}

#plans .ps-pledge-col p {
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--ps-muted);
}

/* === Subtle Monochrome Toast === */
#plans .ps-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  padding: 10px 18px;
  border-radius: 999px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f4f4f5;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 10px, 0);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

#plans .ps-toast.is-open {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

/* === Responsive Breakpoints === */
@media (max-width: 1024px) {
  #plans .ps-tiers {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin-inline: auto;
  }
  #plans .ps-tier-pos {
    min-height: 0;
  }
  #plans .ps-calc-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  #plans .ps-summary {
    position: static;
  }
  #plans .ps-cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #plans .ps-cap-item {
    padding: 16px 14px;
    border-inline-start: 0 !important;
    border-top: 1px solid var(--ps-hairline);
  }
  #plans .ps-cap-item:nth-child(-n+2) {
    border-top: 0;
  }
  #plans .ps-cap-item:nth-child(even) {
    border-inline-start: 1px solid var(--ps-hairline) !important;
  }
}

/* === Mobile Dedicated Ergonomics (<= 720px) === */
@media (max-width: 720px) {
  html[data-theme] #plans.plans-section,
  #plans.plans-section {
    padding: 56px 16px 88px;
  }

  #plans .ps-masthead {
    margin-bottom: 26px;
    text-align: left;
  }

  #plans .ps-steps {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
  }

  /* Mobile 3-tier segmented bar + single focused card (zero 4-screen scroll) */
  #plans .ps-mob-tier-tabs,
  #plans .ps-mob-cmp-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: var(--ps-surface-muted);
    border: 1px solid var(--ps-border);
  }

  #plans .ps-mob-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 46px;
    padding: 6px 4px;
    border-radius: 10px;
    text-align: center;
    transition: background-color 0.16s ease, color 0.16s ease;
  }

  #plans .ps-mob-tab strong {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ps-sub);
    line-height: 1.25;
  }

  #plans .ps-mob-tab span {
    font-size: 11px;
    font-weight: 500;
    color: var(--ps-muted);
    font-variant-numeric: tabular-nums;
  }

  #plans .ps-mob-tab.is-active {
    background: var(--ps-active-bg);
  }

  #plans .ps-mob-tab.is-active strong {
    color: var(--ps-active-ink);
  }

  #plans .ps-mob-tab.is-active span {
    color: var(--ps-active-sub);
  }

  #plans .ps-tiers[data-active-plan="lite"] .ps-tier:not([data-ps-plan="lite"]),
  #plans .ps-tiers[data-active-plan="standard"] .ps-tier:not([data-ps-plan="standard"]),
  #plans .ps-tiers[data-active-plan="flagship"] .ps-tier:not([data-ps-plan="flagship"]) {
    display: none;
  }

  #plans .ps-tier {
    padding: 22px 20px 20px;
    border-radius: 16px;
  }

  #plans .ps-tier:hover {
    transform: none;
  }

  #plans .ps-tier-price strong {
    font-size: 36px;
  }

  #plans .ps-shared {
    margin-top: 18px;
    padding: 14px 0;
    gap: 8px;
  }

  #plans .ps-workbench {
    margin-top: 36px;
  }

  #plans .ps-tabs-wrap {
    margin-bottom: 18px;
  }

  #plans .ps-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 14px;
  }

  #plans .ps-tab {
    height: 40px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 12.5px;
    text-align: center;
  }

  /* Mobile Sticky Live Price Strip inside Calculator (clears floating header cleanly, 100% opaque) */
  #plans .ps-mob-pricebar {
    position: sticky;
    top: 86px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #d4d4d8;
    background: #ffffff;
    box-shadow: 0 10px 26px -10px rgba(9, 9, 11, 0.14), 0 2px 6px rgba(9, 9, 11, 0.04);
  }

  html[data-theme="dark"] #plans .ps-mob-pricebar {
    background: #12141e;
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.78);
  }

  #plans .ps-mob-price-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }

  #plans .ps-mob-price-meta {
    font-size: 11.5px;
    color: var(--ps-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #plans .ps-mob-price-val {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ps-ink);
    line-height: 1.15;
  }

  #plans .ps-mob-jump-btn {
    flex: none;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--ps-brand);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
  }

  #plans .ps-stepper-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  #plans .ps-stepper {
    width: 100%;
    justify-content: space-between;
  }

  #plans .ps-stepper button {
    width: 48px;
    height: 44px;
    font-size: 18px;
  }

  #plans .ps-stepper-val {
    flex: 1;
    line-height: 44px;
  }

  #plans .ps-choices {
    grid-template-columns: 1fr;
  }

  #plans .ps-choice-btn {
    min-height: 54px;
    padding: 13px 14px;
  }

  #plans .ps-seg-3 {
    grid-template-columns: 1fr;
  }

  #plans .ps-seg-btn {
    min-height: 44px;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 14px;
  }

  #plans .ps-check-row {
    min-height: 48px;
  }

  #plans .ps-summary {
    padding: 20px 18px;
    border-radius: 16px;
  }

  /* Mobile 1-Column Comparison Matrix (Zero horizontal overflow or clipping) */
  #plans .ps-table-wrap {
    overflow-x: visible;
    border-radius: 14px;
  }

  #plans .ps-table {
    min-width: 0;
    width: 100%;
  }

  #plans .ps-table thead th:first-child {
    width: 38%;
  }

  #plans .ps-table thead th,
  #plans .ps-table tbody th,
  #plans .ps-table tbody td {
    padding: 12px 13px;
    font-size: 12.5px;
  }

  #plans .ps-table-wrap[data-mob-col="1"] .ps-table th:nth-child(3),
  #plans .ps-table-wrap[data-mob-col="1"] .ps-table th:nth-child(4),
  #plans .ps-table-wrap[data-mob-col="1"] .ps-table td:nth-child(3),
  #plans .ps-table-wrap[data-mob-col="1"] .ps-table td:nth-child(4),
  #plans .ps-table-wrap[data-mob-col="2"] .ps-table th:nth-child(2),
  #plans .ps-table-wrap[data-mob-col="2"] .ps-table th:nth-child(4),
  #plans .ps-table-wrap[data-mob-col="2"] .ps-table td:nth-child(2),
  #plans .ps-table-wrap[data-mob-col="2"] .ps-table td:nth-child(4),
  #plans .ps-table-wrap[data-mob-col="3"] .ps-table th:nth-child(2),
  #plans .ps-table-wrap[data-mob-col="3"] .ps-table th:nth-child(3),
  #plans .ps-table-wrap[data-mob-col="3"] .ps-table td:nth-child(2),
  #plans .ps-table-wrap[data-mob-col="3"] .ps-table td:nth-child(3) {
    display: none;
  }

  #plans .ps-addon-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  #plans .ps-addon-act {
    height: 40px;
  }

  #plans .ps-cap-grid,
  #plans .ps-pledge-grid {
    grid-template-columns: 1fr;
  }

  #plans .ps-cap-item {
    padding: 14px 0 !important;
    border-inline-start: 0 !important;
    border-top: 1px solid var(--ps-hairline) !important;
  }

  #plans .ps-cap-item:first-child {
    border-top: 0 !important;
  }

  #plans .ps-toast {
    bottom: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #plans .ps-tier,
  #plans .ps-toast,
  #plans .ps-bump-up,
  #plans .ps-bump-down,
  #plans .ps-tick-up,
  #plans .ps-tick-down,
  #plans .ps-line-enter {
    transition: none;
    animation: none;
  }
}
