:root {
  --s2-ink: #0a1730;
  --s2-navy: #12244b;
  --s2-blue: #2e9bd6;
  --s2-blue-deep: #275ba8;
  --s2-paper: #f4f7fb;
  --s2-white: #ffffff;
  --s2-text: #14213a;
  --s2-muted: #65718a;
  --s2-line: #d9e2ef;
  --s2-success: #167554;
  --s2-warning: #9a5a14;
  --s2-radius: 18px;
  --s2-shadow: 0 24px 70px -42px rgba(10, 23, 48, 0.5);
}

[hidden] {
  display: none !important;
}

.sirach-section {
  padding: 110px 0;
  background:
    radial-gradient(circle at 84% 2%, rgba(46, 155, 214, 0.16), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--s2-paper) 100%);
  color: var(--s2-text);
}

.sirach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}

.sirach-copy h2,
.pricing-preview h2 {
  margin: 12px 0 22px;
  max-width: 760px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--s2-ink);
}

.sirach-copy h2 em {
  color: var(--s2-blue-deep);
  font-weight: 500;
}

.sirach-copy > p:not(.eyebrow):not(.prelaunch-note) {
  max-width: 690px;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #526078;
}

.sirach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 30px 0 18px;
}

.btn-ghost--dark {
  border-bottom-color: #90a1ba !important;
  color: var(--s2-ink) !important;
}

.prelaunch-note {
  max-width: 700px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #c8d8ea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: #55647c;
  font-size: 0.85rem;
  line-height: 1.6;
}

.prelaunch-note strong {
  color: var(--s2-blue-deep);
}

.sirach-panel {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(138, 198, 234, 0.38);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(46, 155, 214, 0.16), transparent 44%),
    var(--s2-ink);
  box-shadow: 0 34px 80px -42px rgba(10, 23, 48, 0.75);
  color: #ffffff;
}

.sirach-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(138, 198, 234, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(138, 198, 234, 0.05), 0 0 0 70px rgba(138, 198, 234, 0.03);
}

.sirach-panel > * {
  position: relative;
  z-index: 1;
}

.sirach-mark,
.page-logo {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--s2-blue), var(--s2-blue-deep));
  color: #ffffff;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  letter-spacing: -0.08em;
  box-shadow: 0 18px 34px -20px rgba(46, 155, 214, 0.9);
}

.sirach-panel > div {
  margin: 24px 0 22px;
}

.sirach-panel strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.sirach-panel p {
  margin: 8px 0 0;
  color: #b8c5d9;
  line-height: 1.7;
}

.sirach-capabilities {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sirach-capabilities li {
  padding: 13px 0 13px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #e3eaf4;
  font-size: 0.92rem;
  line-height: 1.5;
}

.sirach-capabilities li::before {
  content: "✓";
  position: absolute;
  margin-left: -28px;
  color: #8ac6ea;
  font-weight: 700;
}

.pricing-preview {
  margin-top: 96px;
}

.pricing-preview-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 32px;
}

.pricing-preview h2 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.billing-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 5px;
  border: 1px solid var(--s2-line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 12px 30px -26px rgba(10, 23, 48, 0.7);
}

.billing-toggle button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5d6b83;
  font: 600 0.76rem/1 "Inter", sans-serif;
  cursor: pointer;
}

.billing-toggle button.is-active {
  background: var(--s2-ink);
  color: #ffffff;
}

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

.plan-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--s2-shadow);
}

.plan-card--featured {
  border-color: #76b9e4;
  box-shadow: 0 28px 74px -38px rgba(31, 95, 168, 0.66);
  transform: translateY(-8px);
}

