.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.features-hero {
  padding: 64px 0;
  background: radial-gradient(ellipse at 85% 50%, #e4eff0, transparent 60%), var(--mint);
}

.features-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.65fr);
  align-items: center;
  gap: clamp(28px, 6vw, 80px);
}

.features-hero h1 {
  font-size: clamp(2.7rem, 4.8vw, 4.1rem);
  line-height: 1.05;
}

.features-hero .button {
  gap: 18px;
  line-height: 1.3;
  padding-top: 12px;
  padding-bottom: 12px;
}

.features-platform {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.features-visual {
  justify-self: center;
  text-align: center;
}

.features-visual img {
  width: 188px;
  height: auto;
  margin: auto;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transform: rotate(3deg);
}

.features-visual p {
  margin: 24px 0 0;
  max-width: 240px;
  color: var(--lilac-dark);
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 700;
}

.features-comparison {
  padding: 72px 0;
}

.features-comparison,
.feature-topic {
  scroll-margin-top: 96px;
}

.plan-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 24px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

.plan-key > span {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.features-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 42px;
}

.topic-nav {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 12px;
}

.topic-nav p {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.topic-nav a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
  color: var(--muted);
}

.topic-nav a:hover {
  color: var(--lilac-dark);
  text-decoration: underline;
}

/* The shared main normally clips content, which prevents a sticky topic menu. */
.features-page main {
  overflow: visible;
}

.feature-topic + .feature-topic {
  margin-top: 54px;
}

.topic-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.topic-number {
  padding-top: 4px;
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 800;
}

.topic-heading h3 {
  margin-bottom: 8px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.topic-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.comparison-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  font-size: 0.95rem;
  line-height: 1.45;
}

.feature-column { width: 66%; }
.plan-column { width: 17%; }

.comparison-table th,
.comparison-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.comparison-table thead th {
  background: var(--mist);
  font-size: 0.85rem;
  font-weight: 800;
}

.comparison-table thead th:last-child {
  color: var(--lilac-dark);
  background: #f4eaf6;
}

.comparison-table th { text-align: left; }
.comparison-table th[scope="row"] { font-weight: 700; }
.comparison-table td,
.comparison-table thead th:not(:first-child) { text-align: center; }
.comparison-table tr:last-child > * { border-bottom: 0; }
.comparison-table tbody td:last-child { background: #fcf8fd; }

.feature-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.plan-status { font-size: 1.3rem; font-weight: 800; }
.included { color: #24655a; }
.unavailable { color: var(--muted); }

.features-notes {
  margin-top: 54px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sky);
}

.features-notes h3 { margin-bottom: 16px; }
.features-notes ul { margin: 0; padding-left: 20px; }
.features-notes li { padding: 5px 0; color: var(--muted); line-height: 1.6; }

@media (max-width: 980px) {
  .features-layout { grid-template-columns: 1fr; gap: 32px; }
  .topic-nav { position: static; max-height: none; padding: 0; }
  .topic-nav a { display: inline-block; padding: 9px 12px; margin: 0 6px 8px 0; border: 1px solid var(--line); border-radius: 8px; }
}

@media (max-width: 760px) {
  .features-hero { padding: 42px 0; }
  .features-hero-grid { grid-template-columns: 1fr; }
  .features-visual { display: none; }
  .features-comparison { padding: 48px 0; }
  .topic-heading h3 { font-size: 1.3rem; }
  .feature-column { width: 54%; }
  .plan-column { width: 23%; }
  .comparison-table th,
  .comparison-table td { padding: 13px 10px; }
  .comparison-table { font-size: 0.88rem; }
  .comparison-table thead th { font-size: 0.75rem; padding: 13px 4px; }
  .feature-detail { font-size: 0.8rem; }
  .features-notes { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .features-page .button { transition: none; }
}
