/* Pricing page (type "pricing"). Linked after bloom.css on /pricing/ only.
   Composes the shared components; everything here is specific to this page. */

/* Stacked tables set display on rows, which would show rows that carry [hidden]. */
.bn-pricing [hidden] { display: none !important; }

/* States: the data sections stay as skeletons while loading and leave on failure. */
.bn-pricing [data-bn-px-state="failed"] [data-bn-px-live] { display: none; }
html:not(.bn-js) .bn-pricing [data-bn-px-loading],
html:not(.bn-js) .bn-pricing [data-bn-px-live] { display: none; }

.bn-pricing .bn-pagehead { --bn-pagehead-scene: 250px; }

/* ------------------------------------------------------------------ intro and index */
.bn-pricing .bn-px-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px 80px; align-items: start; }
.bn-pricing .bn-px-intro-text > * + * { margin-top: 14px; }
.bn-pricing .bn-px-intro-text p { color: var(--bn-fg-2); max-width: 32em; }
.bn-pricing .bn-px-status { font-weight: 600; color: var(--bn-fg); }
.bn-pricing .bn-px-index-list { list-style: none; font-variant-numeric: tabular-nums; }
.bn-pricing .bn-px-index-list:first-child { border-top: 1px solid var(--bn-rule-strong); }
.bn-pricing .bn-px-index-list > li { display: grid; grid-template-columns: minmax(9em, 1.05fr) minmax(0, 1.6fr) auto; gap: 4px 20px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--bn-rule); }
.bn-pricing .bn-px-index-list a { font: 650 1.08rem/1.3 var(--bn-display); letter-spacing: -0.012em; color: var(--bn-fg); text-decoration: none; }
.bn-pricing .bn-px-index-list a:hover { text-decoration: underline; text-decoration-color: var(--bn-sakura); text-underline-offset: 4px; }
.bn-pricing .bn-px-index-meta { color: var(--bn-fg-2); font-size: .95rem; }
.bn-pricing .bn-px-index-list .bn-stat { font-size: .92rem; justify-self: end; }

/* ------------------------------------------------------------------ failure */
.bn-pricing .bn-px-noscript { padding-block: 40px 0; }
.bn-pricing .bn-px-noscript p { max-width: 40em; font-weight: 600; }
.bn-pricing .bn-px-failed-in { display: flex; align-items: flex-end; gap: 36px; }
.bn-pricing .bn-px-failed-box { flex: none; line-height: 0; }
.bn-pricing .bn-px-failed-in .bn-h3 { max-width: 24em; }
.bn-pricing .bn-px-failed-in .bn-actions { margin-top: 24px; }

