/* 免费试用 (3.2): § 09 pricing cards and the trial dialog (js/trial.js). */

/* ================================================================ § 09 pricing
   Renders completely without JS and without WebGL. Cards in a row share their row tracks
   (subgrid), so names, prices, lists and buttons line up; the cards are equally tall. */
.pricing-head { text-align: center; margin-bottom: clamp(34px, 4.4vw, 64px); }
.pricing-head .lead { margin: clamp(16px, 1.6vw, 24px) auto 0; }
.plans {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  max-width: 1200px; margin-inline: auto;
}
.plan {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 28px 24px 24px; border-radius: var(--r-l); border: 1px solid var(--hair);
  background: linear-gradient(170deg, rgba(156, 193, 255, 0.055), rgba(156, 193, 255, 0) 70%);
}
@supports (grid-template-rows: subgrid) {
  .plan { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
}
.plan.is-featured {
  border-color: rgba(76, 139, 255, 0.72);
  background: linear-gradient(160deg, rgba(36, 111, 241, 0.24), rgba(36, 111, 241, 0.04) 66%);
  box-shadow: 0 34px 64px -40px rgba(36, 111, 241, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.plan-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 500 clamp(20px, 1.6vw, 24px)/1.35 var(--serif); color: var(--text-1); }
.plan-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--blue); color: #fff;
  font: 600 12px/1.6 var(--sans); letter-spacing: 0.1em; box-shadow: 0 6px 16px -8px rgba(36, 111, 241, 0.9);
}
.plan-for { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--text-3); }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 22px; }
.plan-price b { font: 500 clamp(30px, 2.5vw, 38px)/1.15 var(--serif); letter-spacing: -0.02em; color: var(--text-1); white-space: nowrap; }
.plan-price span { font-size: 14px; color: var(--text-3); white-space: nowrap; }
.plan-points { display: grid; align-content: start; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hair); }
.plan-points li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.65; color: var(--text-2); overflow-wrap: anywhere; }
.plan-points li::before {
  content: ""; position: absolute; left: 2px; top: 0.52em; width: 10px; height: 5px;
  border-left: 1.6px solid var(--blue-soft); border-bottom: 1.6px solid var(--blue-soft); transform: rotate(-45deg);
}
.plan-cta { align-self: end; width: 100%; min-height: 50px; margin-top: 26px; padding-inline: 18px; }
.plan .button-outline { padding-inline: 18px; }
.plans-note { margin-top: 28px; text-align: center; font-size: 13px; color: var(--text-3); text-wrap: balance; }
.pricing .cta-note { margin-top: 10px; text-align: center; text-wrap: balance; }
/* Without JS the dialog cannot open: say so where the trial links lead (#trial). */
.trial-noscript {
  max-width: 40em; margin: 0 auto 22px; padding: 12px 18px; text-align: center;
  border: 1px dashed var(--hair-3); border-radius: var(--r-m); font-size: 14px; color: var(--text-2);
}
.trial-noscript a, .inline-link { color: var(--blue-soft); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.inline-link:hover { color: var(--blue-mist); }

@media (max-width: 1099.98px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
}
@media (max-width: 639.98px) {
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 460px; gap: 14px; }
  .plan { padding: 24px 20px 20px; }
  .plan-cta { margin-top: 22px; }
}

/* ================================================================ trial dialog
   Paper on ink, like the other dialogs. The sheet scrolls inside the dialog; the close
   button stays put in the corner. */
