/* 2026-12-02: Pricing page — plan cards, custom setup band, comparison, start steps, FAQ. */

/* Plan cards. Rows line up across cards through subgrid where supported. */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rp-gap);
}
.plan-card {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: clamp(22px, 2vw, 30px);
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1081px) {
    .plan-grid { grid-template-rows: repeat(6, auto); }
    .plan-card { grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
  }
}
.plan-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: start;
  gap: 6px 12px;
}
.plan-head h3 {
  font-size: clamp(21px, 1.75vw, 26px);
  font-weight: 680;
  letter-spacing: -.04em;
  line-height: 1.25;
}
.plan-for {
  grid-column: 1 / -1;
  color: var(--rp-card-muted);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}
/* Bottom-aligned so the notes and buttons line up whether the price is "₩0" or a phrase. */
.plan-price {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: clamp(28px, 3vw, 46px);
}
.price-value {
  font-size: clamp(38px, 3.3vw, 48px);
  font-weight: 680;
  letter-spacing: -.045em;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}
.price-value--text {
  font-size: clamp(25px, 2.05vw, 30px);
  letter-spacing: -.04em;
  line-height: 1.2;
}
.price-note {
  margin-top: 9px;
  color: var(--rp-card-muted);
  font-size: 14px;
  line-height: 1.5;
  text-wrap: pretty;
}
.plan-cta { padding-top: 22px; }
.plan-cta > :is(a, span) { display: flex; width: 100%; }
.plan-lead-in {
  padding-block: 28px 8px;
  border-bottom: 1px solid var(--rp-card-rule);
  color: var(--rp-card-muted);
  font-size: 13px;
  font-weight: 680;
  letter-spacing: -.005em;
}
.plan-features li {
  position: relative;
  padding: 11px 0 11px 27px;
  border-bottom: 1px solid var(--rp-card-rule);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -.012em;
}
.plan-features li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  inset-block-start: calc(11px + .75em - 8px);
  width: 5px;
  height: 10px;
  border: solid var(--product-text);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.plan-stat {
  align-self: end;
  padding-top: 24px;
  color: var(--rp-card-ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.02em;
}

/* Custom setup: a full-width plan band under the three cards. */
.plan-custom {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 28px clamp(28px, 4.4vw, 72px);
  margin-top: var(--rp-gap);
  padding: clamp(24px, 2.6vw, 40px);
}
.plan-custom-main { display: grid; align-content: start; }
.plan-custom .plan-cta { padding-top: 24px; }
.plan-custom .plan-cta > a { display: inline-flex; width: auto; max-width: 100%; }
.plan-custom .plan-lead-in { padding-top: 0; }
.plan-features--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}
.plan-footnote {
  max-width: none; /* 2026-12-04: use the card column width (62em wrapped it well short of the cards) */
  margin-top: 18px;
  color: var(--rp-muted);
  font-size: 13px;
  line-height: 1.65;
  text-wrap: pretty;
}

/* Comparison table */
.compare-frame { margin-top: 30px; }
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 14.5px;
}
.compare-table :is(th, td) { padding: 15px 10px; border-bottom: 1px solid var(--rp-rule); vertical-align: middle; }
.compare-table thead :is(th, td) {
  position: sticky;
  z-index: 2;
  inset-block-start: var(--site-header-height, 0px);
  padding-block: 14px 13px;
  border-bottom-color: #aeb2a9;
  background: var(--paper);
}
.compare-corner { width: 36%; }
.compare-table thead th {
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -.035em;
  line-height: 1.3;
  text-align: center;
}
.compare-table thead th span {
  display: block;
  margin-top: 3px;
  color: var(--rp-muted);
  font-size: 12.5px;
  font-weight: 520;
  letter-spacing: -.005em;
}
.compare-group > * { padding-block: 34px 10px; }
.compare-group th {
  padding-inline: 2px;
  color: var(--rp-ink);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: .01em;
  text-align: start;
  white-space: nowrap;
}
.compare-table tbody:first-of-type .compare-group > * { padding-top: 22px; }
.compare-table tbody th[scope="row"] {
  padding-inline: 2px 18px;
  color: var(--rp-ink);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -.02em;
  line-height: 1.45;
  text-align: start;
}
.compare-table tbody th[scope="row"] span {
  display: block;
  margin-top: 2px;
  color: var(--rp-muted);
  font-size: 13px;
  font-weight: 450;
  letter-spacing: -.01em;
}
.compare-table td {
  color: var(--rp-copy);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}
