/* Pricing page and comparison adjustments (D103, D106, D114). */

/* Hero in the site's serif, without the label above it. */
.pricing-hero { position: relative; overflow: hidden; padding-top: 80px !important; }
.pricing-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -30%;
  width: 1100px;
  height: 700px;
  margin-left: -550px;
  background: radial-gradient(ellipse at center, rgba(184, 153, 104, .14), transparent 62%);
  pointer-events: none;
}
.pricing-hero .wrap-wide { position: relative; }
.pricing-hero h1.fx-words {
  max-width: 980px;
  margin: 0 auto 24px !important;
  font-family: var(--serif) !important;
  font-weight: 300 !important;
  font-size: clamp(50px, 6vw, 100px) !important;
  line-height: 1 !important;
  letter-spacing: -.01em !important;
}
.pricing-hero > .wrap-wide > p:not(.pricing-billing-note) { font-size: 19px !important; }

/* Do the sums: controls on the left, the balance on the right. */
.pr-scale-section { padding: 130px 0; background: var(--ink-2); }
.pr-scale__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.pr-scale-section h2 { margin: 0 0 22px; font-size: clamp(40px, 4.4vw, 68px) !important; line-height: 1.04 !important; }
.pr-scale-section .pr-scale__intro { margin: 0 0 30px; max-width: 540px; color: var(--mist); }
.pr-scale__controls { display: grid; gap: 22px; max-width: 540px; padding: 26px 28px; border-radius: 24px; background: #FFFFFF; }
.pr-plans { display: inline-flex; gap: 4px; justify-self: start; padding: 5px; border-radius: 999px; background: var(--ink-2); }
.pr-plans button {
  min-height: 42px;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: 600 15px var(--sans);
  color: var(--mist);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.pr-plans button[aria-pressed="true"] { background: var(--cream); color: #FFFFFF; }
.pr-range { display: grid; gap: 10px; }
.pr-range__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--mist); }
.pr-range__head b { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1; color: var(--cream); }
.pr-range input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.pr-range input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: var(--ink-2); }
.pr-range input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--ink-2); }
.pr-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 999px;
  background: var(--cream);
  border: 4px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(23, 25, 26, .35);
}
.pr-range input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 999px; background: var(--cream); border: 4px solid #FFFFFF; box-shadow: 0 2px 8px rgba(23, 25, 26, .35); }
.pr-range input[type="range"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.pr-scale__result { max-width: 540px; margin-top: 26px; }
.pr-scale-section .pr-scale__needed { margin: 0 0 8px; font-family: var(--serif); font-size: 27px !important; line-height: 1.3 !important; color: var(--cream); }
.pr-scale-section .pr-scale__diff { margin: 0; font-size: 17px !important; color: var(--gold); font-weight: 600; }
.pr-scale-section .pr-scale__note { margin: 18px 0 0; max-width: 540px; font-size: 13px !important; line-height: 1.5 !important; color: var(--mist); }

/* The balance. --a tilts the beam, --dy lowers one pan and raises the other. */
.pr-scale { position: relative; height: 470px; max-width: 520px; width: 100%; justify-self: center; }
.pr-scale__post { position: absolute; left: 50%; top: 86px; bottom: 30px; width: 10px; margin-left: -5px; border-radius: 4px; background: linear-gradient(90deg, #2A2D2B, #4A4D4B, #2A2D2B); }
.pr-scale__base { position: absolute; left: 50%; bottom: 14px; width: 190px; height: 22px; margin-left: -95px; border-radius: 12px 12px 6px 6px; background: var(--cream); }
.pr-scale__beam {
  position: absolute;
  left: 50%;
  top: 80px;
  width: 360px;
  height: 8px;
  margin-left: -180px;
  border-radius: 8px;
  background: var(--cream);
  transform: rotate(var(--a, 0deg));
  transition: transform 1s cubic-bezier(.3, 1.4, .5, 1);
}
.pr-scale__pivot { position: absolute; left: 50%; top: 72px; width: 24px; height: 24px; margin-left: -12px; border-radius: 999px; background: var(--gold-line); box-shadow: 0 0 0 5px #FFFFFF; }
.pr-pan {
  position: absolute;
  top: 84px;
  width: 170px;
  margin-left: -85px;
  transition: transform 1s cubic-bezier(.3, 1.4, .5, 1);
}
.pr-pan--left { left: calc(50% - 176px); transform: translateY(calc(var(--dy, 0px) * -1)); }
.pr-pan--right { left: calc(50% + 176px); transform: translateY(var(--dy, 0px)); }
.pr-pan__strings { display: block; width: 100%; height: 130px; }
.pr-pan__strings path { fill: none; stroke: var(--hair-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pr-pan__dish { display: block; height: 16px; margin-top: -2px; border-radius: 0 0 90px 90px / 0 0 16px 16px; background: var(--cream); box-shadow: 0 16px 24px -14px rgba(23, 25, 26, .5); }
.pr-pan__load { position: absolute; left: 10px; right: 10px; bottom: 14px; display: flex; flex-wrap: wrap-reverse; justify-content: center; align-items: flex-end; gap: 3px; }
.pr-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 14px 12px;
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 10px 20px -12px rgba(23, 25, 26, .4);
  text-align: center;
}
.pr-tag b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--cream); }
.pr-tag__k { font-size: 11px; color: var(--mist); }
.pr-bottle { width: 18px; height: 31px; animation: pr-drop .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.pr-bottle rect:first-child { fill: var(--cream); }
.pr-bottle rect:last-child { fill: var(--gold-line); }
.pr-bottle:nth-child(3n + 2) rect:last-child { fill: #C9A27A; }
.pr-bottle:nth-child(3n) rect:last-child { fill: #8C6A4A; }
@keyframes pr-drop { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: none; } }
.pr-more { align-self: center; padding: 3px 8px; border-radius: 999px; background: var(--cream); color: #FFFFFF; font-size: 12px; font-weight: 600; }
.pr-pan__label { position: absolute; left: 50%; top: 162px; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); white-space: nowrap; font-size: 12px; color: var(--mist); }
.pr-pan__label b { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--cream); }

@media (max-width: 900px) {
  .pricing-hero h1.fx-words { font-size: clamp(40px, 10vw, 60px) !important; }
  .pr-scale-section { padding: 80px 0; }
  /* The balance sits between the intro and the sliders, so it stays in view
     while they move. */
  .pr-scale__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pr-scale__grid > div:first-child { display: contents; }
  .pr-scale__grid > div:first-child > * { order: 1; }
  .pr-scale__grid > div:first-child > .fx-lines,
  .pr-scale__grid > div:first-child > .pr-scale__intro { order: 0; }
  .pr-scale { order: 0; height: 400px; margin: 0 auto -70px; transform: scale(.82); transform-origin: top center; }
  .pr-scale__controls { padding: 20px; }

}

@media (max-width: 640px) {
  .pr-scale { transform: scale(.68); margin-bottom: -125px; }
  .pr-scale-section .pr-scale__needed { font-size: 23px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .pr-scale__beam, .pr-pan, .pr-bottle { transition: none !important; animation: none !important; }
}

.pricing-tooltip {
  position: fixed;
  bottom: auto;
  z-index: 800;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  font-family: var(--sans);
}

.pricing-table .pricing-group-row { position: sticky; top: calc(83px + var(--pricing-heading-height, 0px)); z-index: 3; background: #fff; }
.is-compact .pricing-table .pricing-group-row { top: var(--pricing-heading-height, 0px); }

/* Keep all four plan positions while reserving a narrow rail for the fourth. */
.is-compact .pricing-table-scroll {
  max-height: min(75svh, 720px, calc(100svh - var(--pricing-nav-height) - 24px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border-radius: 16px;
  scrollbar-gutter: stable;
}
.is-compact .pricing-table { display: block; width: 100%; border-spacing: 0; }
.is-compact .pricing-table colgroup { display: none; }
.is-compact .pricing-table thead { display: block; position: sticky; top: 0; z-index: 4; background: #fff; }
.is-compact .pricing-table tbody { display: contents; }
.is-compact .pricing-table tr { display: grid; grid-template-columns: var(--pricing-columns); gap: 0 3px; }
.is-compact .pricing-table th, .is-compact .pricing-table td { min-width: 0; padding: 12px 6px; overflow-wrap: anywhere; }
.is-compact .pricing-table tbody th { position: static; z-index: auto; box-shadow: none; font-size: 13px; }
.is-compact .pricing-table .pricing-feature-label { grid-column: 1 / -1; padding: 20px 6px 10px; background: #fff; }
.is-compact .pricing-feature-label .pricing-help { margin-inline-end: 13px; }
.is-compact .pricing-table tbody td { display: flex; align-items: center; justify-content: center; min-height: 48px; border-bottom: 1px solid #e2e2dc; }
.is-compact .pricing-table tbody td[data-collapsed="true"] { background: #f7f7f5; border-bottom-color: transparent; }
.is-compact .pricing-table .pricing-group-row th { grid-column: 1 / -1; padding: 18px 6px 12px; font-size: 18px; background: #fff; }
.is-compact .pricing-table thead th { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; position: static; padding: 12px 5px; border-radius: 16px 16px 0 0; background: #f2f2f0; box-shadow: none; font-size: 13px; text-align: center; vertical-align: middle; }
.is-compact .pricing-table thead th.pricing-featured { background: #f1e9db; }
.is-compact .pricing-table thead th[data-collapsed="true"] { padding: 0; }
.is-compact .pricing-compact-heading { grid-template-rows: repeat(4, auto); }
.pricing-compact-name { grid-row: 1; display: block; font-weight: 600; }
.pricing-compact-price { grid-row: 2; display: block; margin: 6px 0; font-size: clamp(14px, 4vw, 22px); line-height: 1.3; }
.pricing-compact-period { grid-row: 3; display: block; margin: -4px 0 6px; font-size: 10px; line-height: 1.2; }
.pricing-compact-cta { grid-row: 4; display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 5px 2px; border-radius: 12px; background: #1c1f1d; color: #fff; font-size: 10px; line-height: 1.3; }
.pricing-expand-plan { grid-row: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 100%; min-height: 112px; padding: 12px 8px; border: 0; border-radius: inherit; background: #e9e9e4; color: #1c1f1d; font: 600 13px var(--sans); cursor: pointer; }
.pricing-expand-plan > span:first-child { writing-mode: vertical-rl; }
.pricing-expand-plan > span:last-child { font-size: 20px; }
.pricing-expand-plan:focus-visible, .pricing-compact-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }
.is-compact .pricing-table-scroll > .pricing-footnote { padding: 0 12px; }
.is-compact .pricing-table-scroll > .pricing-footnote:last-child { padding-bottom: 20px; }
@media (max-height: 500px) and (max-width: 1100px) {
  .is-compact .pricing-table thead th { padding-block: 6px; }
  .pricing-expand-plan { min-height: 90px; padding-block: 6px; }
  .is-compact .pricing-table .pricing-group-row th { padding-block: 10px; font-size: 16px; }
}
