/* Payment is a manual reference handoff to paypal.me / revolut.me; no card form here by design (PCI scope). */

.subscriptions-screen { display: block; position: relative; }
.subscriptions-screen .sm { font-size: 0.82rem; }
.sub-h1 { font-family: var(--font-display); font-size: 2.2rem; font-weight: 500; margin: 0 0 10px; }
.sub-h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin: 0 0 16px; }
.sub-admin-count {
  min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--amethyst, var(--bronze)); color: #fff;
  font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center;
}
.sub-back { margin-bottom: 18px; }

.sub-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.sub-lede { color: var(--ink-3); line-height: 1.6; margin: 0 auto; }
.sub-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px; margin-bottom: 20px;
  background: color-mix(in srgb, var(--bronze) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--bronze) 40%, transparent);
  border-radius: var(--radius-m);
  color: var(--bronze-2);
}

.sub-billing-row {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin-top: 22px;
}
.sub-billing-toggle {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px;
}
/* Free tier focused: monthly and yearly buy the identical nothing. */
.sub-billing-toggle.is-frozen { opacity: 0.5; }
.sub-bt:disabled { cursor: default; }
.sub-bt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 20px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2);
  font: inherit; font-size: 0.9rem; cursor: pointer;
}
.sub-bt:hover { color: var(--ink); }
.sub-bt.on { background: var(--bg-0); color: var(--ink); box-shadow: var(--shadow-1); }
.sub-bt-save {
  font-size: 0.7rem; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--laurel) 20%, transparent); color: var(--laurel-2);
}

.sub-tiers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  align-items: start; margin-bottom: 48px;
}
.sub-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px 24px 22px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
}
.sub-card { cursor: pointer; transition: border-color 0.15s ease; }
.sub-card:hover { border-color: var(--border-strong); }
.sub-card.is-selected { border-color: var(--bronze); box-shadow: var(--shadow-1); }
/* Bronze emphasis follows the VIEWER — the selected card, else their own paid plan. Never the catalog's popular tier; see _subHighlightTierId(). */
.sub-card.is-highlight {
  border-color: var(--bronze);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(184,155,95,0.12), transparent 60%),
    var(--bg-1);
  box-shadow: 0 0 0 1px rgba(184,137,58,0.25), var(--shadow-2);
}
/* Your own plan: laurel, not the bronze buy colour, so it reads "you are here" not upsell. */
.sub-card.is-current {
  border-color: var(--laurel);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--laurel) 45%, transparent), var(--shadow-1);
}
/* Paying player's card is both: laurel border over the .is-highlight bronze wash. */
.sub-card.is-current.is-highlight {
  border-color: var(--laurel-2);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--laurel) 50%, transparent), var(--shadow-2);
}
/* Two classes on purpose: sits ABOVE .sub-card-badge, so at equal specificity the later bronze fill would win and mislabel status as a buy prompt. */
.sub-card-badge.sub-card-badge-current {
  background: var(--laurel-gradient); color: #fff;
}
/* Same slot for the free floor, neutral: it states where you are without reading as a plan. */
.sub-card-badge.sub-card-badge-muted {
  background: var(--bg-2); color: var(--ink-3);
  border: 1px solid var(--border); font-weight: 600;
}
.sub-card-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: 3px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--bronze-gradient); color: var(--on-bronze);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.sub-card-name { font-family: var(--font-display); font-size: 1.35rem; color: var(--bronze-2); }
.sub-card-tag { font-size: 0.86rem; margin-top: 2px; }
.sub-card-price { display: flex; align-items: baseline; gap: 6px; margin-top: 22px; }
.sub-card-num { font-family: var(--font-display); font-size: 2.3rem; font-weight: 600; color: var(--ink); }
/* Cents raised and reduced, the shop convention. Aligned by an em-relative top rather than
   `vertical-align: super`, which lifts a display face off the cap line. */