.compare-table tbody tr:not(.compare-group):hover > * { background: rgb(232 235 229 / .55); }
.compare-table .is-yes::before,
.compare-table .is-no::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
}
.compare-table .is-yes::before {
  width: 6px;
  height: 12px;
  margin-top: -4px;
  border: solid var(--product-text);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.compare-table .is-no::before { width: 13px; height: 1.5px; background: #a7aba3; }
.compare-switch { display: none; }

/* How paid plans start */
.start-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}
.start-steps li { padding-top: 16px; border-top: 1px solid var(--rp-ink); }
.step-no {
  display: block;
  color: var(--product-text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}
.start-steps h3 {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -.03em;
  line-height: 1.35;
}
.start-steps p {
  margin-top: 7px;
  color: var(--rp-copy);
  font-size: 14.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* FAQ on a white band, like the handbook's FAQ chapter. */
.faq-band {
  margin-top: var(--rp-section-space);
  padding-block: clamp(56px, 7vw, 104px);
  background: #fff;
}
.faq-band + .rp-band { margin-top: 0; }
.faq {
  display: grid;
  grid-template-columns: minmax(0, .36fr) minmax(0, 1fr);
  gap: 28px clamp(32px, 5vw, 80px);
  align-items: start;
}
.faq-side h2 {
  font-size: clamp(25px, 2.2vw, 33px);
  font-weight: 660;
  letter-spacing: -.045em;
  line-height: 1.25;
}
.faq-side p { margin-top: 12px; color: var(--rp-copy); font-size: 15px; line-height: 1.65; }
.faq-side a { text-decoration: underline; text-underline-offset: 4px; }
.faq-list { border-top: 1px solid var(--rp-rule); }
.faq-item { border-bottom: 1px solid var(--rp-rule); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  padding: 19px 2px;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -.028em;
  line-height: 1.45;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-fold { flex: none; position: relative; width: 16px; height: 16px; color: var(--rp-muted); }
.faq-fold::before, .faq-fold::after { content: ""; position: absolute; background: currentColor; }
.faq-fold::before { width: 12px; height: 1.5px; inset: 7px auto auto 2px; }
.faq-fold::after { width: 1.5px; height: 12px; inset: 2px auto auto 7px; }
.faq-item[open] .faq-fold::after { display: none; }
.faq-item p {
  max-width: 46em;
  padding: 0 36px 22px 2px;
  color: var(--rp-copy);
  font-size: 16px;
  line-height: 1.68;
  text-wrap: pretty;
}

@media (max-width: 1080px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-card {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    column-gap: clamp(28px, 5vw, 56px);
  }
  .plan-card > :is(.plan-head, .plan-price, .plan-cta) { grid-column: 1; }
  .plan-card > .plan-lead-in { grid-column: 2; grid-row: 1; padding-top: 0; }
  .plan-card > .plan-features { grid-column: 2; grid-row: 2 / span 2; }
  .plan-card > .plan-stat { grid-column: 1; }
  .plan-price { padding-top: 26px; }
  .start-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 30px; }
}

@media (max-width: 900px) {
  .plan-custom { grid-template-columns: minmax(0, 1fr); }
  .faq { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .plan-card { grid-template-columns: minmax(0, 1fr); }
  .plan-card > :is(.plan-head, .plan-price, .plan-cta, .plan-lead-in, .plan-features, .plan-stat) {
    grid-column: 1;
    grid-row: auto;
  }
  .plan-card > .plan-lead-in { padding-top: 26px; }
  .plan-price { padding-top: 22px; }
  .plan-features--two { grid-template-columns: minmax(0, 1fr); }
  .plan-custom .plan-cta > a { display: flex; width: 100%; }

  /* Without the plan switcher the table scrolls inside its frame, never the page. */
  .compare-frame { overflow-x: auto; overscroll-behavior-inline: contain; }
  .compare-table { min-width: 640px; }
  .compare-switch:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-top: 22px;
    padding: 4px;
    border-radius: 12px;
    background: var(--rp-card);
  }
  .compare-switch button {
    min-height: 44px;
    padding: 6px 4px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--rp-card-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 620;
    line-height: 1.2;
    letter-spacing: -.02em;
    cursor: pointer;
  }
  .compare-switch button[aria-pressed="true"] {
    background: #fff;
    color: var(--rp-ink);
    box-shadow: 0 1px 2px rgb(32 34 31 / .12);
  }
  .compare[data-plan] .compare-frame { overflow: visible; }
  .compare[data-plan] .compare-table { min-width: 0; }
  .compare[data-plan] .compare-corner { width: 58%; }
  .compare[data-plan="free"] :is(.col-pro, .col-team, .col-custom),
  .compare[data-plan="pro"] :is(.col-free, .col-team, .col-custom),
  .compare[data-plan="team"] :is(.col-free, .col-pro, .col-custom),
  .compare[data-plan="custom"] :is(.col-free, .col-pro, .col-team) { display: none; }
  .compare-table tbody th[scope="row"] { font-size: 14.5px; padding-inline-end: 12px; }

  .start-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .start-steps li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    padding-block: 16px 18px;
    border-top-color: var(--rp-rule);
  }
  .start-steps li:first-child { border-top-color: var(--rp-ink); }
  .start-steps .step-no { grid-row: 1 / span 2; padding-top: 3px; }
  .start-steps h3 { margin-top: 0; }

  .faq-item summary { padding-block: 16px; font-size: 16px; }
  .faq-item p { padding-inline-end: 8px; font-size: 15px; }
}

@media (max-width: 420px) {
  .compare-switch:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 2026-12-02: group rows read as headings — a light accent band runs behind the whole row,
   with a transparent top border keeping the space above it. */
.compare-table .compare-group > * {
  padding-block: 13px;
  border-top: 18px solid transparent;
  background: rgb(214 230 218 / .62);
  background-clip: padding-box;
}
.compare-table tbody:first-of-type .compare-group > * { padding-top: 13px; border-top-width: 8px; }
.compare-table .compare-group th {
  padding-inline: 12px 2px;
  color: #1f4a2f;
  font-size: 15px;
  font-weight: 740;
  letter-spacing: -.01em;
}

/* 2026-12-02: plan cards share the achromatic face and light depth of the guide cards. Each plan gets
   only a faint colour edge: Essential red, Pro green, Team blue; Enterprise runs through all three. */
.rp-page :is(.plan-card, .plan-custom) {
  --plan-face:
    radial-gradient(ellipse at 22% -30%, rgb(255 255 255 / .6), transparent 62%),
    linear-gradient(170deg, rgb(255 255 255 / .3), transparent 46%, rgb(0 0 0 / .03)),
    linear-gradient(#e9e9e5, #e9e9e5);
  border: 1px solid var(--plan-edge, rgb(28 30 28 / .08));
  background: var(--plan-face);
  background-clip: padding-box;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .9),
    inset 0 -1px 0 rgb(28 30 28 / .06),
    0 12px 22px -16px rgb(24 26 24 / .36),
    0 2px 5px -3px rgb(24 26 24 / .16);
  color: #232523;
}
.rp-page .plan-card--free { --plan-edge: rgb(214 86 86 / .42); }
.rp-page .plan-card--pro { --plan-edge: rgb(64 168 92 / .42); }
.rp-page .plan-card--team { --plan-edge: rgb(72 118 214 / .42); }
.rp-page .plan-custom {
  border-color: transparent;
  background:
    radial-gradient(ellipse at 22% -30%, rgb(255 255 255 / .6), transparent 62%) padding-box,
    linear-gradient(170deg, rgb(255 255 255 / .3), transparent 46%, rgb(0 0 0 / .03)) padding-box,
    linear-gradient(#e9e9e5, #e9e9e5) padding-box,
    linear-gradient(100deg, rgb(214 86 86 / .42), rgb(64 168 92 / .42) 50%, rgb(72 118 214 / .42)) border-box;
}
/* Unavailable button on a card stays neutral. */
.rp-page .plan-card .rp-disabled { background: #dcdcd7; box-shadow: inset 0 1px 1px rgb(24 26 24 / .08), inset 0 -1px 0 rgb(255 255 255 / .6); color: #555954; }
.rp-page .plan-card .rp-disabled b { background: #ecece8; color: #7b7f7a; }
@media (forced-colors: active) {
  .rp-page :is(.plan-card, .plan-custom) { background: Canvas; border-color: CanvasText; box-shadow: none; }
}
