/* Packages in detail: the pop-up opened from the Packages table on the home page (packages.js).
   Over almost the whole screen, like the privacy policy. On the left a sticky list of the six
   blocks that marks the one being read; on a phone it becomes a row of chips along the top.
   In every block the services both packages share come first, and what Full adds sits in a
   terracotta box under them, so the difference between the two shows in each block. */

dialog.pk { border: 0; padding: 0; margin: auto; border-radius: 28px; width: calc(100vw - 48px); height: calc(100vh - 48px); max-width: none; max-height: none; background: var(--cream); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
dialog.pk:focus-visible { outline: none; } /* the pop-up itself takes focus when opened from a link */
dialog.pk::backdrop { background: rgba(42, 29, 20, .55); backdrop-filter: blur(3px); }
html.pk-open { overflow: hidden; }
.pk-close { position: sticky; top: 18px; float: right; margin: 18px 24px 0 0; font-size: 34px; z-index: 3; }

/* site.css pads every <section> for the page; the pop-up's sections space themselves */
.pk section { padding: 0; }
.pk-layout { display: grid; grid-template-columns: 250px minmax(0, 780px); gap: 72px; justify-content: center; padding: 90px 48px 110px; }

/* ---------- The list of blocks ---------- */
.pk-nav { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.pk-nav a { display: flex; gap: 14px; align-items: baseline; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-size: 16px; line-height: 1.3; opacity: .6; transition: opacity .2s, background .2s, color .2s; }
.pk-nav a .mono { opacity: .7; }
.pk-nav a:hover { opacity: 1; }
.pk-nav a.is-on { opacity: 1; background: var(--terracotta); color: var(--cream); }

/* ---------- Content ---------- */
.pk-main > * + * { margin-top: 72px; }
.pk-intro h2 { font-size: clamp(48px, 6vw, 80px); margin-top: 14px; }
.pk-main h3 { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.05; }
.pk-main .mono { opacity: .7; }

.pk-list { list-style: none; margin: 0; padding: 0; }
.pk-list li { position: relative; padding: 12px 0 12px 30px; border-bottom: 1px solid rgba(42, 29, 20, .1); line-height: 1.5; }
.pk-list li:last-child { border-bottom: 0; }
.pk-list li::before { content: ''; position: absolute; left: 4px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta); }
.pk-list a { color: var(--terracotta); }
.pk-note { margin: 14px 0 0; font-size: 15px; opacity: .7; }

.pk .pk-consult { padding: 40px 44px 44px; border-radius: 28px; background: var(--cream-2); }
.pk-consult h3 { margin: 10px 0 14px; }
.pk-consult > p { margin: 0 0 8px; }
.pk-consult .btn { margin-top: 26px; }

/* Prices: Full in terracotta, as in the table on the page */
.pk-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pk-price { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 32px 30px; border-radius: 28px; background: var(--cream-2); }
.pk-price--full { background: var(--terracotta); color: var(--cream); }
.pk-price .badge { background: var(--cream); color: var(--terracotta); padding: 4px 12px; border-radius: 999px; opacity: 1 !important; }
.pk-price b { font-family: var(--font-head); font-weight: 400; font-size: 56px; line-height: 1; }
.pk-price p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; opacity: .85; }
.pk-costs { grid-column: 1 / -1; font-size: 15px; }
.pk-costs p { margin: 0 0 6px; }

/* The six blocks */
.pk-block { scroll-margin-top: 40px; }
.pk-block h3 { margin: 8px 0 26px; }
.pk-label { display: block; margin-bottom: 4px; }
.pk-full { margin-top: 22px; padding: 22px 28px 14px; border-radius: 22px; background: var(--terracotta); color: var(--cream); }
.pk-full .mono { opacity: .85; }
.pk-full .pk-list li { border-color: rgba(246, 241, 232, .22); }
.pk-full .pk-list li::before { background: var(--cream); }

.pk-extra h3 { margin-bottom: 20px; }
.pk-discounts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pk-discounts li { display: flex; flex-direction: column; gap: 6px; padding: 24px 26px; border-radius: 22px; background: var(--cream-2); }
.pk-discounts b { font-family: var(--font-head); font-weight: 400; font-size: 48px; line-height: 1; color: var(--terracotta); }
.pk-end { display: flex; justify-content: center; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1000px) {
  .pk-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; padding: 80px 32px 90px; }
}

/* Phones: the whole screen, and the list of blocks becomes chips under the close button */
@media (max-width: 760px) {
  dialog.pk { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
  .pk-close { position: fixed; top: 6px; right: 6px; margin: 0; width: 48px; height: 48px; float: none; }
  .pk-layout { display: block; padding: 0 0 80px; }
  .pk-nav { position: sticky; top: 0; z-index: 2; flex-direction: row; gap: 8px; overflow-x: auto; padding: 60px 18px 12px; background: var(--cream); scrollbar-width: none; box-shadow: 0 10px 18px -16px rgba(42, 29, 20, .5); }
  .pk-nav::-webkit-scrollbar { display: none; }
  .pk-nav a { flex: none; white-space: nowrap; padding: 8px 14px; font-size: 14px; opacity: .8; box-shadow: inset 0 0 0 1.5px rgba(42, 29, 20, .25); }
  .pk-nav a.is-on { box-shadow: none; }
  .pk-main { padding: 0 18px; }
  .pk-main > * + * { margin-top: 56px; }
  .pk-intro { padding-top: 26px; }
  .pk-intro h2 { font-size: 46px; }
  .pk-main h3 { font-size: 32px; }
  .pk-block { scroll-margin-top: 120px; }
  .pk .pk-consult { padding: 28px 22px 26px; border-radius: 22px; }
  .pk-consult .btn, .pk-end .btn { width: 100%; justify-content: center; min-height: 56px; font-size: 17px; }
  .pk-prices, .pk-discounts { grid-template-columns: 1fr; gap: 12px; }
  .pk-price { padding: 26px 22px; border-radius: 22px; }
  .pk-price b { font-size: 46px; }
  .pk-full { padding: 18px 20px 10px; margin-left: -4px; margin-right: -4px; }
  .pk-list li { font-size: 16px; }
}
