:root {
  --ink: #102a33;
  --muted: #5f6f75;
  --line: #d7e3e5;
  --soft: #eef6f6;
  --input: #fff5c9;
  --brand: #123a4a;
  --brand-2: #1f6f78;
  --brand-3: #bde8b7;
  --bg: #f8fbfb;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.hidden {
  display: none !important;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.site-nav nav,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.hero-site {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 420px;
  gap: 36px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 560px;
  padding: 36px 0 70px;
}

.sales-hero {
  padding-top: 54px;
}

.hero-site h1 {
  max-width: 760px;
  font-size: 54px;
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--brand);
}

.hero-site p {
  max-width: 680px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.hero-proof {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-proof span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 11px;
}

.hero-card {
  background: var(--brand);
  color: var(--white);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 60px rgba(18, 58, 74, 0.18);
}

.hero-photo {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  padding: 0;
  background: var(--brand);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 42, 51, 0.05), rgba(16, 42, 51, 0.78));
}

.hero-photo img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
  display: block;
}

.hero-photo > span,
.hero-photo > strong,
.hero-photo > ul {
  position: relative;
  z-index: 1;
  width: calc(100% - 48px);
  margin-left: 24px;
  margin-right: 24px;
}

.hero-photo > span {
  display: block;
  margin-top: -180px;
}

.hero-photo > ul {
  margin-bottom: 24px;
}

.hero-result {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.hero-result span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.hero-result strong {
  display: block;
  max-width: 360px;
  margin-top: 8px;
  color: var(--white);
  font-size: 30px;
  line-height: 1.05;
}

.hero-result p {
  max-width: 360px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.45;
}

.legacy-hero-list {
  display: none;
}

.hero-card span {
  opacity: 0.75;
  font-size: 13px;
}

.hero-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.hero-card li {
  margin: 12px 0;
  line-height: 1.4;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 50px;
}

.value-grid article,
.auth-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.value-grid h2 {
  margin-bottom: 8px;
}

.value-grid p,
.auth-card p {
  color: var(--muted);
  line-height: 1.5;
}

.pricing-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 64px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading.centered {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-heading h2 {
  font-size: 28px;
  line-height: 1.2;
  color: var(--brand);
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.billing-note {
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
}

.billing-toggle {
  display: flex;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 4px;
}

.billing-toggle button {
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  background: transparent;
  color: var(--brand);
}

.billing-toggle button.active {
  background: var(--brand);
  color: var(--white);
}

.billing-toggle span {
  margin-left: 5px;
  color: var(--brand-3);
  font-size: 11px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pricing-grid article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.pricing-grid .featured-plan {
  position: relative;
  border-color: var(--brand-2);
  box-shadow: 0 16px 44px rgba(31, 111, 120, 0.14);
  transform: translateY(-8px);
}

.pricing-grid span,
.plan-status span,
.upgrade-strip span {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pricing-grid strong {
  color: var(--brand);
  font-size: 25px;
  line-height: 1.1;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 0 4px;
}

.plan-price strong {
  color: var(--brand);
  font-size: 38px;
  line-height: 1;
}

.plan-price small {
  color: var(--muted);
  font-weight: 800;
}

.annual-detail {
  min-height: 20px;
  color: var(--brand-2) !important;
  font-size: 13px;
  font-weight: 800;
}

.pricing-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-grid ul {
  display: grid;
  gap: 9px;
  margin: 4px 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.35;
}

.pricing-grid li::marker {
  color: var(--brand-2);
}

.plan-for {
  min-height: 68px;
}

.recommended-badge {
  position: absolute;
  top: -13px;
  right: 18px;
  border-radius: 999px;
  background: var(--brand-3);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 11px;
  text-transform: uppercase;
}

.comparison-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 56px;
}

.comparison-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.comparison-table {
  min-width: 760px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 15px 14px;
}

.comparison-table th:nth-child(3),
.comparison-table td:nth-child(3) {
  background: rgba(31, 111, 120, 0.08);
  font-weight: 800;
}

.final-cta {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 72px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--white);
  padding: 38px;
  text-align: center;
}

.final-cta h2 {
  max-width: 760px;
  margin: 8px auto 18px;
  font-size: 34px;
  line-height: 1.12;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.thank-you-screen {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(18, 58, 74, 0.08), rgba(248, 251, 251, 0.98)),
    var(--bg);
}

.thank-you-wrap {
  display: grid;
  place-items: center;
  width: min(960px, calc(100% - 32px));
  min-height: calc(100vh - 98px);
  margin: 0 auto;
  padding: 36px 0 70px;
}

.thank-you-card {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 34px;
  box-shadow: 0 18px 60px rgba(18, 58, 74, 0.12);
}

.success-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--brand-3);
  color: var(--brand);
  font-size: 14px;
  font-weight: 900;
}

.thank-you-card h1 {
  color: var(--brand);
  font-size: 38px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.thank-you-card > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.next-steps {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.next-steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.next-steps strong,
.next-steps span {
  display: block;
}

.next-steps span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.thank-you-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-card {
  width: min(440px, 100%);
}

.auth-card img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  background: var(--brand);
  border-radius: 8px;
  padding: 8px;
}

.auth-card button {
  width: 100%;
  margin-top: 8px;
}

.app-shell {
  display: none;
}

body.authenticated .app-shell {
  display: block;
}

body.authenticated .marketing-site,
body.authenticated .auth-screen,
body.authenticated .thank-you-screen {
  display: none !important;
}

.tenant-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: var(--brand);
  color: var(--white);
  border-radius: 8px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 7px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0.75;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--brand);
  font-weight: 700;
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 12px;
  cursor: pointer;
}

