/* Pricing page. Colours and type come from brand.css; buttons, bar and footer from style.css. */

.bar-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; }
.bar-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 400; opacity: 0.8; }
.bar-links a:not(.btn):hover, .bar-links a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }


.price-wrap { max-width: 1120px; padding-top: clamp(36px, 6vw, 72px); }

/* ---- heading ---- */
.price-hero { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.price-hero .eyebrow { margin: 0 0 14px; }
.price-hero h1 { font: 300 clamp(2.4rem, 5.6vw, 3.9rem)/1.04 var(--sans); margin: 0 0 16px; letter-spacing: -0.025em; }
.price-hero h1 em { font-style: normal; }
.price-hero .lead { font-size: 1.08rem; margin: 0 auto 24px; max-width: 560px; }

/* monthly / annual switch */
.period { display: inline-flex; padding: 4px; border-radius: 999px; background: #EFEFEC; }
.period button {
  min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 500;
}
.period button:hover:not(:disabled) { background: transparent; }
.period button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.save { margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--accent-ink); font-size: 0.74rem; }

/* ---- plan cards ---- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; margin-bottom: 64px; }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 28px 26px 26px;
  background: #fff; border-radius: 2px;
}
.plan.popular { box-shadow: inset 0 0 0 1.5px var(--ink); }
.plan .flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 4px 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.plan h2 { font: 300 1.9rem/1.1 var(--sans); letter-spacing: -0.02em; margin: 0; }
.plan .tagline { color: var(--muted); font-size: 0.93rem; margin: 4px 0 18px; min-height: 2.8em; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price .cur { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price .num { font: 300 3.2rem/1 var(--sans); letter-spacing: -0.03em; }
.price .per { color: var(--muted); }
.billed { color: var(--muted); font-size: 0.88rem; margin: 6px 0 20px; min-height: 2.6em; }
.plan .cta { width: 100%; min-height: 50px; margin-bottom: 22px; }
.plan .cta.current { background: var(--ok-tint); border-color: var(--ok-tint); color: var(--ok); cursor: default; }
.plan ul { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.plan li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  background: var(--ok-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%230B7D68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* ---- comparison and payments tables ---- */
.compare, .faq { margin-bottom: 56px; }
.compare h2, .faq h2 { font: 300 2rem/1.1 var(--sans); letter-spacing: -0.025em; margin: 0 0 16px; }
.table-scroll { overflow-x: auto; background: #fff; border-radius: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
thead th { font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
#compare-table th[scope="row"] { font-weight: 500; }
#compare-table td, #compare-table thead th:not(:first-child) { text-align: center; }
#compare-table .yes { color: var(--ok); font-weight: 500; }
#compare-table .no { color: var(--line-strong); }
#compare-table td.hl, #compare-table thead th.hl { background: var(--pp-tint); }

.payments { margin-bottom: 56px; padding: 24px; }
.payments .table-scroll { border: 0; border-radius: 2px; background: transparent; }
.status { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 500; }
.status.success { background: var(--ok-tint); color: var(--ok); }
.status.failed { background: var(--danger-tint); color: var(--danger); }
.status.pending { background: #FFF3D6; color: #7a5300; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }
td .why { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 3px; max-width: 240px; }

/* ---- faq ---- */
.faq details { background: #fff; border-radius: 2px; padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---- checkout dialog ---- */
dialog.checkout {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 28px; border: 0; border-radius: 2px;
  background: #fff; color: var(--text); overflow: auto;
}
dialog.checkout::backdrop { background: rgba(0, 0, 0, 0.55); }
.co-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.co-head h2 { font: 300 1.8rem/1.1 var(--sans); letter-spacing: -0.02em; margin: 0; }
.co-summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px;
  background: var(--soft); border-radius: 2px;
}
.co-summary strong { display: block; font-size: 1.05rem; }
.co-amount { font: 300 1.8rem/1 var(--sans); white-space: nowrap; }
#co-phone {
  width: 100%; min-height: 52px; padding: 0 14px; font: inherit; font-size: 1.1rem; border: 1px solid var(--line-strong);
  border-radius: 2px; background: #fff; color: var(--text); margin-bottom: 8px;
}
#co-phone:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.co-hint { margin: 0 0 16px; }
.co-state { text-align: center; padding: 10px 0 4px; }
.co-state h3 { font: 300 1.6rem/1.15 var(--sans); letter-spacing: -0.02em; text-transform: none; color: var(--ink); margin: 14px 0 8px; }
.co-state p { margin: 0 0 14px; color: var(--muted); }
.co-state .btn, .co-state button { margin-top: 6px; }
.spinner {
  width: 52px; height: 52px; margin: 6px auto 0; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.tick, .cross {
  width: 56px; height: 56px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.8rem; font-weight: 700;
}
.tick { background: var(--ok-tint); color: var(--ok); }
.cross { background: var(--danger-tint); color: var(--danger); }

/* ---- small screens ---- */
@media (max-width: 920px) {
  .plans { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .plan .tagline, .billed { min-height: 0; }
}
@media (max-width: 700px) {
  #compare-table th, #compare-table td { padding: 11px 8px; font-size: 0.84rem; }
  #compare-table th[scope="row"] { width: 38%; }
  .payments { padding: 16px; }
  /* payments become small cards: one line per field */
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { padding: 10px 6px; border-bottom: 1px solid var(--line); }
  table.cards tr:last-child { border-bottom: 0; }
  table.cards td { border: 0; padding: 4px 12px; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  table.cards td::before { content: attr(data-label); color: var(--muted); font-size: 0.82rem; text-align: left; flex: none; }
  td .why { max-width: none; }
}