.sub-cents {
  font-size: 0.44em; font-weight: 600;
  position: relative; top: -0.9em; left: 1px;
  letter-spacing: 0.01em;
}
/* Currency mark reduced the same way — at full 2.3rem the € outweighed the figure. */
.sub-cur { font-size: 0.55em; font-weight: 500; margin-right: 1px; }
.sub-card-per { color: var(--ink-3); font-size: 0.9rem; }
.sub-card-eq { font-size: 0.78rem; min-height: 1.2em; margin-top: 2px; }
.sub-card-perks { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.sub-card-perks li {
  position: relative; padding-left: 22px;
  font-size: 0.88rem; color: var(--ink-2); line-height: 1.4;
}
.sub-card-perks li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--laurel-2); font-weight: 700;
}
.sub-card-cta { margin-top: 24px; }
.sub-cta-block { display: block; width: 100%; padding: 12px 16px; text-align: center; }
/* FREE tier's "Your current plan": a state, not a button (no .btn/cursor); sized to the button box to keep CTA rows on one baseline. */
.sub-cta-current {
  box-sizing: border-box;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-m);
  color: var(--ink-3);
  /* .btn font metrics restated (this is NOT a .btn) so the three CTA rows share a baseline. */
  font-family: var(--font-sans);
  font-size: 0.95rem; font-weight: 500;
  /* The card is clickable and would lend its pointer to a label that does nothing. */
  cursor: default;
}

.sub-admin-feats > p.muted { margin: 0 0 22px; line-height: 1.6; }
.sub-feat-table td { vertical-align: middle; }
.sub-feat-in {
  width: 100%; min-width: 88px; box-sizing: border-box;
  padding: 5px 8px; font: inherit; font-size: 0.82rem;
  color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-s);
}
.sub-feat-in:focus {
  outline: none; border-color: var(--bronze);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bronze) 30%, transparent);
}
/* A row whose cells drive an enforced cap, not just the printed table. */
.sub-feat-cap {
  display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--lapis-2); background: color-mix(in srgb, var(--lapis) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--lapis) 40%, transparent);
  cursor: help;
}
.sub-feat-table tr.is-dirty td { background: color-mix(in srgb, var(--bronze) 7%, transparent); }
.sub-feat-built { text-align: center; }

/* Grid is ONE definition in components/list-screen.css (.sub-layout in its selector list); only cells belong here. */
/* Explicit: the rail also carries .bf-filters-rail, and battlefield.css loads after list-screen.css and wins at equal specificity. */
.sub-layout > .bf-filters-rail { grid-area: filters; }
.sub-orders-table.is-compact .sub-col-opt { display: none; }

.sub-compare { margin-bottom: 48px; }
.sub-compare .sub-h2, .sub-faq .sub-h2 { text-align: center; }
.sub-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-l); }
.sub-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 720px; }
.sub-table th, .sub-table td { padding: 11px 16px; text-align: left; }
.sub-table thead th {
  font-size: 0.68rem; letter-spacing: 0.12em; font-weight: 600;
}
.sub-th-tier, .sub-td-val { text-align: center; }
.sub-th-tier.is-popular, .sub-td-val.is-popular { background: color-mix(in srgb, var(--bronze) 7%, transparent); }
.sub-th-name {
  font-family: var(--font-display); font-size: 1rem; color: var(--bronze-2);
  text-transform: none; letter-spacing: 0;
}
.sub-th-price { font-size: 0.72rem; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.sub-row-group td {
  background: var(--bg-2); color: var(--ink-3);
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  border-top: 1px solid var(--divider);
}
.sub-table tbody tr:not(.sub-row-group) { border-top: 1px solid var(--divider); }
.sub-td-feature { color: var(--ink-2); }
.sub-yes { color: var(--laurel-2); font-weight: 700; }
.sub-no { color: var(--ink-4); }
.sub-text { color: var(--ink-2); }
/* Not-yet-built feature marker: visible, not hidden. */
.sub-soon {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); background: var(--bg-3); border: 1px solid var(--border);
  cursor: help; vertical-align: middle;
}
.sub-table tbody tr.is-unbuilt .sub-td-val { opacity: 0.55; }

.sub-faq { margin: 0 0 40px; }
/* The accordion itself is THE shared .faq-item (public-pages.css) via FaqList — nothing to
   restate here. */
.sub-foot { text-align: center; font-size: 0.82rem; padding-bottom: 20px; }

.sub-checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.sub-checkout-form {
  padding: 26px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-l);
}
.sub-fs { border: 1px solid var(--border); border-radius: var(--radius-m); padding: 16px; margin: 22px 0 0; }
.sub-fs legend {
  padding: 0 8px; font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}
