:root {
  --ink: #1e2a33;
  --paper: #f3eee4;
  --oak: #b4763c;
  --oak-wash: #b4763c1a;
  --slate: #51728c;
  --safety: #f0b429;
  --border: #e7e0d3;
  --border-strong: #c9c1ae;
  --muted: #6b6455;
  --label: #8b8477;
}

* { box-sizing: border-box; }

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

a { color: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 20;
}

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

.topbar__logo-mark {
  color: var(--safety);
  font-size: 20px;
}

.topbar__title {
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.topbar__subtitle {
  color: #f3eee499;
  font-size: 11px;
  margin-top: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 3px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}

.btn--call {
  background: var(--safety);
  color: var(--ink);
}

.btn--cta {
  background: var(--safety);
  color: var(--ink);
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border-radius: 4px;
}

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

/* ---------- Page ---------- */
.page {
  padding: 20px 16px 96px;
  max-width: 1180px;
  margin: 0 auto;
}

.page__heading {
  font-size: 26px;
  font-weight: bold;
  margin: 4px 0 2px;
}

.page__subheading {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.form-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-label {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.04em;
  color: var(--label);
  text-transform: uppercase;
  margin: 0 0 8px;
}

.field-note {
  font-size: 11px;
  color: var(--label);
  margin: 6px 0 0;
}

/* ---------- Style cards ---------- */
.style-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .style-grid { grid-template-columns: repeat(3, 1fr); }
}

.style-card {
  text-align: left;
  border: 2px solid var(--border);
  border-radius: 3px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.style-card.is-active {
  border-color: var(--oak);
  background: var(--oak-wash);
}

/* Match the 3:2 of the card photos. A fixed pixel height made this box
   roughly 3.3:1, so object-fit: cover sliced the roofs and bases off. */
.style-card__thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 3px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  overflow: hidden;
}

.style-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.style-card__label {
  font-weight: bold;
  font-size: 14px;
}

.style-card__blurb {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Size rows ---------- */
.size-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.size-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.size-row__label {
  font-size: 12px;
  font-weight: bold;
  color: var(--label);
  width: 56px;
}

.chip {
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 3px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
}

.chip.is-active {
  border-color: var(--oak);
  background: var(--oak-wash);
}

.chip .price {
  color: var(--slate);
  margin-left: 6px;
}

.chip:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  border-style: dashed;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Swatches ---------- */
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 3px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
}

.swatch.is-active {
  border-color: var(--oak);
  background: var(--oak-wash);
}

.swatch__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #00000022;
  flex-shrink: 0;
}

/* Shingle swatches show the real texture photo, so give them more area
   than a 16px dot — a shingle blend is unreadable at that size. */
.swatch__dot--img {
  width: 30px;
  height: 22px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
}

.swatch__label {
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Add-ons ---------- */
.addon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .addon-grid { grid-template-columns: repeat(2, 1fr); }
}

.addon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 3px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}

.addon.is-active {
  border-color: var(--oak);
  background: var(--oak-wash);
}

.addon__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.addon__box {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.addon.is-active .addon__box {
  border-color: var(--oak);
  color: var(--oak);
}

.addon__price {
  color: var(--slate);
}

/* ---------- Price panel ---------- */
.price-panel {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .layout { flex-direction: row; }
  .form-col { flex: 1; }
  .price-panel { width: 320px; position: sticky; top: 84px; }
}

#price-panel-inner {
  background: var(--ink);
  border-radius: 4px;
  padding: 16px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #f3eee4cc;
  margin-bottom: 8px;
}

.price-row strong {
  color: #fff;
  font-weight: bold;
}

.price-row--divider {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ffffff22;
}

.price-total-label {
  font-size: 12px;
  font-weight: bold;
  color: #f3eee4cc;
  margin-bottom: 2px;
}

.price-total-amount {
  font-size: 30px;
  font-weight: bold;
  color: var(--safety);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.price-total-amount.is-na {
  font-size: 18px;
}

.lead-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.lead-fields input {
  width: 100%;
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ffffff33;
  background: #ffffff10;
  color: #fff;
  font-family: inherit;
}

.lead-fields input::placeholder { color: #f3eee499; }

.lead-fields input:invalid { outline: none; }

.field-error {
  font-size: 11px;
  color: #ff9b8a;
  margin: -4px 0 0;
}

.lead-disclaimer {
  font-size: 10px;
  color: #f3eee488;
  margin: 8px 0 0;
}

.success-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0b42922;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--safety);
  font-size: 18px;
  margin-bottom: 8px;
}

.success-title {
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 6px;
}

.success-body {
  font-size: 12px;
  color: #f3eee4cc;
  margin-bottom: 12px;
}

/* ---------- Mobile bottom bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--ink);
  box-shadow: 0 -2px 10px #0000002a;
}

.mobile-bar__total {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.mobile-bar__label {
  font-size: 10px;
  color: #f3eee499;
}

.mobile-bar__amount {
  font-size: 18px;
  font-weight: bold;
  color: var(--safety);
  font-variant-numeric: tabular-nums;
}

.mobile-bar .btn--cta {
  width: auto;
  padding: 10px 18px;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .mobile-bar { display: none; }
  .page { padding-bottom: 40px; }
}
