/* dabadata pricing page - page-specific rules only. Loads after /www/site.css,
   which holds the tokens, header, hero, sections, comparison tables, bar chart and footer. */

/* The plan cards overlap the bottom of the hero. */
.hero { padding-bottom: calc(80px + 88px); }

/* Billing toggle with a sliding highlight */
.billing-toggle {
  position: relative; display: inline-flex; gap: 2px; margin-top: 36px; padding: 4px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
.toggle-slider {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 999px; background: var(--bright);
  box-shadow: 0 6px 20px -6px rgba(60, 207, 110, 0.6);
}
.billing-toggle.ready .toggle-slider { transition: transform 200ms ease, width 200ms ease; }
.billing-toggle:not(.js) .toggle-slider { display: none; }
.billing-toggle button {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 20px; border: 0; border-radius: 999px; cursor: pointer;
  color: rgba(255, 255, 255, 0.75); background: transparent;
  transition: color 200ms ease;
}
.billing-toggle button:hover { color: #fff; }
.billing-toggle button[aria-pressed="true"] { color: var(--bright-ink); }
.billing-toggle:not(.js) button[aria-pressed="true"] { background: var(--bright); }
.pill {
  display: inline-block;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(60, 207, 110, 0.16); color: var(--bright);
  transition: background 200ms ease, color 200ms ease;
}
.billing-toggle button[aria-pressed="true"] .pill { background: rgba(6, 38, 17, 0.14); color: var(--bright-ink); }
body[data-period="annual"] .pill { animation: pill-pop 220ms ease-out; }
@keyframes pill-pop { from { transform: scale(0.9); } to { transform: scale(1); } }

/* ---- plan cards ---- */
.plans {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px;
  align-items: stretch; margin-top: -80px;
  /* Wider than the rest of the page: five cards at 1180px were ~200px each
     and every limit line wrapped. */
  max-width: 1480px;
}
.price .amount-text { font-size: 2.1rem; letter-spacing: 0; }
.plan {
  --lift: 0px;
  position: relative; display: flex; flex-direction: column;
  padding: 26px 18px 22px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateY(var(--lift));
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.plan:hover { transform: translateY(calc(var(--lift) - 4px)); box-shadow: var(--shadow-hover); }
.beta-note { margin-top: 22px; }
.plan h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.plan .who { margin: 6px 0 0; min-height: 4.5em; font-size: 13.5px; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; white-space: nowrap; }
.price .amount {
  font-family: var(--mono); font-weight: 500; font-size: 2.75rem; line-height: 1;
  letter-spacing: -0.05em; font-variant-numeric: tabular-nums;
}
.price .per, .price .from { font-size: 14px; color: var(--muted); }
.billed { margin: 8px 0 0; font-size: 12.5px; color: var(--faint); min-height: 1.5em; }

/* The plan buttons are full width. */
.plan .btn { display: block; margin: 20px 0 4px; padding: 11px 14px; }

.limits { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: 13px; }
.limits li { position: relative; padding: 5px 0 5px 28px; color: var(--muted); }
.limits li b { color: var(--text); font-weight: 600; }
.limits li::before {
  content: "✓"; position: absolute; left: 0; top: 5px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; line-height: 1;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.limits li.none::before, .limits li.note::before {
  content: "-"; color: var(--faint); background: color-mix(in srgb, var(--faint) 15%, transparent);
}

/* Pro: solid dark green in both themes */
.plan.featured {
  --lift: -12px;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.74);
  --faint: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.14);
  --accent: var(--bright);
  background: var(--pro); border-color: var(--pro); color: var(--text);
  box-shadow: 0 30px 60px -28px rgba(12, 59, 34, 0.85);
}
.plan.featured:hover { box-shadow: 0 40px 70px -28px rgba(12, 59, 34, 0.95); }
.plan.featured :focus-visible { outline-color: var(--bright); }
.badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; background: var(--bright); color: var(--bright-ink);
  box-shadow: 0 6px 18px -6px rgba(60, 207, 110, 0.7);
}

/* ---- overage table ---- */
.table-card {
  margin-top: 32px; border-radius: 16px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.overage { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.overage th, .overage td { padding: 15px 22px; text-align: left; border-top: 1px solid var(--line); }
.overage thead th {
  border-top: 0; background: var(--bg-soft);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.overage tbody th { font-weight: 500; }
.overage td { text-align: right; white-space: nowrap; color: var(--muted); font-size: 13px; }
.overage thead th:last-child { text-align: right; }
.overage td b { color: var(--text); font-size: 16px; font-weight: 500; }
.overage tbody tr { transition: background 150ms; }
.overage tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--card)); }

/* ---- FAQ ---- */
.faq { margin-top: 32px; border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
  transition: box-shadow 200ms ease, background 200ms ease;
}
.faq details[open] {
  box-shadow: inset 3px 0 0 var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 56px 20px 18px; font-weight: 600; font-size: 16px;
  transition: color 200ms ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 14px; top: 50%;
  width: 28px; height: 28px; margin-top: -14px; line-height: 26px; text-align: center; border-radius: 50%;
  border: 1px solid var(--line); color: var(--accent); font-weight: 400; font-size: 20px;
  transition: transform 200ms ease, background 200ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline-offset: -2px; border-radius: 6px; }
.faq details p { margin: 0; padding: 0 56px 22px 18px; color: var(--muted); }
.faq + .fine { margin-top: 28px; }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .plan .who { min-height: 0; }
  .plan.featured { --lift: 0px; }
  /* The fifth card spans both columns on tablet so the grid has no hole. */
  .plan:last-child { grid-column: 1 / -1; }
  .plan:last-child .limits { columns: 2; column-gap: 24px; }
  .plan:last-child .limits li { break-inside: avoid; }
}

@media (max-width: 640px) {
  .hero { padding-bottom: calc(80px + 88px); }
  .billing-toggle button { padding: 9px 16px; }
  .plans { grid-template-columns: 1fr; gap: 24px; }
  .plan:last-child { grid-column: auto; }
  .plan:last-child .limits { columns: 1; }
  .overage th, .overage td { padding: 12px 14px; }
  .faq summary { font-size: 15px; padding-left: 14px; padding-right: 50px; }
  .faq details p { padding-left: 14px; padding-right: 14px; }
}

/* Planned features (file storage, 2026-10-15): marked until they ship. */
.soon { display: inline-block; margin-left: .35em; padding: 0 .4em; border-radius: 4px; font: 500 .68em/1.6 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; color: var(--accent, #3ddc84); border: 1px solid currentColor; opacity: .85; vertical-align: .15em; }
