/* /try plans modal. Figma 8rcqPM95zXXBMghQNuJLxk, page "12 · Site · Try":
   146:75 (desktop dialog, 600 wide) and 146:270 (phone bottom sheet).
   Tokens as /pricing (public/pricing.html): ocean #171c2f, mariner #222f59,
   orange #fda100, line #eeeceb, subtle #faf8f4, Montserrat. */
.tpm-overlay {
  --tpm-ocean: #171c2f;
  --tpm-mariner: #222f59;
  --tpm-orange: #fda100;
  --tpm-line: #eeeceb;
  --tpm-subtle: #faf8f4;
  --tpm-secondary: #776b65;
  position: fixed; inset: 0; z-index: 99990;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  font-family: "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tpm-ocean);
  -webkit-font-smoothing: antialiased;
}
.tpm-scrim { position: absolute; inset: 0; background: rgba(23, 28, 47, .45); }
.tpm-dialog {
  position: relative; box-sizing: border-box;
  /* Figma 269:170: a modal of fixed height (854 at a 900 viewport) whose
     header and footer stay put; only the plan list scrolls, so opening
     Owner never pushes Sign in below the fold. */
  width: 600px; max-width: 100%;
  height: min(854px, calc(100vh - 32px)); height: min(854px, calc(100dvh - 32px));
  overflow: hidden;
  display: flex; flex-direction: column; gap: 24px;
  padding: 32px; background: #ffffff; border-radius: 16px;
  box-shadow: 0 12px 32px rgba(23, 28, 47, .16);
}
.tpm-dialog:focus { outline: none; }
.tpm-dialog *, .tpm-dialog *::before, .tpm-dialog *::after { box-sizing: border-box; }
.tpm-grabber { display: none; }

.tpm-header { display: flex; align-items: flex-start; gap: 16px; }
.tpm-titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tpm-title { margin: 0; font-family: inherit; font-size: 28px; line-height: 36px; font-weight: 600; color: var(--tpm-ocean); letter-spacing: 0; }
.tpm-sub { margin: 0; font-size: 14px; line-height: 22px; font-weight: 400; color: var(--tpm-secondary); }
.tpm-close {
  flex: 0 0 auto; width: 44px; height: 44px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffffff; border: 1px solid var(--tpm-line); border-radius: 999px;
  color: var(--tpm-ocean); cursor: pointer;
}
.tpm-close .tpm-x { width: 20px; height: 20px; }

.tpm-header, .tpm-foot { flex: 0 0 auto; }
/* Spec 0663 (0599h 3.3) · the Monthly and Annual toggle, Figma H5 488:2227:
   a white pill with a 1px line border, two 44 tall options at 0 / 18
   padding, Montserrat SemiBold 13/18; the chosen side is Ocean Depths with
   a white check, and the pill clips its square ends. */