.plan-badge {
  position: absolute;
  top: -13px;
  right: 18px;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--s2-blue), var(--s2-blue-deep));
  color: #ffffff;
  font: 600 0.64rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-kicker {
  margin: 0 0 8px;
  color: var(--s2-blue-deep);
  font: 500 0.68rem/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.plan-card h3 {
  margin: 0;
  color: var(--s2-ink);
  font: 500 1.55rem/1.2 "Fraunces", Georgia, serif;
}

.plan-price {
  display: flex;
  min-height: 62px;
  align-items: end;
  gap: 8px;
  margin: 24px 0 18px;
}

.plan-price strong {
  color: var(--s2-ink);
  font: 500 2.55rem/0.95 "Fraunces", Georgia, serif;
}

.plan-price span {
  padding-bottom: 4px;
  color: var(--s2-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.plan-price--custom {
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.plan-card > p:not(.plan-kicker):not(.plan-price) {
  margin: 0;
  color: #627089;
  font-size: 0.86rem;
  line-height: 1.65;
}

.plan-card ul {
  display: grid;
  gap: 10px;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
  color: #35435b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.plan-card li {
  padding-left: 19px;
}

.plan-card li::before {
  content: "✓";
  position: absolute;
  margin-left: -19px;
  color: var(--s2-success);
  font-weight: 700;
}

.plan-cta,
.page-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 0 18px;
  border: 1px solid var(--s2-ink);
  border-radius: 8px;
  background: var(--s2-ink);
  color: #ffffff;
  font: 600 0.82rem/1 "Inter", sans-serif;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.plan-cta:hover,
.page-button:hover {
  background: var(--s2-blue-deep);
  box-shadow: 0 14px 28px -18px rgba(31, 95, 168, 0.9);
  transform: translateY(-1px);
}

.plan-card--featured .plan-cta {
  border-color: var(--s2-blue-deep);
  background: linear-gradient(135deg, var(--s2-blue), var(--s2-blue-deep));
}

.pricing-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  color: #68758c;
  font-size: 0.76rem;
  line-height: 1.55;
}

.pricing-footer p {
  max-width: 780px;
  margin: 0;
}

.pricing-footer a {
  flex: 0 0 auto;
  color: var(--s2-blue-deep);
  font-weight: 600;
  text-decoration: none;
}

/* Shared subscription and legal pages */
.site-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 88% 4%, rgba(46, 155, 214, 0.13), transparent 30%),
    var(--s2-paper);
  color: var(--s2-text);
  font-family: "Inter", Arial, sans-serif;
}

.site-page *,
.site-page *::before,
.site-page *::after {
  box-sizing: border-box;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.page-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(217, 226, 239, 0.88);
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(16px);
}

.page-header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--s2-ink);
  text-decoration: none;
}

.page-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 0.76rem;
}

.page-brand strong {
  display: block;
  font: 500 1.05rem/1.1 "Fraunces", Georgia, serif;
}

.page-brand small {
  display: block;
  margin-top: 3px;
  color: var(--s2-muted);
  font: 500 0.55rem/1.1 "IBM Plex Mono", monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.page-nav a {
  color: #45536b;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.page-nav .page-nav-cta {
  padding: 11px 15px;
  border-radius: 7px;
  background: var(--s2-ink);
  color: #ffffff;
}

.page-main {
  padding: 72px 0 96px;
}

.page-eyebrow {
  margin: 0 0 12px;
  color: var(--s2-blue-deep);
  font: 500 0.68rem/1.3 "IBM Plex Mono", monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.page-title {
  max-width: 880px;
  margin: 0;
  color: var(--s2-ink);
  font: 500 clamp(2.7rem, 6vw, 5.2rem)/0.98 "Fraunces", Georgia, serif;
  letter-spacing: -0.05em;
}

.page-intro {
  max-width: 780px;
  margin: 24px 0 0;
  color: #5e6c84;
  font-size: 1.02rem;
  line-height: 1.8;
}

.status-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 28px 0 0;
  padding: 15px 17px;
  border: 1px solid #e4c28a;
  border-radius: 12px;
  background: #fff9eb;
  color: #76501d;
  font-size: 0.82rem;
  line-height: 1.55;
}

.status-banner strong {
  color: #6d4310;
}

.page-pricing {
  margin-top: 54px;
}

.page-section {
  margin-top: 64px;
}

.page-section h2,
.checkout-card h2,
.legal-document h2 {
  margin: 0 0 18px;
  color: var(--s2-ink);
  font: 500 2rem/1.15 "Fraunces", Georgia, serif;
}

.feature-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius);
  background: #ffffff;
  box-shadow: var(--s2-shadow);
}

