:root {
  --brand-bg: #fafafa;
  --brand-surface: #ffffff;
  --brand-concrete: #e6ebf0;
  --brand-navy: #1b2a4e;
  --brand-sky: #5cc9f5;
  --brand-ink: #1b2a4e;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.ts-home-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--brand-navy);
}

.ts-home-hero {
  text-align: center;
}

.ts-home-brand {
  margin: 0;
  color: var(--brand-sky);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4em;
}

.ts-home-hero h1 {
  margin: 16px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(48px, 8vw, 60px);
  font-weight: 500;
  line-height: 1.1;
}

.ts-home-hero em {
  color: var(--brand-sky);
}

.ts-home-hero p:last-of-type {
  max-width: 448px;
  margin: 16px auto 0;
  color: rgba(27, 42, 78, 0.7);
  font-size: 14px;
}

.ts-home-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 32px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--brand-navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 15px -3px rgba(27, 42, 78, 0.16), 0 4px 6px -4px rgba(27, 42, 78, 0.16);
  transition: transform 0.2s ease;
}

.ts-home-button:hover {
  transform: translateY(-2px);
}

.ts-estimate-page {
  min-height: 100vh;
  padding: 24px 32px;
  background: var(--brand-bg);
}

.ts-estimate-shell {
  display: grid;
  grid-template-columns: 5fr 7fr;
  width: 100%;
  min-width: 0;
  max-width: 1152px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--brand-concrete);
  border-radius: 24px;
  background: var(--brand-surface);
  box-shadow: 0 32px 64px -16px rgba(27, 42, 78, 0.1);
}

.ts-brand-panel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 720px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px;
  background: var(--brand-navy);
  color: #fff;
}

.ts-orb,
.ts-blueprint-grid,
.ts-compass {
  pointer-events: none;
  position: absolute;
}

.ts-orb {
  width: 288px;
  height: 288px;
  border-radius: 50%;
  filter: blur(64px);
}

.ts-orb-top {
  top: -96px;
  right: -96px;
  background: rgba(92, 201, 245, 0.25);
}

.ts-orb-bottom {
  bottom: -128px;
  left: -64px;
  background: rgba(92, 201, 245, 0.1);
}

.ts-blueprint-grid {
  inset: 0;
  opacity: 0.07;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 48px 48px;
}

.ts-compass {
  right: 32px;
  bottom: 96px;
  width: 160px;
  height: 160px;
  color: rgba(92, 201, 245, 0.25);
  animation: spin 60s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ts-brand-copy,
.ts-trust-block {
  position: relative;
  z-index: 1;
}

.ts-brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-sky);
}

.ts-brand-mark span {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.ts-eyebrow {
  margin: 24px 0 0;
  color: var(--brand-sky);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.ts-brand-copy h1 {
  margin: 12px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(48px, 6vw, 60px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.05;
}

.ts-brand-copy h1 span {
  color: var(--brand-sky);
  font-style: italic;
  font-weight: 500;
}

.ts-lede {
  max-width: 384px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.7;
}

.ts-trust-block {
  margin-top: 32px;
}

.ts-trust-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.ts-trust-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--brand-sky);
}

.ts-trust-icon svg {
  width: 20px;
  height: 20px;
}

.ts-trust-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.ts-trust-sub {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-family: Fraunces, Georgia, serif;
  font-size: 12px;
  font-style: italic;
}

.ts-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
}

.ts-stat {
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  backdrop-filter: blur(8px);
}

.ts-stat strong {
  display: block;
  color: var(--brand-sky);
  font-family: Fraunces, Georgia, serif;
  font-size: 20px;
  font-weight: 500;
}

.ts-stat span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ts-form-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 40px;
}

.ts-progress-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 50px;
}