.tpm-cadence {
  flex: 0 0 auto; align-self: flex-start; display: inline-flex; align-items: stretch;
  background: #ffffff; border: 1px solid var(--tpm-line); border-radius: 999px; overflow: hidden;
}
.tpm-cadence[hidden] { display: none; }
.tpm-cadence-opt {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; margin: 0;
  border: 0; border-radius: 0; background: transparent; color: var(--tpm-ocean);
  font: inherit; font-size: 13px; line-height: 18px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.tpm-cadence-opt[aria-pressed="true"] { background: var(--tpm-ocean); color: #ffffff; }
.tpm-cadence-check { flex: 0 0 auto; width: 14px; height: 14px; }
.tpm-cadence-opt[aria-pressed="false"] .tpm-cadence-check { display: none; }
.tpm-cadence-opt:focus-visible { outline: 2px solid var(--tpm-mariner); outline-offset: -2px; }
/* At 320 the pill fits inside the sheet's 16px gutter (0663 audit P3). */
.tpm-cadence { max-width: 100%; }
@media (max-width: 359px) { .tpm-cadence-opt { padding: 0 12px; } }
.tpm-list {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 12px;
  /* room for the open row's 2px line and the badge above a row */
  padding-top: 2px; margin-top: -2px;
}
.tpm-list > * { flex: 0 0 auto; }
.tpm-row {
  position: relative; background: #ffffff;
  border: 1px solid var(--tpm-line); border-radius: 12px;
}
.tpm-row--open { border: 2px solid var(--tpm-mariner); }
.tpm-head {
  display: grid; width: 100%; margin: 0; min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  grid-template-areas: "name price chev" "tag price chev";
  column-gap: 12px; row-gap: 4px; align-items: center;
  padding: 16px 24px; background: transparent; border: 0; border-radius: 12px;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.tpm-row--open .tpm-head { padding: 15px 23px 0; }
.tpm-head:focus-visible, .tpm-btn:focus-visible, .tpm-pill:focus-visible, .tpm-close:focus-visible, .tpm-link:focus-visible {
  outline: 2px solid var(--tpm-mariner); outline-offset: 2px;
}
.tpm-name-row { grid-area: name; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.tpm-name { font-size: 22px; line-height: 30px; font-weight: 600; color: var(--tpm-ocean); white-space: nowrap; }
.tpm-badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--tpm-mariner); color: #ffffff;
  font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
}
.tpm-tagline { grid-area: tag; font-size: 14px; line-height: 22px; color: var(--tpm-mariner); }
.tpm-price { grid-area: price; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.tpm-price-line { display: flex; align-items: baseline; gap: 3px; }
.tpm-amount { font-size: 22px; line-height: 30px; font-weight: 600; color: var(--tpm-ocean); }
.tpm-per, .tpm-from, .tpm-yearly { font-size: 12px; line-height: 18px; color: var(--tpm-mariner); }
.tpm-chev { grid-area: chev; width: 20px; height: 20px; color: var(--tpm-ocean); transition: transform .15s ease; }
.tpm-row--open .tpm-chev { transform: rotate(180deg); }

.tpm-panel { display: flex; flex-direction: column; gap: 16px; padding: 16px 23px 17px; }
.tpm-panel[hidden] { display: none; }
.tpm-rule { height: 1px; background: var(--tpm-line); }
.tpm-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tpm-feature { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 22px; color: var(--tpm-ocean); }
.tpm-feature--head { font-weight: 500; }
.tpm-check { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 4px; }

.tpm-btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 48px; padding: 12px 24px; margin: 0; border-radius: 10px;
  font: inherit; font-size: 16px; line-height: 24px; font-weight: 600;
  text-decoration: none; text-align: center; cursor: pointer;
}
.tpm-btn--primary { background: var(--tpm-orange); color: var(--tpm-ocean); border: 0; }
.tpm-btn--outline { background: #ffffff; color: var(--tpm-ocean); border: 1px solid var(--tpm-ocean); }
.tpm-btn[disabled] { opacity: .6; cursor: default; }

.tpm-unavailable { margin: 0; font-size: 14px; line-height: 22px; color: var(--tpm-mariner); }
.tpm-link { color: var(--tpm-mariner); font-weight: 600; }

.tpm-foot { display: flex; flex-direction: column; gap: 12px; }
.tpm-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tpm-link-line { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 18px; color: var(--tpm-mariner); }
.tpm-pill {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; line-height: 18px; font-weight: 600; color: var(--tpm-mariner);
  text-decoration: none; white-space: nowrap;
}
.tpm-pill::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.tpm-pill--line { background: #ffffff; border: 1px solid var(--tpm-line); }
.tpm-pill--subtle { background: var(--tpm-subtle); border: 1px solid transparent; }
.tpm-tax { margin: 0; font-size: 12px; line-height: 18px; color: var(--tpm-mariner); }

/* Phone, 146:270: a full height bottom sheet, 16px gutter, every tap 44px. */
@media (max-width: 600px) {
  .tpm-overlay { padding: 0; align-items: flex-end; }
  .tpm-dialog {
    width: 100%; max-height: none; height: calc(100% - 48px);
    padding: 28px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    gap: 16px; border-radius: 16px 16px 0 0;
  }
  .tpm-grabber { display: block; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 999px; background: var(--tpm-line); }
  .tpm-header { align-items: center; }
  .tpm-title { font-size: 20px; line-height: 26px; }
  .tpm-sub { display: none; }
  .tpm-list { gap: 12px; }
  .tpm-head {
    grid-template-columns: auto minmax(0, 1fr) 20px;
    grid-template-areas: "name price chev" "tag tag tag";
    padding: 12px 16px; row-gap: 4px;
  }
  /* Frame 146:207: a collapsed row is 74 (1px line, 12 in, 48 top), the
     open Free row 293 (2px line, 16 in, then 16 between each part). */
  .tpm-row--open .tpm-head { padding: 16px 16px 0; }
  .tpm-name { font-size: 18px; line-height: 26px; }
  .tpm-amount { font-size: 18px; line-height: 26px; }
  /* The yearly line sits beside the monthly one, as in the frame; it may
     still wrap under it if a plan's figures ever grow too long. */
  .tpm-price { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; justify-self: end; align-items: baseline; gap: 0 4px; white-space: normal; text-align: right; }
  .tpm-price-line, .tpm-yearly { white-space: nowrap; }
  .tpm-tagline { font-size: 12px; line-height: 18px; }
  .tpm-row--popular .tpm-badge { position: absolute; top: -12px; left: 16px; }
  .tpm-panel { padding: 16px; }
  /* Links 88 (two 44 lines), 4, then the tax line, as the frame's footer. */
  .tpm-foot { gap: 4px; }
  .tpm-links { flex-direction: column; align-items: flex-start; gap: 0; }
  .tpm-link-line { min-height: 44px; }
  .tpm-pill { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .tpm-chev { transition: none; } }