.feature-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.feature-table th,
.feature-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #e7edf5;
  text-align: center;
}

.feature-table th:first-child,
.feature-table td:first-child {
  width: 34%;
  text-align: left;
}

.feature-table thead th {
  background: #edf3fa;
  color: var(--s2-ink);
  font-weight: 700;
}

.feature-table tbody tr:last-child td {
  border-bottom: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.faq-grid details {
  padding: 20px;
  border: 1px solid var(--s2-line);
  border-radius: 14px;
  background: #ffffff;
}

.faq-grid summary {
  color: var(--s2-ink);
  font-weight: 700;
  cursor: pointer;
}

.faq-grid p {
  margin: 14px 0 0;
  color: #627089;
  font-size: 0.86rem;
  line-height: 1.7;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1.2fr);
  gap: 34px;
  align-items: start;
  margin-top: 48px;
}

.order-summary,
.checkout-card,
.legal-document,
.result-card {
  padding: 30px;
  border: 1px solid var(--s2-line);
  border-radius: var(--s2-radius);
  background: #ffffff;
  box-shadow: var(--s2-shadow);
}

.order-summary {
  position: sticky;
  top: 108px;
}

.order-summary-label {
  margin: 0;
  color: var(--s2-blue-deep);
  font: 500 0.66rem/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.order-summary h2 {
  margin: 9px 0 4px;
  color: var(--s2-ink);
  font: 500 2rem/1.1 "Fraunces", Georgia, serif;
}

.order-summary-price {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 20px 0;
}

.order-summary-price strong {
  color: var(--s2-ink);
  font: 500 2.8rem/0.95 "Fraunces", Georgia, serif;
}

.order-summary-price span {
  padding-bottom: 4px;
  color: var(--s2-muted);
  font-size: 0.76rem;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--s2-line);
  list-style: none;
  color: #526078;
  font-size: 0.83rem;
  line-height: 1.5;
}

.summary-list li {
  padding-left: 20px;
}

.summary-list li::before {
  content: "✓";
  position: absolute;
  margin-left: -20px;
  color: var(--s2-success);
  font-weight: 700;
}

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

.form-field {
  display: grid;
  gap: 8px;
}

.form-field--wide,
.form-actions,
.form-consent,
.form-message {
  grid-column: 1 / -1;
}

.form-field span {
  color: #43516a;
  font-size: 0.72rem;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #cfd9e7;
  border-radius: 8px;
  outline: 0;
  background: #fbfcfe;
  color: var(--s2-text);
  font: 500 0.87rem/1.4 "Inter", sans-serif;
}

.form-field textarea {
  min-height: 100px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--s2-blue);
  box-shadow: 0 0 0 3px rgba(46, 155, 214, 0.13);
}

.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #627089;
  font-size: 0.76rem;
  line-height: 1.5;
}

.form-consent input {
  margin-top: 2px;
}

