/* v27 public pages: a shared, centered presentation rail for Roadmap and Plans. */

/* Roadmap */
.roadmap-page {
  width: min(1180px, calc(100% - 56px));
  margin-inline: auto;
}

.roadmap-page > .subtle-hero,
.roadmap-feedback-card {
  text-align: center;
}

body:not(.formal-page) .roadmap-page > .subtle-hero {
  display: grid;
  width: min(760px, 100%);
  margin: 0 auto 24px;
  justify-self: center;
  justify-items: center;
}

.roadmap-page > .subtle-hero .badge,
.roadmap-page > .subtle-hero h1,
.roadmap-page > .subtle-hero .section-intro,
.roadmap-page > .subtle-hero .small-muted {
  margin-inline: auto;
}

.roadmap-page > .subtle-hero .section-intro {
  color: var(--text);
}

.roadmap-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

/* This intentionally supersedes the v26 left-aligned roadmap cards. */
.roadmap-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.roadmap-card .card-kicker,
.roadmap-card h2 {
  width: 100%;
  text-align: center;
}

.roadmap-card ul {
  width: 100%;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.roadmap-card li {
  padding: 13px 0 0;
  color: var(--muted, var(--text-muted));
  line-height: 1.65;
}

.roadmap-card li + li {
  margin-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.roadmap-chat-modes {
  width: 100%;
  margin-top: 18px;
  color: var(--muted, var(--text-muted));
  line-height: 1.65;
}

.roadmap-chat-modes h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1rem;
}

.roadmap-chat-modes p {
  margin: 0;
}

.roadmap-feedback-card {
  max-width: 900px;
  margin-inline: auto;
}

.roadmap-feedback-card .section-intro {
  margin-inline: auto;
}

.roadmap-feedback-card .hero-actions {
  justify-content: center;
}

/* Plans */
body:not(.formal-page) .plans-hero.plans-hero-compact {
  display: grid;
  width: min(940px, calc(100% - 56px));
  justify-items: center;
  margin: 72px auto 28px;
  text-align: center;
}

body:not(.formal-page) .plans-hero.plans-hero-compact h1,
body:not(.formal-page) .plans-hero.plans-hero-compact p {
  text-align: center;
}

body:not(.formal-page) .plans-hero.plans-hero-compact p {
  max-width: 760px;
}

body:not(.formal-page) .plans-hero .plans-status {
  justify-self: center;
  margin-inline: auto;
  text-align: center;
}

body:not(.formal-page) .plans-hero .billing-actions {
  justify-content: center;
  margin-inline: auto;
}

body:not(.formal-page) .plan-comparison.plan-comparison-only {
  width: min(1160px, calc(100% - 56px));
  margin: 24px auto 56px;
}

body:not(.formal-page) .plan-comparison .comparison-title {
  max-width: 760px;
  margin-inline: auto;
  padding: 28px 22px 18px;
  text-align: center;
}

body:not(.formal-page) .comparison-grid.plan-table-grid > .comparison-row > div {
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

body:not(.formal-page) .comparison-grid.plan-table-grid > .comparison-row > div:not(:first-child) {
  justify-content: center;
}

/* Feature labels form the one deliberate exception to the centered value rail. */
body:not(.formal-page) .comparison-grid.plan-table-grid > .comparison-row > div:first-child {
  text-align: left;
}

body:not(.formal-page) .comparison-grid.plan-table-grid .comparison-head:not(:first-child),
body:not(.formal-page) .comparison-grid.plan-table-grid .comparison-action {
  justify-items: center;
  text-align: center;
}

.plan-experience-note {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  gap: 16px;
  width: min(900px, calc(100% - 56px));
  margin: 0 auto 72px;
  padding: 34px 0;
  text-align: center;
}

.plan-experience-note > div,
.plan-experience-note > p,
.plan-experience-note > p.muted {
  grid-column: auto;
  max-width: 820px;
  margin-inline: auto;
}

@media (max-width: 820px) {
  .roadmap-page,
  body:not(.formal-page) .plans-hero.plans-hero-compact,
  body:not(.formal-page) .plan-comparison.plan-comparison-only,
  .plan-experience-note {
    width: calc(100% - 28px);
  }

  .roadmap-grid { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  /* Keep all plan values visible without a viewport-wide horizontal scroll. */
  body:not(.formal-page) .comparison-grid.plan-table-grid {
    display: block;
    overflow: visible;
    font-size: 12px;
  }

  body:not(.formal-page) .comparison-grid.plan-table-grid > .comparison-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body:not(.formal-page) .comparison-grid.plan-table-grid > .comparison-row > div {
    padding: 11px 6px;
    border-left: 0 !important;
  }

  body:not(.formal-page) .comparison-grid.plan-table-grid > .comparison-row > div:first-child {
    grid-column: 1 / -1;
    padding: 12px 12px 8px;
  }

  body:not(.formal-page) .comparison-grid.plan-table-grid .comparison-head:not(:first-child) strong,
  body:not(.formal-page) .comparison-grid.plan-table-grid .comparison-head:not(:first-child) span {
    overflow-wrap: anywhere;
  }

  body:not(.formal-page) .plan-table-button {
    width: 100%;
    min-height: 42px;
    padding: 4px;
    white-space: normal;
  }

  .roadmap-feedback-card .hero-actions,
  body:not(.formal-page) .plans-hero .billing-actions {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .roadmap-card,
  .roadmap-feedback-card { padding: 22px 18px; }

  body:not(.formal-page) .comparison-grid.plan-table-grid {
    font-size: 11px;
  }
}
