:root {
  color-scheme: light dark;
  --page: #fafafa;
  --surface: #ffffff;
  --text: #050505;
  --secondary: #707070;
  --outline: #e7e7e7;
  --button: #050505;
  --button-text: #ffffff;
  --focus: #007aff;
  --included: #34c759;
  --site-header-bg: rgba(250, 250, 250, 0.82);
  --site-header-fg: #000000;
  --site-header-button-bg: #000000;
  --site-header-button-fg: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  background: var(--page);
  color: var(--text);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  flex: 1;
}

a {
  color: inherit;
}

.header-link[aria-current="page"] {
  font-weight: 600;
}

.pricing-hero,
.pricing-content {
  width: min(calc(100% - (var(--site-page-gutter) * 2)), 980px);
  margin: 0 auto;
}

.pricing-hero {
  padding-top: 82px;
  text-align: center;
}

.pricing-hero h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0;
}

.pricing-hero p {
  max-width: 500px;
  margin: 14px auto 0;
  color: var(--secondary);
  font-size: 16px;
  line-height: 1.55;
}

.pricing-content {
  padding: 68px 0 96px;
}

.pricing-period-selector {
  width: fit-content;
  margin: 0 auto 26px;
  padding: 3px;
  display: inline-flex;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  gap: 3px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
}

.pricing-period-selector button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.pricing-period-selector button[aria-pressed="true"] {
  background: var(--button);
  color: var(--button-text);
}

.pricing-period-selector button span {
  margin-left: 5px;
  font-size: 11px;
  opacity: 0.72;
}

.pricing-period-selector button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  min-width: 0;
  min-height: 240px;
  padding: 22px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.plan-card h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
}

.plan-tagline {
  min-height: 40px;
  margin: 5px 0 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.45;
}

.plan-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.plan-amount {
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.plan-interval {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 300;
  white-space: nowrap;
}

.plan-saving {
  min-height: 18px;
  margin-top: 7px;
  color: var(--included);
  font-size: 11px;
  line-height: 1.35;
}

.plan-saving[hidden] {
  display: none;
}

.plan-action,
.secondary-action {
  min-height: 42px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.plan-action {
  width: 100%;
  margin-top: 24px;
  padding: 0 14px;
  background: var(--button);
  color: var(--button-text);
}

.plan-action:hover {
  opacity: 0.78;
}

.plan-action:focus-visible,
.secondary-action:focus-visible,
.comparison-scroll:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.comparison {
  margin-top: 72px;
}

.comparison > h2 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 600;
}

.comparison-scroll {
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  height: 56px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--outline);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: break-word;
}

thead th {
  height: 48px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

th:first-child {
  width: 260px;
  padding-left: 0;
}

tbody th {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

tbody td {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 400;
}

.feature-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--included);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--included);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.feature-dash {
  color: var(--secondary);
  font-size: 15px;
  font-weight: 600;
}

.pricing-cta {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--outline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.pricing-cta h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.pricing-cta p {
  margin: 6px 0 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.5;
}

.secondary-action {
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text);
}

.secondary-action:hover {
  background: var(--outline);
}

.site-footer {
  padding: 18px var(--site-page-gutter, 88px) 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--page);
  color: var(--secondary);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #212121;
    --surface: #1c1c1c;
    --text: #ffffff;
    --secondary: #ababab;
    --outline: #2c2c2c;
    --button: #ffffff;
    --button-text: #050505;
    --site-header-bg: rgba(33, 33, 33, 0.88);
    --site-header-fg: #ffffff;
    --site-header-button-bg: #ffffff;
    --site-header-button-fg: #050505;
  }

  .site-wordmark img {
    filter: brightness(0) invert(1);
  }

  .active-link:hover {
    background: #e7e7e7;
  }

  .language-link {
    border-color: var(--outline);
    background: var(--surface);
  }

  .language-link:hover {
    border-color: var(--secondary);
    background: var(--outline);
  }
}

@media (max-width: 900px) {
  .pricing-hero {
    padding-top: 64px;
  }

  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-card {
    min-height: 220px;
  }
}

@media (max-width: 600px) {
  .pricing-hero,
  .pricing-content {
    width: calc(100% - (var(--site-page-gutter) * 2));
  }

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

  .pricing-hero {
    padding-top: 48px;
  }

  .pricing-hero h1 {
    font-size: 38px;
  }

  .pricing-hero p {
    font-size: 14px;
  }

  .pricing-content {
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .comparison,
  .pricing-cta {
    margin-top: 56px;
  }

  .pricing-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .secondary-action {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}