dialog.trial-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: hidden; color-scheme: light; }
dialog.trial-dialog[open] { display: flex; flex-direction: column; }
.trial-sheet { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 32px 36px 28px; }
.trial-close { z-index: 2; background: var(--paper); box-shadow: 0 2px 10px -2px rgba(14, 31, 58, 0.18); }
.trial-head { padding-right: 40px; }
.trial-head .folio { margin: 0 0 8px; }
dialog.trial-dialog h2 { font: 500 30px/1.3 var(--serif); letter-spacing: -0.02em; }
#trial-form { display: block; padding: 0; }
#trial-form .dialog-lead { margin: 6px 0 0; }
.trial-required { margin-left: 10px; font-size: 12px; color: var(--paper-ink-3); white-space: nowrap; }
.trial-fields { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 20px; }
.trial-fields .field { display: grid; align-content: start; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.trial-fields .field[hidden] { display: none; }
.field-wide, .field-plan { grid-column: 1 / -1; }
#trial-dialog .field > label:not(.check), #trial-dialog .field-plan legend {
  display: flex; align-items: baseline; gap: 6px; padding: 0;
  font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--paper-ink-2);
}
#trial-dialog .field small { font-size: 12px; font-weight: 400; color: var(--paper-ink-3); }
#trial-dialog .req { font-style: normal; color: #b3330f; }
#trial-dialog input[type="text"], #trial-dialog input[type="tel"], #trial-dialog input[type="number"], #trial-dialog textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-s); border: 1px solid var(--paper-line); background: #fff; color: var(--paper-ink);
  font-size: 16px; /* ≥ 16 px: phones do not zoom into the field */
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
#trial-dialog textarea { height: auto; min-height: 70px; padding: 10px 14px; line-height: 1.6; resize: vertical; }
#trial-dialog input::placeholder, #trial-dialog textarea::placeholder { color: #8796ab; }
#trial-dialog input:focus, #trial-dialog textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36, 111, 241, 0.16); }
#trial-dialog .field [aria-invalid="true"] { border-color: #b3330f; box-shadow: 0 0 0 3px rgba(179, 51, 15, 0.12); }
#trial-dialog .field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(179, 51, 15, 0.2); }
#trial-dialog input[type="radio"], #trial-dialog input[type="checkbox"] {
  flex: none; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--blue); box-shadow: none;
}
.field-hint { font-size: 12px; line-height: 1.5; color: var(--paper-ink-3); }
.field-error { font-size: 12.5px; line-height: 1.5; color: #b3330f; }
.plan-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
#trial-dialog .plan-options label {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 8px;
  border: 1px solid var(--paper-line); border-radius: var(--r-s); background: #fff; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--paper-ink); white-space: nowrap;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
#trial-dialog .plan-options label:has(input:checked) { border-color: var(--blue); background: rgba(36, 111, 241, 0.07); box-shadow: inset 0 0 0 1px var(--blue); }
#trial-dialog .plan-options label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
#trial-dialog .check {
  display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 6px 0; cursor: pointer;
  font-size: 14px; font-weight: 400; line-height: 1.6; color: var(--paper-ink);
}
#trial-dialog .check input { margin-top: 3px; }
#trial-dialog .check small { margin-left: 6px; }
#trial-dialog .check a, .trial-login a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.field-check { gap: 0; }
.field-check .field-error { padding-left: 28px; }
/* Spam trap: invisible to people and to assistive technology. */
.trial-hp { position: absolute; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.trial-status { min-height: 1.6em; margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--paper-ink-2); }
.trial-status[data-tone="warn"] { color: #a2441b; }
.trial-status[data-tone="error"] { color: #b3330f; }
.trial-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.trial-submit { min-width: 168px; }
.trial-submit[data-busy="true"] { cursor: progress; opacity: 0.8; }
.trial-submit[data-busy="true"]::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: trial-spin 0.8s linear infinite;
}
@keyframes trial-spin { to { transform: rotate(1turn); } }
.trial-login { font-size: 14px; color: var(--paper-ink-2); }
.trial-done { display: grid; justify-items: start; gap: 18px; padding-top: 22px; }
.trial-done-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: var(--shadow-glow); }
.trial-done-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trial-done-title { font: 500 22px/1.55 var(--serif); color: var(--paper-ink); max-width: 22em; }
.trial-done-title:focus { outline: none; }

@media (max-width: 639.98px) {
  dialog.trial-dialog { width: calc(100% - 24px); max-height: calc(100% - 24px); border-radius: var(--r-m); }
  .trial-sheet { padding: 26px 20px 20px; }
  .trial-close { top: 8px; right: 8px; }
  dialog.trial-dialog h2 { font-size: 25px; }
  .trial-required { display: block; margin: 2px 0 0; }
  .trial-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .plan-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trial-submit { width: 100%; }
}