.sub-fs label { display: block; margin-bottom: 12px; }
.sub-fs label > span {
  display: block; margin-bottom: 5px; font-size: 0.82rem; color: var(--ink-2);
}
.sub-input {
  width: 100%; padding: 9px 12px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--ink); font: inherit; font-size: 0.9rem;
}
.sub-err { color: var(--porphyry-2); font-size: 0.84rem; margin: 4px 0 0; }

.sub-pm-grid { display: flex; flex-direction: column; gap: 8px; }
.sub-pm {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; width: 100%;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-m);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.sub-pm:hover:not(.is-disabled) { border-color: var(--bronze); }
.sub-pm.on { border-color: var(--bronze); background: color-mix(in srgb, var(--bronze) 10%, var(--bg-2)); }
.sub-pm.is-disabled { opacity: 0.45; cursor: not-allowed; }
.sub-pm-svg { width: 30px; height: 30px; flex: none; }
.sub-pm-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sub-pm-label { font-size: 0.92rem; }
.sub-pm-desc { font-size: 0.76rem; color: var(--ink-3); }
.sub-pm-note { font-size: 0.8rem; margin: 12px 0 0; line-height: 1.5; }
/* Lives in the order summary, under the total it commits to — the panel is already CTA-width,
   so .sub-cta-block's 100% needs no cap here. */
.sub-pay { margin-top: 18px; font-size: 1rem; }
.sub-tos { font-size: 0.78rem; text-align: center; margin: 12px 0 0; line-height: 1.5; }

.sub-summary {
  position: sticky; top: 80px;
  padding: 20px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-l);
}
.sub-sum-head {
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 12px;
}
.sub-sum-name { font-family: var(--font-display); font-size: 1.3rem; color: var(--bronze-2); }
.sub-sum-period { font-size: 0.84rem; }
.sub-sum-includes {
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  margin: 16px 0 8px; font-weight: 600;
}
.sub-sum-perks { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sub-sum-perks li {
  position: relative; padding-left: 20px; font-size: 0.82rem; color: var(--ink-2); line-height: 1.35;
}
.sub-sum-perks li::before { content: '✓'; position: absolute; left: 0; color: var(--laurel-2); }
.sub-sum-line {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; font-size: 0.88rem; color: var(--ink-2);
}
.sub-sum-disc { color: var(--laurel-2); }
.sub-sum-total {
  border-top: 1px solid var(--divider); margin-top: 6px; padding-top: 12px;
  font-size: 1.05rem; color: var(--ink); font-weight: 600;
}
.sub-sum-total .mono { color: var(--gold); font-size: 1.15rem; }
.sub-sum-renewal, .sub-sum-vatnote { font-size: 0.76rem; line-height: 1.5; margin-top: 10px; }
.sub-sum-vatnote { color: var(--ink-4); }

.sub-handoff { display: flex; justify-content: center; padding: 20px 0 40px; }
.sub-handoff-card {
  max-width: 560px; width: 100%; padding: 30px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(184,155,95,0.12), transparent 60%),
    var(--bg-1);
  border: 1px solid var(--bronze); border-radius: var(--radius-l);
  text-align: center;
}
.sub-steps {
  text-align: left; margin: 18px 0; padding-left: 22px;
  color: var(--ink-2); font-size: 0.9rem; line-height: 1.7;
}
.sub-ref-box {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px; margin: 18px 0;
  background: var(--bg-2); border: 1px dashed var(--bronze); border-radius: var(--radius-m);
}
.sub-ref {
  font-size: 1.6rem; font-weight: 700; letter-spacing: 0.12em; color: var(--gold);
}
.sub-handoff-note { margin-top: 12px; line-height: 1.5; }
.sub-handoff-actions { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

.sub-manage-h1 { margin-bottom: 20px; }
.sub-manage-card {
  padding: 22px; margin-bottom: 30px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-l);
}
.sub-manage-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 12px 0; border-bottom: 1px solid var(--divider);
}
.sub-manage-row:last-of-type { border-bottom: 0; }
.sub-manage-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.sub-manage-val { font-size: 1rem; color: var(--ink); margin-top: 3px; }
.sub-manage-note { font-size: 0.82rem; margin: 12px 0 0; line-height: 1.5; }
.sub-manage-empty { text-align: center; }
.sub-manage-empty .btn { margin-top: 12px; }
.sub-empty-sm {
  padding: 18px; border: 1px dashed var(--border); border-radius: var(--radius-m);
  font-size: 0.88rem; text-align: center;
}
.sub-orders-table { min-width: 620px; }
.sub-status {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; border: 1px solid;
}
.sub-status-pending {
  background: color-mix(in srgb, var(--bronze) 14%, transparent);
  border-color: color-mix(in srgb, var(--bronze) 45%, transparent); color: var(--bronze-2);
}
.sub-status-paid {
  background: color-mix(in srgb, var(--laurel) 16%, transparent);
  border-color: color-mix(in srgb, var(--laurel) 45%, transparent); color: var(--laurel-2);
}
.sub-status-cancelled, .sub-status-expired {
  background: var(--bg-3); border-color: var(--border); color: var(--ink-3);
}

