:root {
  --navy: #0b1b3b;
  --navy-soft: #18243f;
  --orange: #f5a21a;
  --light: #f4f7fb;
  --white: #ffffff;
  --gray: #5f6673;
  --border: #dbe3ef;
  --shadow: 0 18px 45px rgba(11, 27, 59, 0.12);
  --success: #0f8a4b;
  --warning: #a66a00;
  --danger: #b42318;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--navy-soft);
  background: linear-gradient(180deg, #ffffff 0%, #eef3f9 100%);
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: rgba(255,255,255,0.95); border-bottom: 4px solid var(--orange); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(8px); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo-link { padding: 14px 0; }
.logo { width: clamp(190px, 24vw, 360px); max-height: 88px; object-fit: contain; }
.main-nav { display: flex; align-items: center; gap: 18px; font-weight: 700; color: var(--navy); }
.main-nav > a, .nav-group > span, .nav-text-button { padding: 12px 18px; border-radius: 999px; transition: 0.2s ease; }
.main-nav > a.active, .main-nav > a:hover, .nav-group.active > span, .nav-group > span:hover, .nav-text-button:hover { background: var(--orange); color: var(--white); }
.main-nav > a.nav-cta-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  max-width: 290px;
  padding: 11px 18px;
  border: 1px solid #cf830f;
  background: linear-gradient(135deg, #f5a21a 0%, #e28e10 100%);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(226, 142, 16, 0.28);
}
.main-nav > a.nav-cta-menu:hover,
.main-nav > a.nav-cta-menu:focus-visible {
  background: linear-gradient(135deg, #f8b238 0%, #ea9a1e 100%);
  color: var(--white);
  transform: translateY(-1px);
}
.nav-group { position: relative; }
.nav-group > span { display: inline-block; cursor: pointer; }
.nav-group::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  padding: 12px; border-radius: 18px; background: var(--white); box-shadow: var(--shadow);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.25s;
}
.nav-dropdown a, .nav-dropdown__action {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
}
.nav-dropdown__action {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-dropdown a:hover, .nav-dropdown__action:hover { background: var(--light); color: var(--orange); }
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.nav-inline-form { display: inline; }
.nav-text-button { border: 0; background: transparent; color: var(--navy); cursor: pointer; font-weight: 700; }
.nav-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  padding: 0;
  transition: 0.2s ease;
}
.nav-icon-button:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}
.nav-icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; margin: 4px 0; background: var(--navy); border-radius: 999px; }
.page-shell { min-height: calc(100vh - 164px); }
.page-shell__inner { padding-top: 20px; }
.hero, .page-section { padding: clamp(44px, 7vw, 72px) 0; }
.hero { background: radial-gradient(circle at top left, rgba(245,162,26,0.16), transparent 25%), linear-gradient(135deg, #ffffff 0%, #edf3fa 100%); }
.hero-grid, .split-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 34px; align-items: center; }
.hero-card, .panel, .calculator-card, .table-card { background: var(--white); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.hero-card { padding: clamp(28px, 4vw, 42px); }
.eyebrow { color: var(--orange); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; margin: 0 0 12px; }
.h1, h1 { margin: 0 0 18px; font-size: clamp(2.1rem, 4vw, 4.25rem); line-height: 1.05; color: var(--navy); }
.h2, h2 { margin: 0 0 16px; font-size: clamp(1.7rem, 3vw, 2.75rem); color: var(--navy); }
.lead { color: var(--gray); font-size: 1.1rem; }
.button-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.button, .button-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 800; cursor: pointer; border: 2px solid var(--navy); }
.button { background: var(--navy); color: var(--white); }
.button--accent { background: var(--orange); border-color: var(--orange); color: var(--white); }
.button-secondary { background: transparent; color: var(--navy); }
.button--danger { background: #fff1f2; border-color: #fecdd3; color: var(--danger); }
.hero-image, .visual-card { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.hero-image img, .visual-card img { width: 100%; height: 100%; object-fit: cover; }
.page-header { margin-bottom: 26px; }
.page-subtitle { color: var(--gray); max-width: 760px; }
.flash { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 18px; margin-bottom: 18px; border: 1px solid var(--border); }
.flash--success { background: #ecfdf3; color: var(--success); }
.flash--warning { background: #fffaeb; color: var(--warning); }
.flash--error { background: #fff4f4; color: var(--danger); }
.flash__close { background: transparent; border: 0; font-size: 1.4rem; cursor: pointer; color: inherit; }
.flash__list { margin: 10px 0 0 18px; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 26px 0; }
.summary-card { padding: 20px; background: var(--white); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.summary-card__label { color: var(--gray); font-size: 0.92rem; }
.summary-card__value { color: var(--navy); font-size: 2rem; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; color: var(--navy); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #b9c7d8; border-radius: 14px; padding: 13px 14px; background: #fff; }
.field input.input-error, .field select.input-error, .field textarea.input-error { border-color: var(--danger); background: #fff7f7; }
.field textarea { min-height: 120px; resize: vertical; }
.field-error { color: var(--danger); font-size: 0.9rem; font-weight: 700; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
[data-contact-us-modal] .form-actions {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}
[data-contact-us-modal] .button,
[data-contact-us-modal] .button-secondary {
  min-width: 120px;
  flex: 0 0 auto;
}
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.checkbox-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fbfdff; }
.table-card { padding: 18px; overflow-x: auto; }
.table-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 840px; }
.data-table th, .data-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table th { color: var(--navy); font-size: 0.92rem; background: #f8fbff; }
.data-table tr:hover td { background: #f8fbff; }
.data-table tr[data-record-modal-row] { cursor: pointer; }
.data-table tr[data-record-modal-row]:hover td { background: #eef5ff; }
.record-modal__list { display: grid; gap: 12px; margin: 0; }
.record-modal__item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fbfdff; }
.record-modal__item dt { font-size: 0.84rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.record-modal__item dd { margin: 0; color: var(--navy-soft); word-break: break-word; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.badge--ok { background: #ecfdf3; color: var(--success); }
.badge--off { background: #fff4f4; color: var(--danger); }
.card-stack { display: grid; gap: 22px; }
.calculator-card { padding: 28px; }
.calculator-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 160px 160px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.calculator-row:last-child { border-bottom: 0; }
.calculator-row input[type='text'], .calculator-row input[type='number'] { width: 100%; padding: 12px 14px; border: 1px solid #b9c7d8; border-radius: 14px; }
.result-box { width: 100%; padding: 12px 14px; border-radius: 14px; background: #edf4fb; border: 1px solid #b7cae2; font-weight: 800; color: var(--navy); }
.total-box { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin-top: 22px; font-weight: 800; color: var(--navy); }
.total-box input { width: 220px; padding: 14px; border-radius: 16px; border: 1px solid #b7cae2; background: #edf4fb; font-size: 1.15rem; font-weight: 800; }
.courier-section-copy, .courier-selection-status { margin: 0; }
.courier-selection-status { margin-bottom: 16px; }
.courier-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.courier-modal__backdrop { position: absolute; inset: 0; background: rgba(11, 27, 59, 0.45); }
.courier-modal__panel {
  position: relative;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.record-inline-editor-shell {
  width: 100%;
}
.record-inline-editor {
  width: 100%;
  max-width: none;
  margin: 16px 0 22px;
}
.record-inline-editor__title {
  margin-top: 0;
  margin-bottom: 12px;
}
.record-inline-editor__details {
  margin-bottom: 16px;
}
.record-inline-editor__details .record-modal__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.record-inline-editor__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.record-inline-editor__actions {
  justify-content: flex-end;
  margin-top: 10px;
}
.info-note { padding: 16px 18px; border-left: 4px solid var(--orange); background: #fffaf0; border-radius: 0 18px 18px 0; color: var(--navy); }
.site-footer { background: var(--navy); color: rgba(255,255,255,0.88); padding: 30px 0; margin-top: 64px; }
.footer-copy { text-align: right; }
.panel { padding: 28px; }
.list-clean { margin: 0; padding-left: 18px; }
.muted { color: var(--gray); }
.auth-shell { max-width: 780px; margin: 0 auto; }
.hidden { display: none !important; }
body.is-modal-open { overflow: hidden; }
.global-search-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
}
.global-search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 27, 59, 0.45);
}
.global-search-modal__panel {
  position: relative;
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
}
.global-search-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.global-search-modal__results {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.global-search-result {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: #f9fbff;
  color: var(--navy);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.global-search-result:hover {
  background: #eef5ff;
  border-color: #bfd3f2;
}

.module-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.module-button-grid.scripts-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.module-group-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fbfdff;
  margin-bottom: 12px;
}

.module-group-card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.05rem;
}

.module-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-chip {
  border: 1px solid #c6d7ee;
  background: #eef5ff;
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.module-chip:hover {
  background: #deedff;
}

.spreadsheet-table th,
.spreadsheet-table td {
  white-space: nowrap;
}

#paypal-button-container {
  min-height: 56px;
  position: relative;
  z-index: 1;
}

#paypal-button-container iframe {
  max-width: 100%;
}

@media (max-width: 960px) {
  .hero-grid, .split-grid, .summary-strip, .form-grid, .form-grid--three, .checkbox-grid, .calculator-row {
    grid-template-columns: 1fr;
  }
  .main-nav {
    position: absolute; top: 100%; right: 16px; left: 16px; display: none; flex-direction: column; align-items: stretch;
    background: var(--white); padding: 16px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border);
  }
  .main-nav.is-open { display: flex; }
  .nav-group:hover .nav-dropdown { display: none; }
  .nav-group::after { display: none; }
  .nav-dropdown {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    padding: 8px 0 0 12px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }
  .nav-toggle { display: block; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-copy { text-align: left; }
}

@media (min-width: 1280px) {
  .record-inline-editor__form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .record-inline-editor__details .record-modal__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