button.primary {
  background: var(--brand-2);
  color: var(--white);
  border-color: var(--brand-2);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.internal-tab {
  opacity: 0.42;
}

.client-hidden {
  display: none;
}

.tab.active {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.upgrade-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(18, 58, 74, 0.98), rgba(31, 111, 120, 0.92));
  color: var(--white);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
}

.upgrade-strip h2 {
  font-size: 20px;
  margin: 4px 0 6px;
}

.upgrade-strip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.upgrade-strip span {
  color: var(--brand-3);
}

.grid {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: minmax(280px, 420px) 1fr;
}

.section-block,
.summary-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

input {
  width: 100%;
  border: 1px solid #c9d6d9;
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--input);
  color: var(--ink);
  font: inherit;
}

select {
  width: 100%;
  border: 1px solid #c9d6d9;
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--input);
  color: var(--ink);
  font: inherit;
}

input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  accent-color: var(--brand-2);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  border-top: 1px solid var(--line);
}

.field-note,
.notice {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.notice {
  margin: -4px 0 14px;
  padding: 10px 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.notice.warning {
  background: #fff2c6;
  border-color: #e7ca68;
  color: #6b4e00;
  font-weight: 700;
}

.summary-block dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}

.summary-block div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
}

.summary-block div.strong {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

dt {
  color: inherit;
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 6px;
}

dd {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

#employeeRate {
  font-size: 15px;
  line-height: 1.25;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  background: #d9e8ea;
  color: var(--brand);
  font-size: 13px;
}

td.number,
th.number {
  text-align: right;
}

td.total-row {
  background: var(--brand);
  color: var(--white);
  font-weight: 800;
}

td input {
  min-height: 32px;
}

.parameter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.table-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.profile-grid {
  grid-template-columns: minmax(300px, 420px) minmax(300px, 1fr);
}

.plan-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
  margin-bottom: 14px;
}

.plan-status strong {
  display: block;
  margin: 6px 0;
  color: var(--brand);
  font-size: 22px;
}

.plan-status p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.plan-panel {
  grid-column: 1 / -1;
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.plan-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
}

.plan-list strong,
.plan-list span {
  display: block;
}

.plan-list span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.upgrade-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.product-mark {
  color: rgba(16, 42, 51, 0.42);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  margin: 6px 4px 18px;
  text-transform: uppercase;
}

.logo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
}

.logo-preview img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--brand);
  padding: 8px;
}

input:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.proposal-doc {
  display: none;
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.proposal-doc::before {
  content: "";
  position: absolute;
  inset: 110px 0 0;
  background-image: var(--proposal-watermark, none);
  background-repeat: no-repeat;
  background-position: center 52%;
  background-size: min(540px, 62vw);
  opacity: 0.045;
  pointer-events: none;
}

.proposal-doc > * {
  position: relative;
  z-index: 1;
}

.proposal-hero {
  background:
    linear-gradient(135deg, rgba(18, 58, 74, 0.98), rgba(31, 111, 120, 0.94)),
    var(--brand);
  color: var(--white);
  padding: 34px 40px;
}

.proposal-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.proposal-brand img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px;
}

.proposal-hero p,
.proposal-hero h2,
.proposal-hero span {
  margin: 0;
}

.proposal-hero p {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.72;
}

.proposal-hero h2 {
  margin-top: 8px;
  font-size: 34px;
}

.proposal-hero span {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  opacity: 0.86;
}

.proposal-client,
.proposal-prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 24px 40px;
}

.proposal-client div,
.proposal-prices div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(240, 248, 241, 0.92);
}

.proposal-client span,
.proposal-prices span,
.proposal-prices small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.proposal-client strong,
.proposal-prices strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
}

.proposal-prices strong {
  font-size: 24px;
}

.proposal-section {
  padding: 0 40px 22px;
}

.proposal-section h3 {
  margin: 0 0 10px;
  color: var(--brand-2);
  font-size: 17px;
}

.proposal-section p {
  margin: 0;
  color: #34464c;
  line-height: 1.6;
}

.proposal-table {
  min-width: 0;
}

.proposal-table td {
  font-size: 15px;
}

.proposal-table td:last-child {
  text-align: right;
  font-weight: 800;
}

.proposal-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 40px;
  background: #eef7ed;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .hero-site,
  .value-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .hero-site h1 {
    font-size: 34px;
  }

  .hero-photo,
  .hero-photo img {
    min-height: 360px;
  }

  .topbar,
  .two-col {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .summary-block dl,
  .parameter-grid,
  .profile-grid,
  .plan-list,
  .table-actions {
    grid-template-columns: 1fr;
  }

  .upgrade-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  body {
    background: var(--white);
  }

  .proposal-mode .topbar,
  .proposal-mode .tabs,
  .proposal-mode #calculator,
  .proposal-mode #parameters {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .proposal-mode .proposal-doc {
    display: block !important;
    border: 0;
    border-radius: 0;
  }

  .section-block,
  .summary-block,
  .topbar {
    border-radius: 0;
  }

  .proposal-hero {
    padding: 28px 34px;
  }

  .proposal-client,
  .proposal-prices {
    padding: 20px 34px;
  }

  .proposal-section {
    padding: 0 34px 18px;
  }

  .proposal-footer {
    padding: 16px 34px;
  }
}