@media (max-width: 1024px) {
  .sub-tiers { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .sub-checkout-grid { grid-template-columns: 1fr; }
  .sub-summary { position: static; }
}
@media (max-width: 640px) {
  .sub-h1 { font-size: 1.6rem; }
  .sub-fs-row { grid-template-columns: 1fr; }
  .sub-ref { font-size: 1.25rem; }
}

/* subscription_tiers is the only place a plan price lives: this control re-prices the product. Admin-gated on the route. */
.sub-admin-prices { margin: 22px 0 26px; }
.sub-price-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.sub-price-row {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border); border-radius: var(--radius-m);
}
.sub-price-name {
  flex: 1 1 120px; min-width: 0;
  font-family: var(--font-display); font-size: 1.05rem; color: var(--ink);
}
.sub-price-f { display: flex; flex-direction: column; gap: 5px; flex: 0 0 auto; }
.sub-price-f > span {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
}
.sub-price-f input {
  width: 110px;
  padding: 8px 10px; font: inherit; font-size: 0.9rem;
  color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-m);
}
.sub-price-f input:focus {
  outline: none; border-color: var(--bronze);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bronze) 30%, transparent);
}
/* The free tier's price is structural, not a value someone forgot to fill in: recessed field,
   dashed edge and a not-allowed cursor, so it reads as locked rather than empty. */
.sub-price-f input:disabled {
  color: var(--ink-4);
  background: var(--bg-0);
  border-style: dashed;
  border-color: var(--border);
  cursor: not-allowed;
}
.sub-price-row.is-locked .sub-price-f > span { color: var(--ink-4); }
.sub-price-row.is-locked .btn:disabled { cursor: not-allowed; }

/* Tablet and phone: the plan shelf is THE shared carousel (components/carousel.css) and the
   compare table below narrows to whichever plan is centred. Only the card width and the table
   rules live here. Placed last in the file so it out-ranks the 1100px stacking rule at equal
   specificity. */
@media (max-width: 1024px) {
  .sub-tiers { margin-bottom: 0; }
  .sub-tiers .sub-card { flex: 0 0 62%; }
  .subscriptions-screen .car-strip { margin: 0 0 32px; }
  /* The table is one plan wide here, so the desktop min-width would force a pointless scroll. */
  .sub-table { min-width: 0; }
  /* is-focused is set by the carousel's onActive; without it every column would hide before the
     first paint. */
  .sub-compare.is-focused .sub-th-tier:not(.is-focus),
  .sub-compare.is-focused .sub-td-val:not(.is-focus) { display: none; }
  .sub-compare.is-focused tbody tr.is-off { display: none; }
}
@media (max-width: 640px) {
  .sub-tiers .sub-card { flex: 0 0 84%; }
}

/* The shared right-aligned actions column. `.sub-table th` is (0,1,1) and out-ranks the unscoped
   `.bf-actions-col`, so the alignment has to be restated at a higher specificity here — the same
   reason battlefield.css scopes its own copy. Width-capped so the column hugs the right edge
   instead of taking an equal share of the table. */
.sub-table th.bf-actions-col,
.sub-table td.bf-actions-col { text-align: right; width: 1%; white-space: nowrap; }
