.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-block: 1rem 1.5rem;
}
.page-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);  
  color: var(--text);
  margin: 0 0 0.4rem;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0; margin: 0;
  gap: 0;
  font-size: var(--fs-sm);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin-inline: 0.5rem;
  color: var(--text-subtle);
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current="page"] {
  color: var(--primary);
  font-weight: var(--fw-medium);
}
.page-header-actions { display: flex; gap: var(--space-2); }
.ico-crown {
  width: 1rem; height: 1rem;
  margin-inline-end: 0.25rem;
  vertical-align: -2px;
}

.abo-intro {
  text-align: center;
  margin-block-end: 2rem;
  padding-inline: var(--space-4);
}
.abo-intro-title {
  color: var(--primary);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-3xl);
  margin: 0 0 0.5rem;
}
.abo-intro-subtitle {
  font-size: var(--fs-xl);
  margin: 0;
  color: var(--text);
}

.plan-grid {
  display: grid;
  gap: var(--space-6);
  /* auto-fill (not auto-fit) + a capped max track keeps every card the same
     width — 1–2 cards no longer stretch to fill the whole row — and the group
     is centered. min(100%, …) lets a card shrink to full width on tiny screens. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 20rem));
  justify-content: center;
  margin-block-end: 2rem;
}
@media (min-width: 1400px) {
  .plan-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 22rem)); }
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 2rem 1.75rem;
  display: flex; flex-direction: column;
  text-align: center;
}

.plan-card-head { padding: 0; }
.plan-card-name {
  color: var(--text);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  margin: 0 0 1.25rem;
}
.plan-card-price {
  color: var(--primary);
  margin: 0;
  display: flex; align-items: baseline; justify-content: center;
  gap: 0.35rem;
}
.plan-card-price strong {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  line-height: 1.1;
}
.plan-card-period {
  font-size: var(--fs-md);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

/* Per-duration marketing description shown under the price. */
.plan-card-desc {
  color: var(--text-muted);
  font-size: var(--fs-base);
  margin: 1.25rem 0;
  flex: 1 1 auto;
}

/* Feature checklist (shown when the offer provides one). */
.plan-card-features {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  display: flex; flex-direction: column;
  gap: 0.65rem;
  text-align: start;
  flex: 1 1 auto;
}
.plan-card-features li {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: var(--fs-base);
  color: var(--text);
}
.ico-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1rem; height: 1rem;
  color: var(--success);
  flex-shrink: 0;
}
.ico-check svg { width: 1rem; height: 1rem; }

/* Grouped start-date + duration panel — soft inset, like the reference. */
.plan-card-form {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem 1.25rem;
  text-align: start;
  margin-block-end: 1.5rem;
}
.plan-card-label {
  display: block;
  text-align: start;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  margin: 0.85rem 0 0.4rem;
}
.plan-card-label:first-child { margin-block-start: 0; }
.plan-card-date-wrap,
.plan-card-select-wrap {
  display: flex; align-items: stretch;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.plan-card-date-wrap:focus-within,
.plan-card-select-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.ico-calendar {
  width: 1rem; height: 1rem;
  margin: 0 0.5rem;
  align-self: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.plan-card-input,
.plan-card-select {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
  padding: 0.6rem 0.75rem;
  outline: none;
  min-width: 0;
}
.plan-card-select { cursor: pointer; }
.plan-card-select:disabled { cursor: not-allowed; opacity: 0.7; }

/* Inline "choose a duration / start date" prompt above the CTA. Reserves a
   one-line slot even when empty so showing a message doesn't shift the button. */
.plan-card-msg {
  margin: 0 0 0.65rem;
  min-height: 1.15rem;
  color: var(--danger, var(--text));
  font-size: var(--fs-sm);
  line-height: 1.15rem;
  text-align: center;
}

.plan-card-cta {
  margin: 0;
  width: 100%;
}
.plan-card-cta app-button { width: 100%; }

/* Grid-level states (loading / error / empty) rendered in place of the cards. */
.plan-grid-loading,
.plan-grid-error,
.plan-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-6);
}
.plan-grid-error { color: var(--danger, var(--text)); }
