/* Shared plan-comparison table — used by BOTH the Settings billing card
   (public/js/settings.js → billMatrix) and the public Pricing page
   (public/pricing.html). Row data + body markup come from js/plan-matrix.js.
   Edit table styling here ONCE and both surfaces update. Page-specific chrome
   (period toggle, usage meters, comp banner) stays in each page's own CSS. */

.pt-wrap { overflow-x: auto; padding-top: 14px; }
.pt {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(130px, 1fr));
  min-width: 640px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface-0); overflow: visible;
}
.pt-corner { background: var(--surface-0); border-bottom: 1px solid var(--border); border-top-left-radius: 16px; }
/* Top-right cell = the last tier header (4th grid child: corner + 3 tier heads).
   The container is overflow:visible (ribbon bleeds past the top edge), so round the
   corner cells themselves — otherwise their opaque backgrounds square the corners. */
.pt > .pt-head:nth-child(4) { border-top-right-radius: 16px; }

/* Tier header cell (name · price · CTA) + bleeding ribbon */
.pt-head {
  position: relative; display: flex; flex-direction: column; gap: 9px;
  padding: 18px 16px; border-bottom: 1px solid var(--border);
  border-left: 1px solid #F0EDE7; background: var(--surface-0);
}
.pt-head.is-current { background: #FBFAF7; }
.pt-ribbon {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  font-size: var(--text-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--accent); border: 1px solid var(--accent);
  padding: 4px 11px; border-radius: 99px; white-space: nowrap; z-index: 2;
}
.pt-ribbon.grey { color: var(--text-muted); background: var(--surface-1); border-color: var(--border); }
.pt-tier-name { font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 600; color: var(--text-primary); }
.pt-price { font-family: var(--font); font-size: var(--display-md); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--text-primary); }
.pt-price small { font-family: var(--font); font-size: var(--text-lg); font-weight: 500; color: var(--text-secondary); }
.pt-price-note { display: block; font-family: var(--font); font-size: var(--text-sm); color: var(--text-muted); margin-top: -4px; }
.pt-cta {
  margin-top: auto; width: 100%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: var(--text-md); font-weight: 600; padding: 11px 16px;
  border-radius: 10px; text-decoration: none; border: 1px solid var(--border);
  color: var(--text-primary); background: var(--surface-0);
  transition: background .15s ease, border-color .15s ease; cursor: pointer;
}
.pt-cta:hover { border-color: var(--text-primary); background: var(--surface-1); }
.pt-head.featured .pt-cta { background: var(--text-primary); border-color: var(--text-primary); color: var(--surface-0); }
.pt-head.featured .pt-cta:hover { background: var(--navy-deep); }
.pt-cta.disabled, .pt-cta:disabled { background: var(--surface-1); color: var(--text-muted); cursor: default; border-color: var(--border); }

/* Body: group bands, row labels (+ descriptions), value cells */
.pt-group {
  grid-column: 1 / -1; padding: 12px 16px; font-family: var(--font); font-size: var(--text-xs);
  font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted);
  background: var(--surface-1); border-bottom: 1px solid var(--border);
}
.pt-cell {
  padding: 12px 16px; border-bottom: 1px solid #F2EFE9; font-family: var(--font);
  font-size: var(--text-md); color: var(--text-secondary); display: flex; align-items: center;
}
.pt-cell.center { justify-content: center; text-align: center; border-left: 1px solid #F6F3EE; }
.pt-cell.is-current { background: #FBFAF7; }
.pt-rowlabel {
  flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  color: var(--text-primary); font-weight: 500;
}
.pt-desc { font-size: var(--text-sm); font-weight: 400; color: var(--text-muted); line-height: 1.35; }
.pt-check { color: var(--accent); font-weight: 700; }
.pt-dash { color: var(--text-muted); }