.form-consent a {
  color: var(--s2-blue-deep);
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.form-actions .page-button {
  min-width: 220px;
  border: 0;
  cursor: pointer;
}

.form-security {
  color: #708098;
  font-size: 0.72rem;
  line-height: 1.45;
}

.form-message {
  display: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.form-message.is-visible {
  display: block;
}

.form-message.is-error {
  background: #fff1ef;
  color: #8e352b;
}

.form-message.is-working {
  background: #edf6ff;
  color: #275986;
}

.result-card {
  max-width: 760px;
  margin: 52px auto 0;
  text-align: center;
}

.result-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #e7f7f0;
  color: var(--s2-success);
  font-size: 1.8rem;
  font-weight: 800;
}

.result-card h1 {
  margin: 0;
  color: var(--s2-ink);
  font: 500 2.8rem/1.05 "Fraunces", Georgia, serif;
}

.result-card p {
  color: #627089;
  line-height: 1.75;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.payment-safety-note {
  max-width: 620px;
  margin: 24px auto 0;
  padding: 18px 20px;
  border: 1px solid #b9d9cd;
  border-radius: 12px;
  background: #eff9f5;
  color: #315e50;
  text-align: left;
}

.fulfillment-card {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(48, 124, 92, 0.28);
  border-radius: 14px;
  background: #f4faf7;
  text-align: left;
}

.activation-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: #0c2139;
  color: #fff;
  overflow-wrap: anywhere;
}

.activation-result code {
  display: block;
  margin-top: 0.75rem;
  font: 600 0.95rem/1.5 "IBM Plex Mono", monospace;
  user-select: all;
}

.payment-safety-note strong {
  color: var(--s2-success);
}

.payment-safety-note p {
  margin: 6px 0 0;
  color: #456d60;
}

.paypal-checkout-card {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 22px;
  border: 1px solid #bfd5eb;
  border-radius: 14px;
  background: #f5f9ff;
}

.paypal-checkout-card h3 {
  margin: 4px 0 8px;
  color: var(--s2-ink);
  font: 600 1.05rem/1.3 "Inter", sans-serif;
}

.paypal-status {
  margin: 0 0 16px;
  color: #52647d;
  font-size: 0.84rem;
  line-height: 1.55;
}

.paypal-status[data-state="ready"] {
  color: var(--s2-success);
}

.paypal-status[data-state="error"] {
  color: #a33d2d;
}

.paypal-button-host {
  min-height: 44px;
}

.paypal-button-host:empty {
  min-height: 0;
}

.page-button--secondary {
  border-color: #c8d4e3;
  background: #ffffff;
  color: var(--s2-ink);
}

.legal-document {
  max-width: 900px;
  margin-top: 48px;
  padding: clamp(28px, 5vw, 56px);
}

.legal-document h1 {
  margin: 0 0 12px;
  color: var(--s2-ink);
  font: 500 clamp(2.5rem, 5vw, 4.2rem)/1 "Fraunces", Georgia, serif;
}

.legal-document .legal-meta {
  margin-bottom: 32px;
  color: var(--s2-muted);
  font-size: 0.78rem;
}

.legal-document h2 {
  margin-top: 34px;
  font-size: 1.55rem;
}

.legal-document h3 {
  margin: 25px 0 10px;
  color: var(--s2-ink);
  font-size: 1rem;
}

.legal-document p,
.legal-document li {
  color: #4f5e76;
  font-size: 0.9rem;
  line-height: 1.8;
}

.legal-document ul,
.legal-document ol {
  padding-left: 22px;
}

.legal-notice {
  margin: 22px 0 30px;
  padding: 15px 17px;
  border: 1px solid #e4c28a;
  border-radius: 10px;
  background: #fff9eb;
  color: #76501d !important;
}

.page-footer {
  padding: 34px 0 46px;
  border-top: 1px solid var(--s2-line);
  color: var(--s2-muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.page-footer-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.page-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.page-footer a {
  color: #4f5e76;
  text-decoration: none;
}

@media (max-width: 1080px) {
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-card--featured {
    transform: none;
  }
}

@media (max-width: 900px) {
  .sirach-section {
    padding: 82px 0;
  }

  .sirach-grid,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .pricing-preview {
    margin-top: 72px;
  }

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

  .order-summary {
    position: static;
  }

  .page-nav a:not(.page-nav-cta) {
    display: none;
  }
}

@media (max-width: 680px) {
  .plan-grid,
  .faq-grid,
  .checkout-form {
    grid-template-columns: 1fr;
  }

  .pricing-footer,
  .page-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-toggle {
    width: 100%;
    border-radius: 16px;
  }

  .billing-toggle button {
    flex: 1 1 50%;
    padding: 0 10px;
  }

  .plan-card {
    padding: 24px;
  }

  .sirach-panel {
    padding: 26px;
  }

  .page-shell {
    width: min(100% - 28px, 1180px);
  }

  .page-header-inner {
    min-height: 70px;
  }

  .page-brand small {
    display: none;
  }

  .page-main {
    padding: 52px 0 72px;
  }

  .checkout-card,
  .order-summary,
  .legal-document,
  .result-card {
    padding: 24px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .page-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-cta,
  .page-button {
    transition: none;
  }
}