.ts-progress-head p {
  margin: 0;
  color: rgba(27, 42, 78, 0.5);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ts-progress-head strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-progress-bars {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.ts-progress-bars span {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: var(--brand-concrete);
  transition: background-color 0.2s ease;
}

.ts-progress-bars span.active {
  background: var(--brand-navy);
}

.ts-form-sections {
  margin-top: 24px;
}

.ts-form-sections section + section,
.ts-actions {
  margin-top: 24px;
}

.ts-section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.ts-section-title > span {
  color: var(--brand-sky);
  font-family: Fraunces, Georgia, serif;
  font-size: 14px;
  font-style: italic;
}

.ts-section-title h2 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 18px;
  font-weight: 700;
}

.ts-section-title p {
  margin: 2px 0 0;
  color: rgba(27, 42, 78, 0.5);
  font-size: 12px;
}

.ts-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.ts-type-card {
  position: relative;
  min-width: 0;
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--brand-concrete);
  border-radius: 12px;
  background: #fff;
  color: var(--brand-navy);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.ts-type-card:hover {
  border-color: var(--brand-sky);
  box-shadow: 0 4px 12px rgba(27, 42, 78, 0.08);
  transform: translateY(-2px);
}

.ts-type-card.active {
  border-color: var(--brand-navy);
  background: rgba(27, 42, 78, 0.03);
  box-shadow: 0 1px 2px rgba(27, 42, 78, 0.08);
}

.ts-type-card > span {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 2px var(--brand-concrete);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.ts-type-card.active > span {
  background: var(--brand-navy);
  box-shadow: 0 0 0 2px rgba(27, 42, 78, 0.2);
}

.ts-type-card strong {
  display: block;
  padding-right: 18px;
  font-size: 14px;
  font-weight: 700;
}

.ts-type-card small {
  display: block;
  margin-top: 4px;
  color: rgba(27, 42, 78, 0.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ts-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.ts-floating-field {
  position: relative;
  display: block;
}

.ts-floating-field input,
textarea {
  width: 100%;
  border: 1px solid var(--brand-concrete);
  border-radius: 12px;
  background: #fff;
  color: var(--brand-navy);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ts-floating-field input {
  height: 50px;
  padding: 20px 16px 6px;
}

.ts-floating-field input:focus,
textarea:focus {
  border-color: var(--brand-sky);
  box-shadow: 0 0 0 2px rgba(92, 201, 245, 0.3);
}

.ts-floating-field span {
  pointer-events: none;
  position: absolute;
  top: 15px;
  left: 16px;
  color: rgba(27, 42, 78, 0.5);
  font-size: 14px;
  transition: all 0.18s ease;
}

.ts-floating-field input:focus + span,
.ts-floating-field input:not(:placeholder-shown) + span {
  top: 8px;
  color: var(--brand-sky);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ts-budget-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.ts-budget-head output {
  flex: 0 0 auto;
  color: var(--brand-sky);
  font-family: Fraunces, Georgia, serif;
  font-size: 24px;
  font-style: italic;
}

.ts-brand-range {
  width: 100%;
  height: 6px;
  margin-top: 20px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(to right, var(--brand-navy) 0%, var(--brand-sky) 100%);
  outline: none;
}

.ts-brand-range::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  appearance: none;
  border: 3px solid var(--brand-navy);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(27, 42, 78, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.ts-brand-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.ts-brand-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--brand-navy);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(27, 42, 78, 0.25);
  cursor: pointer;
}

.ts-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: rgba(27, 42, 78, 0.4);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ts-range-labels span:nth-child(2) {
    margin-left: 20px;
}
textarea {
  min-height: 100px;
  margin-top: 16px;
  padding: 16px;
  resize: vertical;
  line-height: 1.5;
}

textarea::placeholder {
  color: rgba(27, 42, 78, 0.3);
}

.ts-upload-box {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed var(--brand-concrete);
  border-radius: 12px;
  background: rgba(250, 250, 250, 0.6);
  transition: border-color 0.2s ease;
}

.ts-upload-box:hover,
.ts-upload-box.dragging {
  border-color: var(--brand-sky);
}

.ts-upload-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.ts-upload-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--brand-concrete);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-sky);
}

.ts-upload-copy strong {
  display: block;
  max-width: 360px;
  overflow: hidden;
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-upload-copy small {
  display: block;
  margin-top: 2px;
  color: rgba(27, 42, 78, 0.5);
  font-size: 11px;
}

.ts-upload-box button {
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 1px solid var(--brand-navy);
  border-radius: 999px;
  background: transparent;
  color: var(--brand-navy);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ts-upload-box button:hover {
  background: var(--brand-navy);
  color: #fff;
}

#fileInput {
  display: none;
}

.ts-summary-box {
  padding: 16px;
  border: 1px solid var(--brand-concrete);
  border-radius: 16px;
  background: rgba(250, 250, 250, 0.6);
}

.ts-summary-box p {
  margin: 0;
  color: rgba(27, 42, 78, 0.5);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.ts-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin-top: 12px;
}

.ts-summary-grid div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.ts-summary-grid span {
  color: rgba(27, 42, 78, 0.5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ts-summary-grid strong {
  min-width: 0;
  overflow: hidden;
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.ts-submit-button,
.ts-call-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.ts-submit-button {
  position: relative;
  gap: 12px;
  overflow: hidden;
  border: 0;
  background: var(--brand-navy);
  color: #fff;
  box-shadow: 0 15px 40px -15px rgba(27, 42, 78, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.ts-submit-button::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}

.ts-submit-button:hover {
  transform: translateY(-2px);
}

.ts-submit-button:hover::after {
  transform: translateX(100%);
}

.ts-call-button {
  padding: 0 24px;
  border: 1px solid var(--brand-concrete);
  color: var(--brand-navy);
  transition: background-color 0.2s ease;
}

.ts-call-button:hover {
  background: var(--brand-bg);
}

.ts-privacy-note {
  margin: 24px 0 0;
  padding-bottom: 8px;
  color: rgba(27, 42, 78, 0.5);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1023px) {
  .ts-estimate-page {
    padding: 32px;
  }

  .ts-estimate-shell {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .ts-brand-panel {
    min-height: 620px;
    padding: 56px;
  }
}

@media (max-width: 640px) {
  .ts-estimate-page {
    padding: 32px 16px;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
  }

  .ts-estimate-shell {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    border-radius: 24px;
  }

  .ts-brand-panel,
  .ts-form-panel {
    width: 100%;
    max-width: 100%;
    padding: 40px 24px;
  }

  .ts-brand-panel {
    min-height: auto;
  }

  .ts-type-grid,
  .ts-contact-grid,
  .ts-summary-grid,
  .ts-actions {
    grid-template-columns: 1fr;
  }

  .ts-progress-head {
    align-items: start;
  }

  .ts-budget-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ts-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 8px;
}

  .ts-upload-box {
    align-items: stretch;
    flex-direction: column;
  }

  .ts-upload-copy strong {
    max-width: 100%;
  }

  .ts-upload-box button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .ts-brand-panel,
  .ts-form-panel {
    padding: 32px 24px;
  }

  .ts-brand-copy h1 {
    font-size: 46px;
  }

  .ts-progress-head {
    grid-template-columns: 1fr;
  }

  .ts-progress-bars {
    width: 100%;
  }

  .ts-progress-bars span {
    flex: 1 1 0;
    width: auto;
  }
}
