:root {
  --bg: #050505;
  --bg-card: rgba(10, 10, 10, 0.92);
  --bg-section: #0a0a0a;
  --bg-light: #141414;
  --green: #4ab567;
  --green-hover: #58c46e;
  --green-dark: #123b1c;
  --accent: #82dc90;
  --lime: #d7ff1f;
  --text: #ffffff;
  --text-muted: #b3b3b3;
  --text-dim: #7f7f7f;
  --border: rgba(255,255,255,0.12);
  --border-light: rgba(130,220,144,0.38);
  --radius: 8px;
  --radius-lg: 20px;
  --shadow: 0 22px 70px rgba(0,0,0,0.55);
  --shadow-sm: 0 10px 30px rgba(0,0,0,0.34);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: #050505;
  color: var(--text);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 17% 7%, rgba(215,255,31,0.25), transparent 10%),
    radial-gradient(circle at 84% 9%, rgba(130,220,144,0.20), transparent 12%),
    radial-gradient(circle at 50% 35%, rgba(74,181,103,0.14), transparent 33%),
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: auto, auto, auto, 88px 88px, 88px 88px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.96) 62%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(5,5,5,0.08), rgba(5,5,5,0.74)),
    radial-gradient(ellipse at 50% 26%, rgba(33,95,43,0.22), transparent 38%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.widget-shell {
  width: 100%;
  min-height: 100vh;
  padding: 26px;
}

.estimate-widget {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.widget-header {
  position: relative;
  margin-bottom: 22px;
  text-align: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
  margin-bottom: 4px;
  text-decoration: none;
}

.brand-logo-icon {
  width: clamp(72px, 12vw, 122px);
  height: clamp(72px, 12vw, 122px);
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 26px rgba(74,181,103,0.22));
}

.brand-mark strong {
  display: block;
  color: var(--text);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.1;
}

.brand-mark > span:last-child {
  min-width: 0;
  text-align: left;
}

.brand-mark small {
  display: block;
  max-width: 520px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: break-word;
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 20px;
}

.trust-line span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(20,20,20,0.86);
  color: #f2f2f2;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.headline-block {
  max-width: 760px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--lime);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  color: var(--text);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2.25rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: 0;
}

.headline-block p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

.estimate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(315px, 0.7fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.estimate-form,
.estimate-result {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.estimate-form {
  padding: 20px;
}

.estimate-projects {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.estimate-project {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20,20,20,0.96), rgba(10,10,10,0.96));
}

.estimate-project-header,
.shared-details h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.estimate-project-header {
  margin-bottom: 14px;
}

.estimate-project h2,
.shared-details h2 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1rem;
  line-height: 1.2;
}

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

.form-group {
  min-width: 0;
}

.form-group label {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
}

.form-group input,
.form-group select {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 0 42px 0 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #050505;
  color: var(--text);
  font-size: 0.94rem;
}

.form-group input {
  padding-right: 12px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2382dc90' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-group input:focus,
.form-group select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--green);
}

.form-group input::placeholder {
  color: var(--text-dim);
}

.full {
  grid-column: 1 / -1;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.text-button:hover {
  color: var(--text);
}

.add-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 8px 0;
  font-size: 0.96rem;
}

.add-button::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--green);
  color: #050505;
  font-weight: 900;
}

.shared-details {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.shared-details h2 {
  margin-bottom: 14px;
}

.form-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease-smooth), box-shadow 0.2s, border-color 0.2s;
}

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

.button.primary {
  background: var(--green);
  color: #050505;
}

.button.primary:hover {
  background: var(--green-hover);
  box-shadow: 0 6px 20px rgba(74,181,103,0.35);
}

.button.secondary {
  border-color: var(--border-light);
  background: transparent;
  color: var(--text);
}

.button.secondary:hover {
  background: var(--green-dark);
  border-color: var(--accent);
}

.estimate-result {
  position: sticky;
  top: 16px;
  padding: 22px;
  border-color: rgba(130,220,144,0.24);
}

.result-label {
  margin-bottom: 8px;
  color: var(--lime);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.estimate-price {
  margin-bottom: 12px;
  color: var(--text);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 800;
  line-height: 1;
}

#estimate-summary {
  color: var(--text-muted);
  line-height: 1.55;
}

.estimate-factors {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.estimate-factors li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.estimate-factors li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.result-actions {
  flex-direction: column;
  margin-top: 20px;
}

.result-actions .button {
  width: 100%;
}

.fine-print {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.5;
}

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

  .estimate-layout {
    grid-template-columns: 1fr;
  }

  .estimate-result {
    position: static;
  }
}

@media (max-width: 560px) {
  .widget-shell {
    padding: 12px;
  }

  .brand-mark {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .brand-mark > span:last-child {
    text-align: center;
  }

  .trust-line {
    max-width: 310px;
  }

  .trust-line span {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 0.74rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  .headline-block {
    max-width: 100%;
  }

  .headline-block p {
    max-width: 340px;
    font-size: 0.92rem;
  }

  .estimate-form,
  .estimate-result {
    padding: 14px;
  }

  .estimate-project {
    padding: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions .button {
    width: 100%;
  }
}
