:root {
  color-scheme: light;
  --page: #f6f7f4;
  --panel: #ffffff;
  --ink: #18211f;
  --muted: #65716e;
  --line: #dce3df;
  --teal: #0f766e;
  --teal-strong: #0b5f59;
  --amber: #f59e0b;
  --amber-soft: #fff7e6;
  --blue-soft: #edf5ff;
  --shadow: 0 16px 45px rgba(20, 36, 32, 0.1);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar,
.install-card,
.section-heading,
.button-row,
.heading-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  padding: 14px 0 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.4rem);
}

h2 {
  font-size: 1.08rem;
}

.top-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--teal);
  font-weight: 800;
  padding: 10px 14px;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.panel,
.install-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.install-card {
  margin-bottom: 16px;
  padding: 14px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full-width {
  margin-top: 16px;
}

.field span,
.quote-box span,
.summary-item span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

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

textarea {
  min-height: 320px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.readonly-money {
  background: var(--blue-soft);
  color: #16324f;
  font-weight: 800;
}

input:disabled {
  background: #eef2f1;
  color: #8a9693;
}

.details-panel {
  margin-top: 16px;
  box-shadow: none;
}

.details-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.details-panel[open] summary {
  margin-bottom: 2px;
}

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

.summary-item {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  display: grid;
  gap: 8px;
}

.summary-item strong {
  font-size: 1.26rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.summary-item.highlight {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.5);
}

.quote-box {
  display: grid;
  gap: 8px;
}

.live-status {
  min-height: 1.2em;
  color: var(--teal);
  font-weight: 800;
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 46px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: var(--teal);
  color: #fff;
}

.primary-button:hover {
  background: var(--teal-strong);
}

.secondary-button {
  background: var(--amber);
  color: #201706;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.button-row {
  margin-top: 12px;
}

.button-row button {
  flex: 1;
}

@media (max-width: 860px) {
  .app-shell {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .workspace,
  .field-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .install-card {
    align-items: stretch;
    flex-direction: column;
  }

  .heading-actions,
  .install-actions,
  .button-row {
    width: 100%;
  }

  .heading-actions button,
  .install-actions button {
    flex: 1;
  }
}
