:root {
  --paper: #ffffff;
  --section: #f5f7fb;
  --ink: #090f20;
  --muted: #556078;
  --line: #dce1eb;
  --accent: #064bff;
  --accent-hover: #003bc9;
  --accent-soft: #edf3ff;
  --accent-ink: #193b8a;
  --ok-bg: #ecfdf3;
  --ok-ink: #0f5c34;
  --ok-border: #bbf0d0;
  --warn-bg: #f8f9fc;
  --warn-ink: #344054;
  --code-bg: #0c1326;
  --code-ink: #e6edf8;
  --code-muted: #93a2be;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container: 1080px;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

code {
  font-size: 0.9em;
  background: var(--section);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--ink);
  word-break: break-word;
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 13px;
  word-break: normal;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 750;
  font-size: 19px;
  letter-spacing: -0.025em;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
}

.brand-mark span {
  color: #5585ff;
}

.brand-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-sm {
  padding: 9px 15px;
  font-size: 13.5px;
}

.btn-primary {
  background: var(--accent);
  color: var(--paper);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--section);
  border-color: #c2cad8;
}

/* Hero */
.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 780;
  max-width: 860px;
}

.hero h1 .accent-line {
  color: var(--accent);
}

.hero-lead {
  font-size: 18.5px;
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 28px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-meta {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

/* Sections */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.section-alt {
  background: var(--section);
}

.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16.5px;
}

/* Deliverable cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* 3-Step Workflow */
.workflow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.code-panel {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #1e2946;
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #111a33;
  border-bottom: 1px solid #1f2c4f;
  font-size: 13px;
  color: var(--code-muted);
}

.code-bar span {
  overflow-x: auto;
  white-space: nowrap;
}

.copy-btn {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--code-ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

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

.code-col {
  min-width: 0;
  padding: 18px 20px;
  overflow-x: auto;
}

.code-col + .code-col {
  border-left: 1px solid #1f2c4f;
}

.code-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--code-muted);
  margin-bottom: 10px;
  font-weight: 650;
}

.code-col pre {
  margin: 0;
  line-height: 1.65;
  white-space: pre;
}

/* Functional Boundaries */
.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.boundary-box {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.boundary-box.included {
  border-top: 4px solid #16a34a;
}

.boundary-box.excluded {
  border-top: 4px solid #475467;
}

.boundary-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 9px;
  border-radius: 5px;
  margin-bottom: 14px;
}

.boundary-box.included .boundary-badge {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border: 1px solid var(--ok-border);
}

.boundary-box.excluded .boundary-badge {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--line);
}

.boundary-box h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

.boundary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.boundary-list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--muted);
}

.boundary-list li strong {
  color: var(--ink);
}

.boundary-box.included .boundary-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #16a34a;
  font-weight: 800;
}

.boundary-box.excluded .boundary-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: #475467;
  font-weight: 700;
}

/* Pricing & Calculator */
.pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 24px;
  align-items: start;
}

.quota-panel,
.rates-panel {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.quota-panel h3,
.rates-panel h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.panel-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14.5px;
}

.preset-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.preset-btn {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.preset-btn:hover {
  border-color: #aeb9ce;
}

.preset-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.preset-amount {
  display: block;
  font-size: 20px;
  font-weight: 750;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.preset-label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.custom-field {
  margin-bottom: 20px;
}

.custom-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
}

.amount-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 0 12px;
}

.amount-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 75, 255, 0.12);
}

.currency-prefix,
.currency-suffix {
  font-weight: 650;
  color: var(--muted);
  font-size: 15px;
}

.amount-input-wrap input {
  width: 100%;
  border: 0;
  outline: none;
  font-family: inherit;
  font-size: 18px;
  font-weight: 650;
  color: var(--ink);
  padding: 11px 8px;
  background: transparent;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.field-error {
  margin: 6px 0 0;
  font-size: 13px;
  color: #b42318;
  font-weight: 500;
}

.quota-summary {
  background: var(--section);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
  font-size: 14px;
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  color: var(--ink);
  text-align: right;
}

.quota-cta {
  width: 100%;
  padding: 14px 20px;
  font-size: 15.5px;
  white-space: normal;
  text-align: center;
}

.quota-legal-note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* Rate schedule table */
.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rate-table th,
.rate-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.rate-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.rate-price {
  white-space: nowrap;
  font-weight: 700;
  color: var(--ink);
}

.fulfillment-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13.5px;
}

.fulfillment-list li {
  margin-bottom: 7px;
}

/* Support & FAQ */
.support-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--section);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}

.support-bar h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.support-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* Footer */
.site-footer {
  padding: 44px 0 52px;
  background: var(--paper);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.mor-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* Legal Document Pages */
.legal-page {
  padding: 56px 0 72px;
}

.legal-doc {
  max-width: 760px;
}

.legal-doc h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.legal-updated {
  margin: 0 0 32px;
  font-size: 14px;
  color: var(--muted);
}

.legal-callout {
  background: var(--section);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
  font-size: 14.5px;
}

.legal-doc h2 {
  margin: 34px 0 12px;
  font-size: 21px;
  letter-spacing: -0.015em;
}

.legal-doc p,
.legal-doc li {
  color: #253046;
  font-size: 15.5px;
}

.legal-doc ul {
  padding-left: 22px;
}

.legal-doc li {
  margin-bottom: 8px;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 15, 32, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
}

.modal-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(9, 15, 32, 0.22);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
}

.modal-order-box {
  background: var(--section);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.modal-field {
  margin-bottom: 14px;
}

.modal-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-field input[type="email"] {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
}

.modal-field input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.modal-check input {
  margin-top: 3px;
}

.modal-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13.5px;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .grid-2,
  .boundary-grid,
  .pricing-layout,
  .code-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .code-col + .code-col {
    border-left: 0;
    border-top: 1px solid #1f2c4f;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 48px 0 44px;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 16px;
  }

  .brand {
    font-size: 17px;
  }

  .header-actions {
    gap: 6px;
  }

  .btn-sm {
    padding: 8px 11px;
    font-size: 12.5px;
  }

  .preset-group {
    grid-template-columns: 1fr;
  }

  .quota-panel,
  .rates-panel,
  .card,
  .boundary-box {
    padding: 20px;
  }
}
