/* Billing pages (Phase 3). Tokens only — no hardcoded hex anywhere in
 * this file. Layout: plan cards grid on desktop, stacked on phones.
 * Tables scroll horizontally with sticky first/action columns on narrow
 * widths (pre-deploy skill: card transforms only for simple lists). */
/* v0.6.0: explicit breakpoints so the 4th card never orphans onto its
 * own row (auto-fill did exactly that at shell widths). Cards are equal
 * height: the feature list stretches and the button sits at the bottom. */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.plan-card {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface-raised);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.plan-card.current {
  border-width: 2px;
  border-color: var(--acc-d);
}

.plan-card .plan-features {
  flex: 1;
}

.plan-card .btn {
  margin-top: 16px;
}

.plan-card h3 {
  margin: 0 0 4px 0;
}

.plan-price {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0;
}

.plan-features {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.plan-features li {
  color: var(--tx-2);
}

.method-card {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface-raised);
  margin-top: 12px;
}

.method-card h3 {
  margin: 0 0 8px 0;
}

.field label {
  display: block;
  margin-bottom: 4px;
  color: var(--tx-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-raised);
  color: var(--tx);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--tx-3);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--acc-d);
  outline-offset: 2px;
}

.field {
  margin-bottom: 12px;
}

.proof-row {
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 12px;
  background: var(--surface-raised);
}

.proof-row p {
  margin: 4px 0;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 12px;
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table-scroll th,
.table-scroll td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-default);
  vertical-align: top;
}

.table-scroll th:first-child,
.table-scroll td:first-child {
  position: sticky;
  left: 0;
  background: var(--surface-raised);
}

.table-scroll th:last-child,
.table-scroll td:last-child {
  position: sticky;
  right: 0;
  background: var(--surface-raised);
}

.lock-box {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  background: var(--surface-inset);
}

@media (max-width: 1023px) {
  .plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}
