:root {
  color-scheme: light;
  --ink: #162123;
  --muted: #5c6a6e;
  --paper: #f6f8f5;
  --surface: #ffffff;
  --line: #dce5df;
  --teal: #0b5c68;
  --teal-dark: #07414c;
  --mint: #d9f1e8;
  --gold: #f0b34c;
  --coral: #dc684d;
  --shadow: 0 16px 36px rgba(8, 40, 48, 0.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.app-shell {
  min-height: 100svh;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  background: rgba(246, 248, 245, 0.94);
  border-bottom: 1px solid rgba(220, 229, 223, 0.84);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  max-width: 190px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button,
.bottom-nav button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 1.45rem;
  font-weight: 700;
}

main {
  width: min(100%, 780px);
  margin: 0 auto;
}

.hero-section {
  display: grid;
  gap: 18px;
  padding: 30px 18px 18px;
  background:
    linear-gradient(135deg, rgba(11, 92, 104, 0.94), rgba(7, 65, 76, 0.94)),
    linear-gradient(45deg, rgba(240, 179, 76, 0.28), rgba(220, 104, 77, 0.18));
  color: white;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-section .eyebrow {
  color: #f7c869;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.35rem;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  line-height: 1.18;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.hero-text {
  margin-bottom: 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.55;
}

.search-panel,
.quote-form,
.calculator,
.track-form,
.company-block,
.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  color: var(--ink);
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.91rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  padding: 12px;
  outline: 0;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 92, 104, 0.14);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.search-row button,
.primary-button,
.product-card button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.file-action,
.secondary-action {
  display: grid;
  min-height: 48px;
  align-items: center;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4faf6;
  color: var(--teal-dark);
  padding: 9px 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.file-action input,
.file-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.install-cta {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: #f8d36f;
  color: #251908;
  padding: 12px;
  text-align: left;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.install-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 1.35rem;
  font-weight: 800;
}

.install-cta strong,
.install-cta small {
  display: block;
}

.install-cta strong {
  font-size: 0.98rem;
}

.install-cta small {
  color: rgba(37, 25, 8, 0.78);
  font-size: 0.78rem;
  line-height: 1.35;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0;
  background: var(--line);
}

.status-strip div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  align-content: center;
  padding: 12px;
  background: white;
}

.status-strip strong {
  color: var(--teal-dark);
  font-size: 0.9rem;
}

.status-strip span {
  color: var(--muted);
  font-size: 0.8rem;
}

.section-block {
  padding: 22px 18px;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

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

.category-grid button {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.quote-form {
  display: grid;
  gap: 13px;
  padding: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.file-upload {
  position: relative;
  min-height: 70px;
  align-content: center;
  border: 1px dashed #a8bdb4;
  border-radius: 8px;
  background: #f4faf6;
  padding: 14px;
  cursor: pointer;
}

.file-upload span {
  color: var(--teal-dark);
  font-weight: 800;
}

.file-upload small {
  color: var(--muted);
  font-weight: 500;
}

.shipping-choice {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.shipping-choice legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.91rem;
  font-weight: 800;
}

.shipping-choice label {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px 12px;
  font-weight: 700;
}

.shipping-choice input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.shipping-choice small {
  color: var(--muted);
  font-weight: 700;
}

.calculator {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.unit-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  align-items: center;
}

.unit-row span {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  font-weight: 800;
}

.calc-result {
  display: grid;
  gap: 4px;
  min-height: 84px;
  border-radius: 8px;
  background: #fff5df;
  padding: 14px;
}

.calc-result strong {
  color: #5b3300;
  font-size: 1.2rem;
}

.calc-result span {
  color: #6c5429;
  font-size: 0.86rem;
}

.product-list {
  display: grid;
  gap: 12px;
}

.product-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
}

.product-card h3,
.product-card p,
.product-card button {
  grid-column: 2;
}

.product-card p {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.product-card button {
  justify-self: start;
}

.product-image {
  grid-row: 1 / span 3;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mint), #ffffff);
  border: 1px solid var(--line);
}

.product-image.phone {
  background:
    linear-gradient(90deg, transparent 38%, rgba(11, 92, 104, 0.28) 39%, rgba(11, 92, 104, 0.28) 61%, transparent 62%),
    linear-gradient(135deg, #d9f1e8, #ffffff);
}

.product-image.appliance {
  background:
    linear-gradient(180deg, transparent 28%, rgba(240, 179, 76, 0.55) 29%, rgba(240, 179, 76, 0.55) 70%, transparent 71%),
    linear-gradient(135deg, #ffffff, #d9f1e8);
}

.product-image.parts {
  background:
    linear-gradient(45deg, transparent 36%, rgba(220, 104, 77, 0.5) 37%, rgba(220, 104, 77, 0.5) 59%, transparent 60%),
    linear-gradient(135deg, #eef8f4, #ffffff);
}

.track-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

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

.timeline li {
  position: relative;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 11px 12px 11px 42px;
  color: var(--muted);
  font-weight: 700;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 13px;
  width: 14px;
  height: 14px;
  border: 2px solid #a8bdb4;
  border-radius: 50%;
}

.timeline li.done {
  color: var(--teal-dark);
}

.timeline li.done::before {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: inset 0 0 0 3px white;
}

.company-block {
  margin: 0 18px 26px;
  padding: 18px;
}

.company-block p {
  margin-bottom: 8px;
  color: var(--muted);
}

.company-block .primary-button {
  display: grid;
  margin-top: 14px;
  place-items: center;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.bottom-nav a,
.bottom-nav button {
  display: grid;
  min-height: 46px;
  place-items: center;
  border-radius: 8px;
  background: #eef8f4;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.bottom-nav button {
  background: var(--gold);
  color: #251908;
}

.install-dialog {
  width: min(92vw, 440px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.install-dialog::backdrop {
  background: rgba(10, 22, 26, 0.55);
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 12px;
  border-radius: 8px;
  background: white;
  padding: 20px;
  box-shadow: var(--shadow);
}

.dialog-card h2 {
  padding-right: 34px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f6;
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
}

.install-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.install-steps strong {
  color: var(--teal-dark);
}

.hidden {
  display: none !important;
}

@media (max-width: 430px) {
  h1 {
    font-size: 2rem;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .search-row,
  .form-grid,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .status-strip div {
    min-height: 58px;
  }
}

@media (min-width: 720px) {
  .hero-section {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: start;
    padding: 38px 26px 24px;
  }

  .install-cta {
    grid-column: 1 / -1;
  }

  .section-block {
    padding-right: 26px;
    padding-left: 26px;
  }

  .product-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-card h3,
  .product-card p,
  .product-card button {
    grid-column: 1;
  }

  .product-image {
    grid-row: auto;
    width: 100%;
  }
}
