/* ==========================================================================
   Unmark Me — pricing. Builds on the tokens, nav and buttons in
   dev-preview.css; fits one screen like the rest of the app.
   ========================================================================== */

.pricing {
  justify-content: center;
  gap: 0;
}

/* ---------- Header ---------- */

.pricing-header { text-align: center; }

.pricing-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, min(5vw, 5.4vh), 3rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.032em;
}

.pricing-lede {
  margin-top: clamp(6px, 1vh, 10px);
  font-size: 1.0625rem;
  letter-spacing: -0.014em;
  color: var(--label-2);
}

/* Segmented Monthly / Annual control */
.billing {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 2px;
  margin-top: clamp(14px, 2.6vh, 24px);
  padding: 3px;
  border-radius: 11px;
  background: var(--fill);
}

.billing button {
  height: 32px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--label-2);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.billing button:hover { color: var(--label); }

.billing button[aria-checked="true"] {
  background: var(--surface);
  color: var(--label);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.billing-save {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}

/* ---------- Plans ---------- */

.plans {
  position: relative;
  width: 100%;
  max-width: 1040px;
  margin: clamp(18px, 3.4vh, 40px) auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.8vh, 28px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: transform var(--base) var(--ease-out), box-shadow var(--base) var(--ease-out);
}

.plan:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.plan--featured,
.plan--featured:hover { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg); }

.plan-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.plan-name {
  margin: 0;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.021em;
}

.plan-tagline {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--label-2);
}

.plan-price {
  margin-top: clamp(10px, 1.8vh, 20px);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-amount {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vh, 2.625rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.plan-period {
  font-size: 0.9375rem;
  color: var(--label-2);
}

.plan-note {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--label-2);
}

.plan-cta {
  width: 100%;
  margin-top: clamp(12px, 2vh, 20px);
}

.plan-features {
  margin: clamp(12px, 2vh, 20px) 0 0;
  padding: clamp(12px, 2vh, 20px) 0 0;
  list-style: none;
  display: grid;
  gap: clamp(5px, 0.9vh, 10px);
  border-top: 1px solid var(--separator);
  font-size: 0.875rem;
  line-height: 1.35;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.plan-features li::before,
.compare .yes {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pricing-foot {
  margin-top: clamp(12px, 2.4vh, 28px);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--label-3);
}

.link-button {
  padding: 0;
  color: var(--accent);
  font-size: inherit;
}

.link-button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Compare sheet ---------- */

.sheet {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--label);
  box-shadow: var(--shadow-lg);
}

.sheet[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-in var(--slow) var(--ease-out) both;
}

.sheet::backdrop {
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade var(--base) var(--ease) both;
}

.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 8px 24px;
}

.sheet-title {
  margin: 0;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.021em;
}

.sheet-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fill);
  color: var(--label-2);
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.sheet-close:hover { background: var(--fill-hover); color: var(--label); }
.sheet-close:active { transform: scale(0.92); }
.sheet-close svg { width: 14px; height: 14px; }

.sheet-body {
  min-height: 0;
  overflow-y: auto;
  padding: 0 24px 20px;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.compare th,
.compare td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--separator);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.compare thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  font-size: 0.9375rem;
  font-weight: 600;
}

.compare tbody th {
  text-align: left;
  font-weight: 400;
  color: var(--label-2);
}

.compare tr > :nth-child(3) { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }

.compare .yes { display: inline-block; vertical-align: middle; margin: 0; }
.compare .no { color: var(--label-3); }

.sheet-foot {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--label-3);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 70;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--label);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease-out);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

/* Phones: plans become a swipeable row so the page itself never scrolls. */
@media (max-width: 760px) {
  .plans {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(84%, 340px);
    gap: 14px;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    padding: 14px 16px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
  }
  .plans::-webkit-scrollbar { display: none; }
  .plan { scroll-snap-align: center; }
  .plan:hover { transform: none; }
  .compare th, .compare td { padding: 9px 4px; font-size: 0.8125rem; }
  .sheet-body { padding: 0 16px 16px; }
  .sheet-head { padding: 16px 16px 8px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .plan:hover { transform: none; }
}
