:root {
  color-scheme: light;
  --bg: #000000;
  --panel: #ffffff;
  --ink: #142033;
  --muted: #667085;
  --line: #d9e2ea;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --soft: #e6f4f1;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  text-align: center;
  color: #ffffff;
}

.hero .eyebrow {
  color: #9fe7dc;
}

.hero .subtitle {
  margin: 0 auto;
  color: rgba(255,255,255,.78);
  font-size: 1.05rem;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem clamp(1rem, 4vw, 3rem) 1rem;
}

.company-logo {
  display: block;
  width: min(100%, 900px);
  height: auto;
}

.eyebrow {
  margin: 0 0 .25rem;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: .4rem; font-size: clamp(2rem, 5vw, 4rem); line-height: .95; }
h2 { font-size: 1.25rem; }
h3 { margin: 1.5rem 0 .75rem; }
h4 { margin: 0 0 .5rem; color: var(--accent-dark); }
.controls > h2,
.controls > h3,
.estimate > h2 {
  text-align: center;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .03em;
}
.subtitle { color: var(--muted); max-width: 52rem; }

.badge {
  background: var(--ink);
  color: white;
  padding: .55rem .8rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 34vw);
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  align-items: start;
}

.panel {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(217,226,234,.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}

.controls label {
  display: grid;
  gap: .45rem;
  margin-bottom: 1rem;
  font-weight: 750;
}

select, input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: .78rem .9rem;
  font: inherit;
}

#packageLevelSelect,
#packageLevelSelect option,
#ductlessPackageSelect,
#ductlessPackageSelect option {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.addon-row input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.addon-row.is-disabled {
  opacity: .45;
  cursor: not-allowed;
}

.addon-row.is-disabled input {
  cursor: not-allowed;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  margin-bottom: 1rem;
}

button {
  border: 0;
  border-radius: 12px;
  padding: .78rem 1rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #e9eef4;
  color: var(--ink);
}
button.primary { background: var(--accent); color: white; width: 100%; margin-top: 1rem; }
button:hover { filter: brightness(.97); }

.selected-equipment-info-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.selected-equipment-info-section h3 {
  margin: 0 0 .75rem;
  text-align: center;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .03em;
}
.selected-equipment-info {
  max-height: 34vh;
  overflow: auto;
  white-space: pre-line;
  color: var(--ink);
  font-size: .95rem;
  line-height: 1.45;
  padding: .9rem;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.selected-addon-info-card,
.selected-equipment-item {
  padding: .75rem 0;
  border-top: 1px solid var(--line);
}
.selected-addon-info-card:first-child,
.selected-equipment-item:first-child { border-top: 0; padding-top: 0; }
.selected-addon-info-card h4,
.selected-equipment-list h4 { margin-bottom: .5rem; }
.selected-equipment-item h5 { margin: 0 0 .25rem; color: var(--accent-dark); font-size: .95rem; }
.selected-addon-info-card strong,
.selected-equipment-item strong { display: block; margin-bottom: .4rem; }
.selected-equipment-item small { display: block; color: var(--muted); font-weight: 800; margin-bottom: .4rem; }
.selected-addon-info-card p,
.selected-equipment-item p { margin: 0; }
.selected-equipment-list { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.detail-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  padding: .9rem;
  background: #000;
  color: #fff;
  border-radius: 18px;
  border: 1px solid #000;
}
.detail-card div { display: grid; gap: .15rem; }
.detail-card span { color: rgba(255,255,255,.72); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.customer-summary { margin-top: 1rem; }

.addons {
  display: grid;
  gap: .85rem;
  max-height: 56vh;
  overflow: auto;
  padding-right: .35rem;
}
.addon-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: .8rem;
  background: #fbfcfd;
}
.addon-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .75rem;
  align-items: center;
  padding: .55rem .25rem;
  border-top: 1px solid #eef2f6;
  cursor: pointer;
}
.addon-row:first-of-type { border-top: 0; }
.addon-row input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.addon-quantity-select {
  width: 4.75rem;
  min-width: 4.75rem;
  padding: .42rem .5rem;
  border-radius: 10px;
  font-weight: 800;
  text-align: center;
}
.addon-main { display: grid; gap: .15rem; }
.addon-main small { color: var(--muted); font-weight: 800; letter-spacing: .03em; }

.estimate { position: sticky; top: 1rem; }
.estimate h2 {
  margin-bottom: 1.35rem;
  font-size: clamp(2rem, 3vw, 2.6rem);
  white-space: nowrap;
}
.estimate-line,
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.estimate-line {
  padding: .16rem 0;
  font-size: 1.24rem;
}
.estimate-line span {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.estimate-line strong {
  color: #000000;
  font-size: 1.1em;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}
.selected-addons {
  margin-bottom: 3.9rem;
}
.total-row {
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
}
.total-row.grand {
  align-items: baseline;
  font-size: 1.35rem;
  color: var(--accent-dark);
  border-bottom: 2px solid var(--accent);
  margin-top: .5rem;
}
.addon-total { font-size: .92rem; color: var(--muted); }
.selected-list { margin: .75rem 0; }
.selected-list ul { list-style: none; padding: 0; margin: .45rem 0; display: grid; gap: .45rem; }
.selected-list li { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.selected-list li span { font-weight: 900; color: var(--accent-dark); }
.selected-list li strong { text-align: right; }
.selected-list li small { grid-column: 1 / -1; color: var(--muted); }
.muted span { color: var(--muted); }
.note, .empty { color: var(--muted); font-size: .92rem; }
.addons > .empty,
#packageDetails > p {
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
  font-weight: 900;
  font-style: italic;
}
.raw { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
summary { cursor: pointer; font-weight: 850; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .88rem; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: .5rem; }
th { color: var(--muted); text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
.error { padding: 2rem; color: var(--danger); white-space: pre-wrap; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .estimate { position: static; }
  .toolbar { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
}