/* ------------------------------------------------------------------ term and system bar */
.bn-pricing .bn-px-bar { position: sticky; top: var(--bn-head-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 44px; padding: 9px 0; border-top: 1px solid var(--bn-rule-strong); border-bottom: 1px solid var(--bn-rule); background: rgba(247, 242, 245, .97); }
.bn-pricing .bn-px-ctl { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bn-pricing .bn-px-bar .bn-tab { min-height: 34px; padding-inline: 16px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ route blocks */
.bn-pricing .bn-px-route { padding-top: 60px; }
.bn-pricing .bn-px-route--skeleton { padding-top: 40px; }
.bn-pricing .bn-px-route.bn-anchor { scroll-margin-top: calc(var(--bn-head-h) + var(--bn-px-bar-h, 64px)); }
.bn-pricing .bn-px-route-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 32px; margin-bottom: 14px; }
.bn-pricing .bn-px-carrier { font-weight: 400; color: var(--bn-fg-2); letter-spacing: -0.012em; margin-left: .3em; }
.bn-pricing .bn-px-facts { color: var(--bn-fg-2); font-size: .98rem; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ tables */
.bn-pricing .bn-px-table { font-size: .95rem; }
.bn-pricing .bn-px-table :is(th, td) { padding: 13px 18px 13px 0; }
.bn-pricing .bn-px-table tbody th { font: 680 1.06rem/1.3 var(--bn-display); letter-spacing: -0.01em; }
.bn-pricing .bn-px-table--metal tbody th { font: 600 .97rem/1.4 var(--bn-text); letter-spacing: 0; white-space: normal; min-width: 11em; }
.bn-pricing .bn-px-table td.bn-r { white-space: nowrap; }
/* A block, so a row lines up on the first line of the price (an inline-block would use its last). */
.bn-pricing .bn-px-price { display: block; }
.bn-pricing .bn-px-fig { font-weight: 650; font-size: 1.04rem; color: var(--bn-fg); }
.bn-pricing .bn-px-price small, .bn-pricing .bn-px-termfig small { display: block; margin-top: 1px; font-size: .82rem; font-weight: 400; color: var(--bn-fg-2); }
.bn-pricing .bn-px-na { font-size: .88rem; color: var(--bn-fg-2); white-space: normal; }
.bn-pricing .bn-px-row--na :is(th, td) { color: var(--bn-fg-2); }
.bn-pricing .bn-px-table .bn-stat { font-size: .95rem; }
.bn-pricing .bn-px-act { display: block; width: max-content; max-width: 100%; margin-top: 3px; font-size: .88rem; }
.bn-pricing .bn-px-loading { color: var(--bn-fg-2); padding-block: 28px; }
.bn-pricing .bn-px-empty { padding: 22px 0; border-top: 1px solid var(--bn-rule-strong); border-bottom: 1px solid var(--bn-rule); font-weight: 600; }
.bn-pricing .bn-px-table--plain tbody th { white-space: normal; min-width: 9em; }
.bn-pricing .bn-px-table--plain td { color: var(--bn-fg-2); }
.bn-pricing .bn-px-table--plain td.bn-r { white-space: nowrap; }

/* Operating-system disclosure inside a row. */
.bn-pricing .bn-px-os > summary { display: inline-block; cursor: pointer; list-style: none; text-decoration: underline dotted var(--bn-fg-2); text-underline-offset: 4px; }
.bn-pricing .bn-px-os > summary::-webkit-details-marker { display: none; }
.bn-pricing .bn-px-os > summary:hover { text-decoration-color: var(--bn-sakura); }
.bn-pricing .bn-px-os > ul { list-style: none; margin-top: 6px; font-size: .86rem; line-height: 1.5; color: var(--bn-fg-2); }

/* Under a route table: notes on the left, the prepaid terms of the smallest plan on the right. */
.bn-pricing .bn-px-under { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 80px; align-items: start; margin-top: 22px; }
.bn-pricing .bn-px-notes { font-size: .9rem; line-height: 1.55; color: var(--bn-fg-2); }
.bn-pricing .bn-px-notes ul, .bn-pricing ul.bn-px-notes { list-style: none; }
.bn-pricing .bn-px-notes li { max-width: 40em; }
.bn-pricing .bn-px-notes li + li, .bn-pricing .bn-px-notes > * + * { margin-top: 8px; }
.bn-pricing .bn-px-notes .bn-link { font-size: .95rem; }
.bn-pricing .bn-px-notice { max-width: 40em; padding: 14px 18px; border: 1px solid var(--bn-rule); border-left: 3px solid var(--bn-fg); border-radius: 0 var(--bn-radius) var(--bn-radius) 0; background: var(--bn-surface); color: var(--bn-fg); }
.bn-pricing .bn-px-terms { font-variant-numeric: tabular-nums; }
.bn-pricing .bn-px-terms-h { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 9px; border-bottom: 1px solid var(--bn-rule-strong); font: 500 .84rem/1.3 var(--bn-text); color: var(--bn-fg-2); }
.bn-pricing .bn-px-termlist > div { display: grid; grid-template-columns: minmax(6em, 1fr) auto minmax(5.5em, auto); gap: 0 24px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--bn-rule); font-size: .95rem; }
.bn-pricing .bn-px-termlist dt { color: var(--bn-fg); }
.bn-pricing .bn-px-off { color: var(--bn-fg-2); font-size: .88rem; }
.bn-pricing .bn-px-termfig { text-align: right; font-weight: 600; }

/* Sticky column headers. The shared wrap scrolls sideways, which would trap a sticky
   header, so on wide screens the wrap is opened up and the header follows the page. */
@media (min-width: 1100px) {
  .bn-pricing .bn-table-wrap { overflow: visible; }
  .bn-pricing .bn-table thead th { position: sticky; top: var(--bn-head-h); z-index: 5; background: var(--bn-bg); border-top: 0; border-bottom: 0; box-shadow: inset 0 1px 0 var(--bn-rule-strong), inset 0 -1px 0 var(--bn-rule); }
  .bn-pricing #bn-px-isp .bn-table thead th { top: calc(var(--bn-head-h) + var(--bn-px-bar-h, 58px)); }
  /* Fixed column widths, so the route tables line up with each other down the page. */
  .bn-pricing #bn-px-isp .bn-px-table { table-layout: fixed; }
  .bn-pricing #bn-px-isp .bn-px-table th:nth-child(1) { width: 8%; }
  .bn-pricing #bn-px-isp .bn-px-table th:nth-child(2) { width: 5%; }
  .bn-pricing #bn-px-isp .bn-px-table th:nth-child(3) { width: 7%; }
  .bn-pricing #bn-px-isp .bn-px-table th:nth-child(4) { width: 19%; }
  .bn-pricing #bn-px-isp .bn-px-table th:nth-child(5) { width: 14%; }
  .bn-pricing #bn-px-isp .bn-px-table th:nth-child(6) { width: 11%; }
  .bn-pricing #bn-px-isp .bn-px-table th:nth-child(7) { width: 12%; }
  .bn-pricing #bn-px-isp .bn-px-table th:nth-child(8) { width: 11.5%; }
  .bn-pricing #bn-px-isp .bn-px-table td.bn-r { white-space: normal; }
}
@media (min-width: 1280px) {
  .bn-pricing .bn-px-table--metal { font-size: .93rem; }
  .bn-pricing .bn-px-table--metal :is(th, td) { padding-right: 14px; white-space: nowrap; }
}

/* ------------------------------------------------------------------ dedicated band */
.bn-pricing .bn-px-rise { height: 320px; margin-top: 24px; }
.bn-pricing .bn-px-metal { background: var(--bn-bg); color: var(--bn-fg); padding-top: 28px; padding-bottom: 72px; }
.bn-pricing .bn-px-notes--metal { margin-top: 24px; }
.bn-pricing .bn-px-metal-actions { margin-top: 30px; }
/* Leaving the band: pale hills come back over the night ground. */
.bn-pricing .bn-px-dawn { height: 132px; margin-top: -1px; background: var(--bn-night) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 132' preserveAspectRatio='none'%3E%3Cpath fill='%233A2148' d='M0 60C160 14 330 10 520 50S860 100 1060 46 1330 8 1440 40V132H0Z'/%3E%3Cpath fill='%23E7DDE9' d='M0 88C190 44 380 46 610 82S990 118 1190 74 1380 52 1440 66V132H0Z'/%3E%3Cpath fill='%23F7F2F5' d='M0 112C230 78 420 84 660 108S1040 130 1230 104 1400 92 1440 98V132H0Z'/%3E%3C/svg%3E") bottom center / 100% 100% no-repeat; }

/* ------------------------------------------------------------------ document rows */
.bn-pricing .bn-px-doc { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 18px 72px; align-items: start; padding-block: 44px; border-top: 1px solid var(--bn-rule-strong); }
.bn-pricing .bn-px-doc.bn-anchor { scroll-margin-top: calc(var(--bn-head-h) + 12px); }
.bn-pricing .bn-px-doc-body > * + * { margin-top: 16px; }
.bn-pricing .bn-px-doc-body > p { max-width: 40em; color: var(--bn-fg-2); }
.bn-pricing .bn-px-doc-body > .bn-table-wrap { margin-top: 22px; }
.bn-pricing .bn-px-doc-body > .bn-table-wrap:first-child { margin-top: 0; }
.bn-pricing .bn-px-footnotes { padding-left: 1.3em; color: var(--bn-fg-2); max-width: 42em; }
.bn-pricing .bn-px-footnotes li { padding-left: 6px; }
.bn-pricing .bn-px-footnotes li + li { margin-top: 10px; }
.bn-pricing .bn-px-footnotes li::marker { color: var(--bn-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.bn-pricing .bn-px-doc-body > .bn-actions { margin-top: 34px; }
.bn-pricing .bn-px-more { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 28px; }

/* ------------------------------------------------------------------ motion */
/* A change of term or system sends one swell down the price column. */
@keyframes bn-px-swell {
  0% { transform: translateY(0); opacity: .3; }
  45% { transform: translateY(-5px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .bn-pricing .bn-px-swell .bn-px-price { animation: bn-px-swell .52s cubic-bezier(.3, 1.2, .5, 1) both; animation-delay: calc(var(--bn-i, 0) * 38ms); }
}

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1099px) {
  .bn-pricing .bn-px-table { font-size: .93rem; }
  .bn-pricing .bn-px-table :is(th, td) { padding-right: 14px; }
}
@media (max-width: 1000px) {
  .bn-pricing .bn-px-intro, .bn-pricing .bn-px-under, .bn-pricing .bn-px-doc { grid-template-columns: minmax(0, 1fr); }
  .bn-pricing .bn-px-doc { padding-block: 34px; }
}
@media (max-width: 760px) {
  .bn-pricing .bn-px-bar { position: static; gap: 12px 24px; }
  .bn-pricing .bn-px-ctl { flex-wrap: wrap; gap: 6px 14px; }
  .bn-pricing .bn-px-ctl > .bn-label { flex: 0 0 100%; }
  .bn-pricing .bn-px-bar .bn-tab { padding-inline: 11px; font-size: .88rem; }
  .bn-pricing .bn-px-route { padding-top: 44px; }
  .bn-pricing .bn-px-carrier { display: block; margin-left: 0; }

  /* Each plan becomes one compact labelled block: name and price on the first line,
     then the specifications as small label and value pairs. */
  .bn-pricing .bn-px-table { font-size: .98rem; border-top: 0; }
  .bn-pricing .bn-px-table tbody tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; padding: 18px 0 16px; }
  .bn-pricing .bn-px-table tbody tr:first-child { border-top: 1px solid var(--bn-rule-strong); }
  .bn-pricing .bn-px-table tbody th { grid-column: 1 / span 4; grid-row: 1; order: 0; padding: 0; align-self: end; font-size: 1.16rem; }
  .bn-pricing .bn-px-table td { position: static; grid-column: span 3; min-height: 0; padding: 0; white-space: normal; }
  .bn-pricing .bn-px-table td::before { position: static; display: block; width: auto; margin-bottom: 1px; font-size: .78rem; line-height: 1.4; }
  .bn-pricing .bn-px-table td[colspan] { grid-column: 1 / -1; }
  .bn-pricing .bn-px-table td.bn-r { white-space: normal; }
  .bn-pricing .bn-px-table:not(.bn-px-table--metal) td:nth-child(2) { grid-column: span 2; order: 1; }
  .bn-pricing .bn-px-table:not(.bn-px-table--metal) td:nth-child(3) { grid-column: span 2; order: 2; }
  .bn-pricing .bn-px-table:not(.bn-px-table--metal) td:nth-child(6) { grid-column: span 2; order: 3; }
  .bn-pricing .bn-px-table:not(.bn-px-table--metal) td:nth-child(4) { order: 4; }
  .bn-pricing .bn-px-table:not(.bn-px-table--metal) td:nth-child(5) { order: 5; }
  .bn-pricing .bn-px-table:not(.bn-px-table--metal) td:nth-child(7) { order: 6; }
  .bn-pricing .bn-px-table:not(.bn-px-table--metal) td:nth-child(9) { order: 7; }
  .bn-pricing .bn-px-table:not(.bn-px-table--metal) td:nth-child(8),
  .bn-pricing .bn-px-table--metal td:nth-child(7) { grid-column: 5 / span 2; grid-row: 1; text-align: right; }
  .bn-pricing .bn-px-table--metal tbody th { font: 650 1.06rem/1.3 var(--bn-display); min-width: 0; }
  .bn-pricing .bn-px-act { margin-top: 5px; font-size: .92rem; }
  .bn-pricing .bn-px-table--plain tbody th { font: 650 1.1rem/1.3 var(--bn-display); min-width: 0; }

  .bn-pricing .bn-px-index-list > li { grid-template-columns: minmax(0, 1fr) auto; }
  .bn-pricing .bn-px-index-meta { grid-column: 1 / -1; grid-row: 2; }
  .bn-pricing .bn-px-failed-in { flex-direction: column; align-items: flex-start; gap: 20px; }
  .bn-pricing .bn-px-rise { height: 230px; }
  .bn-pricing .bn-px-dawn { height: 84px; }
  .bn-pricing .bn-px-metal { padding-bottom: 48px; }
}
